1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="9b937765-2a4b-48b6-8f9e-18a39a668ac1",e._sentryDebugIdIdentifier="sentry-dbid-9b937765-2a4b-48b6-8f9e-18a39a668ac1")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4861],{74822:(e,t,r)=>{r.d(t,{AO:()=>es});var n={},a=function(e,t,r,a,i){var o=new Worker(n[t]||(n[t]=URL.createObjectURL(new Blob([e+';addEventListener("error",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'],{type:"text/javascript"}))));return o.onmessage=function(e){var t=e.data,r=t.$e$;if(r){var n=Error(r[0]);n.code=r[1],n.stack=r[2],i(n,null)}else i(null,t)},o.postMessage(r,a),o},i=Uint8Array,o=Uint16Array,l=Int32Array,s=new i([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]),u=new i([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]),c=new i([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),f=function(e,t){for(var r=new o(31),n=0;n<31;++n)r[n]=t+=1<<e[n-1];for(var a=new l(r[30]),n=1;n<30;++n)for(var i=r[n];i<r[n+1];++i)a[i]=i-r[n]<<5|n;return{b:r,r:a}},d=f(s,2),p=d.b,h=d.r;p[28]=258,h[258]=28;for(var m=f(u,0),g=m.b,y=m.r,b=new o(32768),v=0;v<32768;++v){var x=(43690&v)>>1|(21845&v)<<1;x=(61680&(x=(52428&x)>>2|(13107&x)<<2))>>4|(3855&x)<<4,b[v]=((65280&x)>>8|(255&x)<<8)>>1}for(var w=function(e,t,r){for(var n,a=e.length,i=0,l=new o(t);i<a;++i)e[i]&&++l[e[i]-1];var s=new o(t);for(i=1;i<t;++i)s[i]=s[i-1]+l[i-1]<<1;if(r){n=new o(1<<t);var u=15-t;for(i=0;i<a;++i)if(e[i])for(var c=i<<4|e[i],f=t-e[i],d=s[e[i]-1]++<<f,p=d|(1<<f)-1;d<=p;++d)n[b[d]>>u]=c}else for(i=0,n=new o(a);i<a;++i)e[i]&&(n[i]=b[s[e[i]-1]++]>>15-e[i]);return n},A=new i(288),v=0;v<144;++v)A[v]=8;for(var v=144;v<256;++v)A[v]=9;for(var v=256;v<280;++v)A[v]=7;for(var v=280;v<288;++v)A[v]=8;for(var k=new i(32),v=0;v<32;++v)k[v]=5;var N=w(A,9,1),T=w(k,5,1),I=function(e){for(var t=e[0],r=1;r<e.length;++r)e[r]>t&&(t=e[r]);return t},E=function(e,t,r){var n=t/8|0;return(e[n]|e[n+1]<<8)>>(7&t)&r},S=function(e,t){var r=t/8|0;return(e[r]|e[r+1]<<8|e[r+2]<<16)>>(7&t)},C=function(e){return(e+7)/8|0},M=function(e,t,r){return(null==t||t<0)&&(t=0),(null==r||r>e.length)&&(r=e.length),new i(e.subarray(t,r))}
1,L=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],P=function(e,t,r){var n=Error(t||L[e]);if(n.code=e,Error.captureStackTrace&&Error.captureStackTrace(n,P),!r)throw n;return n},O=function(e,t,r,n){var a=e.length,o=n?n.length:0;if(!a||t.f&&!t.l)return r||new i(0);var l=!r,f=l||2!=t.i,d=t.i;l&&(r=new i(3*a));var h=function(e){var t=r.length;if(e>t){var n=new i(Math.max(2*t,e));n.set(r),r=n}},m=t.f||0,y=t.p||0,b=t.b||0,v=t.l,x=t.d,A=t.m,k=t.n,L=8*a;do{if(!v){m=E(e,y,1);var O=E(e,y+1,3);if(y+=3,O){if(1==O)v=N,x=T,A=9,k=5;else if(2==O){var R=E(e,y,31)+257,F=E(e,y+10,15)+4,D=R+E(e,y+5,31)+1;y+=14;for(var U=new i(D),_=new i(19),q=0;q<F;++q)_[c[q]]=E(e,y+3*q,7);y+=3*F;for(var B=I(_),z=(1<<B)-1,j=w(_,B,1),q=0;q<D;){var V=j[E(e,y,z)];y+=15&V;var W=V>>4;if(W<16)U[q++]=W;else{var G=0,Y=0;for(16==W?(Y=3+E(e,y,3),y+=2,G=U[q-1]):17==W?(Y=3+E(e,y,7),y+=3):18==W&&(Y=11+E(e,y,127),y+=7);Y--;)U[q++]=G}}var H=U.subarray(0,R),$=U.subarray(R);A=I(H),k=I($),v=w(H,A,1),x=w($,k,1)}else P(1)}else{var W=C(y)+4,X=e[W-4]|e[W-3]<<8,J=W+X;if(J>a){d&&P(0);break}f&&h(b+X),r.set(e.subarray(W,J),b),t.b=b+=X,t.p=y=8*J,t.f=m;continue}if(y>L){d&&P(0);break}}f&&h(b+131072);for(var Q=(1<<A)-1,K=(1<<k)-1,Z=y;;Z=y){var G=v[S(e,y)&Q],ee=G>>4;if((y+=15&G)>L){d&&P(0);break}if(G||P(2),ee<256)r[b++]=ee;else if(256==ee){Z=y,v=null;break}else{var et=ee-254;if(ee>264){var q=ee-257,er=s[q];et=E(e,y,(1<<er)-1)+p[q],y+=er}var en=x[S(e,y)&K],ea=en>>4;en||P(3),y+=15&en;var $=g[ea];if(ea>3){var er=u[ea];$+=S(e,y)&(1<<er)-1,y+=er}if(y>L){d&&P(0);break}f&&h(b+131072);var ei=b+et;if(b<$){var eo=o-$,el=Math.min($,ei);for(eo+b<0&&P(3);b<el;++b)r[b]=n[eo+b]}for(;b<ei;++b)r[b]=r[b-$]}}t.l=v,t.p=Z,t.b=b,t.f=m,v&&(m=1,t.m=A,t.d=x,t.n=k)}while(!m);return b!=r.length&&l?M(r,0,b):r.subarray(0,b)},R=function(e,t,r){r<<=7&t;var n=t/8|0;e[n]|=r,e[n+1]|=r>>8},F=function(e,t,r){r<<=7&t;var n=t/8|0;e[n]|=r,e[n+1]|=r>>8,e[n+2]|=r>>16},D=function(e,t){for(var r=[],n=0;n<e.length;++n)e[n]&&r.push({s:n,f:e[n]});var a=r.length,l=r.slice();if(!a)return{t:V,l:0};if(1==a){var s=new i(r[0].s+1);return s[r[0].s]=1,{t:s,l:1}}r.sort(function(e,t){return e.f-t.f}),r.push({s:-1,f:25001});var u=r[0],c=r[1],f=0,d=1,p=2;for(r[0]={s:-1,f:u.f+c.f,l:u,r:c};d!=a-1;)u=r[r[f].f<r[p].f?f++:p++],c=r[f!=d&&r[f].f<r[p].f?f++:p++],r[d++]={s:-1,f:u.f+c.f,l:u,r:c};for(var h=l[0].s,n=1;n<a;++n)l[n].s>h&&(h=l[n].s);var m=new o(h+1),g=U(r[d-1],m,0);if(g>t){var n=0,y=0,b=g-t,v=1<<b;for(l.sort(function(e,t){return m[t.s]-m[e.s]||e.f-t.f});n<a;++n){var x=l[n].s;if(m[x]>t)y+=v-(1<<g-m[x]),m[x]=t;else break}for(y>>=b;y>0;){var w=l[n].s;m[w]<t?y-=1<<t-m[w]++-1:++n}for(;n>=0&&y;--n){var A=l[n].s;m[A]==t&&(--m[A],++y)}g=t}return{t:new i(m),l:g}},U=function(e,t,r){return -1==e.s?Math.max(U(e.l,t,r+1),U(e.r,t,r+1)):t[e.s]=r},_=function(e){for(var t=e.length;t&&!e[--t];);for(var r=new o(++t),n=0,a=e[0],i=1,l=function(e){r[n++]=e},s=1;s<=t;++s)if(e[s]==a&&s!=t)++i;else{if(!a&&i>2){for(;i>138;i-=138)l(32754);i>2&&(l(i>10?i-11<<5|28690:i-3<<5|12305),i=0)}else if(i>3){for(l(a),--i;i>6;i-=6)l(8304);i>2&&(l(i-3<<5|8208),i=0)}for(;i--;)l(a);i=1,a=e[s]}return{c:r.subarray(0,n),n:t}},q=function(e,t){for(var r=0,n=0;n<t.length;++n)r+=e[n]*t[n];return r},B=function(e,t,r){var n=r.length,a=C(t+2);e[a]=255&n,e[a+1]=n>>8,e[a+2]=255^e[a],e[a+3]=255^e[a+1];for(var i=0;i<n;++i)e[a+i+4]=r[i];return(a+4+n)*8},z=function(e,t,r,n,a,i,l,f,d,p,h){R(t,h++,r),++a[256];for(var m,g,y,b,v=D(a,15),x=v.t,N=v.l,T=D(i,15),I=T.t,E=T.l,S=_(x),C=S.c,M=S.n,L=_(I),P=L.c,O=L.n,U=new o(19),z=0;z<C.length;++z)++U[31&C[z]];for(var z=0;z<P.length;++z)++U[31&P[z]];for(var j=D(U,7),V=j.t,W=j.l,G=19;G>4&&!V[c[G-1]];--G);var Y=p+5<<3,H=q(a,A)+q(i,k)+l,$=q(a,x)+q(i,I)+l+14+3*G+q(U,V)+2*U[16]+3*U[17]+7*U[18];if(d>=0&&Y<=H&&Y<=$)return B(t,h,e.subarray(d,d+p));if(R(t,h,1+($<H)),h+=2,$<H){m=w(x,N,0),g=x,y=w(I,E,0),b=I;var X=w(V,W,0);R(t,h,M-257),R(t,h+5,O-1),R(t,h+10,G-4),h+=14;for(var z=0;z<G;++z)R(t,h+3*z,V[c[z]]);h+=3*G;for(var J=[C,P],Q=0;Q<2;
1++Q)for(var K=J[Q],z=0;z<K.length;++z){var Z=31&K[z];R(t,h,X[Z]),h+=V[Z],Z>15&&(R(t,h,K[z]>>5&127),h+=K[z]>>12)}}else m=null,g=A,y=null,b=k;for(var z=0;z<f;++z){var ee=n[z];if(ee>255){var Z=ee>>18&31;F(t,h,m[Z+257]),h+=g[Z+257],Z>7&&(R(t,h,ee>>23&31),h+=s[Z]);var et=31ⅇF(t,h,y[et]),h+=b[et],et>3&&(F(t,h,ee>>5&8191),h+=u[et])}else F(t,h,m[ee]),h+=g[ee]}return F(t,h,m[256]),h+g[256]},j=new l([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),V=new i(0),W=function(e,t,r,n,a,c){var f=c.z||e.length,d=new i(n+f+5*(1+Math.ceil(f/7e3))+a),p=d.subarray(n,d.length-a),m=c.l,g=7&(c.r||0);if(t){g&&(p[0]=c.r>>3);for(var b=j[t-1],v=b>>13,x=8191&b,w=(1<<r)-1,A=c.p||new o(32768),k=c.h||new o(w+1),N=Math.ceil(r/3),T=2*N,I=function(t){return(e[t]^e[t+1]<<N^e[t+2]<<T)&w},E=new l(25e3),S=new o(288),L=new o(32),P=0,O=0,R=c.i||0,F=0,D=c.w||0,U=0;R+2<f;++R){var _=I(R),q=32767&R,V=k[_];if(A[q]=V,k[_]=q,D<=R){var W=f-R;if((P>7e3||F>24576)&&(W>423||!m)){g=z(e,p,0,E,S,L,O,F,U,R-U,g),F=P=O=0,U=R;for(var G=0;G<286;++G)S[G]=0;for(var G=0;G<30;++G)L[G]=0}var Y=2,H=0,$=x,X=q-V&32767;if(W>2&&_==I(R-X))for(var J=Math.min(v,W)-1,Q=Math.min(32767,R),K=Math.min(258,W);X<=Q&&--$&&q!=V;){if(e[R+Y]==e[R+Y-X]){for(var Z=0;Z<K&&e[R+Z]==e[R+Z-X];++Z);if(Z>Y){if(Y=Z,H=X,Z>J)break;for(var ee=Math.min(X,Z-2),et=0,G=0;G<ee;++G){var er=R-X+G&32767,en=A[er],ea=er-en&32767;ea>et&&(et=ea,V=er)}}}V=A[q=V],X+=q-V&32767}if(H){E[F++]=0x10000000|h[Y]<<18|y[H];var ei=31&h[Y],eo=31&y[H];O+=s[ei]+u[eo],++S[257+ei],++L[eo],D=R+Y,++P}else E[F++]=e[R],++S[e[R]]}}for(R=Math.max(R,D);R<f;++R)E[F++]=e[R],++S[e[R]];g=z(e,p,m,E,S,L,O,F,U,R-U,g),m||(c.r=7&g|p[g/8|0]<<3,g-=7,c.h=k,c.p=A,c.i=R,c.w=D)}else{for(var R=c.w||0;R<f+m;R+=65535){var el=R+65535;el>=f&&(p[g/8|0]=m,el=f),g=B(p,g+1,e.subarray(R,el))}c.i=f}return M(d,0,n+C(g)+a)},G=function(){var e=1,t=0;return{p:function(r){for(var n=e,a=t,i=0|r.length,o=0;o!=i;){for(var l=Math.min(o+2655,i);o<l;++o)a+=n+=r[o];n=(65535&n)+15*(n>>16),a=(65535&a)+15*(a>>16)}e=n,t=a},d:function(){return e%=65521,t%=65521,(255&e)<<24|(65280&e)<<8|(255&t)<<8|t>>8}}},Y=function(e,t,r,n,a){if(!a&&(a={l:1},t.dictionary)){var o=t.dictionary.subarray(-32768),l=new i(o.length+e.length);l.set(o),l.set(e,o.length),e=l,a.w=o.length}return W(e,null==t.level?6:t.level,null==t.mem?a.l?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(e.length)))):20:12+t.mem,r,n,a)},H=function(e,t){var r={};for(var n in e)r[n]=e[n];for(var n in t)r[n]=t[n];return r},$=function(e,t,r){for(var n=e(),a=e.toString(),i=a.slice(a.indexOf("[")+1,a.lastIndexOf("]")).replace(/\s+/g,"").split(","),o=0;o<n.length;++o){var l=n[o],s=i[o];if("function"==typeof l){t+=";"+s+"=";var u=l.toString();if(l.prototype){if(-1!=u.indexOf("[native code]")){var c=u.indexOf(" ",8)+1;t+=u.slice(c,u.indexOf("(",c))}else for(var f in t+=u,l.prototype)t+=";"+s+".prototype."+f+"="+l.prototype[f].toString()}else t+=u}else r[s]=l}return t},X=function(e){var t=[];for(var r in e)e[r].buffer&&t.push((e[r]=new e[r].constructor(e[r])).buffer);return t},J=function(e,t,r,n){if(!null[r]){for(var i="",o={},l=e.length-1,s=0;s<l;++s)i=$(e[s],i,o);null[r]={c:$(e[l],i,o),e:o}}var u=H({},null[r].e);return a(null[r].c+";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage="+t.toString()+"}",r,u,X(u),n)},Q=function(e){return postMessage(e,[e.buffer])},K=function(e){return e&&{out:e.size&&new i(e.size),dictionary:e.dictionary}},Z=function(e,t){return e[t]|e[t+1]<<8},ee=function(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0},et=function(e,t){return ee(e,t)+0x100000000*ee(e,t+4)},er=function(e,t,r){for(;r;++t)e[t]=r,r>>>=8};function en(e,t){return O(e,{i:2},t&&t.out,t&&t.dictionary)}var ea="undefined"!=typeof TextDecoder&&new TextDecoder;try{ea.decode(V,{stream:!0})}catch(e){}var ei=function(e){for(var t="",r=0;;){var n=e[r++],a=(n>127)+(n>223)+(n>239);if(r+a>e.length)return{s:t,r:M(e,r-1)};a?3==a?t+=String.fromCharCode(55296|(n=((15&n)<<18|(63&e[r++])<<12|(63&e[r++])<<6|63&e[r++])-65536)>>10,56320|1023&n):1&a?t+=String.fromCharCode((31&n)<<6|63&e[r++]):t+=String.fromCharCode((15&n)<<12|(63&e[r++])<<6|63&e[r++]):t+=String.fromCharCode(n)}},eo=function(e,t,r){var n=Z(e,t+28),a=function(e,t){if(t){for(var r="",n=0;n<e.length;n+=16384)r+=String.fromCharCode.apply(null,e.subarray(n,n+16384));return r}if(ea)return ea.decode(e);var a=ei(e),i=a.s,r=a.r;return r.length&&P(8),i}(e.subarray(t+46,t+46+n),!(2048&Z(e,t+8))),i=t+46+n,o=ee(e,t+20),l=r&&0xffffffff==o?el(e,i):[o,ee(e,t+24),ee(e,t+42)],s=l[0],u=l[1],c=l[2];return[Z(e,t+10),s,u,a,i+Z(e,t+30)+Z(e,t+32),c]},el=function(e,t){for(;1!=Z(e,t);t+=4+Z(e,t+2));return[et(e,t+12),et(e,t+4),et(e,t+20)]};function es(e,t){for(var r={},n=e.length-22;0x6054b50!=ee(e,n);--n)(!n||e.length-n>65558)&&P(13);var a=Z(e,n+8);if(!a)return{};var o=ee(e,n+16),l=0xffffffff==o||65535==a;if(l){var s=ee(e,n-12);
1(l=0x6064b50==ee(e,s))&&(a=ee(e,s+32),o=ee(e,s+48))}for(var u=t&&t.filter,c=0;c<a;++c){var f,d=eo(e,o,l),p=d[0],h=d[1],m=d[2],g=d[3],y=d[4],b=(f=d[5])+30+Z(e,f+26)+Z(e,f+28);o=y,(!u||u({name:g,size:h,originalSize:m,compression:p}))&&(p?8==p?r[g]=en(e.subarray(b,b+h),{out:new i(m)}):P(14,"unknown compression type "+p):r[g]=M(e,b,b+h))}return r}"function"==typeof queueMicrotask?queueMicrotask:"function"==typeof setTimeout&&setTimeout},37950:(e,t,r)=>{r.d(t,{AO:()=>eu,a8:()=>ea});var n={},a=function(e,t,r,a,i){var o=new Worker(n[t]||(n[t]=URL.createObjectURL(new Blob([e+';addEventListener("error",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'],{type:"text/javascript"}))));return o.onmessage=function(e){var t=e.data,r=t.$e$;if(r){var n=Error(r[0]);n.code=r[1],n.stack=r[2],i(n,null)}else i(null,t)},o.postMessage(r,a),o},i=Uint8Array,o=Uint16Array,l=Int32Array,s=new i([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]),u=new i([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]),c=new i([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),f=function(e,t){for(var r=new o(31),n=0;n<31;++n)r[n]=t+=1<<e[n-1];for(var a=new l(r[30]),n=1;n<30;++n)for(var i=r[n];i<r[n+1];++i)a[i]=i-r[n]<<5|n;return{b:r,r:a}},d=f(s,2),p=d.b,h=d.r;p[28]=258,h[258]=28;for(var m=f(u,0),g=m.b,y=m.r,b=new o(32768),v=0;v<32768;++v){var x=(43690&v)>>1|(21845&v)<<1;x=(61680&(x=(52428&x)>>2|(13107&x)<<2))>>4|(3855&x)<<4,b[v]=((65280&x)>>8|(255&x)<<8)>>1}for(var w=function(e,t,r){for(var n,a=e.length,i=0,l=new o(t);i<a;++i)e[i]&&++l[e[i]-1];var s=new o(t);for(i=1;i<t;++i)s[i]=s[i-1]+l[i-1]<<1;if(r){n=new o(1<<t);var u=15-t;for(i=0;i<a;++i)if(e[i])for(var c=i<<4|e[i],f=t-e[i],d=s[e[i]-1]++<<f,p=d|(1<<f)-1;d<=p;++d)n[b[d]>>u]=c}else for(i=0,n=new o(a);i<a;++i)e[i]&&(n[i]=b[s[e[i]-1]++]>>15-e[i]);return n},A=new i(288),v=0;v<144;++v)A[v]=8;for(var v=144;v<256;++v)A[v]=9;for(var v=256;v<280;++v)A[v]=7;for(var v=280;v<288;++v)A[v]=8;for(var k=new i(32),v=0;v<32;++v)k[v]=5;var N=w(A,9,1),T=w(k,5,1),I=function(e){for(var t=e[0],r=1;r<e.length;++r)e[r]>t&&(t=e[r]);return t},E=function(e,t,r){var n=t/8|0;return(e[n]|e[n+1]<<8)>>(7&t)&r},S=function(e,t){var r=t/8|0;return(e[r]|e[r+1]<<8|e[r+2]<<16)>>(7&t)},C=function(e){return(e+7)/8|0},M=function(e,t,r){return(null==t||t<0)&&(t=0),(null==r||r>e.length)&&(r=e.length),new i(e.subarray(t,r))}
1,L=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],P=function(e,t,r){var n=Error(t||L[e]);if(n.code=e,Error.captureStackTrace&&Error.captureStackTrace(n,P),!r)throw n;return n},O=function(e,t,r,n){var a=e.length,o=n?n.length:0;if(!a||t.f&&!t.l)return r||new i(0);var l=!r,f=l||2!=t.i,d=t.i;l&&(r=new i(3*a));var h=function(e){var t=r.length;if(e>t){var n=new i(Math.max(2*t,e));n.set(r),r=n}},m=t.f||0,y=t.p||0,b=t.b||0,v=t.l,x=t.d,A=t.m,k=t.n,L=8*a;do{if(!v){m=E(e,y,1);var O=E(e,y+1,3);if(y+=3,O){if(1==O)v=N,x=T,A=9,k=5;else if(2==O){var R=E(e,y,31)+257,F=E(e,y+10,15)+4,D=R+E(e,y+5,31)+1;y+=14;for(var U=new i(D),_=new i(19),q=0;q<F;++q)_[c[q]]=E(e,y+3*q,7);y+=3*F;for(var B=I(_),z=(1<<B)-1,j=w(_,B,1),q=0;q<D;){var V=j[E(e,y,z)];y+=15&V;var W=V>>4;if(W<16)U[q++]=W;else{var G=0,Y=0;for(16==W?(Y=3+E(e,y,3),y+=2,G=U[q-1]):17==W?(Y=3+E(e,y,7),y+=3):18==W&&(Y=11+E(e,y,127),y+=7);Y--;)U[q++]=G}}var H=U.subarray(0,R),$=U.subarray(R);A=I(H),k=I($),v=w(H,A,1),x=w($,k,1)}else P(1)}else{var W=C(y)+4,X=e[W-4]|e[W-3]<<8,J=W+X;if(J>a){d&&P(0);break}f&&h(b+X),r.set(e.subarray(W,J),b),t.b=b+=X,t.p=y=8*J,t.f=m;continue}if(y>L){d&&P(0);break}}f&&h(b+131072);for(var Q=(1<<A)-1,K=(1<<k)-1,Z=y;;Z=y){var G=v[S(e,y)&Q],ee=G>>4;if((y+=15&G)>L){d&&P(0);break}if(G||P(2),ee<256)r[b++]=ee;else if(256==ee){Z=y,v=null;break}else{var et=ee-254;if(ee>264){var q=ee-257,er=s[q];et=E(e,y,(1<<er)-1)+p[q],y+=er}var en=x[S(e,y)&K],ea=en>>4;en||P(3),y+=15&en;var $=g[ea];if(ea>3){var er=u[ea];$+=S(e,y)&(1<<er)-1,y+=er}if(y>L){d&&P(0);break}f&&h(b+131072);var ei=b+et;if(b<$){var eo=o-$,el=Math.min($,ei);for(eo+b<0&&P(3);b<el;++b)r[b]=n[eo+b]}for(;b<ei;++b)r[b]=r[b-$]}}t.l=v,t.p=Z,t.b=b,t.f=m,v&&(m=1,t.m=A,t.d=x,t.n=k)}while(!m);return b!=r.length&&l?M(r,0,b):r.subarray(0,b)},R=function(e,t,r){r<<=7&t;var n=t/8|0;e[n]|=r,e[n+1]|=r>>8},F=function(e,t,r){r<<=7&t;var n=t/8|0;e[n]|=r,e[n+1]|=r>>8,e[n+2]|=r>>16},D=function(e,t){for(var r=[],n=0;n<e.length;++n)e[n]&&r.push({s:n,f:e[n]});var a=r.length,l=r.slice();if(!a)return{t:V,l:0};if(1==a){var s=new i(r[0].s+1);return s[r[0].s]=1,{t:s,l:1}}r.sort(function(e,t){return e.f-t.f}),r.push({s:-1,f:25001});var u=r[0],c=r[1],f=0,d=1,p=2;for(r[0]={s:-1,f:u.f+c.f,l:u,r:c};d!=a-1;)u=r[r[f].f<r[p].f?f++:p++],c=r[f!=d&&r[f].f<r[p].f?f++:p++],r[d++]={s:-1,f:u.f+c.f,l:u,r:c};for(var h=l[0].s,n=1;n<a;++n)l[n].s>h&&(h=l[n].s);var m=new o(h+1),g=U(r[d-1],m,0);if(g>t){var n=0,y=0,b=g-t,v=1<<b;for(l.sort(function(e,t){return m[t.s]-m[e.s]||e.f-t.f});n<a;++n){var x=l[n].s;if(m[x]>t)y+=v-(1<<g-m[x]),m[x]=t;else break}for(y>>=b;y>0;){var w=l[n].s;m[w]<t?y-=1<<t-m[w]++-1:++n}for(;n>=0&&y;--n){var A=l[n].s;m[A]==t&&(--m[A],++y)}g=t}return{t:new i(m),l:g}},U=function(e,t,r){return -1==e.s?Math.max(U(e.l,t,r+1),U(e.r,t,r+1)):t[e.s]=r},_=function(e){for(var t=e.length;t&&!e[--t];);for(var r=new o(++t),n=0,a=e[0],i=1,l=function(e){r[n++]=e},s=1;s<=t;++s)if(e[s]==a&&s!=t)++i;else{if(!a&&i>2){for(;i>138;i-=138)l(32754);i>2&&(l(i>10?i-11<<5|28690:i-3<<5|12305),i=0)}else if(i>3){for(l(a),--i;i>6;i-=6)l(8304);i>2&&(l(i-3<<5|8208),i=0)}for(;i--;)l(a);i=1,a=e[s]}return{c:r.subarray(0,n),n:t}},q=function(e,t){for(var r=0,n=0;n<t.length;++n)r+=e[n]*t[n];return r},B=function(e,t,r){var n=r.length,a=C(t+2);e[a]=255&n,e[a+1]=n>>8,e[a+2]=255^e[a],e[a+3]=255^e[a+1];for(var i=0;i<n;++i)e[a+i+4]=r[i];return(a+4+n)*8},z=function(e,t,r,n,a,i,l,f,d,p,h){R(t,h++,r),++a[256];for(var m,g,y,b,v=D(a,15),x=v.t,N=v.l,T=D(i,15),I=T.t,E=T.l,S=_(x),C=S.c,M=S.n,L=_(I),P=L.c,O=L.n,U=new o(19),z=0;z<C.length;++z)++U[31&C[z]];for(var z=0;z<P.length;++z)++U[31&P[z]];for(var j=D(U,7),V=j.t,W=j.l,G=19;G>4&&!V[c[G-1]];--G);var Y=p+5<<3,H=q(a,A)+q(i,k)+l,$=q(a,x)+q(i,I)+l+14+3*G+q(U,V)+2*U[16]+3*U[17]+7*U[18];if(d>=0&&Y<=H&&Y<=$)return B(t,h,e.subarray(d,d+p));if(R(t,h,1+($<H)),h+=2,$<H){m=w(x,N,0),g=x,y=w(I,E,0),b=I;var X=w(V,W,0);R(t,h,M-257),R(t,h+5,O-1),R(t,h+10,G-4),h+=14;for(var z=0;z<G;++z)R(t,h+3*z,V[c[z]]);h+=3*G;for(var J=[C,P],Q=0;Q<2;
1++Q)for(var K=J[Q],z=0;z<K.length;++z){var Z=31&K[z];R(t,h,X[Z]),h+=V[Z],Z>15&&(R(t,h,K[z]>>5&127),h+=K[z]>>12)}}else m=null,g=A,y=null,b=k;for(var z=0;z<f;++z){var ee=n[z];if(ee>255){var Z=ee>>18&31;F(t,h,m[Z+257]),h+=g[Z+257],Z>7&&(R(t,h,ee>>23&31),h+=s[Z]);var et=31ⅇF(t,h,y[et]),h+=b[et],et>3&&(F(t,h,ee>>5&8191),h+=u[et])}else F(t,h,m[ee]),h+=g[ee]}return F(t,h,m[256]),h+g[256]},j=new l([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),V=new i(0),W=function(e,t,r,n,a,c){var f=c.z||e.length,d=new i(n+f+5*(1+Math.ceil(f/7e3))+a),p=d.subarray(n,d.length-a),m=c.l,g=7&(c.r||0);if(t){g&&(p[0]=c.r>>3);for(var b=j[t-1],v=b>>13,x=8191&b,w=(1<<r)-1,A=c.p||new o(32768),k=c.h||new o(w+1),N=Math.ceil(r/3),T=2*N,I=function(t){return(e[t]^e[t+1]<<N^e[t+2]<<T)&w},E=new l(25e3),S=new o(288),L=new o(32),P=0,O=0,R=c.i||0,F=0,D=c.w||0,U=0;R+2<f;++R){var _=I(R),q=32767&R,V=k[_];if(A[q]=V,k[_]=q,D<=R){var W=f-R;if((P>7e3||F>24576)&&(W>423||!m)){g=z(e,p,0,E,S,L,O,F,U,R-U,g),F=P=O=0,U=R;for(var G=0;G<286;++G)S[G]=0;for(var G=0;G<30;++G)L[G]=0}var Y=2,H=0,$=x,X=q-V&32767;if(W>2&&_==I(R-X))for(var J=Math.min(v,W)-1,Q=Math.min(32767,R),K=Math.min(258,W);X<=Q&&--$&&q!=V;){if(e[R+Y]==e[R+Y-X]){for(var Z=0;Z<K&&e[R+Z]==e[R+Z-X];++Z);if(Z>Y){if(Y=Z,H=X,Z>J)break;for(var ee=Math.min(X,Z-2),et=0,G=0;G<ee;++G){var er=R-X+G&32767,en=A[er],ea=er-en&32767;ea>et&&(et=ea,V=er)}}}V=A[q=V],X+=q-V&32767}if(H){E[F++]=0x10000000|h[Y]<<18|y[H];var ei=31&h[Y],eo=31&y[H];O+=s[ei]+u[eo],++S[257+ei],++L[eo],D=R+Y,++P}else E[F++]=e[R],++S[e[R]]}}for(R=Math.max(R,D);R<f;++R)E[F++]=e[R],++S[e[R]];g=z(e,p,m,E,S,L,O,F,U,R-U,g),m||(c.r=7&g|p[g/8|0]<<3,g-=7,c.h=k,c.p=A,c.i=R,c.w=D)}else{for(var R=c.w||0;R<f+m;R+=65535){var el=R+65535;el>=f&&(p[g/8|0]=m,el=f),g=B(p,g+1,e.subarray(R,el))}c.i=f}return M(d,0,n+C(g)+a)},G=function(){var e=1,t=0;return{p:function(r){for(var n=e,a=t,i=0|r.length,o=0;o!=i;){for(var l=Math.min(o+2655,i);o<l;++o)a+=n+=r[o];n=(65535&n)+15*(n>>16),a=(65535&a)+15*(a>>16)}e=n,t=a},d:function(){return e%=65521,t%=65521,(255&e)<<24|(65280&e)<<8|(255&t)<<8|t>>8}}},Y=function(e,t,r,n,a){if(!a&&(a={l:1},t.dictionary)){var o=t.dictionary.subarray(-32768),l=new i(o.length+e.length);l.set(o),l.set(e,o.length),e=l,a.w=o.length}return W(e,null==t.level?6:t.level,null==t.mem?a.l?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(e.length)))):20:12+t.mem,r,n,a)},H=function(e,t){var r={};for(var n in e)r[n]=e[n];for(var n in t)r[n]=t[n];return r},$=function(e,t,r){for(var n=e(),a=e.toString(),i=a.slice(a.indexOf("[")+1,a.lastIndexOf("]")).replace(/\s+/g,"").split(","),o=0;o<n.length;++o){var l=n[o],s=i[o];if("function"==typeof l){t+=";"+s+"=";var u=l.toString();if(l.prototype){if(-1!=u.indexOf("[native code]")){var c=u.indexOf(" ",8)+1;t+=u.slice(c,u.indexOf("(",c))}else for(var f in t+=u,l.prototype)t+=";"+s+".prototype."+f+"="+l.prototype[f].toString()}else t+=u}else r[s]=l}return t},X=function(e){var t=[];for(var r in e)e[r].buffer&&t.push((e[r]=new e[r].constructor(e[r])).buffer);return t},J=function(e,t,r,n){if(!null[r]){for(var i="",o={},l=e.length-1,s=0;s<l;++s)i=$(e[s],i,o);null[r]={c:$(e[l],i,o),e:o}}var u=H({},null[r].e);return a(null[r].c+";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage="+t.toString()+"}",r,u,X(u),n)},Q=function(e){return postMessage(e,[e.buffer])},K=function(e){return e&&{out:e.size&&new i(e.size),dictionary:e.dictionary}},Z=function(e,t){return e[t]|e[t+1]<<8},ee=function(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0},et=function(e,t){return ee(e,t)+0x100000000*ee(e,t+4)},er=function(e,t,r){for(;r;++t)e[t]=r,r>>>=8};function en(e,t){return O(e,{i:2},t&&t.out,t&&t.dictionary)}function ea(e,t){var r,n;return O(e.subarray((r=e,n=t&&t.dictionary,((15&r[0])!=8||r[0]>>4>7||(r[0]<<8|r[1])%31)&&P(6,"invalid zlib data"),(r[1]>>5&1)==+!n&&P(6,"invalid zlib data: "+(32&r[1]?"need":"unexpected")+" dictionary"),(r[1]>>3&4)+2),-4),{i:2},t&&t.out,t&&t.dictionary)}var ei="undefined"!=typeof TextDecoder&&new TextDecoder;try{ei.decode(V,{stream:!0})}catch(e){}var eo=function(e){for(var t="",r=0;;){var n=e[r++],a=(n>127)+(n>223)+(n>239);if(r+a>e.length)return{s:t,r:M(e,r-1)};a?3==a?t+=String.fromCharCode(55296|(n=((15&n)<<18|(63&e[r++])<<12|(63&e[r++])<<6|63&e[r++])-65536)>>10,56320|1023&n):1&a?t+=String.fromCharCode((31&n)<<6|63&e[r++]):t+=String.fromCharCode((1
15&n)<<12|(63&e[r++])<<6|63&e[r++]):t+=String.fromCharCode(n)}},el=function(e,t,r){var n=Z(e,t+28),a=function(e,t){if(t){for(var r="",n=0;n<e.length;n+=16384)r+=String.fromCharCode.apply(null,e.subarray(n,n+16384));return r}if(ei)return ei.decode(e);var a=eo(e),i=a.s,r=a.r;return r.length&&P(8),i}(e.subarray(t+46,t+46+n),!(2048&Z(e,t+8))),i=t+46+n,o=ee(e,t+20),l=r&&0xffffffff==o?es(e,i):[o,ee(e,t+24),ee(e,t+42)],s=l[0],u=l[1],c=l[2];return[Z(e,t+10),s,u,a,i+Z(e,t+30)+Z(e,t+32),c]},es=function(e,t){for(;1!=Z(e,t);t+=4+Z(e,t+2));return[et(e,t+12),et(e,t+4),et(e,t+20)]};function eu(e,t){for(var r={},n=e.length-22;0x6054b50!=ee(e,n);--n)(!n||e.length-n>65558)&&P(13);var a=Z(e,n+8);if(!a)return{};var o=ee(e,n+16),l=0xffffffff==o||65535==a;if(l){var s=ee(e,n-12);(l=0x6064b50==ee(e,s))&&(a=ee(e,s+32),o=ee(e,s+48))}for(var u=t&&t.filter,c=0;c<a;++c){var f,d=el(e,o,l),p=d[0],h=d[1],m=d[2],g=d[3],y=d[4],b=(f=d[5])+30+Z(e,f+26)+Z(e,f+28);o=y,(!u||u({name:g,size:h,originalSize:m,compression:p}))&&(p?8==p?r[g]=en(e.subarray(b,b+h),{out:new i(m)}):P(14,"unknown compression type "+p):r[g]=M(e,b,b+h))}return r}"function"==typeof queueMicrotask?queueMicrotask:"function"==typeof setTimeout&&setTimeout},12511:(e,t,r)=>{r.d(t,{R:()=>o});var n=r(12),a=r(37950);let i=n.er$;class o extends n.aHM{load(e,t,r,a){let i=this,o=new n.Y9S(i.manager);o.setPath(i.path),o.setResponseType("arraybuffer"),o.setRequestHeader(i.requestHeader),o.setWithCredentials(i.withCredentials),o.load(e,function(r){try{t(i.parse(r))}catch(t){a?a(t):console.error(t),i.manager.itemError(e)}},r,a)}parse(e){let t=this,r=new n.Tap(this.manager);function o(e){let t=[],r=new DOMParser().parseFromString(e,"application/xml").querySelectorAll("Relationship");for(let e=0;e<r.length;e++){let n=r[e],a={target:n.getAttribute("Target"),id:n.getAttribute("Id"),type:n.getAttribute("Type")};t.push(a)}return t}function l(e){let t=e.children,r={};for(let e=0;e<t.length;e++){let n={type:t[e].nodeName.substring(2)};for(let r=0;r<t[e].attributes.length;r++){let a=t[e].attributes[r];a.specified&&(n[a.name]=a.value)}r[t[e].getAttribute("identifier")]=n}return r}function s(e){let t=[];e.split(" ").forEach(function(e){t.push(parseFloat(e))});let r=new n.kn4;return r.set(t[0],t[3],t[6],t[9],t[1],t[4],t[7],t[10],t[2],t[5],t[8],t[11],0,0,0,1),r}function u(e,t,a,o){let l=e.texid,s=a.resources.texture2d[l];if(!s)return null;{let e=new Blob([o[s.path]],{type:s.contenttype}),t=URL.createObjectURL(e),a=r.load(t,function(){URL.revokeObjectURL(t)});
1switch(a.colorSpace=i,s.tilestyleu){case"wrap":default:a.wrapS=n.GJx;break;case"mirror":a.wrapS=n.kTW;break;case"none":case"clamp":a.wrapS=n.ghU}switch(s.tilestylev){case"wrap":default:a.wrapT=n.GJx;break;case"mirror":a.wrapT=n.kTW;break;case"none":case"clamp":a.wrapT=n.ghU}switch(s.filter){case"auto":default:a.magFilter=n.k6q,a.minFilter=n.$_I;break;case"linear":a.magFilter=n.k6q,a.minFilter=n.k6q,a.generateMipmaps=!1;break;case"nearest":a.magFilter=n.hxR,a.minFilter=n.hxR,a.generateMipmaps=!1}return a}}function c(e,t,r,a,i){let o=new n.YJl,l=function(e,t,r,a,i,o){let l=Object.keys(e),s=[];for(let c=0,p=l.length;c<p;c++){let p=l[c],h=e[p];switch(void 0!==a.resources.texture2dgroup[p]?"texture":void 0!==a.resources.basematerials[p]?"material":void 0!==a.resources.colorgroup[p]?"vertexColors":"default"===p?"default":void 0){case"material":let m=function(e,t,r,a,i,o,l){let s=l.pindex,u={};for(let e=0,r=t.length;e<r;e++){let r=t[e],n=void 0!==r.p1?r.p1:s;void 0===u[n]&&(u[n]=[]),u[n].push(r)}let c=Object.keys(u),p=[];for(let t=0,s=c.length;t<s;t++){let s=c[t],h=u[s],m=f(e.basematerials[s],a,i,o,l,d),g=new n.LoY,y=[],b=r.vertices;for(let e=0,t=h.length;e<t;e++){let t=h[e];y.push(b[3*t.v1+0]),y.push(b[3*t.v1+1]),y.push(b[3*t.v1+2]),y.push(b[3*t.v2+0]),y.push(b[3*t.v2+1]),y.push(b[3*t.v2+2]),y.push(b[3*t.v3+0]),y.push(b[3*t.v3+1]),y.push(b[3*t.v3+2])}g.setAttribute("position",new n.qtW(y,3));let v=new n.eaF(g,m);p.push(v)}return p}(a.resources.basematerials[p],h,t,r,a,i,o);for(let e=0,t=m.length;e<t;e++)s.push(m[e]);break;case"texture":let g=a.resources.texture2dgroup[p];s.push(function(e,t,r,a,i,o,l){let s=new n.LoY,c=[],d=[],p=r.vertices,h=e.uvs;for(let e=0,r=t.length;e<r;e++){let r=t[e];c.push(p[3*r.v1+0]),c.push(p[3*r.v1+1]),c.push(p[3*r.v1+2]),c.push(p[3*r.v2+0]),c.push(p[3*r.v2+1]),c.push(p[3*r.v2+2]),c.push(p[3*r.v3+0]),c.push(p[3*r.v3+1]),c.push(p[3*r.v3+2]),d.push(h[2*r.p1+0]),d.push(h[2*r.p1+1]),d.push(h[2*r.p2+0]),d.push(h[2*r.p2+1]),d.push(h[2*r.p3+0]),d.push(h[2*r.p3+1])}s.setAttribute("position",new n.qtW(c,3)),s.setAttribute("uv",new n.qtW(d,2));let m=f(e,a,i,o,l,u),g=new n.tXL({map:m,flatShading:!0});return new n.eaF(s,g)}(g,h,t,r,a,i,o));break;case"vertexColors":let y=a.resources.colorgroup[p];s.push(function(e,t,r,a){let i=new n.LoY,o=[],l=[],s=r.vertices,u=e.colors;for(let e=0,r=t.length;e<r;e++){let r=t[e],n=r.v1,i=r.v2,c=r.v3;o.push(s[3*n+0]),o.push(s[3*n+1]),o.push(s[3*n+2]),o.push(s[3*i+0]),o.push(s[3*i+1]),o.push(s[3*i+2]),o.push(s[3*c+0]),o.push(s[3*c+1]),o.push(s[3*c+2]);let f=void 0!==r.p1?r.p1:a.pindex,d=void 0!==r.p2?r.p2:f,p=void 0!==r.p3?r.p3:f;l.push(u[3*f+0]),l.push(u[3*f+1]),l.push(u[3*f+2]),l.push(u[3*d+0]),l.push(u[3*d+1]),l.push(u[3*d+2]),l.push(u[3*p+0]),l.push(u[3*p+1]),l.push(u[3*p+2])}i.setAttribute("position",new n.qtW(o,3)),i.setAttribute("color",new n.qtW(l,3));let c=new n.tXL({vertexColors:!0,flatShading:!0});return new n.eaF(i,c)}(y,h,t,o));break;case"default":s.push(function(e){let t=new n.LoY;t.setIndex(new n.THS(e.triangles,1)),t.setAttribute("position",new n.THS(e.vertices,3));let r=new n.tXL({name:n.aHM.DEFAULT_MATERIAL_NAME,color:0xffffff,flatShading:!0});return new n.eaF(t,r)}(t));break;default:console.error("THREE.3MFLoader: Unsupported resource type.")}}if(o.name)for(let e=0;e<s.length;e++)s[e].name=o.name;return s}(function(e,t){let r={},n=e.triangleProperties,a=t.pid;for(let e=0,t=n.length;e<t;e++){let t=n[e],i=void 0!==t.pid?t.pid:a;void 0===i&&(i="default"),void 0===r[i]&&(r[i]=[]),r[i].push(t)}return r}(e,i),e,t,r,a,i);for(let e=0,t=l.length;e<t;e++)o.add(l[e]);return o}function f(e,t,r,n,a,i){return void 0!==e.build||(e.build=i(e,t,r,n,a)),e.build}function d(e,t,r){let a;let o=e.displaypropertiesid,l=r.resources.pbmetallicdisplayproperties;if(null!==o&&void 0!==l[o]){let t=l[o].data[e.index];a=new n._4j({flatShading:!0,roughness:t.roughness,metalness:t.metallicness})}else a=new n.tXL({flatShading:!0});a.name=e.name;let s=e.displaycolor,u=s.substring(0,7);return a.color.setStyle(u,i),9===s.length&&(a.opacity=parseInt(s.charAt(7)+s.charAt(8),16)/255),a}function p(e,t,r,a){let i=new n.YJl;for(let n=0;n<e.length;n++){let o=e[n],l=t[o.objectId];void 0===l&&(h(o.objectId,t,r,a),l=t[o.objectId]);let s=l.clone(),u=o.transform;u&&s.applyMatrix4(u),i.add(s)}return i}function h(e,r,n,a){let i=n.resources.object[e];if(i.mesh){let e=i.mesh;!function(e,r,n){if(!e)return;let a=[],i=Object.keys(e);for(let e=0;e<i.length;e++){let r=i[e];for(let e=0;e<t.availableExtensions.length;e++){let n=t.availableExtensions[e];n.ns===r&&a.push(n)}}for(let t=0;t<a.length;t++){let i=a[t];i.apply(n,e[i.ns],r)}}(n.extensions,e,n.xml),r[i.id]=f(e,r,n,a,i,c)}else{let e=i.components;r[i.id]=f(e,r,n,a,i,p)}i.name&&(r[i.id].name=i.name),n.resources.implicitfunction}let m=function(e){let t,r,u,c=null,f=null,d=[],p=[],h={},m={},g=new TextDecoder;try{c=a.AO(new Uint8Array(e))}catch(e){if(e instanceof ReferenceError)return console.error("THREE.3MFLoader: fflate missing and file is compressed."),null}let y=null;for(f in c)f.match(/\_rels\/.rels$/)?t=f:f.match(/3D\/_rels\/.*\.model\.rels$/)?r=f:f.match(/^3D\/[^\/]*\.model$/)?y=f:f.match(/^3D\/.*\/.*\.model$/)?d.push(f):f.match(/^3D\/Textures?\/.*/)&&p.push(f);if(d.push(y),void 0===t)throw Error("THREE.ThreeMFLoader: Cannot find relationship file `rels` in 3MF archive.");let b=c[t],v=o(g.decode(b));if(r){let e=c[r];u=o(g.decode(e))}for(let e=0;e<d.length;e++){let t=d[e],r=c[t],a=g.decode(r),o=new DOMParser().parseFromString(a,"application/xml");"model"!==o.documentElement.nodeName.toLowerCase()&&console.error("THREE.3MFLoader: Error loading 3MF - no 3MF document found: ",t);let u=o.querySelector("model"),f={};for(let e=0;e<u.attributes.length;e++){let t=u.attributes[e];t.name.match(/^xmlns:(.+)$/)&&(f[t.value]=RegExp.$1)}let p=function(e){let t={unit:e.getAttribute("unit")||"millimeter"},r=e.querySelectorAll("metadata");r&&(t.metadata=function(e){let t={};for(let r=0;r<e.length;r++){let n=e[r],a=n.getAttribute("name");0<=["Title","Designer","Description","Copyright","LicenseTerms","Rating","CreationDate","ModificationDate"].indexOf(a)&&(t[a]=n.textContent)}return t}(r));let a=e.querySelector("resources");a&&(t.resources=function(e){let t={};t.basematerials={};let r=e.querySelectorAll("basematerials");for(let e=0;e<r.length;e++){let n=function(e){let t={id:e.getAttribute("id"),basematerials:[]}
1,r=e.querySelectorAll("base");for(let e=0;e<r.length;e++){let n=function(e){let t={};return t.name=e.getAttribute("name"),t.displaycolor=e.getAttribute("displaycolor"),t.displaypropertiesid=e.getAttribute("displaypropertiesid"),t}(r[e]);n.index=e,t.basematerials.push(n)}return t}(r[e]);t.basematerials[n.id]=n}t.texture2d={};let a=e.querySelectorAll("texture2d");for(let e=0;e<a.length;e++){var o;let r={id:(o=a[e]).getAttribute("id"),path:o.getAttribute("path"),contenttype:o.getAttribute("contenttype"),tilestyleu:o.getAttribute("tilestyleu"),tilestylev:o.getAttribute("tilestylev"),filter:o.getAttribute("filter")};t.texture2d[r.id]=r}t.colorgroup={};let u=e.querySelectorAll("colorgroup");for(let e=0;e<u.length;e++){let r=function(e){let t={id:e.getAttribute("id"),displaypropertiesid:e.getAttribute("displaypropertiesid")},r=e.querySelectorAll("color"),a=[],o=new n.Q1f;for(let e=0;e<r.length;e++){let t=r[e].getAttribute("color");o.setStyle(t.substring(0,7),i),a.push(o.r,o.g,o.b)}return t.colors=new Float32Array(a),t}(u[e]);t.colorgroup[r.id]=r}let c=e.querySelectorAll("implicitfunction");c.length>0&&(t.implicitfunction={});for(let e=0;e<c.length;e++){let r=function(e){let t={id:e.getAttribute("id"),displayname:e.getAttribute("displayname")},r=e.children,n={};for(let e=0;e<r.length;e++){let t=r[e];if("i:in"===t.nodeName||"i:out"===t.nodeName)n["i:in"===t.nodeName?"inputs":"outputs"]=l(t);else{let e=t.children,r={op:t.nodeName.substring(2),identifier:t.getAttribute("identifier")};for(let t=0;t<e.length;t++)r[e[t].nodeName.substring(2)]=l(e[t]);n[r.identifier]=r}}return t.operations=n,t}(c[e]);t.implicitfunction[r.id]=r}t.pbmetallicdisplayproperties={};let f=e.querySelectorAll("pbmetallicdisplayproperties");for(let e=0;e<f.length;e++){let r=function(e){let t={id:e.getAttribute("id")},r=e.querySelectorAll("pbmetallic"),n=[];for(let e=0;e<r.length;e++){let t=r[e];n.push({name:t.getAttribute("name"),metallicness:parseFloat(t.getAttribute("metallicness")),roughness:parseFloat(t.getAttribute("roughness"))})}return t.data=n,t}(f[e]);t.pbmetallicdisplayproperties[r.id]=r}t.texture2dgroup={};let d=e.querySelectorAll("texture2dgroup");for(let e=0;e<d.length;e++){let r=function(e){let t={id:e.getAttribute("id"),texid:e.getAttribute("texid"),displaypropertiesid:e.getAttribute("displaypropertiesid")},r=e.querySelectorAll("tex2coord"),n=[];for(let e=0;e<r.length;e++){let t=r[e],a=t.getAttribute("u"),i=t.getAttribute("v");n.push(parseFloat(a),parseFloat(i))}return t.uvs=new Float32Array(n),t}(d[e]);t.texture2dgroup[r.id]=r}t.object={};let p=e.querySelectorAll("object");for(let e=0;e<p.length;e++){let r=function(e){let t={type:e.getAttribute("type")},r=e.getAttribute("id");r&&(t.id=r);let n=e.getAttribute("pid");n&&(t.pid=n);let a=e.getAttribute("pindex");a&&(t.pindex=a);let i=e.getAttribute("thumbnail");i&&(t.thumbnail=i);let o=e.getAttribute("partnumber");o&&(t.partnumber=o);let l=e.getAttribute("name");l&&(t.name=l);let u=e.querySelector("mesh");u&&(t.mesh=function(e){let t={},r=[],n=e.querySelectorAll("vertices vertex");for(let e=0;e<n.length;e++){let t=n[e],a=t.getAttribute("x"),i=t.getAttribute("y"),o=t.getAttribute("z");r.push(parseFloat(a),parseFloat(i),parseFloat(o))}t.vertices=new Float32Array(r);let a=[],i=[],o=e.querySelectorAll("triangles triangle");for(let e=0;e<o.length;e++){let t=o[e],r=t.getAttribute("v1"),n=t.getAttribute("v2"),l=t.getAttribute("v3"),s=t.getAttribute("p1"),u=t.getAttribute("p2"),c=t.getAttribute("p3"),f=t.getAttribute("pid"),d={};d.v1=parseInt(r,10),d.v2=parseInt(n,10),d.v3=parseInt(l,10),i.push(d.v1,d.v2,d.v3),s&&(d.p1=parseInt(s,10)),u&&(d.p2=parseInt(u,10)),c&&(d.p3=parseInt(c,10)),f&&(d.pid=f),0<Object.keys(d).length&&a.push(d)}return t.triangleProperties=a,t.triangles=new Uint32Array(i),t}(u));let c=e.querySelector("components");return c&&(t.components=function(e){let t=[],r=e.querySelectorAll("component");for(let e=0;e<r.length;e++){let n=function(e){let t={};t.objectId=e.getAttribute("objectid");let r=e.getAttribute("transform");return r&&(t.transform=s(r)),t}(r[e]);t.push(n)}return t}(c)),t}(p[e]);t.object[r.id]=r}return t}(a));let o=e.querySelector("build");return o&&(t.build=function(e){let t=[],r=e.querySelectorAll("item");for(let e=0;e<r.length;e++){let n=r[e],a={objectId:n.getAttribute("objectid")},i=n.getAttribute("transform");i&&(a.transform=s(i)),t.push(a)}return t}(o)),t}(u);p.xml=u,0<Object.keys(f).length&&(p.extensions=f),h[t]=p}for(let e=0;e<p.length;e++){let t=p[e];m[t]=c[t].buffer}return{rels:v,modelRels:u,model:h,printTicket:{},texture:m}}(e);return function(e,t){let r=new n.YJl,a=function(e){for(let t=0;t<e.length;t++){let r=e[t];if("model"===r.target.split(".").pop().toLowerCase())return r}}(t.rels),i=t.model[a.target.substring(1)].build;for(let t=0;t<i.length;t++){let n=i[t],a=e[n.objectId].clone(),o=n.transform;o&&a.applyMatrix4(o),r.add(a)}return r}(function(e){let t=e.model,r=e.modelRels,n={},a=Object.keys(t),i={};if(r)for(let t=0,n=r.length;t<n;t++){let n=r[t],a=n.target.substring(1);e.texture[a]&&(i[n.target]=e.texture[a])}for(let e=0;e<a.length;e++){let r=t[a[e]],o=Object.keys(r.resources.object);for(let e=0;e<o.length;e++)h(o[e],n,r,i)}return n}(m),m)}addExtension(e){this.availableExtensions.push(e)}constructor(e){super(e),this.availableExtensions=[]}}},72729:(e,t,r)=>{r.d(t,{Q:()=>i});var n=r(12),a=r(37950);class i extends n.aHM{load(e,t,r,a){let i=this,o=new n.Y9S(i.manager);o.setPath(i.path),o.setResponseType("arraybuffer"),o.setRequestHeader(i.requestHeader),o.setWithCredentials(i.withCredentials),o.load(e,function(r){try{t(i.parse(r))}catch(t){a?a(t):console.error(t),i.manager.itemError(e)}},r,a)}parse(e){let t,r;function i(e){let t={r:1,g:1,b:1,a:1};for(let r=0;r<e.childNodes.length;r++){let n=e.childNodes[r];"r"===n.nodeName?t.r=n.textContent:"g"===n.nodeName?t.g=n.textContent:"b"===n.nodeName?t.b=n.textContent:"a"===n.nodeName&&(t.a=n.textContent)}return t}let o=function(e){let t=new DataView(e);if("PK"===String.fromCharCode(t.getUint8(0),t.getUint8(1))){let r=null,n=null;try{r=a.AO(new Uint8Array(e))}catch(e){if(e instanceof ReferenceError)return null}for(n in r)if(".amf"===n.toLowerCase().slice(-4))break;t=new DataView(r[n].buffer)}let r=new TextDecoder().decode(t),n=new DOMParser().parseFromString(r,"application/xml");return"amf"!==n.documentElement.nodeName.toLowerCase()?null:n}(e),l="",s="",u=function(e){let t=1,r="millimeter";void 0!==e.documentElement.attributes.unit&&(r=e.documentElement.attributes.unit.value.toLowerCase());let n={millimeter:1,inch:25.4,feet:304.8,meter:1e3,micron:.001};return void 0!==n[r]&&(t=n[r]),t}(o),c={},f={},d=o.documentElement.childNodes;for(t=0;t<d.length;t++){let e=d[t];
1if("metadata"===e.nodeName)void 0!==e.attributes.type&&("name"===e.attributes.type.value?l=e.textContent:"author"===e.attributes.type.value&&(s=e.textContent));else if("material"===e.nodeName){let t=function(e){let t="AMF Material",r=e.attributes.id.textContent,a={r:1,g:1,b:1,a:1},o=null;for(let r=0;r<e.childNodes.length;r++){let n=e.childNodes[r];"metadata"===n.nodeName&&void 0!==n.attributes.type?"name"===n.attributes.type.value&&(t=n.textContent):"color"===n.nodeName&&(a=i(n))}return o=new n.tXL({flatShading:!0,color:new n.Q1f(a.r,a.g,a.b),name:t}),1!==a.a&&(o.transparent=!0,o.opacity=a.a),{id:r,material:o}}(e);c[t.id]=t.material}else if("object"===e.nodeName){let t=function(e){let t=e.attributes.id.textContent,r={name:"amfobject",meshes:[]},n=null,a=e.firstElementChild;for(;a;){if("metadata"===a.nodeName)void 0!==a.attributes.type&&"name"===a.attributes.type.value&&(r.name=a.textContent);else if("color"===a.nodeName)n=i(a);else if("mesh"===a.nodeName){let e=a.firstElementChild,t={vertices:[],normals:[],volumes:[],color:n};for(;e;){if("vertices"===e.nodeName){let r=function(e){let t=[],r=[],n=e.firstElementChild;for(;n;){if("vertex"===n.nodeName){let e=n.firstElementChild;for(;e;){if("coordinates"===e.nodeName){let r=e.getElementsByTagName("x")[0].textContent,n=e.getElementsByTagName("y")[0].textContent,a=e.getElementsByTagName("z")[0].textContent;t.push(r,n,a)}else if("normal"===e.nodeName){let t=e.getElementsByTagName("nx")[0].textContent,n=e.getElementsByTagName("ny")[0].textContent,a=e.getElementsByTagName("nz")[0].textContent;r.push(t,n,a)}e=e.nextElementSibling}}n=n.nextElementSibling}return{vertices:t,normals:r}}(e);t.normals=t.normals.concat(r.normals),t.vertices=t.vertices.concat(r.vertices)}else"volume"===e.nodeName&&t.volumes.push(function(e){let t={name:"",triangles:[],materialId:null},r=e.firstElementChild;for(void 0!==e.attributes.materialid&&(t.materialId=e.attributes.materialid.nodeValue);r;){if("metadata"===r.nodeName)void 0!==r.attributes.type&&"name"===r.attributes.type.value&&(t.name=r.textContent);else if("triangle"===r.nodeName){let e=r.getElementsByTagName("v1")[0].textContent,n=r.getElementsByTagName("v2")[0].textContent,a=r.getElementsByTagName("v3")[0].textContent;t.triangles.push(e,n,a)}r=r.nextElementSibling}return t}(e));e=e.nextElementSibling}r.meshes.push(t)}a=a.nextElementSibling}return{id:t,obj:r}}(e);f[t.id]=t.obj}}let p=new n.YJl,h=new n.tXL({name:n.aHM.DEFAULT_MATERIAL_NAME,color:0xaaaaff,flatShading:!0});for(let e in p.name=l,p.userData.author=s,p.userData.loader="AMF",f){let a=f[e],i=a.meshes,o=new n.YJl;for(t=0,o.name=a.name||"";t<i.length;t++){let e=h,a=i[t],l=new n.qtW(a.vertices,3),s=null;if(a.normals.length&&(s=new n.qtW(a.normals,3)),a.color){let t=a.color;(e=h.clone()).color=new n.Q1f(t.r,t.g,t.b),1!==t.a&&(e.transparent=!0,e.opacity=t.a)}let f=a.volumes;for(r=0;r<f.length;r++){let t=f[r],a=new n.LoY,i=e;a.setIndex(t.triangles),a.setAttribute("position",l.clone()),s&&a.setAttribute("normal",s.clone()),void 0!==c[t.materialId]&&(i=c[t.materialId]),a.scale(u,u,u),o.add(new n.eaF(a,i.clone()))}}p.add(o)}return p}constructor(e){super(e)}}},56955:(e,t,r)=>{r.d(t,{q:()=>i});var n=r(12),a=r(37741);class i extends n.aHM{load(e,t,r,a){let i=this,o=""===i.path?n.r6x.extractUrlBase(e):i.path,l=new n.Y9S(i.manager);l.setPath(i.path),l.setRequestHeader(i.requestHeader),l.setWithCredentials(i.withCredentials),l.load(e,function(r){try{t(i.parse(r,o))}catch(t){a?a(t):console.error(t),i.manager.itemError(e)}},r,a)}parse(e,t){var r,i,o,l;let s;function u(e,t){let r=[],n=e.childNodes;for(let e=0,a=n.length;e<a;e++){let a=n[e];a.nodeName===t&&r.push(a)}return r}function c(e){if(0===e.length)return[];let t=e.trim().split(/\s+/),r=Array(t.length);for(let e=0,n=t.length;e<n;e++)r[e]=parseFloat(t[e]);return r}function f(e){if(0===e.length)return[];let t=e.trim().split(/\s+/),r=Array(t.length);for(let e=0,n=t.length;e<n;e++)r[e]=parseInt(t[e]);return r}function d(e){return e.substring(1)}function p(e){return 0===Object.keys(e).length}function h(e,t,r,n){let a=u(e,t)[0];if(void 0!==a){let e=u(a,r);for(let t=0;t<e.length;t++)n(e[t])}}function m(e,t){for(let r in e)e[r].build=t(e[r])}function g(e,t){return void 0!==e.build||(e.build=t(e)),e.build}function y(e){let t=[],r=e.channels,a=e.samplers,i=e.sources;for(let e in r)if(r.hasOwnProperty(e)){let o=r[e],l=a[o.sampler],s=l.inputs.INPUT,u=l.input
1s.OUTPUT;!function(e,t){let r=e.keyframes,a=e.name,i=[],o=[],l=[],s=[];for(let e=0,t=r.length;e<t;e++){let t=r[e],n=t.time,a=t.value;z.fromArray(a).transpose(),z.decompose(v,w,x),i.push(n),o.push(v.x,v.y,v.z),l.push(w.x,w.y,w.z,w.w),s.push(x.x,x.y,x.z)}o.length>0&&t.push(new n.RiT(a+".position",i,o)),l.length>0&&t.push(new n.MBL(a+".quaternion",i,l)),s.length>0&&t.push(new n.RiT(a+".scale",i,s))}(function(e,t,r){let n,a,i,o,l,s;let u=es.nodes[e.id],c=J(u.id),f=u.transforms[e.sid],d=u.matrix.clone().transpose(),p={};if("matrix"===f)for(i=0,o=t.array.length;i<o;i++)if(n=t.array[i],a=i*r.stride,void 0===p[n]&&(p[n]={}),!0===e.arraySyntax){let t=r.array[a],i=e.indices[0]+4*e.indices[1];p[n][i]=t}else for(l=0,s=r.stride;l<s;l++)p[n][l]=r.array[a+l];let h=function(e,t){let r=[];for(let t in e)r.push({time:parseFloat(t),value:e[t]});r.sort(function(e,t){return e.time-t.time});for(let e=0;e<16;e++)!function(e,t,r){let n,a,i;let o=!0;for(a=0,i=e.length;a<i;a++)void 0===(n=e[a]).value[t]?n.value[t]=null:o=!1;if(!0===o)for(a=0,i=e.length;a<i;a++)(n=e[a]).value[t]=r;else!function(e,t){let r,n;for(let a=0,i=e.length;a<i;a++){let i=e[a];if(null===i.value[t]){if(r=function(e,t,r){for(;t>=0;){let n=e[t];if(null!==n.value[r])return n;t--}return null}(e,a,t),n=function(e,t,r){for(;t<e.length;){let n=e[t];if(null!==n.value[r])return n;t++}return null}(e,a,t),null===r){i.value[t]=n.value[t];continue}if(null===n){i.value[t]=r.value[t];continue}!function(e,t,r,n){if(r.time-t.time==0){e.value[n]=t.value[n];return}e.value[n]=(e.time-t.time)*(r.value[n]-t.value[n])/(r.time-t.time)+t.value[n]}(i,r,n,t)}}}(e,t)}(r,e,t.elements[e]);return r}(p,d);return{name:c.uuid,keyframes:h}}(o,i[s],i[u]),t)}return t}function b(e){return g(es.animations[e],y)}let v=new n.Pq0,x=new n.Pq0,w=new n.PTz;function A(e){let t=[],r=e.name,a=e.end-e.start||-1,i=e.animations;for(let e=0,r=i.length;e<r;e++){let r=b(i[e]);for(let e=0,n=r.length;e<n;e++)t.push(r[e])}return new n.tz3(r,a,t)}function k(e){let t={id:e.id},r=es.geometries[t.id];return void 0!==e.skin&&(t.skin=function(e){let t,r,a;let i={joints:[],indices:{array:[],stride:4},weights:{array:[],stride:4}},o=e.sources,l=e.vertexWeights,s=l.vcount,u=l.v,c=l.inputs.JOINT.offset,f=l.inputs.WEIGHT.offset,d=e.sources[e.joints.inputs.JOINT],p=e.sources[e.joints.inputs.INV_BIND_MATRIX],h=o[l.inputs.WEIGHT.id].array,m=0;for(t=0,a=s.length;t<a;t++){let e=s[t],n=[];for(r=0;r<e;r++){let e=u[m+c],t=h[u[m+f]];n.push({index:e,weight:t}),m+=2}for(n.sort(g),r=0;r<4;r++){let e=n[r];void 0!==e?(i.indices.array.push(e.index),i.weights.array.push(e.weight)):(i.indices.array.push(0),i.weights.array.push(0))}}for(e.bindShapeMatrix?i.bindMatrix=new n.kn4().fromArray(e.bindShapeMatrix).transpose():i.bindMatrix=new n.kn4().identity(),t=0,a=d.array.length;t<a;t++){let e=d.array[t],r=new n.kn4().fromArray(p.array,t*p.stride).transpose();i.joints.push({name:e,boneInverse:r})}return i;function g(e,t){return t.weight-e.weight}}(e.skin),r.sources.skinIndices=t.skin.indices,r.sources.skinWeights=t.skin.weights),t}function N(e){return void 0!==e.build?e.build:e.init_from}function T(e){let t=es.images[e];return void 0!==t?g(t,N):null}function I(e){let t={};for(let r=0,n=e.childNodes.length;r<n;r++){let n=e.childNodes[r];if(1===n.nodeType)switch(n.nodeName){case"color":t[n.nodeName]=c(n.textContent);break;case"float":t[n.nodeName]=parseFloat(n.textContent);break;case"texture":t[n.nodeName]={id:n.getAttribute("texture"),extra:E(n)}}}return t}function E(e){let t={technique:{}};for(let r=0,n=e.childNodes.length;r<n;r++){let n=e.childNodes[r];1===n.nodeType&&"extra"===n.nodeName&&function(e,t){for(let r=0,n=e.childNodes.length;r<n;r++){let n=e.childNodes[r];1===n.nodeType&&"technique"===n.nodeName&&function(e,t){for(let r=0,n=e.childNodes.length;r<n;r++){let n=e.childNodes[r];if(1===n.nodeType)switch(n.nodeName){case"repeatU":case"repeatV":case"offsetU":case"offsetV":t.technique[n.nodeName]=parseFloat(n.textContent);break;case"wrapU":case"wrapV":"TRUE"===n.textContent.toUpperCase()?t.technique[n.nodeName]=1:"FALSE"===n.textContent.toUpperCase()?t.technique[n.nodeName]=0:t.technique[n.nodeName]=parseInt(n.textContent);break;case"bump":t[n.nodeName]=C(n)}}}(n,t)}}(n,t)}return t}function S(e){let t={};for(let r=0,n=e.childNodes.length;r<n;r++){let n=e.childNodes[r];1===n.nodeType&&"technique"===n.nodeName&&(t.technique=function(e){let t={};for(let r=0,n=e.childNodes.length;r<n;r++){let n=e.childNodes[r];if(1===n.nodeType)switch(n.nodeName){case"double_sided":t[n.nodeName]=parseInt(n.textContent);break;case"bump":t[n.nodeName]=C(n)}}return t}(n))}return t}function C(e){let t={};for(let r=0,n=e.childNodes.length;r<n;r++){let n=e.childNodes[r];1===n.nodeType&&"texture"===n.nodeName&&(t[n.nodeName]={id:n.getAttribute("texture"),texcoord:n.getAttribute("texcoord"),extra:E(n)})}return t}function M(e){return e}function L(e){var t;let r;let a=(t=e.url,g(es.effects[t],M)),i=a.profile.technique;switch(i.type){case"phong":case"blinn":r=new n.tXL;break;case"lambert":r=new n.G_z;break;default:r=new n.V9B}function o(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=a.profile.samplers[e.id],i=null;if(null===(i=void 0!==r?T(a.profile.surfaces[r.source].init_from):T(e.id)))return null;{var o;let r,a;let l="tga"===(o=i).slice((o.lastIndexOf(".")-1>>>0)+2).toLowerCase()?s:en;if(void 0===l)return null;{let r=l.load(i),a=e.extra;if(void 0!==a&&void 0!==a.technique&&!1===p(a.technique)){let e=a.technique;r.wrapS=e.wrapU?n.GJx:n.ghU,r.wrapT=e.wrapV?n.GJx:n.ghU,r.offset.set(e.offsetU||0,e.offsetV||0),r.repeat.set(e.repeatU||1,e.repeatV||1)}else r.wrapS=n.GJx,r.wrapT=n.GJx;
1return null!==t&&(r.colorSpace=t),r}}}r.name=e.name||"";let l=i.parameters;for(let e in l){let t=l[e];switch(e){case"diffuse":t.color&&r.color.fromArray(t.color),t.texture&&(r.map=o(t.texture,n.er$));break;case"specular":t.color&&r.specular&&r.specular.fromArray(t.color),t.texture&&(r.specularMap=o(t.texture));break;case"bump":t.texture&&(r.normalMap=o(t.texture));break;case"ambient":t.texture&&(r.lightMap=o(t.texture,n.er$));break;case"shininess":t.float&&r.shininess&&(r.shininess=t.float);break;case"emission":t.color&&r.emissive&&r.emissive.fromArray(t.color),t.texture&&(r.emissiveMap=o(t.texture,n.er$))}}n.ppV.toWorkingColorSpace(r.color,n.er$),r.specular&&n.ppV.toWorkingColorSpace(r.specular,n.er$),r.emissive&&n.ppV.toWorkingColorSpace(r.emissive,n.er$);let u=l.transparent,c=l.transparency;if(void 0===c&&u&&(c={float:1}),void 0===u&&c&&(u={opaque:"A_ONE",data:{color:[1,1,1,1]}}),u&&c){if(u.data.texture)r.transparent=!0;else{let e=u.data.color;switch(u.opaque){case"A_ONE":r.opacity=e[3]*c.float;break;case"RGB_ZERO":r.opacity=1-e[0]*c.float;break;case"A_ZERO":r.opacity=1-e[3]*c.float;break;case"RGB_ONE":r.opacity=e[0]*c.float}r.opacity<1&&(r.transparent=!0)}}if(void 0!==i.extra&&void 0!==i.extra.technique){let e=i.extra.technique;for(let t in e){let a=e[t];switch(t){case"double_sided":r.side=1===a?n.$EB:n.hB5;break;case"bump":r.normalMap=o(a.texture),r.normalScale=new n.I9Y(1,1)}}}return r}function P(e){let t;switch(e.optics.technique){case"perspective":t=new n.ubm(e.optics.parameters.yfov,e.optics.parameters.aspect_ratio,e.optics.parameters.znear,e.optics.parameters.zfar);break;case"orthographic":let r=e.optics.parameters.ymag,a=e.optics.parameters.xmag,i=e.optics.parameters.aspect_ratio;a=void 0===a?r*i:a,r=void 0===r?a/i:r,a*=.5,r*=.5,t=new n.qUd(-a,a,r,-r,e.optics.parameters.znear,e.optics.parameters.zfar);break;default:t=new n.ubm}return t.name=e.name||"",t}function O(e){let t;switch(e.technique){case"directional":t=new n.ZyN;break;case"point":t=new n.HiM;break;case"spot":t=new n.nCl;break;case"ambient":t=new n.$p8}return e.parameters.color&&t.color.copy(e.parameters.color),e.parameters.distance&&(t.distance=e.parameters.distance),t}function R(e){let t={array:[],stride:3};for(let r=0;r<e.childNodes.length;r++){let n=e.childNodes[r];if(1===n.nodeType)switch(n.nodeName){case"float_array":t.array=c(n.textContent);break;case"Name_array":t.array=function(e){if(0===e.length)return[];let t=e.trim().split(/\s+/),r=Array(t.length);for(let e=0,n=t.length;e<n;e++)r[e]=t[e];return r}(n.textContent);break;case"technique_common":let a=u(n,"accessor")[0];void 0!==a&&(t.stride=parseInt(a.getAttribute("stride")))}}return t}function F(e){let t={},r=e.sources,a=e.vertices,i=e.primitives;if(0===i.length)return{};let o=function(e){let t={};for(let r=0;r<e.length;r++){let n=e[r];void 0===t[n.type]&&(t[n.type]=[]),t[n.type].push(n)}return t}(i);for(let e in o){let i=o[e];!function(e){let t=0;for(let r=0,n=e.length;r<n;r++)!0===e[r].hasUV&&t++;t>0&&t<e.length&&(e.uvsNeedsFix=!0)}(i),t[e]=function(e,t,r){let a={},i={array:[],stride:0},o={array:[],stride:0},l={array:[],stride:0},s={array:[],stride:0},u={array:[],stride:0},c={array:[],stride:4},f={array:[],stride:4},d=new n.LoY,p=[],h=0;for(let n=0;n<e.length;n++){let a=e[n],m=a.inputs,g=0;switch(a.type){case"lines":case"linestrips":g=2*a.count;break;case"triangles":g=3*a.count;break;case"polylist":for(let e=0;e<a.count;e++){let t=a.vcount[e];switch(t){case 3:g+=3;break;case 4:g+=6;break;default:g+=(t-2)*3}}}for(let y in d.addGroup(h,g,n),h+=g,a.material&&p.push(a.material),m){let n=m[y];switch(y){case"VERTEX":for(let d in r){let p=r[d];switch(d){case"POSITION":let h=i.array.length;if(D(a,t[p],n.offset,i.array),i.stride=t[p].stride,t.skinWeights&&t.skinIndices&&(D(a,t.skinIndices,n.offset,c.array),D(a,t.skinWeights,n.offset,f.array)),!1===a.hasUV&&!0===e.uvsNeedsFix){let e=(i.array.length-h)/i.stride;for(let t=0;t<e;t++)l.array.push(0,0)}break;case"NORMAL":D(a,t[p],n.offset,o.array),o.stride=t[p].stride;break;case"COLOR":D(a,t[p],n.offset,u.array),u.stride=t[p].stride;break;case"TEXCOORD":D(a,t[p],n.offset,l.array),l.stride=t[p].stride;break;case"TEXCOORD1":D(a,t[p],n.offset,s.array),l.stride=t[p].stride}}break;case"NORMAL":D(a,t[n.id],n.offset,o.array),o.stride=t[n.id].stride;break;case"COLOR":D(a,t[n.id],n.offset,u.array,!0),u.stride=t[n.id].stride;break;case"TEXCOORD":D(a,t[n.id],n.offset,l.array),l.stride=t[n.id].stride;break;case"TEXCOORD1":D(a,t[n.id],n.offset,s.array),s.stride=t[n.id].stride}}}return i.array.length>0&&d.setAttribute("position",new n.qtW(i.array,i.stride)),o.array.length>0&&d.setAttribute("normal",new n.qtW(o.array,o.stride)),u.array.length>0&&d.setAttribute("color",new n.qtW(u.array,u.stride)),l.array.length>0&&d.setAttribute("uv",new n.qtW(l.array,l.stride)),s.array.length>0&&d.setAttribute("uv1",new n.qtW(s.array,s.stride)),c.array.length>0&&d.setAttribute("skinIndex",new n.qtW(c.array,c.stride)),f.array.length>0&&d.setAttribute("skinWeight",new n.qtW(f.array,f.stride)),a.data=d,a.type=e[0].type,a.materialKeys=p,a}(i,r,a)}return t}function D(e,t,r,a){let i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o=e.p,l=e.stride,s=e.vcount;function u(e){let t=o[e+r]*f,l=t+f;for(;t<l;t++)a.push(c[t]);if(i){let e=a.length-f-1;ea.setRGB(a[e+0],a[e+1],a[e+2],n.er$),a[e+0]=ea.r,a[e+1]=ea.g,a[e+2]=ea.b}}let c=t.array,f=t.stride;if(void 0!==e.vcount){let e=0;for(let t=0,r=s.length;t<r;t++){let r=s[t];if(4===r){let t=e+0*l,r=e+1*l,n=e+2*l,a=e+3*l;u(t),u(r),u(a),u(r),u(n),u(a)}else if(3===r){let t=e+0*l,r=e+1*l,n=e+2*l;u(t),u(r),u(n)}else if(r>4)for(let t=1,n=r-2;t<=n;t++){let r=e+0*l,n=e+l*t,a=e+l*(t+1);u(r),u(n),u(a)}e+=l*r}}else for(let e=0,t=o.length;e<t;e+=l)u(e)}function U(e){return g(es.geometries[e],F)}function _(e){return void 0!==e.build?e.build:e}function q(e){let t={type:e.nodeName},r=c(e.textContent);switch(t.type){case"matrix":t.obj=new n.kn4,t.obj.fromArray(r).transpose();break;case"translate":t.obj=new n.Pq0,t.obj.fromArray(r);break;case"rotate":t.obj=new n.Pq0,t.obj.fromArray(r),t.angle=n.cj9.degToRad(r[3])}return t}function B(e){return void 0!==e.build?e.build:e}let z=new n.kn4,j=new n.Pq0;function V(e){let t={name:e.getAttribute("name")||"",type:e.getAttribute("type"),id:e.getAttribute("id"),sid:e.getAttribute("sid"),matrix:new n.kn4,nodes:[],instanceCameras:[],instanceControllers:[],instanceLights:[],instanceGeometries:[],instanceNodes:[],transforms:{}};for(let r=0;r<e.childNodes.length;r++){let a;let i=e.childNodes[r];if(1===i.nodeType)switch(i.nodeName){case"node":t.nodes.push(i.getAttribute("id")),V(i);break;case"instance_camera":t.instanceCameras.push(d(i.getAttribute("url")));break;case"instance_controller":t.instanceControllers.push(W(i));break;case"instance_light":t.instanceLights.push(d(i.getAttribute("url")));break;case"instance_geometry":t.instanceGeometries.push(W(i));break;case"instance_node":t.instanceNodes.push(d(i.getAttribute("url")));break;case"matrix":a=c(i.textContent),t.matrix.multiply(z.fromArray(a).transpose()),t.transforms[i.getAttribute("sid")]=i.nodeName;break;case"translate":a=c(i.textContent),j.fromArray(a),t.matrix.multiply(z.makeTranslation(j.x,j.y,j.z)),t.transforms[i.getAttribute("sid")]=i.nodeName;break;case"rotate":a=c(i.textContent);let o=n.cj9.degToRad(a[3]);t.matrix.multiply(z.makeRotationAxis(j.fromArray(a),o)),t.transforms[i.getAttribute("sid")]=i.nodeName;break;case"scale":a=c(i.textContent),t.matrix.scale(j.fromArray(a)),t.transforms[i.getAttribute("sid")]=i.nodeName}}return X(t.id)||(es.nodes[t.id]=t),t}function W(e){let t={id:d(e.getAttribute("url")),materials:{},skeletons:[]};for(let r=0;r<e.childNodes.length;r++){let n=e.childNodes[r];switch(n.nodeName){case"bind_material":let a=n.getElementsByTagName("instance_material");for(let e=0;e<a.length;e++){let r=a[e],n=r.getAttribute("symbol"),i=r.getAttribute("target");t.materials[n]=d(i)}break;case"skeleton":t.skeletons.push(d(n.textContent))}}return t}function G(e,t,r){e.traverse(function(e){if(!0===e.isBone){let a;for(let r=0;r<t.length;r++){let n=t[r];
1if(n.name===e.name){a=n.boneInverse;break}}void 0===a&&(a=new n.kn4),r.push({bone:e,boneInverse:a,processed:!1})}})}function Y(e){let t;let r=[],a=e.matrix,i=e.nodes,o=e.type,l=e.instanceCameras,s=e.instanceControllers,u=e.instanceLights,c=e.instanceGeometries,f=e.instanceNodes;for(let e=0,t=i.length;e<t;e++)r.push(J(i[e]));for(let e=0,t=l.length;e<t;e++){let t=function(e){let t=es.cameras[e];return void 0!==t?g(t,P):null}(l[e]);null!==t&&r.push(t.clone())}for(let e=0,t=s.length;e<t;e++){var d;let t=s[e],a=(d=t.id,g(es.controllers[d],k)),i=$(U(a.id),t.materials),o=function(e,t){let r,a,i;let o=[],l=[];for(r=0;r<e.length;r++){let n=e[r];if(X(n))G(J(n),t,o);else if(void 0!==es.visualScenes[n]){let e=es.visualScenes[n].children;for(let r=0;r<e.length;r++){let n=e[r];"JOINT"===n.type&&G(J(n.id),t,o)}}else console.error("THREE.ColladaLoader: Unable to find root bone of skeleton with ID:",n)}for(r=0;r<t.length;r++)for(a=0;a<o.length;a++)if((i=o[a]).bone.name===t[r].name){l[r]=i,i.processed=!0;break}for(r=0;r<o.length;r++)!1===(i=o[r]).processed&&(l.push(i),i.processed=!0);let s=[],u=[];for(r=0;r<l.length;r++)i=l[r],s.push(i.bone),u.push(i.boneInverse);return new n.EAD(s,u)}(t.skeletons,a.skin.joints);for(let e=0,t=i.length;e<t;e++){let t=i[e];t.isSkinnedMesh&&(t.bind(o,a.skin.bindMatrix),t.normalizeSkinWeights()),r.push(t)}}for(let e=0,t=u.length;e<t;e++){let t=function(e){let t=es.lights[e];return void 0!==t?g(t,O):null}(u[e]);null!==t&&r.push(t.clone())}for(let e=0,t=c.length;e<t;e++){let t=c[e],n=$(U(t.id),t.materials);for(let e=0,t=n.length;e<t;e++)r.push(n[e])}for(let e=0,t=f.length;e<t;e++)r.push(J(f[e]).clone());if(0===i.length&&1===r.length)t=r[0];else{t="JOINT"===o?new n.$Kf:new n.YJl;for(let e=0;e<r.length;e++)t.add(r[e])}return t.name="JOINT"===o?e.sid:e.name,t.matrix.copy(a),t.matrix.decompose(t.position,t.quaternion,t.scale),t}let H=new n.V9B({name:n.aHM.DEFAULT_MATERIAL_NAME,color:0xff00ff});function $(e,t){let r=[];for(let a in e){let i;let o=e[a],l=function(e,t){let r=[];for(let n=0,a=e.length;n<a;n++){let a=t[e[n]];void 0===a?r.push(H):r.push(g(es.materials[a],L))}return r}(o.materialKeys,t);if(0===l.length&&("lines"===a||"linestrips"===a?l.push(new n.mrM):l.push(new n.tXL)),"lines"===a||"linestrips"===a)for(let e=0,t=l.length;e<t;e++){let t=l[e];if(!0===t.isMeshPhongMaterial||!0===t.isMeshLambertMaterial){let r=new n.mrM;r.color.copy(t.color),r.opacity=t.opacity,r.transparent=t.transparent,l[e]=r}}let s=void 0!==o.data.attributes.skinIndex,u=1===l.length?l[0]:l;switch(a){case"lines":i=new n.DXC(o.data,u);break;case"linestrips":i=new n.N1A(o.data,u);break;case"triangles":case"polylist":i=s?new n.I46(o.data,u):new n.eaF(o.data,u)}r.push(i)}return r}function X(e){return void 0!==es.nodes[e]}function J(e){return g(es.nodes[e],Y)}function Q(e){let t=new n.YJl;t.name=e.name;let r=e.children;for(let e=0;e<r.length;e++){let n=r[e];t.add(J(n.id))}return t}function K(e){return g(es.visualScenes[e],Q)}if(0===e.length)return{scene:new n.Z58};let Z=new DOMParser().parseFromString(e,"application/xml"),ee=u(Z,"COLLADA")[0],et=Z.getElementsByTagName("parsererror")[0];if(void 0!==et){let e=u(et,"div")[0];return console.error("THREE.ColladaLoader: Failed to parse collada file.\n",e?e.textContent:function(e){let t="",r=[e];for(;r.length;){let e=r.shift();e.nodeType===Node.TEXT_NODE?t+=e.textContent:(t+="\n",r.push(...e.childNodes))}return t.trim()}(et)),null}ee.getAttribute("version");let er=(r=u(ee,"asset")[0],{unit:void 0!==(o=u(r,"unit")[0])&&!0===o.hasAttribute("meter")?parseFloat(o.getAttribute("meter")):1,upAxis:void 0!==(l=u(r,"up_axis")[0])?l.textContent:"Y_UP"}),en=new n.Tap(this.manager);en.setPath(this.resourcePath||t).setCrossOrigin(this.crossOrigin),a.u&&(s=new a.u(this.manager)).setPath(this.resourcePath||t);let ea=new n.Q1f,ei=[],eo={},el=0,es={animations:{},clips:{},controllers:{},images:{},effects:{},materials:{},cameras:{},lights:{},geometries:{},nodes:{},visualScenes:{},kinematicsModels:{},physicsModels:{},kinematicsScenes:{}};h(ee,"library_animations","animation",function e(t){let r={sources:{},samplers:{},channels:{}},a=!1;for(let n=0,i=t.childNodes.length;n<i;n++){let i;let o=t.childNodes[n];if(1===o.nodeType)switch(o.nodeName){case"source":i=o.getAttribute("id"),r.sources[i]=R(o);break;case"sampler":i=o.getAttribute("id"),r.samplers[i]=function(e){let t={inputs:{}};for(let r=0,n=e.childNodes.length;r<n;r++){let n=e.childNodes[r];if(1===n.nodeType&&"input"===n.nodeName){let e=d(n.getAttribute("source")),r=n.getAttribute("semantic");t.inputs[r]=e}}return t}(o);break;case"channel":i=o.getAttribute("target"),r.channels[i]=function(e){let t={},r=e.getAttribute("target").split("/"),n=r.shift(),a=r.shift(),i=-1!==a.indexOf("("),o=-1!==a.indexOf(".");if(o)a=(r=a.split(".")).shift(),t.member=r.shift();else if(i){let e=a.split("(");a=e.shift();for(let t=0;t<e.length;t++)e[t]=parseInt(e[t].replace(/\)/,""));t.indices=e}return t.id=n,t.sid=a,t.arraySyntax=i,t.memberSyntax=o,t.sampler=d(e.getAttribute("source")),t}(o);break;case"animation":e(o),a=!0}}!1===a&&(es.animations[t.getAttribute("id")||n.cj9.generateUUID()]=r)}),h(ee,"library_animation_clips","animation_clip",function(e){let t={name:e.getAttribute("id")||"default",start:parseFloat(e.getAttribute("start")||0),end:parseFloat(e.getAttribute("end")||0),animations:[]};for(let r=0,n=e.childNodes.length;r<n;r++){let n=e.childNodes[r];1===n.nodeType&&"instance_animation"===n.nodeName&&t.animations.push(d(n.getAttribute("url")))}es.clips[e.getAttribute("id")]=t}),h(ee,"library_controllers","controller",function(e){let t={};for(let r=0,n=e.childNodes.length;r<n;r++){let n=e.childNodes[r];if(1===n.nodeType)switch(n.nodeName){case"skin":t.id=d(n.getAttribute("source")),t.skin=function(e){let t={sources:{}};for(let r=0,n=e.childNodes.length;r<n;r++){let n=e.childNodes[r];if(1===n.nodeType)switch(n.nodeName){case"bind_shape_matrix":t.bindShapeMatrix=c(n.textContent);break;case"source":let a=n.getAttribute("id");t.sources[a]=R(n);break;case"joints":t.joints=function(e){let t={inputs:{}};for(let r=0,n=e.childNodes.length;r<n;r++){let n=e.childNodes[r];if(1===n.nodeType&&"input"===n.nodeName){let e=n.getAttribute("semantic"),r=d(n.getAttribute("source"));t.inputs[e]=r}}return t}(n);break;case"vertex_weights":t.vertexWeights=function(e){let t={inputs:{}};for(let r=0,n=e.childNodes.length;r<n;r++){let n=e.childNodes[r];if(1===n.nodeType)switch(n.nodeName){case"input":let a=n.getAttribute("semantic"),i=d(n.getAttribute("source")),o=parseInt(n.getAttribute("offset"));t.inputs[a]={id:i,offset:o};break;case"vcount":t.vcount=f(n.textContent);break;case"v":t.v=f(n.textContent)}}return t}(n)}}return t}(n);break;case"morph":t.id=d(n.getAttribute("source"))}}es.controllers[e.getAttribute("id")]=t}),h(ee,"library_images","image",function(e){let t={init_from:u(e,"init_from")[0].textContent};es.images[e.getAttribute("id")]=t}),h(ee,"library_effects","effect",function(e){let t={};for(let r=0,n=e.childNodes.length;r<n;r++){let n=e.childNodes[r];1===n.nodeType&&"profile_COMMON"===n.nodeName&&(t.profile=function(e){let t={surfaces:{},samplers:{}};for(let r=0,n=e.childNodes.length;r<n;r++){let n=e.childNodes[r];if(1===n.nodeType)switch(n.nodeName){case"newparam":(function(e,t){let r=e.getAttribute("sid");for(let n=0,a=e.childNodes.length;n<a;n++){let a=e.childNodes[n];if(1===a.nodeType)switch(a.nodeName){case"surface":t.surfaces[r]=function(e){let t={};for(let r=0,n=e.childNodes.length;r<n;r++){let n=e.childNodes[r];1===n.nodeType&&"init_from"===n.nodeName&&(t.init_from=n.textContent)}return t}(a);break;case"sampler2D":t.samplers[r]=function(e){let t={};for(let r=0,n=e.childNodes.length;r<n;r++){let n=e.childNodes[r];1===n.nodeType&&"source"===n.nodeName&&(t.source=n.textContent)}return t}(a)}}})(n,t);break;case"technique":t.technique=function(e){let t={};for(let r=0,n=e.childNodes.length;r<n;r++){let n=e.childNodes[r];if(1===n.nodeType)switch(n.nodeName){case"constant":case"lambert":case"blinn":case"phong":t.type=n.nodeName,t.parameters=function(e){let t={};for(let r=0,n=e.childNodes.length;r<n;r++){let n=e.childNodes[r];if(1===n.nodeType)switch(n.nodeName){case"emission":case"diffuse":case"specular":case"bump":case"ambient":case"shininess":case"transparency":t[n.nodeName]=I(n);break;
1case"transparent":t[n.nodeName]={opaque:n.hasAttribute("opaque")?n.getAttribute("opaque"):"A_ONE",data:I(n)}}}return t}(n);break;case"extra":t.extra=S(n)}}return t}(n);break;case"extra":t.extra=S(n)}}return t}(n))}es.effects[e.getAttribute("id")]=t}),h(ee,"library_materials","material",function(e){let t={name:e.getAttribute("name")};for(let r=0,n=e.childNodes.length;r<n;r++){let n=e.childNodes[r];1===n.nodeType&&"instance_effect"===n.nodeName&&(t.url=d(n.getAttribute("url")))}es.materials[e.getAttribute("id")]=t}),h(ee,"library_cameras","camera",function(e){let t={name:e.getAttribute("name")};for(let r=0,n=e.childNodes.length;r<n;r++){let n=e.childNodes[r];1===n.nodeType&&"optics"===n.nodeName&&(t.optics=function(e){for(let t=0;t<e.childNodes.length;t++){let r=e.childNodes[t];if("technique_common"===r.nodeName)return function(e){let t={};for(let r=0;r<e.childNodes.length;r++){let n=e.childNodes[r];switch(n.nodeName){case"perspective":case"orthographic":t.technique=n.nodeName,t.parameters=function(e){let t={};for(let r=0;r<e.childNodes.length;r++){let n=e.childNodes[r];switch(n.nodeName){case"xfov":case"yfov":case"xmag":case"ymag":case"znear":case"zfar":case"aspect_ratio":t[n.nodeName]=parseFloat(n.textContent)}}return t}(n)}}return t}(r)}return{}}(n))}es.cameras[e.getAttribute("id")]=t}),h(ee,"library_lights","light",function(e){let t={};for(let r=0,a=e.childNodes.length;r<a;r++){let a=e.childNodes[r];1===a.nodeType&&"technique_common"===a.nodeName&&(t=function(e){let t={};for(let r=0,a=e.childNodes.length;r<a;r++){let a=e.childNodes[r];if(1===a.nodeType)switch(a.nodeName){case"directional":case"point":case"spot":case"ambient":t.technique=a.nodeName,t.parameters=function(e){let t={};for(let r=0,a=e.childNodes.length;r<a;r++){let a=e.childNodes[r];if(1===a.nodeType)switch(a.nodeName){case"color":let i=c(a.textContent);t.color=new n.Q1f().fromArray(i),n.ppV.toWorkingColorSpace(t.color,n.er$);break;case"falloff_angle":t.falloffAngle=parseFloat(a.textContent);break;case"quadratic_attenuation":let o=parseFloat(a.textContent);t.distance=o?Math.sqrt(1/o):0}}return t}(a)}}return t}(a))}es.lights[e.getAttribute("id")]=t}),h(ee,"library_geometries","geometry",function(e){let t={name:e.getAttribute("name"),sources:{},vertices:{},primitives:[]},r=u(e,"mesh")[0];if(void 0!==r){for(let e=0;e<r.childNodes.length;e++){let n=r.childNodes[e];if(1!==n.nodeType)continue;let a=n.getAttribute("id");switch(n.nodeName){case"source":t.sources[a]=R(n);break;case"vertices":t.vertices=function(e){let t={};for(let r=0;r<e.childNodes.length;r++){let n=e.childNodes[r];1===n.nodeType&&(t[n.getAttribute("semantic")]=d(n.getAttribute("source")))}return t}(n);break;case"polygons":break;case"lines":case"linestrips":case"polylist":case"triangles":t.primitives.push(function(e){let t={type:e.nodeName,material:e.getAttribute("material"),count:parseInt(e.getAttribute("count")),inputs:{},stride:0,hasUV:!1};for(let r=0,n=e.childNodes.length;r<n;r++){let n=e.childNodes[r];if(1===n.nodeType)switch(n.nodeName){case"input":let a=d(n.getAttribute("source")),i=n.getAttribute("semantic"),o=parseInt(n.getAttribute("offset")),l=parseInt(n.getAttribute("set")),s=l>0?i+l:i;t.inputs[s]={id:a,offset:o},t.stride=Math.max(t.stride,o+1),"TEXCOORD"===i&&(t.hasUV=!0);break;case"vcount":t.vcount=f(n.textContent);break;case"p":t.p=f(n.textContent)}}return t}(n))}}es.geometries[e.getAttribute("id")]=t}}),h(ee,"library_nodes","node",V),h(ee,"library_visual_scenes","visual_scene",function(e){let t={name:e.getAttribute("name"),children:[]};!function(e){let t=e.getElementsByTagName("node");for(let e=0;e<t.length;e++){let r=t[e];!1===r.hasAttribute("id")&&r.setAttribute("id","three_default_"+el++)}}(e);let r=u(e,"node");for(let e=0;e<r.length;e++)t.children.push(V(r[e]));es.visualScenes[e.getAttribute("id")]=t}),h(ee,"library_kinematics_models","kinematics_model",function(e){let t={name:e.getAttribute("name")||"",joints:{},links:[]};for(let r=0;r<e.childNodes.length;r++){let a=e.childNodes[r];1===a.nodeType&&"technique_common"===a.nodeName&&function(e,t){for(let r=0;r<e.childNodes.length;r++){let a=e.childNodes[r];if(1===a.nodeType)switch(a.nodeName){case"joint":t.joints[a.getAttribute("sid")]=function(e){let t;for(let r=0;r<e.childNodes.length;r++){let a=e.childNodes[r];if(1===a.nodeType)switch(a.nodeName){case"prismatic":case"revolute":t=function(e){let t={sid:e.getAttribute("sid"),name:e.getAttribute("name")||"",axis:new n.Pq0,limits:{min:0,max:0},type:e.nodeName,static:!1,zeroPosition:0,middlePosition:0};for(let r=0;r<e.childNodes.length;r++){let n=e.childNodes[r];if(1===n.nodeType)switch(n.nodeName){case"axis":let a=c(n.textContent);t.axis.fromArray(a);break;case"limits":let i=n.getElementsByTagName("max")[0],o=n.getElementsByTagName("min")[0];t.limits.max=parseFloat(i.textContent),t.limits.min=parseFloat(o.textContent)}}return t.limits.min>=t.limits.max&&(t.static=!0),t.middlePosition=(t.limits.min+t.limits.max)/2,t}(a)}}return t}(a);break;case"link":t.links.push(function e(t){let r={sid:t.getAttribute("sid"),name:t.getAttribute("name")||"",attachments:[],transforms:[]};for(let n=0;n<t.childNodes.length;n++){let a=t.childNodes[n];if(1===a.nodeType)switch(a.nodeName){case"attachment_full":r.attachments.push(function(t){let r={joint:t.getAttribute("joint").split("/").pop(),transforms:[],links:[]};for(let n=0;n<t.childNodes.length;n++){let a=t.childNodes[n];if(1===a.nodeType)switch(a.nodeName){case"link":r.links.push(e(a));break;case"matrix":case"translate":case"rotate":r.transforms.push(q(a))}}return r}(a));break;case"matrix":case"translate":case"rotate":r.transforms.push(q(a))}}return r}(a))}}}(a,t)}es.kinematicsModels[e.getAttribute("id")]=t}),h(ee,"library_physics_models","physics_model",function(e){let t={name:e.getAttribute("name")||"",rigidBodies:{}};for(let r=0;r<e.childNodes.length;r++){let n=e.childNodes[r];1===n.nodeType&&"rigid_body"===n.nodeName&&(t.rigidBodies[n.getAttribute("name")]={},function(e,t){for(let r=0;r<e.childNodes.length;r++){let n=e.childNodes[r];1===n.nodeType&&"technique_common"===n.nodeName&&function(e,t){for(let r=0;r<e.childNodes.length;r++){let n=e.childNodes[r];if(1===n.nodeType)switch(n.nodeName){case"inertia":t.inertia=c(n.textContent);break;case"mass":t.mass=c(n.textContent)[0]}}}(n,t)}}(n,t.rigidBodies[n.getAttribute("name")]))}es.physicsModels[e.getAttribute("id")]=t}
1),h(ee,"scene","instance_kinematics_scene",function(e){let t={bindJointAxis:[]};for(let r=0;r<e.childNodes.length;r++){let n=e.childNodes[r];1===n.nodeType&&"bind_joint_axis"===n.nodeName&&t.bindJointAxis.push(function(e){let t={target:e.getAttribute("target").split("/").pop()};for(let r=0;r<e.childNodes.length;r++){let n=e.childNodes[r];if(1===n.nodeType&&"axis"===n.nodeName){let e=n.getElementsByTagName("param")[0];t.axis=e.textContent;let r=t.axis.split("inst_").pop().split("axis")[0];t.jointIndex=r.substring(0,r.length-1)}}return t}(n))}es.kinematicsScenes[d(e.getAttribute("url"))]=t}),m(es.animations,y),m(es.clips,A),m(es.controllers,k),m(es.images,N),m(es.effects,M),m(es.materials,L),m(es.cameras,P),m(es.lights,O),m(es.geometries,F),m(es.visualScenes,Q),function(){let e=es.clips;if(!0===p(e)){if(!1===p(es.animations)){let e=[];for(let t in es.animations){let r=b(t);for(let t=0,n=r.length;t<n;t++)e.push(r[t])}ei.push(new n.tz3("default",-1,e))}}else for(let t in e)ei.push(g(es.clips[t],A))}(),function(){let e=Object.keys(es.kinematicsModels)[0],t=Object.keys(es.kinematicsScenes)[0],r=Object.keys(es.visualScenes)[0];if(void 0===e||void 0===t)return;let a=g(es.kinematicsModels[e],_),i=g(es.kinematicsScenes[t],B),o=K(r),l=i.bindJointAxis,s={};for(let e=0,t=l.length;e<t;e++){let t=l[e],r=ee.querySelector('[sid="'+t.target+'"]');if(r){let e=r.parentElement;(function(e,t){let r=t.getAttribute("name"),i=a.joints[e];o.traverse(function(a){a.name===r&&(s[e]={object:a,transforms:function(e){let t=[],r=ee.querySelector('[id="'+e.id+'"]');for(let e=0;e<r.childNodes.length;e++){let a,i;let o=r.childNodes[e];if(1===o.nodeType)switch(o.nodeName){case"matrix":a=c(o.textContent);let l=new n.kn4().fromArray(a).transpose();t.push({sid:o.getAttribute("sid"),type:o.nodeName,obj:l});break;case"translate":case"scale":a=c(o.textContent),i=new n.Pq0().fromArray(a),t.push({sid:o.getAttribute("sid"),type:o.nodeName,obj:i});break;case"rotate":a=c(o.textContent),i=new n.Pq0().fromArray(a);let s=n.cj9.degToRad(a[3]);t.push({sid:o.getAttribute("sid"),type:o.nodeName,obj:i,angle:s})}}return t}(t),joint:i,position:i.zeroPosition})})})(t.jointIndex,e)}}let u=new n.kn4;eo={joints:a&&a.joints,getJointValue:function(e){let t=s[e];if(t)return t.position},setJointValue:function(e,t){let r=s[e];if(r){let a=r.joint;if(t>a.limits.max||t<a.limits.min);else if(a.static);else{let i=r.object,o=a.axis,l=r.transforms;z.identity();for(let r=0;r<l.length;r++){let i=l[r];if(i.sid&&-1!==i.sid.indexOf(e))switch(a.type){case"revolute":z.multiply(u.makeRotationAxis(o,n.cj9.degToRad(t)));break;case"prismatic":z.multiply(u.makeTranslation(o.x*t,o.y*t,o.z*t))}else switch(i.type){case"matrix":z.multiply(i.obj);break;case"translate":z.multiply(u.makeTranslation(i.obj.x,i.obj.y,i.obj.z));break;case"scale":z.scale(i.obj);break;case"rotate":z.multiply(u.makeRotationAxis(i.obj,i.angle))}}i.matrix.copy(z),i.matrix.decompose(i.position,i.quaternion,i.scale),s[e].position=t}}}}}();let eu=(i=u(ee,"scene")[0],K(d(u(i,"instance_visual_scene")[0].getAttribute("url"))));return eu.animations=ei,"Z_UP"===er.upAxis&&eu.rotation.set(-Math.PI/2,0,0),eu.scale.multiplyScalar(er.unit),{get animations(){return ei},kinematics:eo,library:es,scene:eu}}}},83561:(e,t,r)=>{let n,a,i;r.d(t,{w:()=>c});var o=r(12),l=r(37950);function s(e,t,r){let n=r.length-e-1;if(t>=r[n])return n-1;if(t<=r[e])return e;let a=e,i=n,o=Math.floor((a+i)/2);for(;t<r[o]||t>=r[o+1];)t<r[o]?i=o:a=o,o=Math.floor((a+i)/2);return o}class u extends o.Ipv{getPoint(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new o.Pq0,r=this.knots[this.startKnot]+e*(this.knots[this.endKnot]-this.knots[this.startKnot]),n=function(e,t,r,n){let a=s(e,n,t),i=function(e,t,r,n){let a=[],i=[],o=[];a[0]=1;for(let l=1;l<=r;++l){i[l]=t-n[e+1-l],o[l]=n[e+l]-t;let r=0;for(let e=0;e<l;++e){let t=o[e+1],n=i[l-e],s=a[e]/(t+n);a[e]=r+t*s,r=n*s}a[l]=r}return a}(a,n,e,t),l=new o.IUQ(0,0,0,0);for(let t=0;t<=e;++t){let n=r[a-e+t],o=i[t],s=n.w*o;l.x+=n.x*s,l.y+=n.y*s,l.z+=n.z*s,l.w+=n.w*o}return l}(this.degree,this.knots,this.controlPoints,r);return 1!==n.w&&n.divideScalar(n.w),t.set(n.x,n.y,n.z)}getTangent(e){var t;let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new o.Pq0,n=this.knots[0]+e*(this.knots[this.knots.length-1]-this.knots[0]),a=(t=this.degree,function(e){let t=e.length,r=[],n=[];for(let a=0;a<t;
1++a){let t=e[a];r[a]=new o.Pq0(t.x,t.y,t.z),n[a]=t.w}let a=[];for(let e=0;e<t;++e){let t=r[e].clone();for(let r=1;r<=e;++r)t.sub(a[e-r].clone().multiplyScalar(function(e,t){let r=1;for(let t=2;t<=e;++t)r*=t;let n=1;for(let e=2;e<=t;++e)n*=e;for(let r=2;r<=e-t;++r)n*=r;return r/n}(e,r)*n[r]));a[e]=t.divideScalar(n[0])}return a}(function(e,t,r,n,a){let i=1<e?1:e,l=[],u=s(e,n,t),c=function(e,t,r,n,a){let i=[];for(let e=0;e<=r;++e)i[e]=0;let o=[];for(let e=0;e<=n;++e)o[e]=i.slice(0);let l=[];for(let e=0;e<=r;++e)l[e]=i.slice(0);l[0][0]=1;let s=i.slice(0),u=i.slice(0);for(let n=1;n<=r;++n){s[n]=t-a[e+1-n],u[n]=a[e+n]-t;let r=0;for(let e=0;e<n;++e){let t=u[e+1],a=s[n-e];l[n][e]=t+a;let i=l[e][n-1]/l[n][e];l[e][n]=r+t*i,r=a*i}l[n][n]=r}for(let e=0;e<=r;++e)o[0][e]=l[e][r];for(let e=0;e<=r;++e){let t=0,a=1,s=[];for(let e=0;e<=r;++e)s[e]=i.slice(0);s[0][0]=1;for(let i=1;i<=n;++i){let n=0,u=e-i,c=r-i;e>=i&&(s[a][0]=s[t][0]/l[c+1][u],n=s[a][0]*l[u][c]);let f=u>=-1?1:-u,d=e-1<=c?i-1:r-e;for(let e=f;e<=d;++e)s[a][e]=(s[t][e]-s[t][e-1])/l[c+1][u+e],n+=s[a][e]*l[u+e][c];e<=c&&(s[a][i]=-s[t][i-1]/l[c+1][e],n+=s[a][i]*l[e][c]),o[i][e]=n;let p=t;t=a,a=p}}let c=r;for(let e=1;e<=n;++e){for(let t=0;t<=r;++t)o[e][t]*=c;c*=r-e}return o}(u,n,e,i,t),f=[];for(let e=0;e<r.length;++e){let t=r[e].clone(),n=t.w;t.x*=n,t.y*=n,t.z*=n,f[e]=t}for(let t=0;t<=i;++t){let r=f[u-e].clone().multiplyScalar(c[t][0]);for(let n=1;n<=e;++n)r.add(f[u-e+n].clone().multiplyScalar(c[t][n]));l[t]=r}for(let e=i+1;e<=a+1;++e)l[e]=new o.IUQ(0,0,0);return l}(t,this.knots,this.controlPoints,n,1)));return r.copy(a[1]).normalize(),r}toJSON(){let e=super.toJSON();return e.degree=this.degree,e.knots=[...this.knots],e.controlPoints=this.controlPoints.map(e=>e.toArray()),e.startKnot=this.startKnot,e.endKnot=this.endKnot,e}fromJSON(e){return super.fromJSON(e),this.degree=e.degree,this.knots=[...e.knots],this.controlPoints=e.controlPoints.map(e=>new o.IUQ(e[0],e[1],e[2],e[3])),this.startKnot=e.startKnot,this.endKnot=e.endKnot,this}constructor(e,t,r,n,a){super();let i=t?t.length-1:0,l=r?r.length:0;this.degree=e,this.knots=t,this.controlPoints=[],this.startKnot=n||0,this.endKnot=a||i;for(let e=0;e<l;++e){let t=r[e];this.controlPoints[e]=new o.IUQ(t.x,t.y,t.z,t.w)}}}class c extends o.aHM{load(e,t,r,n){let a=this,i=""===a.path?o.r6x.extractUrlBase(e):a.path,l=new o.Y9S(this.manager);l.setPath(a.path),l.setResponseType("arraybuffer"),l.setRequestHeader(a.requestHeader),l.setWithCredentials(a.withCredentials),l.load(e,function(r){try{t(a.parse(r,i))}catch(t){n?n(t):console.error(t),a.manager.itemError(e)}},r,n)}parse(e,t){if(function(e){let t="Kaydara FBX Binary \0";return e.byteLength>=t.length&&t===E(e,0,t.length)}(e))n=new m().parse(e);else{let t=E(e);if(!function(e){let t=["K","a","y","d","a","r","a","\\","F","B","X","\\","B","i","n","a","r","y","\\","\\"],r=0;for(let n=0;n<t.length;++n)if(function(t){let n=e[0];return e=e.slice(r+1),r++,n}(0)===t[n])return!1;return!0}(t))throw Error("THREE.FBXLoader: Unknown format.");if(7e3>b(t))throw Error("THREE.FBXLoader: FBX version not supported, FileVersion: "+b(t));n=new h().parse(t)}return new f(new o.Tap(this.manager).setPath(this.resourcePath||t).setCrossOrigin(this.crossOrigin),this.manager).parse(n)}constructor(e){super(e)}}class f{parse(){a=this.parseConnections();let e=this.parseImages(),t=this.parseTextures(e),r=this.parseMaterials(t),n=this.parseDeformers(),o=new d().parse(n);return this.parseScene(n,o,r),i}parseConnections(){let e=new Map;return"Connections"in n&&n.Connections.connections.forEach(function(t){let r=t[0],n=t[1],a=t[2];e.has(r)||e.set(r,{parents:[],children:[]}),e.get(r).parents.push({ID:n,relationship:a}),e.has(n)||e.set(n,{parents:[],children:[]}),e.get(n).children.push({ID:r,relationship:a})}),e}parseImages(){let e={},t={};if("Video"in n.Objects){let r=n.Objects.Video;for(let n in r){let a=r[n];if(e[parseInt(n)]=a.RelativeFilename||a.Filename,"Content"in a){let e=a.Content instanceof ArrayBuffer&&a.Content.byteLength>0,i="string"==typeof a.Content&&""!==a.Content;if(e||i){let e=this.parseImage(r[n]);t[a.RelativeFilename||a.Filename]=e}}}}for(let r in e){let n=e[r];void 0!==t[n]?e[r]=t[n]:e[r]=e[r].split("\\").pop()}return e}parseImage(e){let t;let r=e.Content,n=e.RelativeFilename||e.Filename;switch(n.slice(n.lastIndexOf(".")+1).toLowerCase()){case"bmp":t="image/bmp";break;case"jpg":case"jpeg":t="image/jpeg";break;case"png":t="image/png";break;case"tif":t="image/tiff";break;case"tga":this.manager.getHandler(".tga"),t="image/tga";break;default:return}if("string"==typeof r)return"data:"+t+";base64,"+r;{let e=new Uint8Array(r);return window.URL.createObjectURL(new Blob([e],{type:t}))}}parseTextures(e){let t=new Map;if("Texture"in n.Objects){let r=n.Objects.Texture;for(let n in r){let a=this.parseTexture(r[n],e);t.set(parseInt(n),a)}}return t}parseTexture(e,t){let r=this.loadTexture(e,t);r.ID=e.id,r.name=e.attrName;let n=e.WrapModeU,a=e.WrapModeV,i=void 0!==n?n.value:0,l=void 0!==a?a.value:0;if(r.wrapS=0===i?o.GJx:o.ghU,r.wrapT=0===l?o.GJx:o.ghU,"Scaling"in e){let t=e.Scaling.value;r.repeat.x=t[0],r.repeat.y=t[1]}if("Translation"in e){let t=e.Translation.value;r.offset.x=t[0],r.offset.y=t[1]}return r}loadTexture(e,t){let r;let n=new Set(["tga","tif","tiff","exr","dds","hdr","ktx2"]),i=e.FileName.split(".").pop().toLowerCase(),l=n.has(i)?this.manager.getHandler(".".concat(i)):this.textureLoader;if(!l)return new o.gPd;let s=l.path;s||l.setPath(this.textureLoader.path);let u=a.get(e.id).children;void 0!==u&&u.length>0&&void 0!==t[u[0].ID]&&(0===(r=t[u[0].ID]).indexOf("blob:")||0===r.indexOf("data:"))&&l.setPath(void 0);let c=l.load(r);return l.setPath(s),c}parseMaterials(e){let t=new Map;if("Material"in n.Objects){let r=n.Objects.Material;for(let n in r){let a=this.parseMaterial(r[n],e);null!==a&&t.set(parseInt(n),a)}}return t}parseMaterial(e,t){let r;let n=e.id,i=e.attrName,l=e.ShadingModel;if("object"==typeof l&&(l=l.value),!a.has(n))return null;let s=this.parseParameters(e,t,n);switch(l.toLowerCase()){case"phong":default:r=new o.tXL;break;case"lambert":r=new o.G_z}return r.setValues(s),r.name=i,r}parseParameters(e,t,r){let n={};e.BumpFactor&&(n.bumpScale=e.BumpFactor.value),e.Diffuse?n.color=o.ppV.toWorkingColorSpace(new o.Q1f().fromArray(e.Diffuse.value),o.er$):e.DiffuseColor&&("Color"===e.DiffuseColor.type||"ColorRGB"===e.DiffuseColor.type)&&(n.color=o.ppV.toWorkingColorSpace(new o.Q1f().fromArray(e.DiffuseColor.value),o.er$)),e.DisplacementFactor&&(n.displacementScale=e.DisplacementFactor.value),e.Emissive?n.emissive=o.ppV.toWorkingColorSpace(new o.Q1f().fromArray(e.Emissive.value),o.er$):e.EmissiveColor&&("Color"===e.EmissiveColor.type||"ColorRGB"===e.EmissiveColor.type)&&(n.emissive=o.ppV.toWorkingColorSpace(new o.Q1f().fromArray(e.EmissiveColor.value),o.er$)),e.EmissiveFactor&&(n.emissiveIntensity=parseFloat(e.EmissiveFactor.value)),n.opacity=1-(e.TransparencyFactor?parseFloat(e.TransparencyFactor.value):0),(1===n.opacity||0===n.opacity)&&(n.op
1acity=e.Opacity?parseFloat(e.Opacity.value):null,null===n.opacity&&(n.opacity=1-(e.TransparentColor?parseFloat(e.TransparentColor.value[0]):0))),n.opacity<1&&(n.transparent=!0),e.ReflectionFactor&&(n.reflectivity=e.ReflectionFactor.value),e.Shininess&&(n.shininess=e.Shininess.value),e.Specular?n.specular=o.ppV.toWorkingColorSpace(new o.Q1f().fromArray(e.Specular.value),o.er$):e.SpecularColor&&"Color"===e.SpecularColor.type&&(n.specular=o.ppV.toWorkingColorSpace(new o.Q1f().fromArray(e.SpecularColor.value),o.er$));let i=this;return a.get(r).children.forEach(function(e){switch(e.relationship){case"Bump":n.bumpMap=i.getTexture(t,e.ID);break;case"Maya|TEX_ao_map":n.aoMap=i.getTexture(t,e.ID);break;case"DiffuseColor":case"Maya|TEX_color_map":n.map=i.getTexture(t,e.ID),void 0!==n.map&&(n.map.colorSpace=o.er$);break;case"DisplacementColor":n.displacementMap=i.getTexture(t,e.ID);break;case"EmissiveColor":n.emissiveMap=i.getTexture(t,e.ID),void 0!==n.emissiveMap&&(n.emissiveMap.colorSpace=o.er$);break;case"NormalMap":case"Maya|TEX_normal_map":n.normalMap=i.getTexture(t,e.ID);break;case"ReflectionColor":n.envMap=i.getTexture(t,e.ID),void 0!==n.envMap&&(n.envMap.mapping=o.wfO,n.envMap.colorSpace
1=o.er$);break;case"SpecularColor":n.specularMap=i.getTexture(t,e.ID),void 0!==n.specularMap&&(n.specularMap.colorSpace=o.er$);break;case"TransparentColor":case"TransparencyFactor":n.alphaMap=i.getTexture(t,e.ID),n.transparent=!0}}),n}getTexture(e,t){return"LayeredTexture"in n.Objects&&t in n.Objects.LayeredTexture&&(t=a.get(t).children[0].ID),e.get(t)}parseDeformers(){let e={},t={};if("Deformer"in n.Objects){let r=n.Objects.Deformer;for(let n in r){let i=r[n],o=a.get(parseInt(n));if("Skin"===i.attrType){let t=this.parseSkeleton(o,r);t.ID=n,o.parents.length,t.geometryID=o.parents[0].ID,e[n]=t}else if("BlendShape"===i.attrType){let e={id:n};e.rawTargets=this.parseMorphTargets(o,r),e.id=n,o.parents.length,t[n]=e}}}return{skeletons:e,morphTargets:t}}parseSkeleton(e,t){let r=[];return e.children.forEach(function(e){let n=t[e.ID];if("Cluster"!==n.attrType)return;let a={ID:e.ID,indices:[],weights:[],transformLink:new o.kn4().fromArray(n.TransformLink.a)};"Indexes"in n&&(a.indices=n.Indexes.a,a.weights=n.Weights.a),r.push(a)}),{rawBones:r,bones:[]}}parseMorphTargets(e,t){let r=[];for(let n=0;n<e.children.length;n++){let i=e.children[n],o=t[i.ID],l={name:o.attrName,initialWeight:o.DeformPercent,id:o.id,fullWeights:o.FullWeights.a};if("BlendShapeChannel"!==o.attrType)return;l.geoID=a.get(parseInt(i.ID)).children.filter(function(e){return void 0===e.relationship})[0].ID,r.push(l)}return r}parseScene(e,t,r){i=new o.YJl;let l=this.parseModels(e.skeletons,t,r),s=n.Objects.Model,u=this;l.forEach(function(e){let t=s[e.ID];u.setLookAtProperties(e,t),a.get(e.ID).parents.forEach(function(t){let r=l.get(t.ID);void 0!==r&&r.add(e)}),null===e.parent&&i.add(e)}),this.bindSkeleton(e.skeletons,t,l),this.addGlobalSceneSettings(),i.traverse(function(e){if(e.userData.transformData){e.parent&&(e.userData.transformData.parentMatrix=e.parent.matrix,e.userData.transformData.parentMatrixWorld=e.parent.matrixWorld);let t=N(e.userData.transformData);e.applyMatrix4(t),e.updateWorldMatrix()}});let c=new p().parse();1===i.children.length&&i.children[0].isGroup&&(i.children[0].animations=c,i=i.children[0]),i.animations=c}parseModels(e,t,r){let i=new Map,l=n.Objects.Model;for(let n in l){let s=parseInt(n),u=l[n],c=a.get(s),f=this.buildSkeleton(c,e,s,u.attrName);if(!f){switch(u.attrType){case"Camera":f=this.createCamera(c);break;case"Light":f=this.createLight(c);break;case"Mesh":f=this.createMesh(c,t,r);break;case"NurbsCurve":f=this.createCurve(c,t);break;case"LimbNode":case"Root":f=new o.$Kf;break;default:f=new o.YJl}f.name=u.attrName?o.Nwf.sanitizeNodeName(u.attrName):"",f.userData.originalName=u.attrName,f.ID=s}this.getTransformData(f,u),i.set(s,f)}return i}buildSkeleton(e,t,r,n){let a=null;return e.parents.forEach(function(e){for(let i in t){let l=t[i];l.rawBones.forEach(function(t,i){if(t.ID===e.ID){let e=a;(a=new o.$Kf).matrixWorld.copy(t.transformLink),a.name=n?o.Nwf.sanitizeNodeName(n):"",a.userData.originalName=n,a.ID=r,l.bones[i]=a,null!==e&&a.add(e)}})}}),a}createCamera(e){let t,r;if(e.children.forEach(function(e){let t=n.Objects.NodeAttribute[e.ID];void 0!==t&&(r=t)}),void 0===r)t=new o.B69;else{let e=0;void 0!==r.CameraProjectionType&&1===r.CameraProjectionType.value&&(e=1);let n=1;void 0!==r.NearPlane&&(n=r.NearPlane.value/1e3);let a=1e3;void 0!==r.FarPlane&&(a=r.FarPlane.value/1e3);let i=window.innerWidth,l=window.innerHeight;void 0!==r.AspectWidth&&void 0!==r.AspectHeight&&(i=r.AspectWidth.value,l=r.AspectHeight.value);let s=i/l,u=45;void 0!==r.FieldOfView&&(u=r.FieldOfView.value);let c=r.FocalLength?r.FocalLength.value:null;0===e?(t=new o.ubm(u,s,n,a),null!==c&&t.setFocalLength(c)):t=new o.B69}return t}createLight(e){let t,r;if(e.children.forEach(function(e){let t=n.Objects.NodeAttribute[e.ID];void 0!==t&&(r=t)}),void 0===r)t=new o.B69;else{let e;e=void 0===r.LightType?0:r.LightType.value;let n=0xffffff;void 0!==r.Color&&(n=o.ppV.toWorkingColorSpace(new o.Q1f().fromArray(r.Color.value),o.er$));let a=void 0===r.Intensity?1:r.Intensity.value/100;void 0!==r.CastLightOnObject&&0===r.CastLightOnObject.value&&(a=0);let i=0;switch(void 0!==r.FarAttenuationEnd&&(i=void 0!==r.EnableFarAttenuation&&0===r.EnableFarAttenuation.value?0:r.FarAttenuationEnd.value),e){case 0:t=new o.HiM(n,a,i,1);break;case 1:t=new o.ZyN(n,a);break;case 2:let l=Math.PI/3;void 0!==r.InnerAngle&&(l=o.cj9.degToRad(r.InnerAngle.value));let s=0;void 0!==r.OuterAngle&&(s=Math.max(s=o.cj9.degToRad(r.OuterAngle.value),1)),t=new o.nCl(n,a,i,l,s,1);break;default:t=new o.HiM(n,a)}void 0!==r.CastShadows&&1===r.CastShadows.value&&(t.castShadow=!0)}return t}createMesh(e,t,r){let n;let a=null,i=null,l=[];
1if(e.children.forEach(function(e){t.has(e.ID)&&(a=t.get(e.ID)),r.has(e.ID)&&l.push(r.get(e.ID))}),l.length>1?i=l:l.length>0?i=l[0]:(i=new o.tXL({name:o.aHM.DEFAULT_MATERIAL_NAME,color:0xcccccc}),l.push(i)),"color"in a.attributes&&l.forEach(function(e){e.vertexColors=!0}),a.groups.length>0){let e=!1;for(let t=0,r=a.groups.length;t<r;t++){let r=a.groups[t];(r.materialIndex<0||r.materialIndex>=l.length)&&(r.materialIndex=l.length,e=!0)}if(e){let e=new o.tXL;l.push(e)}}return a.FBX_Deformer?(n=new o.I46(a,i)).normalizeSkinWeights():n=new o.eaF(a,i),n}createCurve(e,t){let r=e.children.reduce(function(e,r){return t.has(r.ID)&&(e=t.get(r.ID)),e},null),n=new o.mrM({name:o.aHM.DEFAULT_MATERIAL_NAME,color:3342591,linewidth:1});return new o.N1A(r,n)}getTransformData(e,t){let r={};"InheritType"in t&&(r.inheritType=parseInt(t.InheritType.value)),"RotationOrder"in t?r.eulerOrder=T(t.RotationOrder.value):r.eulerOrder=T(0),"Lcl_Translation"in t&&(r.translation=t.Lcl_Translation.value),"PreRotation"in t&&(r.preRotation=t.PreRotation.value),"Lcl_Rotation"in t&&(r.rotation=t.Lcl_Rotation.value),"PostRotation"in t&&(r.postRotation=t.PostRotation.value),"Lcl_Scaling"in t&&(r.scale=t.Lcl_Scaling.value),"ScalingOffset"in t&&(r.scalingOffset=t.ScalingOffset.value),"ScalingPivot"in t&&(r.scalingPivot=t.ScalingPivot.value),"RotationOffset"in t&&(r.rotationOffset=t.RotationOffset.value),"RotationPivot"in t&&(r.rotationPivot=t.RotationPivot.value),e.userData.transformData=r}setLookAtProperties(e,t){"LookAtProperty"in t&&a.get(e.ID).children.forEach(function(t){if("LookAtProperty"===t.relationship){let r=n.Objects.Model[t.ID];if("Lcl_Translation"in r){let t=r.Lcl_Translation.value;void 0!==e.target?(e.target.position.fromArray(t),i.add(e.target)):e.lookAt(new o.Pq0().fromArray(t))}}})}bindSkeleton(e,t,r){let n=this.parsePoseNodes();for(let i in e){let l=e[i];a.get(parseInt(l.ID)).parents.forEach(function(e){if(t.has(e.ID)){let t=e.ID;a.get(t).parents.forEach(function(e){r.has(e.ID)&&r.get(e.ID).bind(new o.EAD(l.bones),n[e.ID])})}})}}parsePoseNodes(){let e={};if("Pose"in n.Objects){let t=n.Objects.Pose;for(let r in t)if("BindPose"===t[r].attrType&&t[r].NbPoseNodes>0){let n=t[r].PoseNode;Array.isArray(n)?n.forEach(function(t){e[t.Node]=new o.kn4().fromArray(t.Matrix.a)}):e[n.Node]=new o.kn4().fromArray(n.Matrix.a)}}return e}addGlobalSceneSettings(){if("GlobalSettings"in n){if("AmbientColor"in n.GlobalSettings){let e=n.GlobalSettings.AmbientColor.value,t=e[0],r=e[1],a=e[2];if(0!==t||0!==r||0!==a){let e=new o.Q1f().setRGB(t,r,a,o.er$);i.add(new o.$p8(e,1))}}"UnitScaleFactor"in n.GlobalSettings&&(i.userData.unitScaleFactor=n.GlobalSettings.UnitScaleFactor.value)}}constructor(e,t){this.textureLoader=e,this.manager=t}}class d{parse(e){let t=new Map;if("Geometry"in n.Objects){let r=n.Objects.Geometry;for(let n in r){let i=a.get(parseInt(n)),o=this.parseGeometry(i,r[n],e);t.set(parseInt(n),o)}}return this.negativeMaterialIndices,t}parseGeometry(e,t,r){switch(t.attrType){case"Mesh":return this.parseMeshGeometry(e,t,r);case"NurbsCurve":return this.parseNurbsGeometry(t)}}parseMeshGeometry(e,t,r){let a=r.skeletons,i=[],o=e.parents.map(function(e){return n.Objects.Model[e.ID]});if(0===o.length)return;let l=e.children.reduce(function(e,t){return void 0!==a[t.ID]&&(e=a[t.ID]),e},null);e.children.forEach(function(e){void 0!==r.morphTargets[e.ID]&&i.push(r.morphTargets[e.ID])});let s=o[0],u={};"RotationOrder"in s&&(u.eulerOrder=T(s.RotationOrder.value)),"InheritType"in s&&(u.inheritType=parseInt(s.InheritType.value)),"GeometricTranslation"in s&&(u.translation=s.GeometricTranslation.value),"GeometricRotation"in s&&(u.rotation=s.GeometricRotation.value),"GeometricScaling"in s&&(u.scale=s.GeometricScaling.value);let c=N(u);return this.genGeometry(t,l,i,c)}genGeometry(e,t,r,n){let a=new o.LoY;e.attrName&&(a.name=e.attrName);let i=this.parseGeoNode(e,t),l=this.genBuffers(i),s=new o.qtW(l.vertex,3);if(s.applyMatrix4(n),a.setAttribute("position",s),l.colors.length>0&&a.setAttribute("color",new o.qtW(l.colors,3)),t&&(a.setAttribute("skinIndex",new o.A$4(l.weightsIndices,4)),a.setAttribute("skinWeight",new o.qtW(l.vertexWeights,4)),a.FBX_Deformer=t),l.normal.length>0){let e=new o.dwI().getNormalMatrix(n),t=new o.qtW(l.normal,3);t.applyNormalMatrix(e),a.setAttribute("normal",t)}
1if(l.uvs.forEach(function(e,t){a.setAttribute(0===t?"uv":"uv".concat(t),new o.qtW(l.uvs[t],2))}),i.material&&"AllSame"!==i.material.mappingType){let e=l.materialIndex[0],t=0;if(l.materialIndex.forEach(function(r,n){r!==e&&(a.addGroup(t,n-t,e),e=r,t=n)}),a.groups.length>0){let t=a.groups[a.groups.length-1],r=t.start+t.count;r!==l.materialIndex.length&&a.addGroup(r,l.materialIndex.length-r,e)}0===a.groups.length&&a.addGroup(0,l.materialIndex.length,l.materialIndex[0])}return this.addMorphTargets(a,e,r,n),a}parseGeoNode(e,t){let r={};if(r.vertexPositions=void 0!==e.Vertices?e.Vertices.a:[],r.vertexIndices=void 0!==e.PolygonVertexIndex?e.PolygonVertexIndex.a:[],e.LayerElementColor&&(r.color=this.parseVertexColors(e.LayerElementColor[0])),e.LayerElementMaterial&&(r.material=this.parseMaterialIndices(e.LayerElementMaterial[0])),e.LayerElementNormal&&(r.normal=this.parseNormals(e.LayerElementNormal[0])),e.LayerElementUV){r.uv=[];let t=0;for(;e.LayerElementUV[t];)e.LayerElementUV[t].UV&&r.uv.push(this.parseUVs(e.LayerElementUV[t])),t++}return r.weightTable={},null!==t&&(r.skeleton=t,t.rawBones.forEach(function(e,t){e.indices.forEach(function(n,a){void 0===r.weightTable[n]&&(r.weightTable[n]=[]),r.weightTable[n].push({id:t,weight:e.weights[a]})})})),r}genBuffers(e){let t={vertex:[],normal:[],colors:[],uvs:[],materialIndex:[],vertexWeights:[],weightsIndices:[]},r=0,n=0,a=!1,i=[],o=[],l=[],s=[],u=[],c=[],f=this;return e.vertexIndices.forEach(function(d,p){let h;let m=!1;d<0&&(d^=-1,m=!0);let g=[],y=[];if(i.push(3*d,3*d+1,3*d+2),e.color){let t=w(p,r,d,e.color);l.push(t[0],t[1],t[2])}if(e.skeleton){if(void 0!==e.weightTable[d]&&e.weightTable[d].forEach(function(e){y.push(e.weight),g.push(e.id)}),y.length>4){a||(a=!0);let e=[0,0,0,0],t=[0,0,0,0];y.forEach(function(r,n){let a=r,i=g[n];t.forEach(function(t,r,n){if(a>t){n[r]=a,a=t;let o=e[r];e[r]=i,i=o}})}),g=e,y=t}for(;y.length<4;)y.push(0),g.push(0);for(let e=0;e<4;++e)u.push(y[e]),c.push(g[e])}if(e.normal){let t=w(p,r,d,e.normal);o.push(t[0],t[1],t[2])}e.material&&"AllSame"!==e.material.mappingType&&(h=w(p,r,d,e.material)[0])<0&&(f.negativeMaterialIndices=!0,h=0),e.uv&&e.uv.forEach(function(e,t){let n=w(p,r,d,e);void 0===s[t]&&(s[t]=[]),s[t].push(n[0]),s[t].push(n[1])}),n++,m&&(f.genFace(t,e,i,h,o,l,s,u,c,n),r++,n=0,i=[],o=[],l=[],s=[],u=[],c=[])}),t}getNormalNewell(e){let t=new o.Pq0(0,0,0);for(let r=0;r<e.length;r++){let n=e[r],a=e[(r+1)%e.length];t.x+=(n.y-a.y)*(n.z+a.z),t.y+=(n.z-a.z)*(n.x+a.x),t.z+=(n.x-a.x)*(n.y+a.y)}return t.normalize(),t}getNormalTangentAndBitangent(e){let t=this.getNormalNewell(e),r=(Math.abs(t.z)>.5?new o.Pq0(0,1,0):new o.Pq0(0,0,1)).cross(t).normalize(),n=t.clone().cross(r).normalize();return{normal:t,tangent:r,bitangent:n}}flattenVertex(e,t,r){return new o.I9Y(e.dot(t),e.dot(r))}genFace(e,t,r,n,a,i,l,s,u,c){let f;if(c>3){let e=[],n=t.baseVertexPositions||t.vertexPositions;for(let t=0;t<r.length;t+=3)e.push(new o.Pq0(n[r[t]],n[r[t+1]],n[r[t+2]]));let{tangent:a,bitangent:i}=this.getNormalTangentAndBitangent(e),l=[];for(let t of e)l.push(this.flattenVertex(t,a,i));f=o.xJ6.triangulateShape(l,[])}else f=[[0,1,2]];for(let[o,c,d]of f)e.vertex.push(t.vertexPositions[r[3*o]]),e.vertex.push(t.vertexPositions[r[3*o+1]]),e.vertex.push(t.vertexPositions[r[3*o+2]]),e.vertex.push(t.vertexPositions[r[3*c]]),e.vertex.push(t.vertexPositions[r[3*c+1]]),e.vertex.push(t.vertexPositions[r[3*c+2]]),e.vertex.push(t.vertexPositions[r[3*d]]),e.vertex.push(t.vertexPositions[r[3*d+1]]),e.vertex.push(t.vertexPositions[r[3*d+2]]),t.skeleton&&(e.vertexWeights.push(s[4*o]),e.vertexWeights.push(s[4*o+1]),e.vertexWeights.push(s[4*o+2]),e.vertexWeights.push(s[4*o+3]),e.vertexWeights.push(s[4*c]),e.vertexWeights.push(s[4*c+1]),e.vertexWeights.push(s[4*c+2]),e.vertexWeights.push(s[4*c+3]),e.vertexWeights.push(s[4*d]),e.vertexWeights.push(s[4*d+1]),e.vertexWeights.push(s[4*d+2]),e.vertexWeights.push(s[4*d+3]),e.weightsIndices.push(u[4*o]),e.weightsIndices.push(u[4*o+1]),e.weightsIndices.push(u[4*o+2]),e.weightsIndices.push(u[4*o+3]),e.weightsIndices.push(u[4*c]),e.weightsIndices.push(u[4*c+1]),e.weightsIndices.push(u[4*c+2]),e.weightsIndices.push(u[4*c+3]),e.
1weightsIndices.push(u[4*d]),e.weightsIndices.push(u[4*d+1]),e.weightsIndices.push(u[4*d+2]),e.weightsIndices.push(u[4*d+3])),t.color&&(e.colors.push(i[3*o]),e.colors.push(i[3*o+1]),e.colors.push(i[3*o+2]),e.colors.push(i[3*c]),e.colors.push(i[3*c+1]),e.colors.push(i[3*c+2]),e.colors.push(i[3*d]),e.colors.push(i[3*d+1]),e.colors.push(i[3*d+2])),t.material&&"AllSame"!==t.material.mappingType&&(e.materialIndex.push(n),e.materialIndex.push(n),e.materialIndex.push(n)),t.normal&&(e.normal.push(a[3*o]),e.normal.push(a[3*o+1]),e.normal.push(a[3*o+2]),e.normal.push(a[3*c]),e.normal.push(a[3*c+1]),e.normal.push(a[3*c+2]),e.normal.push(a[3*d]),e.normal.push(a[3*d+1]),e.normal.push(a[3*d+2])),t.uv&&t.uv.forEach(function(t,r){void 0===e.uvs[r]&&(e.uvs[r]=[]),e.uvs[r].push(l[r][2*o]),e.uvs[r].push(l[r][2*o+1]),e.uvs[r].push(l[r][2*c]),e.uvs[r].push(l[r][2*c+1]),e.uvs[r].push(l[r][2*d]),e.uvs[r].push(l[r][2*d+1])})}addMorphTargets(e,t,r,a){if(0===r.length)return;e.morphTargetsRelative=!0,e.morphAttributes.position=[];let i=this;r.forEach(function(r){r.rawTargets.forEach(function(r){let o=n.Objects.Geometry[r.geoID];void 0!==o&&i.genMorphGeometry(e,t,o,a,r.name)})})}genMorphGeometry(e,t,r,n,a){let i=void 0!==t.Vertices?t.Vertices.a:[],l=void 0!==t.PolygonVertexIndex?t.PolygonVertexIndex.a:[],s=void 0!==r.Vertices?r.Vertices.a:[],u=void 0!==r.Indexes?r.Indexes.a:[],c=new Float32Array(3*e.attributes.position.count);for(let e=0;e<u.length;e++){let t=3*u[e];c[t]=s[3*e],c[t+1]=s[3*e+1],c[t+2]=s[3*e+2]}let f=this.genBuffers({vertexIndices:l,vertexPositions:c,baseVertexPositions:i}),d=new o.qtW(f.vertex,3);d.name=a||r.attrName,d.applyMatrix4(n),e.morphAttributes.position.push(d)}parseNormals(e){let t=e.MappingInformationType,r=e.ReferenceInformationType,n=e.Normals.a,a=[];return"IndexToDirect"===r&&("NormalIndex"in e?a=e.NormalIndex.a:"NormalsIndex"in e&&(a=e.NormalsIndex.a)),{dataSize:3,buffer:n,indices:a,mappingType:t,referenceType:r}}parseUVs(e){let t=e.MappingInformationType,r=e.ReferenceInformationType,n=e.UV.a,a=[];return"IndexToDirect"===r&&(a=e.UVIndex.a),{dataSize:2,buffer:n,indices:a,mappingType:t,referenceType:r}}parseVertexColors(e){let t=e.MappingInformationType,r=e.ReferenceInformationType,n=e.Colors.a,a=[];"IndexToDirect"===r&&(a=e.ColorIndex.a);for(let e=0,t=new o.Q1f;e<n.length;e+=4)t.fromArray(n,e),o.ppV.toWorkingColorSpace(t,o.er$),t.toArray(n,e);return{dataSize:4,buffer:n,indices:a,mappingType:t,referenceType:r}}parseMaterialIndices(e){let t=e.MappingInformationType,r=e.ReferenceInformationType;if("NoMappingInformation"===t)return{dataSize:1,buffer:[0],indices:[0],mappingType:"AllSame",referenceType:r};let n=e.Materials.a,a=[];for(let e=0;e<n.length;++e)a.push(e);return{dataSize:1,buffer:n,indices:a,mappingType:t,referenceType:r}}parseNurbsGeometry(e){let t,r;let n=parseInt(e.Order);if(isNaN(n))return console.error("THREE.FBXLoader: Invalid Order %s given for geometry ID: %s",e.Order,e.id),new o.LoY;let a=n-1,i=e.KnotVector.a,l=[],s=e.Points.a;for(let e=0,t=s.length;e<t;e+=4)l.push(new o.IUQ().fromArray(s,e));if("Closed"===e.Form)l.push(l[0]);else if("Periodic"===e.Form){t=a,r=i.length-1-t;for(let e=0;e<a;++e)l.push(l[e])}let c=new u(a,i,l,t,r).getPoints(12*l.length);return new o.LoY().setFromPoints(c)}constructor(){this.negativeMaterialIndices=!1}}class p{parse(){let e=[],t=this.parseClips();if(void 0!==t)for(let r in t){let n=t[r],a=this.addClip(n);e.push(a)}return e}parseClips(){if(void 0===n.Objects.AnimationCurve)return;let e=this.parseAnimationCurveNodes();this.parseAnimationCurves(e);let t=this.parseAnimationLayers(e);return this.parseAnimStacks(t)}parseAnimationCurveNodes(){let e=n.Objects.AnimationCurveNode,t=new Map;for(let r in e){let n=e[r];if(null!==n.attrName.match(/S|R|T|DeformPercent/)){let e={id:n.id,attr:n.attrName,curves:{}};t.set(e.id,e)}}return t}parseAnimationCurves(e){let t=n.Objects.AnimationCurve;for(let r in t){let n={id:t[r].id,times:t[r].KeyTime.a.map(v),values:t[r].KeyValueFloat.a},i=a.get(n.id);if(void 0!==i){let t=i.parents[0].ID,r=i.parents[0].relationship;r.match(/X/)?e.get(t).curves.x=n:r.match(/Y/)?e.get(t).curves.y=n:r.match(/Z/)?e.get(t).curves.z=n:r.match(/DeformPercent/)&&e.has(t)&&(e.get(t).curves.morph=n)}}}parseAnimationLayers(e){let t=n.Objects.AnimationLayer,r=new Map;for(let l in t){let t=[],s=a.get(parseInt(l));
1void 0!==s&&(s.children.forEach(function(r,l){if(e.has(r.ID)){let s=e.get(r.ID);if(void 0!==s.curves.x||void 0!==s.curves.y||void 0!==s.curves.z){if(void 0===t[l]){let e=a.get(r.ID).parents.filter(function(e){return void 0!==e.relationship})[0].ID;if(void 0!==e){let r=n.Objects.Model[e.toString()];if(void 0===r)return;let a={modelName:r.attrName?o.Nwf.sanitizeNodeName(r.attrName):"",ID:r.id,initialPosition:[0,0,0],initialRotation:[0,0,0],initialScale:[1,1,1]};i.traverse(function(e){e.ID===r.id&&(a.transform=e.matrix,e.userData.transformData&&(a.eulerOrder=e.userData.transformData.eulerOrder))}),a.transform||(a.transform=new o.kn4),"PreRotation"in r&&(a.preRotation=r.PreRotation.value),"PostRotation"in r&&(a.postRotation=r.PostRotation.value),t[l]=a}}t[l]&&(t[l][s.attr]=s)}else if(void 0!==s.curves.morph){if(void 0===t[l]){let e=a.get(r.ID).parents.filter(function(e){return void 0!==e.relationship})[0].ID,i=a.get(e).parents[0].ID,s=a.get(i).parents[0].ID,u=a.get(s).parents[0].ID,c=n.Objects.Model[u],f={modelName:c.attrName?o.Nwf.sanitizeNodeName(c.attrName):"",morphName:n.Objects.Deformer[e].attrName};t[l]=f}t[l][s.attr]=s}}}),r.set(parseInt(l),t))}return r}parseAnimStacks(e){let t=n.Objects.AnimationStack,r={};for(let n in t){let i=a.get(parseInt(n)).children;i.length;let o=e.get(i[0].ID);r[n]={name:t[n].attrName,layer:o}}return r}addClip(e){let t=[],r=this;return e.layer.forEach(function(e){t=t.concat(r.generateTracks(e))}),new o.tz3(e.name,-1,t)}generateTracks(e){let t=[],r=new o.Pq0,n=new o.Pq0;if(e.transform&&e.transform.decompose(r,new o.PTz,n),r=r.toArray(),n=n.toArray(),void 0!==e.T&&Object.keys(e.T.curves).length>0){let n=this.generateVectorTrack(e.modelName,e.T.curves,r,"position");void 0!==n&&t.push(n)}if(void 0!==e.R&&Object.keys(e.R.curves).length>0){let r=this.generateRotationTrack(e.modelName,e.R.curves,e.preRotation,e.postRotation,e.eulerOrder);void 0!==r&&t.push(r)}if(void 0!==e.S&&Object.keys(e.S.curves).length>0){let r=this.generateVectorTrack(e.modelName,e.S.curves,n,"scale");void 0!==r&&t.push(r)}if(void 0!==e.DeformPercent){let r=this.generateMorphTrack(e);void 0!==r&&t.push(r)}return t}generateVectorTrack(e,t,r,n){let a=this.getTimesForAllAxes(t),i=this.getKeyframeTrackValues(a,t,r);return new o.RiT(e+"."+n,a,i)}generateRotationTrack(e,t,r,n,a){let i,l;if(void 0!==t.x&&void 0!==t.y&&void 0!==t.z){let e=this.interpolateRotations(t.x,t.y,t.z,a);i=e[0],l=e[1]}let s=T(0);void 0!==r&&((r=r.map(o.cj9.degToRad)).push(s),r=new o.O9p().fromArray(r),r=new o.PTz().setFromEuler(r)),void 0!==n&&((n=n.map(o.cj9.degToRad)).push(s),n=new o.O9p().fromArray(n),n=new o.PTz().setFromEuler(n).invert());let u=new o.PTz,c=new o.O9p,f=[];if(!l||!i)return new o.MBL(e+".quaternion",[0],[0]);for(let e=0;e<l.length;e+=3)c.set(l[e],l[e+1],l[e+2],a),u.setFromEuler(c),void 0!==r&&u.premultiply(r),void 0!==n&&u.multiply(n),e>2&&0>new o.PTz().fromArray(f,(e-3)/3*4).dot(u)&&u.set(-u.x,-u.y,-u.z,-u.w),u.toArray(f,e/3*4);return new o.MBL(e+".quaternion",i,f)}generateMorphTrack(e){let t=e.DeformPercent.curves.morph,r=t.values.map(function(e){return e/100}),n=i.getObjectByName(e.modelName).morphTargetDictionary[e.morphName];return new o.Hit(e.modelName+".morphTargetInfluences["+n+"]",t.times,r)}getTimesForAllAxes(e){let t=[];if(void 0!==e.x&&(t=t.concat(e.x.times)),void 0!==e.y&&(t=t.concat(e.y.times)),void 0!==e.z&&(t=t.concat(e.z.times)),(t=t.sort(function(e,t){return e-t})).length>1){let e=1,r=t[0];for(let n=1;n<t.length;n++){let a=t[n];a!==r&&(t[e]=a,r=a,e++)}t=t.slice(0,e)}return t}getKeyframeTrackValues(e,t,r){let n=[],a=-1,i=-1,o=-1;return e.forEach(function(e){if(t.x&&(a=t.x.times.indexOf(e)),t.y&&(i=t.y.times.indexOf(e)),t.z&&(o=t.z.times.indexOf(e)),-1!==a){let e=t.x.values[a];n.push(e),r[0]=e}else n.push(r[0]);if(-1!==i){let e=t.y.values[i];n.push(e),r[1]=e}else n.push(r[1]);if(-1!==o){let e=t.z.values[o];n.push(e),r[2]=e}else n.push(r[2])}),n}interpolateRotations(e,t,r,n){let a=[],i=[];a.push(e.times[0]),i.push(o.cj9.degToRad(e.values[0])),i.push(o.cj9.degToRad(t.values[0])),i.push(o.cj9.degToRad(r.values[0]));for(let l=1;l<e.values.length;
1l++){let s=[e.values[l-1],t.values[l-1],r.values[l-1]];if(isNaN(s[0])||isNaN(s[1])||isNaN(s[2]))continue;let u=s.map(o.cj9.degToRad),c=[e.values[l],t.values[l],r.values[l]];if(isNaN(c[0])||isNaN(c[1])||isNaN(c[2]))continue;let f=c.map(o.cj9.degToRad),d=[c[0]-s[0],c[1]-s[1],c[2]-s[2]],p=[Math.abs(d[0]),Math.abs(d[1]),Math.abs(d[2])];if(p[0]>=180||p[1]>=180||p[2]>=180){let t=Math.max(...p)/180,r=new o.O9p(...u,n),s=new o.O9p(...f,n),c=new o.PTz().setFromEuler(r),d=new o.PTz().setFromEuler(s);c.dot(d)&&d.set(-d.x,-d.y,-d.z,-d.w);let h=e.times[l-1],m=e.times[l]-h,g=new o.PTz,y=new o.O9p;for(let e=0;e<1;e+=1/t)g.copy(c.clone().slerp(d.clone(),e)),a.push(h+e*m),y.setFromQuaternion(g,n),i.push(y.x),i.push(y.y),i.push(y.z)}else a.push(e.times[l]),i.push(o.cj9.degToRad(e.values[l])),i.push(o.cj9.degToRad(t.values[l])),i.push(o.cj9.degToRad(r.values[l]))}return[a,i]}}class h{getPrevNode(){return this.nodeStack[this.currentIndent-2]}getCurrentNode(){return this.nodeStack[this.currentIndent-1]}getCurrentProp(){return this.currentProp}pushStack(e){this.nodeStack.push(e),this.currentIndent+=1}popStack(){this.nodeStack.pop(),this.currentIndent-=1}setCurrentProp(e,t){this.currentProp=e,this.currentPropName=t}parse(e){this.currentIndent=0,this.allNodes=new y,this.nodeStack=[],this.currentProp=[],this.currentPropName="";let t=this,r=e.split(/[\r\n]+/);return r.forEach(function(e,n){let a=e.match(/^[\s\t]*;/),i=e.match(/^[\s\t]*$/);if(a||i)return;let o=e.match("^\\t{"+t.currentIndent+"}(\\w+):(.*){",""),l=e.match("^\\t{"+t.currentIndent+"}(\\w+):[\\s\\t\\r\\n](.*)"),s=e.match("^\\t{"+(t.currentIndent-1)+"}}");o?t.parseNodeBegin(e,o):l?t.parseNodeProperty(e,l,r[++n]):s?t.popStack():e.match(/^[^\s\t}]/)&&t.parseNodePropertyContinued(e)}),this.allNodes}parseNodeBegin(e,t){let r=t[1].trim().replace(/^"/,"").replace(/"$/,""),n=t[2].split(",").map(function(e){return e.trim().replace(/^"/,"").replace(/"$/,"")}),a={name:r},i=this.parseNodeAttr(n),o=this.getCurrentNode();0===this.currentIndent?this.allNodes.add(r,a):r in o?("PoseNode"===r?o.PoseNode.push(a):void 0!==o[r].id&&(o[r]={},o[r][o[r].id]=o[r]),""!==i.id&&(o[r][i.id]=a)):"number"==typeof i.id?(o[r]={},o[r][i.id]=a):"Properties70"!==r&&("PoseNode"===r?o[r]=[a]:o[r]=a),"number"==typeof i.id&&(a.id=i.id),""!==i.name&&(a.attrName=i.name),""!==i.type&&(a.attrType=i.type),this.pushStack(a)}parseNodeAttr(e){let t=e[0];""!==e[0]&&isNaN(t=parseInt(e[0]))&&(t=e[0]);let r="",n="";return e.length>1&&(r=e[1].replace(/^(\w+)::/,""),n=e[2]),{id:t,name:r,type:n}}parseNodeProperty(e,t,r){let n=t[1].replace(/^"/,"").replace(/"$/,"").trim(),a=t[2].replace(/^"/,"").replace(/"$/,"").trim();"Content"===n&&","===a&&(a=r.replace(/"/g,"").replace(/,$/,"").trim());let i=this.getCurrentNode();if("Properties70"===i.name){this.parseNodeSpecialProperty(e,n,a);return}if("C"===n){let e=a.split(",").slice(1),t=parseInt(e[0]),r=parseInt(e[1]),o=a.split(",").slice(3);o=o.map(function(e){return e.trim().replace(/^"/,"")}),n="connections",function(e,t){for(let r=0,n=e.length,a=t.length;r<a;r++,n++)e[n]=t[r]}(a=[t,r],o),void 0===i[n]&&(i[n]=[])}"Node"===n&&(i.id=a),n in i&&Array.isArray(i[n])?i[n].push(a):"a"!==n?i[n]=a:i.a=a,this.setCurrentProp(i,n),"a"===n&&","!==a.slice(-1)&&(i.a=I(a))}parseNodePropertyContinued(e){let t=this.getCurrentNode();t.a+=e,","!==e.slice(-1)&&(t.a=I(t.a))}parseNodeSpecialProperty(e,t,r){let n=r.split('",').map(function(e){return e.trim().replace(/^\"/,"").replace(/\s/,"_")}),a=n[0],i=n[1],o=n[2],l=n[3],s=n[4];switch(i){case"int":case"enum":case"bool":case"ULongLong":case"double":case"Number":case"FieldOfView":s=parseFloat(s);break;case"Color":case"ColorRGB":case"Vector3D":case"Lcl_Translation":case"Lcl_Rotation":case"Lcl_Scaling":s=I(s)}this.getPrevNode()[a]={type:i,type2:o,flag:l,value:s},this.setCurrentProp(this.getPrevNode(),a)}}class m{parse(e){let t=new g(e);t.skip(23);let r=t.getUint32();if(r<6400)throw Error("THREE.FBXLoader: FBX version not supported, FileVersion: "+r);let n=new y;for(;!this.endOfContent(t);){let e=this.parseNode(t,r);null!==e&&n.add(e.name,e)}return n}endOfContent(e){return e.size()%16==0?(e.getOffset()+160+16&-16)>=e.size():e.getOffset()+160+16>=e.size()}parseNode(e,t){let r={},n=t>=7500?e.getUint64():e.getUint32(),a=t>=7500?e.getUint64():e.getUint32();t>=7500?e.getUint64():e.getUint32();let i=e.getUint8(),o=e.getString(i);if(0===n)return null;let l=[];for(let t=0;t<a;t++)l.push(this.parseProperty(e));let s=l.length>0?l[0]:"",u=l.length>1?l[1]:"",c=l.length>2?l[2]:"";for(r.singleProperty=1===a&&e.getOffset()===n;n>e.getOffset();){let n=this.parseNode(e,t);null!==n&&this.parseSubNode(o,r,n)}return r.propertyList=l,"number"==typeof s&&(r.id=s),""!==u&&(r.attrName=u),""!==c&&(r.attrType=c),""!==o&&(r.name=o),r}parseSubNode(e,t,r){if(!0===r.singleProperty){let e=r.propertyList[0];
1Array.isArray(e)?(t[r.name]=r,r.a=e):t[r.name]=e}else if("Connections"===e&&"C"===r.name){let e=[];r.propertyList.forEach(function(t,r){0!==r&&e.push(t)}),void 0===t.connections&&(t.connections=[]),t.connections.push(e)}else if("Properties70"===r.name)Object.keys(r).forEach(function(e){t[e]=r[e]});else if("Properties70"===e&&"P"===r.name){let e,n=r.propertyList[0],a=r.propertyList[1],i=r.propertyList[2],o=r.propertyList[3];0===n.indexOf("Lcl ")&&(n=n.replace("Lcl ","Lcl_")),0===a.indexOf("Lcl ")&&(a=a.replace("Lcl ","Lcl_")),e="Color"===a||"ColorRGB"===a||"Vector"===a||"Vector3D"===a||0===a.indexOf("Lcl_")?[r.propertyList[4],r.propertyList[5],r.propertyList[6]]:r.propertyList[4],t[n]={type:a,type2:i,flag:o,value:e}}else void 0===t[r.name]?"number"==typeof r.id?(t[r.name]={},t[r.name][r.id]=r):t[r.name]=r:"PoseNode"===r.name?(Array.isArray(t[r.name])||(t[r.name]=[t[r.name]]),t[r.name].push(r)):void 0===t[r.name][r.id]&&(t[r.name][r.id]=r)}parseProperty(e){let t;let r=e.getString(1);switch(r){case"C":return e.getBoolean();case"D":return e.getFloat64();case"F":return e.getFloat32();case"I":return e.getInt32();case"L":return e.getInt64();case"R":return t=e.getUint32(),e.getArrayBuffer(t);case"S":return t=e.getUint32(),e.getString(t);case"Y":return e.getInt16();case"b":case"c":case"d":case"f":case"i":case"l":let n=e.getUint32(),a=e.getUint32(),i=e.getUint32();if(0===a)switch(r){case"b":case"c":return e.getBooleanArray(n);case"d":return e.getFloat64Array(n);case"f":return e.getFloat32Array(n);case"i":return e.getInt32Array(n);case"l":return e.getInt64Array(n)}let o=new g(l.a8(new Uint8Array(e.getArrayBuffer(i))).buffer);switch(r){case"b":case"c":return o.getBooleanArray(n);case"d":return o.getFloat64Array(n);case"f":return o.getFloat32Array(n);case"i":return o.getInt32Array(n);case"l":return o.getInt64Array(n)}break;default:throw Error("THREE.FBXLoader: Unknown property type "+r)}}}class g{getOffset(){return this.offset}size(){return this.dv.buffer.byteLength}skip(e){this.offset+=e}getBoolean(){return(1&this.getUint8())==1}getBooleanArray(e){let t=[];for(let r=0;r<e;r++)t.push(this.getBoolean());return t}getUint8(){let e=this.dv.getUint8(this.offset);return this.offset+=1,e}getInt16(){let e=this.dv.getInt16(this.offset,this.littleEndian);return this.offset+=2,e}getInt32(){let e=this.dv.getInt32(this.offset,this.littleEndian);return this.offset+=4,e}getInt32Array(e){let t=[];for(let r=0;r<e;r++)t.push(this.getInt32());return t}getUint32(){let e=this.dv.getUint32(this.offset,this.littleEndian);return this.offset+=4,e}getInt64(){let e,t;return(this.littleEndian?(e=this.getUint32(),t=this.getUint32()):(t=this.getUint32(),e=this.getUint32()),0x80000000&t)?(t=0xffffffff&~t,0xffffffff==(e=0xffffffff&~e)&&(t=t+1&0xffffffff),-(0x100000000*t+(e=e+1&0xffffffff))):0x100000000*t+e}getInt64Array(e){let t=[];for(let r=0;r<e;r++)t.push(this.getInt64());return t}getUint64(){let e,t;return this.littleEndian?(e=this.getUint32(),t=this.getUint32()):(t=this.getUint32(),e=this.getUint32()),0x100000000*t+e}getFloat32(){let e=this.dv.getFloat32(this.offset,this.littleEndian);return this.offset+=4,e}getFloat32Array(e){let t=[];for(let r=0;r<e;r++)t.push(this.getFloat32());return t}getFloat64(){let e=this.dv.getFloat64(this.offset,this.littleEndian);return this.offset+=8,e}getFloat64Array(e){let t=[];for(let r=0;r<e;r++)t.push(this.getFloat64());return t}getArrayBuffer(e){let t=this.dv.buffer.slice(this.offset,this.offset+e);return this.offset+=e,t}getString(e){let t=this.offset,r=new Uint8Array(this.dv.buffer,t,e);this.skip(e);let n=r.indexOf(0);return n>=0&&(r=new Uint8Array(this.dv.buffer,t,n)),this._textDecoder.decode(r)}constructor(e,t){this.dv=new DataView(e),this.offset=0,this.littleEndian=void 0===t||t,this._textDecoder=new TextDecoder}}class y{add(e,t){this[e]=t}}function b(e){let t=e.match(/FBXVersion: (\d+)/);if(t)return parseInt(t[1]);throw Error("THREE.FBXLoader: Cannot find the version number for the file given.")}function v(e){return e/46186158e3}let x=[];function w(e,t,r,n){let a;switch(n.mappingType){case"ByPolygonVertex":a=e;break;case"ByPolygon":a=t;break;
1case"ByVertice":a=r;break;case"AllSame":a=n.indices[0]}"IndexToDirect"===n.referenceType&&(a=n.indices[a]);let i=a*n.dataSize,o=i+n.dataSize;return function(e,t,r,n){for(let a=r,i=0;a<n;a++,i++)e[i]=t[a];return e}(x,n.buffer,i,o)}let A=new o.O9p,k=new o.Pq0;function N(e){let t=new o.kn4,r=new o.kn4,n=new o.kn4,a=new o.kn4,i=new o.kn4,l=new o.kn4,s=new o.kn4,u=new o.kn4,c=new o.kn4,f=new o.kn4,d=new o.kn4,p=new o.kn4,h=e.inheritType?e.inheritType:0;e.translation&&t.setPosition(k.fromArray(e.translation));let m=T(0);if(e.preRotation){let t=e.preRotation.map(o.cj9.degToRad);t.push(m),r.makeRotationFromEuler(A.fromArray(t))}if(e.rotation){let t=e.rotation.map(o.cj9.degToRad);t.push(e.eulerOrder||m),n.makeRotationFromEuler(A.fromArray(t))}if(e.postRotation){let t=e.postRotation.map(o.cj9.degToRad);t.push(m),a.makeRotationFromEuler(A.fromArray(t)),a.invert()}e.scale&&i.scale(k.fromArray(e.scale)),e.scalingOffset&&s.setPosition(k.fromArray(e.scalingOffset)),e.scalingPivot&&l.setPosition(k.fromArray(e.scalingPivot)),e.rotationOffset&&u.setPosition(k.fromArray(e.rotationOffset)),e.rotationPivot&&c.setPosition(k.fromArray(e.rotationPivot)),e.parentMatrixWorld&&(d.copy(e.parentMatrix),f.copy(e.parentMatrixWorld));let g=r.clone().multiply(n).multiply(a),y=new o.kn4;y.extractRotation(f);let b=new o.kn4;b.copyPosition(f);let v=b.clone().invert().multiply(f),x=y.clone().invert().multiply(v),w=new o.kn4;if(0===h)w.copy(y).multiply(g).multiply(x).multiply(i);else if(1===h)w.copy(y).multiply(x).multiply(g).multiply(i);else{let e=new o.kn4().scale(new o.Pq0().setFromMatrixScale(d)).clone().invert(),t=x.clone().multiply(e);w.copy(y).multiply(g).multiply(t).multiply(i)}let N=c.clone().invert(),I=l.clone().invert(),E=t.clone().multiply(u).multiply(c).multiply(r).multiply(n).multiply(a).multiply(N).multiply(s).multiply(l).multiply(i).multiply(I),S=new o.kn4().copyPosition(E),C=f.clone().multiply(S);return p.copyPosition(C),(E=p.clone().multiply(w)).premultiply(f.invert()),E}function T(e){return 6===(e=e||0)?"ZYX":["ZYX","YZX","XZY","ZXY","YXZ","XYZ"][e]}function I(e){return e.split(",").map(function(e){return parseFloat(e)})}function E(e,t,r){return void 0===t&&(t=0),void 0===r&&(r=e.byteLength),new TextDecoder().decode(new Uint8Array(e,t,r))}},46751:(e,t,r)=>{r.d(t,{c:()=>i});var n=r(12);let a=n.er$;class i extends n.aHM{load(e,t,r,a){let i=this,o=new n.Y9S(i.manager);o.setPath(i.path),o.setRequestHeader(i.requestHeader),o.setWithCredentials(i.withCredentials),o.load(e,function(r){try{t(i.parse(r))}catch(t){a?a(t):console.error(t),i.manager.itemError(e)}},r,a)}parse(e){let t=this;function r(e,t,r,n,a,o,l,s){if(0==t||0==r){e.lineTo(s.x,s.y);return}n=n*Math.PI/180,t=Math.abs(t),r=Math.abs(r);let u=(l.x-s.x)/2,c=(l.y-s.y)/2,f=Math.cos(n)*u+Math.sin(n)*c,d=-Math.sin(n)*u+Math.cos(n)*c,p=t*t,h=r*r,m=f*f,g=d*d,y=m/p+g/h;if(y>1){let e=Math.sqrt(y);t*=e,r*=e,p=t*t,h=r*r}let b=p*g+h*m,v=Math.sqrt(Math.max(0,(p*h-b)/b));a===o&&(v=-v);let x=v*t*d/r,w=-v*r*f/t,A=Math.cos(n)*x-Math.sin(n)*w+(l.x+s.x)/2,k=Math.sin(n)*x+Math.cos(n)*w+(l.y+s.y)/2,N=i(1,0,(f-x)/t,(d-w)/r),T=i((f-x)/t,(d-w)/r,(-f-x)/t,(-d-w)/r)%(2*Math.PI);e.currentPath.absellipse(A,k,t,r,N,N+T,0===o,n)}function i(e,t,r,n){let a=Math.sqrt(e*e+t*t)*Math.sqrt(r*r+n*n),i=Math.acos(Math.max(-1,Math.min(1,(e*r+t*n)/a)));return e*n-t*r<0&&(i=-i),i}function o(e,t){t=Object.assign({},t);let r={};if(e.hasAttribute("class")){let t=e.getAttribute("class").split(/\s/).filter(Boolean).map(e=>e.trim());for(let e=0;e<t.length;e++)r=Object.assign(r,m["."+t[e]])}function n(n,a,i){void 0===i&&(i=function(e){return e.startsWith("url"),e}),e.hasAttribute(n)&&(t[a]=i(e.getAttribute(n))),r[n]&&(t[a]=i(r[n])),e.style&&""!==e.style[n]&&(t[a]=i(e.style[n]))}function a(e){return Math.max(0,Math.min(1,c(e)))}function i(e){return Math.max(0,c(e))}return e.hasAttribute("id")&&(r=Object.assign(r,m["#"+e.getAttribute("id")])),n("fill","fill"),n("fill-opacity","fillOpacity",a),n("fill-rule","fillRule"),n("opacity","opacity",a),n("stroke","stroke"),n("stroke-opacity","strokeOpacity",a),n("stroke-width","strokeWidth",i),n("stroke-linejoin","strokeLineJoin"),n("stroke-linecap","strokeLineCap"),n("stroke-miterlimit","strokeMiterLimit",i),n("visibility","visibility"),t}function l(e,t,r){let n;if("string"!=typeof e)throw TypeError("Invalid input: "+typeof e);let a={WHITESPACE:/[ \t\r\n]/,DIGIT:/[\d]/,SIGN:/[-+]/,POINT:/\./,COMMA:/,/,EXP:/e/i,FLAGS:/[01]/},i=0,o=!0,l="",s="",u=[];function c(e,t,r){let n=SyntaxError('Unexpected character "'+e+'" at index '+t+".");throw n.partial=r,n}function f(){""!==l&&(""===s?u.push(Number(l)):u.push(Number(l)*Math.pow(10,Number(s)))),l="",s=""}let d=e.length;for(let p=0;p<d;p++){if(n=e[p],Array.isArray(t)&&t.includes(u.length%r)&&a.FLAGS.test(n)){i=1,l=n,f();continue}if(0===i){if(a.WHITESPACE.test(n))continue;if(a.DIGIT.test(n)||a.SIGN.test(n)){i=1,l=n;continue}if(a.POINT.test(n)){i=2,l=n;continue}a.COMMA.test(n)&&(o&&c(n,p,u),o=!0)}if(1===i){if(a.DIGIT.test(n)){l+=n;continue}if(a.POINT.test(n)){l+=n,i=2;continue}if(a.EXP.test(n)){i=3;continue}a.SIGN.test(n)&&1===l.length&&a.SIGN.test(l[0])&&c(n,p,u)}if(2===i){if(a.DIGIT.test(n)){l+=n;continue}if(a.EXP.test(n)){i=3;continue}a.POINT.test(n)&&"."===l[l.length-1]&&c(n,p,u)}if(3===i){if(a.DIGIT.test(n)){s+=n;continue}
1if(a.SIGN.test(n)){if(""===s){s+=n;continue}1===s.length&&a.SIGN.test(s)&&c(n,p,u)}}a.WHITESPACE.test(n)?(f(),i=0,o=!1):a.COMMA.test(n)?(f(),i=0,o=!0):a.SIGN.test(n)?(f(),i=1,l=n):a.POINT.test(n)?(f(),i=2,l=n):c(n,p,u)}return f(),u}let s=["mm","cm","in","pt","pc","px"],u={mm:{mm:1,cm:.1,in:1/25.4,pt:72/25.4,pc:6/25.4,px:-1},cm:{mm:10,cm:1,in:1/2.54,pt:72/2.54,pc:6/2.54,px:-1},in:{mm:25.4,cm:2.54,in:1,pt:72,pc:6,px:-1},pt:{mm:25.4/72,cm:2.54/72,in:1/72,pt:1,pc:6/72,px:-1},pc:{mm:25.4/6,cm:2.54/6,in:1/6,pt:12,pc:1,px:-1},px:{px:1}};function c(e){let r,n="px";if("string"==typeof e||e instanceof String)for(let t=0,r=s.length;t<r;t++){let r=s[t];if(e.endsWith(r)){n=r,e=e.substring(0,e.length-r.length);break}}return"px"===n&&"px"!==t.defaultUnit?r=u.in[t.defaultUnit]/t.defaultDPI:(r=u[n][t.defaultUnit])<0&&(r=u[n].in*t.defaultDPI),r*parseFloat(e)}function f(e){let t=e.elements;return t[0]*t[4]-t[1]*t[3]<0}function d(e){let t=e.elements;return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function p(e){let t=e.elements;return Math.sqrt(t[3]*t[3]+t[4]*t[4])}let h=[],m={},g=[],y=new n.dwI,b=new n.dwI,v=new n.dwI,x=new n.dwI,w=new n.I9Y,A=new n.Pq0,k=new n.dwI,N=new DOMParser().parseFromString(e,"image/svg+xml");return!function e(t,i){if(1!==t.nodeType)return;let s=function(e){if(!(e.hasAttribute("transform")||"use"===e.nodeName&&(e.hasAttribute("x")||e.hasAttribute("y"))))return null;let t=function(e){let t=new n.dwI;if("use"===e.nodeName&&(e.hasAttribute("x")||e.hasAttribute("y"))){let r=c(e.getAttribute("x")),n=c(e.getAttribute("y"));t.translate(r,n)}if(e.hasAttribute("transform")){let r=e.getAttribute("transform").split(")");for(let e=r.length-1;e>=0;e--){let n=r[e].trim();if(""===n)continue;let a=n.indexOf("("),i=n.length;if(a>0&&a<i){let e=n.slice(0,a),t=l(n.slice(a+1));switch(y.identity(),e){case"translate":if(t.length>=1){let e=t[0],r=0;t.length>=2&&(r=t[1]),y.translate(e,r)}break;case"rotate":if(t.length>=1){let e=0,r=0,n=0;e=t[0]*Math.PI/180,t.length>=3&&(r=t[1],n=t[2]),b.makeTranslation(-r,-n),v.makeRotation(e),x.multiplyMatrices(v,b),b.makeTranslation(r,n),y.multiplyMatrices(b,x)}break;case"scale":if(t.length>=1){let e=t[0],r=e;t.length>=2&&(r=t[1]),y.scale(e,r)}break;case"skewX":1===t.length&&y.set(1,Math.tan(t[0]*Math.PI/180),0,0,1,0,0,0,1);break;case"skewY":1===t.length&&y.set(1,0,0,Math.tan(t[0]*Math.PI/180),1,0,0,0,1);break;case"matrix":6===t.length&&y.set(t[0],t[2],t[4],t[1],t[3],t[5],0,0,1)}}t.premultiply(y)}}return t}(e);return g.length>0&&t.premultiply(g[g.length-1]),k.copy(t),g.push(t),t}(t),u=!1,N=null;switch(t.nodeName){case"svg":case"g":i=o(t,i);break;case"style":(function(e){if(e.sheet&&e.sheet.cssRules&&e.sheet.cssRules.length)for(let t=0;t<e.sheet.cssRules.length;t++){let r=e.sheet.cssRules[t];if(1!==r.type)continue;let n=r.selectorText.split(/,/gm).filter(Boolean).map(e=>e.trim());for(let e=0;e<n.length;e++){let t=Object.fromEntries(Object.entries(r.style).filter(e=>{let[,t]=e;return""!==t}));m[n[e]]=Object.assign(m[n[e]]||{},t)}}})(t);break;case"path":i=o(t,i),t.hasAttribute("d")&&(N=function(e){let t=new n.Ld9,a=new n.I9Y,i=new n.I9Y,o=new n.I9Y,s=!0,u=!1,c=e.getAttribute("d");if(""===c||"none"===c)return null;let f=c.match(/[a-df-z][^a-df-z]*/ig);for(let e=0,n=f.length;e<n;e++){var d,p,h,m,g,y,b,v;let n;let c=f[e],x=c.charAt(0),w=c.slice(1).trim();switch(!0===s&&(u=!0,s=!1),x){case"M":n=l(w);for(let e=0,r=n.length;e<r;e+=2)a.x=n[e+0],a.y=n[e+1],i.x=a.x,i.y=a.y,0===e?t.moveTo(a.x,a.y):t.lineTo(a.x,a.y),0===e&&o.copy(a);break;case"H":n=l(w);for(let e=0,r=n.length;e<r;e++)a.x=n[e],i.x=a.x,i.y=a.y,t.lineTo(a.x,a.y),0===e&&!0===u&&o.copy(a);break;case"V":n=l(w);for(let e=0,r=n.length;e<r;e++)a.y=n[e],i.x=a.x,i.y=a.y,t.lineTo(a.x,a.y),0===e&&!0===u&&o.copy(a);break;case"L":n=l(w);for(let e=0,r=n.length;e<r;e+=2)a.x=n[e+0],a.y=n[e+1],i.x=a.x,i.y=a.y,t.lineTo(a.x,a.y),0===e&&!0===u&&o.copy(a);break;case"C":n=l(w);for(let e=0,r=n.length;e<r;e+=6)t.bezierCurveTo(n[e+0],n[e+1],n[e+2],n[e+3],n[e+4],n[e+5]),i.x=n[e+2],i.y=n[e+3],a.x=n[e+4],a.y=n[e+5],0===e&&!0===u&&o.copy(a);break;case"S":n=l(w);for(let e=0,r=n.length;e<r;e+=4)t.bezierCurveTo((d=a.x)-(i.x-d),(p=a.y)-(i.y-p),n[e+0],n[e+1],n[e+2],n[e+3]),i.x=n[e+0],i.y=n[e+1],a.x=n[e+2],a.y=n[e+3],0===e&&!0===u&&o.copy(a);break;case"Q":n=l(w);for(let e=0,r=n.length;e<r;e+=4)t.quadraticCurveTo(n[e+0],n[e+1],n[e+2],n[e+3]),i.x=n[e+0],i.y=n[e+1],a.x=n[e+2],a.y=n[e+3],0===e&&!0===u&&o.copy(a);break;case"T":n=l(w);for(let e=0,r=n.length;e<r;e+=2){let r=(h=a.x)-(i.x-h),l=(m=a.y)-(i.y-m);t.quadraticCurveTo(r,l,n[e+0],n[e+1]),i.x=r,i.y=l,a.x=n[e+0],a.y=n[e+1],0===e&&!0===u&&o.copy(a)}break;case"A":n=l(w,[3,4],7);for(let e=0,l=n.length;e<l;e+=7){if(n[e+5]==a.x&&n[e+6]==a.y)continue;let l=a.clone();a.x=n[e+5],a.y=n[e+6],i.x=a.x,i.y=a.y,r(t,n[e],n[e+1],n[e+2],n[e+3],n[e+4],l,a),0===e&&!0===u&&o.copy(a)}break;case"m":n=l(w);for(let e=0,r=n.length;e<r;e+=2)a.x+=n[e+0],a.y+=n[e+1],i.x=a.x,i.y=a.y,0===e?t.moveTo(a.x,a.y):t.lineTo(a.x,a.y),0===e&&o.copy(a);break;case"h":n=l(w);for(let e=0,r=n.length;e<r;e++)a.x+=n[e],i.x=a.x,i.y=a.y,t.lineTo(a.x,a.y),0===e&&!0===u&&o.copy(a);break;case"v":n=l(w);for(let e=0,r=n.length;e<r;e++)a.y+=n[e],i.x=a.x,i.y=a.y,t.lineTo(a.x,a.y),0===e&&!0===u&&o.copy(a);break;case"l":n=l(w);for(let e=0,r=n.length;e<r;e+=2)a.x+=n[e+0],a.y+=n[e+1],i.x=a.x,i.y=a.y,t.lineTo(a.x,a.y),0===e&&!0===u&&o.copy(a);break;case"c":n=l(w);for(let e=0,r=n.length;e<r;e+=6)t.bezierCurveTo(a.x+n[e+0],a.y+n[e+1],a.x+n[e+2],a.y+n[e+3],a.x+n[e+4],a.y+n[e+5]),i.x=a.x+n[e+2],i.y=a.y+n[e+3],a.x+=n[e+4],a.y+=n[e+5],0===e&&!0===u&&o.copy(a);break;case"s":n=l(w);for(let e=0,r=n.length;e<r;e+=4)t.bezierCurveTo((g=a.x)-(i.x-g),(y=a.y)-(i.y-y),a.x+n[e+0],a.y+n[e+1],a.x+n[e+2],a.y+n[e+3]),i.x=a.x+n[e+0],i.y=a.y+n[e+1],a.x+=n[e+2],a.y+=n[e+3],0===e&&!0===u&&o.copy(a);break;case"q":n=l(w);for(let e=0,r=n.length;e<r;e+=4)t.quadraticCurveTo(a.x+n[e+0],a.y+n[e+1],a.x+n[e+2],a.y+n[e+3]),i.x=a.x+n[e+0],i.y=a.y+n[e+1],a.x+=n[e+2],a.y+=n[e+3],0===e&&!0===u&&o.copy(a);break;case"t":n=l(w);for(let e=0,r=n.length;e<r;e+=2){let r=(b=a.x)-(i.x-b),l=(v=a.y)-(i.y-v);t.quadraticCurveTo(r,l,a.x+n[e+0],a.y+n[e+1]),i.x=r,i.y=l,a.x=a.x+n[e+0],a.y=a.y+n[e+1],0===e&&!0===u&&o.copy(a)}break;case"a":n=l(w,[3,4],7);for(let e=0,l=n.length;e<l;e+=7){if(0==n[e+5]&&0==n[e+6])continue;let l=a.clone();a.x+=n[e+5],a.y+=n[e+6],i.x=a.x,i.y=a.y,r(t,n[e],n[e+1],n[e+2],n[e+3],n[e+4],l,a),0===e&&!0===u&&o.copy(a)}break;case"Z":case"z":t.currentPath.autoClose=!0,t.currentPath.curves.length>0&&(a.copy(o),t.currentPath.currentPoint.copy(a),s=!0)}u=!1}return t}(t));break;
1case"rect":i=o(t,i),N=function(e){let t=c(e.getAttribute("x")||0),r=c(e.getAttribute("y")||0),a=c(e.getAttribute("rx")||e.getAttribute("ry")||0),i=c(e.getAttribute("ry")||e.getAttribute("rx")||0),o=c(e.getAttribute("width")),l=c(e.getAttribute("height")),s=new n.Ld9;return s.moveTo(t+a,r),s.lineTo(t+o-a,r),(0!==a||0!==i)&&s.bezierCurveTo(t+o-.448084975506*a,r,t+o,r+.448084975506*i,t+o,r+i),s.lineTo(t+o,r+l-i),(0!==a||0!==i)&&s.bezierCurveTo(t+o,r+l-.448084975506*i,t+o-.448084975506*a,r+l,t+o-a,r+l),s.lineTo(t+a,r+l),(0!==a||0!==i)&&s.bezierCurveTo(t+.448084975506*a,r+l,t,r+l-.448084975506*i,t,r+l-i),s.lineTo(t,r+i),(0!==a||0!==i)&&s.bezierCurveTo(t,r+.448084975506*i,t+.448084975506*a,r,t+a,r),s}(t);break;case"polygon":i=o(t,i),N=function(e){let t=new n.Ld9,r=0;return e.getAttribute("points").replace(/([+-]?\d*\.?\d+(?:e[+-]?\d+)?)(?:,|\s)([+-]?\d*\.?\d+(?:e[+-]?\d+)?)/g,function(e,n,a){let i=c(n),o=c(a);0===r?t.moveTo(i,o):t.lineTo(i,o),r++}),t.currentPath.autoClose=!0,t}(t);break;case"polyline":i=o(t,i),N=function(e){let t=new n.Ld9,r=0;return e.getAttribute("points").replace(/([+-]?\d*\.?\d+(?:e[+-]?\d+)?)(?:,|\s)([+-]?\d*\.?\d+(?:e[+-]?\d+)?)/g,function(e,n,a){let i=c(n),o=c(a);0===r?t.moveTo(i,o):t.lineTo(i,o),r++}),t.currentPath.autoClose=!1,t}(t);break;case"circle":i=o(t,i),N=function(e){let t=c(e.getAttribute("cx")||0),r=c(e.getAttribute("cy")||0),a=c(e.getAttribute("r")||0),i=new n.wAk;i.absarc(t,r,a,0,2*Math.PI);let o=new n.Ld9;return o.subPaths.push(i),o}(t);break;case"ellipse":i=o(t,i),N=function(e){let t=c(e.getAttribute("cx")||0),r=c(e.getAttribute("cy")||0),a=c(e.getAttribute("rx")||0),i=c(e.getAttribute("ry")||0),o=new n.wAk;o.absellipse(t,r,a,i,0,2*Math.PI);let l=new n.Ld9;return l.subPaths.push(o),l}(t);break;case"line":i=o(t,i),N=function(e){let t=c(e.getAttribute("x1")||0),r=c(e.getAttribute("y1")||0),a=c(e.getAttribute("x2")||0),i=c(e.getAttribute("y2")||0),o=new n.Ld9;return o.moveTo(t,r),o.lineTo(a,i),o.currentPath.autoClose=!1,o}(t);break;case"defs":u=!0;break;case"use":i=o(t,i);let T=(t.getAttributeNS("http://www.w3.org/1999/xlink","href")||"").substring(1),I=t.viewportElement.getElementById(T);I&&e(I,i)}N&&(void 0!==i.fill&&"none"!==i.fill&&N.color.setStyle(i.fill,a),function(e,t){function r(e){A.set(e.x,e.y,1).applyMatrix3(t),e.set(A.x,A.y)}let a=e.subPaths;for(let e=0,i=a.length;e<i;e++){let i=a[e].curves;for(let e=0;e<i.length;e++){let a=i[e];a.isLineCurve?(r(a.v1),r(a.v2)):a.isCubicBezierCurve?(r(a.v0),r(a.v1),r(a.v2),r(a.v3)):a.isQuadraticBezierCurve?(r(a.v0),r(a.v1),r(a.v2)):a.isEllipseCurve&&(w.set(a.aX,a.aY),r(w),a.aX=w.x,a.aY=w.y,function(e){let t=e.elements,r=t[0]*t[3]+t[1]*t[4];return 0!==r&&Math.abs(r/(d(e)*p(e)))>Number.EPSILON}(t)?function(e){let r=e.xRadius,a=e.yRadius,i=Math.cos(e.aRotation),o=Math.sin(e.aRotation),l=new n.Pq0(r*i,r*o,0),s=new n.Pq0(-a*o,a*i,0),u=l.applyMatrix3(t),c=s.applyMatrix3(t),d=y.set(u.x,c.x,0,u.y,c.y,0,0,0,1),p=b.copy(d).invert(),h=v.copy(p).transpose().multiply(p).elements,m=function(e,t,r){let n,a,i,o,l;let s=e+r,u=e-r,c=Math.sqrt(u*u+4*t*t);return s>0?a=e*(l=1/(n=.5*(s+c)))*r-t*l*t:s<0?a=.5*(s-c):(n=.5*c,a=-.5*c),Math.abs(i=u>0?u+c:u-c)>2*Math.abs(t)?(o=1/Math.sqrt(1+(l=-2*t/i)*l),i=l*o):0===Math.abs(t)?(i=1,o=0):(i=1/Math.sqrt(1+(l=-.5*i/t)*l),o=l*i),u>0&&(l=i,i=-o,o=l),{rt1:n,rt2:a,cs:i,sn:o}}(h[0],h[1],h[4]),g=Math.sqrt(m.rt1),x=Math.sqrt(m.rt2);if(e.xRadius=1/g,e.yRadius=1/x,e.aRotation=Math.atan2(m.sn,m.cs),!((e.aEndAngle-e.aStartAngle)%(2*Math.PI)<Number.EPSILON)){let r=b.set(g,0,0,0,x,0,0,0,1),a=v.set(m.cs,m.sn,0,-m.sn,m.cs,0,0,0,1),i=r.multiply(a).multiply(d),o=e=>{let{x:t,y:r}=new n.Pq0(Math.cos(e),Math.sin(e),0).applyMatrix3(i);return Math.atan2(r,t)};e.aStartAngle=o(e.aStartAngle),e.aEndAngle=o(e.aEndAngle),f(t)&&(e.aClockwise=!e.aClockwise)}}(a):function(e){let r=d(t),n=p(t);e.xRadius*=r,e.yRadius*=n;let a=r>Number.EPSILON?Math.atan2(t.elements[1],t.elements[0]):Math.atan2(-t.elements[3],t.elements[4]);e.aRotation+=a,f(t)&&(e.aStartAngle*=-1,e.aEndAngle*=-1,e.aClockwise=!e.aClockwise)}(a))}}}(N,k),h.push(N),N.userData={node:t,style:i});let E=t.childNodes;for(let t=0;t<E.length;t++){let r=E[t];u&&"style"!==r.nodeName&&"defs"!==r.nodeName||e(r,i)}s&&(g.pop(),g.length>0?k.copy(g[g.length-1]):k.identity())}(N.documentElement,{fill:"#000",fillOpacity:1,strokeOpacity:1,strokeWidth:1,strokeLineJoin:"miter",strokeLineCap:"butt",strokeMiterLimit:4}),{paths:h,xml:N.documentElement}}static createShapes(e){let t={ORIGIN:0,DESTINATION:1,BETWEEN:2,LEFT:3,RIGHT:4,BEHIND:5,BEYOND:6},r={loc:t.ORIGIN,t:0};function a(e,n,a){let i;let o=a.x-n.x,l=a.y-n.y,s=e.x-n.x,u=e.y-n.y,c=o*u-s*l;if(e.x===n.x&&e.y===n.y){r.loc=t.ORIGIN,r.t=0;return}if(e.x===a.x&&e.y===a.y){r.loc=t.DESTINATION,r.t=1;return}if(c<-Number.EPSILON){r.loc=t.LEFT;return}if(c>Number.EPSILON){r.loc=t.RIGHT;return}if(o*s<0||l*u<0){r.loc=t.BEHIND;return}if(Math.sqrt(o*o+l*l)<Math.sqrt(s*s+u*u)){r.loc=t.BEYOND;return}i=0!==o?s/o:u/l,r.loc=t.BETWEEN,r.t=i}let i=0x3b9ac9ff,o=-0x3b9ac9ff,l=e.subPaths.map(e=>{let t=e.getPoints(),r=-0x3b9ac9ff,a=0x3b9ac9ff,l=-0x3b9ac9ff,s=0x3b9ac9ff;for(let e=0;e<t.length;e++){let n=t[e];n.y>r&&(r=n.y),n.y<a&&(a=n.y),n.x>l&&(l=n.x),n.x<s&&(s=n.x)}return o<=l&&(o=l+1),i>=s&&(i=s-1),{curves:e.curves,points:t,isCW:n.xJ6.isClockWise(t),identifier:-1,boundingBox:new n.UtB(new n.I9Y(s,a),new n.I9Y(l,r))}});l=l.filter(e=>e.points.length>1);for(let e=0;e<l.length;e++)l[e].identifier=e;let s=l.map(s=>(function(e,i,o,l,s){(null==s||""===s)&&(s="nonzero");let u=new n.I9Y;e.boundingBox.getCenter(u);let c=function(e,i,o){let l=new n.I9Y;i.getCenter(l);let s=[];return o.forEach(i=>
1{i.boundingBox.containsPoint(l)&&(function(e,i){let o=[],l=[];for(let s=1;s<e.length;s++){let u=e[s-1],c=e[s];for(let e=1;e<i.length;e++){let s=function(e,n,i,o){let l=e.x,s=n.x,u=i.x,c=o.x,f=e.y,d=n.y,p=i.y,h=o.y,m=(c-u)*(f-p)-(h-p)*(l-u),g=(h-p)*(s-l)-(c-u)*(d-f),y=m/g,b=((s-l)*(f-p)-(d-f)*(l-u))/g;if(0===g&&0!==m||y<=0||y>=1||b<0||b>1)return null;if(0===m&&0===g){for(let u=0;u<2;u++){if(a(0===u?i:o,e,n),r.loc==t.ORIGIN){let e=0===u?i:o;return{x:e.x,y:e.y,t:r.t}}if(r.loc==t.BETWEEN)return{x:+(l+r.t*(s-l)).toPrecision(10),y:+(f+r.t*(d-f)).toPrecision(10),t:r.t}}return null}for(let l=0;l<2;l++)if(a(0===l?i:o,e,n),r.loc==t.ORIGIN){let e=0===l?i:o;return{x:e.x,y:e.y,t:r.t}}return{x:+(l+y*(s-l)).toPrecision(10),y:+(f+y*(d-f)).toPrecision(10),t:y}}(u,c,i[e-1],i[e]);null!==s&&void 0===o.find(e=>e.t<=s.t+Number.EPSILON&&e.t>=s.t-Number.EPSILON)&&(o.push(s),l.push(new n.I9Y(s.x,s.y)))}}return l})(e,i.points).forEach(e=>{s.push({identifier:i.identifier,isCW:i.isCW,point:e})})}),s.sort((e,t)=>e.point.x-t.point.x),s}([new n.I9Y(o,u.y),new n.I9Y(l,u.y)],e.boundingBox,i);c.sort((e,t)=>e.point.x-t.point.x);let f=[],d=[];c.forEach(t=>{t.identifier===e.identifier?f.push(t):d.push(t)});let p=f[0].point.x,h=[],m=0;for(;m<d.length&&d[m].point.x<p;)h.length>0&&h[h.length-1]===d[m].identifier?h.pop():h.push(d[m].identifier),m++;if(h.push(e.identifier),"evenodd"===s){let t=h.length%2==0,r=h[h.length-2];return{identifier:e.identifier,isHole:t,for:r}}if("nonzero"===s){let t=!0,r=null,n=null;for(let e=0;e<h.length;e++){let a=h[e];t?(n=i[a].isCW,t=!1,r=a):n!==i[a].isCW&&(n=i[a].isCW,t=!0)}return{identifier:e.identifier,isHole:t,for:r}}})(s,l,i,o,e.userData?e.userData.style.fillRule:void 0)),u=[];return l.forEach(e=>{if(!s[e.identifier].isHole){let t=new n.ypk;t.curves=e.curves,s.filter(t=>t.isHole&&t.for===e.identifier).forEach(e=>{let r=l[e.identifier],a=new n.wAk;a.curves=r.curves,t.holes.push(a)}),u.push(t)}}),u}static getStrokeStyle(e,t,r,n,a){return{strokeColor:t=void 0!==t?t:"#000",strokeWidth:e=void 0!==e?e:1,strokeLineJoin:r=void 0!==r?r:"miter",strokeLineCap:n=void 0!==n?n:"butt",strokeMiterLimit:a=void 0!==a?a:4}}static pointsToStroke(e,t,r,a){let o=[],l=[],s=[];if(0===i.pointsToStrokeWithBuffers(e,t,r,a,o,l,s))return null;let u=new n.LoY;return u.setAttribute("position",new n.qtW(o,3)),u.setAttribute("normal",new n.qtW(l,3)),u.setAttribute("uv",new n.qtW(s,2)),u}static pointsToStrokeWithBuffers(e,t,r,a,i,o,l,s){let u,c,f,d,p;let h=new n.I9Y,m=new n.I9Y,g=new n.I9Y,y=new n.I9Y,b=new n.I9Y,v=new n.I9Y,x=new n.I9Y,w=new n.I9Y,A=new n.I9Y,k=new n.I9Y,N=new n.I9Y,T=new n.I9Y,I=new n.I9Y,E=new n.I9Y,S=new n.I9Y,C=new n.I9Y,M=new n.I9Y;r=void 0!==r?r:12,a=void 0!==a?a:.001,s=void 0!==s?s:0;let L=(e=function(e){let t=!1;for(let r=1,n=e.length-1;r<n;r++)if(e[r].distanceTo(e[r+1])<a){t=!0;break}if(!t)return e;let r=[];r.push(e[0]);for(let t=1,n=e.length-1;t<n;t++)e[t].distanceTo(e[t+1])>=a&&r.push(e[t]);return r.push(e[e.length-1]),r}(e)).length;if(L<2)return 0;let P=e[0].equals(e[L-1]),O=e[0],R=t.strokeWidth/2,F=1/(L-1),D=0,U,_=!1,q=0,B=3*s,z=2*s;j(e[0],e[1],h).multiplyScalar(R),w.copy(e[0]).sub(h),A.copy(e[0]).add(h),k.copy(w),N.copy(A);for(let r=1;r<L;r++){if(u=e[r],c=r===L-1?P?e[1]:void 0:e[r+1],j(O,u,h),g.copy(h).multiplyScalar(R),T.copy(u).sub(g),I.copy(u).add(g),U=D+F,f=!1,void 0!==c){j(u,c,m),g.copy(m).multiplyScalar(R),E.copy(u).sub(g),S.copy(u).add(g),d=!0,g.subVectors(c,O),0>h.dot(g)&&(d=!1),1===r&&(_=d),g.subVectors(c,u),g.normalize();let e=Math.abs(h.dot(g));if(e>Number.EPSILON){let r=R/e;g.multiplyScalar(-r),y.subVectors(u,O),b.copy(y).setLength(r).add(g),C.copy(b).negate();let n=b.length(),a=y.length();y.divideScalar(a),v.subVectors(c,u);let i=v.length();switch(v.divideScalar(i),y.dot(C)<a&&v.dot(C)<i&&(f=!0),M.copy(b).add(u),C.add(u),p=!1,f?d?(S.copy(C),I.copy(C)):(E.copy(C),T.copy(C)):G(),t.strokeLineJoin){case"bevel":Y(d,f,U);break;case"round":H(d,f),d?W(u,T,E,U,0):W(u,S,I,U,1);break;default:let o=R*t.strokeMiterLimit/n;o<1?"miter-clip"!==t.strokeLineJoin?Y(d,f,U):(H(d,f),d?(v.subVectors(M,T).multiplyScalar(o).add(T),x.subVectors(M,E).multiplyScalar(o).add(E),V(T,U,0),V(v,U,0),V(u,U,.5),V(u,U,.5),V(v,U,0),V(x,U,0),V(u,U,.5),V(x,U,0),V(E,U,0)):(v.subVectors(M,I).multiplyScalar(o).add(I),x.subVectors(M,S).multiplyScalar(o).add(S),V(I,U,1),V(v,U,1),V(u,U,.5),V(u,U,.5),V(v,U,1),V(x,U,1),V(u,U,.5),V(x,U,1),V(S,U,1))):(f?(d?(V(A,D,1),V(w,D,0),V(M,U,0),V(A,D,1),V(M,U,0),V(C,U,1)):(V(A,D,1),V(w,D,0),V(M,U,1),V(w,D,0),V(C,U,0),V(M,U,1)),d?E.copy(M):S.copy(M)):d?(V(T,U,0),V(M,U,0),V(u,U,.5),V(u,U,.5),V(M,U,0),V(E,U,0)):(V(I,U,1),V(M,U,1),V(u,U,.5),V(u,U,.5),V(M,U,1),V(S,U,1)),p=!0)}}else G()}else G();P||r!==L-1||$(e[0],k,N,d,!0,D),D=U,O=u,w.copy(E),A.copy(S)}if(P){if(f&&i){let e=M,t=C;_!==d&&(e=C,t=M),d?(p||_)&&(t.toArray(i,0),t.toArray(i,9),p&&e.toArray(i,3)):(p||!_)&&(t.toArray(i,3),t.toArray(i,9),p&&e.toArray(i,0))}}else $(u,T,I,d,!1,U);return q;function j(e,t,r){return r.subVectors(t,e),r.set(-r.y,r.x).normalize()}function V(e,t,r){i&&(i[B]=e.x,i[B+1]=e.y,i[B+2]=0,o&&(o[B]=0,o[B+1]=0,o[B+2]=1),B+=3,l&&(l[z]=t,l[z+1]=r,z+=2)),q+=3}function W(e,t,n,a,i){h.copy(t).sub(e).normalize(),m.copy(n).sub(e).normalize();let o=Math.PI,l=h.dot(m);1>Math.abs(l)&&(o=Math.abs(Math.acos(l))),o/=r,g.copy(t);for(let t=0,n=r-1;t<n;
1t++)y.copy(g).rotateAround(e,o),V(g,a,i),V(y,a,i),V(e,a,.5),g.copy(y);V(y,a,i),V(n,a,i),V(e,a,.5)}function G(){V(A,D,1),V(w,D,0),V(T,U,0),V(A,D,1),V(T,U,0),V(I,U,1)}function Y(e,t,r){t?e?(V(A,D,1),V(w,D,0),V(T,U,0),V(A,D,1),V(T,U,0),V(C,U,1),V(T,r,0),V(E,r,0),V(C,r,.5)):(V(A,D,1),V(w,D,0),V(I,U,1),V(w,D,0),V(C,U,0),V(I,U,1),V(I,r,1),V(C,r,0),V(S,r,1)):(e?(V(T,r,0),V(E,r,0)):(V(I,r,1),V(S,r,0)),V(u,r,.5))}function H(e,t){t&&(e?(V(A,D,1),V(w,D,0),V(T,U,0),V(A,D,1),V(T,U,0),V(C,U,1),V(T,D,0),V(u,U,.5),V(C,U,1),V(u,U,.5),V(E,D,0),V(C,U,1)):(V(A,D,1),V(w,D,0),V(I,U,1),V(w,D,0),V(C,U,0),V(I,U,1),V(I,D,1),V(C,U,0),V(u,U,.5),V(u,U,.5),V(C,U,0),V(S,D,1)))}function $(e,r,n,a,o,s){switch(t.strokeLineCap){case"round":o?W(e,n,r,s,.5):W(e,r,n,s,.5);break;case"square":if(o)h.subVectors(r,e),m.set(h.y,-h.x),g.addVectors(h,m).add(e),y.subVectors(m,h).add(e),a?(g.toArray(i,3),y.toArray(i,0),y.toArray(i,9)):(g.toArray(i,3),1===l[7]?y.toArray(i,9):g.toArray(i,9),y.toArray(i,0));else{h.subVectors(n,e),m.set(h.y,-h.x),g.addVectors(h,m).add(e),y.subVectors(m,h).add(e);let t=i.length;a?(g.toArray(i,t-3),y.toArray(i,t-6)):(y.toArray(i,t-6),g.toArray(i,t-3)),y.toArray(i,t-12)}}}}constructor(e){super(e),this.defaultDPI=90,this.defaultUnit="px"}}},37741:(e,t,r)=>{r.d(t,{u:()=>a});var n=r(12);class a extends n.BRH{parse(e){if(e.length<19)throw Error("THREE.TGALoader: Not enough data to contain header.");let t=0,r=new Uint8Array(e),a={id_length:r[t++],colormap_type:r[t++],image_type:r[t++],colormap_index:r[t++]|r[t++]<<8,colormap_length:r[t++]|r[t++]<<8,colormap_size:r[t++],origin:[r[t++]|r[t++]<<8,r[t++]|r[t++]<<8],width:r[t++]|r[t++]<<8,height:r[t++]|r[t++]<<8,pixel_size:r[t++],flags:r[t++]};if(!function(e){switch(e.image_type){case 1:case 9:if(e.colormap_length>256||24!==e.colormap_size||1!==e.colormap_type)throw Error("THREE.TGALoader: Invalid type colormap data for indexed type.");break;case 2:case 3:case 10:case 11:if(e.colormap_type)throw Error("THREE.TGALoader: Invalid type colormap data for colormap type.");break;case 0:throw Error("THREE.TGALoader: No data.");default:throw Error("THREE.TGALoader: Invalid type "+e.image_type)}if(e.width<=0||e.height<=0)throw Error("THREE.TGALoader: Invalid image size.");if(8!==e.pixel_size&&16!==e.pixel_size&&24!==e.pixel_size&&32!==e.pixel_size)throw Error("THREE.TGALoader: Invalid pixel size "+e.pixel_size)}(a),a.id_length+t>e.length)throw Error("THREE.TGALoader: No data.");t+=a.id_length;let i=!1,o=!1,l=!1;switch(a.image_type){case 9:i=!0,o=!0;break;case 1:o=!0;break;case 10:i=!0;break;case 2:break;case 11:i=!0,l=!0;break;case 3:l=!0}let s=new Uint8Array(a.width*a.height*4),u=function(e,t,r,n,a){let i,o;let l=r.pixel_size>>3,s=r.width*r.height*l;if(t&&(o=a.subarray(n,n+=r.colormap_length*(r.colormap_size>>3))),e){let e,t,r;i=new Uint8Array(s);let o=0,u=new Uint8Array(l);for(;o<s;)if(t=(127&(e=a[n++]))+1,128&e){for(r=0;r<l;++r)u[r]=a[n++];for(r=0;r<t;++r)i.set(u,o+r*l);o+=l*t}else{for(t*=l,r=0;r<t;++r)i[o+r]=a[n++];o+=t}}else i=a.subarray(n,n+=t?r.width*r.height:s);return{pixel_data:i,palettes:o}}(i,o,a,t,r);return!function(e,t,r,n,i){let o,s,u,c,f,d;switch((48&a.flags)>>4){default:case 2:o=0,u=1,f=t,s=0,c=1,d=r;break;case 0:o=0,u=1,f=t,s=r-1,c=-1,d=-1;break;case 3:o=t-1,u=-1,f=-1,s=0,c=1,d=r;break;case 1:o=t-1,u=-1,f=-1,s=r-1,c=-1,d=-1}if(l)switch(a.pixel_size){case 8:!function(e,t,r,n,i,o,l,s){let u,c=0,f,d,p=a.width;for(d=t;d!==n;d+=r)for(f=i;f!==l;f+=o,c++)u=s[c],e[(f+p*d)*4+0]=u,e[(f+p*d)*4+1]=u,e[(f+p*d)*4+2]=u,e[(f+p*d)*4+3]=255}(e,s,c,d,o,u,f,n);break;case 16:!function(e,t,r,n,i,o,l,s){let u=0,c,f,d=a.width;for(f=t;f!==n;f+=r)for(c=i;c!==l;c+=o,u+=2)e[(c+d*f)*4+0]=s[u+0],e[(c+d*f)*4+1]=s[u+0],e[(c+d*f)*4+2]=s[u+0],e[(c+d*f)*4+3]=s[u+1]}(e,s,c,d,o,u,f,n);break;default:throw Error("THREE.TGALoader: Format not supported.")}else switch(a.pixel_size){case 8:!function(e,t,r,n,i,o,l,s,u){let c,f=0,d,p,h=a.width;for(p=t;p!==n;p+=r)for(d=i;d!==l;d+=o,f++)c=s[f],e[(d+h*p)*4+3]=255,e[(d+h*p)*4+2]=u[3*c+0],e[(d+h*p)*4+1]=u[3*c+1],e[(d+h*p)*4+0]=u[3*c+2]}(e,s,c,d,o,u,f,n,i);break;case 16:!function(e,t,r,n,i,o,l,s){let u,c=0,f,d,p=a.width;for(d=t;d!==n;d+=r)for(f=i;f!==l;f+=o,c+=2)u=s[c+0]+(s[c+1]<<8),e[(f+p*d)*4+0]=(31744&u)>>7,e[(f+p*d)*4+1]=(992&u)>>2,e[(f+p*d)*4+2]=(31&u)<<3,e[(f+p*d)*4+3]=32768&u?0:255}(e,s,c,d,o,u,f,n);break;case 24:!function(e,t,r,n,i,o,l,s){let u=0,c,f,d=a.width;for(f=t;f!==n;f+=r)for(c=i;c!==l;c+=o,u+=3)e[(c+d*f)*4+3]=255,e[(c+d*f)*4+2]=s[u+0],e[(c+d*f)*4+1]=s[u+1],e[(c+d*f)*4+0]=s[u+2]}(e,s,c,d,o,u,f,n);break;case 32:!function(e,t,r,n,i,o,l,s){let u=0,c,f,d=a.width;for(f=t;f!==n;f+=r)for(c=i;c!==l;c+=o,u+=4)e[(c+d*f)*4+2]=s[u+0],e[(c+d*f)*4+1]=s[u+1],e[(c+d*f)*4+0]=s[u+2],e[(c+d*f)*4+3]=s[u+3]}(e,s,c,d,o,u,f,n);break;default:throw Error("THREE.TGALoader: Format not supported.")}}(s,a.width,a.height,u.pixel_data,u.palettes),{data:s,width:a.width,height:a.height,flipY:!0,generateMipmaps:!0,minFilter:n.$_I}}constructor(e){super(e)}}},14644:(e,t,r)=>{r.d(t,{F:()=>i});var n=r(12),a=r(31305);class i extends n.aHM{load(e,t,r,a){let i=this,o=""===i.path?n.r6x.extractUrlBase(e):i.path,l=new n.Y9S(i.manager);l.setPath(i.path),l.setRequestHeader(i.requestHeader),l.setWithCredentials(i.withCredentials),l.load(e,function(r){try{t(i.parse(r,o))}catch(t){a?a(t):console.error(t),i.manager.itemError(e)}},r,a)}parse(e,t){let r={};function i(e,t){let r=[],n=0;for(let a=0,i=e.length;a<i;a++){let o=e[n],l=e[a+(t?1:2)],s=e[a+(t?2:1)];r.push(o,l,s),(-1===e[a+3]||a+3>=i)&&(a+=3,n=a+1)}return r}function l(e,t){let r=[],n=0;for(let a=0,i=t.length;a<i;a++){let o=3*n,l=e[o],s=e[o+1],u=e[o+2];r.push(l,s,u),(-1===t[a+3]||a+3>=i)&&(a+=3,n++)}return r}function f(e,t){let r=[];for(let n=0,a=t.length;n<a;n++){let a=3*t[n],i=e[a],o=e[a+1],l=e[a+2];r.push(i,o,l)}return r}function d(e){let t=[];for(let r=0,n=e.length;r<n;r++){let a=e[r],i=e[r+1];t.push(a,i),(-1===e[r+2]||r+2>=n)&&(r+=2)}return t}function p(e,t){let r=[],n=0;for(let a=0,i=t.length;a<i;a++){let o=3*n,l=e[o],s=e[o+1],u=e[o+2];r.push(l,s,u),(-1===t[a+2]||a+2>=i)&&(a+=2,n++)}return r}let h=new n.Pq0,m=new n.Pq0,g=new n.Pq0,y=new n.I9Y,b=new n.I9Y,v=new n.I9Y;function x(e,t,r,a){let i=[];for(let n=0,o=e.length;n<o;n+=3){let e=t[n],o=t[n+1],l=t[n+2];2===a?(y.fromArray(r,e*a),b.fromArray(r,o*a),v.fromArray(r,l*a),i.push(y.x,y.y),i.push(b.x,b.y),i.push(v.x,v.y)):(h.fromArray(r,e*a),m.fromArray(r,o*a),g.fromArray(r,l*a),i.push(h.x,h.y,h.z),i.push(m.x,m.y,m.z),i.push(g.x,g.y,g.z))}return new n.qtW(i,a)}function w(e,t){let r=[];for(let n=0,a=0,i=e.length;n<i;n+=3,a++)h.fromArray(t,3*a),r.push(h.x,h.y,h.z),r.push(h.x,h.y,h.z),r.push(h.x,h.y,h.z);return new n.qtW(r,3)}function A(e,t){let r=[];for(let n=0,a=0,i=e.length;n<i;n+=2,a++)h.fromArray(t,3*a),r.push(h.x,h.y,h.z),r.push(h.x,h.y,h.z);return new n.qtW(r,3)}function k(e,t){let r=t.array,a=t.itemSize,i=new r.constructor(e.length*a),o=0,l=0;for(let t=0,n=e.length;t<n;t++){o=e[t]*a;for(let e=0;e<a;e++)i[l++]=r[o++]}return new n.qtW(i,a)}let N=new n.Pq0,T=new n.Pq0;function I(e,t,r){let a=[],i={};for(let r=0,n=e.length;r<n;r+=3){let n=e[r],o=e[r+1],l=e[r+2],s=new u(n,o,l);h.fromArray(t,3*n),m.fromArray(t,3*o),g.fromArray(t,3*l),T.subVectors(g,m),N.subVectors(h,m),T.cross(N),T.normalize(),s.normal.copy(T),void 0===i[n]&&(i[n]=[]),void 0===i[o]&&(i[o]=[]),void 0===i[l]&&(i[l]=[]),i[n].push(s.normal),i[o].push(s.normal),i[l].push(s.normal),a.push(s)}let o=[];for(let e=0,n=a.length;e<n;e++){let n=a[e],l=E(i[n.a],n.normal,r),s=E(i[n.b],n.normal,r),u=E(i[n.c],n.normal,r);h.fromArray(t,3*n.a),m.fromArray(t,3*n.b),g.fromArray(t,3*n.c),o.push(l.x,l.y,l.z),o.push(s.x,s.y,s.z),o.push(u.x,u.y,u.z)}return new n.qtW(o,3)}function E(e,t,r){let a=new n.Pq0;
1if(0===r)a.copy(t);else for(let n=0,i=e.length;n<i;n++)e[n].angleTo(t)<r&&a.add(e[n]);return a.normalize()}function S(e){let t=[];for(let r=0,a=e.length;r<a;r+=3)t.push(new n.Q1f(e[r],e[r+1],e[r+2]));return t}function C(e){let t=new n.Q1f;for(let r=0;r<e.count;r++)t.fromBufferAttribute(e,r),n.ppV.toWorkingColorSpace(t,n.er$),e.setXYZ(r,t.r,t.g,t.b)}function M(e,t,r,a,i){let o=[],l=!0===i?0:Math.PI;for(let e=0,s=a.length;e<s;e++){let a=0===e?0:r[e-1];a=!0===i?a:l-a;let s=new n.Pq0;s.setFromSphericalCoords(t,a,0),o.push(s)}let s=e.index,u=e.attributes.position,c=new n.THS(new Float32Array(3*e.attributes.position.count),3),f=new n.Pq0,d=new n.Q1f;for(let e=0;e<s.count;e++){let t,r;let l=s.getX(e);f.fromBufferAttribute(u,l);let p=1;for(let e=1;e<o.length;e++){t=e-1,r=e;let n=o[t],a=o[r];if(!0===i){if(f.y<=n.y&&f.y>a.y){p=Math.abs(n.y-f.y)/Math.abs(n.y-a.y);break}}else if(f.y>=n.y&&f.y<a.y){p=Math.abs(n.y-f.y)/Math.abs(n.y-a.y);break}}let h=a[t],m=a[r];d.copy(h).lerp(m,p),n.ppV.toWorkingColorSpace(d,n.er$),c.setXYZ(l,d.r,d.g,d.b)}e.setAttribute("color",c)}let L=new n.Tap(this.manager);if(L.setPath(this.resourcePath||t).setCrossOrigin(this.crossOrigin),-1===e.indexOf("#VRML V2.0"))throw Error("THREE.VRMLLexer: Version of VRML asset not supported.");return function(e){let t=e.nodes,a=new n.Z58;for(let e=0,n=t.length;e<n;e++)!function e(t){t.DEF&&(r[t.DEF]=t);let n=t.fields;for(let t=0,r=n.length;t<r;t++){let r=n[t];if("node"===r.type){let t=r.values;for(let r=0,n=t.length;r<n;r++)e(t[r])}}}(t[e]);for(let e=0,o=t.length;e<o;e++){let o=t[e],s=function e(t){return t.USE?function(t){let n=e(r[t]);return n.isObject3D||n.isMaterial?n.clone():n}(t.USE):(void 0!==t.build||(t.build=function(t){let r;switch(t.name){case"Anchor":case"Group":case"Transform":case"Collision":r=function(t){let r=new n.YJl,a=t.fields;for(let t=0,i=a.length;t<i;t++){let i=a[t],o=i.name,l=i.values;switch(o){case"bboxCenter":case"bboxSize":case"center":case"description":case"collide":case"parameter":case"scaleOrientation":case"proxy":case"url":break;case"children":(function(t,r){for(let a=0,i=t.length;a<i;a++){let i=e(t[a]);i instanceof n.B69&&r.add(i)}})(l,r);break;case"rotation":let s=new n.Pq0(l[0],l[1],l[2]).normalize(),u=l[3];r.quaternion.setFromAxisAngle(s,u);break;case"scale":r.scale.set(l[0],l[1],l[2]);break;case"translation":r.position.set(l[0],l[1],l[2])}}return r}(t);break;case"Background":r=function(e){let t,r,a,i;let o=new n.YJl,l=e.fields;for(let e=0,n=l.length;e<n;e++){let n=l[e],o=n.name,s=n.values;switch(o){case"groundAngle":t=s;break;case"groundColor":r=s;break;case"backUrl":case"bottomUrl":case"frontUrl":case"leftUrl":case"rightUrl":case"topUrl":break;case"skyAngle":a=s;break;case"skyColor":i=s}}if(i){let e=new n.Gu$(1e4,32,16),t=new n.V9B({fog:!1,side:n.hsX,depthWrite:!1,depthTest:!1});i.length>3?(M(e,1e4,a,S(i),!0),t.vertexColors=!0):t.color.setRGB(i[0],i[1],i[2],n.er$);let r=new n.eaF(e,t);o.add(r)}if(r&&r.length>0){let e=new n.Gu$(1e4,32,16,0,2*Math.PI,.5*Math.PI,1.5*Math.PI),a=new n.V9B({fog:!1,side:n.hsX,vertexColors:!0,depthWrite:!1,depthTest:!1});M(e,1e4,t,S(r),!1);let i=new n.eaF(e,a);o.add(i)}return o.renderOrder=-1/0,o}(t);break;case"Shape":r=function(t){let r,a;let i=t.fields,o=new n.V9B({name:n.aHM.DEFAULT_MATERIAL_NAME,color:0});for(let t=0,n=i.length;t<n;t++){let n=i[t],a=n.name,l=n.values;switch(a){case"appearance":null!==l[0]&&(o=e(l[0]));break;case"geometry":null!==l[0]&&(r=e(l[0]))}}if(r&&r.attributes.position){let e=r._type;if("points"===e){let e=new n.BH$({name:n.aHM.DEFAULT_MATERIAL_NAME,color:0xffffff,opacity:o.opacity,transparent:o.transparent});void 0!==r.attributes.color?e.vertexColors=!0:o.isMeshPhongMaterial&&e.color.copy(o.emissive),a=new n.ONl(r,e)}else if("line"===e){let e=new n.mrM({name:n.aHM.DEFAULT_MATERIAL_NAME,color:0xffffff,opacity:o.opacity,transparent:o.transparent});void 0!==r.attributes.color?e.vertexColors=!0:o.isMeshPhongMaterial&&e.color.copy(o.emissive),a=new n.DXC(r,e)}else void 0!==r._solid&&(o.side=r._solid?n.hB5:n.$EB),void 0!==r.attributes.color&&(o.vertexColors=!0),a=new n.eaF(r,o)}else(a=new n.B69).visible=!1;return a}(t);break;case"Appearance":r=function(t){let r,a=new n.tXL,i=t.fields;for(let t=0,o=i.length;t<o;t++){let o=i[t],l=o.name,s=o.values;switch(l){case"material":if(null!==s[0]){let t=e(s[0]);t.diffuseColor&&a.color.copy(t.diffuseColor),t.emissiveColor&&a.emissive.copy(t.emissiveColor),t.shininess&&(a.shininess=t.shininess),t.specularColor&&a.specular.copy(t.specularColor),t.transparency&&(a.opacity=1-t.transparency),t.transparency>0&&(a.transparent=!0)}else a=new n.V9B({name:n.aHM.DEFAULT_MATERIAL_NAME,color:0});break;case"texture":let u=s[0];null!==u&&("ImageTexture"===u.name||"PixelTexture"===u.name)&&(a.map=e(u));break;case"textureTransform":null!==s[0]&&(r=e(s[0]))}}if(a.map){if(a.map.__type){switch(a.map.__type){case c.INTENSITY_ALPHA:a.opacity=1;break;case c.RGB:a.color.set(0xffffff);break;case c.RGBA:a.color.set(0xffffff),a.opacity=1}delete a.map.__type}r&&(a.map.center.copy(r.center),a.map.rotation=r.rotation,a.map.repeat.copy(r.scale),a.map.offset.copy(r.translation))}return a}(t);break;case"Material":r=function(e){let t={},r=e.fields;for(let e=0,a=r.length;e<a;e++){let a=r[e],i=a.name,o=a.values;switch(i){case"ambientIntensity":break;case"diffuseColor":t.diffuseColor=new n.Q1f().setRGB(o[0],o[1],o[2],n.er$);break;case"emissiveColor":t.emissiveColor=new n.Q1f().setRGB(o[0],o[1],o[2],n.er$);break;case"shininess":t.shininess=o[0];break;case"specularColor":t.specularColor=new n.Q1f().setRGB(o[0],o[1],o[2],n.er$);break;case"transparency":t.transparency=o[0]}}return t}(t);break;case"ImageTexture":r=function(e){let t;let r=n.GJx,a=n.GJx,i=e.fields;for(let e=0,o=i.length;e<o;e++){let o=i[e],l=o.name,s=o.values;switch(l){case"url":let u=s[0];u&&(t=L.load(u));break;case"repeatS":!1===s[0]&&(r=n.ghU);break;case"repeatT":!1===s[0]&&(a=n.ghU)}}
1return t&&(t.wrapS=r,t.wrapT=a,t.colorSpace=n.er$),t}(t);break;case"PixelTexture":r=function(e){let t;let r=n.GJx,a=n.GJx,i=e.fields;for(let e=0,o=i.length;e<o;e++){let o=i[e],l=o.name,s=o.values;switch(l){case"image":let u=s[0],f=s[1],d=function(e){let t;switch(e){case 1:t=c.INTENSITY;break;case 2:t=c.INTENSITY_ALPHA;break;case 3:t=c.RGB;break;case 4:t=c.RGBA}return t}(s[2]),p=new Uint8Array(4*u*f),h={r:0,g:0,b:0,a:0};for(let e=3,t=0,r=s.length;e<r;e++,t++){!function(e,t,r){let n;switch(t){case c.INTENSITY:n=parseInt(e),r.r=n,r.g=n,r.b=n,r.a=1;break;case c.INTENSITY_ALPHA:n=parseInt("0x"+e.substring(2,4)),r.r=n,r.g=n,r.b=n,r.a=parseInt("0x"+e.substring(4,6));break;case c.RGB:r.r=parseInt("0x"+e.substring(2,4)),r.g=parseInt("0x"+e.substring(4,6)),r.b=parseInt("0x"+e.substring(6,8)),r.a=1;break;case c.RGBA:r.r=parseInt("0x"+e.substring(2,4)),r.g=parseInt("0x"+e.substring(4,6)),r.b=parseInt("0x"+e.substring(6,8)),r.a=parseInt("0x"+e.substring(8,10))}}(s[e],d,h);let r=4*t;p[r+0]=h.r,p[r+1]=h.g,p[r+2]=h.b,p[r+3]=h.a}
1(t=new n.GYF(p,u,f)).colorSpace=n.er$,t.needsUpdate=!0,t.__type=d;break;case"repeatS":!1===s[0]&&(r=n.ghU);break;case"repeatT":!1===s[0]&&(a=n.ghU)}}return t&&(t.wrapS=r,t.wrapT=a),t}(t);break;case"TextureTransform":r=function(e){let t={center:new n.I9Y,rotation:new n.I9Y,scale:new n.I9Y,translation:new n.I9Y},r=e.fields;for(let e=0,n=r.length;e<n;e++){let n=r[e],a=n.name,i=n.values;switch(a){case"center":t.center.set(i[0],i[1]);break;case"rotation":t.rotation=i[0];break;case"scale":t.scale.set(i[0],i[1]);break;case"translation":t.translation.set(i[0],i[1])}}return t}(t);break;case"IndexedFaceSet":r=function(t){let r,a,o,s,u,c,d,p,h,m,g;let y=!0,b=!0,v=0,A=!0,N=!0,T=t.fields;for(let t=0,n=T.length;t<n;t++){let n=T[t],i=n.name,l=n.values;switch(i){case"color":let f=l[0];null!==f&&(r=e(f));break;case"coord":let h=l[0];null!==h&&(a=e(h));break;case"normal":let m=l[0];null!==m&&(o=e(m));break;case"texCoord":let g=l[0];null!==g&&(s=e(g));break;case"ccw":y=l[0];break;case"colorIndex":u=l;break;case"colorPerVertex":A=l[0];break;case"convex":break;case"coordIndex":c=l;break;case"creaseAngle":v=l[0];break;case"normalIndex":d=l;break;case"normalPerVertex":N=l[0];break;case"solid":b=l[0];break;case"texCoordIndex":p=l}}if(void 0===c)return new n.LoY;let E=i(c,y);r&&C(h=!0===A?u&&u.length>0?x(E,i(u,y),r,3):k(E,new n.qtW(r,3)):u&&u.length>0?w(E,l(f(r,u),c)):w(E,l(r,c))),m=o?!0===N?d&&d.length>0?x(E,i(d,y),o,3):k(E,new n.qtW(o,3)):d&&d.length>0?w(E,l(f(o,d),c)):w(E,l(o,c)):I(E,a,v),s&&(g=p&&p.length>0?x(E,i(p,y),s,2):k(E,new n.qtW(s,2)));let S=new n.LoY,M=k(E,new n.qtW(a,3));return S.setAttribute("position",M),S.setAttribute("normal",m),h&&S.setAttribute("color",h),g&&S.setAttribute("uv",g),S._solid=b,S._type="mesh",S}(t);break;case"IndexedLineSet":r=function(t){let r,a,i,o,l;let s=!0,u=t.fields;for(let t=0,n=u.length;t<n;t++){let n=u[t],l=n.name,c=n.values;switch(l){case"color":let f=c[0];null!==f&&(r=e(f));break;case"coord":let d=c[0];null!==d&&(a=e(d));break;case"colorIndex":i=c;break;case"colorPerVertex":s=c[0];break;case"coordIndex":o=c}}let c=d(o);r&&C(l=!0===s?i.length>0?x(c,d(i),r,3):k(c,new n.qtW(r,3)):i.length>0?A(c,p(f(r,i),o)):A(c,p(r,o)));let h=new n.LoY,m=k(c,new n.qtW(a,3));return h.setAttribute("position",m),l&&h.setAttribute("color",l),h._type="line",h}(t);break;case"PointSet":r=function(t){let r,a;let i=t.fields;for(let t=0,n=i.length;t<n;t++){let n=i[t],o=n.name,l=n.values;switch(o){case"color":let s=l[0];null!==s&&(r=e(s));break;case"coord":let u=l[0];null!==u&&(a=e(u))}}let o=new n.LoY;if(o.setAttribute("position",new n.qtW(a,3)),r){let e=new n.qtW(r,3);C(e),o.setAttribute("color",e)}return o._type="points",o}(t);break;case"Box":r=function(e){let t=new n.Pq0(2,2,2),r=e.fields;for(let e=0,n=r.length;e<n;e++){let n=r[e],a=n.name,i=n.values;"size"===a&&(t.x=i[0],t.y=i[1],t.z=i[2])}return new n.iNn(t.x,t.y,t.z)}(t);break;case"Cone":r=function(e){let t=1,r=2,a=!1,i=e.fields;for(let e=0,n=i.length;e<n;e++){let n=i[e],o=n.name,l=n.values;switch(o){case"bottom":a=!l[0];break;case"bottomRadius":t=l[0];break;case"height":r=l[0]}}return new n.qFE(t,r,16,1,a)}(t);break;case"Cylinder":r=function(e){let t=1,r=2,a=e.fields;for(let e=0,n=a.length;e<n;e++){let n=a[e],i=n.name,o=n.values;switch(i){case"bottom":case"side":case"top":break;case"radius":t=o[0];break;case"height":r=o[0]}}return new n.Ho_(t,t,r,16,1)}(t);break;case"Sphere":r=function(e){let t=1,r=e.fields;for(let e=0,n=r.length;e<n;e++){let n=r[e],a=n.name,i=n.values;"radius"===a&&(t=i[0])}return new n.Gu$(t,16,16)}(t);break;case"ElevationGrid":r=function(t){let r,a,i,o,l,s;let u=!0,c=!0,f=!0,d=!0,p=0,h=2,m=2,g=1,y=1,b=t.fields;for(let t=0,n=b.length;t<n;t++){let n=b[t],l=n.name,s=n.values;switch(l){case"color":let v=s[0];null!==v&&(r=e(v));break;case"normal":let x=s[0];null!==x&&(a=e(x));break;case"texCoord":let w=s[0];null!==w&&(i=e(w));break;case"height":o=s;break;case"ccw":d=s[0];break;case"colorPerVertex":u=s[0];break;case"creaseAngle":p=s[0];break;case"normalPerVertex":c=s[0];break;case"solid":f=s[0];break;case"xDimension":h=s[0];break;case"xSpacing":g=s[0];break;case"zDimension":m=s[0];break;case"zSpacing":y=s[0]}}let v=[],x=[],w=[],A=[];for(let e=0;e<m;e++)for(let t=0;t<h;t++){let n=e*h+t,l=g*e,s=o[n],f=y*t;if(v.push(l,s,f),r&&!0===u){let e=r[3*n+0],t=r[3*n+1],a=r[3*n+2];w.push(e,t,a)}if(a&&!0===c){let e=a[3*n+0],t=a[3*n+1],r=a[3*n+2];x.push(e,t,r)}if(i){let e=i[2*n+0],t=i[2*n+1];A.push(e,t)}else A.push(e/(h-1),t/(m-1))}let N=[];for(let e=0;e<h-1;e++)for(let t=0;
1t<m-1;t++){let r=e+t*h,n=e+(t+1)*h,a=e+1+(t+1)*h,i=e+1+t*h;!0===d?(N.push(r,a,n),N.push(a,r,i)):(N.push(r,n,a),N.push(a,i,r))}let T=k(N,new n.qtW(v,3)),E=k(N,new n.qtW(A,2));if(r){if(!1===u){for(let e=0;e<h-1;e++)for(let t=0;t<m-1;t++){let n=e+t*(h-1),a=r[3*n+0],i=r[3*n+1],o=r[3*n+2];w.push(a,i,o),w.push(a,i,o),w.push(a,i,o),w.push(a,i,o),w.push(a,i,o),w.push(a,i,o)}l=new n.qtW(w,3)}else l=k(N,new n.qtW(w,3));C(l)}if(a){if(!1===c){for(let e=0;e<h-1;e++)for(let t=0;t<m-1;t++){let r=e+t*(h-1),n=a[3*r+0],i=a[3*r+1],o=a[3*r+2];x.push(n,i,o),x.push(n,i,o),x.push(n,i,o),x.push(n,i,o),x.push(n,i,o),x.push(n,i,o)}s=new n.qtW(x,3)}else s=k(N,new n.qtW(x,3))}else s=I(N,v,p);let S=new n.LoY;return S.setAttribute("position",T),S.setAttribute("normal",s),S.setAttribute("uv",E),l&&S.setAttribute("color",l),S._solid=f,S._type="mesh",S}(t);break;case"Extrusion":r=function(e){let t,r,a=[1,1,1,-1,-1,-1,-1,1,1,1],i=[0,0,0,0,1,0],o=!0,l=!0,s=0,u=!0,c=!0,f=e.fields;for(let e=0,n=f.length;e<n;e++){let n=f[e],d=n.name,p=n.values;switch(d){case"beginCap":o=p[0];break;case"ccw":l=p[0];break;case"convex":break;case"creaseAngle":s=p[0];break;case"crossSection":a=p;break;case"endCap":u=p[0];break;case"orientation":r=p;break;case"scale":t=p;break;case"solid":c=p[0];break;case"spine":i=p}}let d=a[0]===a[a.length-2]&&a[1]===a[a.length-1],p=[],h=new n.Pq0,m=new n.Pq0,g=new n.Pq0,y=new n.Pq0,b=new n.PTz;for(let e=0,n=0,o=0,l=i.length;e<l;e+=3,n+=2,o+=4){h.fromArray(i,e),m.x=t?t[n+0]:1,m.y=1,m.z=t?t[n+1]:1,g.x=r?r[o+0]:0,g.y=r?r[o+1]:0,g.z=r?r[o+2]:1;let l=r?r[o+3]:0;for(let e=0,t=a.length;e<t;e+=2)y.x=a[e+0],y.y=0,y.z=a[e+1],y.multiply(m),b.setFromAxisAngle(g,l),y.applyQuaternion(b),y.add(h),p.push(y.x,y.y,y.z)}let v=[],x=i.length/3,w=a.length/2;for(let e=0;e<x-1;e++)for(let t=0;t<w-1;t++){let r=t+e*w,n=t+1+e*w,a=t+(e+1)*w,i=t+1+(e+1)*w;t===w-2&&!0===d&&(n=e*w,i=(e+1)*w),!0===l?(v.push(r,n,a),v.push(a,n,i)):(v.push(r,a,n),v.push(a,i,n))}if(!0===o||!0===u){let e=[];for(let t=0,r=a.length;t<r;t+=2)e.push(new n.I9Y(a[t],a[t+1]));let t=n.xJ6.triangulateShape(e,[]),r=[];for(let e=0,n=t.length;e<n;e++){let n=t[e];r.push(n[0],n[1],n[2])}if(!0===o)for(let e=0,t=r.length;e<t;e+=3)!0===l?v.push(r[e+0],r[e+1],r[e+2]):v.push(r[e+0],r[e+2],r[e+1]);if(!0===u){let e=w*(x-1);for(let t=0,n=r.length;t<n;t+=3)!0===l?v.push(e+r[t+0],e+r[t+2],e+r[t+1]):v.push(e+r[t+0],e+r[t+1],e+r[t+2])}}let A=k(v,new n.qtW(p,3)),N=I(v,p,s),T=new n.LoY;return T.setAttribute("position",A),T.setAttribute("normal",N),T._solid=c,T._type="mesh",T}(t);break;case"Color":case"Coordinate":case"Normal":case"TextureCoordinate":r=t.fields[0].values;break;case"WorldInfo":r=function(e){let t={},r=e.fields;for(let e=0,n=r.length;e<n;e++){let n=r[e],a=n.name,i=n.values;switch(a){case"title":t.title=i[0];break;case"info":t.info=i}}return t}(t)}return void 0!==r&&void 0!==t.DEF&&!0===r.hasOwnProperty("name")&&(r.name=t.DEF),r}(t)),t.build)}(o);s instanceof n.B69&&a.add(s),"WorldInfo"===o.name&&(a.userData.worldInfo=s)}return a}(function(e){let t=function(){let e=a.A.createToken,t=e({name:"RouteIdentifier",pattern:/[^\x30-\x39\0-\x20\x22\x27\x23\x2b\x2c\x2d\x2e\x5b\x5d\x5c\x7b\x7d][^\0-\x20\x22\x27\x23\x2b\x2c\x2d\x2e\x5b\x5d\x5c\x7b\x7d]*[\.][^\x30-\x39\0-\x20\x22\x27\x23\x2b\x2c\x2d\x2e\x5b\x5d\x5c\x7b\x7d][^\0-\x20\x22\x27\x23\x2b\x2c\x2d\x2e\x5b\x5d\x5c\x7b\x7d]*/}),r=e({name:"Identifier",pattern:/[^\x30-\x39\0-\x20\x22\x27\x23\x2b\x2c\x2d\x2e\x5b\x5d\x5c\x7b\x7d]([^\0-\x20\x22\x27\x23\x2b\x2c\x2e\x5b\x5d\x5c\x7b\x7d])*/,longer_alt:t}),n=e({name:"Version",pattern:/#VRML.*/,longer_alt:r}),i=e({name:"NodeName",pattern:RegExp("Anchor|Billboard|Collision|Group|Transform|Inline|LOD|Switch|AudioClip|DirectionalLight|PointLight|Script|Shape|Sound|SpotLight|WorldInfo|CylinderSensor|PlaneSensor|ProximitySensor|SphereSensor|TimeSensor|TouchSensor|VisibilitySensor|Box|Cone|Cylinder|ElevationGrid|Extrusion|IndexedFaceSet|IndexedLineSet|PointSet|Sphere|Color|Coordinate|Normal|TextureCoordinate|Appearance|FontStyle|ImageTexture|Material|MovieTexture|PixelTexture|TextureTransform|ColorInterpolator|CoordinateInterpolator|NormalInterpolator|OrientationInterpolator|PositionInterpolator|ScalarInterpolator|Backgroun
1d|Fog|NavigationInfo|Viewpoint|Text"),longer_alt:r}),o=e({name:"DEF",pattern:/DEF/,longer_alt:r}),l=e({name:"USE",pattern:/USE/,longer_alt:r}),s=e({name:"ROUTE",pattern:/ROUTE/,longer_alt:r}),u=e({name:"TO",pattern:/TO/,longer_alt:r}),c=e({name:"StringLiteral",pattern:/"(?:[^\\"\n\r]|\\[bfnrtv"\\/]|\\u[0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F])*"/}),f=e({name:"HexLiteral",pattern:/0[xX][0-9a-fA-F]+/}),d=e({name:"NumberLiteral",pattern:/[-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?/}),p=e({name:"TrueLiteral",pattern:/TRUE/}),h=e({name:"FalseLiteral",pattern:/FALSE/}),m=e({name:"NullLiteral",pattern:/NULL/}),g=e({name:"LSquare",pattern:/\[/}),y=e({name:"RSquare",pattern:/]/}),b=e({name:"LCurly",pattern:/{/}),v=e({name:"RCurly",pattern:/}/}),x=e({name:"Comment",pattern:/#.*/,group:a.A.Lexer.SKIPPED}),w=[e({name:"WhiteSpace",pattern:/[ ,\s]/,group:a.A.Lexer.SKIPPED}),i,o,l,s,u,p,h,m,n,r,t,c,f,d,g,y,b,v,x],A={};for(let e=0,t=w.length;e<t;e++){let t=w[e];A[t.name]=t}return{tokens:w,tokenVocabulary:A}}(),r=new o(t.tokens),n=new s(t.tokenVocabulary),i=function(e){class t extends e{vrml(e){let t={version:this.visit(e.version),nodes:[],routes:[]};for(let r=0,n=e.node.length;r<n;r++){let n=e.node[r];t.nodes.push(this.visit(n))}if(e.route)for(let r=0,n=e.route.length;r<n;r++){let n=e.route[r];t.routes.push(this.visit(n))}return t}version(e){return e.Version[0].image}node(e){let t={name:e.NodeName[0].image,fields:[]};if(e.field)for(let r=0,n=e.field.length;r<n;r++){let n=e.field[r];t.fields.push(this.visit(n))}return e.def&&(t.DEF=this.visit(e.def[0])),t}field(e){let t;let r={name:e.Identifier[0].image,type:null,values:null};return e.singleFieldValue&&(t=this.visit(e.singleFieldValue[0])),e.multiFieldValue&&(t=this.visit(e.multiFieldValue[0])),r.type=t.type,r.values=t.values,r}def(e){return(e.Identifier||e.NodeName)[0].image}use(e){return{USE:(e.Identifier||e.NodeName)[0].image}}singleFieldValue(e){return r(this,e)}multiFieldValue(e){return r(this,e)}route(e){return{FROM:e.RouteIdentifier[0].image,TO:e.RouteIdentifier[1].image}}constructor(){super(),this.validateVisitor()}}function r(e,t){let r={type:null,values:[]};if(t.node){r.type="node";for(let n=0,a=t.node.length;n<a;n++){let a=t.node[n];r.values.push(e.visit(a))}}if(t.use){r.type="use";for(let n=0,a=t.use.length;n<a;n++){let a=t.use[n];r.values.push(e.visit(a))}}if(t.StringLiteral){r.type="string";for(let e=0,n=t.StringLiteral.length;e<n;e++){let n=t.StringLiteral[e];r.values.push(n.image.replace(/'|"/g,""))}}if(t.NumberLiteral){r.type="number";for(let e=0,n=t.NumberLiteral.length;e<n;e++){let n=t.NumberLiteral[e];r.values.push(parseFloat(n.image))}}if(t.HexLiteral){r.type="hex";for(let e=0,n=t.HexLiteral.length;e<n;e++){let n=t.HexLiteral[e];r.values.push(n.image)}}if(t.TrueLiteral){r.type="boolean";for(let e=0,n=t.TrueLiteral.length;e<n;e++)"TRUE"===t.TrueLiteral[e].image&&r.values.push(!0)}if(t.FalseLiteral){r.type="boolean";for(let e=0,n=t.FalseLiteral.length;e<n;e++)"FALSE"===t.FalseLiteral[e].image&&r.values.push(!1)}return t.NullLiteral&&(r.type="null",t.NullLiteral.forEach(function(){r.values.push(null)})),r}return new t}(n.getBaseCstVisitorConstructor()),l=r.lex(e);n.input=l.tokens;let u=n.vrml();if(n.errors.length>0)throw console.error(n.errors),Error("THREE.VRMLLoader: Parsing errors detected.");return i.visit(u)}(e))}constructor(e){super(e)}}class o{lex(e){let t=this.lexer.tokenize(e);if(t.errors.length>0)throw console.error(t.errors),Error("THREE.VRMLLexer: Lexing errors detected.");return t}constructor(e){this.lexer=new a.A.Lexer(e)}}let l=a.A.CstParser;class s extends l{constructor(e){super(e);let t=this,r=e.Version,n=e.LCurly,a=e.RCurly,i=e.LSquare,o=e.RSquare,l=e.Identifier,s=e.RouteIdentifier,u=e.StringLiteral,c=e.HexLiteral,f=e.NumberLiteral,d=e.TrueLiteral,p=e.FalseLiteral,h=e.NullLiteral,m=e.DEF,g=e.USE,y=e.ROUTE,b=e.TO,v=e.NodeName;t.RULE("vrml",function(){t.SUBRULE(t.version),t.AT_LEAST_ONE(function(){t.SUBRULE(t.node)}),t.MANY(function(){t.SUBRULE(t.route)})}),t.RULE("version",function(){t.CONSUME(r)}),t.RULE("node",function(){t.OPTION(function(){t.SUBRULE(t.def)}),t.CONSUME(v),t.CONSUME(n),t.MANY(function(){t.SUBRULE(t.field)}),t.CONSUME(a)}),t.RULE("field",function(){t.CONSUME(l),t.OR2([{ALT:function(){t.SUBRULE(t.singleFieldValue)}},{ALT:function(){t.SUBRULE(t.multiFieldValue)}}])}),t.RULE("def",function(){t.CONSUME(m),t.OR([{ALT:function(){t.CONSUME(l)}},{ALT:function(){t.CONSUME(v)}}])}),t.RULE("use",function(){t.CONSUME(g),t.OR([{ALT:function(){t.CONSUME(l)}},{ALT:function(){t.CONSUME(v)}}])}),t.RULE("singleFieldValue",function(){t.AT_LEAST_ONE(function(){t.OR([{ALT:function(){t.SUBRULE(t.node)}},{ALT:function(){t.SUBRULE(t.use)}},{ALT:function(){t.CONSUME(u)}},{ALT:function(){t.CONSUME(c)}},{ALT:function(){t.CONSUME(f)}},{ALT:function(){t.CONSUME(d)}},{ALT:function(){t.CONSUME(p)}},{ALT:function(){t.CONSUME(h)}}])})}),t.RULE("multiFieldValue",function(){t.CONSUME(i),t.MANY(function(){t.OR([{ALT:function(){t.SUBRULE(t.node)}},{ALT:function(){t.SUBRULE(t.use)}},{ALT:function(){t.CONSUME(u)}},{ALT:function(){t.CONSUME(c)}},{ALT:function(){t.CONSUME(f)}},{ALT:function(){t.CONSUME(h)}}])}),t.CONSUME(o)}),t.RULE("route",function(){t.CONSUME(y),t.CONSUME(s),t.CONSUME(b),t.CONSUME2(s)}),this.performSelfAnalysis()}}class u{constructor(e,t,r){this.a=e,this.b=t,this.c=r,this.normal=new n.Pq0}}
1let c={INTENSITY:1,INTENSITY_ALPHA:2,RGB:3,RGBA:4}}}]);
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.