PageSourceSearch

https://chkstepan.com/_next/static/chunks/0f6d3e1021fd9037.js

js chkstepan.com collected 2026-10-06 13:37:31 UTC 150,748 bytes, 227 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,9725,e=>{e.v({lanyardWrapper:"style-module-scss-module__-80N3q__lanyardWrapper"})},2501,e=>{"use strict";let t;var r=e.i(43476),a=e.i(9725),i=e.i(90072),n=e.i(46930),s=e.i(71645),o=e.i(75056),l=e.i(40859),l=l,u=e.i(71753),c=e.i(78140),d=e.i(15080),f=e.i(99143);let h=e=>e===Object(e)&&!Array.isArray(e)&&"function"!=typeof e;function p(e,t){let r=(0,d.useThree)(e=>e.gl),a=(0,f.useLoader)(i.TextureLoader,h(e)?Object.values(e):e);return(0,s.useLayoutEffect)(()=>{null==t||t(a)},[t]),(0,s.useEffect)(()=>{if("initTexture"in r){let e=[];Array.isArray(a)?e=a:a instanceof i.Texture?e=[a]:h(a)&&(e=Object.values(a)),e.forEach(e=>{e instanceof i.Texture&&r.initTexture(e)})}},[r,a]),(0,s.useMemo)(()=>{if(!h(e))return a;{let t={},r=0;for(let i in e)t[i]=a[r++];return t}},[e,a])}p.preload=e=>f.useLoader.preload(i.TextureLoader,e),p.clear=e=>f.useLoader.clear(i.TextureLoader,e);var m=e.i(31067),g=l,y=l,l=l,v=i,_=e.i(31497);class w extends v.Mesh{constructor(e,t){var r,a;const i=(e=>e&&e.isCubeTexture)(e),n=Math.floor(Math.log2((null!=(a=i?null==(r=e.image[0])?void 0:r.width:e.image.width)?a:1024)/4)),s=Math.pow(2,n),o=3*Math.max(s,112),l=`
2        varying vec3 vWorldPosition;
3        void main() 
4        {
5            vec4 worldPosition = ( modelMatrix * vec4( position, 1.0 ) );
6            vWorldPosition = worldPosition.xyz;
7            
8            gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
9        }
10        `,u=[i?"#define ENVMAP_TYPE_CUBE":"",`#define CUBEUV_TEXEL_WIDTH ${1/o}`,`#define CUBEUV_TEXEL_HEIGHT ${1/(4*s)}`,`#define CUBEUV_MAX_MIP ${n}.0`].join("\n")+`
11        #define ENVMAP_TYPE_CUBE_UV
12        varying vec3 vWorldPosition;
13        uniform float radius;
14        uniform float height;
15        uniform float angle;
16        #ifdef ENVMAP_TYPE_CUBE
17            uniform samplerCube map;
18        #else
19            uniform sampler2D map;
20        #endif
21        // From: https://www.shadertoy.com/view/4tsBD7
22        float diskIntersectWithBackFaceCulling( vec3 ro, vec3 rd, vec3 c, vec3 n, float r ) 
23        {
24            float d = dot ( rd, n );
25            
26            if( d > 0.0 ) { return 1e6; }
27            
28            vec3  o = ro - c;
29            float t = - dot( n, o ) / d;
30            vec3  q = o + rd * t;
31            
32            return ( dot( q, q ) < r * r ) ? t : 1e6;
33        }
34        // From: https://www.iquilezles.org/www/articles/intersectors/intersectors.htm
35        float sphereIntersect( vec3 ro, vec3 rd, vec3 ce, float ra ) 
36        {
37            vec3 oc = ro - ce;
38            float b = dot( oc, rd );
39            float c = dot( oc, oc ) - ra * ra;
40            float h = b * b - c;
41            
42            if( h < 0.0 ) { return -1.0; }
43            
44            h = sqrt( h );
45            
46            return - b + h;
47        }
48        vec3 project() 
49        {
50            vec3 p = normalize( vWorldPosition );
51            vec3 camPos = cameraPosition;
52            camPos.y -= height;
53            float intersection = sphereIntersect( camPos, p, vec3( 0.0 ), radius );
54            if( intersection > 0.0 ) {
55                
56                vec3 h = vec3( 0.0, - height, 0.0 );
57                float intersection2 = diskIntersectWithBackFaceCulling( camPos, p, h, vec3( 0.0, 1.0, 0.0 ), radius );
58                p = ( camPos + min( intersection, intersection2 ) * p ) / radius;
59            } else {
60                p = vec3( 0.0, 1.0, 0.0 );
61            }
62            return p;
63        }
64        #include <common>
65        #include <cube_uv_reflection_fragment>
66        void main() 
67        {
68            vec3 projectedWorldPosition = project();
69            
70            #ifdef ENVMAP_TYPE_CUBE
71                vec3 outcolor = textureCube( map, projectedWorldPosition ).rgb;
72            #else
73                vec3 direction = normalize( projectedWorldPosition );
74                vec2 uv = equirectUv( direction );
75                vec3 outcolor = texture2D( map, uv ).rgb;
76            #endif
77            gl_FragColor = vec4( outcolor, 1.0 );
78            #include <tonemapping_fragment>
79            #include <${_.version>=154?"colorspace_fragment":"encodings_fragment"}>
80        }
81        `,c={map:{value:e},height:{value:(null==t?void 0:t.height)||15},radius:{value:(null==t?void 0:t.radius)||100}};super(new v.IcosahedronGeometry(1,16),new v.ShaderMaterial({uniforms:c,fragmentShader:u,vertexShader:l,side:v.DoubleSide}))}set radius(e){this.material.uniforms.radius.value=e}get radius(){return this.material.uniforms.radius.value}set height(e){this.material.uniforms.height.value=e}get height(){return this.material.uniforms.height.value}}var x=i;class b extends x.DataTextureLoader{constructor(e){super(e),this.type=x.HalfFloatType}parse(e){let t,r,a,i=function(e,t){switch(e){case 1:throw Error("THREE.RGBELoader: Read Error: "+(t||""));case 2:throw Error("THREE.RGBELoader: Write Error: "+(t||""));case 3:throw Error("THREE.RGBELoader: Bad File Format: "+(t||""));default:throw Error("THREE.RGBELoader: Memory Error: "+(t||""))}},n=function(e,t,r){t=t||1024;let a=e.pos,i=-1,n=0,s="",o=String.fromCharCode.apply(null,new Uint16Array(e.subarray(a,a+128)));for(;0>(i=o.indexOf("\n"))&&n<t&&a<e.byteLength;)s+=o,n+=o.length,a+=128,o+=String.fromCharCode.apply(null,new Uint16Array(e.subarray(a,a+128)));return -1<i&&(!1!==r&&(e.pos+=n+i+1),s+o.slice(0,i))},s=new Uint8Array(e);s.pos=0;let o=function(e){let t,r,a=/^\s*GAMMA\s*=\s*(\d+(\.\d+)?)\s*$/,s=/^\s*EXPOSURE\s*=\s
81*(\d+(\.\d+)?)\s*$/,o=/^\s*FORMAT=(\S+)\s*$/,l=/^\s*\-Y\s+(\d+)\s+\+X\s+(\d+)\s*$/,u={valid:0,string:"",comments:"",programtype:"RGBE",format:"",gamma:1,exposure:1,width:0,height:0};for(!(e.pos>=e.byteLength)&&(t=n(e))||i(1,"no header found"),(r=t.match(/^#\?(\S+)/))||i(3,"bad initial token"),u.valid|=1,u.programtype=r[1],u.string+=t+"\n";!1!==(t=n(e));){if(u.string+=t+"\n","#"===t.charAt(0)){u.comments+=t+"\n";continue}if((r=t.match(a))&&(u.gamma=parseFloat(r[1])),(r=t.match(s))&&(u.exposure=parseFloat(r[1])),(r=t.match(o))&&(u.valid|=2,u.format=r[1]),(r=t.match(l))&&(u.valid|=4,u.height=parseInt(r[1],10),u.width=parseInt(r[2],10)),2&u.valid&&4&u.valid)break}return 2&u.valid||i(3,"missing format specifier"),4&u.valid||i(3,"missing image size specifier"),u}(s),l=o.width,u=o.height,c=function(e,t,r){if(t<8||t>32767||2!==e[0]||2!==e[1]||128&e[2])return new Uint8Array(e);t!==(e[2]<<8|e[3])&&i(3,"wrong scanline width");let a=new Uint8Array(4*t*r);a.length||i(4,"unable to allocate buffer space");let n=0,s=0,o=4*t,l=new Uint8Array(4),u=new Uint8Array(o),c=r;for(;c>0&&s<e.byteLength;){s+4>e.byteLength&&i(1),l[0]=e[s++],l[1]=e[s++],l[2]=e[s++],l[3]=e[s++],(2!=l[0]||2!=l[1]||(l[2]<<8|l[3])!=t)&&i(3,"bad rgbe scanline format");let r=0,d;for(;r<o&&s<e.byteLength;){let t=(d=e[s++])>128;if(t&&(d-=128),(0===d||r+d>o)&&i(3,"bad scanline data"),t){let t=e[s++];for(let e=0;e<d;e++)u[r++]=t}else u.set(e.subarray(s,s+d),r),r+=d,s+=d}for(let e=0;e<t;e++){let r=0;a[n]=u[e+r],r+=t,a[n+1]=u[e+r],r+=t,a[n+2]=u[e+r],r+=t,a[n+3]=u[e+r],n+=4}c--}return a}(s.subarray(s.pos),l,u);switch(this.type){case x.FloatType:let d=new Float32Array(4*(a=c.length/4));for(let e=0;e<a;e++)!function(e,t,r,a){let i=Math.pow(2,e[t+3]-128)/255;r[a+0]=e[t+0]*i,r[a+1]=e[t+1]*i,r[a+2]=e[t+2]*i,r[a+3]=1}(c,4*e,d,4*e);t=d,r=x.FloatType;break;case x.HalfFloatType:let f=new Uint16Array(4*(a=c.length/4));for(let e=0;e<a;e++)!function(e,t,r,a){let i=Math.pow(2,e[t+3]-128)/255;r[a+0]=x.DataUtils.toHalfFloat(Math.min(e[t+0]*i,65504)),r[a+1]=x.DataUtils.toHalfFloat(Math.min(e[t+1]*i,65504)),r[a+2]=x.DataUtils.toHalfFloat(Math.min(e[t+2]*i,65504)),r[a+3]=x.DataUtils.toHalfFloat(1)}(c,4*e,f,4*e);t=f,r=x.HalfFloatType;break;default:throw Error("THREE.RGBELoader: Unsupported type: "+this.type)}return{width:l,height:u,data:t,header:o.string,gamma:o.gamma,exposure:o.exposure,type:r}}setDataType(e){return this.type=e,this}load(e,t,r,a){return super.load(e,function(e,r){switch(e.type){case x.FloatType:case x.HalfFloatType:"colorSpace"in e?e.colorSpace="srgb-linear":e.encoding=3e3,e.minFilter=x.LinearFilter,e.magFilter=x.LinearFilter,e.generateMipmaps=!1,e.flipY=!0}t&&t(e,r)},r,a)}}var M=i,E={},j=function(e,t,r,a,i){var n=new Worker(E[t]||(E[t]=URL.createObjectURL(new Blob([e],{type:"text/javascript"}))));return n.onerror=function(e){return i(e.error,null)},n.onmessage=function(e){return i(null,e.data)},n.postMessage(r,a),n},S=Uint8Array,C=Uint16Array,k=Uint32Array,T=new S([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),F=new S([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),A=new S([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),R=function(e,t){for(var r=new C(31),a=0;a<31;++a)r[a]=t+=1<<e[a-1];for(var i=new k(r[30]),a=1;a<30;++a)for(var n=r[a];n<r[a+1];++n)i[n]=n-r[a]<<5|a;return[r,i]},P=R(T,2),I=P[0],N=P[1];I[28]=258,N[258]=28;for(var O=R(F,0),D=O[0],B=O[1],L=new C(32768),U=0;U<32768;++U){var W=(43690&U)>>>1|(21845&U)<<1;W=(61680&(W=(52428&W)>>>2|(13107&W)<<2))>>>4|(3855&W)<<4,L[U]=((65280&W)>>>8|(255&W)<<8)>>>1}for(var G=function(e,t,r){for(var a,i=e.length,n=0,s=new C(t);n<i;++n)++s[e[n]-1];var o=new C(t);for(n=0;n<t;++n)o[n]=o[n-1]+s[n-1]<<1;if(r){a=new C(1<<t);var l=15-t;for(n=0;n<i;++n)if(e[n])for(var u=n<<4|e[n],c=t-e[n],d=o[e[n]-1]++<<c,f=d|(1<<c)-1;d<=f;++d)a[L[d]>>>l]=u}else for(n=0,a=new C(i);n<i;++n)e[n]&&(a[n]=L[o[e[n]-1]++]>>>15-e[n]);return a},z=new S(288),U=0;U<144;++U)z[U]=8;for(var U=144;U<256;++U)z[U]=9;for(var U=256;U<280;++U)z[U]=7;for(var U=280;U<288;++U)z[U]=8;for(var q=new S(32),U=0;U<32;++U)q[U]=5;var V=G(z,9,0),H=G(z,9,1),$=G(q,5,0),X=G(q,5,1),Y=function(e){for(var t=e[0],r=1;r<e.length;++r)e[r]>t&&(t=e[r]);return t},Q=function(e,t,r){var a=t/8|0;return(e[a]|e[a+1]<<8)>>(7&t)&r},Z=function(e,t){var r=t/8|0;return(e[r]|e[r+1]<<8|e[r+2]<<16)>>(7&t)},J=function(e){return(e/8|0)+(7&e&&1)},K=function(e,t,r){(null==t||t<0)&&(t=0),(null==r||r>e.length)&&(r=e.length);var a=new(e instanceof C?C:e instanceof k?k:S)(r-t);return a.set(e.subarray(t,r)),a},ee=function(e,t,r){var a=e.length;if(!a||r&&!r.l&&a<5)return t||new S(0);var i=!t||r,n=!r||r.i;r||(r={}
81),t||(t=new S(3*a));var s=function(e){var r=t.length;if(e>r){var a=new S(Math.max(2*r,e));a.set(t),t=a}},o=r.f||0,l=r.p||0,u=r.b||0,c=r.l,d=r.d,f=r.m,h=r.n,p=8*a;do{if(!c){r.f=o=Q(e,l,1);var m=Q(e,l+1,3);if(l+=3,m)if(1==m)c=H,d=X,f=9,h=5;else if(2==m){var g=Q(e,l,31)+257,y=Q(e,l+10,15)+4,v=g+Q(e,l+5,31)+1;l+=14;for(var _=new S(v),w=new S(19),x=0;x<y;++x)w[A[x]]=Q(e,l+3*x,7);l+=3*y;for(var b=Y(w),M=(1<<b)-1,E=G(w,b,1),x=0;x<v;){var j=E[Q(e,l,M)];l+=15&j;var C=j>>>4;if(C<16)_[x++]=C;else{var k=0,R=0;for(16==C?(R=3+Q(e,l,3),l+=2,k=_[x-1]):17==C?(R=3+Q(e,l,7),l+=3):18==C&&(R=11+Q(e,l,127),l+=7);R--;)_[x++]=k}}var P=_.subarray(0,g),N=_.subarray(g);f=Y(P),h=Y(N),c=G(P,f,1),d=G(N,h,1)}else throw"invalid block type";else{var C=J(l)+4,O=e[C-4]|e[C-3]<<8,B=C+O;if(B>a){if(n)throw"unexpected EOF";break}i&&s(u+O),t.set(e.subarray(C,B),u),r.b=u+=O,r.p=l=8*B;continue}if(l>p){if(n)throw"unexpected EOF";break}}i&&s(u+131072);for(var L=(1<<f)-1,U=(1<<h)-1,W=l;;W=l){var k=c[Z(e,l)&L],z=k>>>4;if((l+=15&k)>p){if(n)throw"unexpected EOF";break}if(!k)throw"invalid length/literal";if(z<256)t[u++]=z;else if(256==z){W=l,c=null;break}else{var q=z-254;if(z>264){var x=z-257,V=T[x];q=Q(e,l,(1<<V)-1)+I[x],l+=V}var $=d[Z(e,l)&U],ee=$>>>4;if(!$)throw"invalid distance";l+=15&$;var N=D[ee];if(ee>3){var V=F[ee];N+=Z(e,l)&(1<<V)-1,l+=V}if(l>p){if(n)throw"unexpected EOF";break}i&&s(u+131072);for(var et=u+q;u<et;u+=4)t[u]=t[u-N],t[u+1]=t[u+1-N],t[u+2]=t[u+2-N],t[u+3]=t[u+3-N];u=et}}r.l=c,r.p=W,r.b=u,c&&(o=1,r.m=f,r.d=d,r.n=h)}while(!o)return u==t.length?t:K(t,0,u)},et=function(e,t,r){r<<=7&t;var a=t/8|0;e[a]|=r,e[a+1]|=r>>>8},er=function(e,t,r){r<<=7&t;var a=t/8|0;e[a]|=r,e[a+1]|=r>>>8,e[a+2]|=r>>>16},ea=function(e,t){for(var r=[],a=0;a<e.length;++a)e[a]&&r.push({s:a,f:e[a]});var i=r.length,n=r.slice();if(!i)return[ec,0];if(1==i){var s=new S(r[0].s+1);return s[r[0].s]=1,[s,1]}r.sort(function(e,t){return e.f-t.f}),r.push({s:-1,f:25001});var o=r[0],l=r[1],u=0,c=1,d=2;for(r[0]={s:-1,f:o.f+l.f,l:o,r:l};c!=i-1;)o=r[r[u].f<r[d].f?u++:d++],l=r[u!=c&&r[u].f<r[d].f?u++:d++],r[c++]={s:-1,f:o.f+l.f,l:o,r:l};for(var f=n[0].s,a=1;a<i;++a)n[a].s>f&&(f=n[a].s);var h=new C(f+1),p=ei(r[c-1],h,0);if(p>t){var a=0,m=0,g=p-t,y=1<<g;for(n.sort(function(e,t){return h[t.s]-h[e.s]||e.f-t.f});a<i;++a){var v=n[a].s;if(h[v]>t)m+=y-(1<<p-h[v]),h[v]=t;else break}for(m>>>=g;m>0;){var _=n[a].s;h[_]<t?m-=1<<t-h[_]++-1:++a}for(;a>=0&&m;--a){var w=n[a].s;h[w]==t&&(--h[w],++m)}p=t}return[new S(h),p]},ei=function(e,t,r){return -1==e.s?Math.max(ei(e.l,t,r+1),ei(e.r,t,r+1)):t[e.s]=r},en=function(e){for(var t=e.length;t&&!e[--t];);for(var r=new C(++t),a=0,i=e[0],n=1,s=function(e){r[a++]=e},o=1;o<=t;++o)if(e[o]==i&&o!=t)++n;else{if(!i&&n>2){for(;n>138;n-=138)s(32754);n>2&&(s(n>10?n-11<<5|28690:n-3<<5|12305),n=0)}else if(n>3){for(s(i),--n;n>6;n-=6)s(8304);n>2&&(s(n-3<<5|8208),n=0)}for(;n--;)s(i);n=1,i=e[o]}return[r.subarray(0,a),t]},es=function(e,t){for(var r=0,a=0;a<t.length;++a)r+=e[a]*t[a];return r},eo=function(e,t,r){var a=r.length,i=J(t+2);e[i]=255&a,e[i+1]=a>>>8,e[i+2]=255^e[i],e[i+3]=255^e[i+1];for(var n=0;n<a;++n)e[i+n+4]=r[n];return(i+4+a)*8},el=function(e,t,r,a,i,n,s,o,l,u,c){et(t,c++,r),++i[256];for(var d,f,h,p,m=ea(i,15),g=m[0],y=m[1],v=ea(n,15),_=v[0],w=v[1],x=en(g),b=x[0],M=x[1],E=en(_),j=E[0],S=E[1],k=new C(19),R=0;R<b.length;++R)k[31&b[R]]++;for(var R=0;R<j.length;++R)k[31&j[R]]++;for(var P=ea(k,7),I=P[0],N=P[1],O=19;O>4&&!I[A[O-1]];--O);var D=u+5<<3,B=es(i,z)+es(n,q)+s,L=es(i,g)+es(n,_)+s+14+3*O+es(k,I)+(2*k[16]+3*k[17]+7*k[18]);if(D<=B&&D<=L)return eo(t,c,e.subarray(l,l+u));
81if(et(t,c,1+(L<B)),c+=2,L<B){d=G(g,y,0),f=g,h=G(_,w,0),p=_;var U=G(I,N,0);et(t,c,M-257),et(t,c+5,S-1),et(t,c+10,O-4),c+=14;for(var R=0;R<O;++R)et(t,c+3*R,I[A[R]]);c+=3*O;for(var W=[b,j],H=0;H<2;++H)for(var X=W[H],R=0;R<X.length;++R){var Y=31&X[R];et(t,c,U[Y]),c+=I[Y],Y>15&&(et(t,c,X[R]>>>5&127),c+=X[R]>>>12)}}else d=V,f=z,h=$,p=q;for(var R=0;R<o;++R)if(a[R]>255){var Y=a[R]>>>18&31;er(t,c,d[Y+257]),c+=f[Y+257],Y>7&&(et(t,c,a[R]>>>23&31),c+=T[Y]);var Q=31&a[R];er(t,c,h[Q]),c+=p[Q],Q>3&&(er(t,c,a[R]>>>5&8191),c+=F[Q])}else er(t,c,d[a[R]]),c+=f[a[R]];return er(t,c,d[256]),c+f[256]},eu=new k([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),ec=new S(0),ed=function(e,t,r,a,i,n){var s=e.length,o=new S(a+s+5*(1+Math.ceil(s/7e3))+i),l=o.subarray(a,o.length-i),u=0;if(!t||s<8)for(var c=0;c<=s;c+=65535){var d=c+65535;d<s?u=eo(l,u,e.subarray(c,d)):(l[c]=n,u=eo(l,u,e.subarray(c,s)))}else{for(var f=eu[t-1],h=f>>>13,p=8191&f,m=(1<<r)-1,g=new C(32768),y=new C(m+1),v=Math.ceil(r/3),_=2*v,w=function(t){return(e[t]^e[t+1]<<v^e[t+2]<<_)&m},x=new k(25e3),b=new C(288),M=new C(32),E=0,j=0,c=0,A=0,R=0,P=0;c<s;++c){var I=w(c),O=32767&c,D=y[I];if(g[O]=D,y[I]=O,R<=c){var L=s-c;if((E>7e3||A>24576)&&L>423){u=el(e,l,0,x,b,M,j,A,P,c-P,u),A=E=j=0,P=c;for(var U=0;U<286;++U)b[U]=0;for(var U=0;U<30;++U)M[U]=0}var W=2,G=0,z=p,q=O-D&32767;if(L>2&&I==w(c-q))for(var V=Math.min(h,L)-1,H=Math.min(32767,c),$=Math.min(258,L);q<=H&&--z&&O!=D;){if(e[c+W]==e[c+W-q]){for(var X=0;X<$&&e[c+X]==e[c+X-q];++X);if(X>W){if(W=X,G=q,X>V)break;for(var Y=Math.min(q,X-2),Q=0,U=0;U<Y;++U){var Z=c-q+U+32768&32767,ee=g[Z],et=Z-ee+32768&32767;et>Q&&(Q=et,D=Z)}}}D=g[O=D],q+=O-D+32768&32767}if(G){x[A++]=0x10000000|N[W]<<18|B[G];var er=31&N[W],ea=31&B[G];j+=T[er]+F[ea],++b[257+er],++M[ea],R=c+W,++E}else x[A++]=e[c],++b[e[c]]}}u=el(e,l,n,x,b,M,j,A,P,c-P,u),!n&&7&u&&(u=eo(l,u+1,ec))}return K(o,0,a+J(u)+i)},ef=function(){for(var e=new Int32Array(256),t=0;t<256;++t){for(var r=t,a=9;--a;)r=(1&r&&-0x12477ce0)^r>>>1;e[t]=r}return e}(),eh=function(){var e=-1;return{p:function(t){for(var r=e,a=0;a<t.length;++a)r=ef[255&r^t[a]]^r>>>8;e=r},d:function(){return~e}}},ep=function(){var e=1,t=0;return{p:function(r){for(var a=e,i=t,n=r.length,s=0;s!=n;){for(var o=Math.min(s+2655,n);s<o;++s)i+=a+=r[s];a=(65535&a)+15*(a>>16),i=(65535&i)+15*(i>>16)}e=a,t=i},d:function(){return e%=65521,t%=65521,(255&e)<<24|e>>>8<<16|(255&t)<<8|t>>>8}}},em=function(e,t,r,a,i){return ed(e,null==t.level?6:t.level,null==t.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(e.length)))):12+t.mem,r,a,!i)},eg=function(e,t){var r={};for(var a in e)r[a]=e[a];for(var a in t)r[a]=t[a];return r},ey=function(e,t,r){for(var a=e(),i=e.toString(),n=i.slice(i.indexOf("[")+1,i.lastIndexOf("]")).replace(/ /g,"").split(","),s=0;s<a.length;++s){var o=a[s],l=n[s];if("function"==typeof o){t+=";"+l+"=";var u=o.toString();if(o.prototype)if(-1!=u.indexOf("[native code]")){var c=u.indexOf(" ",8)+1;t+=u.slice(c,u.indexOf("(",c))}else for(var d in t+=u,o.prototype)t+=";"+l+".prototype."+d+"="+o.prototype[d].toString();else t+=u}else r[l]=o}return[t,r]},ev=[],e_=function(e){var t=[];for(var r in e)(e[r]instanceof S||e[r]instanceof C||e[r]instanceof k)&&t.pu
81sh((e[r]=new e[r].constructor(e[r])).buffer);return t},ew=function(e,t,r,a){if(!ev[r]){for(var i,n="",s={},o=e.length-1,l=0;l<o;++l)n=(i=ey(e[l],n,s))[0],s=i[1];ev[r]=ey(e[o],n,s)}var u=eg({},ev[r][1]);return j(ev[r][0]+";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage="+t.toString()+"}",r,u,e_(u),a)},ex=function(){return[S,C,k,T,F,A,I,D,H,X,L,G,Y,Q,Z,J,K,ee,eV,ej,eS]},eb=function(){return[S,C,k,T,F,A,N,B,V,z,$,q,L,eu,ec,G,et,er,ea,ei,en,es,eo,el,J,K,ed,em,eG,ej]},eM=function(){return[eI,eN]},eE=function(){return[eB]},ej=function(e){return postMessage(e,[e.buffer])},eS=function(e){return e&&e.size&&new S(e.size)},eC=function(e){return e.ondata=function(e,t){return postMessage([e,t],[e.buffer])},function(t){return e.push(t.data[0],t.data[1])}},ek=function(e,t,r,a,i){var n,s=ew(e,a,i,function(e,r){e?(s.terminate(),t.ondata.call(t,e)):(r[1]&&s.terminate(),t.ondata.call(t,e,r[0],r[1]))});s.postMessage(r),t.push=function(e,r){if(n)throw"stream finished";if(!t.ondata)throw"no stream handler";s.postMessage([e,n=r],[e.buffer])},t.terminate=function(){s.terminate()}},eT=function(e,t){return e[t]|e[t+1]<<8},eF=function(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0},eA=function(e,t){return eF(e,t)+0x100000000*eF(e,t+4)},eR=function(e,t,r){for(;r;++t)e[t]=r,r>>>=8},eP=function(e,t){var r=t.filename;if(e[0]=31,e[1]=139,e[2]=8,e[8]=t.level<2?4:2*(9==t.level),e[9]=3,0!=t.mtime&&eR(e,4,Math.floor(new Date(t.mtime||Date.now())/1e3)),r){e[3]=8;for(var a=0;a<=r.length;++a)e[a+10]=r.charCodeAt(a)}},eI=function(e){if(31!=e[0]||139!=e[1]||8!=e[2])throw"invalid gzip data";var t=e[3],r=10;4&t&&(r+=e[10]|(e[11]<<8)+2);for(var a=(t>>3&1)+(t>>4&1);a>0;a-=!e[r++]);return r+(2&t)},eN=function(e){var t=e.length;return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0},eO=function(e){return 10+(e.filename&&e.filename.length+1||0)},eD=function(e,t){var r=t.level,a=0==r?0:r<6?1:9==r?3:2;e[0]=120,e[1]=a<<6|(a?32-2*a:1)},eB=function(e){if((15&e[0])!=8||e[0]>>>4>7||(e[0]<<8|e[1])%31)throw"invalid zlib data";if(32&e[1])throw"invalid zlib data: preset dictionaries not supported"};function eL(e,t){return t||"function"!=typeof e||(t=e,e={}),this.ondata=t,e}var eU=function(){function e(e,t){t||"function"!=typeof e||(t=e,e={}),this.ondata=t,this.o=e||{}}return e.prototype.p=function(e,t){this.ondata(em(e,this.o,0,0,!t),t)},e.prototype.push=function(e,t){if(this.d)throw"stream finished";if(!this.ondata)throw"no stream handler";this.d=t,this.p(e,t||!1)},e}(),eW=function(e,t){ek([eb,function(){return[eC,eU]}],this,eL.call(this,e,t),function(e){onmessage=eC(new eU(e.data))},6)};function eG(e,t){return em(e,t||{},0,0)}var ez=function(){function e(e){this.s={},this.p=new S(0),this.ondata=e}return e.prototype.e=function(e){if(this.d)throw"stream finished";if(!this.ondata)throw"no stream handler";var t=this.p.length,r=new S(t+e.length);r.set(this.p),r.set(e,t),this.p=r},e.prototype.c=function(e){this.d=this.s.i=e||!1;var t=this.s.b,r=ee(this.p,this.o,this.s);this.ondata(K(r,t,this.s.b),this.d),this.o=K(r,this.s.b-32768),this.s.b=this.o.length,this.p=K(this.p,this.s.p/8|0),this.s.p&=7},e.prototype.push=function(e,t){this.e(e),this.c(t)},e}(),eq=function(e){this.ondata=e,ek([ex,function(){return[eC,ez]}],this,0,function(){onmessage=eC(new ez)},7)};function eV(e,t){return ee(e,t)}(function(){function e(e,t){this.c=eh(),this.l=0,this.v=1,eU.call(this,e,t)}e.prototype.push=function(e,t){eU.prototype.push.call(this,e,t)},e.prototype.p=function(e,t){this.c.p(e),this.l+=e.length;var r=em(e,this.o,this.v&&eO(this.o),t&&8,!t);this.v&&(eP(r,this.o),this.v=0),t&&(eR(r,r.length-8,this.c.d()),eR(r,r.length-4,this.l)),this.ondata(r,t)}})();var eH=function(){function e(e){this.v=1,ez.call(this,e)}return e.prototype.push=function(e,t){if(ez.prototype.e.call(this,e),this.v){var r=this.p.length>3?eI(this.p):4;if(r>=this.p.length&&!t)return;this.p=this.p.subarray(r),this.v=0}if(t){if(this.p.length<8)throw"invalid gzip stream";this.p=this.p.subarray(0,-8)}ez.prototype.c.call(this,t)},e}(),e$=function(e){this.ondata=e,ek([ex,eM,function(){return[eC,ez,eH]}],this,0,function(){onmessage=eC(new eH)},9)},eX=(function(){function e(e,t){this.c=ep(),this.v=1,eU.call(this,e,t)}e.prototype.push=function(e,t){eU.prototype.push.call(this,e,t)},e.prototype.p=function(e,t){this.c.p(e);var r=em(e,this.o,this.v&&2,t&&4,!t);this.v&&(eD(r,this.o),this.v=0),t&&eR(r,r.length-4,this.c.d()),this.ondata(r,t)}}(),function(){function e(e){this.v=1,ez.call(this,e)}return e.prototype.push=function(e,t){if(ez.prototype.e.call(this,e),this.v){if(this.p.length<2&&!t)return;this.p=this.p.subarray(2),this.v=0}if(t){if(this.p.length<4)throw"invalid zlib stream";this.p=this.p.subarray(0,-4)}ez.prototype.c.call(this,t)},e}()),eY=function(e){this.ondata=e,ek([ex,eE,function(){return[eC,ez,eX]}],this,0,function(){onmessage=eC(new eX)},11)};function eQ(e,t){return ee((eB(e),e.subarray(2,-4)),t)}var eZ=function(){function e(e){this.G=eH,this.I=ez,this.Z=eX,this.ondata=e}return e.prototype.push=function(e,t){if(!this.ondata)throw"no stream handler";if(this.s)this.s.push(e,t);else{if(this.p&&this.p.length){var r=new S(this.p.length+e.length);r.set(this.p),r.set(e,this.p.length)}else this.p=e;if(this.p.length>2){var a=this,i=function(){a.ondata.apply(a,arguments)};this.s=31==this.p[0]&&139==this.p[1]&&8==this.p[2]?new this.G(i):(15&this.p[0])!=8||this.p[0]>>4>7||(this.p[0]<<8|this.p[1])%31?new this.I(i):new this.Z(i),this.s.push(this.p,t),this.p=null}}},e}();(function(e){this.G=e$,this.I=eq,this.Z=eY,this.ondata=e}).prototype.push=function(e,t){eZ.prototype.push.call(this,e,t)};var eJ="u">typeof TextEncoder&&new TextEncoder,eK="u">
81typeof TextDecoder&&new TextDecoder,e0=0;try{eK.decode(ec,{stream:!0}),e0=1}catch(e){}var e1=function(e){for(var t="",r=0;;){var a=e[r++],i=(a>127)+(a>223)+(a>239);if(r+i>e.length)return[t,K(e,r-1)];i?3==i?t+=String.fromCharCode(55296|(a=((15&a)<<18|(63&e[r++])<<12|(63&e[r++])<<6|63&e[r++])-65536)>>10,56320|1023&a):1&i?t+=String.fromCharCode((31&a)<<6|63&e[r++]):t+=String.fromCharCode((15&a)<<12|(63&e[r++])<<6|63&e[r++]):t+=String.fromCharCode(a)}};function e2(e,t){if(t){for(var r=new S(e.length),a=0;a<e.length;++a)r[a]=e.charCodeAt(a);return r}if(eJ)return eJ.encode(e);for(var i=e.length,n=new S(e.length+(e.length>>1)),s=0,o=function(e){n[s++]=e},a=0;a<i;++a){if(s+5>n.length){var l=new S(s+8+(i-a<<1));l.set(n),n=l}var u=e.charCodeAt(a);u<128||t?o(u):(u<2048?o(192|u>>6):(u>55295&&u<57344?(o(240|(u=65536+(1047552&u)|1023&e.charCodeAt(++a))>>18),o(128|u>>12&63)):o(224|u>>12),o(128|u>>6&63)),o(128|63&u))}return K(n,0,s)}(function(e){this.ondata=e,e0?this.t=new TextDecoder:this.p=ec}).prototype.push=function(e,t){if(!this.ondata)throw"no callback";if(t=!!t,this.t){if(this.ondata(this.t.decode(e,{stream:!0}),t),t){if(this.t.decode().length)throw"invalid utf-8 data";this.t=null}return}if(!this.p)throw"stream finished";var r=new S(this.p.length+e.length);r.set(this.p),r.set(e,this.p.length);var a=e1(r),i=a[0],n=a[1];if(t){if(n.length)throw"invalid utf-8 data";this.p=null}else this.p=n;this.ondata(i,t)},(function(e){this.ondata=e}).prototype.push=function(e,t){if(!this.ondata)throw"no callback";if(this.d)throw"stream finished";this.ondata(e2(e),this.d=t||!1)};var e3=function(e){return 1==e?3:e<6?2:+(9==e)},e5=function(e,t){for(;1!=eT(e,t);t+=4+eT(e,t+2));return[eA(e,t+12),eA(e,t+4),eA(e,t+20)]},e4=function(e){var t=0;if(e)for(var r in e){var a=e[r].length;if(a>65535)throw"extra field too long";t+=a+4}return t},e6=function(e,t,r,a,i,n,s,o){var l=a.length,u=r.extra,c=o&&o.length,d=e4(u);eR(e,t,null!=s?0x2014b50:0x4034b50),t+=4,null!=s&&(e[t++]=20,e[t++]=r.os),e[t]=20,t+=2,e[t++]=r.flag<<1|(null==n&&8),e[t++]=i&&8,e[t++]=255&r.compression,e[t++]=r.compression>>8;var f=new Date(null==r.mtime?Date.now():r.mtime),h=f.getFullYear()-1980;if(h<0||h>119)throw"date not in range 1980-2099";if(eR(e,t,h<<25|f.getMonth()+1<<21|f.getDate()<<16|f.getHours()<<11|f.getMinutes()<<5|f.getSeconds()>>>1),t+=4,null!=n&&(eR(e,t,r.crc),eR(e,t+4,n),eR(e,t+8,r.size)),eR(e,t+12,l),eR(e,t+14,d),t+=16,null!=s&&(eR(e,t,c),eR(e,t+6,r.attrs),eR(e,t+10,s),t+=14),e.set(a,t),t+=l,d)for(var p in u){var m=u[p],g=m.length;eR(e,t,+p),eR(e,t+2,g),e.set(m,t+4),t+=4+g}return c&&(e.set(o,t),t+=c),t},e8=function(e,t,r,a,i){eR(e,t,0x6054b50),eR(e,t+8,r),eR(e,t+10,r),eR(e,t+12,a),eR(e,t+16,i)},e7=function(){function e(e){this.filename=e,this.c=eh(),this.size=0,this.compression=0}return e.prototype.process=function(e,t){this.ondata(null,e,t)},e.prototype.push=function(e,t){if(!this.ondata)throw"no callback - add to ZIP archive before pushing";this.c.p(e),this.size+=e.length,t&&(this.crc=this.c.d()),this.process(e,t||!1)},e}();function e9(e,t){var r=this;t||(t={}),e7.call(this,e),this.d=new eU(t,function(e,t){r.ondata(null,e,t)}),this.compression=8,this.flag=e3(t.level)}function te(e,t){var r=this;t||(t={}),e7.call(this,e),this.d=new eW(t,function(e,t,a){r.ondata(e,t,a)}),this.compression=8,this.flag=e3(t.level),this.terminate=this.d.terminate}function tt(e){this.ondata=e,this.u=[],this.d=1}e9.prototype.process=function(e,t){try{this.d.push(e,t)}catch(e){this.ondata(e,null,t)}},e9.prototype.push=function(e,t){e7.prototype.push.call(this,e,t)},te.prototype.process=function(e,t){this.d.push(e,t)},te.prototype.push=function(e,t){e7.prototype.push.call(this,e,t)},tt.prototype.add=function(e){var t=this;if(2&this.d)throw"stream finished";var r=e2(e.filename),a=r.length,i=e.comment,n=i&&e2(i),s=a!=e.filename.length||n&&i.length!=n.length,o=a+e4(e.extra)+30;if(a>65535)throw"filename too long";var l=new S(o);e6(l,0,e,r,s);var u=[l],c=function(){for(var e=0,r=u;e<r.length;e++){var a=r[e];t.ondata(null,a,!1)}u=[]},d=this.d;this.d=0;var f=this.u.length,h=eg(e,{f:r,u:s,o:n,t:function(){e.terminate&&e.terminate()},r:function(){if(c(),d){var e=t.u[f+1];e?e.r():t.d=1}d=1}}),p=0;
81e.ondata=function(r,a,i){if(r)t.ondata(r,a,i),t.terminate();else if(p+=a.length,u.push(a),i){var n=new S(16);eR(n,0,0x8074b50),eR(n,4,e.crc),eR(n,8,p),eR(n,12,e.size),u.push(n),h.c=p,h.b=o+p+16,h.crc=e.crc,h.size=e.size,d&&h.r(),d=1}else d&&c()},this.u.push(h)},tt.prototype.end=function(){var e=this;if(2&this.d){if(1&this.d)throw"stream finishing";throw"stream finished"}this.d?this.e():this.u.push({r:function(){1&e.d&&(e.u.splice(-1,1),e.e())},t:function(){}}),this.d=3},tt.prototype.e=function(){for(var e=0,t=0,r=0,a=0,i=this.u;a<i.length;a++){var n=i[a];r+=46+n.f.length+e4(n.extra)+(n.o?n.o.length:0)}for(var s=new S(r+22),o=0,l=this.u;o<l.length;o++){var n=l[o];e6(s,e,n,n.f,n.u,n.c,t,n.o),e+=46+n.f.length+e4(n.extra)+(n.o?n.o.length:0),t+=n.b}e8(s,e,this.u.length,r,t),this.ondata(null,s,!0),this.d=2},tt.prototype.terminate=function(){for(var e=0,t=this.u;e<t.length;e++)t[e].t();this.d=2};var tr=function(){function e(){}return e.prototype.push=function(e,t){this.ondata(null,e,t)},e.compression=0,e}();function ta(){var e=this;this.i=new ez(function(t,r){e.ondata(null,t,r)})}function ti(e,t){var r=this;t<32e4?this.i=new ez(function(e,t){r.ondata(null,e,t)}):(this.i=new eq(function(e,t,a){r.ondata(e,t,a)}),this.terminate=this.i.terminate)}function tn(e){this.onfile=e,this.k=[],this.o={0:tr},this.p=ec}ta.prototype.push=function(e,t){try{this.i.push(e,t)}catch(r){this.ondata(r,e,t)}},ta.compression=8,ti.prototype.push=function(e,t){this.i.terminate&&(e=K(e,0)),this.i.push(e,t)},ti.compression=8,tn.prototype.push=function(e,t){var r=this;if(!this.onfile)throw"no callback";if(!this.p)throw"stream finished";if(this.c>0){var a=Math.min(this.c,e.length),i=e.subarray(0,a);if(this.c-=a,this.d?this.d.push(i,!this.c):this.k[0].push(i),(e=e.subarray(a)).length)return this.push(e,t)}else{var n=0,s=0,o=void 0,l=void 0;this.p.length?e.length?((l=new S(this.p.length+e.length)).set(this.p),l.set(e,this.p.length)):l=this.p:l=e;for(var u=l.length,c=this.c,d=c&&this.d,f=this;s<u-4&&"break"!==function(){var e=eF(l,s);if(0x4034b50==e){n=1,o=s,f.d=null,f.c=0;var t=eT(l,s+6),a=eT(l,s+8),i=8&t,d=eT(l,s+26),h=eT(l,s+28);if(u>s+30+d+h){var p,m,g=[];f.k.unshift(g),n=2;var y=eF(l,s+18),v=eF(l,s+22),_=function(e,t){if(t){for(var r="",a=0;a<e.length;a+=16384)r+=String.fromCharCode.apply(null,e.subarray(a,a+16384));return r}if(eK)return eK.decode(e);var i=e1(e),n=i[0];if(i[1].length)throw"invalid utf-8 data";return n}(l.subarray(s+30,s+=30+d),!(2048&t));0xffffffff==y?(y=(p=i?[-2]:e5(l,s))[0],v=p[1]):i&&(y=-1),s+=h,f.c=y;var w={name:_,compression:a,start:function(){if(!w.ondata)throw"no callback";if(y){var e=r.o[a];if(!e)throw"unknown compression type "+a;(m=y<0?new e(_):new e(_,y,v)).ondata=function(e,t,r){w.ondata(e,t,r)};for(var t=0;t<g.length;t++){var i=g[t];m.push(i,!1)}r.k[0]==g&&r.c?r.d=m:m.push(ec,!0)}else w.ondata(null,ec,!0)},terminate:function(){m&&m.terminate&&m.terminate()}};y>=0&&(w.size=y,w.originalSize=v),f.onfile(w)}return"break"}if(c){if(0x8074b50==e)return o=s+=12+(-2==c&&8),n=3,f.c=0,"break";else if(0x2014b50==e)return o=s-=4,n=3,f.c=0,"break"}}();++s);if(this.p=ec,c<0){var h=n?l.subarray(0,o-12-(-2==c&&8)-(0x8074b50==eF(l,o-16)&&4)):l.subarray(0,s);d?d.push(h,!!n):this.k[+(2==n)].push(h)}if(2&n)return this.push(l.subarray(s),t);this.p=l.subarray(s)}if(t){if(this.c)throw"invalid zip file";this.p=null}},tn.prototype.register=function(e){this.o[e.compression]=e};let ts=_.version>=152;class to extends M.DataTextureLoader{constructor(e){super(e),this.type=M.HalfFloatType}parse(e){let t={l:0,c:0,lc:0};function r(e,r,a,i,n){for(;a<e;)r=r<<8|S(i,n),a+=8;t.l=r>>(a-=e)&(1<<e)-1,t.c=r,t.lc=a}let a=Array(59),i={c:0,lc:0};function n(e,t,r,a){e=e<<8|S(r,a),t+=8,i.c=e,i.lc=t}let s={c:0,lc:0};function o(e,t,r,a,o,l,u,c,d,f){if(e==t){a<8&&(n(r,a,o,u),r=i.c,a=i.lc);var h=r>>(a-=8),h=new Uint8Array([h])[0];if(d.value+h>f)return!1;for(var p=c[d.value-1];h-- >0;)c[d.value++]=p}else{if(!(d.value<f))return!1;c[d.value++]=e}s.c=r,s.lc=a}function l(e){var t=65535&e;return t>32767?t-65536:t}let u={a:0,b:0};function c(e,t){var r=l(e),a=l(t),i=r+(1&a)+(a>>1),n=i-a;u.a=i,u.b=n}function d(e,t){var r=65535&t,a=(65535&e)-(r>>1)&65535;
81u.a=r+a-32768&65535,u.b=a}function f(e,l,u,c,d,f){var h=u.value,p=j(l,u),m=j(l,u);u.value+=4;var g=j(l,u);if(u.value+=4,p<0||p>=65537||m<0||m>=65537)throw"Something wrong with HUF_ENCSIZE";for(var y=Array(65537),v=Array(16384),_=0;_<16384;_++)v[_]={},v[_].len=0,v[_].lit=0,v[_].p=null;var w=c-(u.value-h);if(!function(e,i,n,s,o,l,u){for(var c=0,d=0;o<=l;o++){if(n.value-n.value>s)return!1;r(6,c,d,e,n);var f=t.l;if(c=t.c,d=t.lc,u[o]=f,63==f){if(n.value-n.value>s)throw"Something wrong with hufUnpackEncTable";r(8,c,d,e,n);var h=t.l+6;if(c=t.c,d=t.lc,o+h>l+1)throw"Something wrong with hufUnpackEncTable";for(;h--;)u[o++]=0;o--}else if(f>=59){var h=f-59+2;if(o+h>l+1)throw"Something wrong with hufUnpackEncTable";for(;h--;)u[o++]=0;o--}}!function(e){for(var t=0;t<=58;++t)a[t]=0;for(var t=0;t<65537;++t)a[e[t]]+=1;for(var r=0,t=58;t>0;--t){var i=r+a[t]>>1;a[t]=r,r=i}for(var t=0;t<65537;++t){var n=e[t];n>0&&(e[t]=n|a[n]++<<6)}}(u)}(e,0,u,w,p,m,y),g>8*(c-(u.value-h)))throw"Something wrong with hufUncompress";!function(e,t,r,a){for(;t<=r;t++){var i=e[t]>>6,n=63&e[t];if(i>>n)throw"Invalid table entry";if(n>14){var s=a[i>>n-14];if(s.len)throw"Invalid table entry";if(s.lit++,s.p){var o=s.p;s.p=Array(s.lit);for(var l=0;l<s.lit-1;++l)s.p[l]=o[l]}else s.p=[,];s.p[s.lit-1]=t}else if(n)for(var u=0,l=1<<14-n;l>0;l--){var s=a[(i<<14-n)+u];if(s.len||s.p)throw"Invalid table entry";s.len=n,s.lit=t,u++}}}(y,p,m,v),function(e,t,r,a,l,u,c,d,f,h){for(var p=0,m=0,g=Math.trunc(l.value+(u+7)/8);l.value<g;)for(n(p,m,r,l),p=i.c,m=i.lc;m>=14;){var y=t[p>>m-14&16383];if(y.len)m-=y.len,o(y.lit,c,p,m,r,a,l,f,h,d),p=s.c,m=s.lc;else{if(!y.p)throw"hufDecode issues";for(v=0;v<y.lit;v++){for(var v,_=63&e[y.p[v]];m<_&&l.value<g;)n(p,m,r,l),p=i.c,m=i.lc;if(m>=_&&e[y.p[v]]>>6==(p>>m-_&(1<<_)-1)){m-=_,o(y.p[v],c,p,m,r,a,l,f,h,d),p=s.c,m=s.lc;break}}if(v==y.lit)throw"hufDecode issues"}}var w=8-u&7;for(p>>=w,m-=w;m>0;){var y=t[p<<14-m&16383];if(y.len)m-=y.len,o(y.lit,c,p,m,r,a,l,f,h,d),p=s.c,m=s.lc;else throw"hufDecode issues"}}(y,v,e,l,u,g,m,f,d,{value:0})}function h(e){for(var t=1;t<e.length;t++){var r=e[t-1]+e[t]-128;e[t]=r}}function p(e,t){for(var r=0,a=Math.floor((e.length+1)/2),i=0,n=e.length-1;!(i>n)&&(t[i++]=e[r++],!(i>n));){;t[i++]=e[a++]}}function m(e){for(var t=e.byteLength,r=[],a=0,i=new DataView(e);t>0;){var n=i.getInt8(a++);if(n<0){var s=-n;t-=s+1;for(var o=0;o<s;o++)r.push(i.getUint8(a++))}else{var s=n;t-=2;for(var l=i.getUint8(a++),o=0;o<s+1;o++)r.push(l)}}return r}function g(e){return new DataView(e.array.buffer,e.offset.value,e.size)}function y(e){var t=new Uint8Array(m(e.viewer.buffer.slice(e.offset.value,e.offset.value+e.size))),r=new Uint8Array(t.length);return h(t),p(t,r),new DataView(r.buffer)}function v(e){var t=eQ(e.array.slice(e.offset.value,e.offset.value+e.size)),r=new Uint8Array(t.length);return h(t),p(t,r),new DataView(r.buffer)}function _(e){for(var t=e.viewer,r={value:e.offset.value},a=new Uint16Array(e.width*e.scanlineBlockSize*(e.channels*e.type)),i=new Uint8Array(8192),n=0,s=Array(e.channels),o=0;o<e.channels;o++)s[o]={},s[o].start=n,s[o].end=s[o].start,s[o].nx=e.width,s[o].ny=e.lines,s[o].size=e.type,n+=s[o].nx*s[o].ny*s[o].size;var l=R(t,r),h=R(t,r);if(h>=8192)throw"Something is wrong with PIZ_COMPRESSION BITMAP_SIZE";if(l<=h)for(var o=0;o<h-l+1;o++)i[o+l]=C(t,r);var p=new Uint16Array(65536),m=function(e,t){for(var r=0,a=0;a<65536;++a)(0==a||e[a>>3]&1<<(7&a))&&(t[r++]=a);for(var i=r-1;r<65536;)t[r++]=0;return i}(i,p),g=j(t,r);f(e.array,t,r,g,a,n);for(var o=0;o<e.channels;++o)for(var y=s[o],v=0;v<s[o].size;++v)!function(e,t,r,a,i,n,s){for(var o=s<16384,l=r>i?i:r,f=1;f<=l;)f<<=1;for(f>>=1,h=f,f>>=1;f>=1;){for(var h,p,m,g,y,v=0,_=0+n*(i-h),w=n*f,x=n*h,b=a*f,M=a*h;v<=_;v+=x){for(var E=v,j=v+a*(r-h);E<=j;E+=M){var S=E+b,C=E+w,k=C+b;o?(c(e[E+t],e[C+t]),p=u.a,g=u.b,c(e[S+t],e[k+t]),m=u.a,y=u.b,c(p,m),e[E+t]=u.a,e[S+t]=u.b,c(g,y)):(d(e[E+t],e[C+t]),p=u.a,g=u.b,d(e[S+t],e[k+t]),m=u.a,y=u.b,d(p,m),e[E+t]=u.a,e[S+t]=u.b,d(g,y)),e[C+t]=u.a,e[k+t]=u.b}if(r&f){var C=E+w;o?c(e[E+t],e[C+t]):d(e[E+t],e[C+t]),p=u.a,e[C+t]=u.b,e[E+t]=p}}if(i&f)for(var E=v,j=v+a*(r-h);E<=j;E+=M){var S=E+b;o?c(e[E+t],e[S+t]):d(e[E+t],e[S+t]),p=u.a,e[S+t]=u.b,e[E+t]=p}h=f,f>>=1}}(a,y.start+v,y.nx,y.size,y.ny,y.nx*y.size,m);for(var _=n,w=0;w<_;++w)a[w]=p[a[w]];for(var x=0,b=new Uint8Array(a.buffer.byteLength),M=0;M<e.lines;M++)for(var E=0;E<e.channels;E++){var y=s[E],S=y.nx*y.size,k=new Uint8Array(a.buffer,2*y.end,2*S);b.set(k,x),x+=2*S,y.end+=S}return new DataView(b.buffer)}function w(e){var t=eQ(e.array.slice(e.offset.value,e.offset.value+e.size));let r=e.lines*e.channels*e.width,a=1==e.type?new Uint16Array(r):new Uint32Array(r),i=0,n=0,s=[,,,,];for(let r=0;r<e.lines;r++)for(let r=0;r<e.channels;r++){let r=0;switch(e.type){case 1:s[0]=i,s[1]=s[0]+e.width,i=s[1]+e.width;for(let i=0;i<e.width;++i)r+=t[s[0]++]<<8|t[s[1]++],a[n]=r,n++;break;case 2:s[0]=i,s[1]=s[0]+e.width,s[2]=s[1]+e.width,i=s[2]+e.width;for(let i=0;i<e.width;++i)r+=t[s[0]++]<<24|t[s[1]++]<<16|t[s[2]++]<<8,a[n]=r,n++}}return new DataView(a.buffer)}function x(e){var t=e.viewer,r={value:e.offset.value},a=new Uint8Array(e.width*e.lines*(e.channels*e.type*2)),i={version:k(t,r),unknownUncompressedSize:k(t,r),unknownCompressedSize:k(t,r),acCompressedSize:k(t,r),dcCompressedSize:k(t,r),rleCompressedSize:k(t,r),rleUncompressedSize:k(t,r),rleRawSize:k(t,r),totalAcUncompressedCount:k(t,r),totalDcUncompressedCount:k(t,r),acCompression:k(t,r)};if(i.version<2)throw"EXRLoader.parse: "+D.compression+" version "+i.version+" is unsupported";for(var n=[],s=R(t,r)-2;s>0;){var o=b(t.buffer,r),l=C(t,r),u=l>>2&3,c=new Int8Array([(l>>4)-1])[0],d=C(t,r);n.push({name:o,index:c,type:d,compression:u}),s-=o.length+3}for(var h=D.channels,p=Array(e.channels),g=0;g<e.channels;++g){var y=p[g]={},_=h[g];
81y.name=_.name,y.compression=0,y.decoded=!1,y.type=_.pixelType,y.pLinear=_.pLinear,y.width=e.width,y.height=e.lines}for(var w={idx:[,,,]},x=0;x<e.channels;++x)for(var y=p[x],g=0;g<n.length;++g){var E=n[g];y.name==E.name&&(y.compression=E.compression,E.index>=0&&(w.idx[E.index]=x),y.offset=x)}if(i.acCompressedSize>0)switch(i.acCompression){case 0:var j=new Uint16Array(i.totalAcUncompressedCount);f(e.array,t,r,i.acCompressedSize,j,i.totalAcUncompressedCount);break;case 1:var S=e.array.slice(r.value,r.value+i.totalAcUncompressedCount),T=eQ(S),j=new Uint16Array(T.buffer);r.value+=i.totalAcUncompressedCount}if(i.dcCompressedSize>0){var F=new Uint16Array(v({array:e.array,offset:r,size:i.dcCompressedSize}).buffer);r.value+=i.dcCompressedSize}if(i.rleRawSize>0){var S=e.array.slice(r.value,r.value+i.rleCompressedSize),T=eQ(S),P=m(T.buffer);r.value+=i.rleCompressedSize}for(var I=0,N=Array(p.length),g=0;g<N.length;++g)N[g]=[];for(var O=0;O<e.lines;++O)for(var B=0;B<p.length;++B)N[B].push(I),I+=p[B].width*e.type*2;!function(e,t,r,a,i,n){var s=new DataView(n.buffer),o=r[e.idx[0]].width,l=r[e.idx[0]].height,u=Math.floor(o/8),c=Math.ceil(o/8),d=Math.ceil(l/8),f=o-(c-1)*8,h=l-(d-1)*8,p={value:0},m=[,,,],g=[,,,],y=[,,,],v=[,,,],_=[,,,];for(let r=0;r<3;++r)_[r]=t[e.idx[r]],m[r]=r<1?0:m[r-1]+c*d,g[r]=new Float32Array(64),y[r]=new Uint16Array(64),v[r]=new Uint16Array(64*c);for(let t=0;t<d;++t){var w,x,b=8;t==d-1&&(b=h);var E=8;for(let e=0;e<c;++e){e==c-1&&(E=f);for(let e=0;e<3;++e){y[e].fill(0),y[e][0]=i[m[e]++],function(e,t,r){for(var a,i=1;i<64;)65280==(a=t[e.value])?i=64:a>>8==255?i+=255&a:(r[i]=a,i++),e.value++}(p,a,y[e]),w=y[e],(x=g[e])[0]=A(w[0]),x[1]=A(w[1]),x[2]=A(w[5]),x[3]=A(w[6]),x[4]=A(w[14]),x[5]=A(w[15]),x[6]=A(w[27]),x[7]=A(w[28]),x[8]=A(w[2]),x[9]=A(w[4]),x[10]=A(w[7]),x[11]=A(w[13]),x[12]=A(w[16]),x[13]=A(w[26]),x[14]=A(w[29]),x[15]=A(w[42]),x[16]=A(w[3]),x[17]=A(w[8]),x[18]=A(w[12]),x[19]=A(w[17]),x[20]=A(w[25]),x[21]=A(w[30]),x[22]=A(w[41]),x[23]=A(w[43]),x[24]=A(w[9]),x[25]=A(w[11]),x[26]=A(w[18]),x[27]=A(w[24]),x[28]=A(w[31]),x[29]=A(w[40]),x[30]=A(w[44]),x[31]=A(w[53]),x[32]=A(w[10]),x[33]=A(w[19]),x[34]=A(w[23]),x[35]=A(w[32]),x[36]=A(w[39]),x[37]=A(w[45]),x[38]=A(w[52]),x[39]=A(w[54]),x[40]=A(w[20]),x[41]=A(w[22]),x[42]=A(w[33]),x[43]=A(w[38]),x[44]=A(w[46]),x[45]=A(w[51]),x[46]=A(w[55]),x[47]=A(w[60]),x[48]=A(w[21]),x[49]=A(w[34]),x[50]=A(w[37]),x[51]=A(w[47]),x[52]=A(w[50]),x[53]=A(w[56]),x[54]=A(w[59]),x[55]=A(w[61]),x[56]=A(w[35]),x[57]=A(w[36]),x[58]=A(w[48]),x[59]=A(w[49]),x[60]=A(w[57]),x[61]=A(w[58]),x[62]=A(w[62]),x[63]=A(w[63]),function(e){let t=.5*Math.cos(3.14159/16),r=.5*Math.cos(3.14159/8),a=.5*Math.cos(3*3.14159/16),i=.5*Math.cos(3*3.14159/8);for(var n=[,,,,],s=[,,,,],o=[,,,,],l=[,,,,],u=0;u<8;++u){var c=8*u;n[0]=r*e[c+2],n[1]=i*e[c+2],n[2]=r*e[c+6],n[3]=i*e[c+6],s[0]=t*e[c+1]+a*e[c+3]+.2777854612564676*e[c+5]+.09754573032714427*e[c+7],s[1]=a*e[c+1]-.09754573032714427*e[c+3]-t*e[c+5]-.2777854612564676*e[c+7],s[2]=.2777854612564676*e[c+1]-t*e[c+3]+.09754573032714427*e[c+5]+a*e[c+7],s[3]=.09754573032714427*e[c+1]-.2777854612564676*e[c+3]+a*e[c+5]-t*e[c+
817],o[0]=.35355362513961314*(e[c+0]+e[c+4]),o[3]=.35355362513961314*(e[c+0]-e[c+4]),o[1]=n[0]+n[3],o[2]=n[1]-n[2],l[0]=o[0]+o[1],l[1]=o[3]+o[2],l[2]=o[3]-o[2],l[3]=o[0]-o[1],e[c+0]=l[0]+s[0],e[c+1]=l[1]+s[1],e[c+2]=l[2]+s[2],e[c+3]=l[3]+s[3],e[c+4]=l[3]-s[3],e[c+5]=l[2]-s[2],e[c+6]=l[1]-s[1],e[c+7]=l[0]-s[0]}for(var d=0;d<8;++d)n[0]=r*e[16+d],n[1]=i*e[16+d],n[2]=r*e[48+d],n[3]=i*e[48+d],s[0]=t*e[8+d]+a*e[24+d]+.2777854612564676*e[40+d]+.09754573032714427*e[56+d],s[1]=a*e[8+d]-.09754573032714427*e[24+d]-t*e[40+d]-.2777854612564676*e[56+d],s[2]=.2777854612564676*e[8+d]-t*e[24+d]+.09754573032714427*e[40+d]+a*e[56+d],s[3]=.09754573032714427*e[8+d]-.2777854612564676*e[24+d]+a*e[40+d]-t*e[56+d],o[0]=.35355362513961314*(e[d]+e[32+d]),o[3]=.35355362513961314*(e[d]-e[32+d]),o[1]=n[0]+n[3],o[2]=n[1]-n[2],l[0]=o[0]+o[1],l[1]=o[3]+o[2],l[2]=o[3]-o[2],l[3]=o[0]-o[1],e[0+d]=l[0]+s[0],e[8+d]=l[1]+s[1],e[16+d]=l[2]+s[2],e[24+d]=l[3]+s[3],e[32+d]=l[3]-s[3],e[40+d]=l[2]-s[2],e[48+d]=l[1]-s[1],e[56+d]=l[0]-s[0]}(g[e])}for(var j=g,S=0;S<64;++S){var C=j[0][S],k=j[1][S],T=j[2][S];j[0][S]=C+1.5747*T,j[1][S]=C-.1873*k-.4682*T,j[2][S]=C+1.8556*k}for(let t=0;t<3;++t)!function(e,t,r){for(var a,i=0;i<64;++i){t[r+i]=M.DataUtils.toHalfFloat((a=e[i])<=1?Math.sign(a)*Math.pow(Math.abs(a),2.2):Math.sign(a)*Math.pow(9.025013291561939,Math.abs(a)-1))}}(g[t],v[t],64*e)}let n=0;for(let a=0;a<3;++a){let i=r[e.idx[a]].type;for(let e=8*t;e<8*t+b;++e){n=_[a][e];for(let t=0;t<u;++t){let r=64*t+(7&e)*8;s.setUint16(n+0*i,v[a][r+0],!0),s.setUint16(n+2*i,v[a][r+1],!0),s.setUint16(n+4*i,v[a
81][r+2],!0),s.setUint16(n+6*i,v[a][r+3],!0),s.setUint16(n+8*i,v[a][r+4],!0),s.setUint16(n+10*i,v[a][r+5],!0),s.setUint16(n+12*i,v[a][r+6],!0),s.setUint16(n+14*i,v[a][r+7],!0),n+=16*i}}if(u!=c)for(let e=8*t;e<8*t+b;++e){let t=_[a][e]+8*u*2*i,r=64*u+(7&e)*8;for(let e=0;e<E;++e)s.setUint16(t+2*e*i,v[a][r+e],!0)}}}for(var F=new Uint16Array(o),s=new DataView(n.buffer),R=0;R<3;++R){r[e.idx[R]].decoded=!0;var P=r[e.idx[R]].type;if(2==r[R].type)for(var I=0;I<l;++I){let e=_[R][I];for(var N=0;N<o;++N)F[N]=s.getUint16(e+2*N*P,!0);for(var N=0;N<o;++N)s.setFloat32(e+2*N*P,A(F[N]),!0)}}}(w,N,p,j,F,a);for(var g=0;g<p.length;++g){var y=p[g];if(!y.decoded)if(2===y.compression)for(var L=0,U=0,O=0;O<e.lines;++O){for(var W=N[g][L],G=0;G<y.width;++G){for(var z=0;z<2*y.type;++z)a[W++]=P[U+z*y.width*y.height];U++}L++}else throw"EXRLoader.parse: unsupported channel compression"}return new DataView(a.buffer)}function b(e,t){for(var r=new Uint8Array(e),a=0;0!=r[t.value+a];)a+=1;var i=new TextDecoder().decode(r.slice(t.value,t.value+a));return t.value=t.value+a+1,i}function E(e,t){var r=e.getInt32(t.value,!0);return t.value=t.value+4,r}function j(e,t){var r=e.getUint32(t.value,!0);return t.value=t.value+4,r}function S(e,t){var r=e[t.value];return t.value=t.value+1,r}function C(e,t){var r=e.getUint8(t.value);return t.value=t.value+1,r}let k=function(e,t){let r;return r="getBigInt64"in DataView.prototype?Number(e.getBigInt64(t.value,!0)):e.getUint32(t.value+4,!0)+Number(e.getUint32(t.value,!0)<<32),t.value+=8,r};function T(e,t){var r=e.getFloat32(t.value,!0);return t.value+=4,r}function F(e,t){return M.DataUtils.toHalfFloat(T(e,t))}function A(e){var t=(31744&e)>>10,r=1023&e;return(e>>15?-1:1)*(t?31===t?r?NaN:1/0:Math.pow(2,t-15)*(1+r/1024):r/1024*6103515625e-14)}function R(e,t){var r=e.getUint16(t.value,!0);return t.value+=2,r}function P(e,t){return A(R(e,t))}let I=new DataView(e),N=new Uint8Array(e),O={value:0},D=function(e,t,r){let a={};if(0x1312f76!=e.getUint32(0,!0))throw"THREE.EXRLoader: provided file doesn't appear to be in OpenEXR format.";a.version=e.getUint8(4);let i=e.getUint8(5);a.spec={singleTile:!!(2&i),longName:!!(4&i),deepFormat:!!(8&i),multiPart:!!(16&i)},r.value=8;for(var n=!0;n;){var s=b(t,r);if(0==s)n=!1;else{var o=b(t,r),l=j(e,r),u=function(e,t,r,a,i){var n,s,o,l,u,c,d;if("string"===a||"stringvector"===a||"iccProfile"===a)return n=new TextDecoder().decode(new Uint8Array(t).slice(r.value,r.value+i)),r.value=r.value+i,n;if("chlist"===a)return function(e,t,r,a){for(var i=r.value,n=[];r.value<i+a-1;){var s=b(t,r),o=E(e,r),l=C(e,r);r.value+=3;var u=E(e,r),c=E(e,r);n.push({name:s,pixelType:o,pLinear:l,xSampling:u,ySampling:c})}return r.value+=1,n}(e,t,r,i);if("chromaticities"===a)return s=T(e,r),o=T(e,r),l=T(e,r),u=T(e,r),c=T(e,r),{redX:s,redY:o,greenX:l,greenY:u,blueX:c,blueY:T(e,r),whiteX:T(e,r),whiteY:T(e,r)};if("compression"===a)return["NO_COMPRESSION","RLE_COMPRESSION","ZIPS_COMPRESSION","ZIP_COMPRESSION","PIZ_COMPRESSION","PXR24_COMPRESSION","B44_COMPRESSION","B44A_COMPRESSION","DWAA_COMPRESSION","DWAB_COMPRESSION"][C(e,r)];if("box2i"===a)return d=j(e,r),{xMin:d,yMin:j(e,r),xMax:j(e,r),yMax:j(e,r)};else if("lineOrder"===a)return["INCREASING_Y"][C(e,r)];else if("float"===a)return T(e,r);else if("v2f"===a)return[T(e,r),T(e,r)];else if("v3f"===a)return[T(e,r),T(e,r),T(e,r)];else if("int"===a)return E(e,r);else if("rational"===a)return[E(e,r),j(e,r)];else if("timecode"===a)return[j(e,r),j(e,r)];else return"preview"===a?(r.value+=i,"skipped"):(r.value+=i,void 0)}(e,t,r,o,l);void 0===u?console.warn(`EXRLoader.parse: skipped unknown header attribute type '${o}'.`):a[s]=u}}if((-5&i)!=0)throw console.error("EXRHeader:",a),"THREE.EXRLoader: provided file is currently unsupported.";return a}(I,e,O),B=function(e,t,r,a,i){let n={size:0,viewer:t,array:r,offset:a,width:e.dataWindow.xMax-e.dataWindow.xMin+1,height:e.dataWindow.yMax-e.dataWindow.yMin+1,channels:e.channels.length,bytesPerLine:null,lines:null,inputSize:null,type:e.channels[0].pixelType,uncompress:null,getter:null,format:null,[ts?"colorSpace":"encoding"]:null};switch(e.compression){case"NO_COMPRESSION":n.lines=1,n.uncompress=g;break;case"RLE_COMPRESSION":n.lines=1,n.uncompress=y;break;case"ZIPS_COMPRESSION":n.lines=1,n.uncompress=v;break;case"ZIP_COMPRESSION":n.lines=16,n.uncompress=v;break;case"PIZ_COMPRESSION":n.lines=32,n.uncompress=_;break;case"PXR24_COMPRESSION":n.lines=16,n.uncompress=w;break;case"DWAA_COMPRESSION":n.lines=32,n.uncompress=x;break;case"DWAB_COMPRESSION":n.lines=256,n.uncompress=x;break;default:throw"EXRLoader.parse: "+e.compression+" is unsupported"}if(n.scanlineBlockSize=n.lines,1==n.type)switch(i){case M.FloatType:n.getter=P,n.inputSize=2;break;case M.HalfFloatType:n.getter=R,n.inputSize=2}else if(2==n.type)switch(i){case M.FloatType:n.getter=T,n.inputSize=4;break;case M.HalfFloatType:n.getter=F,n.inputSize=4}else throw"EXRLoader.parse: unsupported pixelType "+n.type+" for "+e.compression+".";n.blockCount=(e.dataWindow.yMax+1)/n.scanlineBlockSize;for(var s=0;s<n.blockCount;s++)k(t,a);
81n.outputChannels=3==n.channels?4:n.channels;let o=n.width*n.height*n.outputChannels;switch(i){case M.FloatType:n.byteArray=new Float32Array(o),n.channels<n.outputChannels&&n.byteArray.fill(1,0,o);break;case M.HalfFloatType:n.byteArray=new Uint16Array(o),n.channels<n.outputChannels&&n.byteArray.fill(15360,0,o);break;default:console.error("THREE.EXRLoader: unsupported type: ",i)}return n.bytesPerLine=n.width*n.inputSize*n.channels,4==n.outputChannels?n.format=M.RGBAFormat:n.format=M.RedFormat,ts?n.colorSpace="srgb-linear":n.encoding=3e3,n}(D,I,N,O,this.type),L={value:0},U={R:0,G:1,B:2,A:3,Y:0};for(let e=0;e<B.height/B.scanlineBlockSize;e++){let t=j(I,O);B.size=j(I,O),B.lines=t+B.scanlineBlockSize>B.height?B.height-t:B.scanlineBlockSize;let r=B.size<B.lines*B.bytesPerLine?B.uncompress(B):g(B);O.value+=B.size;for(let t=0;t<B.scanlineBlockSize;t++){let a=t+e*B.scanlineBlockSize;if(a>=B.height)break;for(let e=0;e<B.channels;e++){let i=U[D.channels[e].name];for(let n=0;n<B.width;n++){L.value=(t*(B.channels*B.width)+e*B.width+n)*B.inputSize;let s=(B.height-1-a)*(B.width*B.outputChannels)+n*B.outputChannels+i;B.byteArray[s]=B.getter(r,L)}}}}return{header:D,width:B.width,height:B.height,data:B.byteArray,format:B.format,[ts?"colorSpace":"encoding"]:B[ts?"colorSpace":"encoding"],type:this.t
81ype}}setDataType(e){return this.type=e,this}load(e,t,r,a){return super.load(e,function(e,r){ts?e.colorSpace=r.colorSpace:e.encoding=r.encoding,e.minFilter=M.LinearFilter,e.magFilter=M.LinearFilter,e.generateMipmaps=!1,e.flipY=!1,t&&t(e,r)},r,a)}}var tl=e.i(8560);let tu=(e,t,r)=>{let a;switch(e){case i.UnsignedByteType:a=new Uint8ClampedArray(t*r*4);break;case i.HalfFloatType:a=new Uint16Array(t*r*4);break;case i.UnsignedIntType:a=new Uint32Array(t*r*4);break;case i.ByteType:a=new Int8Array(t*r*4);break;case i.ShortType:a=new Int16Array(t*r*4);break;case i.IntType:a=new Int32Array(t*r*4);break;case i.FloatType:a=new Float32Array(t*r*4);break;default:throw Error("Unsupported data type")}return a};class tc{_renderer;_rendererIsDisposable=!1;_material;_scene;_camera;_quad;_renderTarget;_width;_height;_type;_colorSpace;_supportsReadPixels=!0;constructor(e){this._width=e.width,this._height=e.height,this._type=e.type,this._colorSpace=e.colorSpace;const r={format:i.RGBAFormat,depthBuffer:!1,stencilBuffer:!1,type:this._type,colorSpace:this._colorSpace,anisotropy:e.renderTargetOptions?.anisotropy!==void 0?e.renderTargetOptions?.anisotropy:1,generateMipmaps:e.renderTargetOptions?.generateMipmaps!==void 0&&e.renderTargetOptions?.generateMipmaps,magFilter:e.renderTargetOptions?.magFilter!==void 0?e.renderTargetOptions?.magFilter:i.LinearFilter,minFilter:e.renderTargetOptions?.minFilter!==void 0?e.renderTargetOptions?.minFilter:i.LinearFilter,samples:e.renderTargetOptions?.samples!==void 0?e.renderTargetOptions?.samples:void 0,wrapS:e.renderTargetOptions?.wrapS!==void 0?e.renderTargetOptions?.wrapS:i.ClampToEdgeWrapping,wrapT:e.renderTargetOptions?.wrapT!==void 0?e.renderTargetOptions?.wrapT:i.ClampToEdgeWrapping};if(this._material=e.material,e.renderer?this._renderer=e.renderer:(this._renderer=tc.instantiateRenderer(),this._rendererIsDisposable=!0),this._scene=new i.Scene,this._camera=new i.OrthographicCamera,this._camera.position.set(0,0,10),this._camera.left=-.5,this._camera.right=.5,this._camera.top=.5,this._camera.bottom=-.5,this._camera.updateProjectionMatrix(),!((e,r,a,n)=>{if(void 0!==t)return t;let s=new i.WebGLRenderTarget(1,1,n);r.setRenderTarget(s);let o=new i.Mesh(new i.PlaneGeometry,new i.MeshBasicMaterial({color:0xffffff}));r.render(o,a),r.setRenderTarget(null);let l=tu(e,s.width,s.height);return r.readRenderTargetPixels(s,0,0,s.width,s.height,l),s.dispose(),o.geometry.dispose(),o.material.dispose(),t=0!==l[0]})(this._type,this._renderer,this._camera,r)){let e;this._type===i.HalfFloatType&&(e=this._renderer.extensions.has("EXT_color_buffer_float")?i.FloatType:void 0),void 0!==e?(console.warn(`This browser does not support reading pixels from ${this._type} RenderTargets, switching to ${i.FloatType}`),this._type=e):(this._supportsReadPixels=!1,console.warn("This browser dos not support toArray or toDataTexture, calls to those methods will result in an error thrown"))}this._quad=new i.Mesh(new i.PlaneGeometry,this._material),this._quad.geometry.computeBoundingBox(),this._scene.add(this._quad),this._renderTarget=new i.WebGLRenderTarget(this.width,this.height,r),this._renderTarget.texture.mapping=e.renderTargetOptions?.mapping!==void 0?e.renderTargetOptions?.mapping:i.UVMapping}static instantiateRenderer(){let e=new tl.WebGLRenderer;return e.setSize(128,128),e}render=()=>{this._renderer.setRenderTarget(this._renderTarget);try{this._renderer.render(this._scene,this._camera)}catch(e){throw this._renderer.setRenderTarget(null),e}this._renderer.setRenderTarget(null)};toArray(){if(!this._supportsReadPixels)throw Error("Can't read pixels in this browser");let e=tu(this._type,this._width,this._height);return this._renderer.readRenderTargetPixels(this._renderTarget,0,0,this._width,this._height,e),e}toDataTexture(e){let t=new i.DataTexture(this.toArray(),this.width,this.height,i.RGBAFormat,this._type,e?.mapping||i.UVMapping,e?.wrapS||i.ClampToEdgeWrapping,e?.wrapT||i.ClampToEdgeWrapping,e?.magFilter||i.LinearFilter,e?.minFilter||i.LinearFilter,e?.anisotropy||1,i.LinearSRGBColorSpace);return t.generateMipmaps=e?.generateMipmaps!==void 0&&e?.generateMipmaps,t}disposeOnDemandRenderer(){this._renderer.setRenderTarget(null),this._rendererIsDisposable&&(this._renderer.dispose(),this._renderer.forceContextLoss())}dispose(e){this.disposeOnDemandRenderer(),e&&this.renderTarget.dispose(),this.material instanceof i.ShaderMaterial&&Object.values(this.material.uniforms).forEac
81h(e=>{e.value instanceof i.Texture&&e.value.dispose()}),Object.values(this.material).forEach(e=>{e instanceof i.Texture&&e.dispose()}),this.material.dispose(),this._quad.geometry.dispose()}get width(){return this._width}set width(e){this._width=e,this._renderTarget.setSize(this._width,this._height)}get height(){return this._height}set height(e){this._height=e,this._renderTarget.setSize(this._width,this._height)}get renderer(){return this._renderer}get renderTarget(){return this._renderTarget}set renderTarget(e){this._renderTarget=e,this._width=e.width,this._height=e.height}get material(){return this._material}get type(){return this._type}get colorSpace(){return this._colorSpace}}var td=i;class tf extends Error{}class th extends Error{}let tp=(e,t,r)=>{let a=RegExp(`${t}="([^"]*)"`,"i").exec(e);if(a)return a[1];let i=RegExp(`<${t}[^>]*>([\\s\\S]*?)</${t}>`,"i").exec(e);if(i){let e=i[1].match(/<rdf:li>([^<]*)<\/rdf:li>/g);return e&&3===e.length?e.map(e=>e.replace(/<\/?rdf:li>/g,"")):i[1].trim()}if(void 0!==r)return r;throw Error(`Can't find ${t} in gainmap metadata`)};class tm{options;constructor(e){this.options={debug:!!e&&void 0!==e.debug&&e.debug,extractFII:!e||void 0===e.extractFII||e.extractFII,extractNonFII:!e||void 0===e.extractNonFII||e.extractNonFII}}extract(e){return new Promise((t,r)=>{let a,i=this.options.debug,n=new DataView(e.buffer);if(65496!==n.getUint16(0))return void r(Error("Not a valid jpeg"));let s=n.byteLength,o=2,l=0;for(;o<s;){if(++l>250)return void r(Error(`Found no marker after ${l} loops 😵`));if(255!==n.getUint8(o))return void r(Error(`Not a valid marker at offset 0x${o.toString(16)}, found: 0x${n.getUint8(o).toString(16)}`));if(a=n.getUint8(o+1),i&&console.log(`Marker: ${a.toString(16)}`),226===a){i&&console.log("Found APP2 marker (0xffe2)");let e=o+4;if(0x4d504600===n.getUint32(e)){let a,i=e+4;if(18761===n.getUint16(i))a=!1;else{if(19789!==n.getUint16(i))return void r(Error("No valid endianness marker found in TIFF header"));a=!0}if(42!==n.getUint16(i+2,!a))return void r(Error("Not valid TIFF data! (no 0x002A marker)"));let s=n.getUint32(i+4,!a);if(s<8)return void r(Error("Not valid TIFF data! (First offset less than 8)"));let o=i+s,l=n.getUint16(o,!a),u=o+2,c=0;for(let e=u;e<u+12*l;e+=12)45057===n.getUint16(e,!a)&&(c=n.getUint32(e+8,!a));let d=o+2+12*l+4,f=[];for(let e=d;e<d+16*c;e+=16){let t={MPType:n.getUint32(e,!a),size:n.getUint32(e+4,!a),dataOffset:n.getUint32(e+8,!a),dependantImages:n.getUint32(e+12,!a),start:-1,end:-1,isFII:!1};t.dataOffset?(t.start=i+t.dataOffset,t.isFII=!1):(t.start=0,t.isFII=!0),t.end=t.start+t.size,f.push(t)}if(this.options.extractNonFII&&f.length){let e=new Blob([n]),r=[];for(let t of f){if(t.isFII&&!this.options.extractFII)continue;let a=e.slice(t.start,t.end+1,"image/jpeg");r.push(a)}t(r)}}}o+=2+n.getUint16(o+2)}})}}let tg=async e=>{let t=(e=>{let t,r=(t="u">typeof TextDecoder?new TextDecoder().decode(e):e.toString()).indexOf("<x:xmpmeta");for(;-1!==r;){let e=t.indexOf("x:xmpmeta>",r),a=t.slice(r,e+10);try{let e=tp(a,"hdrgm:GainMapMin","0"),t=tp(a,"hdrgm:GainMapMax"),r=tp(a,"hdrgm:Gamma","1"),i=tp(a,"hdrgm:OffsetSDR","0.015625"),n=tp(a,"hdrgm:OffsetHDR","0.015625"),s=/hdrgm:HDRCapacityMin="([^"]*)"/.exec(a),o=s?s[1]:"0",l=/hdrgm:HDRCapacityMax="([^"]*)"/.exec(a);if(!l)throw Error("Incomplete gainmap metadata");let u=l[1];return{gainMapMin:Array.isArray(e)?e.map(e=>parseFloat(e)):[parseFloat(e),parseFloat(e),parseFloat(e)],gainMapMax:Array.isArray(t)?t.map(e=>parseFloat(e)):[parseFloat(t),parseFloat(t),parseFloat(t)],gamma:Array.isArray(r)?r.map(e=>parseFloat(e)):[parseFloat(r),parseFloat(r),parseFloat(r)],offsetSdr:Array.isArray(i)?i.map(e=>parseFloat(e)):[parseFloat(i),parseFloat(i),parseFloat(i)],offsetHdr:Array.isArray(n)?n.map(e=>parseFloat(e)):[parseFloat(n),parseFloat(n),parseFloat(n)],hdrCapacityMin:parseFloat(o),hdrCapacityMax:parseFloat(u)}}catch(e){}r=t.indexOf("<x:xmpmeta",e)}})(e);if(!t)throw new th("Gain map XMP metadata not found");let r=new tm({extractFII:!0,extractNonFII:!0}),a=await r.extract(e);if(2!==a.length)throw new tf("Gain map recovery image not found");return{sdr:new Uint8Array(await a[0].arrayBuffer()),gainMap:new Uint8Array(await a[1].arrayBuffer()),metadata:t}},ty=e=>
81new Promise((t,r)=>{let a=document.createElement("img");a.onload=()=>{t(a)},a.onerror=e=>{r(e)},a.src=URL.createObjectURL(e)});class tv extends td.Loader{_renderer;_renderTargetOptions;_internalLoadingManager;_config;constructor(e,t){super(t),this._config=e,e.renderer&&(this._renderer=e.renderer),this._internalLoadingManager=new td.LoadingManager}setRenderer(e){return this._renderer=e,this}setRenderTargetOptions(e){return this._renderTargetOptions=e,this}prepareQuadRenderer(){this._renderer||console.warn("WARNING: A Renderer was not passed to this Loader constructor or in setRenderer, the result of this Loader will need to be converted to a Data Texture with toDataTexture() before you can use it in your renderer.");let e=this._config.createMaterial({gainMapMax:[1,1,1],gainMapMin:[0,0,0],gamma:[1,1,1],offsetHdr:[1,1,1],offsetSdr:[1,1,1],hdrCapacityMax:1,hdrCapacityMin:0,maxDisplayBoost:1,gainMap:new td.Texture,sdr:new td.Texture});return this._config.createQuadRenderer({width:16,height:16,type:td.HalfFloatType,colorSpace:td.LinearSRGBColorSpace,material:e,renderer:this._renderer,renderTargetOptions:this._renderTargetOptions})}async processImages(e,t,r){let a,i,n=t?new Blob([t],{type:"image/jpeg"}):void 0,s=new Blob([e],{type:"image/jpeg"}),o=!1;if("u"<typeof createImageBitmap){let e=await Promise.all([n?ty(n):Promise.resolve(void 0),ty(s)]);i=e[0],a=e[1],o="flipY"===r}else{let e=await Promise.all([n?createImageBitmap(n,{imageOrientation:r||"flipY"}):Promise.resolve(void 0),createImageBitmap(s,{imageOrientation:r||"flipY"})]);i=e[0],a=e[1]}return{sdrImage:a,gainMapImage:i,needsFlip:o}}createTextures(e,t,r){let a=new td.Texture(t||new ImageData(2,2),td.UVMapping,td.ClampToEdgeWrapping,td.ClampToEdgeWrapping,td.LinearFilter,td.LinearMipMapLinearFilter,td.RGBAFormat,td.UnsignedByteType,1,td.LinearSRGBColorSpace);a.flipY=r,a.needsUpdate=!0;let i=new td.Texture(e,td.UVMapping,td.ClampToEdgeWrapping,td.ClampToEdgeWrapping,td.LinearFilter,td.LinearMipMapLinearFilter,td.RGBAFormat,td.UnsignedByteType,1,td.SRGBColorSpace);return i.flipY=r,i.needsUpdate=!0,{gainMap:a,sdr:i}}updateQuadRenderer(e,t,r,a,i){e.width=t.width,e.height=t.height,e.material.gainMap=r,e.material.sdr=a,e.material.gainMapMin=i.gainMapMin,e.material.gainMapMax=i.gainMapMax,e.material.offsetHdr=i.offsetHdr,e.material.offsetSdr=i.offsetSdr,e.material.gamma=i.gamma,e.material.hdrCapacityMin=i.hdrCapacityMin,e.material.hdrCapacityMax=i.hdrCapacityMax,e.material.maxDisplayBoost=Math.pow(2,i.hdrCapacityMax),e.material.needsUpdate=!0}}var t_=i;let tw=`
82varying vec2 vUv;
83
84void main() {
85  vUv = uv;
86  gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);
87}
88`,tx=`
89// min half float value
90#define HALF_FLOAT_MIN vec3( -65504, -65504, -65504 )
91// max half float value
92#define HALF_FLOAT_MAX vec3( 65504, 65504, 65504 )
93
94uniform sampler2D sdr;
95uniform sampler2D gainMap;
96uniform vec3 gamma;
97uniform vec3 offsetHdr;
98uniform vec3 offsetSdr;
99uniform vec3 gainMapMin;
100uniform vec3 gainMapMax;
101uniform float weightFactor;
102
103varying vec2 vUv;
104
105void main() {
106  vec3 rgb = texture2D( sdr, vUv ).rgb;
107  vec3 recovery = texture2D( gainMap, vUv ).rgb;
108  vec3 logRecovery = pow( recovery, gamma );
109  vec3 logBoost = gainMapMin * ( 1.0 - logRecovery ) + gainMapMax * logRecovery;
110  vec3 hdrColor = (rgb + offsetSdr) * exp2( logBoost * weightFactor ) - offsetHdr;
111  vec3 clampedHdrColor = max( HALF_FLOAT_MIN, min( HALF_FLOAT_MAX, hdrColor ));
112  gl_FragColor = vec4( clampedHdrColor , 1.0 );
113}
114`;class tb extends t_.ShaderMaterial{_maxDisplayBoost;_hdrCapacityMin;_hdrCapacityMax;constructor({gamma:e,offsetHdr:t,offsetSdr:r,gainMapMin:a,gainMapMax:i,maxDisplayBoost:n,hdrCapacityMin:s,hdrCapacityMax:o,sdr:l,gainMap:u}){super({name:"GainMapDecoderMaterial",vertexShader:tw,fragmentShader:tx,uniforms:{sdr:{value:l},gainMap:{value:u},gamma:{value:new t_.Vector3(1/e[0],1/e[1],1/e[2])},offsetHdr:{value:new t_.Vector3().fromArray(t)},offsetSdr:{value:new t_.Vector3().fromArray(r)},gainMapMin:{value:new t_.Vector3().fromArray(a)},gainMapMax:{value:new t_.Vector3().fromArray(i)},weightFactor:{value:(Math.log2(n)-s)/(o-s)}},blending:t_.NoBlending,depthTest:!1,depthWrite:!1}),this._maxDisplayBoost=n,this._hdrCapacityMin=s,this._hdrCapacityMax=o,this.needsUpdate=!0,this.uniformsNeedUpdate=!0}get sdr(){return this.uniforms.sdr.value}set sdr(e){this.uniforms.sdr.value=e}get gainMap(){return this.uniforms.gainMap.value}set gainMap(e){this.uniforms.gainMap.value=e}get offsetHdr(){return this.uniforms.offsetHdr.value.toArray()}set offsetHdr(e){this.uniforms.offsetHdr.value.fromArray(e)}get offsetSdr(){return this.uniforms.offsetSdr.value.toArray()}set offsetSdr(e){this.uniforms.offsetSdr.value.fromArray(e)}get gainMapMin(){return this.uniforms.gainMapMin.value.toArray()}set gainMapMin(e){this.uniforms.gainMapMin.value.fromArray(e)}get gainMapMax(){return this.uniforms.gainMapMax.value.toArray()}set gainMapMax(e){this.uniforms.gainMapMax.value.fromArray(e)}get gamma(){let e=this.uniforms.gamma.value;return[1/e.x,1/e.y,1/e.z]}set gamma(e){let t=this.uniforms.gamma.value;t.x=1/e[0],t.y=1/e[1],t.z=1/e[2]}get hdrCapacityMin(){return this._hdrCapacityMin}set hdrCapacityMin(e){this._hdrCapacityMin=e,this.calculateWeight()}get hdrCapacityMax(){return this._hdrCapacityMax}set hdrCapacityMax(e){this._hdrCapacityMax=e,this.calculateWeight()}get maxDisplayBoost(){return this._maxDisplayBoost}set maxDisplayBoost(e){this._maxDisplayBoost=Math.max(1,Math.min(65504,e)),this.calculateWeight()}calculateWeight(){let e=(Math.log2(this._maxDisplayBoost)-this._hdrCapacityMin)/(this._hdrCapacityMax-this._hdrCapacityMin);this.uniforms.weightFactor.value=Math.max(0,Math.min(1,e))}}tl.WebGLRenderer;class tM extends tv{constructor(e,t){super({renderer:e,createMaterial:e=>new tb(e),createQuadRenderer:e=>new tc(e)},t)}async render(e,t,r,a){let{sdrImage:i,gainMapImage:n,needsFlip:s}=await this.processImages(r,a,"flipY"),{gainMap:o,sdr:l}=this.createTextures(i,n,s);this.updateQuadRenderer(e,i,o,l,t),e.render()}}class tE extends tM{load([e,t,r],a,i,n){let s,o,l,u=this.prepareQuadRenderer(),c=async()=>
114{if(s&&o&&l){try{await this.render(u,l,s,o)}catch(a){this.manager.itemError(e),this.manager.itemError(t),this.manager.itemError(r),"function"==typeof n&&n(a),u.disposeOnDemandRenderer();return}"function"==typeof a&&a(u),this.manager.itemEnd(e),this.manager.itemEnd(t),this.manager.itemEnd(r),u.disposeOnDemandRenderer()}},d=!0,f=0,h=0,p=!0,m=0,g=0,y=!0,v=0,_=0,w=()=>{"function"==typeof i&&i(new ProgressEvent("progress",{lengthComputable:d&&p&&y,loaded:h+g+_,total:f+m+v}))};this.manager.itemStart(e),this.manager.itemStart(t),this.manager.itemStart(r);let x=new t_.FileLoader(this._internalLoadingManager);x.setResponseType("arraybuffer"),x.setRequestHeader(this.requestHeader),x.setPath(this.path),x.setWithCredentials(this.withCredentials),x.load(e,async e=>{if("string"==typeof e)throw Error("Invalid sdr buffer");s=e,await c()},e=>{d=e.lengthComputable,h=e.loaded,f=e.total,w()},t=>{this.manager.itemError(e),"function"==typeof n&&n(t)});let b=new t_.FileLoader(this._internalLoadingManager);b.setResponseType("arraybuffer"),b.setRequestHeader(this.requestHeader),b.setPath(this.path),b.setWithCredentials(this.withCredentials),b.load(t,async e=>{if("string"==typeof e)throw Error("Invalid gainmap buffer");o=e,await c()},e=>{p=e.lengthComputable,g=e.loaded,m=e.total,w()},e=>{this.manager.itemError(t),"function"==typeof n&&n(e)});let M=new t_.FileLoader(this._internalLoadingManager);return M.setRequestHeader(this.requestHeader),M.setPath(this.path),M.setWithCredentials(this.withCredentials),M.load(r,async e=>{if("string"!=typeof e)throw Error("Invalid metadata string");l=JSON.parse(e),await c()},e=>{y=e.lengthComputable,_=e.loaded,v=e.total,w()},e=>{this.manager.itemError(r),"function"==typeof n&&n(e)}),u}}class tj extends tM{load(e,t,r,a){let i=this.prepareQuadRenderer(),n=new t_.FileLoader(this._internalLoadingManager);return n.setResponseType("arraybuffer"),n.setRequestHeader(this.requestHeader),n.setPath(this.path),n.setWithCredentials(this.withCredentials),this.manager.itemStart(e),n.load(e,async r=>{let n,s,o;if("string"==typeof r)throw Error("Invalid buffer, received [string], was expecting [ArrayBuffer]");let l=new Uint8Array(r);try{let e=await tg(l);n=e.sdr,s=e.gainMap,o=e.metadata}catch(t){if(t instanceof th||t instanceof tf)console.warn(`Failure to reconstruct an HDR image from ${e}: Gain map metadata not found in the file, HDRJPGLoader will render the SDR jpeg`),o={gainMapMin:[0,0,0],gainMapMax:[1,1,1],gamma:[1,1,1],hdrCapacityMin:0,hdrCapacityMax:1,offsetHdr:[0,0,0],offsetSdr:[0,0,0]},n=l;else throw t}try{await this.render(i,o,n.buffer,s?.buffer)}catch(t){this.manager.itemError(e),"function"==typeof a&&a(t),i.disposeOnDemandRenderer();return}"function"==typeof t&&t(i),this.manager.itemEnd(e),i.disposeOnDemandRenderer()},r,t=>{this.manager.itemError(e),"function"==typeof a&&a(t)}),i}}let tS={apartment:"lebombo_1k.hdr",city:"potsdamer_platz_1k.hdr",dawn:"kiara_1_dawn_1k.hdr",forest:"forest_slope_1k.hdr",lobby:"st_fagans_interior_1k.hdr",night:"dikhololo_night_1k.hdr",park:"rooitou_park_1k.hdr",studio:"studio_small_03_1k.hdr",sunset:"venice_sunset_1k.hdr",warehouse:"empty_warehouse_01_1k.hdr"},tC="https://raw.githack.com/pmndrs/drei-assets/456060a26bbeb8fdf79326f224b6d99b8bcce736/hdri/",tk=["/px.png","/nx.png","/py.png","/ny.png","/pz.png","/nz.png"];function tT({files:e=tk,path:t="",preset:r,colorSpace:a,extensions:n}={}){r&&(tR(r),e=tS[r],t=tC);let o=Array.isArray(e),{extension:l,isCubemap:u}=tP(e),c=tI(l);if(!c)throw Error("useEnvironment: Unrecognized file extension: "+e);let h=(0,d.useThree)(e=>e.gl);(0,s.useLayoutEffect)(()=>{("webp"===l||"jpg"===l||"jpeg"===l)&&h.domElement.addEventListener("webglcontextlost",function(){f.useLoader.clear(c,o?[e]:e)},{once:!0})},[e,h.domElement]);let p=(0,f.useLoader)(c,o?[e]:e,e=>{("webp"===l||"jpg"===l||"jpeg"===l)&&e.setRenderer(h),null==e.setPath||e.setPath(t),n&&n(e)}),m=o?p[0]:p;if("jpg"===l||"jpeg"===l||"webp"===l){var g;m=null==(g=m.renderTarget)?void 0:g.texture}return m.mapping=u?i.CubeReflectionMapping:i.EquirectangularReflectionMapping,m.colorSpace=null!=a?a:u?"srgb":"srgb-linear",m}let tF={files:tk,path:"",preset:void 0,extensions:void 0};tT.preload=e=>{let t={...tF,...e},{files:r,path:a=""}=t,{preset:i,extensions:n}=t;i&&(tR(i),r=tS[i],a=tC);let{extension:s}=tP(r);if("webp"===s||"jpg"===s||"jpeg"===s)throw Error("useEnvironment: Preloading gainmaps is not supported");let o=tI(s);if(!o)throw Error("useEnvironment: Unrecognized file extension: "+r);f.useLoader.preload(o,Array.isArray(r)?[r]:r,e=>{null==e.setPath||e.setPath(a),n&&n(e)})};let tA={files:tk,preset:void 0};function tR(e){if(!(e in tS))throw Error("Preset must be one of: "+Object.keys(tS).join(", "))}function tP(e){var t;let r=Array.isArray(e)&&6===e.length,a=Array.isArray(e)&&3===e.length&&e.some(e=>e.endsWith("json")),i=Array.isArray(e)?e[0]:e;return{extension:r?"cube":a?"webp":i.startsWith("data:application/exr")?"exr":i.startsWith("data:application/hdr")?"hdr":i.startsWith("data:image/jpeg")?"jpg":null==(t=i.split(".").pop())||null==(t=t.split("?"))||null==(t=t.shift())?void 0:t.toLowerCase(),isCubemap:r,isGainmap:a}}function tI(e){return"cube"===e?i.CubeTextureLoader:"hdr"===e?b:"exr"===e?to:"jpg"===e||"jpeg"===e?tj:"webp"===e?tE:null}function tN(e,t,r,a,i={}){var n,s,o,l,u;let c;i={backgroundBlurriness:0,backgroundIntensity:1,backgroundRotation:[0,0,0],environmentIntensity:1,environmentRotation:[0,0,0],...i};let d=(c=u=t||r).current&&c.current.isScene?u.current:u,f=d.background,h=d.environment,p={backgroundBlurriness:d.backgroundBlurriness,backgroundIntensity:d.backgroundIntensity,backgroundRotation:null!=(n=null==(s=d.backgroundRotation)||null==s.clone?void 0:s.clone())?n:[0,0,0],environmentIntensity:d.environmentIntensity,environmentRotation:null!=(o=null==(l=d.environmentRotation)||null==l.clone?void 0:l.clone())?o:[0,0,0]};return"only"!==e&&(d.environment=a),e&&(d.background=a),(0,y.s)(d,i),()=>{"only"!==e&&(d.environment=h),e&&(d.background=f),(0,y.s)(d,p)}}function tO({scene:e,background:t=!1,map:r,...a}){let i=(0,d.useThree)(e=>e.scene);return s.useLayoutEffect(()=>{if(r)return tN(t,e,i,r,a)}),null}function tD({background:e=!1,scene:t,blur:r,backgroundBlurriness:a,backgroundIntensity:i,backgroundRotation:n,environmentIntensity:o,environmentRotation:l,...u}){let c=tT(u),f=(0,d.useThree)(e=>e.scene);return s.useLayoutEffect(()=>tN(e,t,f,c,{backgroundBlurriness:null!=r?r:a,backgroundIntensity:i,backgroundRotation:n,environmentIntensity:o,environmentRotation:l})),s.useEffect(()=>()=>{c.dispose()},[c]),null}function tB({children:e,near:t=.1,far:r=1e3,resolution:a=256,frames:n=1,map:o,background:l=!1,blur:c,backgroundBlurriness:f,backgroundIntensity:h,backgroundRotation:p,environmentIntensity:m,environmentRotation:y,scene:v,files:_,path:w,preset
114:x,extensions:b}){let M=(0,d.useThree)(e=>e.gl),E=(0,d.useThree)(e=>e.scene),j=s.useRef(null),[S]=s.useState(()=>new i.Scene),C=s.useMemo(()=>{let e=new i.WebGLCubeRenderTarget(a);return e.texture.type=i.HalfFloatType,e},[a]);s.useEffect(()=>()=>{C.dispose()},[C]),s.useLayoutEffect(()=>{if(1===n){let e=M.autoClear;M.autoClear=!0,j.current.update(M,S),M.autoClear=e}return tN(l,v,E,C.texture,{backgroundBlurriness:null!=c?c:f,backgroundIntensity:h,backgroundRotation:p,environmentIntensity:m,environmentRotation:y})},[e,S,C.texture,v,E,l,n,M]);let k=1;return(0,u.useFrame)(()=>{if(n===1/0||k<n){let e=M.autoClear;M.autoClear=!0,j.current.update(M,S),M.autoClear=e,k++}}),s.createElement(s.Fragment,null,(0,g.o)(s.createElement(s.Fragment,null,e,s.createElement("cubeCamera",{ref:j,args:[t,r,C]}),_||x?s.createElement(tD,{background:!0,files:_,preset:x,path:w,extensions:b}):o?s.createElement(tO,{background:!0,map:o,extensions:b}):null),S))}function tL(e){var t,r,a,i;let n=tT(e),o=e.map||n;s.useMemo(()=>(0,l.e)({GroundProjectedEnvImpl:w}),[]),s.useEffect(()=>()=>{n.dispose()},[n]);let u=s.useMemo(()=>[o],[o]),c=null==(t=e.ground)?void 0:t.height,d=null==(r=e.ground)?void 0:r.radius,f=null!=(a=null==(i=e.ground)?void 0:i.scale)?a:1e3;return s.createElement(s.Fragment,null,s.createElement(tO,(0,m.default)({},e,{map:o})),s.createElement("groundProjectedEnvImpl",{args:u,scale:f,height:c,radius:d}))}function tU(e){return e.ground?s.createElement(tL,e):e.map?s.createElement(tO,e):e.children?s.createElement(tB,e):s.createElement(tD,e)}tT.clear=e=>{let t={...tA,...e},{files:r}=t,{preset:a}=t;a&&(tR(a),r=tS[a]);let{extension:i}=tP(r),n=tI(i);if(!n)throw Error("useEnvironment: Unrecognized file extension: "+r);f.useLoader.clear(n,Array.isArray(r)?[r]:r)};var y=l;let tW=s.forwardRef(({light:e,args:t,map:r,toneMapped:a=!1,color:n="white",form:o="rect",intensity:l=1,scale:u=1,target:c=[0,0,0],children:d,...f},h)=>{let p=s.useRef(null);return s.useImperativeHandle(h,()=>p.current,[]),s.useLayoutEffect(()=>{d||f.material||((0,y.s)(p.current.material,{color:n}),p.current.material.color.multiplyScalar(l))},[n,l,d,f.material]),s.useLayoutEffect(()=>{f.rotation||p.current.quaternion.identity(),c&&!f.rotation&&("boolean"==typeof c?p.current.lookAt(0,0,0):p.current.lookAt(Array.isArray(c)?new i.Vector3(...c):c))},[c,f.rotation]),u=Array.isArray(u)&&2===u.length?[u[0],u[1],1]:u,s.createElement("mesh",(0,m.default)({ref:p,scale:u},f),"circle"===o?s.createElement("ringGeometry",{args:t||[0,.5,64]}):"ring"===o?s.createElement("ringGeometry",{args:t||[.25,.5,64]}):"rect"===o||"plane"===o?s.createElement("planeGeometry",{args:t||[1,1]}):"box"===o?s.createElement("boxGeometry",{args:t||[1,1,1]}):s.createElement(o,{args:t}),d||s.createElement("meshBasicMaterial",{toneMapped:a,map:r,side:i.DoubleSide}),e&&s.createElement("pointLight",(0,m.default)({castShadow:!0},e)))});var tG=e.i(66246),tz=e.i(20284),tq=e.i(68911);function tV(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,a)}return r}function tH(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?tV(Object(r),!0).forEach(function(t){!function(e,t,r){var a;(t="symbol"==typeof(a=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var a=r.call(e,t||"default");if("object"!=typeof a)return a;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"))?a:a+"")in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r}(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):tV(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}let t$=new i.Quaternion;new i.Euler;let tX=new i.Vector3;new i.Object3D;let tY=new i.Matrix4,tQ=new i.Vector3,tZ=new i.Quaternion,tJ=new i.Vector3,tK=({x:e,y:t,z:r,w:a})=>t$.set(e,t,r,a),t0=e=>Array.isArray(e)?new tG.Vector3(e[0],e[1],e[2]):"number"==typeof e?new tG.Vector3(e,e,e):new tG.Vector3(e.x,e.y,e.z),t1={fixed:1,dynamic:0,kinematicPosition:2,kinematicVelocity:3},t2=e=>t1[e],t3=e=>e?e instanceof i.Quaternion?[e.x,e.y,e.z,e.w]:e instanceof i.Vector3||e instanceof i.Euler?[e.x,e.y,e.z]:Array.isArray(e)?e:[e]:[0];function t5(e){let t=(0,s.useRef)(void 0);return void 0===t.current&&(t.current={value:"function"==typeof e?e():e}),t.current.value}let t4=({onStep:e,updatePriority:t})=>((0,u.useFrame)((t,r)=>
114{e(r)},t),null),t6=({onStep:e})=>{var t;let r,a,i;return t=t=>{e(t)},r=(0,s.useRef)(t),a=(0,s.useRef)(0),i=(0,s.useRef)(0),(0,s.useEffect)(()=>{r.current=t},[t]),(0,s.useEffect)(()=>{let e=()=>{let t=performance.now(),n=t-i.current;a.current=requestAnimationFrame(e),r.current(n/1e3),i.current=t};return a.current=requestAnimationFrame(e),()=>cancelAnimationFrame(a.current)},[]),null};var t8=(0,s.memo)(({onStep:e,type:t,updatePriority:r})=>"independent"===t?s.default.createElement(t6,{onStep:e}):s.default.createElement(t4,{onStep:e,updatePriority:r}));function t7(e,t){if(null==e)return{};var r,a,i=function(e,t){if(null==e)return{};var r={};for(var a in e)if(({}).hasOwnProperty.call(e,a)){if(-1!==t.indexOf(a))continue;r[a]=e[a]}return r}(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(a=0;a<n.length;a++)r=n[a],-1===t.indexOf(r)&&({}).propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}let t9=["mass","linearDamping","angularDamping","type","onCollisionEnter","onCollisionExit","onIntersectionEnter","onIntersectionExit","onContactForce","children","canSleep","ccd","gravityScale","softCcdPrediction","ref"],re=["shape","args"],rt="Please pick ONLY ONE of the `density`, `mass` and `massProperties` options.",rr={sensor:(e,t)=>{e.setSensor(t)},collisionGroups:(e,t)=>{e.setCollisionGroups(t)},solverGroups:(e,t)=>{e.setSolverGroups(t)},friction:(e,t)=>{e.setFriction(t)},frictionCombineRule:(e,t)=>{e.setFrictionCombineRule(t)},restitution:(e,t)=>{e.setRestitution(t)},restitutionCombineRule:(e,t)=>{e.setRestitutionCombineRule(t)},activeCollisionTypes:(e,t)=>{e.setActiveCollisionTypes(t)},contactSkin:(e,t)=>{e.setContactSkin(t)},quaternion:()=>{},position:()=>{},rotation:()=>{},scale:()=>{}},ra=Object.keys(rr),ri={cuboid:"cuboid",ball:"ball",hull:"convexHull",trimesh:"trimesh"},rn=e=>({collision:!!(null!=e&&e.onCollisionEnter||null!=e&&e.onCollisionExit||null!=e&&e.onIntersectionEnter||null!=e&&e.onIntersectionExit),contactForce:!!(null!=e&&e.onContactForce)}),rs=()=>{let e=(0,s.useContext)(ru);if(!e)throw Error("react-three-rapier: useRapier must be used within <Physics />!");return e},ro=(e,t,r=!0)=>{let[a,n]=(0,s.useState)([]);return(0,s.useEffect)(()=>{e.current&&!1!==t.colliders&&n((({object:e,ignoreMeshColliders:t=!0,options:r})=>{let a=[];e.updateWorldMatrix(!0,!1);let n=e.matrixWorld.clone().invert(),s=e=>{if("isMesh"in e){let s;if(t&&(s=!1,e.traverseAncestors(e=>{"MeshCollider"===e.userData.r3RapierType&&(s=!0)}),s))return;let o=e.getWorldScale(tJ),l=ri[r.colliders||"cuboid"];e.updateWorldMatrix(!0,!1),tY.copy(e.matrixWorld).premultiply(n).decompose(tQ,tZ,tJ);let u=new i.Euler().setFromQuaternion(tZ,"XYZ"),{geometry:c}=e,{args:d,offset:f}=((e,t)=>{switch(t){case"cuboid":{e.computeBoundingBox();let{boundingBox:t}=e,r=t.getSize(new i.Vector3);return{args:[r.x/2,r.y/2,r.z/2],offset:t.getCenter(new i.Vector3)}}case"ball":{e.computeBoundingSphere();let{boundingSphere:t}=e;return{args:[t.radius],offset:t.center}}case"trimesh":{var r;let t=e.index?e.clone():(0,tq.mergeVertices)(e);return{args:[t.attributes.position.array,null==(r=t.index)?void 0:r.array],offset:new i.Vector3}}case"hull":return{args:[e.clone().attributes.position.array],offset:new i.Vector3}}return{args:[],offset:new i.Vector3}})(c,r.colliders||"cuboid"),h=tH(tH({},((e={})=>t7(e,t9))(r)),{},{args:d,shape:l,rotation:[u.x,u.y,u.z],position:[tQ.x+f.x*o.x,tQ.y+f.y*o.y,tQ.z+f.z*o.z],scale:[o.x,o.y,o.z]});a.push(h)}};return r.includeInvisible?e.traverse(s):e.traverseVisible(s),a})({object:e.current,options:t,ignoreMeshColliders:r}))},[t.colliders]),a},rl=(0,s.memo)(()=>{let{world:e}=rs(),t=(0,s.useRef)(null);return(0,u.useFrame)(()=>{let r=t.current;if(!r)return;let a=e.debugRender(),n=new i.BufferGeometry;n.setAttribute("position",new i.BufferAttribute(a.vertices,3)),n.setAttribute("color",new i.BufferAttribute(a.colors,4)),r.geometry.dispose(),r.geometry=n}),s.default.createElement("group",null,s.default.createElement("lineSegments",{ref:t,frustumCulled:!1},s.default.createElement("lineBasicMaterial",{color:0xffffff,vertexColors:!0}),s.default.createElement("bufferGeometry",null)))}),ru=(0,s.createContext)(void 0),rc=(e,t)=>{var r,a,i,n,s,o;return{target:{rigidBody:e.rigidBody.object,collider:e.collider.object,colliderObject:null==(r=e.collider.state)?void 0:r.object,rigidBodyObject:null==(a=e.rigidBody.state)?void 0:a.object},other:{rigidBody:t.rigidBody.object,collider:t.collider.object,colliderObject:null==(i=t.collider.state)?void 0:i.object,rigidBodyObject:null==(n=t.rigidBody.state)?void 0:n.object},rigidBody:t.rigidBody.object,collider:t.collider.object,colliderObject:null==(s=t.collider.state)?void 0:s.object,rigidBodyObject:null==(o=t.rigidBody.state)?void 0:o.object}},rd=async()=>{let t=await e.A(16354);return await t.init(),t},rf=e=>{let{colliders:t="cuboid",children:r,timeStep:a=1/60,paused:n=!1,interpolate:o=!0,updatePriority:l,updateLoop:u="follow",debug:c=!1,gravity:f=[0,-9.81,0],allowedLinearError:h=.001,predictionDistance:p=.002,numSolverIterations:m=4,numInternalPgsIterations:g=1,minIslandSize:y=128,maxCcdSubsteps:v=1,contactNaturalFrequency:_=30,lengthUnit:w=1}=e,x=(0,tz.suspend)(rd,["@react-thee/rapier",rd]),{invalidate:b}=(0,d.useThree)(),M=t5(()=>new Map),E=t5(()=>new Map),j=t5(()=>new Map),S=t5(()=>new Map),C=t5(()=>new tG.EventQueue(!1)),k=t5(()=>new Set),T=t5(()=>new Set),F=t5(()=>({filterContactPair:(...e)=>{for(let t of k){let r=t.current(...e);if(null!==r)return r}return null},filterIntersectionPair:(...e)=>{for(let t of T)if(!1===t.current(...e))return!1;return!0}})),A=t5(()=>new Set),R=t5(()=>
114new Set),{proxy:P,reset:I,set:N}=t5(()=>{var e;let t;return e=()=>new x.World((e=>{let[t,r,a]=e;return new i.Vector3(t,r,a)})(f)),{proxy:new Proxy({},{get:(r,a)=>(t||(t=e()),Reflect.get(t,a)),set:(r,a,i)=>(t||(t=e()),Reflect.set(t,a,i))}),reset:()=>{t=void 0},set:e=>{t=e}}});(0,s.useEffect)(()=>()=>{P.free(),I()},[]),(0,s.useEffect)(()=>{P.gravity=t0(f),P.integrationParameters.numSolverIterations=m,P.integrationParameters.numInternalPgsIterations=g,P.integrationParameters.normalizedAllowedLinearError=h,P.integrationParameters.minIslandSize=y,P.integrationParameters.maxCcdSubsteps=v,P.integrationParameters.normalizedPredictionDistance=p,P.lengthUnit=w,P.integrationParameters.contact_natural_frequency=_},[P,...f,m,g,h,y,v,p,w,_]);let O=(0,s.useCallback)(e=>{var t;let r=P.getCollider(e),a=S.get(e),i=E.get(e),n=null==r||null==(t=r.parent())?void 0:t.handle,s=void 0!==n?P.getRigidBody(n):void 0,o=s&&void 0!==n?j.get(n):void 0;return{collider:{object:r,events:a,state:i},rigidBody:{object:s,events:o,state:void 0!==n?M.get(n):void 0}}}
114,[]),[D]=(0,s.useState)({previousState:{},accumulator:0}),B=(0,s.useCallback)(e=>{let t="vary"===a,r=i.MathUtils.clamp(e,0,.5),s=e=>{A.forEach(e=>{e.current(P)}),P.timestep=e;let t=k.size>0||T.size>0;P.step(C,t?F:void 0),R.forEach(e=>{e.current(P)})};if(t)s(r);else for(D.accumulator+=r;D.accumulator>=a;)o&&(D.previousState={},P.forEachRigidBody(e=>{D.previousState[e.handle]={position:e.translation(),rotation:e.rotation()}})),s(a),D.accumulator-=a;let l=t||!o||n?1:D.accumulator/a;M.forEach((e,t)=>{let r=P.getRigidBody(t),a=j.get(t);if(null!=a&&a.onSleep||null!=a&&a.onWake){var i,n;r.isSleeping()&&!e.isSleeping&&(null==a||null==(i=a.onSleep)||i.call(a)),!r.isSleeping()&&e.isSleeping&&(null==a||null==(n=a.onWake)||n.call(a)),e.isSleeping=r.isSleeping()}if(!r||r.isSleeping()&&!("isInstancedMesh"in e.object)||!e.setMatrix)return;let s=r.translation(),o=r.rotation(),u=D.previousState[t];u&&(tY.compose(u.position,tK(u.rotation),e.scale).premultiply(e.invertedWorldMatrix).decompose(tQ,tZ,tJ),"mesh"==e.meshType&&(e.object.position.copy(tQ),e.object.quaternion.copy(tZ))),tY.compose(s,tK(o),e.scale).premultiply(e.invertedWorldMatrix).decompose(tQ,tZ,tJ),"instancedMesh"==e.meshType?e.setMatrix(tY):(e.object.position.lerp(tQ,l),e.object.quaternion.slerp(tZ,l))}),C.drainCollisionEvents((e,t,r)=>{var a,i,n,s,o,l,u,c,d,f,h,p,m,g,y,v,_,w,x,b,M,E,j,S;let C=O(e),k=O(t);if(!(null!=C&&C.collider.object)||!(null!=k&&k.collider.object))return;let T=rc(C,k),F=rc(k,C);r?P.contactPair(C.collider.object,k.collider.object,(e,t)=>{var r,a,i,n,s,o,l,u;null==(r=C.rigidBody.events)||null==(a=r.onCollisionEnter)||a.call(r,tH(tH({},T),{},{manifold:e,flipped:t})),null==(i=k.rigidBody.events)||null==(n=i.onCollisionEnter)||n.call(i,tH(tH({},F),{},{manifold:e,flipped:t})),null==(s=C.collider.events)||null==(o=s.onCollisionEnter)||o.call(s,tH(tH({},T),{},{manifold:e,flipped:t})),null==(l=k.collider.events)||null==(u=l.onCollisionEnter)||u.call(l,tH(tH({},F),{},{manifold:e,flipped:t}))}):(null==(a=C.rigidBody.events)||null==(i=a.onCollisionExit)||i.call(a,T),null==(n=k.rigidBody.events)||null==(s=n.onCollisionExit)||s.call(n,F),null==(o=C.collider.events)||null==(l=o.onCollisionExit)||l.call(o,T),null==(u=k.collider.events)||null==(c=u.onCollisionExit)||c.call(u,F)),r?P.intersectionPair(C.collider.object,k.collider.object)&&(null==(d=C.rigidBody.events)||null==(f=d.onIntersectionEnter)||f.call(d,T),null==(h=k.rigidBody.events)||null==(p=h.onIntersectionEnter)||p.call(h,F),null==(m=C.collider.events)||null==(g=m.onIntersectionEnter)||g.call(m,T),null==(y=k.collider.events)||null==(v=y.onIntersectionEnter)||v.call(y,F)):(null==(_=C.rigidBody.events)||null==(w=_.onIntersectionExit)||w.call(_,T),null==(x=k.rigidBody.events)||null==(b=x.onIntersectionExit)||b.call(x,F),null==(M=C.collider.events)||null==(E=M.onIntersectionExit)||E.call(M,T),null==(j=k.collider.events)||null==(S=j.onIntersectionExit)||S.call(j,F))}),C.drainContactForceEvents(e=>{var t,r,a,i,n,s,o,l;let u=O(e.collider1()),c=O(e.collider2());if(!(null!=u&&u.collider.object)||!(null!=c&&c.collider.object))return;let d=rc(u,c),f=rc(c,u);null==(t=u.rigidBody.events)||null==(r=t.onContactForce)||r.call(t,tH(tH({},d),{},{totalForce:e.totalForce(),totalForceMagnitude:e.totalForceMagnitude(),maxForceDirection:e.maxForceDirection(),maxForceMagnitude:e.maxForceMagnitude()})),null==(a=c.rigidBody.events)||null==(i=a.onContactForce)||i.call(a,tH(tH({},f),{},{totalForce:e.totalForce(),totalForceMagnitude:e.totalForceMagnitude(),maxForceDirection:e.maxForceDirection(),maxForceMagnitude:e.maxForceMagnitude()})),null==(n=u.collider.events)||null==(s=n.onContactForce)||s.call(n,tH(tH({},d),{},{totalForce:e.totalForce(),totalForceMagnitude:e.totalForceMagnitude(),maxForceDirection:e.maxForceDirection(),maxForceMagnitude:e.maxForceMagnitude()})),null==(o=c.collider.events)||null==(l=o.onContactForce)||l.call(o,tH(tH({},f),{},{totalForce:e.totalForce(),totalForceMagnitude:e.totalForceMagnitude(),maxForceDirection:e.maxForceDirection(),maxForceMagnitude:e.maxForceMagnitude()}))}),P.forEachActiveRigidBody(()=>{b()})},[n,a,o,P]),L=(0,s.useMemo)(()=>({rapier:x,world:P,setWorld:e=>{N(e)},physicsOptions:{colliders:t,gravity:f},rigidBodyStates:M,colliderStates:E,rigidBodyEvents:j,colliderEvents:S,beforeStepCallbacks:A,afterStepCallbacks:R,isPaused:n,isDebug:c,step:B,filterContactPairHooks:k,filterIntersectionPairHooks:T}),[n,B,c,t,f]),U=(0,s.useCallback)(e=>{n||B(e)},[n,B]);return s.default.createElement(ru.Provider,{value:L},s.default.createElement(t8,{onStep:U,type:u,updatePriority:l}),c&&s.default.createElement(rl,null),r)};function rh(){return(rh=Object.assign.bind()).apply(null,arguments)}let rp=(e,t=null)=>{let r=(0,s.useRef)(t);return e&&"function"!=typeof e?(e.current||(e.current=r.current),e):r},rm=(e,t,r)=>{let a=(0,s.useRef)(void 0),i=(0,s.useCallback)(()=>(a.current||(a.current=e()),a.current),r);return(0,s.useEffect)(()=>{let e=i();return()=>{t(e),a.current=void 0}},[i]),i},rg=["args","colliders","canSleep"],ry={gravityScale:(e,t)=>
114{e.setGravityScale(t,!0)},additionalSolverIterations(e,t){e.setAdditionalSolverIterations(t)},linearDamping:(e,t)=>{e.setLinearDamping(t)},angularDamping:(e,t)=>{e.setAngularDamping(t)},dominanceGroup:(e,t)=>{e.setDominanceGroup(t)},enabledRotations:(e,[t,r,a])=>{e.setEnabledRotations(t,r,a,!0)},enabledTranslations:(e,[t,r,a])=>{e.setEnabledTranslations(t,r,a,!0)},lockRotations:(e,t)=>{e.lockRotations(t,!0)},lockTranslations:(e,t)=>{e.lockTranslations(t,!0)},angularVelocity:(e,[t,r,a])=>{e.setAngvel({x:t,y:r,z:a},!0)},linearVelocity:(e,[t,r,a])=>{e.setLinvel({x:t,y:r,z:a},!0)},ccd:(e,t)=>{e.enableCcd(t)},softCcdPrediction:(e,t)=>{e.setSoftCcdPrediction(t)},userData:(e,t)=>{e.userData=t},type(e,t){e.setBodyType(t2(t),!0)},position:()=>{},rotation:()=>{},quaternion:()=>{},scale:()=>{}},rv=Object.keys(ry),r_=(0,s.memo)(e=>{let t,{children:r,position:a,rotation:n,quaternion:o,scale:l,name:u}=e,{world:c,colliderEvents:d,colliderStates:f}=rs(),h=rj(),p=rp(e.ref),m=(0,s.useRef)(null),g=rm(()=>{var t;let r,a,n=m.current.getWorldScale((({x:e,y:t,z:r}={x:0,y:0,z:0})=>new i.Vector3(e,t,r))()),s=(t=null==h?void 0:h.getRigidBody,r=((e,t,r)=>{let a=t.slice();if("heightfield"===e){let e=a[3];return e.x*=r.x,e.x*=r.y,e.x*=r.z,a}if("trimesh"===e||"convexHull"===e)return a[0]=((e,t)=>{let r=Array.from(e);for(let a=0;a<e.length/3;a++)r[3*a]*=t.x,r[3*a+1]*=t.y,r[3*a+2]*=t.z;return r})(a[0],r),a;let i=[r.x,r.y,r.z,r.x,r.x];return a.map((e,t)=>i[t]*e)})(e.shape,e.args,n),a=tG.ColliderDesc[e.shape](...r),c.createCollider(a,null==t?void 0:t()));return"function"==typeof e.ref&&e.ref(s),p.current=s,s},e=>{c.getCollider(e.handle)&&c.removeCollider(e,!0)},[...re.flatMap(t=>Array.isArray(e[t])?e[t]:[e[t]]),h]);(0,s.useEffect)(()=>{let e,t=g();return f.set(t.handle,(e=m.current,{collider:t,worldParent:(null==h?void 0:h.ref.current)||void 0,object:e})),()=>{f.delete(t.handle)}},[g]);let y=(0,s.useMemo)(()=>tH(tH({},((e={})=>t7(e,t9))(null==h?void 0:h.options)),e),[e,null==h?void 0:h.options]);return t=(0,s.useMemo)(()=>ra.flatMap(e=>t3(y[e])),[y]),(0,s.useEffect)(()=>{var e,t=g();let r=f.get(t.handle);if(r){let a=r.object.parent.getWorldScale(tX),i=null==(e=r.worldParent)?void 0:e.matrixWorld.clone().invert();r.object.updateWorldMatrix(!0,!1),tY.copy(r.object.matrixWorld),i&&tY.premultiply(i),tY.decompose(tQ,tZ,tJ),t.parent()?(t.setTranslationWrtParent({x:tQ.x*a.x,y:tQ.y*a.y,z:tQ.z*a.z}),t.setRotationWrtParent(tZ)):(t.setTranslation({x:tQ.x*a.x,y:tQ.y*a.y,z:tQ.z*a.z}),t.setRotation(tZ)),ra.forEach(e=>{if(e in y){let r=y[e];rr[e](t,r,y)}}),((e,t)=>{if(void 0!==t.density){if(void 0!==t.mass||void 0!==t.massProperties)throw Error(rt);e.setDensity(t.density);return}if(void 0!==t.mass){if(void 0!==t.massProperties)throw Error(rt);e.setMass(t.mass);return}void 0!==t.massProperties&&e.setMassProperties(t.massProperties.mass,t.massProperties.centerOfMass,t.massProperties.principalAngularInertia,t.massProperties.angularInertiaLocalFrame)})(t,y)}},[...t,g]),((e,t,r,a={})=>{let{onCollisionEnter:i,onCollisionExit:n,onIntersectionEnter:o,onIntersectionExit:l,onContactForce:u}=t;(0,s.useEffect)(()=>{let s=e();if(s){let{collision:e,contactForce:c}=rn(t),d=e||a.collision,f=c||a.contactForce;d&&f?s.setActiveEvents(tG.ActiveEvents.COLLISION_EVENTS|tG.ActiveEvents.CONTACT_FORCE_EVENTS):d?s.setActiveEvents(tG.ActiveEvents.COLLISION_EVENTS):f&&s.setActiveEvents(tG.ActiveEvents.CONTACT_FORCE_EVENTS),r.set(s.handle,{onCollisionEnter:i,onCollisionExit:n,onIntersectionEnter:o,onIntersectionExit:l,onContactForce:u})}return()=>{s&&r.delete(s.handle)}},[i,n,o,l,u,a])})(g,y,d,rn(null==h?void 0:h.options)),s.default.createElement("object3D",{position:a,rotation:n,quaternion:o,scale:l,ref:m,name:u},r)}),rw=s.default.forwardRef((e,t)=>s.default.createElement(r_,rh({},e,{shape:"cuboid",ref:t})));rw.displayName="CuboidCollider",s.default.forwardRef((e,t)=>s.default.createElement(r_,rh({},e,{shape:"roundCuboid",ref:t}))).displayName="RoundCuboidCollider";let rx=s.default.forwardRef((e,t)=>s.default.createElement(r_,rh({},e,{shape:"ball",ref:t})));rx.displayName="BallCollider",s.default.forwardRef((e,t)=>
114s.default.createElement(r_,rh({},e,{shape:"capsule",ref:t}))).displayName="CapsuleCollider",s.default.forwardRef((e,t)=>s.default.createElement(r_,rh({},e,{shape:"heightfield",ref:t}))).displayName="HeightfieldCollider",s.default.forwardRef((e,t)=>s.default.createElement(r_,rh({},e,{shape:"trimesh",ref:t}))).displayName="TrimeshCollider",s.default.forwardRef((e,t)=>s.default.createElement(r_,rh({},e,{shape:"cone",ref:t}))).displayName="ConeCollider",s.default.forwardRef((e,t)=>s.default.createElement(r_,rh({},e,{shape:"roundCone",ref:t}))).displayName="RoundConeCollider";let rb=s.default.forwardRef((e,t)=>s.default.createElement(r_,rh({},e,{shape:"cylinder",ref:t})));rb.displayName="CylinderCollider",rb.displayName="RoundCylinderCollider",s.default.forwardRef((e,t)=>s.default.createElement(r_,rh({},e,{shape:"convexHull",ref:t}))).displayName="ConvexHullCollider";let rM=["ref","children","type","position","rotation","scale","quaternion","transformState"],rE=(0,s.createContext)(void 0),rj=()=>(0,s.useContext)(rE),rS=(0,s.memo)(e=>{let{ref:t,children:r,type:a,position:i,rotation:n,scale:o,quaternion:l,transformState:u}
114=e,c=t7(e,rM),d=(0,s.useRef)(null),f=rp(t),{world:h,rigidBodyStates:p,physicsOptions:m,rigidBodyEvents:g}=rs(),y=(0,s.useMemo)(()=>tH(tH(tH({},m),e),{},{children:void 0}),[m,e]),v=rg.flatMap(e=>Array.isArray(y[e])?[...y[e]]:y[e]),_=ro(d,y),w=rm(()=>{var e;let r,a,i=(r=t2((null==y?void 0:y.type)||"dynamic"),(a=new tG.RigidBodyDesc(r)).canSleep=null==(e=null==y?void 0:y.canSleep)||e,a),n=h.createRigidBody(i);return"function"==typeof t&&t(n),f.current=n,n},e=>{h.getRigidBody(e.handle)&&h.removeRigidBody(e)},v);(0,s.useEffect)(()=>{let t=w(),r=(({rigidBody:e,object:t,setMatrix:r,getMatrix:a,worldScale:i,meshType:n="mesh"})=>{t.updateWorldMatrix(!0,!1);let s=t.parent.matrixWorld.clone().invert();return{object:t,rigidBody:e,invertedWorldMatrix:s,setMatrix:r||(e=>{t.matrix.copy(e)}),getMatrix:a||(e=>e.copy(t.matrix)),scale:i||t.getWorldScale(tJ).clone(),isSleeping:!1,meshType:n}})({rigidBody:t,object:d.current});return p.set(t.handle,e.transformState?e.transformState(r):r),()=>{p.delete(t.handle)}},[w]),((e,t,r,a=!0)=>{let i=(0,s.useMemo)(()=>rv.flatMap(e=>t3(t[e])),[t]);(0,s.useEffect)(()=>{((e,t,r,a=!0)=>{if(!e)return;let i=r.get(e.handle);i&&(a&&(i.object.updateWorldMatrix(!0,!1),tY.copy(i.object.matrixWorld).decompose(tQ,tZ,tJ),e.setTranslation(tQ,!1),e.setRotation(tZ,!1)),rv.forEach(r=>{r in t&&ry[r](e,t[r])}))})(e(),t,r,a)},i)})(w,y,p),((e,t,r)=>{let{onWake:a,onSleep:i,onCollisionEnter:n,onCollisionExit:o,onIntersectionEnter:l,onIntersectionExit:u,onContactForce:c}=t,d={onWake:a,onSleep:i,onCollisionEnter:n,onCollisionExit:o,onIntersectionEnter:l,onIntersectionExit:u,onContactForce:c};(0,s.useEffect)(()=>{let t=e();return r.set(t.handle,d),()=>{r.delete(t.handle)}},[a,i,n,o,l,u,c])})(w,y,g);let x=(0,s.useMemo)(()=>({ref:d,getRigidBody:w,options:y}),[w]);return s.default.createElement(rE.Provider,{value:x},s.default.createElement("object3D",rh({ref:d},c,{position:i,rotation:n,quaternion:l,scale:o}),r,_.map((e,t)=>s.default.createElement(r_,rh({key:t},e)))))});rS.displayName="RigidBody",(0,s.memo)(e=>{let{children:t,type:r}=e,{physicsOptions:a}=rs(),i=(0,s.useRef)(null),{options:n}=rj(),o=ro(i,(0,s.useMemo)(()=>tH(tH(tH({},a),n),{},{children:void 0,colliders:r}),[a,n]),!1);return s.default.createElement("object3D",{ref:i,userData:{r3RapierType:"MeshCollider"}},t,o.map((e,t)=>s.default.createElement(r_,rh({key:t},e))))}).displayName="MeshCollider";let rC=["ref"],rk=["children","instances","colliderNodes","position","rotation","quaternion","scale"];(0,s.memo)(e=>{let{ref:t}=e,r=t7(e,rC),a=rp(t,[]),n=(0,s.useRef)(null),o=(0,s.useRef)(null),{children:l,instances:u,colliderNodes:c=[],position:d,rotation:f,quaternion:h,scale:p}=r,m=t7(r,rk),g=ro(n,tH(tH({},r),{},{children:void 0})),y=()=>{let e=o.current.children[0];if(e&&"isInstancedMesh"in e)return e};return(0,s.useEffect)(()=>{let e=y();e?e.instanceMatrix.setUsage(i.DynamicDrawUsage):console.warn("InstancedRigidBodies expects exactly one child, which must be an InstancedMesh")},[]),s.default.createElement("object3D",rh({ref:n},m,{position:d,rotation:f,quaternion:h,scale:p}),s.default.createElement("object3D",{ref:o},l),null==u?void 0:u.map((e,t)=>s.default.createElement(rS,rh({},m,e,{ref:e=>{a.current[t]=e},transformState:e=>{let r;return(r=y())?tH(tH({},e),{},{getMatrix:e=>(r.getMatrixAt(t,e),e),setMatrix:e=>{r.setMatrixAt(t,e),r.instanceMatrix.needsUpdate=!0},meshType:"instancedMesh"}):e}}),s.default.createElement(s.default.Fragment,null,c.map((e,t)=>s.default.createElement(s.Fragment,{key:t},e)),g.map((e,t)=>s.default.createElement(r_,rh({key:t},e)))))))}).displayName="InstancedRigidBodies";let rT=(e,t,r)=>{let{world:a}=rs(),i=(0,s.useRef)(void 0);return rm(()=>{if(e.current&&t.current){let n=a.createImpulseJoint(r,e.current,t.current,!0);return i.current=n,n}},e=>{e&&(i.current=void 0,a.getImpulseJoint(e.handle)&&a.removeImpulseJoint(e,!0))},[]),i},rF=(e,t,[r,a,i])=>{let{rapier:n}=rs(),s=t0(r),o=t0(a);return rT(e,t,n.JointData.rope(i,s,o))};var rA=i,rR=Object.defineProperty,rP=(e,t,r)=>{let a;return(a="symbol"!=typeof t?t+"":t)in e?rR(e,a,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[a]=r,r};function rI(e,t,r,a,i){let n;if(e=e.subarray||e.slice?e:e.buffer,r=r.subarray||r.slice?r:r.buffer,e=t?e.subarray?e.subarray(t,i&&t+i):e.slice(t,i&&t+i):e,r.set)r.set(e,a);else for(n=0;n<e.length;n++)r[n+a]=e[n];return r}class rN extends rA.BufferGeometry{constructor(){super(),rP(this,"type","MeshLine"),rP(this,"isMeshLine",!0),rP(this,"positions",[]),rP(this,"previous",[]),rP(this,"next",[]),rP(this,"side",[]),rP(this,"width",[]),rP(this,"indices_array",[]),rP(this,"uvs",[]),rP(this,"counters",[]),rP(this,"widthCallback",null),rP(this,"_attributes"),rP(this,"_points",[]),rP(this,"points"),rP(this,"matrixWorld",new rA.Matrix4),Object.defineProperties(this,{points:{enumerable:!0,get(){return this._points},set(e){this.setPoints(e,this.widthCallback)}}})}setMatrixWorld(e){this.matrixWorld=e}setPoints(e,t){var r;if(e=(r=e)instanceof Float32Array?r:r instanceof rA.BufferGeometry?r.getAttribute("position").array:r.map(e=>{let t=Array.isArray(e);return e instanceof rA.Vector3?[e.x,e.y,e.z]:e instanceof rA.Vector2?[e.x,e.y,0]:t&&3===e.length?[e[0],e[1],e[2]]:t&&2===e.length?[e[0],e[1],0]:e}).flat(),this._points=e,this.widthCallback=null!=t?t:null,this.positions=[],this.counters=[],e.length&&e[0]instanceof rA.Vector3)for(let t=0;t<e.length;t++){let r=e[t],a=t/(e.length-1);this.positions.push(r.x,r.y,r.z),this.positions.push(r.x,r.y,r.z),this.counters.push(a),this.counters.push(a)}else for(let t=0;t<e.length;t+=3){let r=t/(e.length-1);this.positions.push(e[t],e[t+1],e[t+2]),this.positions.push(e[t],e[t+1],e[t+2]),this.counters.push(r),this.counters.push(r)}this.process()}compareV3(e,t){let r=6*e,a=6*t;return this.positions[r]===this.positions[a]&&this.positions[r+1]===this.positions[a+1]&&this.positions[r+2]===this.positions[a+2]}copyV3(e){let t=6*e;return[this.positions[t],this.positions[t+1],this.positions[t+2]]}process(){let e,t,r=this.positions.length/6;this.previous=[],this.next=[],this.side=[],this.width=[],this.indices_array=[],this.uvs=[],t=this.compareV3(0,r-1)?this.copyV3(r-2):this.copyV3(0),this.previous.push(t[0],t[1],t[2]),this.previous.push(t[0],t[1],t[2]);for(let a=0;a<r;a++){if(this.side.push(1),this.side.push(-1),e=this.widthCallback?this.widthCallback(a/(r-1)):1,this.width.push(e),this.width.push(e),this.uvs.push(a/(r-1),0),this.uvs.push(a/(r-1),1),a<r-1){t=this.copyV3(a),this.previous.push(t[0],t[1],t[2]),this.previous.push(t[0],t[1],t[2]);let e=2*a;this.indices_array.push(e,e+1,e+2),this.indices_array.push(e+2,e+1,e+3)}a>0&&(t=this.copyV3(a),this.next.push(t[0],t[1],t[2]),this.next.push(t[0],t[1],t[2]))}t=this.compareV3(r-1,0)?this.copyV3(1):this.copyV3(r-1),this.next.push(t[0],t[1],t[2]),this.next.push(t[0],t[1],t[2]),this._attributes&&this._attributes.position.count===this.counters.length?(this._attributes.position.copyArray(new Float32Array(this.positions)),this._attributes.position.needsUpdate=!0,this._attributes.previous.copyArray(new Float32Array(this.previous)),this._attributes.previous.needsUpdate=!0,this._attributes.next.copyArray(new Float32Array(this.next)),this._attributes.next.needsUpdate=!0,this._attributes.side.copyArray(new Float32Array(this.side)),this._attributes.side.needsUpdate=!0,this._attributes.width.copyArray(new Float32Array(this.width)),this._attributes.width.needsUpdate=!0,this._attributes.uv.copyArray(new Float32Array(this.uvs)),this._attributes.uv.needsUpdate=!0,this._attributes.index.copyArray(new Uint16Array(this.indices_array)),this._attributes.index.needsUpdate=!0):this._attributes={position:new rA.BufferAttribute(new Float32Array(this.positions),3),previous:new rA.BufferAttribute(new Float32Array(this.previous),3),next:new rA.BufferAttribute(new Float32Array(this.next),3),side:new rA.BufferAttribute(new Float32Array(this.side),1),width:new rA.BufferAttribute(new Float32Array(this.width),1),uv:new rA.BufferAttribute(new Float32Array(this.uvs),2),index:new rA.BufferAttribute(new Uint16Array(this.indices_array),1),counters:new rA.BufferAttribute(new Float32Array(this.counters),1)},this.setAttribute("position",this._attributes.position),this.setAttribute("previous",this._attributes.previous),this.setAttribute("next",this._attributes.next),this.setAttribute("side",this._attributes.side),this.setAttribute("width",this._attributes.width),this.setAttribute("uv",this._attributes.uv),this.setAttribute("counters",this._attributes.counters),this.setAttribute("position",this._attributes.position),this.setAttribute("previous",this._attributes.previous),this.setAttribute("next",this._attributes.next),this.setAttribute("side",this._attributes.side),this.setAttribute("width",this._attributes.width),this.setAttribute("uv",this._attributes.uv),this.setAttribute("counters",this._attributes.counters),this.setIndex(this._attributes.index),this.computeBoundingSphere(),this.computeBoundingBox()}advance({x:e,y:t,z:r}){let a=this._attributes.position.array,i=this._attributes.previous.array,n=this._attributes.next.array,s=a.length;rI(a,0,i,0,s),rI(a,6,a,0,s-6),a[s-6]=e,a[s-5]=t,a[s-4]=r,a[s-3]=e,a[s-2]=t,a[s-1]=r,rI(a,6,n,0,s-6),n[s-6]=e,n[s-5]=t,n[s-4]=r,n[s-3]=e,n[s-2]=t,n[s-1]=r,this._attributes.position.needsUpdate=!0,this._attributes.previous.needsUpdate=!0,this._attributes.next.needsUpdate=!0}}let rO=`
115  #include <common>
116  #include <logdepthbuf_pars_vertex>
117  #include <fog_pars_vertex>
118  #include <clipping_planes_pars_vertex>
119
120  attribute vec3 previous;
121  attribute vec3 next;
122  attribute float side;
123  attribute float width;
124  attribute float counters;
125  
126  uniform vec2 resolution;
127  uniform float lineWidth;
128  uniform vec3 color;
129  uniform float opacity;
130  uniform float sizeAttenuation;
131  
132  varying vec2 vUV;
133  varying vec4 vColor;
134  varying float vCounters;
135  
136  vec2 fix(vec4 i, float aspect) {
137    vec2 res = i.xy / i.w;
138    res.x *= aspect;
139    return res;
140  }
141  
142  void main() {
143    float aspect = resolution.x / resolution.y;
144    vColor = vec4(color, opacity);
145    vUV = uv;
146    vCounters = counters;
147  
148    mat4 m = projectionMatrix * modelViewMatrix;
149    vec4 finalPosition = m * vec4(position, 1.0) * aspect;
150    vec4 prevPos = m * vec4(previous, 1.0);
151    vec4 nextPos = m * vec4(next, 1.0);
152  
153    vec2 currentP = fix(finalPosition, aspect);
154    vec2 prevP = fix(prevPos, aspect);
155    vec2 nextP = fix(nextPos, aspect);
156  
157    float w = lineWidth * width;
158  
159    vec2 dir;
160    if (nextP == currentP) dir = normalize(currentP - prevP);
161    else if (prevP == currentP) dir = normalize(nextP - currentP);
162    else {
163      vec2 dir1 = normalize(currentP - prevP);
164      vec2 dir2 = normalize(nextP - currentP);
165      dir = normalize(dir1 + dir2);
166  
167      vec2 perp = vec2(-dir1.y, dir1.x);
168      vec2 miter = vec2(-dir.y, dir.x);
169      //w = clamp(w / dot(miter, perp), 0., 4. * lineWidth * width);
170    }
171  
172    //vec2 normal = (cross(vec3(dir, 0.), vec3(0., 0., 1.))).xy;
173    vec4 normal = vec4(-dir.y, dir.x, 0., 1.);
174    normal.xy *= .5 * w;
175    //normal *= projectionMatrix;
176    if (sizeAttenuation == 0.) {
177      normal.xy *= finalPosition.w;
178      normal.xy /= (vec4(resolution, 0., 1.) * projectionMatrix).xy * aspect;
179    }
180  
181    finalPosition.xy += normal.xy * side;
182    gl_Position = finalPosition;
183    #include <logdepthbuf_vertex>
184    #include <fog_vertex>
185    vec4 mvPosition = modelViewMatrix * vec4(position, 1.0);
186    #include <clipping_planes_vertex>
187    #include <fog_vertex>
188  }
189`,rD=parseInt(rA.REVISION.replace(/\D+/g,"")),rB=`
190  #include <fog_pars_fragment>
191  #include <logdepthbuf_pars_fragment>
192  #include <clipping_planes_pars_fragment>
193  
194  uniform sampler2D map;
195  uniform sampler2D alphaMap;
196  uniform float useGradient;
197  uniform float useMap;
198  uniform float useAlphaMap;
199  uniform float useDash;
200  uniform float dashArray;
201  uniform float dashOffset;
202  uniform float dashRatio;
203  uniform float visibility;
204  uniform float alphaTest;
205  uniform vec2 repeat;
206  uniform vec3 gradient[2];
207  
208  varying vec2 vUV;
209  varying vec4 vColor;
210  varying float vCounters;
211  
212  void main() {
213    #include <logdepthbuf_fragment>
214    vec4 diffuseColor = vColor;
215    if (useGradient == 1.) diffuseColor = vec4(mix(gradient[0], gradient[1], vCounters), 1.0);
216    if (useMap == 1.) diffuseColor *= texture2D(map, vUV * repeat);
217    if (useAlphaMap == 1.) diffuseColor.a *= texture2D(alphaMap, vUV * repeat).a;
218    if (diffuseColor.a < alphaTest) discard;
219    if (useDash == 1.) diffuseColor.a *= ceil(mod(vCounters + dashOffset, dashArray) - (dashArray * dashRatio));
220    diffuseColor.a *= step(vCounters, visibility);
221    #include <clipping_planes_fragment>
222    gl_FragColor = diffuseColor;     
223    #include <fog_fragment>
224    #include <tonemapping_fragment>
225    #include <${rD>=154?"colorspace_fragment":"encodings_fragment"}>
226  }
227`;class rL extends rA.ShaderMaterial{constructor(e){super({uniforms:{...tl.UniformsLib.fog,lineWidth:{value:1},map:{value:null},useMap:{value:0},alphaMap:{value:null},useAlphaMap:{value:0},color:{value:new rA.Color(0xffffff)},gradient:{value:[new rA.Color(0xff0000),new rA.Color(65280)]},opacity:{value:1},resolution:{value:new rA.Vector2(1,1)},sizeAttenuation:{value:1},dashArray:{value:0},dashOffset:{value:0},dashRatio:{value:.5},useDash:{value:0},useGradient:{value:0},visibility:{value:1},alphaTest:{value:0},repeat:{value:new rA.Vector2(1,1)}},vertexShader:rO,fragmentShader:rB}),rP(this,"lineWidth"),rP(this,"map"),rP(this,"useMap"),rP(this,"alphaMap"),rP(this,"useAlphaMap"),rP(this,"color"),rP(this,"gradient"),rP(this,"resolution"),rP(this,"sizeAttenuation"),rP(this,"dashArray"),rP(this,"dashOffset"),rP(this,"dashRatio"),rP(this,"useDash"),rP(this,"useGradient"),rP(this,"visibility"),rP(this,"repeat"),this.type="MeshLineMaterial",Object.defineProperties(this,{lineWidth:{enumerable:!0,get(){return this.uniforms.lineWidth.value},set(e){this.uniforms.lineWidth.value=e}},map:{enumerable:!0,get(){return this.uniforms.map.value},set(e){this.uniforms.map.value=e}},useMap:{enumerable:!0,get(){return this.uniforms.useMap.value},set(e){this.uniforms.useMap.value=e}},alphaMap:{enumerable:!0,get(){return this.uniforms.alphaMap.value},set(e){this.uniforms.alphaMap.value=e}},useAlphaMap:{enumerable:!0,get(){return this.uniforms.useAlphaMap.value},set(e){this.uniforms.useAlphaMap.value=e}},color:{enumerable:!0,get(){return this.uniforms.color.value},set(e){this.uniforms.color.value=e}},gradient:{enumerable:!0,get(){return this.uniforms.gradient.value},set(e){this.uniforms.gradient.value=e}},opacity:{enumerable:!0,get(){return this.uniforms.opacity.value},set(e){this.uniforms.opacity.value=e}},resolution:{enumerable:!0,get(){return this.uniforms.resolution.value},set(e){this.uniforms.resolution.value.copy(e)}},sizeAttenuation:{enumerable:!0,get(){return this.uniforms.sizeAttenuation.value},set(e){this.uniforms.sizeAttenuation.value=e}},dashArray:{enumerable:!0,get(){return this.uniforms.dashArray.value},set(e){this.uniforms.dashArray.value=e,this.useDash=+(0!==e)}},dashOffset:{enumerable:!0,get(){return this.uniforms.dashOffset.value},set(e){this.uniforms.dashOffset.value=e}},dashRatio:{enumerable:!0,get(){return this.uniforms.dashRatio.value},set(e){this.uniforms.dashRatio.value=e}},useDash:{enumerable:!0,get(){return this.uniforms.useDash.value},set(e){this.uniforms.useDash.value=e}},useGradient:{enumerable:!0,get(){return this.uniforms.useGradient.value},set(e){this.uniforms.useGradient.value=e}},visibility:{enumerable:!0,get(){return this.uniforms.visibility.value},set(e){this.uniforms.visibility.value=e}},alphaTest:{enumerable:!0,get(){return this.uniforms.alphaTest.value},set(e){this.uniforms.alphaTest.value=e}},repeat:{enumerable:!0,get(){return this.uniforms.repeat.value},set(e){this.uniforms.repeat.value.copy(e)}}}),this.setValues(e)}copy(e){return super.copy(e),this.lineWidth=e.lineWidth,this.map=e.map,this.useMap=e.useMap,this.alphaMap=e.alphaMap,this.useAlphaMap=e.useAlphaMap,this.color.copy(e.color),this.gradient=e.gradient,this.opacity=e.opacity,this.resolution.copy(e.resolution),this.sizeAttenuation=e.sizeAttenuation,this.dashArray=e.dashArray,this.dashOffset=e.dashOffset,this.dashRatio=e.dashRatio,this.useDash=e.useDash,this.useGradient=e.useGradient,this.visibility=e.visibility,this.alphaTest=e.alphaTest,this.repeat.copy(e.repeat),this}}function rU({position:e=[0,0,30],gravity:t=[0,-40,0],fov:l,transparent:u=!0}
227){let[c,d]=(0,s.useState)(()=>window.innerWidth),f=(0,n.useLoaderReady)();(0,s.useEffect)(()=>{let e=()=>d(window.innerWidth);return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]);let h=c<768,p=l??(c<=500?32:c<=1e3?28:c<=1500?24:c<=2e3?21:20);return f?(0,r.jsx)("div",{className:a.default.lanyardWrapper,children:(0,r.jsxs)(o.Canvas,{camera:{position:e,fov:p},dpr:[1,h?1.5:2],gl:{alpha:u},onCreated:({gl:e})=>e.setClearColor(new i.Color(0),+!u),children:[(0,r.jsx)("ambientLight",{intensity:Math.PI}),(0,r.jsx)(rf,{gravity:t,timeStep:h?1/30:1/60,children:(0,r.jsx)(rW,{isMobile:h,ready:f})}),(0,r.jsxs)(tU,{blur:.75,children:[(0,r.jsx)(tW,{intensity:2,color:"white",position:[0,-1,5],rotation:[0,0,Math.PI/3],scale:[100,.1,1]}),(0,r.jsx)(tW,{intensity:3,color:"white",position:[-1,-1,1],rotation:[0,0,Math.PI/3],scale:[100,.1,1]}),(0,r.jsx)(tW,{intensity:3,color:"white",position:[1,1,1],rotation:[0,0,Math.PI/3],scale:[100,.1,1]}),(0,r.jsx)(tW,{intensity:10,color:"white",position:[-10,0,14],rotation:[0,Math.PI/2,Math.PI/3],scale:[100,10,1]})]})]})}):(0,r.jsx)("div",{className:a.default.lanyardWrapper})}function rW({maxSpeed:e=50,minSpeed:t=0,isMobile:a=!1,ready:n=!1}){let o=(0,s.useRef)(null),l=(0,s.useRef)(null),d=(0,s.useRef)(null),f=(0,s.useRef)(null),h=(0,s.useRef)(null),m=(0,s.useRef)(null),g=(0,s.useMemo)(()=>new i.Vector3,[]),y=(0,s.useMemo)(()=>new i.Vector3,[]),v=(0,s.useMemo)(()=>new i.Vector3,[]),_=(0,s.useMemo)(()=>new i.Vector3,[]),w=(0,s.useMemo)(()=>({canSleep:!0,colliders:!1,angularDamping:4,linearDamping:4}),[]),{nodes:x,materials:b}=(0,c.useGLTF)("/models/Card.glb"),M=p("/images/brand/Lanyard.webp",e=>{e.wrapS=e.wrapT=i.RepeatWrapping}),[E]=(0,s.useState)(()=>new i.CatmullRomCurve3([new i.Vector3,new i.Vector3,new i.Vector3,new i.Vector3],!1,"chordal")),[j,S]=(0,s.useState)(!1),[C,k]=(0,s.useState)(!1);return rF(l,d,[[0,0,0],[0,0,0],1]),rF(d,f,[[0,0,0],[0,0,0],1]),rF(f,h,[[0,0,0],[0,0,0],1]),((e,t,[r,a])=>{let{rapier:i}=rs();return rT(e,t,i.JointData.spherical(t0(r),t0(a)))})(h,m,[[0,0,0],[0,1.49,0]]),(0,s.useEffect)(()=>{if(C)return document.body.style.cursor=j?"grabbing":"grab",()=>{document.body.style.cursor="auto"}},[C,j]),(0,u.useFrame)((r,s)=>{if(n&&(j instanceof i.Vector3&&(g.set(r.pointer.x,r.pointer.y,.5).unproject(r.camera),_.copy(g).sub(r.camera.position).normalize(),g.add(_.multiplyScalar(r.camera.position.length())),[m,d,f,h,l].forEach(e=>e.current?.wakeUp()),m.current?.setNextKinematicTranslation({x:g.x-j.x,y:g.y-j.y,z:g.z-j.z})),l.current)&&([d,f].forEach(r=>{if(!r.current)return;r.current.lerped||(r.current.lerped=new i.Vector3().copy(r.current.translation()));let a=Math.max(.1,Math.min(1,r.current.lerped.distanceTo(r.current.translation())));r.current.lerped.lerp(r.current.translation(),s*(t+a*(e-t)))}),h.current&&f.current?.lerped&&d.current?.lerped&&(E.points[0].copy(h.current.translation()),E.points[1].copy(f.current.lerped),E.points[2].copy(d.current.lerped),E.points[3].copy(l.current.translation())),o.current&&o.current.geometry.setPoints(E.getPoints(a?16:32)),m.current)){let e=m.current.angvel(),t=m.current.rotation();y.set(e.x,e.y,e.z),v.set(t.x,t.y,t.z),m.current.setAngvel({x:y.x,y:y.y-.25*v.y,z:y.z},!0)}}),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("group",{position:[0,4,0],children:[(0,r.jsx)(rS,{ref:l,...w,type:"fixed"}),(0,r.jsx)(rS,{ref:d,...w,type:"dynamic",position:[.5,0,0],children:(0,r.jsx)(rx,{args:[.1]})}),(0,r.jsx)(rS,{ref:f,...w,type:"dynamic",position:[1,0,0],children:(0,r.jsx)(rx,{args:[.1]})}),(0,r.jsx)(rS,{ref:h,...w,type:"dynamic",position:[1.5,0,0],children:(0,r.jsx)(rx,{args:[.1]})}),(0,r.jsxs)(rS,{ref:m,...w,type:j?"kinematicPosition":"dynamic",position:[2,0,0],children:[(0,r.jsx)(rw,{args:[.8,1.125,.01]}),(0,r.jsxs)("group",{scale:2.25,position:[0,-1.2,-.05],onPointerOver:()=>k(!0),onPointerOut:()=>k(!1),onPointerUp:e=>{e.target.releasePointerCapture(e.pointerId),S(!1)},onPointerDown:e=>{e.target.setPointerCapture(e.pointerId),m.current&&S(new i.Vector3().copy(e.point).sub(g.copy(m.current.translation())))},children:[(0,r.jsx)("mesh",{geometry:x.card.geometry,children:(0,r.jsx)("meshPhysicalMaterial",{map:b.base.map,"map-anisotropy":16,clearcoat:+!a,clearcoatRoughness:.15,roughness:.9,metalness:.8})}),(0,r.jsx)("mesh",{geometry:x.clip.geometry,material:b.metal,"material-roughness":.3}),(0,r.jsx)("mesh",{geometry:x.clamp.geometry,material:b.metal})]})]})]}),(0,r.jsxs)("mesh",{ref:o,children:[(0,r.jsx)("meshLineGeometry",{}),(0,r.jsx)("meshLineMaterial",{color:"white",depthTest:!1,resolution:a?[1e3,2e3]:[1e3,1e3],useMap:!0,map:M,repeat:[-4.6,1],lineWidth:.4})]})]})}(0,l.e)({MeshLineGeometry:rN,MeshLineMaterial:rL}),e.s(["default",()=>rU],2501)},73939,e=>{e.v({arrowLink:"style-module-scss-module__i0_1Ga__arrowLink",bottomContent:"style-module-scss-module__i0_1Ga__bottomContent",content:"style-module-scss-module__i0_1Ga__content",dirtyLetter:"style-module-scss-module__i0_1Ga__dirtyLetter",dot:"style-module-scss-module__i0_1Ga__dot",heading:"style-module-scss-module__i0_1Ga__heading",headingWrapper:"style-module-scss-module__i0_1Ga__headingWrapper",highlight:"style-module-scss-module__i0_1Ga__highlight",line:"style-module-scss-module__i0_1Ga__line",lineMask:"style-module-scss-module__i0_1Ga__lineMask",lineOne:"style-module-scss-module__i0_1Ga__lineOne",lineTwo:"style-module-scss-module__i0_1Ga__lineTwo",mouse:"style-module-scss-module__i0_1Ga__mouse",mouseWrapper:"style-module-scss-module__i0_1Ga__mouseWrapper",statLine:"style-module-scss-module__i0_1Ga__statLine",statMask:"style-module-scss-module__i0_1Ga__statMask",statsBar:"style-module-scss-module__i0_1Ga__statsBar",text:"style-module-scss-module__i0_1Ga__text",textLine:"style-module-scss-module__i0_1Ga__textLine",textLineMask:"style-module-scss-module__i0_1Ga__textLineMask",texts:"style-module-scss-module__i0_1Ga__texts",topWrapper:"style-module-scss-module__i0_1Ga__topWrapper",underline:"style-module-scss-module__i0_1Ga__underline",video:"style-module-scss-module__i0_1Ga__video",videoContainer:"style-module-scss-module__i0_1Ga__videoContainer",videoDescription:"style-module-scss-module__i0_1Ga__videoDescription",videoDescriptionMask:"style-module-scss-module__i0_1Ga__videoDescriptionMask",videoExpandedPlaceholder:"style-module-scss-module__i0_1Ga__videoExpandedPlaceholder",videoMobile:"style-module-scss-module__i0_1Ga__videoMobile",videoPlaceholder:"style-module-scss-module__i0_1Ga__videoPlaceholder",videoScrollSection:"style-module-scss-module__i0_1Ga__videoScrollSection",word:"style-module-scss-module__i0_1Ga__word",wordWrapper:"style-module-scss-module__i0_1Ga__wordWrapper"})},99617,e=>{"use strict";var t=e.i(43476),r=e.i(73939),a=e.i(55160),i=e.i(13706),n=e.i(20860),s=e.i(46930),o=e.i(99578),l=e.i(71645),u=e.i(83495),c=e.i(65747),d=e.i(46932),f=e.i(89970);f.default.registerPlugin(u.ScrollTrigger);let h={initial:{y:"140%"},animate:{y:"0",transition:{duration:.9,ease:n.defaultEase,delay:n.pageTransitionDelay}}},p={initial:{scaleX:0},animate:{scaleX:1,transition:{duration:.7,ease:n.defaultEase,delay:n.pageTransitionDelay}}};function m({isLoaded:e,width:a}){return(0,t.jsxs)("div",{className:r.default.statsBar,style:a?{width:a}:void 0,children:[(0,t.jsx)("div",{className:r.default.statMask,children:(0,t.jsx)(d.motion.p,{variants:h,initial:"initial",animate:e?"animate":"",children:"Creative Vision"})}),(0,t.jsx)(d.motion.span,{className:r.default.statLine,variants:p,initial:"initial",animate:e?"animate":""}),(0,t.jsx)("div",{className:r.default.statMask,children:(0,t.jsx)(d.motion.p,{variants:h,initial:"initial",animate:e?"animate":"",children:"No Limits"})})]})}function g(){let e=(0,s.useLoaderReady)(),h=(0,o.useIsMobile)(1e3),p=(0,l.useRef)(null),g=(0,l.useRef)(null),y=(0,l.useRef)(null),v=(0,l.useRef)(null),_=(0,l.useRef)(null),w=(0,l.useRef)(null),x=(0,l.useRef)(null),[b,M]=(0,l.useState)(null);return(0,l.useEffect)(()=>{let e=()=>{x.current&&M(x.current.offsetWidth)};e();let t=new ResizeObserver(e);return x.current&&t.observe(x.current),()=>t.disconnect()},[]),(0,c.useGSAP)(()=>{let e=p.current?.querySelector(`.${r.default.texts}`),t=p.current?.querySelectorAll(`.${r.default.textLine}`);if(t&&t.length>0){f.default.set(t,{y:"120%"});let r=f.default.timeline({paused:!0});r.to(t,{y:"0%",duration:.65,ease:"power3.out",stagger:.055}),u.ScrollTrigger.create({trigger:e,start:"top 95%",once:!0,onEnter:()=>r.play()})}let a=p.current?.querySelectorAll(`.${r.default.line}`);if(a&&a.length>0){f.default.set(a,{scaleY:0});let t=f.default.timeline({paused:!0});t.to(a,{scaleY:1,duration:.7,ease:"power3.out",stagger:.1}),u.ScrollTrigger.create({trigger:e,start:"top 95%",once:!0,onEnter:()=>t.play()})}let i=p.current?.querySelector(`.${r.default.videoDescription}`);if(i){f.default.set(i,{y:"-120%"});let e=f.default.timeline({paused:!0});e.to(i,{y:"0%",duration:.75,ease:"power3.out",delay:n.pageTransitionDelay+.7}),u.ScrollTrigger.create({trigger:p.current,start:"top 100%",once:!0,onEnter:()=>e.play()})}let s=g.current?.querySelector(`.${r.default.video}`);
227if(s&&(f.default.set(s,{opacity:0}),u.ScrollTrigger.create({trigger:g.current,start:"top 90%",once:!0,onEnter:()=>{f.default.to(s,{opacity:1,duration:.8,delay:n.pageTransitionDelay+.7,ease:"power2.out"})}})),s){let e=f.default.timeline({scrollTrigger:{trigger:g.current,start:"top 60%",end:"+=36%",scrub:.4,pin:g.current,pinSpacing:!1,invalidateOnRefresh:!0}});e.to(s,{y:52,duration:.3,ease:"power1.out"}),e.to(s,{width:()=>{let e=window.innerWidth;return window.innerWidth-2*(e>=2500?24:e>=1400?18:e>=900?16:12)},height:"70vh",x:()=>{let e=window.innerWidth;return-s.getBoundingClientRect().left+(e>=2500?24:e>=1400?18:e>=900?16:12)},y:0,ease:"none",duration:.7})}let o=p.current?.querySelector(`.${r.default.mouseWrapper}`);if(o){f.default.set(o,{opacity:0,y:10});let t=f.default.timeline({paused:!0});t.to(o,{opacity:1,y:0,duration:.8,ease:"power3.out"}),u.ScrollTrigger.create({trigger:e,start:"top 95%",once:!0,onEnter:()=>t.play()})}},{scope:p,dependencies:[]}),(0,c.useGSAP)(()=>{let e=y.current;if(!e)return;let t={heading:v.current,texts:_.current,arrowLink:w.current},r=()=>{Object.values(t).forEach(e=>e&&f.default.set(e,{y:0}))};h?r():u.ScrollTrigger.create({trigger:e,start:"top bottom",end:"bottom top",scrub:.5,onUpdate:e=>{let r=e.progress;t.heading&&f.default.set(t.heading,{y:-.14*r*220}),t.texts&&f.default.set(t.texts,{y:.18*r*220}),t.arrowLink&&f.default.set(t.arrowLink,{y:.14*r*220})},onLeaveBack:r})},{dependencies:[h]}),(0,t.jsxs)("div",{ref:y,className:r.default.content,children:[(0,t.jsxs)("div",{className:"container",children:[(0,t.jsx)("div",{className:r.default.topWrapper,children:(0,t.jsxs)("div",{ref:v,className:r.default.headingWrapper,children:[(0,t.jsx)(m,{isLoaded:e,width:b}),(0,t.jsxs)("h2",{className:r.default.heading,children:[(0,t.jsx)("div",{className:r.default.lineMask,children:(0,t.jsxs)(d.motion.div,{ref:x,className:r.default.lineOne,initial:{y:"110%"},animate:e?{y:"0%"}:{},transition:{duration:.85,ease:n.defaultEase,delay:n.pageTransitionDelay},children:[(0,t.jsx)("span",{className:r.default.word,children:"B"}),(0,t.jsx)("span",{className:`${r.default.word} ${r.default.dirtyLetter}`,children:"U"}),(0,t.jsx)("span",{className:r.default.word,children:"ILT IN CODE"})]})}),(0,t.jsx)("div",{className:r.default.lineMask,children:(0,t.jsxs)(d.motion.div,{className:r.default.lineTwo,initial:{y:"-110%"},animate:e?{y:"0%"}:{},transition:{duration:.85,ease:n.defaultEase,delay:n.pageTransitionDelay},children:[(0,t.jsx)("span",{className:r.default.word,children:"DESIGNED FOR "}),(0,t.jsxs)("span",{className:r.default.wordWrapper,children:[(0,t.jsxs)("span",{className:`${r.default.word} ${r.default.highlight}`,children:[" ","HUMANS"]}),(0,t.jsx)(d.motion.span,{className:r.default.underline,initial:{scaleX:0},animate:e?{scaleX:1}:{},transition:{duration:.75,ease:n.defaultEase,delay:n.pageTransitionDelay+.7},style:{transformOrigin:"left"}})]})]})})]})]})}),(0,t.jsxs)("div",{ref:p,className:r.default.bottomContent,children:[(0,t.jsxs)("div",{className:r.default.videoContainer,children:[(0,t.jsx)("div",{className:r.default.videoDescriptionMask,children:(0,t.jsx)("p",{className:r.default.videoDescription,children:"( scroll to enter )"})}),(0,t.jsx)("div",{ref:g,className:r.default.videoScrollSection,children:(0,t.jsx)("video",{src:"/videos/chkstepanDesktop4K.mp4",className:r.default.video,autoPlay:!0,muted:!0,loop:!0,playsInline:!0,suppressHydrationWarning:!0})})]}),(0,t.jsx)(d.motion.div,{initial:{opacity:0}
227,animate:e?{opacity:1}:{},transition:{duration:.75,ease:n.defaultEase,delay:n.pageTransitionDelay+.7},children:(0,t.jsx)("video",{src:"/videos/chkstepanDesktop4K.mp4",className:r.default.videoMobile,autoPlay:!0,muted:!0,loop:!0,playsInline:!0,suppressHydrationWarning:!0})}),(0,t.jsx)("div",{className:r.default.mouseWrapper,children:(0,t.jsx)("div",{className:r.default.mouse,children:(0,t.jsx)(d.motion.span,{className:r.default.dot,animate:{y:[0,16],opacity:[0,1,1,0]},transition:{duration:1.4,ease:"easeInOut",repeat:1/0,repeatDelay:.4}})})}),(0,t.jsxs)("div",{ref:_,className:r.default.texts,children:[(0,t.jsxs)("div",{className:r.default.text,children:[(0,t.jsx)("p",{children:["I Create Digital Experiences that Connect","Brands with People"].map((e,a)=>(0,t.jsx)("span",{className:r.default.textLineMask,children:(0,t.jsx)("span",{className:r.default.textLine,children:e})},a))}),(0,t.jsx)("span",{className:r.default.line})]}),(0,t.jsxs)("div",{className:r.default.text,children:[(0,t.jsx)("p",{children:["Independent Front-end Engineer","Based in Romania"].map((e,a)=>(0,t.jsx)("span",{className:r.default.textLineMask,children:(0,t.jsx)("span",{className:r.default.textLine,children:e})},a))}),(0,t.jsx)("span",{className:r.default.line})]})]})]})]}),(0,t.jsx)("div",{className:r.default.videoExpandedPlaceholder}),(0,t.jsx)("div",{ref:w,className:r.default.arrowLink,children:(0,t.jsx)(a.default,{href:i.PagesConfig.projects,text:"More works",variant:"white",animated:!1})})]})}e.s(["default",()=>g])},31692,e=>{e.v({animTitle:"style-module-scss-module__FOyjoq__animTitle",animTitleMask:"style-module-scss-module__FOyjoq__animTitleMask",bottom:"style-module-scss-module__FOyjoq__bottom",bottomDescriptionWrapper:"style-module-scss-module__FOyjoq__bottomDescriptionWrapper",bottomTitle:"style-module-scss-module__FOyjoq__bottomTitle",col:"style-module-scss-module__FOyjoq__col",colNumber:"style-module-scss-module__FOyjoq__colNumber",colNumberMask:"style-module-scss-module__FOyjoq__colNumberMask",colTitle:"style-module-scss-module__FOyjoq__colTitle",colTitleMask:"style-module-scss-module__FOyjoq__colTitleMask",colTitleWrapper:"style-module-scss-module__FOyjoq__colTitleWrapper",content:"style-module-scss-module__FOyjoq__content",dPinkCircle:"style-module-scss-module__FOyjoq__dPinkCircle",descLine:"style-module-scss-module__FOyjoq__descLine",desktopScroll:"style-module-scss-module__FOyjoq__desktopScroll",desktopScrollInner:"style-module-scss-module__FOyjoq__desktopScrollInner",desktopScrollMask:"style-module-scss-module__FOyjoq__desktopScrollMask",lPinkCircle:"style-module-scss-module__FOyjoq__lPinkCircle",line:"style-module-scss-module__FOyjoq__line",lineMask:"style-module-scss-module__FOyjoq__lineMask",mobileScroll:"style-module-scss-module__FOyjoq__mobileScroll",mobileScrollMask:"style-module-scss-module__FOyjoq__mobileScrollMask",numberMask:"style-module-scss-module__FOyjoq__numberMask",overlay:"style-module-scss-module__FOyjoq__overlay",overlayContent:"style-module-scss-module__FOyjoq__overlayContent",scrollProgressBar:"style-module-scss-module__FOyjoq__scrollProgressBar",scrollProgressFill:"style-module-scss-module__FOyjoq__scrollProgressFill",scrollProgressTrack:"style-module-scss-module__FOyjoq__scrollProgressTrack",scrollSpace:"style-module-scss-module__FOyjoq__scrollSpace",skill:"style-module-scss-module__FOyjoq__skill",skillList:"style-module-scss-module__FOyjoq__skillList",skillMask:"style-module-scss-module__FOyjoq__skillMask",skills:"style-module-scss-module__FOyjoq__skills",skillsVision:"style-module-scss-module__FOyjoq__skillsVision",skillsWrapper:"style-module-scss-module__FOyjoq__skillsWrapper",stickyStage:"style-module-scss-module__FOyjoq__stickyStage",stickyTitles:"style-module-scss-module__FOyjoq__stickyTitles",titleContainer:"style-module-scss-module__FOyjoq__titleContainer",top:"style-module-scss-module__FOyjoq__top",topDescriptionWrapper:"style-module-scss-module__FOyjoq__topDescriptionWrapper",topTitle:"style-module-scss-module__FOyjoq__topTitle"})},56493,e=>{e.v({content:"style-module-scss-module__gDoBsa__content",description:"style-module-scss-module__gDoBsa__description",descriptionMask:"style-module-scss-module__gDoBsa__descriptionMask",image:"style-module-scss-module__gDoBsa__image",imageItem:"style-module-scss-module__gDoBsa__imageItem",imageStripItem:"style-module-scss-module__gDoBsa__imageStripItem",imagesScroll:"style-module-scss-module__gDoBsa__imagesScroll",imagesScrollWrapper:"style-module-scss-module__gDoBsa__imagesScrollWrapper",imagesStrip:"style-module-scss-module__gDoBsa__imagesStrip",imagesStripWra
227pper:"style-module-scss-module__gDoBsa__imagesStripWrapper",line:"style-module-scss-module__gDoBsa__line",lineContent:"style-module-scss-module__gDoBsa__lineContent",linesContent:"style-module-scss-module__gDoBsa__linesContent",mainDescMask:"style-module-scss-module__gDoBsa__mainDescMask",mainDescription:"style-module-scss-module__gDoBsa__mainDescription",number:"style-module-scss-module__gDoBsa__number",numberMask:"style-module-scss-module__gDoBsa__numberMask",textContent:"style-module-scss-module__gDoBsa__textContent",title:"style-module-scss-module__gDoBsa__title",titleMask:"style-module-scss-module__gDoBsa__titleMask",titleWrapper:"style-module-scss-module__gDoBsa__titleWrapper",visionPanel:"style-module-scss-module__gDoBsa__visionPanel",visionSection:"style-module-scss-module__gDoBsa__visionSection"})},46975,e=>{e.v({accordion:"style-module-scss-module__mTgFGa__accordion",accordionAnswer:"style-module-scss-module__mTgFGa__accordionAnswer",accordionBody:"style-module-scss-module__mTgFGa__accordionBody",accordionIcon:"style-module-scss-module__mTgFGa__accordionIcon",accordionLine:"style-module-scss-module__mTgFGa__accordionLine",accordionQuestion:"style-module-scss-module__mTgFGa__accordionQuestion",accordionQuestionMask:"style-module-scss-module__mTgFGa__accordionQuestionMask",accordionTrigger:"style-module-scss-module__mTgFGa__accordionTrigger",content:"style-module-scss-module__mTgFGa__content",faqPanel:"style-module-scss-module__mTgFGa__faqPanel",faqSection:"style-module-scss-module__mTgFGa__faqSection",head:"style-module-scss-module__mTgFGa__head",images:"style-module-scss-module__mTgFGa__images",logoBus:"style-module-scss-module__mTgFGa__logoBus",logoBusImage:"style-module-scss-module__mTgFGa__logoBusImage",logoBusInner:"style-module-scss-module__mTgFGa__logoBusInner",logoCake:"style-module-scss-module__mTgFGa__logoCake",logoCakeImage:"style-module-scss-module__mTgFGa__logoCakeImage",logoCakeInner:"style-module-scss-module__mTgFGa__logoCakeInner",plusBLeft:"style-module-scss-module__mTgFGa__plusBLeft",plusBRight:"style-module-scss-module__mTgFGa__plusBRight",plusTLeft:"style-module-scss-module__mTgFGa__plusTLeft",plusTRight:"style-module-scss-module__mTgFGa__plusTRight",titleLetter:"style-module-scss-module__mTgFGa__titleLetter",titleLink:"style-module-scss-module__mTgFGa__titleLink",titleLinkInner:"style-module-scss-module__mTgFGa__titleLinkInner",titleLinkMask:"style-module-scss-module__mTgFGa__titleLinkMask",titleMask:"style-module-scss-module__mTgFGa__titleMask",titleWrapper:"style-module-scss-module__mTgFGa__titleWrapper"})},71353,e=>{"use strict";var t=e.i(43476),r=e.i(31692),a=e.i(92599),i=e.i(89970),n=e.i(56493),s=e.i(57688),o=e.i(97407),l=e.i(99578),u=e.i(71645),c=e.i(83495);i.default.registerPlugin(c.ScrollTrigger);let d="power3.out",f="power3.inOut";function h({overlayEl:e,onProgress:r,onPanelRef:a,onDimRef:h}){let p=(0,u.useRef)(null),m=(0,u.useRef)(null),g=(0,u.useRef)(null),y=(0,u.useRef)(null),v=(0,u.useRef)(null),_=(0,u.useRef)(null),w=(0,u.useRef)(null),x=(0,u.useRef)(r),b=(0,u.useRef)(e),M=(0,u.useRef)(a),E=(0,u.useRef)(!1),j=(0,l.useIsMobile)(1e3);(0,u.useEffect)(()=>{x.current=r},[r]),(0,u.useEffect)(()=>{b.current=e},[e]),(0,u.useEffect)(()=>{M.current=a},[a]);let S=(0,u.useRef)(h);(0,u.useEffect)(()=>{S.current=h},[h]),(0,u.useEffect)(()=>(m.current&&M.current?.(m.current),g.current&&S.current?.(g.current),()=>{M.current?.(null),S.current?.(null)}),[]),(0,u.useEffect)(()=>{let e=p.current,t=m.current,r=y.current;if(!e||!t||!r)return;j||i.default.set(t,{x:"100%"}),i.default.set(r,{y:0});let a=t.querySelectorAll(`.${n.default.titleLetter}`),s=t.querySelectorAll(`.${n.default.number}`),o=t.querySelectorAll(`.${n.default.description}`),l=t.querySelectorAll(`.${n.default.line}`),u=w.current;i.default.set(a,{y:"100%"}),i.default.set(s,{y:"108%"}),i.default.set(o,{y:"108%"}),i.default.set(l,{scaleX:0,transformOrigin:"left"}),u&&i.default.set(u,{y:"108%"});let h=c.ScrollTrigger.create({trigger:e,start:"top bottom",end:"bottom top",scrub:.5,onUpdate:e=>{let n=e.progress,c=b.current,h=j?1:Math.min(n/.3,1);if(j||i.default.set(t,{x:`${(1-h)*100}%`}),h>.7&&!E.current&&(E.current=!0,a.forEach((e,t)=>{i.default.to(e,{y:"0%",duration:.75,ease:f,delay:.05+.06*t,overwrite:!0})}
227),s.forEach((e,t)=>{i.default.to(e,{y:"0%",duration:.75,ease:d,delay:.6+.075*t,overwrite:!0})}),o.forEach((e,t)=>{i.default.to(e,{y:"0%",duration:.75,ease:d,delay:.6+.075*t,overwrite:!0})}),l.forEach((e,t)=>{i.default.to(e,{scaleX:1,duration:.7,ease:f,delay:.8+.1*t,overwrite:!0})}),u&&i.default.to(u,{y:"0%",duration:.85,ease:d,delay:.5,overwrite:!0})),!j){let e,t,a=h>=1?Math.min(Math.max((n-.3)/.3,0),1):0;i.default.set(r,{y:-(a*(e=r.parentElement.clientHeight,!(t=r.firstElementChild)?0:Math.max(5*t.getBoundingClientRect().height-e,0)))})}j?(v.current&&i.default.set(v.current,{y:0}),_.current&&i.default.set(_.current,{y:0}),w.current?.parentElement&&i.default.set(w.current.parentElement,{y:0})):(v.current&&i.default.set(v.current,{y:-.12*n*220}),_.current&&i.default.set(_.current,{y:.16*n*220}),w.current&&i.default.set(w.current?.parentElement,{y:.12*n*220})),x.current?.(h),c&&(n>0&&h<1?(c.style.overflowY="hidden",c.style.pointerEvents="none"):(h>=1?c.style.overflowY="hidden":c.style.overflowY="",c.style.pointerEvents=""))},onLeaveBack:()=>{x.current?.(0),E.current=!1,i.default.set(a,{y:"100%"}),i.default.set(s,{y:"108%"}),i.default.set(o,{y:"108%"}),i.default.set(l,{scaleX:0}),u&&i.default.set(u,{y:"108%"}),v.current&&i.default.set(v.current,{y:0}),_.current&&i.default.set(_.current,{y:0}),w.current?.parentElement&&i.default.set(w.current.parentElement,{y:0});let e=b.current;e&&(e.style.overflowY="",e.style.pointerEvents="")}}),g=e=>{let t=b.current;if(!t||!e.target||!t.contains(e.target))return;let r=h.progress;r>0&&r<.3&&(e.preventDefault(),e.stopPropagation())};return window.addEventListener("wheel",g,{passive:!1}),()=>{h.kill(),window.removeEventListener("wheel",g);let e=b.current;e&&(e.style.overflowY="",e.style.pointerEvents="")}},[j]);let C=[(0,t.jsxs)(t.Fragment,{children:["Understanding context, people and ",(0,t.jsx)("br",{})," purpose before making decisions"]}),(0,t.jsxs)(t.Fragment,{children:["Defining direction, structure and ",(0,t.jsx)("br",{})," long-term positioning"]}),(0,t.jsxs)(t.Fragment,{children:["Shaping visual language and ",(0,t.jsx)("br",{})," emotional impact"]}),(0,t.jsxs)(t.Fragment,{children:["Engineering scalable systems",(0,t.jsx)("br",{}),"front-end, back-end and databases"]})],k=[{src:"/images/visionImagesScroll/OneHorizonEvents.webp",alt:"OneHorizon Events"},{src:"/images/visionImagesScroll/LexusLFA.webp",alt:"Lexus LFA"},{src:"/images/visionImagesScroll/KingWheels.webp",alt:"King Wheels"},{src:"/images/visionImagesScroll/FerrariF1.webp",alt:"Ferrari F1"},{src:"/images/visionImagesScroll/GerasymGroup.webp",alt:"GERASYM GROUP"}];return(0,t.jsx)("section",{ref:p,className:n.default.visionSection,children:(0,t.jsxs)("div",{ref:m,className:n.default.visionPanel,children:[(0,t.jsx)("div",{ref:g,style:{display:"none",position:"absolute",inset:0,background:"rgba(11, 11, 11, 0.75)",opacity:0,zIndex:10,pointerEvents:"none",transition:"none"}}),(0,t.jsx)(o.default,{theme:"light",initialDelay:1.2}),(0,t.jsxs)("div",{className:`${n.default.content} ${j?n.default.contentMobile:""}`,children:[j?(0,t.jsx)("div",{className:n.default.imagesStripWrapper,children:(0,t.jsx)("div",{ref:y,className:n.default.imagesStrip,children:k.map(({src:e,alt:r})=>(0,t.jsx)("div",{className:n.default.imageStripItem,children:(0,t.jsx)(s.default,{src:e,alt:r,fill:!0,className:n.default.image})},r))})}):(0,t.jsx)("div",{className:n.default.imagesScrollWrapper,children:(0,t.jsx)("div",{ref:y,className:n.default.imagesScroll,children:k.map(({src:e,alt:r})=>(0,t.jsx)("div",{className:n.default.imageItem,children:(0,t.jsx)(s.default,{src:e,alt:r,fill:!0,className:n.default.image})},r))})}),(0,t.jsxs)("div",{className:`${n.default.textContent} ${j?n.default.textContentMobile:""}`,children:[(0,t.jsx)("div",{ref:v,className:n.default.titleWrapper,children:"VISION".split("").map((e,r)=>(0,t.jsx)("div",{className:n.default.titleMask,children:(0,t.jsx)("span",{className:`${n.default.title} ${n.default.titleLetter}`,children:e})},r))}),(0,t.jsx)("div",{ref:_,className:n.default.linesContent,children:C.map((e,r)=>(0,t.jsxs)("div",{className:n.default.lineContent,children:[(0,t.jsx)("div",{className:n.default.numberMask,children:(0,t.jsx)("span",{className:n.default.number,children:String(r+1).padStart(2,"0")})}),(0,t.jsx)("div",{className:n.default.descriptionMask,children:(0,t.jsx)("p",{className:n.default.description,children:e})}),(0,t.jsx)("span",{className:n.default.line,style:{transformOrigin:"left"}})]},r))}),(0,t.jsx)("div",{className:n.default.mainDescMask,children:(0,t.jsx)("p",{ref:w,className:n.default.mainDescription,children:"Vision is where everything begins. I combine strategy, design and engineering into structured digital systems. Not just to look good but to perform, scale and last."})})]})]})]})})}var p=e.i(46975),m=e.i(55160),g=e.i(13706),y=e.i(46932),v=e.i(88653);i.default.registerPlugin(c.ScrollTrigger);let _=[{id:1,question:"What services do you provide?",answer:"I design and develop complete digital systems, from branding and UI/UX to front-end, back-end and deployment."},{id:2,question:"Can you manage a project from concept to launch?",answer:"Absolutely. I design the brand, create the interface, engineer the front-end and back-end, structure the database and handle deployment."},{id:3,question:"Do you work with clients internationally?",answer:"Yes. I collaborate with clients worldwide, providing structured communication and transparent workflows."},{id:4,question:"Can you also create animations?",answer:"Yes. I design and implement motion systems, micro-interactions and smooth transitions that enhance usability and bring interfaces to life."},{id:5,question:"What technologies do you use?",answer:"I work with modern technologies such as React, Next.js, TypeScript and scalable database systems, always choosing tools that fit the project's goals."},{id:6,question:"Do you offer support or updates after launch?",answer:"Absolutely. I provide post-launch support, performance monitoring and future updates to ensure the project continues to evolve and perform at its best."}],w="power3.inOut",x="power3.out",b=.6+.4*.35,M="FAQ".split("");function E({visionEl:e,onProgress:r}){let[a,n]=(0,u.useState)(null),d=(0,u.useRef)(null),f=(0,u.useRef)(null),h=(0,u.useRef)(!1),E=(0,u.useRef)(!1),j=(0,u.useRef)(null),S=(0,u.useRef)(null),C=(0,u.useRef)(null),k=(0,u.useRef)(n);(0,u.useEffect)(()=>{k.current=n},[]);let T=(0,l.useIsMobile)(1e3),F=(0,u.useRef)(e),A=(0,u.useRef)(r);return(0,u.useEffect)(()=>{F.current=e},[e]),(0,u.useEffect)(()=>{A.current=r},[r]),(0,u.useEffect)(()=>{let e=d.current,t=f.current;if(!e||!t)return;let r=j.current,a=S.current,n=C.current;T||i.default.set(t,{xPercent:100});let s=t.querySelectorAll(`.${p.default.titleLetter}`),o=t.querySelector(`.${p.default.titleLinkInner}`),l=t.querySelectorAll(`.${p.default.accordionLine}`),u=t.querySelectorAll(`.${p.default.accordionQuestionInner}`),m=t.querySelectorAll(`.${p.default.accordionIcon}`),g=t.querySelector(`.${p.default.logoBusImage}`),y=t.querySelector(`.${p.default.logoCakeImage}`),v=t.querySelectorAll(`.${p.default.plusTLeft}, .${p.default.plusBLeft}`),_=t.querySelectorAll(`.${p.default.plusTRight}, .${p.default.plusBRight}`),M=()=>{i.default.set(s,{y:"100%"}),i.default.set(l,{scaleX:0}),i.default.set(u,{y:"110%"}),i.default.set(m,{scale:0,opacity:0}
227),o&&i.default.set(o,{y:"110%",opacity:0}),i.default.set(v,{opacity:0,rotate:-45,x:-20}),i.default.set(_,{opacity:0,rotate:-45,x:20}),g&&i.default.set(g,{clipPath:"inset(0% 0% 100% 0%)"}),y&&i.default.set(y,{clipPath:"inset(100% 0% 0% 0%)"})};M();let F=c.ScrollTrigger.create({trigger:e,start:"top bottom",end:"bottom top",scrub:.5,onUpdate:e=>{let c=e.progress,d=T?1:Math.min(c/.3,1);T||i.default.set(t,{xPercent:(1-d)*100}),d>.85&&(h.current||(h.current=!0,E.current=!1,g&&i.default.to(g,{clipPath:"inset(0% 0% 0% 0%)",duration:.7,ease:w,delay:.1,overwrite:!0}),y&&i.default.to(y,{clipPath:"inset(0% 0% 0% 0%)",duration:.7,ease:w,delay:.18,overwrite:!0}),i.default.to(v,{opacity:1,rotate:0,x:0,duration:.6,ease:w,delay:.1,stagger:.08,overwrite:!0}),i.default.to(_,{opacity:1,rotate:0,x:0,duration:.6,ease:w,delay:.1,stagger:.08,overwrite:!0}),s.forEach((e,t)=>{i.default.to(e,{y:"0%",duration:.75,ease:w,delay:.05+.06*t,overwrite:!0})}),o&&i.default.to(o,{y:"0%",opacity:1,duration:.7,ease:x,delay:.35,overwrite:!0}),l.forEach((e,t)=>{i.default.to(e,{scaleX:1,duration:.7,ease:w,delay:.45+.07*t,overwrite:!0})}),u.forEach((e,t)=>{i.default.to(e,{y:"0%",duration:.65,ease:x,delay:.5+.07*t,overwrite:!0})}),m.forEach((e,t)=>{i.default.to(e,{scale:1,opacity:1,duration:.45,ease:"back.out(1.7)",delay:.55+.07*t,overwrite:!0})}))),!T&&c>=b?E.current||(E.current=!0,k.current(null),g&&i.default.to(g,{clipPath:"inset(0% 0% 100% 0%)",duration:.55,ease:w,overwrite:!0}),y&&i.default.to(y,{clipPath:"inset(100% 0% 0% 0%)",duration:.55,ease:w,delay:.05,overwrite:!0}),i.default.to(v,{opacity:0,rotate:-45,x:-20,duration:.35,ease:w,overwrite:!0}),i.default.to(_,{opacity:0,rotate:-45,x:20,duration:.35,ease:w,overwrite:!0}),o&&i.default.to(o,{y:"110%",opacity:0,duration:.45,ease:w,overwrite:!0}),s.forEach((e,t)=>{i.default.to(e,{y:"100%",duration:.5,ease:w,delay:.04*t,overwrite:!0})}),i.default.to(m,{scale:0,opacity:0,duration:.3,ease:w,stagger:.03,overwrite:!0}),i.default.to(u,{y:"110%",duration:.4,ease:w,stagger:.03,overwrite:!0}),i.default.to(l,{scaleX:0,duration:.45,ease:w,stagger:.03,overwrite:!0})):!T&&c<b&&E.current&&(E.current=!1,h.current=!1,k.current(null),M()),!T&&(r&&i.default.set(r,{y:-.14*c*220}),a&&i.default.set(a,{y:.18*c*220}),n&&i.default.set(n,{y:.14*c*220})),A.current?.(d)},onLeaveBack:()=>{A.current?.(0),h.current=!1,E.current=!1,k.current(null),T||i.default.set(t,{xPercent:100}),M(),r&&i.default.set(r,{y:0}),a&&i.default.set(a,{y:0}),n&&i.default.set(n,{y:0})}});return()=>{F.kill()}},[T]),(0,t.jsx)("section",{ref:d,className:p.default.faqSection,children:(0,t.jsxs)("div",{ref:f,className:p.default.faqPanel,children:[(0,t.jsx)(o.default,{theme:"dark",initialDelay:1.2}),(0,t.jsxs)("div",{ref:S,className:p.default.images,children:[(0,t.jsxs)("a",{href:"https://innenausbau-botnaruc.de/",target:"_blank",rel:"noopener noreferrer",className:p.default.logoBus,children:[(0,t.jsx)("div",{className:p.default.plusTLeft,children:(0,t.jsx)(s.default,{src:"/images/icons/PlusDark.svg",alt:"Plus",width:9,height:9})}),(0,t.jsx)("div",{className:p.default.plusTRight,children:(0,t.jsx)(s.default,{src:"/images/icons/PlusDark.svg",alt:"Plus",width:9,height:9})}),(0,t.jsx)("div",{className:p.default.plusBLeft,children:(0,t.jsx)(s.default,{src:"/images/icons/PlusDark.svg",alt:"Plus",width:9,height:9})}),(0,t.jsx)("div",{className:p.default.plusBRight,children:(0,t.jsx)(s.default,{src:"/images/icons/PlusDark.svg",alt:"Plus",width:9,height:9})}),(0,t.jsx)("div",{className:p.default.logoBusInner,children:(0,t.jsx)(s.default,{src:"/images/other/LogoBus.webp",alt:"Logo bus",width:300,height:400,className:p.default.logoBusImage})})]}),(0,t.jsxs)("a",{href:"https://gerasym-group.de/",target:"_blank",rel:"noopener noreferrer",className:p.default.logoCake,children:[(0,t.jsx)("div",{className:`${p.default.plusTLeft}`,children:(0,t.jsx)(s.default,{src:"/images/icons/PlusDark.svg",alt:"Plus",width:9,height:9})}),(0,t.jsx)("div",{className:`${p.default.plusTRight}`,children:(0,t.jsx)(s.default,{src:"/images/icons/PlusDark.svg",alt:"Plus",width:9,height:9})}),(0,t.jsx)("div",{className:`${p.default.plusBLeft}`,children:(0,t.jsx)(s.default,{src:"/images/icons/PlusDark.svg",alt:"Plus",width:9,height:9})}),(0,t.jsx)("div",{className:`${p.default.plusBRight}`,children:(0,t.jsx)(s.default,{src:"/images/icons/PlusDark.svg",alt:"Plus",width:9,height:9})}),(0,t.jsx)("div",{className:p.default.logoCakeInner,children:(0,t.jsx)(s.default,{src:"/images/other/LogoCake.webp",alt:"Logo cake",width:280,height:400,className:p.default.logoCakeImage})})]})]}),(0,t.jsxs)("div",{className:p.default.content,children:[(0,t.jsxs)("div",{ref:j,className:p.default.head,children:[(0,t.jsx)("div",{className:p.default.titleWrapper,children:M.map((e,r)=>(0,t.jsx)("div",{className:p.default.titleMask,children:(0,t.jsx)("span",{className:p.default.titleLetter,children:e})},r))}),(0,t.jsx)("div",{className:p.default.titleLinkMask,children:(0,t.jsxs)("div",{className:`${p.default.titleLink} ${p.default.titleLinkInner}`,children:[(0,t.jsxs)("p",{children:["Can't find the answer ",(0,t.jsx)("br",{})," you're looking for?"]}),(0,t.jsx)(m.default,{href:g.PagesConfig.contact,variant:"black",text:"Get in touch"})]})})]}),(0,t.jsxs)("div",{ref:C,className:p.default.accordion,children:[_.map((e,r)=>{let i=a===e.id;return(0,t.jsxs)("div",{className:`${p.default.accordionItem} ${i?p.default.accordionItemOpen:""}`,children:[0!==r&&(0,t.jsx)("span",{className:p.default.accordionLine}),(0,t.jsxs)("button",{className:p.default.accordionTrigger,onClick:()=>{var t;return t=e.id,void n(e=>e===t?null:t)},"aria-expanded":i,children:[(0,t.jsx)("div",{className:p.default.accordionQuestionMask,children:(0,t.jsx)("span",{className:`${p.default.accordionQuestion} ${p.default.accordionQuestionInner}`,children:e.question})}),(0,t.jsx)(y.motion.div,{className:p.default.accordionIcon,animate:{rotate:45*!!i},transition:{duration:.3,ease:[.4,0,.2,1]},children:(0,t.jsx)(s.default,{src:"/images/icons/PlusFaq.svg",alt:i?"Close":"Open",width:18,height:18})})]}),(0,t.jsx)(v.AnimatePresence,{initial:!1,children:i&&(0,t.jsx)(y.motion.div,{initial:{height:0,opacity:0}
227,animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.35,ease:[.4,0,.2,1]},className:p.default.accordionBody,children:(0,t.jsx)("p",{className:p.default.accordionAnswer,children:e.answer})},"content")})]},e.id)}),(0,t.jsx)("span",{className:p.default.accordionLine})]})]})]})})}var j=e.i(20860),S=e.i(87652),C=e.i(71329),k=e.i(37806),T=e.i(47414),F=e.i(11712);i.default.registerPlugin(c.ScrollTrigger);let A=["Skills are frameworks of thinking, they allow me to","transform ideas into structured, interactive environments"],R=["Vision defines why systems exist, purpose","creates impact"],P=[{title:"Design",skills:["Brand identity","Web design","Logo","UX & UI Design","Interaction design","Wireframe","Graphic design"]},{title:"Development",skills:["Front-end development","Back-end development","Database Design & Management","Search engine optimization (SEO)","Responsive Development","API Integration","Deployment & Hosting","Animation & Micro-interactions"]},{title:"Technologies",skills:["React","NextJS","TypeScript","Framer Motion","GSAP","ThreeJS","SASS","Git & Version Control"]}];function I(){var e;let n=(0,u.useRef)(null),s=(0,u.useRef)(null),o=(0,u.useRef)(null),d=(0,l.useIsMobile)(1e3),[f,p]=(0,u.useState)(null);(0,u.useEffect)(()=>{s.current&&p(s.current)},[]);let[m,g]=(0,u.useState)(null),[v,_]=(0,u.useState)(null),w=(0,u.useRef)(0),x=(0,u.useRef)(null),b=(0,u.useCallback)(e=>{w.current=e,!d&&x.current&&(e>0?(x.current.style.opacity=String(e),x.current.style.display="block"):x.current.style.display="none")},[d]),M=(0,u.useCallback)(e=>{g(e)},[]),I=(0,u.useCallback)(e=>{_(e)},[]),N=(0,u.useRef)(null);(0,u.useEffect)(()=>{N.current=v},[v]);let O=(0,u.useCallback)(e=>{!d&&N.current&&(e>0?(N.current.style.display="block",N.current.style.opacity=String(e)):N.current.style.display="none")},[d]),D=(0,S.useInView)(n,{amount:0,margin:"0px 0px 0px 0px"}),[B,L]=(0,u.useState)(!1);(0,u.useEffect)(()=>{let e=setTimeout(()=>{D?L(!0):0===w.current&&L(!1)},0);return()=>clearTimeout(e)},[D]);let U=function(e){let t=(0,T.useConstant)(()=>(0,C.motionValue)(0)),{isStatic:r}=(0,u.useContext)(k.MotionConfigContext);if(r){let[,e]=(0,u.useState)(0);(0,u.useEffect)(()=>t.on("change",e),[])}return t}(0),[W,G]=(0,u.useState)(!1),[z,q]=(0,u.useState)(0);e=e=>{G(e>.5),q(e)},(0,u.useInsertionEffect)(()=>U.on("change",e),[U,"change",e]);let V=(0,u.useRef)(null),H=(0,u.useRef)(null),$=(0,u.useRef)(null),X=[V,H,$],Y=[(0,S.useInView)(V,{amount:.2}),(0,S.useInView)(H,{amount:.2}),(0,S.useInView)($,{amount:.2})],Q=(0,u.useRef)(null),Z=(0,S.useInView)(Q,{amount:.5}),J=(0,u.useRef)(null),K=(0,u.useRef)(null);(0,u.useEffect)(()=>{if(!s.current)return;let e=s.current,t=e.firstElementChild,r=J.current,n=K.current,l=new a.default({wrapper:e,content:t,duration:1.2,easing:e=>Math.min(1,1.001-Math.pow(2,-10*e)),smoothWheel:!0,wheelMultiplier:1,lerp:.075}),u=requestAnimationFrame(function t(a){l.raf(a),c.ScrollTrigger.update(
227);let s=o.current;if(s){let t=e.getBoundingClientRect(),a=Math.min(Math.max(-(s.getBoundingClientRect().top-t.top)/s.offsetHeight,0),1);U.set(a),!d&&(r&&i.default.set(r,{y:.96*a*220}),n&&i.default.set(n,{y:.3*a*220}))}requestAnimationFrame(t)});return()=>{cancelAnimationFrame(u),l.destroy(),r&&i.default.set(r,{y:0}),n&&i.default.set(n,{y:0})}},[U,d]);let ee=D&&!W;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("section",{ref:n,className:r.default.skillsVision,children:[(0,t.jsx)(y.motion.div,{ref:s,className:r.default.overlay,initial:!d&&{y:"100%"},animate:d?void 0:{y:B?"0%":"100%"},transition:d?void 0:{duration:.75,delay:.3*!B,ease:j.defaultEase},children:(0,t.jsxs)("div",{className:r.default.overlayContent,children:[(0,t.jsx)(y.motion.div,{className:r.default.dPinkCircle,initial:{y:180,x:-600,opacity:0},animate:D?{y:0,x:0,opacity:1}:{y:180,x:-600,opacity:0},transition:{duration:.9,delay:.1*!!D,ease:j.defaultEase}}),(0,t.jsx)(y.motion.div,{className:r.default.lPinkCircle,initial:{y:240,x:420,opacity:0},animate:D?{y:0,x:0,opacity:1}:{y:240,x:420,opacity:0},transition:{duration:.9,delay:.2*!!D,ease:j.defaultEase}}),(0,t.jsx)("div",{className:"container",children:(0,t.jsxs)("div",{className:r.default.content,children:[(0,t.jsxs)("div",{ref:J,className:r.default.titleContainer,children:[(0,t.jsxs)("div",{className:r.default.top,children:[(0,t.jsx)("div",{className:r.default.numberMask,children:(0,t.jsx)(y.motion.p,{className:r.default.topTitle,initial:{y:"118%"},animate:{y:D?"0%":"118%"},transition:{duration:.75,delay:.45*!!D,ease:j.defaultEase},children:"Skills"})}),(0,t.jsx)("div",{className:r.default.topDescriptionWrapper,children:A.map((e,a)=>(0,t.jsx)("div",{className:r.default.lineMask,children:(0,t.jsx)(y.motion.span,{className:r.default.descLine,initial:{y:"126%"},animate:{y:D?"0%":"126%"},transition:{duration:.65,delay:D?.45+.055*a:.04*a,ease:j.defaultEase},children:e})},a))})]}),(0,t.jsx)(y.motion.span,{className:r.default.line,initial:{scaleX:0},animate:{scaleX:+!!D},transition:{duration:1.4,delay:.45*!!D,ease:j.defaultEase}}),(0,t.jsxs)("div",{className:r.default.bottom,children:[(0,t.jsx)("div",{className:r.default.bottomDescriptionWrapper,children:R.map((e,a)=>(0,t.jsx)("div",{className:r.default.lineMask,children:(0,t.jsx)(y.motion.span,{className:r.default.descLine,initial:{y:"-118%"},animate:{y:D?"0%":"-118%"},transition:{duration:.65,delay:D?.45+.055*a:.04*a,ease:j.defaultEase},children:e})},a))}),(0,t.jsx)("div",{className:r.default.numberMask,children:(0,t.jsx)(y.motion.p,{className:r.default.bottomTitle,initial:{y:"-118%"},animate:{y:D?"0%":"-118%"},transition:{duration:.75,delay:.45*!!D,ease:j.defaultEase},children:"Vision"})})]})]}),(0,t.jsxs)("div",{className:r.default.skillsWrapper,children:[(0,t.jsx)("div",{className:r.default.stickyStage,children:(0,t.jsxs)("div",{ref:K,className:r.default.stickyTitles,children:[["Curious How","This Website","Is Built?"].map((e,a)=>(0,t.jsx)("div",{className:r.default.animTitleMask,children:(0,t.jsx)(y.motion.p,{className:r.default.animTitle,initial:{y:"108%"},animate:{y:D&&!W?"0%":"108%"},transition:{duration:.75,delay:W?.04*a:.6+.08*a,ease:j.defaultEase},children:e})},e)),(0,t.jsx)(y.motion.div,{className:r.default.scrollProgressBar,initial:{opacity:0,y:10},animate:{opacity:+!!ee,y:10*!ee},transition:{duration:.55,delay:.84*!!ee,ease:j.defaultEase},children:(0,t.jsx)("div",{className:r.default.scrollProgressTrack,children:(0,t.jsx)(y.motion.div,{className:r.default.scrollProgressFill,style:{scaleX:2*z>1?1:2*z}})})}),(0,t.jsx)("div",{className:r.default.mobileScrollMask,children:(0,t.jsx)(y.motion.p,{className:r.default.mobileScroll,initial:{y:"112%"},animate:{y:D&&!W?"0%":"112%"},transition:{duration:.75,delay:W?.12:.84,ease:j.defaultEase},children:"( scroll )"})})]})}),(0,t.jsx)("div",{ref:o,className:r.default.scrollSpace}),(0,t.jsx)("div",{className:r.default.skills,children:P.map(({title:e,skills:a},i)=>(0,t.jsxs)("div",{ref:X[i],className:r.default.col,children:[(0,t.jsxs)("div",{className:r.default.colTitleWrapper,children:[(0,t.jsx)("div",{className:r.default.colNumberMask,children:(0,t.jsx)(y.motion.p,{className:r.default.colNumber,initial:{y:"118%"},animate:{y:Y[i]?"0%":"118%"},transition:{duration:.75,delay:Y[i]?1.1+.08*i:0,ease:j.defaultEase},children:String(i+1).padStart(2,"0")})}),(0,t.jsx)("div",{className:r.default.colTitleMask,children:(0,t.jsx)(y.motion.p,{className:r.default.colTitle,initial:{y:"110%"},animate:{y:Y[i]?"0%":"110%"},transition:{duration:.75,delay:Y[i]?.1+.08*i:0,ease:j.defaultEase},children:e})})]}),(0,t.jsx)("div",{className:r.default.skillList,children:a.map((e,a)=>(0,t.jsx)("div",{className:r.default.skillMask,children:(0,t.jsx)(y.motion.p,{className:r.default.skill,initial:{y:"118%"},animate:{y:Y[i]?"0%":"118%"},transition:{duration:.55,delay:Y[i]?.2+.18*i+.14*a:0,ease:j.defaultEase},children:e})},e))})]},e))}),(0,t.jsx)("div",{className:r.default.desktopScrollMask,children:(0,t.jsx)("div",{ref:Q,className:r.default.desktopScrollInner,children:(0,t.jsx)(y.motion.p,{className:r.default.desktopScroll,initial:{y:"112%"},animate:{y:Z?"0%":"112%"},transition:{duration:.75,ease:j.defaultEase},children:"( keep scrolling )"})})})]})]})})]})}
227),!d&&(0,t.jsx)("div",{ref:x,style:{display:"none",position:"fixed",inset:0,background:"rgba(11, 11, 11, 0.75)",opacity:0,zIndex:150,pointerEvents:"none",transition:"none"}})]}),(0,t.jsx)(h,{overlayEl:f,onProgress:b,onPanelRef:M,onDimRef:I}),(0,t.jsx)(E,{visionEl:m,onProgress:O}),(0,t.jsx)(F.default,{page:"about"})]})}e.s(["default",()=>I],71353)}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.