PageSourceSearch

https://visulima.com/assets/routes-BbB6dWx1.js

js visulima.com collected 2026-10-05 06:30:55 UTC 1,045,862 bytes, 4,184 lines download raw bytes

1import{a as Wh,r as mb}from"./rolldown-runtime-W-g5d7YK.js";import{t as gb}from"./react-BWocqO0-.js";import{r as vb,t as Rc}from"./link-CpWfnuI1.js";import{t as yb}from"./jsx-runtime-BHV25n4M.js";import{t as ls}from"./createLucideIcon-D3J6eeMb.js";import{n as gp,t as xb}from"./stats-BquJoZki.js";import{$ as M1,G as vp,K as hr,Q as md,S as _b,U as bb,V as yp,W as El,X as Sb,Y as on,Z as Ev,at as Gp,ct as Mb,et as wb,ft as Tv,gt as Eb,it as Hp,mt as Tb,nt as Cb,ot as Ab,pt as Yc,q as fr,rt as Rb,tt as Ib,ut as Pb}from"./index-BNoYxxCT.js";import{t as Lu}from"./animated-number-pD6KtmDC.js";var Nb=[["path",{d:"M12 16v5",key:"zza2cw"}],["path",{d:"M16 14.639V21",key:"1s85h0"}],["path",{d:"M20 10.656V21",key:"q45596"}],["path",{d:"m22 3-8.646 8.646a.5.5 0 0 1-.708 0L9.354 8.354a.5.5 0 0 0-.707 0L2 15",key:"1fw8x9"}],["path",{d:"M4 18.463V21",key:"1otddq"}],["path",{d:"M8 14.656V21",key:"1t2idw"}]],Lb=ls("chart-no-axes-combined",Nb),Db=[["path",{d:"M11 10.27 7 3.34",key:"16pf9h"}],["path",{d:"m11 13.73-4 6.93",key:"794ttg"}],["path",{d:"M12 22v-2",key:"1osdcq"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M14 12h8",key:"4f43i9"}],["path",{d:"m17 20.66-1-1.73",key:"eq3orb"}],["path",{d:"m17 3.34-1 1.73",key:"2wel8s"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"m20.66 17-1.73-1",key:"sg0v6f"}],["path",{d:"m20.66 7-1.73 1",key:"1ow05n"}],["path",{d:"m3.34 17 1.73-1",key:"nuk764"}],["path",{d:"m3.34 7 1.73 1",key:"1ulond"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["circle",{cx:"12",cy:"12",r:"8",key:"46899m"}]],Ub=ls("cog",Db),Ob=[["circle",{cx:"12",cy:"18",r:"3",key:"1mpf1b"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["path",{d:"M18 9v2c0 .6-.4 1-1 1H7c-.6 0-1-.4-1-1V9",key:"1uq4wg"}],["path",{d:"M12 12v3",key:"158kv8"}]],Fb=ls("git-fork",Ob),kb=[["path",{d:"M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5",key:"mvr1a0"}]],Bb=ls("heart",kb),zb=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],Vb=ls("lock",zb),Gb=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],Hb=ls("play",Gb),Wb=[["path",{d:"M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z",key:"w46dr5"}]],jb=ls("puzzle",Wb),Xb=[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]],w1=ls("star",Xb),qb=[["line",{x1:"10",x2:"14",y1:"2",y2:"2",key:"14vaq8"}],["line",{x1:"12",x2:"15",y1:"14",y2:"11",key:"17fdiu"}],["circle",{cx:"12",cy:"14",r:"8",key:"1e1u0o"}]],Yb=ls("timer",qb),de=Wh(gb(),1);function E1(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function $b(...e){return t=>{let n=!1;const i=e.map(r=>{const o=E1(r,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let r=0;r<i.length;r++){const o=i[r];typeof o=="function"?o():E1(e[r],null)}}}}function Zb(...e){return de.useCallback($b(...e),e)}var x=Wh(yb(),1),Jb=class extends de.Component{getSnapshotBeforeUpdate(e){const t=this.props.childRef.current;if(md(t)&&e.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const n=t.offsetParent,i=md(n)&&n.offsetWidth||0,r=md(n)&&n.offsetHeight||0,o=getComputedStyle(t),l=this.props.sizeRef.current;l.height=parseFloat(o.height),l.width=parseFloat(o.width),l.top=t.offsetTop,l.left=t.offsetLeft,l.right=i-l.width-l.left,l.bottom=r-l.height-l.top,l.direction=o.direction}return null}componentDidUpdate(){}render(){return this.props.children}};function Kb({children:e,isPresent:t,anchorX:n,anchorY:i,root:r,pop:o}){const l=(0,de.useId)(),u=(0,de.useRef)(null),h=(0,de.useRef)({width:0,height:0,top:0,left:0,right:0,bottom:0,direction:"ltr"}),{nonce:f}=(0,de.useContext)(Ev),p=Zb(u,e.props?.ref??e?.ref);return(0,de.useInsertionEffect)(()=>{const{width:g,height:m,top:v,left:b,right:w,bottom:S,direction:_}=h.current;if(t||o===!1||!u.current||!g||!m)return;const C=_==="rtl",A=n==="left"?C?`right: ${w}`:`left: ${b}`:C?`left: ${b}`:`right: ${w}`,E=i==="bottom"?`bottom: ${S}`:`top: ${v}`;u.current.dataset.motionPopId=l;const P=document.createElement("style");f&&(P.nonce=f);const N=r??document.head;return N.appendChild(P),P.sheet&&P.sheet.insertRule(`
2          [data-motion-pop-id="${l}"] {
3            position: absolute !important;
4            width: ${g}px !important;
5            height: ${m}px !important;
6            ${A}px !important;
7            ${E}px !important;
8          }
9        `),()=>{u.current?.removeAttribute("data-motion-pop-id"),N.contains(P)&&N.removeChild(P)}},[t]),(0,x.jsx)(Jb,{isPresent:t,childRef:u,sizeRef:h,pop:o,children:o===!1?e:de.cloneElement(e,{ref:p})})}var Qb=({children:e,initial:t,isPresent:n,onExitComplete:i,custom:r,presenceAffectsLayout:o,mode:l,anchorX:u,anchorY:h,root:f})=>{const p=Gp(eS),g=(0,de.useId)(),m=(0,de.useRef)(n),v=(0,de.useRef)(i);Hp(()=>{m.current=n,v.current=i});let b=!0,w=(0,de.useMemo)(()=>(b=!1,{id:g,initial:t,isPresent:n,custom:r,onExitComplete:S=>{p.set(S,!0);for(const _ of p.values())if(!_)return;i&&i()},register:S=>(p.set(S,!1),()=>{p.delete(S),!m.current&&!p.size&&v.current?.()})}),[n,p,i]);return o&&b&&(w={...w}),(0,de.useMemo)(()=>{p.forEach((S,_)=>p.set(_,!1))},[n]),de.useEffect(()=>{!n&&!p.size&&i&&i()},[n]),e=(0,x.jsx)(Kb,{pop:l==="popLayout",isPresent:n,anchorX:u,anchorY:h,root:f,children:e}),(0,x.jsx)(Rb.Provider,{value:w,children:e})};function eS(){return new Map}var Du=e=>e.key||"";function T1(e){const t=[];
9return de.Children.forEach(e,n=>{(0,de.isValidElement)(n)&&t.push(n)}),t}var uo=({children:e,custom:t,initial:n=!0,onExitComplete:i,presenceAffectsLayout:r=!0,mode:o="sync",propagate:l=!1,anchorX:u="left",anchorY:h="top",root:f})=>{const[p,g]=Sb(l),m=(0,de.useMemo)(()=>T1(e),[e]),v=l&&!p?[]:m.map(Du),b=(0,de.useRef)(!0),w=(0,de.useRef)(m),S=Gp(()=>new Map),_=(0,de.useRef)(new Set),[C,A]=(0,de.useState)(m),[E,P]=(0,de.useState)(m);Hp(()=>{b.current=!1,w.current=m;for(let T=0;T<E.length;T++){const R=Du(E[T]);v.includes(R)?(S.delete(R),_.current.delete(R)):S.get(R)!==!0&&S.set(R,!1)}},[E,v.length,v.join("-")]);const N=[];if(m!==C){let T=[...m];for(let R=0;R<E.length;R++){const B=E[R],F=Du(B);v.includes(F)||(T.splice(R,0,B),N.push(B))}return o==="wait"&&N.length&&(T=N),P(T1(T)),A(m),null}const{forceRender:O}=(0,de.useContext)(Ab);return(0,x.jsx)(x.Fragment,{children:E.map(T=>{const R=Du(T),B=l&&!p?!1:m===E||v.includes(R),F=()=>{if(_.current.has(R))return;if(S.has(R))_.current.add(R),S.set(R,!0);else return;let j=!0;S.forEach(H=>{H||(j=!1)}),j&&(O?.(),P(w.current),l&&g?.(),i&&i())};return(0,x.jsx)(Qb,{isPresent:B,initial:!b.current||n?void 0:!1,custom:t,presenceAffectsLayout:r,mode:o,root:f,onExitComplete:B?void 0:F,anchorX:u,anchorY:h,children:T},R)})})};function xp(e){const t=Gp(()=>wb(e)),{isStatic:n}=(0,de.useContext)(Ev);if(n){const[,i]=(0,de.useState)(e);(0,de.useEffect)(()=>t.on("change",i),[])}return t}function tS(e,t){const n=xp(t()),i=()=>n.set(t());return i(),Hp(()=>{const r=()=>Cb.preRender(i,!1,!0),o=e.map(l=>l.on("change",r));return()=>{o.forEach(l=>l()),Ib(i)}}),n}function nS(e,...t){const n=e.length;function i(){let r="";for(let o=0;o<n;o++){r+=e[o];const l=t[o];l&&(r+=M1(l)?l.get():l)}return r}return tS(t.filter(M1),i)}var $t=Tb(),iS="/assets/github-BJ0kiYnU.svg",_p=["M-380 -189C-380 -189 -312 216 152 343C616 470 684 875 684 875","M-373 -197C-373 -197 -305 208 159 335C623 462 691 867 691 867","M-366 -205C-366 -205 -298 200 166 327C630 454 698 859 698 859","M-359 -213C-359 -213 -291 192 173 319C637 446 705 851 705 851","M-352 -221C-352 -221 -284 184 180 311C644 438 712 843 712 843","M-345 -229C-345 -229 -277 176 187 303C651 430 719 835 719 835","M-338 -237C-338 -237 -270 168 194 295C658 422 726 827 726 827","M-331 -245C-331 -245 -263 160 201 287C665 414 733 819 733 819","M-324 -253C-324 -253 -256 152 208 279C672 406 740 811 740 811","M-317 -261C-317 -261 -249 144 215 271C679 398 747 803 747 803","M-310 -269C-310 -269 -242 136 222 263C686 390 754 795 754 795","M-303 -277C-303 -277 -235 128 229 255C693 382 761 787 761 787","M-296 -285C-296 -285 -228 120 236 247C700 374 768 779 768 779","M-289 -293C-289 -293 -221 112 243 239C707 366 775 771 775 771","M-282 -301C-282 -301 -214 104 250 231C714 358 782 763 782 763","M-275 -309C-275 -309 -207 96 257 223C721 350 789 755 789 755","M-268 -317C-268 -317 -200 88 264 215C728 342 796 747 796 747","M-261 -325C-261 -325 -193 80 271 207C735 334 803 739 803 739","M-254 -333C-254 -333 -186 72 278 199C742 326 810 731 810 731","M-247 -341C-247 -341 -179 64 285 191C749 318 817 723 817 723","M-240 -349C-240 -349 -172 56 292 183C756 310 824 715 824 715","M-233 -357C-233 -357 -165 48 299 175C763 302 831 707 831 707","M-226 -365C-226 -365 -158 40 306 167C770 294 838 699 838 699","M-219 -373C-219 -373 -151 32 313 159C777 286 845 691 845 691","M-212 -381C-212 -381 -144 24 320 151C784 278 852 683 852 683","M-205 -389C-205 -389 -137 16 327 143C791 270 859 675 859 675","M-198 -397C-198 -397 -130 8 334 135C798 262 866 667 866 667","M-191 -405C-191 -405 -123 0 341 127C805 254 873 659 873 659","M-184 -413C-184 -413 -116 -8 348 119C812 246 880 651 880 651","M-177 -421C-177 -421 -109 -16 355 111C819 238 887 643 887 643","M-170 -429C-170 -429 -102 -24 362 103C826 230 894 635 894 635","M-163 -437C-163 -437 -95 -32 369 95C833 222 901 627 901 627","M-156 -445C-156 -445 -88 -40 376 87C840 214 908 619 908 619","M-149 -453C-149 -453 -81 -48 383 79C847 206 915 611 915 611","M-142 -461C-142 -461 -74 -56 390 71C854 198 922 603 922 603","M-135 -469C-135 -469 -67 -64 397 63C861 190 929 595 929 595","M-128 -477C-128 -477 -60 -72 404 55C868 182 936 587 936 587","M-121 -485C-121 -485 -53 -80 411 47C875 174 943 579 943 579","M-114 -493C-114 -493 -46 -88 418 39C882 166 950 571 950 571","M-107 -501C-107 -501 -39 -96 425 31C889 158 957 563 957 563","M-100 -509C-100 -509 -32 -104 432 23C896 150 964 555 964 555","M-93 -517C-93 -517 -25 -112 439 15C903 142 971 547 971 547","M-86 -525C-86 -525 -18 -120 446 7C910 134 978 539 978 539","M-79 -533C-79 -533 -11 -128 453 -1C917 126 985 531 985 531","M-72 -541C-72 -541 -4 -136 460 -9C924 118 992 523 992 523","M-65 -549C-65 -549 3 -144 467 -17C931 110 999 515 999 515","M-58 -557C-58 -557 10 -152 474 -25C938 102 1006 507 1006 507","M-51 -565C-51 -565 17 -160 481 -33C945 94 1013 499 1013 499","M-44 -573C-44 -573 24 -168 488 -41C952 86 1020 491 1020 491","M-37 -581C-37 -581 31 -176 495 -49C959 78 1027 483 1027 483"],gd=_p.map(()=>({delay:Math.random()*10,duration:Math.random()*10+10,y2End:`${93+Math.random()*8}%`})),Cv=(0,de.memo)(e=>{const t=(0,$t.c)(8),{className:n}=e;let i;t[0]!==n?(i=fr("absolute inset-0 flex h-full w-full items-center justify-center [mask-size:40px] [mask-repeat:no-repeat]",n),t[0]=n,t[1]=i):i=t[1];let r,o,l;t[2]===Symbol.for("react.memo_cache_sentinel")?(r=(0,x.jsx)("path",{d:"M-380 -189C-380 -189 -312 216 152 343C616 470 684 875 684 875M-373 -197C-373 -197 -305 208 159 335C623 462 691 867 691 867M-366 -205C-366 -205 -298 200 166 327C630 454 698 859 698 859M-359 -213C-359 -213 -291 192 173 319C637 446 705 851 705 851M-352 -221C-352 -221 -284 184 180 311C644 438 712 843 712 843M-345 -229C-345 -229 -277 176 187 303C651 430 719 835 719 835M-338 -237C-338 -237 -270 168 194 295C658 422 726 827 726 827M-331 -245C-331 -245 -263 160 201 287C665 414 733 819 733 819M-324 -253C-324 -253 -256 152 208 279C672 406 740 811 740 811M-317 -261C-317 -261 -249 144 215 271C679 398 747 803 747 803M-310 -269C-310 -269 -242 136 222 263C686 390 754 795 754 795M-303 -277C-303 -277 -235 128 229 255C693 382 761 787 761 787M-296 -285C-296 -285 -228 120 236 247C700 374 768 779 768 779M-289 -293C-289 -293 -221 112 243 239C707 366 775 771 775 771M-282 -301C-282 -301 -214 104 250 231C714 358 782 763 782 763M-275 -309C-275 -309 -207 96 257 223C721 350 789 755 789 755M-268 -317C-268 -317 -200 88 264 215C728 342 796 747 796 747M-261 -325C-261 -325 -193 80 271 207C735 334 803 739 803 739M-254 -333C-254 -333 -186 72 278 199
9C742 326 810 731 810 731M-247 -341C-247 -341 -179 64 285 191C749 318 817 723 817 723M-240 -349C-240 -349 -172 56 292 183C756 310 824 715 824 715M-233 -357C-233 -357 -165 48 299 175C763 302 831 707 831 707M-226 -365C-226 -365 -158 40 306 167C770 294 838 699 838 699M-219 -373C-219 -373 -151 32 313 159C777 286 845 691 845 691M-212 -381C-212 -381 -144 24 320 151C784 278 852 683 852 683M-205 -389C-205 -389 -137 16 327 143C791 270 859 675 859 675M-198 -397C-198 -397 -130 8 334 135C798 262 866 667 866 667M-191 -405C-191 -405 -123 0 341 127C805 254 873 659 873 659M-184 -413C-184 -413 -116 -8 348 119C812 246 880 651 880 651M-177 -421C-177 -421 -109 -16 355 111C819 238 887 643 887 643M-170 -429C-170 -429 -102 -24 362 103C826 230 894 635 894 635M-163 -437C-163 -437 -95 -32 369 95C833 222 901 627 901 627M-156 -445C-156 -445 -88 -40 376 87C840 214 908 619 908 619M-149 -453C-149 -453 -81 -48 383 79C847 206 915 611 915 611M-142 -461C-142 -461 -74 -56 390 71C854 198 922 603 922 603M-135 -469C-135 -469 -67 -64 397 63C861 190 929 595 929 595M-128 -477C-128 -477 -60 -72 404 55C868 182 936 587 936 587M-121 -485C-121 -485 -53 -80 411 47C875 174 943 579 943 579M-114 -493C-114 -493 -46 -88 418 39C882 166 950 571 950 571M-107 -501C-107 -501 -39 -96 425 31C889 158 957 563 957 563M-100 -509C-100 -509 -32 -104 432 23C896 150 964 555 964 555M-93 -517C-93 -517 -25 -112 439 15C903 142 971 547 971 547M-86 -525C-86 -525 -18 -120 446 7C910 134 978 539 978 539M-79 -533C-79 -533 -11 -128 453 -1C917 126 985 531 985 531M-72 -541C-72 -541 -4 -136 460 -9C924 118 992 523 992 523M-65 -549C-65 -549 3 -144 467 -17C931 110 999 515 999 515M-58 -557C-58 -557 10 -152 474 -25C938 102 1006 507 1006 507M-51 -565C-51 -565 17 -160 481 -33C945 94 1013 499 1013 499M-44 -573C-44 -573 24 -168 488 -41C952 86 1020 491 1020 491M-37 -581C-37 -581 31 -176 495 -49C959 78 1027 483 1027 483M-30 -589C-30 -589 38 -184 502 -57C966 70 1034 475 1034 475M-23 -597C-23 -597 45 -192 509 -65C973 62 1041 467 1041 467M-16 -605C-16 -605 52 -200 516 -73C980 54 1048 459 1048 459M-9 -613C-9 -613 59 -208 523 -81C987 46 1055 451 1055 451M-2 -621C-2 -621 66 -216 530 -89C994 38 1062 443 1062 443M5 -629C5 -629 73 -224 537 -97C1001 30 1069 435 1069 435M12 -637C12 -637 80 -232 544 -105C1008 22 1076 427 1076 427M19 -645C19 -645 87 -240 551 -113C1015 14 1083 419 1083 419",stroke:"url(#paint0_radial_242_278)",strokeOpacity:"0.05",strokeWidth:"0.5"}),o=_p.map(rS),l=_p.map(sS),t[2]=r,t[3]=o,t[4]=l):(r=t[2],o=t[3],l=t[4]);let u;t[5]===Symbol.for("react.memo_cache_sentinel")?(u=(0,x.jsxs)("svg",{"aria-hidden":"true",className:"pointer-events-none absolute z-0 h-full w-full",fill:"none",focu
9sable:"false",height:"100%",viewBox:"0 0 696 316",width:"100%",xmlns:"http://www.w3.org/2000/svg",children:[r,o,(0,x.jsxs)("defs",{children:[l,(0,x.jsxs)("radialGradient",{cx:"0",cy:"0",gradientTransform:"translate(352 34) rotate(90) scale(555 1560.62)",gradientUnits:"userSpaceOnUse",id:"paint0_radial_242_278",r:"1",children:[(0,x.jsx)("stop",{offset:"0.0666667",stopColor:"var(--neutral-300)"}),(0,x.jsx)("stop",{offset:"0.243243",stopColor:"var(--neutral-300)"}),(0,x.jsx)("stop",{offset:"0.43594",stopColor:"white",stopOpacity:"0"})]})]})]}),t[5]=u):u=t[5];let h;return t[6]!==i?(h=(0,x.jsx)("div",{className:i,children:u}),t[6]=i,t[7]=h):h=t[7],h});Cv.displayName="BackgroundBeams";function rS(e,t){return(0,x.jsx)(on.path,{d:e,stroke:`url(#linearGradient-${t})`,strokeOpacity:"0.4",strokeWidth:"0.5"},`path-${t}`)}function sS(e,t){return(0,x.jsxs)(on.linearGradient,{animate:{x1:["0%","100%"],x2:["0%","95%"],y1:["0%","100%"],y2:["0%",gd[t].y2End]},id:`linearGradient-${t}`,initial:{x1:"0%",x2:"0%",y1:"0%",y2:"0%"},transition:{delay:gd[t].delay,duration:gd[t].duration,ease:"easeInOut",repeat:1/0},children:[(0,x.jsx)("stop",{stopColor:"#18CCFC",stopOpacity:"0"}),(0,x.jsx)("stop",{stopColor:"#18CCFC"}),(0,x.jsx)("stop",{offset:"32.5%",stopColor:"#6344F5"}),(0,x.jsx)("stop",{offset:"100%",stopColor:"#AE48FF",stopOpacity:"0"})]},`gradient-${t}`)}var aS=e=>{const t=(0,$t.c)(202),{className:n}=e;let i,r,o,l,u,h,f,p,g,m,v,b,w,S,_,C,A,E,P,N,O,T,R,B,F,j,H,Y,q,te,J,he,ue,ce,me,_e,ht,tt,re,ge,Ie,Ce,We,et,Ze,ct,oe,Se,Ae,De,Le,Ye,Je,lt,ut,z,vt,bt,xt,U,I,G,ee,fe,we,Ne,X,Ee,ze,qe,xe,Ke,nt,ft,Rt,W,le,ve,Be,je,pe,Oe,at,sn,Lt,xn,Bn,Ji,ki,Bi,di;t[0]===Symbol.for("react.memo_cache_sentinel")?(i=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.08",height:"8",width:"2",x:"568",y:"276"}),b=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.08",height:"8",width:"2",x:"572",y:"276"}),R=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.08",height:"2",width:"2",x:"563",y:"279"}),ce=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.04",height:"1",width:"2",x:"563",y:"279"}),Ze=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.04",height:"1",width:"2",x:"568",y:"276"}),z=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.04",height:"1",width:"2",x:"572",y:"276"}),X=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.08",height:"8",width:"2",x:"587",y:"276"}),ve=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.08",height:"8",width:"2",x:"591",y:"276"}),ki=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.08",height:"2",width:"2",x:"582",y:"279"}),r=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.04",height:"1",width:"2",x:"582",y:"279"}),o=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.04",height:"1",width:"2",x:"587",y:"276"}),l=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.04",height:"1",width:"2",x:"591",y:"276"}),u=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.08",height:"8",width:"2",x:"606",y:"276"}),h=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.08",height:"8",width:"2",x:"610",y:"276"}),f=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.08",height:"2",width:"2",x:"601",y:"279"}),p=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.04",height:"1",width:"2",x:"601",y:"279"}),g=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.04",height:"1",width:"2",x:"606",y:"276"}),m=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.04",height:"1",width:"2",x:"610",y:"276"}),v=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.08",height:"8",width:"2",x:"606",y:"260"}),w=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.08",height:"8",width:"2",x:"610",y:"260"}),S=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.08",height:"2",width:"2",x:"601",y:"263"}),_=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.04",height:"1",width:"2",x:"601",y:"263"}),C=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.04",height:"1",width:"2",x:"606",y:"260"}),A=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.04",height:"1",width:"2",x:"610",y:"260"}),E=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.08",height:"8",width:"2",x:"553",y:"76"}),P=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.08",height:"8",width:"2",x:"557",y:"76"}),N=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.08",height:"2",width:"2",x:"548",y:"79"}),O=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.04",height:"1",width:"2",x:"548",y:"79"}),T=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.04",height:"1",width:"2",x:"553",y:"76"}),B=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.04",height:"1",width:"2",x:"557",y:"76"}),F=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.08",height:"8",width:"2",x:"572",y:"76"}),j=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.08",height:"8",width:"2",x:"576",y:"76"}),H=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.08",height:"2",width:"2",x:"567",y:"79"}),Y=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.04",height:"1",width:"2",x:"567",y:"79"}),q=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.04",height:"1",width:"2",x:"572",y:"76"}),te=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.04",height:"1",width:"2",x:"576",y:"76"}),J=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.08",height:"8",width:"2",x:"591",y:"76"}),he=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.08",height:"8",width:"2",x:"595",y:"76"}),ue=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.08",height:"2",width:"2",x:"586",y:"79"}),me=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.04",height:"1",width:"2",x:"586",y:"79"}),_e=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.04",height:"1",width:"2",x:"591",y:"76"}),ht=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.04",height:"1",width:"2",x:"595",y:"76"}),tt=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.08",height:"2",width:"8",x:"345",y:"275"}),re=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.04",height:"1",width:"8",x:"345",y:"275"}),ge=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.08",height:"2",width:"8",x:"345",y:"285"}),Ie=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.04",height:"1",width:"8",x:"345",y:"285"}),Ce=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.08",height:"4",width:"2",x:"346",y:"279"}),We=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.04",height:"1",width:"2",x:"346",y:"279"}),et=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.08",height:"4",width:"2",x:"350",y:"279"}),ct=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.04",height:"1",width:"2",x:"350",y:"279"}),oe=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.08",height:"2",width:"8",x:"329",y:"275"}),Se=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.04",height:"1",width:"8",x:"329",y:"275"}),Ae=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.08",height:"2",width:"8",x:"329",y:"285"}),De=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.04",height:"1",width:"8",x:"329",y:"285"}),Le=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.08",height:"4",width:"2",x:"330",y:"279"}),Ye=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.04",height:"1",width:"2",x:"330",y:"279"}),Je=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.08",height:"4",width:"2",x:"334",y:"279"}),lt=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.04",height:"1",width:"2",x:"334",y:"279"}),ut=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.08",height:"2",width:"8",x:"313",y:"275"}),vt=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.04",height:"1",width:"8",x:"313",y:"275"}),bt=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.08",height:"2",width:"8",x:"313",y:"285"}),xt=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.04",height:"1",width:"8",x:"313",y:"285"}),U=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.08",height:"4",width:"2",x:"314",y:"279"}),I=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.04",height:"1",width:"2",x:"314",y:"279"}),G=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.08",height:"4",width:"2",x:"318",y:"279"}),ee=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.04",height:"1",width:"2",x:"318",y:"279"}),fe=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.08",height:"2",width:"8",x:"514",y:"321"}),we=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.04",height:"1",width:"8",x:"514",y:"321"}),Ne=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.08",height:"2",width:"8",x:"514",y:"331"}),Ee=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.04",height:"1",width:"8",x:"514",y:"331"}),ze=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.08",height:"4",width:"2",x:"51
95",y:"325"}),qe=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.04",height:"1",width:"2",x:"515",y:"325"}),xe=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.08",height:"4",width:"2",x:"519",y:"325"}),Ke=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.04",height:"1",width:"2",x:"519",y:"325"}),nt=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.08",height:"2",width:"8",x:"530",y:"321"}),ft=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.04",height:"1",width:"8",x:"530",y:"321"}),Rt=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.08",height:"2",width:"8",x:"530",y:"331"}),W=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.04",height:"1",width:"8",x:"530",y:"331"}),le=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.08",height:"4",width:"2",x:"531",y:"325"}),Be=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.04",height:"1",width:"2",x:"531",y:"325"}),je=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.08",height:"4",width:"2",x:"535",y:"325"}),pe=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.04",height:"1",width:"2",x:"535",y:"325"}),Oe=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.08",height:"2",width:"8",x:"514",y:"341"}),at=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.04",height:"1",width:"8",x:"514",y:"341"}),sn=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.08",height:"2",width:"8",x:"514",y:"351"}),Lt=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.04",height:"1",width:"8",x:"514",y:"351"}),xn=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.08",height:"4",width:"2",x:"515",y:"345"}),Bn=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.04",height:"1",width:"2",x:"515",y:"345"}),Ji=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.08",height:"4",width:"2",x:"519",y:"345"}),Bi=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.04",height:"1",width:"2",x:"519",y:"345"}),di=(0,x.jsx)("path",{d:"M724.25 98.25H529.25V20",stroke:"white",strokeOpacity:"0.06",strokeWidth:"0.5"}),t[0]=i,t[1]=r,t[2]=o,t[3]=l,t[4]=u,t[5]=h,t[6]=f,t[7]=p,t[8]=g,t[9]=m,t[10]=v,t[11]=b,t[12]=w,t[13]=S,t[14]=_,t[15]=C,t[16]=A,t[17]=E,t[18]=P,t[19]=N,t[20]=O,t[21]=T,t[22]=R,t[23]=B,t[24]=F,t[25]=j,t[26]=H,t[27]=Y,t[28]=q,t[29]=te,t[30]=J,t[31]=he,t[32]=ue,t[33]=ce,t[34]=me,t[35]=_e,t[36]=ht,t[37]=tt,t[38]=re,t[39]=ge,t[40]=Ie,t[41]=Ce,t[42]=We,t[43]=et,t[44]=Ze,t[45]=ct,t[46]=oe,t[47]=Se,t[48]=Ae,t[49]=De,t[50]=Le,t[51]=Ye,t[52]=Je,t[53]=lt,t[54]=ut,t[55]=z,t[56]=vt,t[57]=bt,t[58]=xt,t[59]=U,t[60]=I,t[61]=G,t[62]=ee,t[63]=fe,t[64]=we,t[65]=Ne,t[66]=X,t[67]=Ee,t[68]=ze,t[69]=qe,t[70]=xe,t[71]=Ke,t[72]=nt,t[73]=ft,t[74]=Rt,t[75]=W,t[76]=le,t[77]=ve,t[78]=Be,t[79]=je,t[80]=pe,t[81]=Oe,t[82]=at,t[83]=sn,t[84]=Lt,t[85]=xn,t[86]=Bn,t[87]=Ji,t[88]=ki,t[89]=Bi,t[90]=di):(i=t[0],r=t[1],o=t[2],l=t[3],u=t[4],h=t[5],f=t[6],p=t[7],g=t[8],m=t[9],v=t[10],b=t[11],w=t[12],S=t[13],_=t[14],C=t[15],A=t[16],E=t[17],P=t[18],N=t[19],O=t[20],T=t[21],R=t[22],B=t[23],F=t[24],j=t[25],H=t[26],Y=t[27],q=t[28],te=t[29],J=t[30],he=t[31],ue=t[32],ce=t[33],me=t[34],_e=t[35],ht=t[36],tt=t[37],re=t[38],ge=t[39],Ie=t[40],Ce=t[41],We=t[42],et=t[43],Ze=t[44],ct=t[45],oe=t[46],Se=t[47],Ae=t[48],De=t[49],Le=t[50],Ye=t[51],Je=t[52],lt=t[53],ut=t[54],z=t[55],vt=t[56],bt=t[57],xt=t[58],U=t[59],I=t[60],G=t[61],ee=t[62],fe=t[63],we=t[64],Ne=t[65],X=t[66],Ee=t[67],ze=t[68],qe=t[69],xe=t[70],Ke=t[71],nt=t[72],ft=t[73],Rt=t[74],W=t[75],le=t[76],ve=t[77],Be=t[78],je=t[79],pe=t[80],Oe=t[81],at=t[82],sn=t[83],Lt=t[84],xn=t[85],Bn=t[86],Ji=t[87],ki=t[88],Bi=t[89],di=t[90]);let mr,zi,jn,Vi,Xn,qn,ni,Ki,ii,wi,gr,Rr,Ir,vr,yr;t[91]===Symbol.for("react.memo_cache_sentinel")?(Ki=(0,x.jsxs)("g",{clipPath:"url(#clip0_825_2625)",children:[(0,x.jsx)("path",{d:"M536 386C541.333 380.667 644.889 277.111 696 226",stroke:"white",strokeOpacity:"0.1",strokeWidth:"0.3"}),(0,x.jsx)("path",{d:"M544 386C549.333 380.667 652.889 277.111 704 226",stroke:"white",strokeOpacity:"0.1",strokeWidth:"0.3"}),(0,x.jsx)("path",{d:"M552 386C557.333 380.667 660.889 277.111 712 226",stroke:"white",strokeOpacity:"0.1",strokeWidth:"0.3"}),(0,x.jsx)("path",{d:"M560 386C565.333 380.667 668.889 277.111 720 226",stroke:"white",strokeOpacity:"0.1",strokeWidth:"0.3"}),(0,x.jsx)("path",{d:"M568 386C573.333 380.667 676.889 277.111 728 226",stroke:"white",strokeOpacity:"0.1",strokeWidth:"0.3"}),(0,x.jsx)("path",{d:"M576 386C581.333 380.667 684.889 277.111 736 226",stroke:"white",strokeOpacity:"0.1",strokeWidth:"0.3"}),(0,x.jsx)("path",{d:"M584 386C589.333 380.667 692.889 277.111 744 226",stroke:"white",strokeOpacity:"0.1",strokeWidth:"0.3"}),(0,x.jsx)("path",{d:"M592 386C597.333 380.667 700.889 277.111 752 226",stroke:"white",strokeOpacity:"0.1",strokeWidth:"0.3"}),(0,x.jsx)("path",{d:"M600 386C605.333 380.667 708.889 277.111 760 226",stroke:"white",strokeOpacity:"0.1",strokeWidth:"0.3"}),(0,x.jsx)("path",{d:"M608 386C613.333 380.667 716.889 277.111 768 226",stroke:"white",strokeOpacity:"0.1",strokeWidth:"0.3"}),(0,x.jsx)("path",{d:"M616 386C621.333 380.667 724.889 277.111 776 226",stroke:"white",strokeOpacity:"0.1",strokeWidth:"0.3"}),(0,x.jsx)("path",{d:"M624 386C629.333 380.667 732.889 277.111 784 226",stroke:"white",strokeOpacity:"0.1",strokeWidth:"0.3"}),(0,x.jsx)("path",{d:"M632 386C637.333 380.667 740.889 277.111 792 226",stroke:"white",strokeOpacity:"0.1",strokeWidth:"0.3"}),(0,x.jsx)("path",{d:"M640 386C645.333 380.667 748.889 277.111 800 226",stroke:"white",strokeOpacity:"0.1",strokeWidth:"0.3"})]}),ii=(0,x.jsx)("path",{d:"M848 299.25H281.604C277.69 299.25 275.734 299.25 273.892 298.808C272.26 298.416 270.699 297.77 269.267 296.892C267.653 295.903 266.269 294.519 263.502 291.752L18 46.25",stroke:"white",strokeOpacity:"0.08",strokeWidth:"0.5"}),wi=(0,x.jsx)("path",{d:"M729 199.25H620.604C616.69 199.25 614.734 199.25 612.892 199.692C611.26 200.084 609.699 200.73 608.267 201.608C606.653 202.597 605.269 203.981 602.502 206.748L510 299.25",stroke:"white",strokeOpacity:"0.08",strokeWidth:"0.5"}),gr=(0,x.jsx)("path",{d:"M848 384.25H511.604C507.69 384.25 505.734 384.25 503.892 383.808C502.26 383.416 500.699 382.77 499.267 381.892C497.653 380.903 496.269 379.519 493.502 376.752L416 299.25",stroke:"white",strokeOpacity:"0.08",strokeWidth:"0.5"}),Rr=(0,x.jsx)("path",{d:"M299.25 299V245.25H459.25V299",stroke:"white",strokeOpacity:"0.08",strokeWidth:"0.5"}),Ir=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.08",height:"2",width:"2",x:"437",y:"260"}),vr=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.08",height:"2",width:"2",x:"443",y:"260"}),yr=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.08",height:"2",width:"2",x:"437",y:"266"}),mr=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.08",height:"2",width:"2",x:"443",y:"266"}),zi=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.08",height:"2",width:"2",x:"437",y:"272"}),jn=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.08",height:"2",width:"2",x:"443",y:"272"}),Vi=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.08",height:"2",width:"2",x:"437",y:"278"}),Xn=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.08",height:"2",width:"2",x:"443",y:"278"}),qn=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.08",height:"2",width:"2",x:"437",y:"284"}),ni=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.08",height:"2",width:"2",x:"443",y:"284"}),t[91]=mr,t[92]=zi,t[93]=jn,t[94]=Vi,t[95]=Xn,t[96]=qn,t[97]=ni,t[98]=Ki,t[99]=ii,t[100]=wi,t[101]=gr,t[102]=Rr,t[103]=Ir,t[104]=vr,t[105]=yr):(mr=t[91],zi=t[92],jn=t[93],Vi=t[94],Xn=t[95],qn=t[96],ni=t[97],Ki=t[98],ii=t[99],wi=t[100],gr=t[101],Rr=t[102],Ir=t[103],vr=t[104],yr=t[105]);let L,$,ne,Q,Z,Te,Me,Ve,Ge,ot,yt,St,it,Bt,jt,Mt,st,nn,He,gn,Pt,Kt,_n,zn,ri,zt,Xt,Yn,Ft,Ei,pi,Qi,$s,xo,Zs,Js,Ks,cs,Qs,ea,ta,na,ia,_o,ra,er,sa,Pr,Nr,aa,us,bo,oa,la,ca,ua,ha,hs,fa,da,fs,pa,ma,ga,ds,va,ya,So,Mo,xa,xr,ps,Lr,_a,ba,ms,Sa,Ma,Gi,Dr,wa,gs,Ea,Ta,wo,fn,Ca,Aa,Ra,Ia,_r;t[106]===Symbol.for("react.memo_cache_sentinel")?(L=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.08",height:"8",width:"2",x:"568",y:"276"}),$=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.08",height:"8",width:"2",x:"572",y:"276"}),ne=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.08",height:"2",width:"2",x:"563",y:"279"}),Q=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.04",height:"1",width:"2",x:"563",y:"279"}),Z=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.04",height:"1",width:"2",x:"568",y:"276"}),Te=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.04",height:"1",width:"2",x:"572",y:"276"}),Me=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.08",height:"8",width:"2",x:"587",y:"276"}),Ve=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.08",height:"8",width:"2",x:"591",y:"276"}),Ge=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.08",height:"2",width:"2",x:"582",y:"279"}),ot=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.04",height:"1",width:"2",x:"582",y:"279"}),yt=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.04",height:"1",width:"2",x:"587",y:"276"}),St=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.04",height:"1",width:"2",x:"591",y:"276"}),it=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.08",height:"8",width:"2",x:"606",y:"276"}),Bt=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.08",height:"8",width:"2",x:"610",y:"276"}),jt=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.08",height:"2",width:"2",x:"601",y:"279"}),Mt=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.04",height:"1",width:"2",x:"601",y:"279"}),st=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.04",height:"1",width:"2",x:"606",y:"276"}),nn=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.04",height:"1",width:"2",x:"610",y:"276"}),He=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.08",height:"8",width:"2",x:"606",y:"260"}),gn=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.08",height:"8",width:"2",x:"610",y:"260"}),Pt=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.08",height:"2",width:"2",x:"601",y:"263"}),Kt=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.04",height:"1",width:"2",x:"601",y:"263"}),_n=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.04",height:"1",width:"2",x:"606",y:"260"}),zn=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.04",height:"1",width:"2",x:"610",y:"260"}),ri=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.08",height:"8",width:"2",x:"553",y:"76"}),zt=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.08",height:"8",width:"2",x:"557",y:"76"}),Xt=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.08",height:"2",width:"2",x:"548",y:"79"}),Yn=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.04",height:"1",width:"2",x:"548",y:"79"}),Ft=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.04",height:"1",width:"2",x:"553",y:"76"}),Ei=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.04",height:"1",width:"2",x:"557",y:"76"}),pi=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.08",height:"8",width:"2",x:"572",y:"76"}),Qi=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.08",height:"8",width:"2",x:"576",y:"76"}),$s=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.08",height:"2",width:"2",x:"567",y:"79"}),xo=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.04",height:"1",width:"2",x:"567",y:"79"}),Zs=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.04",height:"1",width:"2",x:"572",y:"76"}),Js=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.04",height:"1",width:"2",x:"576",y:"76"}),Ks=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.08",height:"8",width:"2",x:"591",y:"76"}),cs=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.08",height:"8",width:"2",x:"595",y:"76"}),Qs=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.08",height:"2",width:"2",x:"586",y:"79"}),ea=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.04",height:"1",width:"2",x:"586",y:"79"}),ta=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.04",height:"1",width:"2",x:"591",y:"76"}),na=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.04",height:"1",width:"2",x:"595",y:"76"}),ia=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.08",height:"2",width:"8",x:"345",y:"275"}),_o=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.04",height:"1",width:"8",x:"345",y:"275"}),ra=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.08",height:"2",width:"8",x:"345",y:"285"}),er=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.04",height:"1",width:"8",x:"345",y:"285"}),sa=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.08",height:"4",width:"2",x:"346",y:"279"}),Pr=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.04",height:"1",width:"2",x:"346",y:"279"}),Nr=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.08",height:"4",width:"2",x:"350",y:"279"}),aa=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.04",height:"1",width:"2",x:"350",y:"279"}),us=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.08",height:"2",width:"8",x:"329",y:"275"}),bo=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.04",height:"1",width:"8",x:"329",y:"275"}),oa=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.08",height:"2",width:"8",x:"329",y:"285"}),la=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.04",height:"1",width:"8",x:"329",y:"285"}),ca=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.08",height:"4",width:"2",x:"330",y:"279"}),ua=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.04",height:"1",width:"2",x:"330",y:"279"}),ha=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.08",height:"4",width:"2",x:"334",y:"279"}),hs=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.04",height:"1",width:"2",x:"334",y:"279"}),fa=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.08",height:"2",width:"8",x:"313",y:"275"}),da=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.04",height:"1",width:"8",x:"313",y:"275"}),fs=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.08",height:"2",width:"8",x:"313",y:"285"}),pa=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.04",height:"1",width:"8",x:"313",y:"285"}),ma=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.08",height:"4",width:"2",x:"314",y:"279"}),ga=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.04",height:"1",width:"2",x:"314",y:"279"}),ds=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.08",height:"4",width:"2",x:"318",y:"279"}),va=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.04",height:"1",width:"2",x:"318",y:"279"}),ya=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.08",height:"2",width:"8",x:"514",y:"321"}),So=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.04",height:"1",width:"8",x:"514",y:"321"}),Mo=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.08",height:"2",width:"8",x:"514",y:"331"}),xa=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.04",height:"1",width:"8",x:"514",y:"331"}),xr=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.08",height:"4",width:"2",x:"51
95",y:"325"}),ps=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.04",height:"1",width:"2",x:"515",y:"325"}),Lr=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.08",height:"4",width:"2",x:"519",y:"325"}),_a=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.04",height:"1",width:"2",x:"519",y:"325"}),ba=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.08",height:"2",width:"8",x:"530",y:"321"}),ms=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.04",height:"1",width:"8",x:"530",y:"321"}),Sa=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.08",height:"2",width:"8",x:"530",y:"331"}),Ma=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.04",height:"1",width:"8",x:"530",y:"331"}),Gi=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.08",height:"4",width:"2",x:"531",y:"325"}),Dr=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.04",height:"1",width:"2",x:"531",y:"325"}),wa=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.08",height:"4",width:"2",x:"535",y:"325"}),gs=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.04",height:"1",width:"2",x:"535",y:"325"}),Ea=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.08",height:"2",width:"8",x:"514",y:"341"}),Ta=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.04",height:"1",width:"8",x:"514",y:"341"}),wo=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.08",height:"2",width:"8",x:"514",y:"351"}),fn=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.04",height:"1",width:"8",x:"514",y:"351"}),Ca=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.08",height:"4",width:"2",x:"515",y:"345"}),Aa=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.04",height:"1",width:"2",x:"515",y:"345"}),Ra=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.08",height:"4",width:"2",x:"519",y:"345"}),Ia=(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.04",height:"1",width:"2",x:"519",y:"345"}),_r=(0,x.jsx)("path",{d:"M724.25 98.25H529.25V20",stroke:"white",strokeOpacity:"0.06",strokeWidth:"0.5"}),t[106]=L,t[107]=$,t[108]=ne,t[109]=Q,t[110]=Z,t[111]=Te,t[112]=Me,t[113]=Ve,t[114]=Ge,t[115]=ot,t[116]=yt,t[117]=St,t[118]=it,t[119]=Bt,t[120]=jt,t[121]=Mt,t[122]=st,t[123]=nn,t[124]=He,t[125]=gn,t[126]=Pt,t[127]=Kt,t[128]=_n,t[129]=zn,t[130]=ri,t[131]=zt,t[132]=Xt,t[133]=Yn,t[134]=Ft,t[135]=Ei,t[136]=pi,t[137]=Qi,t[138]=$s,t[139]=xo,t[140]=Zs,t[141]=Js,t[142]=Ks,t[143]=cs,t[144]=Qs,t[145]=ea,t[146]=ta,t[147]=na,t[148]=ia,t[149]=_o,t[150]=ra,t[151]=er,t[152]=sa,t[153]=Pr,t[154]=Nr,t[155]=aa,t[156]=us,t[157]=bo,t[158]=oa,t[159]=la,t[160]=ca,t[161]=ua,t[162]=ha,t[163]=hs,t[164]=fa,t[165]=da,t[166]=fs,t[167]=pa,t[168]=ma,t[169]=ga,t[170]=ds,t[171]=va,t[172]=ya,t[173]=So,t[174]=Mo,t[175]=xa,t[176]=xr,t[177]=ps,t[178]=Lr,t[179]=_a,t[180]=ba,t[181]=ms,t[182]=Sa,t[183]=Ma,t[184]=Gi,t[185]=Dr,t[186]=wa,t[187]=gs,t[188]=Ea,t[189]=Ta,t[190]=wo,t[191]=fn,t[192]=Ca,t[193]=Aa,t[194]=Ra,t[195]=Ia,t[196]=_r):(L=t[106],$=t[107],ne=t[108],Q=t[109],Z=t[110],Te=t[111],Me=t[112],Ve=t[113],Ge=t[114],ot=t[115],yt=t[116],St=t[117],it=t[118],Bt=t[119],jt=t[120],Mt=t[121],st=t[122],nn=t[123],He=t[124],gn=t[125],Pt=t[126],Kt=t[127],_n=t[128],zn=t[129],ri=t[130],zt=t[131],Xt=t[132],Yn=t[133],Ft=t[134],Ei=t[135],pi=t[136],Qi=t[137],$s=t[138],xo=t[139],Zs=t[140],Js=t[141],Ks=t[142],cs=t[143],Qs=t[144],ea=t[145],ta=t[146],na=t[147],ia=t[148],_o=t[149],ra=t[150],er=t[151],sa=t[152],Pr=t[153],Nr=t[154],aa=t[155],us=t[156],bo=t[157],oa=t[158],la=t[159],ca=t[160],ua=t[161],ha=t[162],hs=t[163],fa=t[164],da=t[165],fs=t[166],pa=t[167],ma=t[168],ga=t[169],ds=t[170],va=t[171],ya=t[172],So=t[173],Mo=t[174],xa=t[175],xr=t[176],ps=t[177],Lr=t[178],_a=t[179],ba=t[180],ms=t[181],Sa=t[182],Ma=t[183],Gi=t[184],Dr=t[185],wa=t[186],gs=t[187],Ea=t[188],Ta=t[189],wo=t[190],fn=t[191],Ca=t[192],Aa=t[193],Ra=t[194],Ia=t[195],_r=t[196]);let Pa;t[197]===Symbol.for("react.memo_cache_sentinel")?(Pa=(0,x.jsxs)("g",{opacity:"0.5",children:[L,$,ne,Q,Z,Te,Me,Ve,Ge,ot,yt,St,it,Bt,jt,Mt,st,nn,He,gn,Pt,Kt,_n,zn,ri,zt,Xt,Yn,Ft,Ei,pi,Qi,$s,xo,Zs,Js,Ks,cs,Qs,ea,ta,na,ia,_o,ra,er,sa,Pr,Nr,aa,us,bo,oa,la,ca,ua,ha,hs,fa,da,fs,pa,ma,ga,ds,va,ya,So,Mo,xa,xr,ps,Lr,_a,ba,ms,Sa,Ma,Gi,Dr,wa,gs,Ea,Ta,wo,fn,Ca,Aa,Ra,Ia,_r,(0,x.jsxs)("g",{clipPath:"url(#clip1_825_2625)",children:[(0,x.jsx)("path",{d:"M536 386C541.333 380.667 644.889 277.111 696 226",stroke:"white",strokeOpacity:"0.1",strokeWidth:"0.3"}),(0,x.jsx)("path",{d:"M544 386C549.333 380.667 652.889 277.111 704 226",stroke:"white",strokeOpacity:"0.1",strokeWidth:"0.3"}),(0,x.jsx)("path",{d:"M552 386C557.333 380.667 660.889 277.111 712 226",stroke:"white",strokeOpacity:"0.1",strokeWidth:"0.3"}),(0,x.jsx)("path",{d:"M560 386C565.333 380.667 668.889 277.111 720 226",stroke:"white",strokeOpacity:"0.1",strokeWidth:"0.3"}),(0,x.jsx)("path",{d:"M568 386C573.333 380.667 676.889 277.111 728 226",stroke:"white",strokeOpacity:"0.1",strokeWidth:"0.3"}),(0,x.jsx)("path",{d:"M576 386C581.333 380.667 684.889 277.111 736 226",stroke:"white",strokeOpacity:"0.1",strokeWidth:"0.3"}),(0,x.jsx)("path",{d:"M584 386C589.333 380.667 692.889 277.111 744 226",stroke:"white",strokeOpacity:"0.1",strokeWidth:"0.3"}),(0,x.jsx)("path",{d:"M592 386C597.333 380.667 700.889 277.111 752 226",stroke:"white",strokeOpacity:"0.1",strokeWidth:"0.3"}),(0,x.jsx)("path",{d:"M600 386C605.333 380.667 708.889 277.111 760 226",stroke:"white",strokeOpacity:"0.1",strokeWidth:"0.3"}),(0,x.jsx)("path",{d:"M608 386C613.333 380.667 716.889 277.111 768 226",stroke:"white",strokeOpacity:"0.1",strokeWidth:"0.3"}),(0,x.jsx)("path",{d:"M616 386C621.333 380.667 724.889 277.111 776 226",stroke:"white",strokeOpacity:"0.1",strokeWidth:"0.3"}),(0,x.jsx)("path",{d:"M624 386C629.333 380.667 732.889 277.111 784 226",stroke:"white",strokeOpacity:"0.1",strokeWidth:"0.3"}),(0,x.jsx)("path",{d:"M632 386C637.333 380.667 740.889 277.111 792 226",stroke:"white",strokeOpacity:"0.1",strokeWidth:"0.3"}),(0,x.jsx)("path",{d:"M640 386C645.333 380.667 748.889 277.111 800 226",stroke:"white",strokeOpacity:"0.1",strokeWidth:"0.3"})]}),(0,x.jsx)("path",{d:"M848 299.25H281.604C277.69 299.25 275.734 299.25 273.892 298.808C272.26 298.416 270.699 297.77 269.267 296.892C267.653 295.903 266.269 294.519 263.502 291.752L18 46.25",stroke:"white",strokeOpacity:"0.08",strokeWidth:"0.5"}),(0,x.jsx)("path",{d:"M729 199.25H620.604C616.69 199.25 614.734 199.25 612.892 199.692C611.26 200.084 609.699 200.73 608.267 201.608C606.653 202.597 605.269 203.981 602.502 206.748L510 299.25",stroke:"white",strokeOpacity:"0.08",strokeWidth:"0.5"}),(0,x.jsx)("path",{d:"M848 384.25H511.604C507.69 384.25 505.734 384.25 503.892 383.808C502.26 383.416 500.699 382.77 499.267 381.892C497.653 380.903 496.269 379.519 493.502 376.752L416 299.25",stroke:"white",strokeOpacity:"0.08",strokeWidth:"0.5"}),(0,x.jsx)("path",{d:"M299.25 299V245.25H459.25V299",stroke:"white",strokeOpacity:"0.08",strokeWidth:"0.5"}),(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.08",height:"2",width:"2",x:"437",y:"260"}),(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.08",height:"2",width:"2",x:"443",y:"260"}),(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.08",height:"2",width:"2",x:"437",y:"266"}),(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.08",height:"2",width:"2",x:"443",y:"266"}),(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.08",height:"2",width:"2",x:"437",y:"272"}),(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.08",height:"2",width:"2",x:"443",y:"272"}),(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.08",height:"2",width:"2",x:"437",y:"278"}),(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.08",height:"2",width:"2",x:"443",y:"278"}),(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.08",height:"2",width:"2",x:"437",y:"284"}),(0,x.jsx)("rect",{fill:"white",fillOpacity:"0.08",height:"2",width:"2",x:"443",y:"284"})]}),t[197]=Pa):Pa=t[197];let Ur;t[198]===Symbol.for("react.memo_cache_sentinel")?(Ur=(0,x.jsx)("clipPath",{id:"clip0_825_2625",children:(0,x.jsx)("rect",{fill:"white",height:"77",transform:"translate(610 303)",width:"40"})}),t[198]=Ur):Ur=t[198];let Na;t[199]===Symbol.for("react.memo_cache_sentinel")?(Na=(0,x.jsxs)("defs",{children:[Ur,(0,x.jsx)("clipPath",{id:"clip1_825_2625",children:(0,x.jsx)("rect",{fill:"white",height:"77",transform:"translate(610 303)",width:"40"})})]}),t[199]=Na):Na=t[199];let Eo;return t[200]!==n?(Eo=(0,x.jsxs)("svg",{className:n,fill:"none",height:"541",viewBox:"0 0 660 541",width:"660",xmlns:"http://www.w3.org/2000/svg",children:[i,b,R,ce,Ze,z,X,ve,ki,r,o,l,u,h,f,p,g,m,v,w,S,_,C,A,E,P,N,O,T,B,F,j,H,Y,q,te,J,he,ue,me,_e,ht,tt,re,ge,Ie,Ce,We,et,ct,oe,Se,Ae,De,Le,Ye,Je,lt,ut,vt,bt,xt,U,I,G,ee,fe,we,Ne,Ee,ze,qe,xe,Ke,nt,ft,Rt,W,le,Be,je,pe,Oe,at,sn,Lt,xn,Bn,Ji,Bi,di,Ki,ii,wi,gr,Rr,Ir,vr,yr,mr,zi,jn,Vi,Xn,qn,ni,Pa,Na]}),t[200]=n,t[201]=Eo):Eo=t[201],Eo},oS=()=>{const e=(0,$t.c)(7);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,x.jsx)(vp,{bgColor:"bg-black",fillColor:"fill-black",position:"top"}),e[0]=t):t=e[0];let n,i,r,o,l;e[1]===Symbol.for("react.memo_cache_sentinel")?(n={opacity:0}
9,i={duration:1,ease:"easeInOut"},r={amount:.5,once:!0},o={opacity:1},l=(0,x.jsx)("img",{alt:"GitHub logo",className:"w-[600px] dark:block",src:iS}),e[1]=n,e[2]=i,e[3]=r,e[4]=o,e[5]=l):(n=e[1],i=e[2],r=e[3],o=e[4],l=e[5]);let u;return e[6]===Symbol.for("react.memo_cache_sentinel")?(u=(0,x.jsxs)("div",{className:"relative bg-black",children:[t,(0,x.jsx)("div",{className:"relative z-10 mx-auto flex flex-col items-center justify-center overflow-hidden py-20 md:px-8",children:(0,x.jsx)("div",{className:"relative flex items-center justify-center",children:(0,x.jsxs)(on.div,{initial:n,transition:i,viewport:r,whileInView:o,children:[l,(0,x.jsx)("div",{className:"absolute top-[150px] left-[-50px] -z-50 lg:top-[400px] lg:left-[150px] lg:h-[400px] lg:w-[1000px]",children:(0,x.jsx)(aS,{className:"flex"})})]})})}),(0,x.jsx)(Cv,{}),(0,x.jsx)(vp,{bgColor:"bg-black",fillColor:"fill-black",position:"bottom"})]}),e[6]=u):u=e[6],u},so="all",Ch=500,Ah=250,Av=10,bp=40,Rv=Ah-Av-bp,lS=[.25,.5,.75],cS=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],uS=e=>{const[t,n]=e.split("-");return`${cS[Number(n)-1]} ${t}`},hS=e=>{const t=(0,$t.c)(34),{data:n}=e;if(n.length===0)return null;let i;t[0]!==n?(i=Math.max(...n.map(vS),1),t[0]=n,t[1]=i):i=t[1];const r=i;let o,l;if(t[2]!==n||t[3]!==r){let R;t[6]!==n.length||t[7]!==r?(R=(B,F)=>({x:F/(n.length-1)*Ch,y:210-B.downloads/r*Rv}),t[6]=n.length,t[7]=r,t[8]=R):R=t[8],o=n.map(R),l=o.map(yS).join(" "),t[2]=n,t[3]=r,t[4]=o,t[5]=l}else o=t[4],l=t[5];const u=l,h=`${u} L ${Ch} ${Ah-bp} L 0 ${Ah-bp} Z`,f=n[0]?.month??"",p=o[o.length-1];let g;t[9]===Symbol.for("react.memo_cache_sentinel")?(g={opacity:1},t[9]=g):g=t[9];let m,v;t[10]===Symbol.for("react.memo_cache_sentinel")?(m={opacity:0}
9,v={duration:1.5},t[10]=m,t[11]=v):(m=t[10],v=t[11]);let b,w;t[12]===Symbol.for("react.memo_cache_sentinel")?(b=(0,x.jsx)("defs",{children:(0,x.jsxs)("linearGradient",{id:"chart-gradient",x1:"0",x2:"0",y1:"0",y2:"1",children:[(0,x.jsx)("stop",{offset:"0%",stopColor:"hsl(258 80% 55%)",stopOpacity:"0.15"}),(0,x.jsx)("stop",{offset:"100%",stopColor:"hsl(258 80% 55%)",stopOpacity:"0"})]})}),w=lS.map(xS),t[12]=b,t[13]=w):(b=t[12],w=t[13]);let S;t[14]!==h?(S=(0,x.jsx)("path",{d:h,fill:"url(#chart-gradient)"}),t[14]=h,t[15]=S):S=t[15];let _;t[16]!==u?(_=(0,x.jsx)("path",{d:u,fill:"none",stroke:"hsl(258 80% 55%)",strokeWidth:"2",vectorEffect:"non-scaling-stroke"}),t[16]=u,t[17]=_):_=t[17];let C;t[18]!==p?(C=p&&(0,x.jsx)("circle",{className:"animate-pulse",cx:p.x,cy:p.y,fill:"hsl(258 80% 55%)",r:"4"}),t[18]=p,t[19]=C):C=t[19];let A;t[20]!==C||t[21]!==S||t[22]!==_?(A=(0,x.jsx)(on.div,{animate:g,className:"absolute inset-0 h-full w-full",initial:m,transition:v,children:(0,x.jsxs)("svg",{className:"h-full w-full",preserveAspectRatio:"none",viewBox:`0 0 ${Ch} ${Ah}`,children:[b,w,S,_,C]})}),t[20]=C,t[21]=S,t[22]=_,t[23]=A):A=t[23];let E;t[24]!==f?(E=uS(f),t[24]=f,t[25]=E):E=t[25];let P;t[26]!==E?(P=(0,x.jsx)("span",{className:"font-mono text-sm text-gray-400",children:E}),t[26]=E,t[27]=P):P=t[27];let N;t[28]===Symbol.for("react.memo_cache_sentinel")?(N=(0,x.jsx)("span",{className:"font-mono text-sm text-gray-400",children:"Today"}),t[28]=N):N=t[28];let O;t[29]!==P?(O=(0,x.jsxs)("div",{className:"absolute right-6 bottom-3 left-6 flex justify-between md:right-10 md:left-10",children:[P,N]}),t[29]=P,t[30]=O):O=t[30];let T;return t[31]!==A||t[32]!==O?(T=(0,x.jsxs)("div",{className:"relative h-full w-full",children:[A,O]}),t[31]=A,t[32]=O,t[33]=T):T=t[33],T},fS=e=>{const t=(0,$t.c)(18),{onChange:n,packages:i,value:r}=e,[o,l]=(0,de.useState)(!1),u=(0,de.useRef)(null);let h,f;t[0]===Symbol.for("react.memo_cache_sentinel")?(h=()=>{const _=C=>{u.current&&!u.current.contains(C.target)&&l(!1)};return document.addEventListener("mousedown",_),()=>{document.removeEventListener("mousedown",_)}},f=[],t[0]=h,t[1]=f):(h=t[0],f=t[1]),(0,de.useEffect)(h,f);const p=r===so?"All Packages":`@visulima/${r}`;let g;t[2]!==o?(g=()=>{l(!o)},t[2]=o,t[3]=g):g=t[3];const m=`h-4 w-4 text-gray-500 transition-transform ${o?"rotate-180":""}`;let v;t[4]!==m?(v=(0,x.jsx)(Tv,{className:m}),t[4]=m,t[5]=v):v=t[5];let b;t[6]!==p||t[7]!==g||t[8]!==v?(b=(0,x.jsxs)("button",{className:"inline-flex items-center gap-2 border border-gray-200 bg-white px-4 py-2 text-sm font-medium text-gray-900 shadow-sm transition-colors hover:bg-gray-50",onClick:g,type:"button",children:[p,v]}),t[6]=p,t[7]=g,t[8]=v,t[9]=b):b=t[9];let w;t[10]!==n||t[11]!==o||t[12]!==i||t[13]!==r?(w=o&&(0,x.jsxs)("div",{className:"absolute left-0 z-50 mt-2 max-h-64 w-56 overflow-y-auto border border-gray-200 bg-white py-1 shadow-lg",children:[(0,x.jsx)("button",{className:`block w-full px-4 py-2 text-left text-sm transition-colors hover:bg-gray-50 ${r===so?"font-medium text-gray-900":"text-gray-600"}`,onClick:()=>{n(so),l(!1)},type:"button",children:"All Packages"}),i.map(_=>(0,x.jsxs)("button",{className:`block w-full px-4 py-2 text-left text-sm transition-colors hover:bg-gray-50 ${r===_?"font-medium text-gray-900":"text-gray-600"}`,onClick:()=>{n(_),l(!1)},type:"button",children:["@visulima/",_]},_))]}),t[10]=n,t[11]=o,t[12]=i,t[13]=r,t[14]=w):w=t[14];let S;return t[15]!==b||t[16]!==w?(S=(0,x.jsxs)("div",{className:"relative inline-block",ref:u,children:[b,w]}),t[15]=b,t[16]=w,t[17]=S):S=t[17],S},dS={contributors:0,monthlyChart:{},stars:0,totalDownloads:{},weeklyDownloads:{}},pS=()=>{const e=(0,$t.c)(3),[t,n]=(0,de.useState)(dS);let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=async()=>{try{const u=await xb();n(u)}catch{}},e[0]=i):i=e[0];const r=i;let o,l;return e[1]===Symbol.for("react.memo_cache_sentinel")?(o=()=>{r()},l=[r],e[1]=o,e[2]=l):(o=e[1],l=e[2]),(0,de.useEffect)(o,l),t},C1=e=>{let t=0;for(const n of Object.values(e))t+=n;return t},mS=e=>{const t={};for(const n of Object.values(e))for(const i of n)t[i.month]||(t[i.month]=0),t[i.month]+=i.downloads;return Object.keys(t).toSorted().map(n=>({downloads:t[n],month:n}))},gS=()=>{const e=(0,$t.c)(49),t=pS(),[n,i]=(0,de.useState)(so);let r;e[0]!==t.totalDownloads?(r=Object.keys(t.totalDownloads).toSorted(),e[0]=t.totalDownloads,e[1]=r):r=e[1];const o=r;let l;e:{if(n===so){let te;e[2]!==t.monthlyChart?(te=mS(t.monthlyChart),e[2]=t.monthlyChart,e[3]=te):te=e[3],l=te;break e}let q;e[4]!==n||e[5]!==t.monthlyChart?(q=t.monthlyChart[n]??[],e[4]=n,e[5]=t.monthlyChart,e[6]=q):q=e[6],l=q}const u=l;let h;e:{if(n===so){let q;e[7]!==t.totalDownloads?(q=C1(t.totalDownloads),e[7]=t.totalDownloads,e[8]=q):q=e[8],h=q;break e}h=t.totalDownloads[n]??0}const f=h;let p;e:{if(n===so){let q;e[9]!==t.weeklyDownloads?(q=C1(t.weeklyDownloads),e[9]=t.weeklyDownloads,e[10]=q):q=e[10],p=q;break e}p=t.weeklyDownloads[n]??0}const g=p;let m;e[11]===Symbol.for("react.memo_cache_sentinel")?(m={root:"pb-0"},e[11]=m):m=e[11];let v;e[12]===Symbol.for("react.memo_cache_sentinel")?(v=(0,x.jsx)("div",{className:"col-span-full",children:(0,x.jsx)("h3",{className:"max-w-lg text-balance text-2xl font-bold tracking-tight text-gray-900 lg:text-3xl",children:"Trusted by developers worldwide"})}),e[12]=v):v=e[12];let b;e[13]===Symbol.for("react.memo_cache_sentinel")?(b=(0,x.jsx)("span",{className:"flex items-center gap-2 text-sm text-gray-500",children:"Total downloads"}),e[13]=b):b=e[13];let w;e[14]!==f?(w=(0,x.jsxs)("div",{className:"flex flex-col justify-between gap-6 p-6 md:p-10",children:[b,(0,x.jsx)(Lu,{className:"text-5xl font-bold tracking-tight text-gray-900 lg:text-6xl",suffix:"+",value:f})]}),e[14]=f,e[15]=w):w=e[15];let S;e[16]!==o||e[17]!==n?(S=(0,x.jsx)("div",{className:"absolute top-4 left-6 z-20 md:left-10",children:(0,x.jsx)(fS,{onChange:i,packages:o,value:n})}),e[16]=o,e[17]=n,e[18]=S):S=e[18];let _;e[19]!==u?(_=(0,x.jsx)("div",{className:"relative flex-1",children:(0,x.jsx)(hS,{data:u})}),e[19]=u,e[20]=_):_=e[20];let C;e[21]!==S||e[22]!==_?(C=(0,x.jsxs)("div",{className:"relative flex flex-col aspect-[5/3]",children:[S,_]}),e[21]=S,e[22]=_,e[23]=C):C=e[23];let A;e[24]!==C||e[25]!==w?(A=(0,x.jsx)("div",{className:"col-span-full mt-10 border-t border-gray-200",children:(0,x.jsxs)("div",{className:"grid grid-cols-1 divide-y divide-gray-200 md:grid-cols-2 md:divide-x md:divide-y-0",children:[w,C]})}),e[24]=C,e[25]=w,e[26]=A):A=e[26];let E;e[27]!==g?(E=(0,x.jsx)(Lu,{className:"text-4xl font-bold tracking-tight text-gray-900",suffix:"+",value:g}),e[27]=g,e[28]=E):E=e[28];let P;e[29]===Symbol.for("react.memo_cache_sentinel")?(P=(0,x.jsx)("span",{className:"text-sm text-gray-500",children:"Weekly NPM downloads"}),e[29]=P):P=e[29];let N;
9e[30]!==E?(N=(0,x.jsxs)("div",{className:"col-span-2 flex flex-col gap-2 p-6 md:p-10",children:[E,P]}),e[30]=E,e[31]=N):N=e[31];let O;e[32]!==t.stars?(O=(0,x.jsx)(Lu,{className:"text-4xl font-bold tracking-tight text-gray-900",suffix:"+",value:t.stars}),e[32]=t.stars,e[33]=O):O=e[33];let T;e[34]===Symbol.for("react.memo_cache_sentinel")?(T=(0,x.jsx)("span",{className:"text-sm text-gray-500",children:"GitHub Stars"}),e[34]=T):T=e[34];let R;e[35]!==O?(R=(0,x.jsxs)("div",{className:"flex flex-col gap-2 p-6 md:p-10",children:[O,T]}),e[35]=O,e[36]=R):R=e[36];let B;e[37]!==t.contributors?(B=(0,x.jsx)(Lu,{className:"text-4xl font-bold tracking-tight text-gray-900",suffix:"+",value:t.contributors}),e[37]=t.contributors,e[38]=B):B=e[38];let F;e[39]===Symbol.for("react.memo_cache_sentinel")?(F=(0,x.jsx)("span",{className:"text-sm text-gray-500",children:"Contributors"}),e[39]=F):F=e[39];let j;e[40]!==B?(j=(0,x.jsxs)("div",{className:"flex flex-col gap-2 p-6 md:p-10",children:[B,F]}),e[40]=B,e[41]=j):j=e[41];let H;e[42]!==N||e[43]!==R||e[44]!==j?(H=(0,x.jsx)("div",{className:"col-span-full border-t border-b border-gray-200",children:(0,x.jsxs)("div",{className:"grid grid-cols-1 divide-y divide-gray-200 md:grid-cols-4 md:divide-x md:divide-y-0",children:[N,R,j]})}),e[42]=N,e[43]=R,e[44]=j,e[45]=H):H=e[45];let Y;return e[46]!==A||e[47]!==H?(Y=(0,x.jsxs)(hr,{classes:m,gridLength:2,mode:"light",children:[v,A,H]}),e[46]=A,e[47]=H,e[48]=Y):Y=e[48],Y};function vS(e){return e.downloads}function yS(e,t){return`${t===0?"M":"L"} ${e.x} ${e.y}`}function xS(e){const t=Av+Rv*(1-e);return(0,x.jsx)("line",{stroke:"rgba(0,0,0,0.04)",strokeDasharray:"4 4",x1:"0",x2:Ch,y1:t,y2:t},e)}var A1=[{answer:"Visulima is a collection of 40+ production-ready, MIT-licensed TypeScript packages for Node.js, Bun, Deno, and edge runtimes. It provides tools for bundling, logging, CLI development, file system operations, error handling, API building, and more.",question:"What is Visulima?"},{answer:"Yes. Every Visulima package is released under the MIT license, making it free to use in personal, commercial, and open-source projects without restrictions.",question:"Is Visulima free to use?"},{answer:"Visulima packages are designed for cross-runtime compatibility. They work with Node.js, Bun, Deno, and edge runtimes like Cloudflare Workers and Vercel Edge Functions.",question:"What runtimes does Visulima support?"},{answer:"All Visulima packages are written in TypeScript with full type safety. You get complete type definitions, IntelliSense support, and compile-time type checking out of the box.",question:"Does Visulima support TypeScript?"},{answer:"Visulima is designed for incremental adoption. You can install and use any individual package without depending on the rest of the ecosystem. Each package has zero or minimal dependencies.",question:"Can I use just one package without installing everything?"},{answer:"Packem is Visulima's fast, modern bundler for Node.js and TypeScript. It supports tree shaking for ESM and CJS, multiple transformers (esbuild, swc, oxc, sucrase), library and application bundling, and TypeScript declarations.",question:"What is Packem?"},{answer:"Pail is Visulima's highly configurable logger for Node.js, edge, and browser environments. It supports pretty and JSON output, built-in timers and stack traces, spam prevention, and cross-platform compatibility.",question:"What is Pail?"},{answer:"Visulima is maintained in a single monorepo on GitHub. You can contribute by opening issues, submitting pull requests, or joining the community on Discord. All packages are well-tested with comprehensive CI/CD pipelines.",question:"How is Visulima maintained?"}],_S=e=>{const t=(0,$t.c)(20),{answer:n,isOpen:i,onToggle:r,question:o}=e;let l;t[0]!==o?(l=(0,x.jsx)("h3",{className:"text-base font-medium text-white/80",children:o}),t[0]=o,t[1]=l):l=t[1];const u=i&&"rotate-180";let h;t[2]!==u?(h=fr("h-5 w-5 shrink-0 text-white/30 transition-transform duration-200",u),t[2]=u,t[3]=h):h=t[3];let f;t[4]!==h?(f=(0,x.jsx)(Tv,{className:h}),t[4]=h,t[5]=f):f=t[5];let p;t[6]!==r||t[7]!==l||t[8]!==f?(p=(0,x.jsxs)("button",{className:"flex w-full items-center justify-between py-6 text-left cursor-pointer",onClick:r,type:"button",children:[l,f]}),t[6]=r,t[7]=l,t[8]=f,t[9]=p):p=t[9];const g=i?"grid-rows-[1fr] pb-6":"grid-rows-[0fr]";let m;t[10]!==g?(m=fr("grid transition-all duration-200",g),t[10]=g,t[11]=m):m=t[11];let v;t[12]!==n?(v=(0,x.jsx)("div",{className:"overflow-hidden",children:(0,x.jsx)("p",{className:"text-sm leading-relaxed text-white/50",children:n})}),t[12]=n,t[13]=v):v=t[13];let b;t[14]!==m||t[15]!==v?(b=(0,x.jsx)("div",{className:m,children:v}),t[14]=m,t[15]=v,t[16]=b):b=t[16];let w;return t[17]!==p||t[18]!==b?(w=(0,x.jsxs)("div",{className:"border-b border-white/[0.06] bg-coal",children:[p,b]}),t[17]=p,t[18]=b,t[19]=w):w=t[19],w},bS=()=>{const e=(0,$t.c)(7),[t,n]=(0,de.useState)(null);let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i={"@type":"FAQPage",mainEntity:A1.map(SS)},e[0]=i):i=e[0];const r=i;let o;e[1]===Symbol.for("react.memo_cache_sentinel")?(o=(0,x.jsx)(_b,{data:r}),e[1]=o):o=e[1];let l;e[2]===Symbol.for("react.memo_cache_sentinel")?(l=(0,x.jsx)(El,{classes:{root:"col-span-2 lg:col-span-4"},description:"Common questions about the Visulima ecosystem.",mode:"dark",position:"left",title:"Frequently Asked Questions"}),e[2]=l):l=e[2];let u;e[3]!==t?(u=A1.map((f,p)=>(0,x.jsx)(_S,{answer:f.answer,isOpen:t===p,onToggle:()=>{n(t===p?null:p)},question:f.question},f.question)),e[3]=t,e[4]=u):u=e[4];let h;return e[5]!==u?(h=(0,x.jsxs)("div",{className:"bg-coal border-t border-white/[0.06]",children:[o,(0,x.jsxs)(hr,{mode:"dark",patternColor:"royal-amethyst",patternPosition:"bottom",children:[l,(0,x.jsx)("div",{className:"col-span-2 lg:col-span-4 border-t mt
9-8",children:u})]})]}),e[5]=u,e[6]=h):h=e[6],h};function SS(e){return{"@type":"Question",acceptedAnswer:{"@type":"Answer",text:e.answer},name:e.question}}var MS="/assets/background_hero-CkLD-8gl.jpeg",wS=({className:e,duration:t=2500,framerProps:n={animate:{opacity:1,y:0},exit:{opacity:0,y:50},initial:{opacity:0,y:-50},transition:{duration:.25,ease:"easeOut"}},words:i})=>{const[r,o]=(0,de.useState)(0);return(0,de.useEffect)(()=>{const l=setInterval(()=>{o(u=>(u+1)%i.length)},t);return()=>{clearInterval(l)}},[i,t]),(0,x.jsx)("div",{className:"overflow-hidden py-2",children:(0,x.jsx)(uo,{mode:"wait",children:(0,x.jsx)(on.h1,{className:fr(e),...n,children:i[r]},i[r])})})},vd=[{code:['import { createPail } from "@visulima/pail";',"","const logger = createPail({",'  scope: "api",',"  throttle: 200,","});","",'logger.info("Server started on :3000");'],label:"pail",output:[{delay:80,text:""},{color:"text-emerald-400/80",delay:200,text:"  ● info  Server started on :3000"},{color:"text-emerald-400/80",delay:300,text:"  ● info  Database connected"},{color:"text-yellow-400/70",delay:400,text:"  ● warn  Rate limiter active (200ms)"},{color:"text-emerald-400/80",delay:200,text:"  ● info  Ready for connections"}],pkg:"@visulima/pail"},{code:['import { readJsonSync } from "@visulima/fs";','import { join } from "@visulima/path";',"","const config = readJsonSync(",'  join(root, "config.json"),',");","","console.log(config);"],label:"fs",output:[{delay:80,text:""},{color:"text-white/45",delay:200,text:"  {"},{color:"text-white/45",delay:100,text:'    name: "my-app",'},{color:"text-white/45",delay:100,text:'    version: "1.0.0",'},{color:"text-white/45",delay:100,text:"    port: 3000,"},{color:"text-white/45",delay:100,text:"  }"}],pkg:"@visulima/fs"},{code:['import { redact } from "@visulima/redact";',"","const safe = redact(userData, [",'  "password",','  "ssn",','  "token",',"]);","console.log(safe);"],label:"redact",output:[{delay:80,text:""},{color:"text-white/45",delay:150,text:"  {"},{color:"text-white/45",delay:100,text:'    name: "Alice",'},{color:"text-emerald-400/80",delay:100,text:'    password: "[REDACTED]",'},{color:"text-emerald-400/80",delay:100,text:'    ssn: "[REDACTED]",'},{color:"text-white/45",delay:100,text:'    email: "[email protected]"'},{color:"text-white/45",delay:100,text:"  }"}],pkg:"@visulima/redact"},{code:["import { isDisposableEmail }",'  from "@visulima/disposable-email-domains";',"",'const a = isDisposableEmail("[email protected]");','const b = isDisposableEmail("[email protected]");',"","console.log(a, b);"],label:"email",output:[{delay:80,text:""},{color:"text-crimson-energy/80",delay:200,text:"  true   ← mailinator.com (disposable)"},{color:"text-emerald-400/80",delay:200,text:"  false  ← gmail.com (safe)"}],pkg:"@visulima/disposable-email-domains"}],ES=e=>{const t=(0,$t.c)(6),{content:n}=e;if(!n.trim()){let o;return t[0]===Symbol.for("react.memo_cache_sentinel")?(o=(0,x.jsx)("span",{children:" "}),t[0]=o):o=t[0],o}let i;if(t[1]!==n){let o;t[3]===Symbol.for("react.memo_cache_sentinel")?(o=/(\s+)/,t[3]=o):o=t[3],i=n.split(o).map(RS),t[1]=n,t[2]=i}else i=t[2];let r;return t[4]!==i?(r=(0,x.jsx)("span",{children:i}),t[4]=i,t[5]=r):r=t[5],r},TS=()=>{const e=(0,$t.c)(56),[t,n]=(0,de.useState)(0),[i,r]=(0,de.useState)(0);let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=[],e[0]=o):o=e[0];const l=(0,de.useRef)(o),u=vd[t];let h;e[1]===Symbol.for("react.memo_cache_sentinel")?(h=()=>{l.current.forEach(clearTimeout),l.current=[]},e[1]=h):h=e[1];const f=h;let p;e[2]===Symbol.for("react.memo_cache_sentinel")?(p=ge=>{f(),r(0);const Ie=vd[ge];if(!Ie)return;const Ce=et=>{if(et<=Ie.output.length&&(r(et),et<Ie.output.length)){const Ze=Ie.output[et].delay??100,ct=setTimeout(()=>{Ce(et+1)},Ze);l.current.push(ct)}},We=setTimeout(()=>{Ce(0)},400);l.current.push(We)},e[2]=p):p=e[2];const g=p;let m,v;e[3]!==t?(m=()=>(g(t),f),v=[t,g,f],e[3]=t,e[4]=m,e[5]=v):(m=e[4],v=e[5]),(0,de.useEffect)(m,v);let b;e[6]===Symbol.for("react.memo_cache_sentinel")?(b={opacity:1,y:0},e[6]=b):b=e[6];let w,S,_;e[7]===Symbol.for("react.memo_cache_sentinel")?(w={opacity:0,y:30},S={backgroundImage:`url(${MS})`},_={delay:1,duration:.8,ease:"easeOut"},e[7]=w,e[8]=S,e[9]=_):(w=e[7],S=e[8],_=e[9]);let C;e[10]===Symbol.for("react.memo_cache_sentinel")?(C={opacity:1,x:0},e[10]=C):C=e[10];let A,E;e[11]===Symbol.for("react.memo_cache_sentinel")?(A={opacity:0,x:-5},E={opacity:0,x:5},e[11]=A,e[12]=E):(A=e[11],E=e[12]);let P;e[13]===Symbol.for("react.memo_cache_sentinel")?(P={duration:.15},e[13]=P):P=e[13];let N;e[14]!==u.pkg?(N=(0,x.jsx)("span",{className:"font-mono text-xs font-medium text-white/40",children:u.pkg}),e[14]=u.pkg,e[15]=N):N=e[15];let O;e[16]!==u.pkg||e[17]!==N?(O=(0,x.jsx)("div",{className:"mb-4 flex items-center justify-between",children:(0,x.jsx)(uo,{mode:"wait",children:(0,x.jsx)(on.div,{animate:C,className:"flex items-center gap-2",exit:A,initial:E,transition:P,children:N},u.pkg)})}),e[16]=u.pkg,e[17]=N,e[18]=O):O=e[18];let T;e[19]===Symbol.for("react.memo_cache_sentinel")?(T={opacity:1},e[19]=T):T=e[19];let R,B;e[20]===Symbol.for("react.memo_cache_sentinel")?(R={opacity:0}
9,B={opacity:0},e[20]=R,e[21]=B):(R=e[20],B=e[21]);let F;e[22]===Symbol.for("react.memo_cache_sentinel")?(F={duration:.12},e[22]=F):F=e[22];let j;e[23]!==u.code?(j=u.code.map(IS),e[23]=u.code,e[24]=j):j=e[24];let H;e[25]!==t||e[26]!==j?(H=(0,x.jsx)(uo,{mode:"wait",children:(0,x.jsx)(on.div,{animate:T,className:"font-mono text-[13px] leading-[1.8]",exit:R,initial:B,transition:F,children:j},t)}),e[25]=t,e[26]=j,e[27]=H):H=e[27];let Y;e[28]!==O||e[29]!==H?(Y=(0,x.jsxs)("div",{className:"px-5 pt-5 pb-4",children:[O,H]}),e[28]=O,e[29]=H,e[30]=Y):Y=e[30];let q;e[31]===Symbol.for("react.memo_cache_sentinel")?(q=(0,x.jsxs)("div",{className:"flex items-center gap-2 px-4 pt-3 pb-1",children:[(0,x.jsx)(Hb,{className:"h-2.5 w-2.5 fill-emerald-400/60 text-emerald-400/60"}),(0,x.jsx)("span",{className:"font-mono text-[10px] font-medium tracking-wider text-emerald-400/40 uppercase",children:"Output"})]}),e[31]=q):q=e[31];let te,J,he;e[32]===Symbol.for("react.memo_cache_sentinel")?(te={opacity:1},J={opacity:0},he={opacity:0},e[32]=te,e[33]=J,e[34]=he):(te=e[32],J=e[33],he=e[34]);let ue;e[35]===Symbol.for("react.memo_cache_sentinel")?(ue={duration:.1},e[35]=ue):ue=e[35];let ce;if(e[36]!==t||e[37]!==u.output||e[38]!==i){let ge;e[40]!==t||e[41]!==i?(ge=(Ie,Ce)=>Ce>=i?null:(0,x.jsx)("div",{children:(0,x.jsx)("span",{className:Ie.color??"text-white/30",children:Ie.text||" "})},`${t}-${Ce}`),e[40]=t,e[41]=i,e[42]=ge):ge=e[42],ce=u.output.map(ge),e[36]=t,e[37]=u.output,e[38]=i,e[39]=ce}else ce=e[39];let me;e[43]!==t||e[44]!==ce?(me=(0,x.jsxs)("div",{className:"mx-3 mb-3 overflow-hidden bg-black/30",children:[q,(0,x.jsx)("div",{className:"min-h-[90px] px-4 pt-1 pb-3 font-mono text-[13px] leading-relaxed",children:(0,x.jsx)(uo,{mode:"wait",children:(0,x.jsx)(on.div,{animate:te,exit:J,initial:he,transition:ue,children:ce},t)})})]}),e[43]=t,e[44]=ce,e[45]=me):me=e[45];let _e;e[46]!==Y||e[47]!==me?(_e=(0,x.jsx)("div",{className:"relative overflow-hidden h-120 bg-[hsl(220_12%_5%)]",children:(0,x.jsxs)("div",{className:"relative",children:[Y,me]})}),e[46]=Y,e[47]=me,e[48]=_e):_e=e[48];let ht;e[49]!==t?(ht=vd.map((ge,Ie)=>(0,x.jsx)("button",{className:fr("px-4 py-1.5 font-mono text-xs transition-all duration-200 cursor-pointer",Ie===t?"bg-white/10 text-white/70":"text-white hover:text-white/80"),onClick:()=>{n(Ie)},type:"button",children:ge.label},ge.label)),e[49]=t,e[50]=ht):ht=e[50];let tt;e[51]!==ht?(tt=(0,x.jsx)("div",{className:"mt-4 flex justify-center",children:(0,x.jsx)("div",{className:"inline-flex items-center gap-1 border border-white/20 bg-white/10 px-1.5 py-1 backdrop-blur-xl",children:ht})}),e[51]=ht,e[52]=tt):tt=e[52];let re;return e[53]!==_e||e[54]!==tt?(re=(0,x.jsxs)(on.div,{animate:b,className:"relative w-full py-5 pl-10",initial:w,style:S,transition:_,children:[_e,tt]}),e[53]=_e,e[54]=tt,e[55]=re):re=e[55],re},R1=[{name:"packem"},{name:"pail"},{name:"cerebro"},{name:"fs"},{name:"path"},{name:"redact"},{name:"colorize"},{name:"boxen"},{name:"fmt"},{name:"deep-clone"},{name:"humanizer"},{name:"error"},{name:"crud"},{name:"inspector"}],CS=()=>{const e=(0,$t.c)(5);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=[...R1,...R1],e[0]=t):t=e[0];const n=t;let i;e[1]===Symbol.for("react.memo_cache_sentinel")?(i={opacity:1},e[1]=i):i=e[1];let r,o;e[2]===Symbol.for("react.memo_cache_sentinel")?(r={opacity:0},o={delay:2.5,duration:1},e[2]=r,e[3]=o):(r=e[2],o=e[3]);let l;return e[4]===Symbol.for("react.memo_cache_sentinel")?(l=(0,x.jsx)(on.div,{animate:i,className:"absolute inset-x-0 bottom-0 z-20 overflow-hidden border-y border-white/[0.04] bg-coal/80 backdrop-blur-sm",initial:r,transition:o,children:(0,x.jsx)("div",{className:"flex animate-scroll-left whitespace-nowrap py-3",children:n.map(PS)})}),e[4]=l):l=e[4],l},AS=()=>{const e=(0,$t.c)(17);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={childrenWrapper:"!grid-cols-1 lg:!grid-cols-2 items-center gap-12 md:gap-0",root:"h-screen"},e[0]=t):t=e[0];let n;e[1]===Symbol.for("react.memo_cache_sentinel")?(n=(0,x.jsx)("p",{className:"sr-only",children:"Visulima is a collection of 40+ production-ready, MIT-licensed TypeScript packages for Node.js, Bun, Deno, and edge runtimes. It includes Packem for bundling, Pail for logging, Cerebro for CLI tools, and utilities for file systems, error handling, APIs, data manipulation, and more."}),e[1]=n):n=e[1];let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i={opacity:1,y:0},e[2]=i):i=e[2];let r;e[3]===Symbol.for("react.memo_cache_sentinel")?(r=(0,x.jsx)(on.div,{animate:i,className:"mb-8 flex items-center gap-5",initial:{opacity:0,y:10},transition:{delay:.3,duration:.5},children:[{label:"Packages",value:"40+"},{label:"License",value:"MIT"},{label:"TypeScript",value:"100%"}].map(NS)}),e[3]=r):r=e[3];let o;e[4]===Symbol.for("react.memo_cache_sentinel")?(o={opacity:1,y:0},e[4]=o):o=e[4];let l,u;e[5]===Symbol.for("react.memo_cache_sentinel")?(l={opacity:0,y:20},u={delay:.5,duration:.7,ease:"easeOut"},e[5]=l,e[6]=u):(l=e[5],u=e[6]);let h;e[7]===Symbol.for("react.memo_cache_sentinel")?(h=(0,x.jsxs)(on.h1,{animate:o,className:"text-4xl font-bold leading-[1.1] tracking-tight text-white sm:text-5xl md:text-6xl lg:text-[4rem]",initial:l,transition:u,children:[(0,x.jsx)("span",{className:"flex items-baseline gap-3",children:(0,x.jsx)(wS,{className:"inline-block bg-gradient-to-r from-sky-sapphire via-royal-amethyst to-crimson-energy bg-clip-text text-transparent",duration:2800,framerProps:{animate:{o
9pacity:1,y:0},exit:{opacity:0,y:-20},initial:{opacity:0,y:20},transition:{duration:.3,ease:"easeOut"}},words:["Bundle.","Log.","Parse.","Build.","Ship."]})}),(0,x.jsx)("span",{className:"mt-1 block text-white/90",children:"One ecosystem,"}),(0,x.jsx)("span",{className:"block text-white/90",children:"zero friction."})]}),e[7]=h):h=e[7];let f;e[8]===Symbol.for("react.memo_cache_sentinel")?(f={opacity:1,y:0},e[8]=f):f=e[8];let p;e[9]===Symbol.for("react.memo_cache_sentinel")?(p=(0,x.jsx)(on.div,{animate:f,className:"mt-8 flex flex-wrap gap-2",initial:{opacity:0,y:10},transition:{delay:.9,duration:.5,ease:"easeOut"},children:["Bundling","Logging","CLI","File System","Error Handling","API","Data Utils","Storage"].map(LS)}),e[9]=p):p=e[9];let g;e[10]===Symbol.for("react.memo_cache_sentinel")?(g={opacity:1,y:0},e[10]=g):g=e[10];let m,v;e[11]===Symbol.for("react.memo_cache_sentinel")?(m={opacity:0,y:15},v={delay:1.2,duration:.6,ease:"easeOut"},e[11]=m,e[12]=v):(m=e[11],v=e[12]);let b,w;e[13]===Symbol.for("react.memo_cache_sentinel")?(b=(0,x.jsx)("span",{children:"Get started"}),w=(0,x.jsx)(Yc,{className:"h-4 w-4 transition-transform duration-300 group-hover:translate-x-1"}),e[13]=b,e[14]=w):(b=e[13],w=e[14]);let S;e[15]===Symbol.for("react.memo_cache_sentinel")?(S=(0,x.jsxs)(Rc,{className:"group relative inline-flex items-center gap-3 overflow-hidden border border-white/[0.15] bg-white px-7 py-3.5 text-sm font-semibold text-coal transition-all duration-300 hover:bg-white/90",to:"/docs/$",children:[b,w,(0,x.jsx)("span",{"aria-hidden":"true",className:"pointer-events-none absolute inset-0 opacity-0 transition-opacity duration-300 group-hover:opacity-100",style:{background:"linear-gradient(135deg, transparent 40%, hsla(210,100%,45%,0.08), hsla(282,44%,47%,0.08))"}})]}),e[15]=S):S=e[15];let _;return e[16]===Symbol.for("react.memo_cache_sentinel")?(_=(0,x.jsxs)("div",{className:"relative bg-background",children:[(0,x.jsxs)(hr,{classes:t,gridLength:2,mode:"dark",children:[(0,x.jsxs)("div",{children:[n,r,h,p,(0,x.jsxs)(on.div,{animate:g,className:"mt-10 flex flex-wrap items-center gap-5",initial:m,transition:v,children:[S,(0,x.jsxs)(Rc,{className:"group inline-flex items-center gap-2 border border-white/[0.08] bg-white/[0.03] px-6 py-3.5 text-sm font-medium text-white/50 backdrop-blur-sm transition-all duration-300 hover:border-white/[0.15] hover:bg-white/[0.06] hover:text-white/80",to:"/packages",children:[(0,x.jsx)("span",{children:"Browse packages"}),(0,x.jsx)(gp,{className:"h-3.5 w-3.5 transition-transform duration-300 group-hover:translate-x-0.5"})]})]})]}),(0,x.jsx)(TS,{})]}),(0,x.jsx)(CS,{})]}),e[16]=_):_=e[16],_};function RS(e,t){if(/^\s+$/.test(e))return(0,x.jsx)("span",{children:e},t);if(!e)return null;const n=/^(import|from|const|await|export|async|function|type)$/.test(e),i=/^["'`]/.test(e),r=/^[{}()[\];,=>:]+$/.test(e),o=/^\d+$/.test(e),l=/^(true|false|null|undefined)$/.test(e);let u="text-white/55";return n?u="text-crimson-energy/70":i?u="text-sky-sapphire/75":r?u="text-white/20":(o||l)&&(u="text-sky-sapphire/60"),(0,x.jsx)("span",{className:u,children:e},t)}function IS(e,t){return(0,x.jsxs)("div",{className:"flex",children:[(0,x.jsx)("span",{className:"mr-4 w-4 shrink-0 text-right text-white/[0.08] select-none",children:t+1}),(0,x.jsx)(ES,{content:e})]},t)}function PS(e,t){return(0,x.jsxs)("span",{className:"mx-4 inline-flex items-center gap-2 font-mono text-xs text-white/20 transition-colors hover:text-white/40",children:[(0,x.jsx)(Pb,{className:"h-3 w-3"}),"@visulima/",e.name]},`${e.name}-${t}`)}function NS(e,t){return(0,x.jsxs)("div",{className:"flex items-center gap-2",children:[t>0&&(0,x.jsx)("span",{className:"mr-3 h-3 w-px bg-white/[0.08]"}),(0,x.jsx)("span",{className:"font-mono text-sm font-semibold text-white/70",children:e.value}),(0,x.jsx)("span",{className:"font-mono text-xs text-white/25",children:e.label})]},e.label)}function LS(e,t){return(0,x.jsx)(on.span,{animate:{opacity:1,scale:1},className:"border border-white/[0.06] bg-white/[0.02] px-3 py-1 font-mono text-xs text-white/30 transition-colors hover:border-white/[0.12] hover:text-white/50",initial:{opacity:0,scale:.9},transition:{delay:1+t*.05,duration:.3},children:e},e)}var yd=e=>{const t=(0,$t.c)(7),{icon:n,label:i}=e;let r;t[0]!==n?(r=(0,x.jsx)(n,{className:"h-4 w-4 text-gray-400"}),t[0]=n,t[1]=r):r=t[1];let o;t[2]!==i?(o=(0,x.jsx)("span",{children:i}),t[2]=i,t[3]=o):o=t[3];let l;return t[4]!==r||t[5]!==o?(l=(0,x.jsxs)("div",{className:"flex items-center gap-2 border border-gray-200 bg-gray-50 px-4 py-2 text-sm text-gray-500",children:[r,o]}),t[4]=r,t[5]=o,t[6]=l):l=t[6],l},DS=()=>{const e=(0,$t.c)(6);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={childrenWrapper:"items-end",root:"pb-[240px]"},e[0]=t):t=e[0];let n,i;e[1]===Symbol.for("react.memo_cache_sentinel")?(n=(0,x.jsx)("span",{children:"At Visulima, we believe every line of code tells a story. By combining elegant syntax with intuitive design, we empower developers to create with confidence and joy."}),i=(0,x.jsx)("span",{className:"text-gray-400",children:"Our philosophy is simple: great tools lead to great creations, and development should always inspire — not frustrate."}),e[1]=n,e[2]=i):(n=e[1],i=e[2]);let r,o;e[3]===Symbol.for("react.memo_cache_sentinel")?(r=(0,x.jsx)("div",{className:"col-span-2",children:(0,x.jsx)(El,{description:(0,x.jsxs)("span",{className:"flex flex-col gap-6",children:[n,i,(0,x.jsxs)("div",{className:"flex flex-wrap gap-3 pt-4",children:[(0,x.jsx)(yd,{icon:w1,label:"MIT Licensed"}),(0,x.jsx)(yd,{icon:Fb,label:"40+ Packages"}),(0,x.jsx)(yd,{icon:Bb,label:"Community Driven"})]})]}),mode:"light",prefix:"Open Source",title:"Proudly OpenSource."})}),o=(0,x.jsx)("div",{className:"hidden lg:col-span-1 lg:block"}),e[3]=r,e[4]=o):(r=e[3],o=e[4]);let l;return e[5]===Symbol.for("react.memo_cache_sentinel")?(l=(0,x.jsxs)(hr,{classes:t,mode:"light",children:[r,o,(0,x.jsx)("div",{className:"col-span-1",children:(0,x.jsx)(yp,{icon:(0,x.jsx)(w1,{}),target:"_blank",to:"https://github.com/visulima",children:"Star us on GitHub"})})]}),e[5]=l):l=e[5],l},Yi=e=>{const t=(0,$t.c)(13),{accentColor:n,children:i,className:r,title:o}=e;let l;t[0]!==r?(l=fr("group/feature relative flex w-full flex-col gap-4 px-8 pt-8 pb-10 transition-all duration-300 hover:bg-white/[0.02]",r),t[0]=r,t[1]=l):l=t[1];const u=`absolute top-0 left-8 right-8 h-px ${n} opacity-0 transition-opacity duration-500 group-hover/feature:opacity-100`;let h;t[2]!==u?(h=(0,x.jsx)("div",{className:u}),t[2]=u,t[3]=h):h=t[3];let f;t[4]!==o?(f=(0,x.jsx)("h3",{className:"font-mono text-sm font-semibold tracking-wide text-white/80 transition-colors duration-300 group-hover/feature:text-white",children:o}),t[4]=o,t[5]=f):f=t[5];let p;t[6]!==i?(p=(0,x.jsx)("span",{className:"text-wrap-balance text-sm leading-relaxed text-white/40 transition-colors duration-300 group-hover/feature:text-white/60",children:i}
9),t[6]=i,t[7]=p):p=t[7];let g;return t[8]!==l||t[9]!==h||t[10]!==f||t[11]!==p?(g=(0,x.jsxs)("div",{className:l,children:[h,f,p]}),t[8]=l,t[9]=h,t[10]=f,t[11]=p,t[12]=g):g=t[12],g},I1=[[{delay:0,text:"$ packem build",type:"cmd"},{delay:500,text:"INFO  [packem] [bundler] Using rollup 4.59.0 with node build runtime",type:"info"},{delay:200,text:"INFO  [packem] [transformer] Using esbuild ^0.27.3",type:"info"},{delay:300,text:"INFO  [packem] Detected entries: src/index.ts [esm] [cjs] [dts]",type:"info"},{delay:200,text:"INFO  [packem] Building my-library",type:"info"},{delay:400,text:"INFO  [packem] [dts] Building declaration files...",type:"info"},{delay:600,text:"SUCCESS  Build succeeded for my-library",type:"entry"},{delay:200,text:"Entries:",type:"info"},{delay:250,text:"  dist/index.mjs (12.4 kB, gzip: 4.1 kB)",type:"chunk"},{delay:200,text:"  dist/index.cjs (13.1 kB, gzip: 4.3 kB)",type:"chunk"},{delay:150,text:"  dist/index.d.ts",type:"chunk"},{delay:300,text:"Σ Total dist size: 28.3 kB",type:"total"},{delay:250,text:"⚡️ Build run in 0.284 seconds",type:"done"}],[{delay:0,text:"$ packem build --env node --env browser",type:"cmd"},{delay:500,text:"INFO  [packem] [bundler] Using rollup 4.59.0 with node build runtime",type:"info"},{delay:200,text:"INFO  [packem] [transformer] Using swc ^1.12.1",type:"info"},{delay:300,text:"INFO  [packem] Detected entries: src/index.ts [esm] [dts]",type:"info"},{delay:150,text:"INFO  [packem] Emitting of CJS bundles, is disabled.",type:"info"},{delay:200,text:"INFO  [packem] Building vite-overlay",type:"info"},{delay:400,text:"INFO  [packem] [dts] Building declaration files...",type:"info"},{delay:600,text:"SUCCESS  Build succeeded for vite-overlay",type:"entry"},{delay:200,text:"Entries:",type:"info"},{delay:250,text:"  dist/index.js (326.01 kB, brotli: 59.29 kB, gzip: 69.44 kB)",type:"chunk"},{delay:100,text:"    exports: default",type:"chunk"},{delay:100,text:"    dynamic imports:",type:"chunk"},{delay:100,text:"    └─ dist/@shikijs/langs/typescript",type:"chunk"},{delay:80,text:"    └─ dist/@shikijs/langs/json",type:"chunk"},{delay:80,text:"    └─ dist/@shikijs/langs/css",type:"chunk"},{delay:300,text:"Σ Total dist size: 351.97 kB",type:"total"},{delay:250,text:"⚡️ Build run in 1.429 seconds",type:"done"}]],US=e=>{if(e.color)return e.color;switch(e.type){case"chunk":return"text-white/40";case"cmd":return"text-white/80";case"done":return"text-sky-sapphire";case"entry":return"text-emerald-400";case"info":return"text-white/30";case"total":return"text-white/50";default:return"text-white/40"}},OS=()=>{const e=(0,$t.c)(22),[t,n]=(0,de.useState)(0),[i,r]=(0,de.useState)(0),o=I1[t%I1.length];let l;e[0]!==o||e[1]!==i?(l=()=>{if(i>=o.length){const w=setTimeout(()=>{n(HS),r(0)},2500);return()=>{clearTimeout(w)}}const v=o[i];if(!v)return;const b=setTimeout(()=>{r(WS)},v.delay);return()=>{clearTimeout(b)}},e[0]=o,e[1]=i,e[2]=l):l=e[2];let u;e[3]!==t||e[4]!==o||e[5]!==i?(u=[i,o,t],e[3]=t,e[4]=o,e[5]=i,e[6]=u):u=e[6],(0,de.useEffect)(l,u);let h;e[7]===Symbol.for("react.memo_cache_sentinel")?(h=(0,x.jsxs)("div",{className:"flex items-center gap-3 border-b border-white/6 px-4 py-2.5",children:[(0,x.jsxs)("div",{className:"flex gap-1.5",children:[(0,x.jsx)("div",{className:"h-2 w-2 bg-white/10"}),(0,x.jsx)("div",{className:"h-2 w-2 bg-white/10"}),(0,x.jsx)("div",{className:"h-2 w-2 bg-white/10"})]}),(0,x.jsx)("span",{className:"font-mono text-[10px] tracking-wider text-white/20 uppercase",children:"packem — build"})]}),e[7]=h):h=e[7];let f;if(e[8]!==t||e[9]!==o||e[10]!==i){let v;e[12]!==t?(v=(b,w)=>(0,x.jsxs)(on.div,{animate:{opacity:1,y:0},className:fr("whitespace-pre",US(b)),exit:{opacity:0},initial:{opacity:0,y:4},transition:{duration:.2,ease:"easeOut"},children:[b.type==="cmd"&&(0,x.jsx)("span",{className:"text-sky-sapphire/60",children:"$ "}),b.type==="cmd"?b.text.slice(2):b.text.startsWith("INFO")?(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)("span",{className:"text-sky-sapphire/60",children:"INFO"}),(0,x.jsx)("span",{children:b.text.slice(4)})]}):b.text.startsWith("SUCCESS")?(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)("span",{className:"text-emerald-400",children:"SUCCESS"}),(0,x.jsx)("span",{className:"text-white/50",children:b.text.slice(7)})]}):b.text]},`${t}-${w}`),e[12]=t,e[13]=v):v=e[13],f=o.slice(0,i).map(v),e[8]=t,e[9]=o,e[10]=i,e[11]=f}else f=e[11];let p;e[14]!==f?(p=(0,x.jsx)(uo,{mode:"popLayout",children:f}),e[14]=f,e[15]=p):p=e[15];let g;e[16]!==o.length||e[17]!==i?(g=i<o.length&&(0,x.jsx)(on.span,{animate:{o
9pacity:[1,0]},className:"inline-block h-3.5 w-1.5 translate-y-0.5 bg-sky-sapphire/60",transition:{duration:.8,repeat:1/0,repeatType:"reverse"}}),e[16]=o.length,e[17]=i,e[18]=g):g=e[18];let m;return e[19]!==p||e[20]!==g?(m=(0,x.jsxs)("div",{className:"flex h-full flex-col",children:[h,(0,x.jsxs)("div",{className:"flex-1 overflow-hidden px-4 py-3 font-mono text-xs leading-6",children:[p,g]})]}),e[19]=p,e[20]=g,e[21]=m):m=e[21],m},FS=()=>{const e=(0,$t.c)(17);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={root:"pt-0"},e[0]=t):t=e[0];let n;e[1]===Symbol.for("react.memo_cache_sentinel")?(n=(0,x.jsx)("div",{className:"hidden lg:col-span-1 lg:block"}),e[1]=n):n=e[1];let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=(0,x.jsx)("div",{className:"absolute top-0 left-0 right-0 h-px bg-gradient-to-r from-transparent via-sky-sapphire/60 to-transparent"}),e[2]=i):i=e[2];let r;e[3]===Symbol.for("react.memo_cache_sentinel")?(r=(0,x.jsx)("div",{className:"min-h-120 bg-sky-sapphire/[0.04]",children:(0,x.jsx)(OS,{})}),e[3]=r):r=e[3];let o,l,u,h;e[4]===Symbol.for("react.memo_cache_sentinel")?(o=(0,x.jsx)("div",{className:"flex items-center gap-3",children:(0,x.jsx)("span",{className:"inline-block bg-sky-sapphire/20 px-3 py-1 font-mono text-xs font-medium text-sky-sapphire",children:"Bundler"})}),l=(0,x.jsx)("h3",{className:"text-2xl font-bold tracking-tight text-white",children:"Packem"}),u=(0,x.jsx)("span",{className:"text-sm leading-relaxed text-white/60",children:"A fast and modern bundler for Node.js and TypeScript. Supports multiple runtimes, shared modules, server components, dynamic import, wasm, css, and more."}),h=(0,x.jsx)("span",{className:"text-sm leading-relaxed text-white/40",children:"Built on top of Rollup, combined with your preferred transformer like esbuild, swc, or sucrase."}),e[4]=o,e[5]=l,e[6]=u,e[7]=h):(o=e[4],l=e[5],u=e[6],h=e[7]);let f;e[8]===Symbol.for("react.memo_cache_sentinel")?(f={slug:"packem"},e[8]=f):f=e[8];let p;e[9]===Symbol.for("react.memo_cache_sentinel")?(p=(0,x.jsxs)("div",{className:"relative overflow-hidden border-b border-white/6 bg-gradient-to-br from-sky-sapphire/[0.08] via-trans
9parent to-transparent",children:[i,(0,x.jsxs)("div",{className:"grid grid-cols-2",children:[r,(0,x.jsxs)("div",{className:"z-10 flex w-full flex-col gap-4 px-8 pt-8 pb-14 border-l border-white/6",children:[o,l,u,h,(0,x.jsx)("div",{className:"mt-auto pt-6",children:(0,x.jsxs)(Rc,{className:"inline-flex items-center gap-2 bg-sky-sapphire/20 px-3 py-1.5 text-sm font-medium text-sky-sapphire transition-colors hover:bg-sky-sapphire/30 hover:text-white",params:f,to:"/packages/$slug",children:["Explore Packem",(0,x.jsx)(Yc,{className:"h-4 w-4"})]})})]})]})]}),e[9]=p):p=e[9];let g;e[10]===Symbol.for("react.memo_cache_sentinel")?(g=(0,x.jsx)(Yi,{accentColor:"bg-sky-sapphire/40",title:"Tree Shaking",children:"Packem supports tree-shaking both ES modules and CommonJS out of the box. It statically analyzes imports and exports, removing everything unused — even across dynamic import() boundaries and CSS modules."}),e[10]=g):g=e[10];let m;e[11]===Symbol.for("react.memo_cache_sentinel")?(m=(0,x.jsxs)("div",{className:"grid grid-cols-2 border-x border-white/6",children:[g,(0,x.jsxs)(Yi,{accentColor:"bg-sky-sapphire/40",className:"border-l border-white/6",title:"Minification",children:["Includes minifiers for JavaScript, CSS, HTML, and SVG out of the box. Run"," ",(0,x.jsx)("code",{className:"text-sky-sapphire/80",children:"packem build --production"})," ","and your application is built and optimized automatically."]})]}),e[11]=m):m=e[11];let v;e[12]===Symbol.for("react.memo_cache_sentinel")?(v=(0,x.jsx)(Yi,{accentColor:"bg-sky-sapphire/40",className:"border-t border-white/6",title:"Libraries",children:"Build libraries for multiple targets at once — modern ES module, legacy CommonJS, and TypeScript definitions all from one source. Just configure your package.json and Packem handles the rest."}),e[12]=v):v=e[12];let b;e[13]===Symbol.for("react.memo_cache_sentinel")?(b=(0,x.jsx)("code",{className:"text-sky-sapphire/80",children:"esbuild"}),e[13]=b):b=e[13];let w;e[14]===Symbol.for("react.memo_cache_sentinel")?(w=(0,x.jsx)("code",{className:"text-sky-sapphire/80",children:"swc"}),e[14]=w):w=e[14];let S;e[15]===Symbol.for("react.memo_cache_sentinel")?(S=(0,x.jsx)("code",{className:"text-sky-sapphire/80",children:"sucrase"}),e[15]=S):S=e[15];let _;return e[16]===Symbol.for("react.memo_cache_sentinel")?(_=(0,x.jsxs)(hr,{classes:t,mode:"dark",children:[n,(0,x.jsxs)("div",{className:"col-span-4 -ml-px flex flex-col xl:col-span-3 bg-background",children:[p,m,(0,x.jsxs)("div",{className:"grid grid-cols-2 border-x border-b border-white/6",children:[v,(0,x.jsxs)(Yi,{accentColor:"bg-sky-sapphire/40",className:"border-t border-l border-white/6",title:"Transformer",children:["Supports different transformers for your source code:"," ",b,","," ",w,",",S,","," ",(0,x.jsx)("code",{className:"text-sky-sapphire/80",children:"oxc"}),", and custom transformers."]})]})]})]}),e[16]=_):_=e[16],_},P1=[{color:"text-emerald-400",level:"success",prefix:"  ✔",text:"Operation successful"},{color:"text-sky-sapphire",level:"debug",prefix:"  ●",text:"Hello from L59"},{color:"text-amber-400",level:"pending",prefix:"  …",text:"Write release notes for 1.2.0"},{color:"text-crimson-energy",level:"fatal",prefix:"  ✖",text:"Unable to acquire lock"},{color:"text-violet-400",level:"watch",prefix:"  ◉",text:"Watching build directory..."},{color:"text-emerald-400",level:"complete",prefix:"  ✔",text:"Fix issue #59  (@prisis)"},{color:"text-sky-sapphire",level:"info",prefix:"  ℹ",text:"Build finished in 1.2s"},{color:"text-amber-400",level:"warn",prefix:"  ▲",text:"Deprecated API usage detected"}],kS=()=>{const e=(0,$t.c)(11),[t,n]=(0,de.useState)(0);let i,r;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=()=>{const g=setInterval(()=>{n(m=>m>=P1.length?(setTimeout(n,800,0),m):m+1)},1200);return()=>{clearInterval(g)}},r=[],e[0]=i,e[1]=r):(i=e[0],r=e[1]),(0,de.useEffect)(i,r);let o;e[2]===Symbol.for("react.memo_cache_sentinel")?(o=(0,x.jsxs)("div",{className:"flex items-center gap-3 border-b border-white/6 px-4 py-2.5",children:[(0,x.jsxs)("div",{className:"flex gap-1.5",children:[(0,x.jsx)("div",{className:"h-2 w-2 bg-white/10"}),(0,x.jsx)("div",{className:"h-2 w-2 bg-white/10"}),(0,x.jsx)("div",{className:"h-2 w-2 bg-white/10"})]}),(0,x.jsx)("span",{className:"font-mono text-[10px] tracking-wider text-white/20 uppercase",children:"pail — terminal"})]}),e[2]=o):o=e[2];let l;e[3]!==t?(l=P1.slice(0,t).map(jS),e[3]=t,e[4]=l):l=e[4];let u;e[5]!==l?(u=(0,x.jsx)(uo,{mode:"popLayout",children:l}),e[5]=l,e[6]=u):u=e[6];let h;e[7]===Symbol.for("react.memo_cache_sentinel")?(h={opacity:[1,0]}
9,e[7]=h):h=e[7];let f;e[8]===Symbol.for("react.memo_cache_sentinel")?(f=(0,x.jsx)(on.span,{animate:h,className:"inline-block h-3.5 w-1.5 translate-y-0.5 bg-crimson-energy/60",transition:{duration:.8,repeat:1/0,repeatType:"reverse"}}),e[8]=f):f=e[8];let p;return e[9]!==u?(p=(0,x.jsxs)("div",{className:"flex h-full flex-col",children:[o,(0,x.jsxs)("div",{className:"flex-1 overflow-hidden px-4 py-3 font-mono text-xs leading-6",children:[u,f]})]}),e[9]=u,e[10]=p):p=e[10],p},BS=()=>{const e=(0,$t.c)(10);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={root:"pt-0"},e[0]=t):t=e[0];let n;e[1]===Symbol.for("react.memo_cache_sentinel")?(n=(0,x.jsx)("div",{className:"absolute top-0 left-0 right-0 h-px bg-gradient-to-r from-transparent via-crimson-energy/60 to-transparent"}),e[1]=n):n=e[1];let i,r,o;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=(0,x.jsx)("div",{className:"flex items-center gap-3",children:(0,x.jsx)("span",{className:"inline-block bg-crimson-energy/20 px-3 py-1 font-mono text-xs font-medium text-crimson-energy",children:"Logger"})}),r=(0,x.jsx)("h3",{className:"text-2xl font-bold tracking-tight text-white",children:"Pail"}),o=(0,x.jsx)("span",{className:"text-sm leading-relaxed text-white/60",children:"Highly configurable Logger for Node.js, Edge and Browser. Hackable and configurable to the core, pail can be used for logging, status reporting, and output rendering."}),e[2]=i,e[3]=r,e[4]=o):(i=e[2],r=e[3],o=e[4]);let l;e[5]===Symbol.for("react.memo_cache_sentinel")?(l={slug:"pail"},e[5]=l):l=e[5];let u;e[6]===Symbol.for("react.memo_cache_sentinel")?(u=(0,x.jsxs)("div",{className:"z-10 flex w-full flex-col gap-4 p-8",children:[i,r,o,(0,x.jsx)("div",{className:"mt-auto pt-6",children:(0,x.jsxs)(Rc,{className:"inline-flex items-center gap-2 bg-crimson-energy/20 px-3 py-1.5 text-sm font-medium text-crimson-energy transition-colors hover:bg-crimson-energy/30 hover:text-white",params:l,to:"/packages/$slug",children:["Explore Pail",(0,x.jsx)(Yc,{className:"h-4 w-4"})]})})]}),e[6]=u):u=e[6];let h;e[7]===Symbol.for("react.memo_cache_sentinel")?(h=(0,x.jsxs)("div",{className:"relative overflow-hidden border border-white/6 bg-gradient-to-br from-crimson-energy/[0.08] via-trans
9parent to-transparent",children:[n,(0,x.jsxs)("div",{className:"grid grid-cols-2",children:[u,(0,x.jsx)("div",{className:"min-h-80 w-full border-l border-white/6 bg-crimson-energy/[0.04]",children:(0,x.jsx)(kS,{})})]})]}),e[7]=h):h=e[7];let f;e[8]===Symbol.for("react.memo_cache_sentinel")?(f=(0,x.jsxs)("div",{className:"grid grid-cols-2 border-x border-white/6",children:[(0,x.jsx)(Yi,{accentColor:"bg-crimson-energy/40",title:"Effortless Logging, Minimal Syntax",children:"Get started instantly with Pail's intuitive design. Whether you're debugging or tracking processes, the minimal syntax ensures your focus stays on coding, not configuration."}),(0,x.jsx)(Yi,{accentColor:"bg-crimson-energy/40",className:"border-l border-white/6",title:"More Than Just Logs",children:"Leverage built-in timers, stack traces, error formatting, spam prevention by throttling logs, secrets filtering, and object interpolation to gain deeper insights."})]}),e[8]=f):f=e[8];let p;return e[9]===Symbol.for("react.memo_cache_sentinel")?(p=(0,x.jsx)(hr,{classes:t,mode:"dark",children:(0,x.jsxs)("div",{className:"col-span-3 flex flex-col bg-background",children:[h,f,(0,x.jsxs)("div",{className:"grid grid-cols-2 border-x border-b border-white/6",children:[(0,x.jsx)(Yi,{accentColor:"bg-crimson-energy/40",className:"border-t border-white/6",title:"Blazing Fast on Any Platform",children:"Built for browsers and servers, Pail ensures lightning-fast performance and compatibility. Spam prevention and circular structure handling simplify even the most complex applications."}),(0,x.jsx)(Yi,{accentColor:"bg-crimson-energy/40",className:"border-t border-l border-white/6",title:"Your Logs, Your Way",children:"Choose between human-readable Pretty outputs or structured JSON for machine parsing. Integrates filename, timestamp, and metadata effortlessly."})]})]})}),e[9]=p):p=e[9],p},N1=[{command:"my-cli deploy",flags:"--env production --region eu-west-1",output:[{color:"text-royal-amethyst",text:"Deploying to eu-west-1..."},{color:"text-white/40",text:"Building assets          ████████████████ done"},{color:"text-white/40",text:"Uploading bundle         ████████████████ done"},{color:"text-white/40",text:"Running health checks    ████████████████ done"},{color:"text-emerald-400",text:"✔ Deployed successfully in 4.2s"}]},{command:"my-cli generate component",flags:"--name UserProfile --typescript",output:[{color:"text-royal-amethyst",text:"Generating component..."},{color:"text-white/40",text:"  Created src/components/UserProfile.tsx"},{color:"text-white/40",text:"  Created src/components/UserProfile.test.tsx"},{color:"text-white/40",text:"  Updated src/components/index.ts"},{color:"text-emerald-400",text:"✔ Component generated"}]}],zS=()=>{const e=(0,$t.c)(42),[t,n]=(0,de.useState)("typing-cmd"),[i,r]=(0,de.useState)(0),[o,l]=(0,de.useState)(0),[u,h]=(0,de.useState)(0),f=N1[i%N1.length];let p;e[0]!==o||e[1]!==u||e[2]!==t||e[3]!==f.command||e[4]!==f.flags||e[5]!==f.output?(p=()=>{if(t==="typing-cmd"){if(o<f.command.length){const F=setTimeout(()=>{l(XS)},60+Math.random()*40);return()=>{clearTimeout(F)}}const B=setTimeout(()=>{l(0),n("typing-flags")},200);return()=>{clearTimeout(B)}}if(t==="typing-flags"){if(o<f.flags.length){const F=setTimeout(()=>{l(qS)},45+Math.random()*30);return()=>{clearTimeout(F)}}const B=setTimeout(()=>{n("output"),h(0)},400);return()=>{clearTimeout(B)}}if(t==="output"){if(u<f.output.length){const F=setTimeout(()=>{h(YS)},500);return()=>{clearTimeout(F)}}const B=setTimeout(n,1500,"done");return()=>{clearTimeout(B)}}if(t==="done"){const B=setTimeout(()=>{r($S),l(0),h(0),n("typing-cmd")},1e3);return()=>{clearTimeout(B)}}},e[0]=o,e[1]=u,e[2]=t,e[3]=f.command,e[4]=f.flags,e[5]=f.output,e[6]=p):p=e[6];let g;e[7]!==o||e[8]!==u||e[9]!==t||e[10]!==f?(g=[t,o,u,f],e[7]=o,e[8]=u,e[9]=t,e[10]=f,e[11]=g):g=e[11],(0,de.useEffect)(p,g);let m;e[12]!==o||e[13]!==t||e[14]!==f.command?(m=t==="typing-cmd"?f.command.slice(0,o):f.command,e[12]=o,e[13]=t,e[14]=f.command,e[15]=m):m=e[15];const v=m;let b;e[16]!==o||e[17]!==t||e[18]!==f.flags?(b=t==="typing-flags"?f.flags.slice(0,o):t==="typing-cmd"?"":f.flags,e[16]=o,e[17]=t,e[18]=f.flags,e[19]=b):b=e[19];const w=b,S=t==="typing-cmd"||t==="typing-flags";let _;e[20]===Symbol.for("react.memo_cache_sentinel")?(_=(0,x.jsxs)("div",{className:"flex items-center gap-3 border-b border-white/6 px-4 py-2.5",children:[(0,x.jsxs)("div",{className:"flex gap-1.5",children:[(0,x.jsx)("div",{className:"h-2 w-2 bg-white/10"}),(0,x.jsx)("div",{className:"h-2 w-2 bg-white/10"}),(0,x.jsx)("div",{className:"h-2 w-2 bg-white/10"})]}),(0,x.jsx)("span",{className:"font-mono text-[10px] tracking-wider text-white/20 uppercase",children:"cerebro — cli"})]}),e[20]=_):_=e[20];let C;e[21]===Symbol.for("react.memo_cache_sentinel")?(C=(0,x.jsx)("span",{className:"text-royal-amethyst/60",children:"$"}),e[21]=C):C=e[21];let A;e[22]!==v?(A=(0,x.jsx)("span",{className:"ml-2 text-white/80",children:v}),e[22]=v,e[23]=A):A=e[23];let E;e[24]!==w?(E=w&&(0,x.jsx)("span",{className:"ml-1 text-white/40",children:w}),e[24]=w,e[25]=E):E=e[25];let P;
9e[26]!==S?(P=S&&(0,x.jsx)(on.span,{animate:{opacity:[1,0]},className:"ml-0.5 inline-block h-3.5 w-1.5 translate-y-0.5 bg-royal-amethyst/60",transition:{duration:.6,repeat:1/0,repeatType:"reverse"}}),e[26]=S,e[27]=P):P=e[27];let N;e[28]!==A||e[29]!==E||e[30]!==P?(N=(0,x.jsxs)("div",{className:"flex flex-wrap",children:[C,A,E,P]}),e[28]=A,e[29]=E,e[30]=P,e[31]=N):N=e[31];let O;e[32]!==u||e[33]!==t||e[34]!==f.output||e[35]!==i?(O=(t==="output"||t==="done")&&f.output.slice(0,u).map((B,F)=>(0,x.jsx)(on.div,{animate:{opacity:1,x:0},className:B.color,initial:{opacity:0,x:-4},transition:{duration:.25,ease:"easeOut"},children:B.text},`${i}-${F}`)),e[32]=u,e[33]=t,e[34]=f.output,e[35]=i,e[36]=O):O=e[36];let T;e[37]!==O?(T=(0,x.jsx)(uo,{children:O}),e[37]=O,e[38]=T):T=e[38];let R;return e[39]!==T||e[40]!==N?(R=(0,x.jsxs)("div",{className:"flex h-full flex-col",children:[_,(0,x.jsxs)("div",{className:"flex-1 overflow-hidden px-4 py-3 font-mono text-xs leading-6",children:[N,T]})]}),e[39]=T,e[40]=N,e[41]=R):R=e[41],R},VS=()=>{const e=(0,$t.c)(13);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={root:"pt-0"},e[0]=t):t=e[0];let n;e[1]===Symbol.for("react.memo_cache_sentinel")?(n=(0,x.jsx)("div",{className:"hidden lg:col-span-1 lg:block"}),e[1]=n):n=e[1];let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=(0,x.jsx)("div",{className:"absolute top-0 left-0 right-0 h-px bg-gradient-to-r from-transparent via-royal-amethyst/60 to-transparent"}),e[2]=i):i=e[2];let r;e[3]===Symbol.for("react.memo_cache_sentinel")?(r=(0,x.jsx)("div",{className:"min-h-80 w-full bg-royal-amethyst/[0.04]",children:(0,x.jsx)(zS,{})}),e[3]=r):r=e[3];let o,l,u;e[4]===Symbol.for("react.memo_cache_sentinel")?(o=(0,x.jsx)("div",{className:"flex items-center gap-3",children:(0,x.jsx)("span",{className:"inline-block bg-royal-amethyst/20 px-3 py-1 font-mono text-xs font-medium text-royal-amethyst",children:"CLI Framework"})}),l=(0,x.jsx)("h3",{className:"text-2xl font-bold tracking-tight text-white",children:"Cerebro"}),u=(0,x.jsx)("span",{className:"text-sm leading-relaxed text-white/60",children:"A CLI framework that lets you build awesome command-line tools in Node.js and TypeScript. Create CLIs with a few flags or advanced CLIs with subcommands."}),e[4]=o,e[5]=l,e[6]=u):(o=e[4],l=e[5],u=e[6]);let h;e[7]===Symbol.for("react.memo_cache_sentinel")?(h={slug:"cerebro"},e[7]=h):h=e[7];let f;e[8]===Symbol.for("react.memo_cache_sentinel")?(f=(0,x.jsxs)("div",{className:"relative overflow-hidden border border-white/6 bg-gradient-to-br from-royal-amethyst/[0.08] via-trans
9parent to-transparent",children:[i,(0,x.jsxs)("div",{className:"grid grid-cols-2",children:[r,(0,x.jsxs)("div",{className:"z-10 flex w-full flex-col gap-4 p-8 border-l border-white/6",children:[o,l,u,(0,x.jsx)("div",{className:"mt-auto pt-6",children:(0,x.jsxs)(Rc,{className:"inline-flex items-center gap-2 bg-royal-amethyst/20 px-3 py-1.5 text-sm font-medium text-royal-amethyst transition-colors hover:bg-royal-amethyst/30 hover:text-white",params:h,to:"/packages/$slug",children:["Explore Cerebro",(0,x.jsx)(Yc,{className:"h-4 w-4"})]})})]})]})]}),e[8]=f):f=e[8];let p;e[9]===Symbol.for("react.memo_cache_sentinel")?(p=(0,x.jsx)(Yi,{accentColor:"bg-royal-amethyst/40",title:"Flag and Argument Parsing",children:"Custom flag parser built from years of experimentation — flexible enough for easy, predictable UX without compromising type safety for the developer."}),e[9]=p):p=e[9];let g;e[10]===Symbol.for("react.memo_cache_sentinel")?(g=(0,x.jsxs)("div",{className:"grid grid-cols-2 border-x border-white/6",children:[p,(0,x.jsxs)(Yi,{accentColor:"bg-royal-amethyst/40",className:"border-l border-white/6",title:"Auto-documentation",children:["Pass"," ",(0,x.jsx)("code",{className:"text-royal-amethyst/80",children:"--help"})," ","to any CLI command for automatically generated help, flag options, and argument information."]})]}),e[10]=g):g=e[10];let m;e[11]===Symbol.for("react.memo_cache_sentinel")?(m=(0,x.jsx)(Yi,{accentColor:"bg-royal-amethyst/40",className:"border-t border-white/6",title:"TypeScript (or not)",children:"Written in TypeScript with a CLI generator that builds both fully configured TypeScript or plain JavaScript CLIs. Cleaner syntax in TypeScript, but everything works in either language."}),e[11]=m):m=e[11];let v;return e[12]===Symbol.for("react.memo_cache_sentinel")?(v=(0,x.jsxs)(hr,{classes:t,mode:"dark",children:[n,(0,x.jsxs)("div",{className:"col-span-4 -ml-px flex flex-col xl:col-span-3 bg-background",children:[f,g,(0,x.jsxs)("div",{className:"grid grid-cols-2 border-x border-b border-white/6",children:[m,(0,x.jsxs)(Yi,{accentColor:"bg-royal-amethyst/40",className:"border-t border-l border-white/6",title:"Autocomplete",children:["Terminal autocompletion with the"," ",(0,x.jsx)("code",{className:"text-royal-amethyst/80",children:"--autocomplete"})," ","flag. Users complete command and flag names by pressing tab."]})]})]})]}),e[12]=v):v=e[12],v},GS=()=>{const e=(0,$t.c)(11);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={childrenWrapper:"items-end",root:"pb-20"},e[0]=t):t=e[0];let n,i;e[1]===Symbol.for("react.memo_cache_sentinel")?(n=(0,x.jsx)(El,{classes:{root:"col-span-2"},description:"From blazing-fast bundlers to intuitive CLI builders, Visulima offers tools to supercharge your workflow. Dive into Packem, Cerebro, Pail, Api-Platform, and more — crafted for elegance, simplicity, and power.",prefix:"Packages",title:"Tools to Supercharge Your Workflow."}),i=(0,x.jsx)("div",{className:"hidden lg:col-span-1 lg:block"}),e[1]=n,e[2]=i):(n=e[1],i=e[2]);let r,o,l,u;e[3]===Symbol.for("react.memo_cache_sentinel")?(r=(0,x.jsxs)(hr,{classes:t,mode:"dark",children:[n,i,(0,x.jsx)("div",{className:"col-span-1",children:(0,x.jsx)(yp,{className:"-ml-px w-[calc(100%+1px)] border-r-0",icon:(0,x.jsx)(gp,{}),mode:"dark",to:"/packages",children:"Explore Packages"})})]}),o=(0,x.jsx)(FS,{}),l=(0,x.jsx)(BS,{}),u=(0,x.jsx)(VS,{}),e[3]=r,e[4]=o,e[5]=l,e[6]=u):(r=e[3],o=e[4],l=e[5],u=e[6]);let h;e[7]===Symbol.for("react.memo_cache_sentinel")?(h={root:"pt-0"},e[7]=h):h=e[7];let f;e[8]===Symbol.for("react.memo_cache_sentinel")?(f=(0,x.jsx)("div",{className:"col-span-1 hidden lg:block"}),e[8]=f):f=e[8];let p;e[9]===Symbol.for("react.memo_cache_sentinel")?(p=(0,x.jsx)(El,{classes:{root:"text-center"},description:"Empower your ideas with tools that simplify development, spark creativity, and accelerate delivery. Define your vision, design with elegance, and deploy solutions that shape the future of the web with confidence.",position:"center",title:"Define, design, deploy what's next for the web"}),e[9]=p):p=e[9];let g;return e[10]===Symbol.for("react.memo_cache_sentinel")?(g=(0,x.jsxs)("div",{className:"bg-background",children:[r,o,l,u,(0,x.jsxs)(hr,{classes:h,mode:"dark",children:[f,(0,x.jsxs)("div",{className:"col-span-2 flex flex-col gap-16",children:[p,(0,x.jsx)(yp,{className:"-ml-[2px] w-[calc(100%+1px)] border-r-0 bg-background",icon:(0,x.jsx)(gp,{}),mode:"dark",to:"/packages",children:"Start Building"})]})]})]}),e[10]=g):g=e[10],g};function HS(e){return e+1}function WS(e){return e+1}
9function jS(e,t){return(0,x.jsxs)(on.div,{animate:{opacity:1,y:0},className:"flex items-baseline gap-0",exit:{opacity:0,y:-4},initial:{opacity:0,y:6},transition:{duration:.3,ease:"easeOut"},children:[(0,x.jsx)("span",{className:fr("w-5 shrink-0",e.color),children:e.prefix}),(0,x.jsx)("span",{className:"ml-1 w-20 shrink-0 text-white/25",children:e.level.padEnd(8)}),(0,x.jsx)("span",{className:"text-white/60",children:e.text})]},`${e.level}-${t}`)}function XS(e){return e+1}function qS(e){return e+1}function YS(e){return e+1}function $S(e){return e+1}var ZS={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},JS={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3};var Iv="attached",KS="detached";var Ic=1e3,bi=1001,Pc=1002,In=1003,Wp=1004,QS=1004,jp=1005,eM=1005,mn=1006,Xp=1007,tM=1007,Ll=1008,nM=1008,ts=1009,Pv=1010,Nv=1011,qp=1012,Lv=1013,is=1014,rs=1015,Hs=1016,Yp=1017,$p=1018,Zp=1020,Dv=35902,Uv=35899,Ov=1021,Fv=1022,ss=1023,Tl=1026,Jp=1027,Kp=1028,jh=1029,Nc=1030,Qp=1031,iM=1032,e0=1033,kv=33776,Bv=33777,zv=33778,Vv=33779,Gv=35840,Hv=35841,Wv=35842,jv=35843,Xv=36196,qv=37492,Yv=37496,$v=37488,Zv=37489,Jv=37490,Kv=37491,Qv=37808,ey=37809,ty=37810,ny=37811,iy=37812,ry=37813,sy=37814,ay=37815,oy=37816,ly=37817,cy=37818,uy=37819,hy=37820,fy=37821,dy=36492,py=36494,my=36495,gy=36283,vy=36284,yy=36285,xy=36286,rM=2200,_y=2201,by=2202,Lc=2300,Oh=2301,Rh=2302,Sp=2303,ao=2400,oo=2401,Dc=2402,Xh=2500,t0=2501,Sy=3200,sM=3201,aM=3202,oM=3203;var ci="srgb",Uc="srgb-linear",Oc="linear",Fc="srgb",Ih=7680,lM=7681,cM=7682,uM=7683,hM=34055,fM=34056,dM=5386;var qh=35044,pM=35048,mM=35040,gM=35045,vM=35049,yM=35041,xM=35046,_M=35050,bM=35042,My="300 es",Ws=2e3,SM=2001,MM={COMPUTE:"compute",RENDER:"render"},wM={PERSPECTIVE:"perspective",LINEAR:"linear",FLAT:"flat"},EM={NORMAL:"normal",CENTROID:"centroid",SAMPLE:"sample",FIRST:"first",EITHER:"either"},TM={TEXTURE_COMPARE:"depthTextureCompare"};function CM(e){for(let t=e.length-1;t>=0;--t)if(e[t]>=65535)return!0;return!1}var AM={Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array};function Sl(e,t){return new AM[e](t)}function wy(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function kc(e){return document.createElementNS("http://www.w3.org/1999/xhtml",e)}function Ey(){const e=kc("canvas");return e.style.display="block",e}var L1={},js=null;function RM(e){js=e}function IM(){return js}function Bc(...e){const t="THREE."+e.shift();js?js("log",t,...e):console.log(t,...e)}function Ty(e){const t=e[0];if(typeof t=="string"&&t.startsWith("TSL:")){const n=e[1];n&&n.isStackTrace?e[0]+=" "+n.getLocation():e[1]='Stack trace not available. Enable "THREE.Node.captureStackTrace" to capture stack traces.'}return e}function Ue(...e){e=Ty(e);const t="THREE."+e.shift();if(js)js("warn",t,...e);else{const n=e[0];n&&n.isStackTrace?console.warn(n.getError(t)):console.warn(t,...e)}}function rt(...e){e=Ty(e);const t="THREE."+e.shift();if(js)js("error",t,...e);else{const n=e[0];n&&n.isStackTrace?console.error(n.getError(t)):console.error(t,...e)}}function Gs(...e){const t=e.join(" ");t in L1||(L1[t]=!0,Ue(...e))}function PM(e,t,n){return new Promise(function(i,r){function o(){switch(e.clientWaitSync(t,e.SYNC_FLUSH_COMMANDS_BIT,0)){case e.WAIT_FAILED:r();break;case e.TIMEOUT_EXPIRED:setTimeout(o,n);break;default:i()}}setTimeout(o,n)})}var NM={0:1,2:6,4:7,3:5,1:0,6:2,7:4,5:3},dr=class{addEventListener(e,t){this._listeners===void 0&&(this._listeners={});const n=this._listeners;n[e]===void 0&&(n[e]=[]),n[e].indexOf(t)===-1&&n[e].push(t)}hasEventListener(e,t){const n=this._listeners;return n===void 0?!1:n[e]!==void 0&&n[e].indexOf(t)!==-1}removeEventListener(e,t){const n=this._listeners;if(n===void 0)return;const i=n[e];if(i!==void 0){const r=i.indexOf(t);r!==-1&&i.splice(r,1)}}dispatchEvent(e){const t=this._listeners;if(t===void 0)return;const n=t[e.type];if(n!==void 0){e.target=this;const i=n.slice(0);for(let r=0,o=i.length;r<o;r++)i[r].call(this,e);e.target=null}}},Kn=["00","01","02","03","04","05","06","07","08","09","0a","0b","0c","0d","0e","0f","10","11","12","13","14","15","16","17","18","19","1a","1b","1c","1d","1e","1f","20","21","22","23","24","25","26","27","28","29","2a","2b","2c","2d","2e","2f","30","31","32","33","34","35","36","37","38","39","3a","3b","3c","3d","3e","3f","40","41","42","43","44","45","46","47","48","49","4a","4b","4c","4d","4e","4f","50","51","52","53","54","5
95","56","57","58","59","5a","5b","5c","5d","5e","5f","60","61","62","63","64","65","66","67","68","69","6a","6b","6c","6d","6e","6f","70","71","72","73","74","75","76","77","78","79","7a","7b","7c","7d","7e","7f","80","81","82","83","84","85","86","87","88","89","8a","8b","8c","8d","8e","8f","90","91","92","93","94","95","96","97","98","99","9a","9b","9c","9d","9e","9f","a0","a1","a2","a3","a4","a5","a6","a7","a8","a9","aa","ab","ac","ad","ae","af","b0","b1","b2","b3","b4","b5","b6","b7","b8","b9","ba","bb","bc","bd","be","bf","c0","c1","c2","c3","c4","c5","c6","c7","c8","c9","ca","cb","cc","cd","ce","cf","d0","d1","d2","d3","d4","d5","d6","d7","d8","d9","da","db","dc","dd","de","df","e0","e1","e2","e3","e4","e5","e6","e7","e8","e9","ea","eb","ec","ed","ee","ef","f0","f1","f2","f3","f4","f5","f6","f7","f8","f9","fa","fb","fc","fd","fe","ff"],D1=1234567,ho=Math.PI/180,Cl=180/Math.PI;function Oi(){const e=Math.random()*4294967295|0,t=Math.random()*4294967295|0,n=Math.random()*4294967295|0,i=Math.random()*4294967295|0;return(Kn[e&255]+Kn[e>>8&255]+Kn[e>>16&255]+Kn[e>>24&255]+"-"+Kn[t&255]+Kn[t>>8&255]+"-"+Kn[t>>16&15|64]+Kn[t>>24&255]+"-"+Kn[n&63|128]+Kn[n>>8&255]+"-"+Kn[n>>16&255]+Kn[n>>24&255]+Kn[i&255]+Kn[i>>8&255]+Kn[i>>16&255]+Kn[i>>24&255]).toLowerCase()}function mt(e,t,n){return Math.max(t,Math.min(n,e))}function n0(e,t){return(e%t+t)%t}function LM(e,t,n,i,r){return i+(e-t)*(r-i)/(n-t)}function DM(e,t,n){return e!==t?(n-e)/(t-e):0}function Ec(e,t,n){return(1-n)*e+n*t}function UM(e,t,n,i){return Ec(e,t,1-Math.exp(-n*i))}function OM(e,t=1){return t-Math.abs(n0(e,t*2)-t)}function FM(e,t,n){return e<=t?0:e>=n?1:(e=(e-t)/(n-t),e*e*(3-2*e))}function kM(e,t,n){return e<=t?0:e>=n?1:(e=(e-t)/(n-t),e*e*e*(e*(e*6-15)+10))}function BM(e,t){return e+Math.floor(Math.random()*(t-e+1))}function zM(e,t){return e+Math.random()*(t-e)}function VM(e){return e*(.5-Math.random())}function GM(e){e!==void 0&&(D1=e);let t=D1+=1831565813;return t=Math.imul(t^t>>>15,t|1),t^=t+Math.imul(t^t>>>7,t|61),((t^t>>>14)>>>0)/4294967296}function HM(e){return e*ho}function WM(e){return e*Cl}function jM(e){return(e&e-1)===0&&e!==0}function XM(e){return Math.pow(2,Math.ceil(Math.log(e)/Math.LN2))}function qM(e){return Math.pow(2,Math.floor(Math.log(e)/Math.LN2))}function YM(e,t,n,i,r){const o=Math.cos,l=Math.sin,u=o(n/2),h=l(n/2),f=o((t+i)/2),p=l((t+i)/2),g=o((t-i)/2),m=l((t-i)/2),v=o((i-t)/2),b=l((i-t)/2);switch(r){case"XYX":e.set(u*p,h*g,h*m,u*f);break;case"YZY":e.set(h*m,u*p,h*g,u*f);break;case"ZXZ":e.set(h*g,h*m,u*p,u*f);break;case"XZX":e.set(u*p,h*b,h*v,u*f);break;case"YXY":e.set(h*v,u*p,h*b,u*f);break;case"ZYZ":e.set(h*b,h*v,u*p,u*f);break;default:Ue("MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+r)}}function ui(e,t){switch(t.constructor){case Float32Array:return e;case Uint32Array:return e/4294967295;case Uint16Array:return e/65535;case Uint8Array:return e/255;case Int32Array:return Math.max(e/2147483647,-1);case Int16Array:return Math.max(e/32767,-1);case Int8Array:return Math.max(e/127,-1);default:throw new Error("THREE.MathUtils: Invalid component type.")}}function Ct(e,t){switch(t.constructor){case Float32Array:return e;case Uint32Array:return Math.round(e*4294967295);case Uint16Array:return Math.round(e*65535);case Uint8Array:return Math.round(e*255);case Int32Array:return Math.round(e*2147483647);case Int16Array:return Math.round(e*32767);case Int8Array:return Math.round(e*127);default:throw new Error("THREE.MathUtils: Invalid component type.")}}var $M={DEG2RAD:ho,RAD2DEG:Cl,generateUUID:Oi,clamp:mt,euclideanModulo:n0,mapLinear:LM,inverseLerp:DM,lerp:Ec,damp:UM,pingpong:OM,smoothstep:FM,smootherstep:kM,randInt:BM,randFloat:zM,randFloatSpread:VM,seededRandom:GM,degToRad:HM,radToDeg:WM,isPowerOfTwo:jM,ceilPowerOfTwo:XM,floorPowerOfTwo:qM,setQuaternionFromProperEuler:YM,normalize:Ct,denormalize:ui},ye=class Cy{static{Cy.prototype.isVector2=!0}constructor(t=0,n=0){this.x=t,this.y=n}get width(){return this.x}set width(t){this.x=t}get height(){return this.y}set height(t){this.y=t}set(t,n){return this.x=t,this.y=n,this}setScalar(t){return this.x=t,this.y=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setComponent(t,n){switch(t){case 0:this.x=n;break;case 1:this.y=n;break;default:throw new Error("THREE.Vector2: index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;default:throw new Error("THREE.Vector2: index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y)}copy(t){return this.x=t.x,this.y=t.y,this}add(t){return this.x+=t.x,this.y+=t.y,this}addScalar(t){return this.x+=t,this.y+=t,this}addVectors(t,n){return this.x=t.x+n.x,this.y=t.y+n.y,this}addScaledVector(t,n){return this.x+=t.x*n,this.y+=t.y*n,this}sub(t){return this.x-=t.x,this.y-=t.y,this}subScalar(t){return this.x-=t,this.y-=t,this}subVectors(t,n){return this.x=t.x-n.x,this.y=t.y-n.y,this}multiply(t){return this.x*=t.x,this.y*=t.y,this}multiplyScalar(t){return this.x*=t,this.y*=t,this}divide(t){return this.x/=t.x,this.y/=t.y,this}divideScalar(t){return this.multiplyScalar(1/t)}applyMatrix3(t){const n=this.x,i=this.y,r=t.elements;return this.x=r[0]*n+r[3]*i+r[6],this.y=r[1]*n+r[4]*i+r[7],this}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this}clamp(t,n){return this.x=mt(this.x,t.x,n.x),this.y=mt(this.y,t.y,n.y),this}clampScalar(t,n){return this.x=mt(this.x,t,n),this.y=mt(this.y,t,n),this}clampLength(t,n){const i=this.length();return this.divideScalar(i||1).multiplyScalar(mt(i,t,n))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}
vendor: 16,955 bytes, line 9
9round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(t){return this.x*t.x+this.y*t.y}cross(t){return this.x*t.y-this.y*t.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(t){const n=Math.sqrt(this.lengthSq()*t.lengthSq());if(n===0)return Math.PI/2;const i=this.dot(t)/n;return Math.acos(mt(i,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const n=this.x-t.x,i=this.y-t.y;return n*n+i*i}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,n){return this.x+=(t.x-this.x)*n,this.y+=(t.y-this.y)*n,this}lerpVectors(t,n,i){return this.x=t.x+(n.x-t.x)*i,this.y=t.y+(n.y-t.y)*i,this}equals(t){return t.x===this.x&&t.y===this.y}fromArray(t,n=0){return this.x=t[n],this.y=t[n+1],this}toArray(t=[],n=0){return t[n]=this.x,t[n+1]=this.y,t}fromBufferAttribute(t,n){return this.x=t.getX(n),this.y=t.getY(n),this}rotateAround(t,n){const i=Math.cos(n),r=Math.sin(n),o=this.x-t.x,l=this.y-t.y;return this.x=o*i-l*r+t.x,this.y=o*r+l*i+t.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}},hi=class{constructor(e=0,t=0,n=0,i=1){this.isQuaternion=!0,this._x=e,this._y=t,this._z=n,this._w=i}static slerpFlat(e,t,n,i,r,o,l){let u=n[i+0],h=n[i+1],f=n[i+2],p=n[i+3],g=r[o+0],m=r[o+1],v=r[o+2],b=r[o+3];if(p!==b||u!==g||h!==m||f!==v){let w=u*g+h*m+f*v+p*b;w<0&&(g=-g,m=-m,v=-v,b=-b,w=-w);let S=1-l;if(w<.9995){const _=Math.acos(w),C=Math.sin(_);S=Math.sin(S*_)/C,l=Math.sin(l*_)/C,u=u*S+g*l,h=h*S+m*l,f=f*S+v*l,p=p*S+b*l}else{u=u*S+g*l,h=h*S+m*l,f=f*S+v*l,p=p*S+b*l;const _=1/Math.sqrt(u*u+h*h+f*f+p*p);u*=_,h*=_,f*=_,p*=_}}e[t]=u,e[t+1]=h,e[t+2]=f,e[t+3]=p}static multiplyQuaternionsFlat(e,t,n,i,r,o){const l=n[i],u=n[i+1],h=n[i+2],f=n[i+3],p=r[o],g=r[o+1],m=r[o+2],v=r[o+3];return e[t]=l*v+f*p+u*m-h*g,e[t+1]=u*v+f*g+h*p-l*m,e[t+2]=h*v+f*m+l*g-u*p,e[t+3]=f*v-l*p-u*g-h*m,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,t,n,i){return this._x=e,this._y=t,this._z=n,this._w=i,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,t=!0){const n=e._x,i=e._y,r=e._z,o=e._order,l=Math.cos,u=Math.sin,h=l(n/2),f=l(i/2),p=l(r/2),g=u(n/2),m=u(i/2),v=u(r/2);switch(o){case"XYZ":this._x=g*f*p+h*m*v,this._y=h*m*p-g*f*v,this._z=h*f*v+g*m*p,this._w=h*f*p-g*m*v;break;case"YXZ":this._x=g*f*p+h*m*v,this._y=h*m*p-g*f*v,this._z=h*f*v-g*m*p,this._w=h*f*p+g*m*v;break;case"ZXY":this._x=g*f*p-h*m*v,this._y=h*m*p+g*f*v,this._z=h*f*v+g*m*p,this._w=h*f*p-g*m*v;break;case"ZYX":this._x=g*f*p-h*m*v,this._y=h*m*p+g*f*v,this._z=h*f*v-g*m*p,this._w=h*f*p+g*m*v;break;case"YZX":this._x=g*f*p+h*m*v,this._y=h*m*p+g*f*v,this._z=h*f*v-g*m*p,this._w=h*f*p-g*m*v;break;case"XZY":this._x=g*f*p-h*m*v,this._y=h*m*p-g*f*v,this._z=h*f*v+g*m*p,this._w=h*f*p+g*m*v;break;default:Ue("Quaternion: .setFromEuler() encountered an unknown order: "+o)}return t===!0&&this._onChangeCallback(),this}setFromAxisAngle(e,t){const n=t/2,i=Math.sin(n);return this._x=e.x*i,this._y=e.y*i,this._z=e.z*i,this._w=Math.cos(n),this._onChangeCallback(),this}setFromRotationMatrix(e){const t=e.elements,n=t[0],i=t[4],r=t[8],o=t[1],l=t[5],u=t[9],h=t[2],f=t[6],p=t[10],g=n+l+p;if(g>0){const m=.5/Math.sqrt(g+1);this._w=.25/m,this._x=(f-u)*m,this._y=(r-h)*m,this._z=(o-i)*m}else if(n>l&&n>p){const m=2*Math.sqrt(1+n-l-p);this._w=(f-u)/m,this._x=.25*m,this._y=(i+o)/m,this._z=(r+h)/m}else if(l>p){const m=2*Math.sqrt(1+l-n-p);this._w=(r-h)/m,this._x=(i+o)/m,this._y=.25*m,this._z=(u+f)/m}else{const m=2*Math.sqrt(1+p-n-l);this._w=(o-i)/m,this._x=(r+h)/m,this._y=(u+f)/m,this._z=.25*m}return this._onChangeCallback(),this}setFromUnitVectors(e,t){let n=e.dot(t)+1;return n<1e-8?(n=0,Math.abs(e.x)>Math.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=n):(this._x=0,this._y=-e.z,this._z=e.y,this._w=n)):(this._x=e.y*t.z-e.z*t.y,this._y=e.z*t.x-e.x*t.z,this._z=e.x*t.y-e.y*t.x,this._w=n),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(mt(this.dot(e),-1,1)))}rotateTowards(e,t){const n=this.angleTo(e);if(n===0)return this;const i=Math.min(1,t/n);return this.slerp(e,i),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return e===0?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this}multiply(e){return this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,t){const n=e._x,i=e._y,r=e._z,o=e._w,l=t._x,u=t._y,h=t._z,f=t._w;return this._x=n*f+o*l+i*h-r*u,this._y=i*f+o*u+r*l-n*h,this._z=r*f+o*h+n*u-i*l,this._w=o*f-n*l-i*u-r*h,this._onChangeCallback(),this}slerp(e,t){let n=e._x,i=e._y,r=e._z,o=e._w,l=this.dot(e);l<0&&(n=-n,i=-i,r=-r,o=-o,l=-l);let u=1-t;if(l<.9995){const h=Math.acos(l),f=Math.sin(h);u=Math.sin(u*h)/f,t=Math.sin(t*h)/f,this._x=this._x*u+n*t,this._y=this._y*u+i*t,this._z=this._z*u+r*t,this._w=this._w*u+o*t,this._onChangeCallback()}else this._x=this._x*u+n*t,this._y=this._y*u+i*t,this._z=this._z*u+r*t,this._w=this._w*u+o*t,this.normalize();return this}slerpQuaternions(e,t,n){return this.copy(e).slerp(t,n)}random(){const e=2*Math.PI*Math.random(),t=2*Math.PI*Math.random(),n=Math.random(),i=Math.sqrt(1-n),r=Math.sqrt(n);return this.set(i*Math.sin(e),i*Math.cos(e),r*Math.sin(t),r*Math.cos(t))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,t=0){return this._x=e[t],this._y=e[t+1],this._z=e[t+2],this._w=e[t+3],this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,e}fromBufferAttribute(e,t){return this._x=e.getX(t),this._y=e.getY(t),this._z=e.getZ(t),this._w=e.getW(t),this._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}},k=class Ay{static{Ay.prototype.isVector3=!0}constructor(t=0,n=0,i=0){this.x=t,this.y=n,this.z=i}set(t,n,i){return i===void 0&&(i=this.z),this.x=t,this.y=n,this.z=i,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setComponent(t,n){switch(t){case 0:this.x=n;break;case 1:this.y=n;break;case 2:this.z=n;break;default:throw new Error("THREE.Vector3: index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("THREE.Vector3: index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this}add(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this}addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this}addVectors(t,n){return this.x=t.x+n.x,this.y=t.y+n.y,this.z=t.z+n.z,this}addScaledVector(t,n){return this.x+=t.x*n,this.y+=t.y*n,this.z+=t.z*n,this}sub(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this}subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this}subVectors(t,n){return this.x=t.x-n.x,this.y=t.y-n.y,this.z=t.z-n.z,this}multiply(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this}multiplyVectors(t,n){return this.x=t.x*n.x,this.y=t.y*n.y,this.z=t.z*n.z,this}applyEuler(t){return this.applyQuaternion(U1.setFromEuler(t))}applyAxisAngle(t,n){return this.applyQuaternion(U1.setFromAxisAngle(t,n))}applyMatrix3(t){const n=this.x,i=this.y,r=this.z,o=t.elements;return this.x=o[0]*n+o[3]*i+o[6]*r,this.y=o[1]*n+o[4]*i+o[7]*r,this.z=o[2]*n+o[5]*i+o[8]*r,this}applyNormalMatrix(t){return this.applyMatrix3(t).normalize()}applyMatrix4(t){const n=this.x,i=this.y,r=this.z,o=t.elements,l=1/(o[3]*n+o[7]*i+o[11]*r+o[15]);return this.x=(o[0]*n+o[4]*i+o[8]*r+o[12])*l,this.y=(o[1]*n+o[5]*i+o[9]*r+o[13])*l,this.z=(o[2]*n+o[6]*i+o[10]*r+o[14])*l,this}applyQuaternion(t){const n=this.x,i=this.y,r=this.z,o=t.x,l=t.y,u=t.z,h=t.w,f=2*(l*r-u*i),p=2*(u*n-o*r),g=2*(o*i-l*n);return this.x=n+h*f+l*g-u*p,this.y=i+h*p+u*f-o*g,this.z=r+h*g+o*p-l*f,this}project(t){return this.applyMatrix4(t.matrixWorldInverse).applyMatrix4(t.projectionMatrix)}unproject(t){return this.applyMatrix4(t.projectionMatrixInverse).applyMatrix4(t.matrixWorld)}transformDirection(t){const n=this.x,i=this.y,r=this.z,o=t.elements;return this.x=o[0]*n+o[4]*i+o[8]*r,this.y=o[1]*n+o[5]*i+o[9]*r,this.z=o[2]*n+o[6]*i+o[10]*r,this.normalize()}divide(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this}divideScalar(t){return this.multiplyScalar(1/t)}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this}clamp(t,n){return this.x=mt(this.x,t.x,n.x),this.y=mt(this.y,t.y,n.y),this.z=mt(this.z,t.z,n.z),this}clampScalar(t,n){return this.x=mt(this.x,t,n),this.y=mt(this.y,t,n),this.z=mt(this.z,t,n),this}clampLength(t,n){const i=this.length();return this.divideScalar(i||1).multiplyScalar(mt(i,t,n))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,n){return this.x+=(t.x-this.x)*n,this.y+=(t.y-this.y)*n,this.z+=(t.z-this.z)*n,this}lerpVectors(t,n,i){return this.x=t.x+(n.x-t.x)*i,this.y=t.y+(n.y-t.y)*i,this.z=t.z+(n.z-t.z)*i,this}cross(t){return this.crossVectors(this,t)}crossVectors(t,n){const i=t.x,r=t.y,o=t.z,l=n.x,u=n.y,h=n.z;return this.x=r*h-o*u,this.y=o*l-i*h,this.z=i*u-r*l,this}projectOnVector(t){const n=t.lengthSq();if(n===0)return this.set(0,0,0);const i=t.dot(this)/n;return this.copy(t).multiplyScalar(i)}projectOnPlane(t){return xd.copy(this).projectOnVector(t),this.sub(xd)}reflect(t){return this.sub(xd.copy(t).multiplyScalar(2*this.dot(t)))}angleTo(t){const n=Math.sqrt(this.lengthSq()*t.lengthSq());if(n===0)return Math.PI/2;const i=this.dot(t)/n;return Math.acos(mt(i,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const n=this.x-t.x,i=this.y-t.y,r=this.z-t.z;return n*n+i*i+r*r}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)+Math.abs(this.z-t.z)}setFromSpherical(t){return this.setFromSphericalCoords(t.radius,t.phi,t.theta)}setFromSphericalCoords(t,n,i){const r=Math.sin(n)*t;return this.x=r*Math.sin(i),this.y=Math.cos(n)*t,this.z=r*Math.cos(i),this}setFromCylindrical(t){return this.setFromCylindricalCoords(t.radius,t.theta,t.y)}setFromCylindricalCoords(t,n,i){return this.x=t*Math.sin(n),this.y=i,this.z=t*Math.cos(n),this}setFromMatrixPosition(t){const n=t.elements;return this.x=n[12],this.y=n[13],this.z=n[14],this}setFromMatrixScale(t){const n=this.setFromMatrixColumn(t,0).length(),i=this.setFromMatrixColumn(t,1).length(),r=this.setFromMatrixColumn(t,2).length();return this.x=n,this.y=i,this.z=r,this}setFromMatrixColumn(t,n){return this.fromArray(t.elements,n*4)}setFromMatrix3Column(t,n){return this.fromArray(t.elements,n*3)}setFromEuler(t){return this.x=t._x,this.y=t._y,this.z=t._z,this}setFromColor(t){return this.x=t.r,this.y=t.g,this.z=t.b,this}equals(t){return t.x===this.x&&t.y===this.y&&t.z===this.z}fromArray(t,n=0){return this.x=t[n],this.y=t[n+1],this.z=t[n+2],this}toArray(t=[],n=0){return t[n]=this.x,t[n+1]=this.y,t[n+2]=this.z,t}fromBufferAttribute(t,n){return this.x=t.getX(n),this.y=t.getY(n),this.z=t.getZ(n),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const t=Math.random()*Math.PI*2,n=Math.random()*2-1,i=Math.sqrt(1-n*n);return this.x=i*Math.cos(t),this.y=n,this.z=i*Math.sin(t),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}},xd=new k,U1=new hi,Et=class Ry{static{Ry.prototype.isMatrix3=!0}constructor(t,n,i,r,o,l,u,h,f){this.elements=[1,0,0,0,1,0,0,0,1],t!==void 0&&this.set(t,n,i,r,o,l,u,h,f)}set(t,n,i,r,o,l,u,h,f){const p=this.elements;return p[0]=t,p[1]=r,p[2]=u,p[3]=n,p[4]=o,p[5]=h,p[6]=i,p[7]=l,p[8]=f,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(t){const n=this.elements,i=t.elements;return n[0]=i[0],n[1]=i[1],n[2]=i[2],n[3]=i[3],n[4]=i[4],n[5]=i[5],n[6]=i[6],n[7]=i[7],n[8]=i[8],this}extractBasis(t,n,i){return t.setFromMatrix3Column(this,0),n.setFromMatrix3Column(this,1),i.setFromMatrix3Column(this,2),this}setFromMatrix4(t){const n=t.elements;return this.set(n[0],n[4],n[8],n[1],n[5],n[9],n[2],n[6],n[10]),this}multiply(t){return this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyMatrices(t,n){const i=t.elements,r=n.elements,o=this.elements,l=i[0],u=i[3],h=i[6],f=i[1],p=i[4],g=i[7],m=i[2],v=i[5],b=i[8],w=r[0],S=r[3],_=r[6],C=r[1],A=r[4],E=r[7],P=r[2],N=r[5],O=r[8];return o[0]=l*w+u*C+h*P,o[3]=l*S+u*A+h*N,o[6]=l*_+u*E+h*O,o[1]=f*w+p*C+g*P,o[4]=f*S+p*A+g*N,o[7]=f*_+p*E+g*O,o[2]=m*w+v*C+b*P,o[5]=m*S+v*A+b*N,o[8]=m*_+v*E+b*O,this}multiplyScalar(t){const n=this.elements;return n[0]*=t,n[3]*=t,n[6]*=t,n[1]*=t,n[4]*=t,n[7]*=t,n[2]*=t,n[5]*=t,n[8]*=t,this}determinant(){const t=this.elements,n=t[0],i=t[1],r=t[2],o=t[3],l=t[4],u=t[5],h=t[6],f=t[7],p=t[8];return n*l*p-n*u*f-i*o*p+i*u*h+r*o*f-r*l*h}invert(){const t=this.elements,n=t[0],i=t[1],r=t[2],o=t[3],l=t[4],u=t[5],h=t[6],f=t[7],p=t[8],g=p*l-u*f,m=u*h-p*o,v=f*o-l*h,b=n*g+i*m+r*v;if(b===0)return this.set(0,0,0,0,0,0,0,0,0);const w=1/b;return t[0]=g*w,t[1]=(r*f-p*i)*w,t[2]=(u*i-r*l)*w,t[3]=m*w,t[4]=(p*n-r*h)*w,t[5]=(r*o-u*n)*w,t[6]=v*w,t[7]=(i*h-f*n)*w,t[8]=(l*n-i*o)*w,this}transpose(){let t;const n=this.elements;return t=n[1],n[1]=n[3],n[3]=t,t=n[2],n[2]=n[6],n[6]=t,t=n[5],n[5]=n[7],n[7]=t,this}getNormalMatrix(t){return this.setFromMatrix4(t).invert().transpose()}transposeIntoArray(t){const n=this.elements;return t[0]=n[0],t[1]=n[3],t[2]=n[6],t[3]=n[1],t[4]=n[4],t[5]=n[7],t[6]=n[2],t[7]=n[5],t[8]=n[8],this}setUvTransform(t,n,i,r,o,l,u){const h=Math.cos(o),f=Math.sin(o);return this.set(i*h,i*f,-i*(h*l+f*u)+l+t,-r*f,r*h,-r*(-f*l+h*u)+u+n,0,0,1),this}scale(t,n){return Gs("Matrix3: .scale() is deprecated. Use .makeScale() instead."),this.premultiply(_d.makeScale(t,n)),this}rotate(t){return Gs("Matrix3: .rotate() is deprecated. Use .makeRotation() instead."),this.premultiply(_d.makeRotation(-t)),this}translate(t,n){return Gs("Matrix3: .translate() is deprecated. Use .makeTranslation() instead."),this.premultiply(_d.makeTranslation(t,n)),this}makeTranslation(t,n){return t.isVector2?this.set(1,0,t.x,0,1,t.y,0,0,1):this.set(1,0,t,0,1,n,0,0,1),this}makeRotation(t){const n=Math.cos(t),i=Math.sin(t);return this.set(n,-i,0,i,n,0,0,0,1),this}makeScale(t,n){return this.set(t,0,0,0,n,0,0,0,1),this}equals(t){const n=this.elements,i=t.elements;for(let r=0;r<9;r++)if(n[r]!==i[r])return!1;return!0}fromArray(t,n=0){for(let i=0;i<9;i++)this.elements[i]=t[i+n];return this}toArray(t=[],n=0){const i=this.elements;return t[n]=i[0],t[n+1]=i[1],t[n+2]=i[2],t[n+3]=i[3],t[n+4]=i[4],t[n+5]=i[5],t[n+6]=i[6],t[n+7]=i[7],t[n+8]=i[8],t}clone(){return new this.constructor().fromArray(this.elements)}},_d=new Et,O1=new Et().set(.4123908,.3575843,.1804808,.212639,.7151687,.0721923,.0193308,.1191948,.9505322),F1=new Et().set(3.2409699,-1.5373832,-.4986108,-.9692436,1.8759675,.0415551,.0556301,-.20397
vendor: 5,220 bytes, line 9
97,1.0569715);function ZM(){const e={enabled:!0,workingColorSpace:Uc,spaces:{},convert:function(r,o,l){return this.enabled===!1||o===l||!o||!l||(this.spaces[o].transfer==="srgb"&&(r.r=ns(r.r),r.g=ns(r.g),r.b=ns(r.b)),this.spaces[o].primaries!==this.spaces[l].primaries&&(r.applyMatrix3(this.spaces[o].toXYZ),r.applyMatrix3(this.spaces[l].fromXYZ)),this.spaces[l].transfer==="srgb"&&(r.r=wl(r.r),r.g=wl(r.g),r.b=wl(r.b))),r},workingToColorSpace:function(r,o){return this.convert(r,this.workingColorSpace,o)},colorSpaceToWorking:function(r,o){return this.convert(r,o,this.workingColorSpace)},getPrimaries:function(r){return this.spaces[r].primaries},getTransfer:function(r){return r===""?Oc:this.spaces[r].transfer},getToneMappingMode:function(r){return this.spaces[r].outputColorSpaceConfig.toneMappingMode||"standard"},getLuminanceCoefficients:function(r,o=this.workingColorSpace){return r.fromArray(this.spaces[o].luminanceCoefficients)},define:function(r){Object.assign(this.spaces,r)},_getMatrix:function(r,o,l){return r.copy(this.spaces[o].toXYZ).multiply(this.spaces[l].fromXYZ)},_getDrawingBufferColorSpace:function(r){return this.spaces[r].outputColorSpaceConfig.drawingBufferColorSpace},_getUnpackColorSpace:function(r=this.workingColorSpace){return this.spaces[r].workingColorSpaceConfig.unpackColorSpace},fromWorkingColorSpace:function(r,o){return Gs("ColorManagement: .fromWorkingColorSpace() has been renamed to .workingToColorSpace()."),e.workingToColorSpace(r,o)},toWorkingColorSpace:function(r,o){return Gs("ColorManagement: .toWorkingColorSpace() has been renamed to .colorSpaceToWorking()."),e.colorSpaceToWorking(r,o)}},t=[.64,.33,.3,.6,.15,.06],n=[.2126,.7152,.0722],i=[.3127,.329];return e.define({[Uc]:{primaries:t,whitePoint:i,transfer:Oc,toXYZ:O1,fromXYZ:F1,luminanceCoefficients:n,workingColorSpaceConfig:{unpackColorSpace:ci},outputColorSpaceConfig:{drawingBufferColorSpace:ci}},[ci]:{primaries:t,whitePoint:i,transfer:Fc,toXYZ:O1,fromXYZ:F1,luminanceCoefficients:n,outputColorSpaceConfig:{drawingBufferColorSpace:ci}}}),e}var Nt=ZM();function ns(e){return e<.04045?e*.0773993808:Math.pow(e*.9478672986+.0521327014,2.4)}function wl(e){return e<.0031308?e*12.92:1.055*Math.pow(e,.41666)-.055}var Zo,Iy=class{static getDataURL(e,t="image/png"){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement>"u")return e.src;let n;if(e instanceof HTMLCanvasElement)n=e;else{Zo===void 0&&(Zo=kc("canvas")),Zo.width=e.width,Zo.height=e.height;const i=Zo.getContext("2d");e instanceof ImageData?i.putImageData(e,0,0):i.drawImage(e,0,0,e.width,e.height),n=Zo}return n.toDataURL(t)}static sRGBToLinear(e){if(typeof HTMLImageElement<"u"&&e instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&e instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&e instanceof ImageBitmap){const t=kc("canvas");t.width=e.width,t.height=e.height;const n=t.getContext("2d");n.drawImage(e,0,0,e.width,e.height);const i=n.getImageData(0,0,e.width,e.height),r=i.data;for(let o=0;o<r.length;o++)r[o]=ns(r[o]/255)*255;return n.putImageData(i,0,0),t}else if(e.data){const t=e.data.slice(0);for(let n=0;n<t.length;n++)t instanceof Uint8Array||t instanceof Uint8ClampedArray?t[n]=Math.floor(ns(t[n]/255)*255):t[n]=ns(t[n]);return{data:t,width:e.width,height:e.height}}else return Ue("ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied."),e}},JM=0,zs=class{constructor(e=null){this.isSource=!0,Object.defineProperty(this,"id",{value:JM++}),this.uuid=Oi(),this.data=e,this.dataReady=!0,this.version=0}getSize(e){const t=this.data;return typeof HTMLVideoElement<"u"&&t instanceof HTMLVideoElement?e.set(t.videoWidth,t.videoHeight,0):typeof VideoFrame<"u"&&t instanceof VideoFrame?e.set(t.displayWidth,t.displayHeight,0):t!==null?e.set(t.width,t.height,t.depth||0):e.set(0,0,0),e}set needsUpdate(e){e===!0&&this.version++}toJSON(e){const t=e===void 0||typeof e=="string";if(!t&&e.images[this.uuid]!==void 0)return e.images[this.uuid];const n={uuid:this.uuid,url:""},i=this.data;if(i!==null){let r;if(Array.isArray(i)){r=[];for(let o=0,l=i.length;o<l;o++)i[o].isDataTexture?r.push(bd(i[o].image)):r.push(bd(i[o]))}else r=bd(i);n.url=r}return t||(e.images[this.uuid]=n),n}};function bd(e){return typeof HTMLImageElement<"u"&&e instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&e instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&e instanceof ImageBitmap?Iy.getDataURL(e):e.data?{data:Array.from(e.data),width:e.width,height:e.height,type:e.data.constructor.name}:(Ue("Texture: Unable to serialize Texture."),{})}var KM=0,Sd=new k,Ln=class Ph extends dr{constructor(t=Ph.DEFAULT_IMAGE,n=Ph.DEFAULT_MAPPING,i=bi,r=bi,o=mn,l=Ll,u=ss,h=ts,f=Ph.DEFAULT_ANISOTROPY,p=""){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:KM++}),this.uuid=Oi(),this.name="",this.source=new zs(t),this.mipmaps=[],this.mapping=n,this.channel=0,this.wrapS=i,this.wrapT=r,this.magFilter=o,this.minFilter=l,this.anisotropy=f,this.format=u,this.internalFormat=null,this.type=h,this.offset=new ye(0,0),this.repeat=new ye(1,1),this.center=new ye(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new Et,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.colorSpace
vendor: 17,748 bytes, line 9
9=p,this.userData={},this.updateRanges=[],this.version=0,this.onUpdate=null,this.renderTarget=null,this.isRenderTargetTexture=!1,this.isArrayTexture=!!(t&&t.depth&&t.depth>1),this.pmremVersion=0,this.normalized=!1}get width(){return this.source.getSize(Sd).x}get height(){return this.source.getSize(Sd).y}get depth(){return this.source.getSize(Sd).z}get image(){return this.source.data}set image(t){this.source.data=t}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}addUpdateRange(t,n){this.updateRanges.push({start:t,count:n})}clearUpdateRanges(){this.updateRanges.length=0}clone(){return new this.constructor().copy(this)}copy(t){return this.name=t.name,this.source=t.source,this.mipmaps=t.mipmaps.slice(0),this.mapping=t.mapping,this.channel=t.channel,this.wrapS=t.wrapS,this.wrapT=t.wrapT,this.magFilter=t.magFilter,this.minFilter=t.minFilter,this.anisotropy=t.anisotropy,this.format=t.format,this.internalFormat=t.internalFormat,this.type=t.type,this.normalized=t.normalized,this.offset.copy(t.offset),this.repeat.copy(t.repeat),this.center.copy(t.center),this.rotation=t.rotation,this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrix.copy(t.matrix),this.generateMipmaps=t.generateMipmaps,this.premultiplyAlpha=t.premultiplyAlpha,this.flipY=t.flipY,this.unpackAlignment=t.unpackAlignment,this.colorSpace=t.colorSpace,this.renderTarget=t.renderTarget,this.isRenderTargetTexture=t.isRenderTargetTexture,this.isArrayTexture=t.isArrayTexture,this.userData=JSON.parse(JSON.stringify(t.userData)),this.needsUpdate=!0,this}setValues(t){for(const n in t){const i=t[n];if(i===void 0){Ue(`Texture.setValues(): parameter '${n}' has value of undefined.`);continue}const r=this[n];if(r===void 0){Ue(`Texture.setValues(): property '${n}' does not exist.`);continue}r&&i&&r.isVector2&&i.isVector2||r&&i&&r.isVector3&&i.isVector3||r&&i&&r.isMatrix3&&i.isMatrix3?r.copy(i):this[n]=i}}toJSON(t){const n=t===void 0||typeof t=="string";if(!n&&t.textures[this.uuid]!==void 0)return t.textures[this.uuid];const i={metadata:{version:4.7,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,image:this.source.toJSON(t).uuid,mapping:this.mapping,channel:this.channel,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,internalFormat:this.internalFormat,type:this.type,normalized:this.normalized,colorSpace:this.colorSpace,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,generateMipmaps:this.generateMipmaps,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};return Object.keys(this.userData).length>0&&(i.userData=this.userData),n||(t.textures[this.uuid]=i),i}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(t){if(this.mapping!==300)return t;if(t.applyMatrix3(this.matrix),t.x<0||t.x>1)switch(this.wrapS){case Ic:t.x=t.x-Math.floor(t.x);break;case bi:t.x=t.x<0?0:1;break;case Pc:Math.abs(Math.floor(t.x)%2)===1?t.x=Math.ceil(t.x)-t.x:t.x=t.x-Math.floor(t.x);break}if(t.y<0||t.y>1)switch(this.wrapT){case Ic:t.y=t.y-Math.floor(t.y);break;case bi:t.y=t.y<0?0:1;break;case Pc:Math.abs(Math.floor(t.y)%2)===1?t.y=Math.ceil(t.y)-t.y:t.y=t.y-Math.floor(t.y);break}return this.flipY&&(t.y=1-t.y),t}set needsUpdate(t){t===!0&&(this.version++,this.source.needsUpdate=!0)}set needsPMREMUpdate(t){t===!0&&this.pmremVersion++}};Ln.DEFAULT_IMAGE=null;Ln.DEFAULT_MAPPING=300;Ln.DEFAULT_ANISOTROPY=1;var tn=class Py{static{Py.prototype.isVector4=!0}constructor(t=0,n=0,i=0,r=1){this.x=t,this.y=n,this.z=i,this.w=r}get width(){return this.z}set width(t){this.z=t}get height(){return this.w}set height(t){this.w=t}set(t,n,i,r){return this.x=t,this.y=n,this.z=i,this.w=r,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this.w=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setW(t){return this.w=t,this}setComponent(t,n){switch(t){case 0:this.x=n;break;case 1:this.y=n;break;case 2:this.z=n;break;case 3:this.w=n;break;default:throw new Error("THREE.Vector4: index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("THREE.Vector4: index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=t.w!==void 0?t.w:1,this}add(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this.w+=t.w,this}addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this.w+=t,this}addVectors(t,n){return this.x=t.x+n.x,this.y=t.y+n.y,this.z=t.z+n.z,this.w=t.w+n.w,this}addScaledVector(t,n){return this.x+=t.x*n,this.y+=t.y*n,this.z+=t.z*n,this.w+=t.w*n,this}sub(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this.w-=t.w,this}subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this.w-=t,this}subVectors(t,n){return this.x=t.x-n.x,this.y=t.y-n.y,this.z=t.z-n.z,this.w=t.w-n.w,this}multiply(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this.w*=t.w,this}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this}applyMatrix4(t){const n=this.x,i=this.y,r=this.z,o=this.w,l=t.elements;return this.x=l[0]*n+l[4]*i+l[8]*r+l[12]*o,this.y=l[1]*n+l[5]*i+l[9]*r+l[13]*o,this.z=l[2]*n+l[6]*i+l[10]*r+l[14]*o,this.w=l[3]*n+l[7]*i+l[11]*r+l[15]*o,this}divide(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this.w/=t.w,this}divideScalar(t){return this.multiplyScalar(1/t)}setAxisAngleFromQuaternion(t){this.w=2*Math.acos(t.w);const n=Math.sqrt(1-t.w*t.w);return n<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=t.x/n,this.y=t.y/n,this.z=t.z/n),this}setAxisAngleFromRotationMatrix(t){let n,i,r,o;const h=t.elements,f=h[0],p=h[4],g=h[8],m=h[1],v=h[5],b=h[9],w=h[2],S=h[6],_=h[10];if(Math.abs(p-m)<.01&&Math.abs(g-w)<.01&&Math.abs(b-S)<.01){if(Math.abs(p+m)<.1&&Math.abs(g+w)<.1&&Math.abs(b+S)<.1&&Math.abs(f+v+_-3)<.1)return this.set(1,0,0,0),this;n=Math.PI;const A=(f+1)/2,E=(v+1)/2,P=(_+1)/2,N=(p+m)/4,O=(g+w)/4,T=(b+S)/4;return A>E&&A>P?A<.01?(i=0,r=.707106781,o=.707106781):(i=Math.sqrt(A),r=N/i,o=O/i):E>P?E<.01?(i=.707106781,r=0,o=.707106781):(r=Math.sqrt(E),i=N/r,o=T/r):P<.01?(i=.707106781,r=.707106781,o=0):(o=Math.sqrt(P),i=O/o,r=T/o),this.set(i,r,o,n),this}let C=Math.sqrt((S-b)*(S-b)+(g-w)*(g-w)+(m-p)*(m-p));return Math.abs(C)<.001&&(C=1),this.x=(S-b)/C,this.y=(g-w)/C,this.z=(m-p)/C,this.w=Math.acos((f+v+_-1)/2),this}setFromMatrixPosition(t){const n=t.elements;return this.x=n[12],this.y=n[13],this.z=n[14],this.w=n[15],this}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this.w=Math.min(this.w,t.w),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this.w=Math.max(this.w,t.w),this}clamp(t,n){return this.x=mt(this.x,t.x,n.x),this.y=mt(this.y,t.y,n.y),this.z=mt(this.z,t.z,n.z),this.w=mt(this.w,t.w,n.w),this}clampScalar(t,n){return this.x=mt(this.x,t,n),this.y=mt(this.y,t,n),this.z=mt(this.z,t,n),this.w=mt(this.w,t,n),this}clampLength(t,n){const i=this.length();return this.divideScalar(i||1).multiplyScalar(mt(i,t,n))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,n){return this.x+=(t.x-this.x)*n,this.y+=(t.y-this.y)*n,this.z+=(t.z-this.z)*n,this.w+=(t.w-this.w)*n,this}lerpVectors(t,n,i){return this.x=t.x+(n.x-t.x)*i,this.y=t.y+(n.y-t.y)*i,this.z=t.z+(n.z-t.z)*i,this.w=t.w+(n.w-t.w)*i,this}equals(t){return t.x===this.x&&t.y===this.y&&t.z===this.z&&t.w===this.w}fromArray(t,n=0){return this.x=t[n],this.y=t[n+1],this.z=t[n+2],this.w=t[n+3],this}toArray(t=[],n=0){return t[n]=this.x,t[n+1]=this.y,t[n+2]=this.z,t[n+3]=this.w,t}fromBufferAttribute(t,n){return this.x=t.getX(n),this.y=t.getY(n),this.z=t.getZ(n),this.w=t.getW(n),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}},i0=class extends dr{constructor(e=1,t=1,n={}){super(),n=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:mn,depthBuffer:!0,stencilBuffer:!1,resolveDepthBuffer:!0,resolveStencilBuffer:!0,depthTexture:null,samples:0,count:1,depth:1,multiview:!1,useArrayDepthTexture:!1},n),this.isRenderTarget=!0,this.width=e,this.height=t,this.depth=n.depth,this.scissor=new tn(0,0,e,t),this.scissorTest=!1,this.viewport=new tn(0,0,e,t),this.textures=[];const i={width:e,height:t,depth:n.depth},r=new Ln(i),o=n.count;for(let l=0;l<o;l++)this.textures[l]=r.clone(),this.textures[l].isRenderTargetTexture=!0,this.textures[l].renderTarget=this;this._setTextureOptions(n),this.depthBuffer=n.depthBuffer,this.stencilBuffer=n.stencilBuffer,this.resolveDepthBuffer=n.resolveDepthBuffer,this.resolveStencilBuffer=n.resolveStencilBuffer,this._depthTexture=null,this.depthTexture=n.depthTexture,this.samples=n.samples,this.multiview=n.multiview,this.useArrayDepthTexture=n.useArrayDepthTexture}_setTextureOptions(e={}){const t={minFilter:mn,generateMipmaps:!1,flipY:!1,internalFormat:null};e.mapping!==void 0&&(t.mapping=e.mapping),e.wrapS!==void 0&&(t.wrapS=e.wrapS),e.wrapT!==void 0&&(t.wrapT=e.wrapT),e.wrapR!==void 0&&(t.wrapR=e.wrapR),e.magFilter!==void 0&&(t.magFilter=e.magFilter),e.minFilter!==void 0&&(t.minFilter=e.minFilter),e.format!==void 0&&(t.format=e.format),e.type!==void 0&&(t.type=e.type),e.anisotropy!==void 0&&(t.anisotropy=e.anisotropy),e.colorSpace!==void 0&&(t.colorSpace=e.colorSpace),e.flipY!==void 0&&(t.flipY=e.flipY),e.generateMipmaps!==void 0&&(t.generateMipmaps=e.generateMipmaps),e.internalFormat!==void 0&&(t.internalFormat=e.internalFormat);for(let n=0;n<this.textures.length;n++)this.textures[n].setValues(t)}get texture(){return this.textures[0]}set texture(e){this.textures[0]=e}set depthTexture(e){this._depthTexture!==null&&(this._depthTexture.renderTarget=null),e!==null&&(e.renderTarget=this),this._depthTexture=e}get depthTexture(){return this._depthTexture}setSize(e,t,n=1){if(this.width!==e||this.height!==t||this.depth!==n){this.width=e,this.height=t,this.depth=n;for(let i=0,r=this.textures.length;i<r;i++)this.textures[i].image.width=e,this.textures[i].image.height=t,this.textures[i].image.depth=n,this.textures[i].isData3DTexture!==!0&&(this.textures[i].isArrayTexture=this.textures[i].image.depth>1);this.dispose()}this.viewport.set(0,0,e,t),this.scissor.set(0,0,e,t)}clone(){return new this.constructor().copy(this)}copy(e){this.width=e.width,this.height=e.height,this.depth=e.depth,this.scissor.copy(e.scissor),this.scissorTest=e.scissorTest,this.viewport.copy(e.viewport),this.textures.length=0;for(let t=0,n=e.textures.length;t<n;t++){this.textures[t]=e.textures[t].clone(),this.textures[t].isRenderTargetTexture=!0,this.textures[t].renderTarget=this;const i=Object.assign({},e.textures[t].image);this.textures[t].source=new zs(i)}return this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,this.resolveDepthBuffer=e.resolveDepthBuffer,this.resolveStencilBuffer=e.resolveStencilBuffer,e.depthTexture!==null&&(this.depthTexture=e.depthTexture.clone()),this.samples=e.samples,this.multiview=e.multiview,this.useArrayDepthTexture=e.useArrayDepthTexture,this}dispose(){this.dispatchEvent({type:"dispose"})}},Fi=class extends i0{constructor(e=1,t=1,n={}){super(e,t,n),this.isWebGLRenderTarget=!0}},Yh=class extends Ln{constructor(e=null,t=1,n=1,i=1){super(null),this.isDataArrayTexture=!0,this.image={data:e,width:t,height:n,depth:i},this.magFilter=In,this.minFilter=In,this.wrapR=bi,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1,this.layerUpdates=new Set}addLayerUpdate(e){this.layerUpdates.add(e)}clearLayerUpdates(){this.layerUpdates.clear()}},QM=class extends Fi{constructor(e=1,t=1,n=1,i={}){super(e,t,i),this.isWebGLArrayRenderTarget=!0,this.depth=n,this.texture=new Yh(null,e,t,n),this._setTextureOptions(i),this.texture.isRenderTargetTexture=!0}},$h=class extends Ln{constructor(e=null,t=1,n=1,i=1){super(null),this.isData3DTexture=!0,this.image={data:e,width:t,height:n,depth:i},this.magFilter=In,this.minFilter=In,this.wrapR=bi,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}},e4=class extends Fi{constructor(e=1,t=1,n=1,i={}){super(e,t,i),this.isWebGL3DRenderTarget=!0,this.depth=n,this.texture=new $h(null,e,t,n),this._setTextureOptions(i),this.texture.isRenderTargetTexture=!0}},_t=class Mp{static{Mp.prototype.isMatrix4=!0}constructor(t,n,i,r,o,l,u,h,f,p,g,m,v,b,w,S){this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],t!==void 0&&this.set(t,n,i,r,o,l,u,h,f,p,g,m,v,b,w,S)}set(t,n,i,r,o,l,u,h,f,p,g,m,v,b,w,S){const _=this.elements;return _[0]=t,_[4]=n,_[8]=i,_[12]=r,_[1]=o,_[5]=l,_[9]=u,_[13]=h,_[2]=f,_[6]=p,_[10]=g,_[14]=m,_[3]=v,_[7]=b,_[11]=w,_[15]=S,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new Mp().fromArray(this.elements)}copy(t){const n=this.elements,i=t.elements;return n[0]=i[0],n[1]=i[1],n[2]=i[2],n[3]=i[3],n[4]=i[4],n[5]=i[5],n[6]=i[6],n[7]=i[7],n[8]=i[8],n[9]=i[9],n[10]=i[10],n[11]=i[11],n[12]=i[12],n[13]=i[13],n[14]=i[14],n[15]=i[15],this}copyPosition(t){const n=this.elements,i=t.elements;return n[12]=i[12],n[13]=i[13],n[14]=i[14],this}setFromMatrix3(t){const n=t.elements;return this.set(n[0],n[3],n[6],0,n[1],n[4],n[7],0,n[2],n[5],n[8],0,0,0,0,1),this}extractBasis(t,n,i){return this.determinantAffine()===0?(t.set(1,0,0),n.set(0,1,0),i.set(0,0,1),this):(t.setFromMatrixColumn(this,0),n.setFromMatrixColumn(this,1),i.setFromMatrixColumn(this,2),this)}makeBasis(t,n,i){return this.set(t.x,n.x,i.x,0,t.y,n.y,i.y,0,t.z,n.z,i.z,0,0,0,0,1),this}extractRotation(t){if(t.determinantAffine()===0)return this.identity();const n=this.elements,i=t.elements,r=1/Jo.setFromMatrixColumn(t,0).length(),o=1/Jo.setFromMatrixColumn(t,1).length(),l=1/Jo.setFromMatrixColumn(t,2).length();return n[0]=i[0]*r,n[1]=i[1]*r,n[2]=i[2]*r,n[3]=0,n[4]=i[4]*o,n[5]=i[5]*o,n[6]=i[6]*o,n[7]=0,n[8]=i[8]*l,n[9]=i[9]*l,n[10]=i[10]*l,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,this}makeRotationFromEuler(t){const n=this.elements,i=t.x,r=t.y,o=t.z,l=Math.cos(i),u=Math.sin(i),h=Math.cos(r),f=Math.sin(r),p=Math.cos(o),g=Math.sin(o);if(t.order==="XYZ"){const m=l*p,v=l*g,b=u*p,w=u*g;n[0]=h*p,n[4]=-h*g,n[8]=f,n[1]=v+b*f,n[5]=m-w*f,n[9]=-u*h,n[2]=w-m*f,n[6]=b+v*f,n[10]=l*h}else if(t.order==="YXZ"){const m=h*p,v=h*g,b=f*p,w=f*g;n[0]=m+w*u,n[4]=b*u-v,n[8]=l*f,n[1]=l*g,n[5]=l*p,n[9]=-u,n[2]=v*u-b,n[6]=w+m*u,n[10]=l*h}else if(t.order==="ZXY"){const m=h*p,v=h*g,b=f*p,w=f*g;n[0]=m-w*u,n[4]=-l*g,n[8]=b+v*u,n[1]=v+b*u,n[5]=l*p,n[9]=w-m*u,n[2]=-l*f,n[6]=u,n[10]=l*h}else if(t.order==="ZYX"){const m=l*p,v=l*g,b=u*p,w=u*g;n[0]=h*p,n[4]=b*f-v,n[8]=m*f+w,n[1]=h*g,n[5]=w*f+m,n[9]=v*f-b,n[2]=-f,n[6]=u*h,n[10]=l*h}else if(t.order==="YZX"){const m=l*h,v=l*f,b=u*h,w=u*f;n[0]=h*p,n[4]=w-m*g,n[8]=b*g+v,n[1]=g,n[5]=l*p,n[9]=-u*p,n[2]=-f*p,n[6]=v*g+b,n[10]=m-w*g}else if(t.order==="XZY"){const m=l*h,v=l*f,b=u*h,w=u*f;n[0]=h*p,n[4]=-g,n[8]=f*p,n[1]=m*g+w,n[5]=l*p,n[9]=v*g-b,n[2]=b*g-v,n[6]=u*p,n[10]=w*g+m}return n[3]=0,n[7]=0,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,this}makeRotationFromQuaternion(t){return this.compose(t4,t,n4)}lookAt(t,n,i){const r=this.elements;return Di.subVectors(t,n),Di.lengthSq()===0&&(Di.z=1),Di.normalize(),Is.crossVectors(i,Di),Is.lengthSq()===0&&(Math.abs(i.z)===1?Di.x+=1e-4:Di.z+=1e-4,Di.normalize(),Is.crossVectors(i,Di)),Is.normalize(),Uu.crossVectors(Di,Is),r[0]=Is.x,r[4]=Uu.x,r[8]=Di.x,r[1]=Is.y,r[5]=Uu.y,r[9]=Di.y,r[2]=Is.z,r[6]=Uu.z,r[10]=Di.z,this}multiply(t){return this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyMatrices(t,n){const i=t.elements,r=n.elements,o=this.elements,l=i[0],u=i[4],h=i[8],f=i[12],p=i[1],g=i[5],m=i[9],v=i[13],b=i[2],w=i[6],S=i[10],_=i[14],C=i[3],A=i[7],E=i[11],P=i[15],N=r[0],O=r[4],T=r[8],R=r[12],B=r[1],F=r[5],j=r[9],H=r[13],Y=r[2],q=r[6],te=r[10],J=r[14],he=r[3],ue=r[7],ce=r[11],me=r[15];return o[0]=l*N+u*B+h*Y+f*he,o[4]=l*O+u*F+h*q+f*ue,o[8]=l*T+u*j+h*te+f*ce,o[12]=l*R+u*H+h*J+f*me,o[1]=p*N+g*B+m*Y+v*he,o[5]=p*O+g*F+m*q+v*ue,o[9]=p*T+g*j+m*te+v*ce,o[13]=p*R+g*H+m*J+v*me,o[2]=b*N+w*B+S*Y+_*he,o[6]=b*O+w*F+S*q+_*ue,o[10]=b*T+w*j+S*te+_*ce,o[14]=b*R+w*H+S*J+_*me,o[3]=C*N+A*B+E*Y+P*he,o[7]=C*O+A*F+E*q+P*ue,o[11]=C*T+A*j+E*te+P*ce,o[15]=C*R+A*H+E*J+P*me,this}multiplyScalar(t){const n=this.elements;return n[0]*=t,n[4]*=t,n[8]*=t,n[12]*=t,n[1]*=t,n[5]*=t,n[9]*=t,n[13]*=t,n[2]*=t,n[6]*=t,n[10]*=t,n[14]*=t,n[3]*=t,n[7]*=t,n[11]*=t,n[15]*=t,this}determinant(){const t=this.elements,n=t[0],i=t[4],r=t[8],o=t[12],l=t[1],u=t[5],h=t[9],f=t[13],p=t[2],g=t[6],m=t[10],v=t[14],b=t[3],w=t[7],S=t[11],_=t[15],C=h*v-f*m,A=u*v-f*g,E=u*m-h*g,P=l*v-f*p,N=l*m-h*p,O=l*g-u*p;return n*(w*C-S*A+_*E)-i*(b*C-S*P+_*N)+r*(b*A-w*P+_*O)-o*(b*E-w*N+S*O)}
vendor: 1,077 bytes, line 9
9determinantAffine(){const t=this.elements,n=t[0],i=t[4],r=t[8],o=t[1],l=t[5],u=t[9],h=t[2],f=t[6],p=t[10];return n*(l*p-u*f)-i*(o*p-u*h)+r*(o*f-l*h)}transpose(){const t=this.elements;let n;return n=t[1],t[1]=t[4],t[4]=n,n=t[2],t[2]=t[8],t[8]=n,n=t[6],t[6]=t[9],t[9]=n,n=t[3],t[3]=t[12],t[12]=n,n=t[7],t[7]=t[13],t[13]=n,n=t[11],t[11]=t[14],t[14]=n,this}setPosition(t,n,i){const r=this.elements;return t.isVector3?(r[12]=t.x,r[13]=t.y,r[14]=t.z):(r[12]=t,r[13]=n,r[14]=i),this}invert(){const t=this.elements,n=t[0],i=t[1],r=t[2],o=t[3],l=t[4],u=t[5],h=t[6],f=t[7],p=t[8],g=t[9],m=t[10],v=t[11],b=t[12],w=t[13],S=t[14],_=t[15],C=n*u-i*l,A=n*h-r*l,E=n*f-o*l,P=i*h-r*u,N=i*f-o*u,O=r*f-o*h,T=p*w-g*b,R=p*S-m*b,B=p*_-v*b,F=g*S-m*w,j=g*_-v*w,H=m*_-v*S,Y=C*H-A*j+E*F+P*B-N*R+O*T;if(Y===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const q=1/Y;return t[0]=(u*H-h*j+f*F)*q,t[1]=(r*j-i*H-o*F)*q,t[2]=(w*O-S*N+_*P)*q,t[3]=(m*N-g*O-v*P)*q,t[4]=(h*B-l*H-f*R)*q,t[5]=(n*H-r*B+o*R)*q,t[6]=(S*E-b*O-_*A)*q,t[7]=(p*O-m*E+v*A)*q,t[8]=(l*j-u*B+f*T)*q,t[9]=(i*B-n*j-o*T)*q,t[10]=(b*N-w*E+_*C)
vendor: 27,345 bytes, line 9
9*q,t[11]=(g*E-p*N-v*C)*q,t[12]=(u*R-l*F-h*T)*q,t[13]=(n*F-i*R+r*T)*q,t[14]=(w*A-b*P-S*C)*q,t[15]=(p*P-g*A+m*C)*q,this}scale(t){const n=this.elements,i=t.x,r=t.y,o=t.z;return n[0]*=i,n[4]*=r,n[8]*=o,n[1]*=i,n[5]*=r,n[9]*=o,n[2]*=i,n[6]*=r,n[10]*=o,n[3]*=i,n[7]*=r,n[11]*=o,this}getMaxScaleOnAxis(){const t=this.elements,n=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],i=t[4]*t[4]+t[5]*t[5]+t[6]*t[6],r=t[8]*t[8]+t[9]*t[9]+t[10]*t[10];return Math.sqrt(Math.max(n,i,r))}makeTranslation(t,n,i){return t.isVector3?this.set(1,0,0,t.x,0,1,0,t.y,0,0,1,t.z,0,0,0,1):this.set(1,0,0,t,0,1,0,n,0,0,1,i,0,0,0,1),this}makeRotationX(t){const n=Math.cos(t),i=Math.sin(t);return this.set(1,0,0,0,0,n,-i,0,0,i,n,0,0,0,0,1),this}makeRotationY(t){const n=Math.cos(t),i=Math.sin(t);return this.set(n,0,i,0,0,1,0,0,-i,0,n,0,0,0,0,1),this}makeRotationZ(t){const n=Math.cos(t),i=Math.sin(t);return this.set(n,-i,0,0,i,n,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(t,n){const i=Math.cos(n),r=Math.sin(n),o=1-i,l=t.x,u=t.y,h=t.z,f=o*l,p=o*u;return this.set(f*l+i,f*u-r*h,f*h+r*u,0,f*u+r*h,p*u+i,p*h-r*l,0,f*h-r*u,p*h+r*l,o*h*h+i,0,0,0,0,1),this}makeScale(t,n,i){return this.set(t,0,0,0,0,n,0,0,0,0,i,0,0,0,0,1),this}makeShear(t,n,i,r,o,l){return this.set(1,i,o,0,t,1,l,0,n,r,1,0,0,0,0,1),this}compose(t,n,i){const r=this.elements,o=n._x,l=n._y,u=n._z,h=n._w,f=o+o,p=l+l,g=u+u,m=o*f,v=o*p,b=o*g,w=l*p,S=l*g,_=u*g,C=h*f,A=h*p,E=h*g,P=i.x,N=i.y,O=i.z;return r[0]=(1-(w+_))*P,r[1]=(v+E)*P,r[2]=(b-A)*P,r[3]=0,r[4]=(v-E)*N,r[5]=(1-(m+_))*N,r[6]=(S+C)*N,r[7]=0,r[8]=(b+A)*O,r[9]=(S-C)*O,r[10]=(1-(m+w))*O,r[11]=0,r[12]=t.x,r[13]=t.y,r[14]=t.z,r[15]=1,this}decompose(t,n,i){const r=this.elements;t.x=r[12],t.y=r[13],t.z=r[14];const o=this.determinantAffine();if(o===0)return i.set(1,1,1),n.identity(),this;let l=Jo.set(r[0],r[1],r[2]).length();const u=Jo.set(r[4],r[5],r[6]).length(),h=Jo.set(r[8],r[9],r[10]).length();o<0&&(l=-l),or.copy(this);const f=1/l,p=1/u,g=1/h;return or.elements[0]*=f,or.elements[1]*=f,or.elements[2]*=f,or.elements[4]*=p,or.elements[5]*=p,or.elements[6]*=p,or.elements[8]*=g,or.elements[9]*=g,or.elements[10]*=g,n.setFromRotationMatrix(or),i.x=l,i.y=u,i.z=h,this}makePerspective(t,n,i,r,o,l,u=Ws,h=!1){const f=this.elements,p=2*o/(n-t),g=2*o/(i-r),m=(n+t)/(n-t),v=(i+r)/(i-r);let b,w;if(h)b=o/(l-o),w=l*o/(l-o);else if(u===2e3)b=-(l+o)/(l-o),w=-2*l*o/(l-o);else if(u===2001)b=-l/(l-o),w=-l*o/(l-o);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+u);return f[0]=p,f[4]=0,f[8]=m,f[12]=0,f[1]=0,f[5]=g,f[9]=v,f[13]=0,f[2]=0,f[6]=0,f[10]=b,f[14]=w,f[3]=0,f[7]=0,f[11]=-1,f[15]=0,this}makeOrthographic(t,n,i,r,o,l,u=Ws,h=!1){const f=this.elements,p=2/(n-t),g=2/(i-r),m=-(n+t)/(n-t),v=-(i+r)/(i-r);let b,w;if(h)b=1/(l-o),w=l/(l-o);else if(u===2e3)b=-2/(l-o),w=-(l+o)/(l-o);else if(u===2001)b=-1/(l-o),w=-o/(l-o);else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+u);return f[0]=p,f[4]=0,f[8]=0,f[12]=m,f[1]=0,f[5]=g,f[9]=0,f[13]=v,f[2]=0,f[6]=0,f[10]=b,f[14]=w,f[3]=0,f[7]=0,f[11]=0,f[15]=1,this}equals(t){const n=this.elements,i=t.elements;for(let r=0;r<16;r++)if(n[r]!==i[r])return!1;return!0}fromArray(t,n=0){for(let i=0;i<16;i++)this.elements[i]=t[i+n];return this}toArray(t=[],n=0){const i=this.elements;return t[n]=i[0],t[n+1]=i[1],t[n+2]=i[2],t[n+3]=i[3],t[n+4]=i[4],t[n+5]=i[5],t[n+6]=i[6],t[n+7]=i[7],t[n+8]=i[8],t[n+9]=i[9],t[n+10]=i[10],t[n+11]=i[11],t[n+12]=i[12],t[n+13]=i[13],t[n+14]=i[14],t[n+15]=i[15],t}},Jo=new k,or=new _t,t4=new k(0,0,0),n4=new k(1,1,1),Is=new k,Uu=new k,Di=new k,k1=new _t,B1=new hi,as=class Ny{constructor(t=0,n=0,i=0,r=Ny.DEFAULT_ORDER){this.isEuler=!0,this._x=t,this._y=n,this._z=i,this._order=r}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get order(){return this._order}set order(t){this._order=t,this._onChangeCallback()}set(t,n,i,r=this._order){return this._x=t,this._y=n,this._z=i,this._order=r,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(t){return this._x=t._x,this._y=t._y,this._z=t._z,this._order=t._order,this._onChangeCallback(),this}setFromRotationMatrix(t,n=this._order,i=!0){const r=t.elements,o=r[0],l=r[4],u=r[8],h=r[1],f=r[5],p=r[9],g=r[2],m=r[6],v=r[10];switch(n){case"XYZ":this._y=Math.asin(mt(u,-1,1)),Math.abs(u)<.9999999?(this._x=Math.atan2(-p,v),this._z=Math.atan2(-l,o)):(this._x=Math.atan2(m,f),this._z=0);break;case"YXZ":this._x=Math.asin(-mt(p,-1,1)),Math.abs(p)<.9999999?(this._y=Math.atan2(u,v),this._z=Math.atan2(h,f)):(this._y=Math.atan2(-g,o),this._z=0);break;case"ZXY":this._x=Math.asin(mt(m,-1,1)),Math.abs(m)<.9999999?(this._y=Math.atan2(-g,v),this._z=Math.atan2(-l,f)):(this._y=0,this._z=Math.atan2(h,o));break;case"ZYX":this._y=Math.asin(-mt(g,-1,1)),Math.abs(g)<.9999999?(this._x=Math.atan2(m,v),this._z=Math.atan2(h,o)):(this._x=0,this._z=Math.atan2(-l,f));break;case"YZX":this._z=Math.asin(mt(h,-1,1)),Math.abs(h)<.9999999?(this._x=Math.atan2(-p,f),this._y=Math.atan2(-g,o)):(this._x=0,this._y=Math.atan2(u,v));break;case"XZY":this._z=Math.asin(-mt(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(m,f),this._y=Math.atan2(u,o)):(this._x=Math.atan2(-p,v),this._y=0);break;default:Ue("Euler: .setFromRotationMatrix() encountered an unknown order: "+n)}return this._order=n,i===!0&&this._onChangeCallback(),this}setFromQuaternion(t,n,i){return k1.makeRotationFromQuaternion(t),this.setFromRotationMatrix(k1,n,i)}setFromVector3(t,n=this._order){return this.set(t.x,t.y,t.z,n)}reorder(t){return B1.setFromEuler(this),this.setFromQuaternion(B1,t)}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._order===this._order}fromArray(t){return this._x=t[0],this._y=t[1],this._z=t[2],t[3]!==void 0&&(this._order=t[3]),this._onChangeCallback(),this}toArray(t=[],n=0){return t[n]=this._x,t[n+1]=this._y,t[n+2]=this._z,t[n+3]=this._order,t}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}};as.DEFAULT_ORDER="XYZ";var Al=class{constructor(){this.mask=1}set(e){this.mask=(1<<e|0)>>>0}enable(e){this.mask|=1<<e|0}enableAll(){this.mask=-1}toggle(e){this.mask^=1<<e|0}disable(e){this.mask&=~(1<<e|0)}disableAll(){this.mask=0}test(e){return(this.mask&e.mask)!==0}isEnabled(e){return(this.mask&(1<<e|0))!==0}},i4=0,z1=new k,Ko=new hi,qr=new _t,Ou=new k,oc=new k,r4=new k,s4=new hi,V1=new k(1,0,0),G1=new k(0,1,0),H1=new k(0,0,1),W1={type:"added"},a4={type:"removed"},Qo={type:"childadded",child:null},Md={type:"childremoved",child:null},Yt=class Nh extends dr{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:i4++}),this.uuid=Oi(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=Nh.DEFAULT_UP.clone();const t=new k,n=new as,i=new hi,r=new k(1,1,1);function o(){i.setFromEuler(n,!1)}function l(){n.setFromQuaternion(i,void 0,!1)}n._onChange(o),i._onChange(l),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:t},rotation:{configurable:!0,enumerable:!0,value:n},quaternion:{configurable:!0,enumerable:!0,value:i},scale:{configurable:!0,enumerable:!0,value:r},modelViewMatrix:{value:new _t},normalMatrix:{value:new Et}}),this.matrix=new _t,this.matrixWorld=new _t,this.matrixAutoUpdate=Nh.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=Nh.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new Al,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.animations=[],this.customDepthMaterial=void 0,this.customDistanceMaterial=void 0,this.static=!1,this.userData={},this.pivot=null}onBeforeShadow(){}onAfterShadow(){}onBeforeRender(){}onAfterRender(){}applyMatrix4(t){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(t),this.matrix.decompose(this.position,this.quaternion,this.scale)}applyQuaternion(t){return this.quaternion.premultiply(t),this}setRotationFromAxisAngle(t,n){this.quaternion.setFromAxisAngle(t,n)}setRotationFromEuler(t){this.quaternion.setFromEuler(t,!0)}setRotationFromMatrix(t){this.quaternion.setFromRotationMatrix(t)}setRotationFromQuaternion(t){this.quaternion.copy(t)}rotateOnAxis(t,n){return Ko.setFromAxisAngle(t,n),this.quaternion.multiply(Ko),this}rotateOnWorldAxis(t,n){return Ko.setFromAxisAngle(t,n),this.quaternion.premultiply(Ko),this}rotateX(t){return this.rotateOnAxis(V1,t)}rotateY(t){return this.rotateOnAxis(G1,t)}rotateZ(t){return this.rotateOnAxis(H1,t)}translateOnAxis(t,n){return z1.copy(t).applyQuaternion(this.quaternion),this.position.add(z1.multiplyScalar(n)),this}translateX(t){return this.translateOnAxis(V1,t)}translateY(t){return this.translateOnAxis(G1,t)}translateZ(t){return this.translateOnAxis(H1,t)}localToWorld(t){return this.updateWorldMatrix(!0,!1),t.applyMatrix4(this.matrixWorld)}worldToLocal(t){return this.updateWorldMatrix(!0,!1),t.applyMatrix4(qr.copy(this.matrixWorld).invert())}lookAt(t,n,i){t.isVector3?Ou.copy(t):Ou.set(t,n,i);const r=this.parent;this.updateWorldMatrix(!0,!1),oc.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?qr.lookAt(oc,Ou,this.up):qr.lookAt(Ou,oc,this.up),this.quaternion.setFromRotationMatrix(qr),r&&(qr.extractRotation(r.matrixWorld),Ko.setFromRotationMatrix(qr),this.quaternion.premultiply(Ko.invert()))}add(t){if(arguments.length>1){for(let n=0;n<arguments.length;n++)this.add(arguments[n]);return this}return t===this?(rt("Object3D.add: object can't be added as a child of itself.",t),this):(t&&t.isObject3D?(t.removeFromParent(),t.parent=this,this.children.push(t),t.dispatchEvent(W1),Qo.child=t,this.dispatchEvent(Qo),Qo.child=null):rt("Object3D.add: object not an instance of THREE.Object3D.",t),this)}remove(t){if(arguments.length>1){for(let i=0;i<arguments.length;i++)this.remove(arguments[i]);return this}const n=this.children.indexOf(t);return n!==-1&&(t.parent=null,this.children.splice(n,1),t.dispatchEvent(a4),Md.child=t,this.dispatchEvent(Md),Md.child=null),this}removeFromParent(){const t=this.parent;return t!==null&&t.remove(this),this}clear(){return this.remove(...this.children)}attach(t){return this.updateWorldMatrix(!0,!1),qr.copy(this.matrixWorld).invert(),t.parent!==null&&(t.parent.updateWorldMatrix(!0,!1),qr.multiply(t.parent.matrixWorld)),t.applyMatrix4(qr),t.removeFromParent(),t.parent=this,this.children.push(t),t.updateWorldMatrix(!1,!0),t.dispatchEvent(W1),Qo.child=t,this.dispatchEvent(Qo),Qo.child=null,this}getObjectById(t){return this.getObjectByProperty("id",t)}getObjectByName(t){return this.getObjectByProperty("name",t)}getObjectByProperty(t,n){if(this[t]===n)return this;for(let i=0,r=this.children.length;i<r;i++){const o=this.children[i].getObjectByProperty(t,n);if(o!==void 0)return o}}getObjectsByProperty(t,n,i=[]){this[t]===n&&i.push(this);const r=this.children;for(let o=0,l=r.length;o<l;o++)r[o].getObjectsByProperty(t,n,i);return i}getWorldPosition(t){return this.updateWorldMatrix(!0,!1),t.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(oc,t,r4),t}getWorldScale(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(oc,s4,t),t}getWorldDirection(t){this.updateWorldMatrix(!0,!1);const n=this.matrixWorld.elements;return t.set(n[8],n[9],n[10]).normalize()}raycast(){}traverse(t){t(this);const n=this.children;for(let i=0,r=n.length;i<r;i++)n[i].traverse(t)}traverseVisible(t){if(this.visible===!1)return;t(this);const n=this.children;for(let i=0,r=n.length;i<r;i++)n[i].traverseVisible(t)}traverseAncestors(t){const n=this.parent;n!==null&&(t(n),n.traverseAncestors(t))}updateMatrix(){this.matrix.compose(this.position,this.quaternion,this.scale);const t=this.pivot;if(t!==null){const n=t.x,i=t.y,r=t.z,o=this.matrix.elements;o[12]+=n-o[0]*n-o[4]*i-o[8]*r,o[13]+=i-o[1]*n-o[5]*i-o[9]*r,o[14]+=r-o[2]*n-o[6]*i-o[10]*r}this.matrixWorldNeedsUpdate=!0}updateMatrixWorld(t){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||t)&&(this.matrixWorldAutoUpdate===!0&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),this.matrixWorldNeedsUpdate=!1,t=!0);const n=this.children;for(let i=0,r=n.length;i<r;i++)n[i].updateMatrixWorld(t)}updateWorldMatrix(t,n,i=!1){const r=this.parent;if(t===!0&&r!==null&&r.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||i)&&(this.matrixWorldAutoUpdate===!0&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),this.matrixWorldNeedsUpdate=!1,i=!0),n===!0){const o=this.children;for(let l=0,u=o.length;l<u;l++)o[l].updateWorldMatrix(!1,!0,i)}}toJSON(t){const n=t===void 0||typeof t=="string",i={};n&&(t={geometries:{},materials:{},textures:{},images:{},shapes:{},skeletons:{},animations:{},nodes:{}},i.metadata={version:4.7,type:"Object",generator:"Object3D.toJSON"});const r={};r.uuid=this.uuid,r.type=this.type,this.name!==""&&(r.name=this.name),this.castShadow===!0&&(r.castShadow=!0),this.receiveShadow===!0&&(r.receiveShadow=!0),this.visible===!1&&(r.visible=!1),this.frustumCulled===!1&&(r.frustumCulled=!1),this.renderOrder!==0&&(r.renderOrder=this.renderOrder),this.static!==!1&&(r.static=this.static),Object.keys(this.userData).length>0&&(r.userData=this.userData),r.layers=this.layers.mask,r.matrix=this.matrix.toArray(),r.up=this.up.toArray(),this.pivot!==null&&(r.pivot=this.pivot.toArray()),this.matrixAutoUpdate===!1&&(r.matrixAutoUpdate=!1),this.morphTargetDictionary!==void 0&&(r.morphTargetDictionary=Object.assign({},this.morphTargetDictionary)),this.morphTargetInfluences!==void 0&&(r.morphTargetInfluences=this.morphTargetInfluences.slice()),this.isInstancedMesh&&(r.type="InstancedMesh",r.count=this.count,r.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(r.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(r.type="BatchedMesh",r.perObjectFrustumCulled=this.perObjectFrustumCulled,r.sortObjects=this.sortObjects,r.drawRanges=this._drawRanges,r.reservedRanges=this._reservedRanges,r.geometryInfo=this._geometryInfo.map(u=>({...u,boundingBox:u.boundingBox?u.boundingBox.toJSON():void 0,boundingSphere:u.boundingSphere?u.boundingSphere.toJSON():void 0})),r.instanceInfo=this._instanceInfo.map(u=>({...u})),r.availableInstanceIds=this._availableInstanceIds.slice(),r.availableGeometryIds=this._availableGeometryIds.slice(),r.nextIndexStart=this._nextIndexStart,r.nextVertexStart=this._nextVertexStart,r.geometryCount=this._geometryCount,r.maxInstanceCount=this._maxInstanceCount,r.maxVertexCount=this._maxVertexCount,r.maxIndexCount=this._maxIndexCount,r.geometryInitialized=this._geometryInitialized,r.matricesTexture=this._matricesTexture.toJSON(t),r.indirectTexture=this._indirectTexture.toJSON(t),this._colorsTexture!==null&&(r.colorsTexture=this._colorsTexture.toJSON(t)),this.boundingSphere!==null&&(r.boundingSphere=this.boundingSphere.toJSON()),this.boundingBox!==null&&(r.boundingBox=this.boundingBox.toJSON()));function o(u,h){return u[h.uuid]===void 0&&(u[h.uuid]=h.toJSON(t)),h.uuid}if(this.isScene)this.background&&(this.background.isColor?r.background=this.background.toJSON():this.background.isTexture&&(r.background=this.background.toJSON(t).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(r.environment=this.environment.toJSON(t).uuid);else if(this.isMesh||this.isLine||this.isPoints){r.geometry=o(t.geometries,this.geometry);const u=this.geometry.parameters;if(u!==void 0&&u.shapes!==void 0){const h=u.shapes;if(Array.isArray(h))for(let f=0,p=h.length;f<p;f++){const g=h[f];o(t.shapes,g)}else o(t.shapes,h)}}if(this.isSkinnedMesh&&(r.bindMode=this.bindMode,r.bindMatrix=this.bindMatrix.toArray(),this.skeleton!==void 0&&(o(t.skeletons,this.skeleton),r.skeleton=this.skeleton.uuid)),this.material!==void 0)if(Array.isArray(this.material)){const u=[];for(let h=0,f=this.material.length;h<f;h++)u.push(o(t.materials,this.material[h]));r.material=u}else r.material=o(t.materials,this.material);if(this.children.length>0){r.children=[];for(let u=0;u<this.children.length;u++)r.children.push(this.children[u].toJSON(t).object)}if(this.animations.length>0){r.animations=[];for(let u=0;u<this.animations.length;u++){const h=this.animations[u];r.animations.push(o(t.animations,h))}}if(n){const u=l(t.geometries),h=l(t.materials),f=l(t.textures),p=l(t.images),g=l(t.shapes),m=l(t.skeletons),v=l(t.animations),b=l(t.nodes);u.length>0&&(i.geometries=u),h.length>0&&(i.materials=h),f.length>0&&(i.textures=f),p.length>0&&(i.images=p),g.length>0&&(i.shapes=g),m.length>0&&(i.skeletons=m),v.length>0&&(i.animations=v),b.length>0&&(i.nodes=b)}return i.object=r,i;function l(u){const h=[];for(const f in u){const p=u[f];delete p.metadata,h.push(p)}return h}}clone(t){return new this.constructor().copy(this,t)}copy(t,n=!0){if(this.name=t.name,this.up.copy(t.up),this.position.copy(t.position),this.rotation.order=t.rotation.order,this.quaternion.copy(t.quaternion),this.scale.copy(t.scale),this.pivot=t.pivot!==null?t.pivot.clone():null,this.matrix.copy(t.matrix),this.matrixWorld.copy(t.matrixWorld),this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrixWorldAutoUpdate=t.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=t.matrixWorldNeedsUpdate,this.layers.mask=t.layers.mask,this.visible=t.visible,this.castShadow=t.castShadow,this.receiveShadow=t.receiveShadow,this.frustumCulled=t.frustumCulled,this.renderOrder=t.renderOrder,this.static=t.static,this.animations=t.animations.slice(),this.userData=JSON.parse(JSON.stringify(t.userData)),n===!0)for(let i=0;i<t.children.length;i++){const r=t.children[i];this.add(r.clone())}return this}};Yt.DEFAULT_UP=new k(0,1,0);Yt.DEFAULT_MATRIX_AUTO_UPDATE=!0;Yt.DEFAULT_MATRIX_WORLD_AUTO_UPDATE=!0;var Ml=class extends Yt{constructor(){super(),this.isGroup=!0,this.type="Group"}},o4={type:"move"},Lh=class{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new Ml,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return this._targetRay===null&&(this._targetRay=new Ml,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new k,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new k),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new Ml,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new k,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new k,this._grip.eventsEnabled=!1),this._grip}dispatchEvent(e){return this._targetRay!==null&&this._targetRay.dispatchEvent(e),this._grip!==null&&this._grip.dispatchEvent(e),this._hand!==null&&this._hand.dispatchEvent(e),this}connect(e){if(e&&e.hand){const t=this._hand;if(t)for(const n of e.hand.values())this._getHandJoint(t,n)}return this.dispatchEvent({type:"connected",data:e}),this}disconnect(e){return this.dispatchEvent({type:"disconnected",data:e}),this._targetRay!==null&&(this._targetRay.visible=!1),this._grip!==null&&(this._grip.visible=!1),this._hand!==null&&(this._hand.visible=!1),this}update(e,t,n){let i=null,r=null,o=null;const l=this._targetRay,u=this._grip,h=this._hand;if(e&&t.session.visibilityState!=="visible-blurred"){if(h&&e.hand){o=!0;for(const b of e.hand.values()){const w=t.getJointPose(b,n),S=this._getHandJoint(h,b);w!==null&&(S.matrix.fromArray(w.transform.matrix),S.matrix.decompose(S.position,S.rotation,S.scale),S.matrixWorldNeedsUpdate=!0,S.jointRadius=w.radius),S.visible=w!==null}const f=h.joints["index-finger-tip"],p=h.joints["thumb-tip"],g=f.position.distanceTo(p.position);h.inputState.pinching&&g>.025?(h.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!h.inputState.pinching&&g<=.02-.005&&(h.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else u!==null&&e.gripSpace&&(r=t.getPose(e.gripSpace,n),r!==null&&(u.matrix.fromArray(r.transform.matrix),u.matrix.decompose(u.position,u.rotation,u.scale),u.matrixWorldNeedsUpdate=!0,r.linearVelocity?(u.hasLinearVelocity=!0,u.linearVelocity.copy(r.linearVelocity)):u.hasLinearVelocity=!1,r.angularVelocity?(u.hasAngularVelocity=!0,u.angularVelocity.copy(r.angularVelocity)):u.hasAngularVelocity=!1,u.eventsEnabled&&u.dispatchEvent({type:"gripUpdated",data:e,target:this})));l!==null&&(i=t.getPose(e.targetRaySpace,n),i===null&&r!==null&&(i=r),i!==null&&(l.matrix.fromArray(i.transform.matrix),l.matrix.decompose(l.position,l.rotation,l.scale),l.matrixWorldNeedsUpdate=!0,i.linearVelocity?(l.hasLinearVelocity=!0,l.linearVelocity.copy(i.linearVelocity)):l.hasLinearVelocity=!1,i.angularVelocity?(l.hasAngularVelocity=!0,l.angularVelocity.copy(i.angularVelocity)):l.hasAngularVelocity=!1,this.dispatchEvent(o4)))}return l!==null&&(l.visible=i!==null),u!==null&&(u.visible=r!==null),h!==null&&(h.visible=o!==null),this}_getHandJoint(e,t){if(e.joints[t.jointName]===void 0){const n=new Ml;n.matrixAutoUpdate=!1,n.visible=!1,e.joints[t.jointName]=n,e.add(n)}return e.joints[t.jointName]}},Ly={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},Ps={h:0,s:0,l:0},Fu={h:0,s:0,l:0};function wd(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*6*(2/3-n):e}var Xe=class{constructor(e,t,n){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(e,t,n)}set(e,t,n){if(t===void 0&&n===void 0){const i=e;i&&i.isColor?this.copy(i):typeof i=="number"?this.setHex(i):typeof i=="string"&&this.setStyle(i)}else this.setRGB(e,t,n);return this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,t=ci){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,Nt.colorSpaceToWorking(this,t),this}setRGB(e,t,n,i=Nt.workingColorSpace){return this.r=e,this.g=t,this.b=n,Nt.colorSpaceToWorking(this,i),this}setHSL(e,t,n,i=Nt.workingColorSpace){if(e=n0(e,1),t=mt(t,0,1),n=mt(n,0,1),t===0)this.r=this.g=this.b=n;else{const r=n<=.5?n*(1+t):n+t-n*t,o=2*n-r;this.r=wd(o,r,e+1/3),this.g=wd(o,r,e),this.b=wd(o,r,e-1/3)}return Nt.colorSpaceToWorking(this,i),this}setStyle(e,t=ci){function n(r){r!==void 0&&parseFloat(r)<1&&Ue("Color: Alpha component of "+e+" will be ignored.")}let i;if(i=/^(\w+)\(([^\)]*)\)/.exec(e)){let r;const o=i[1],l=i[2];switch(o){case"rgb":case"rgba":if(r=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(l))return n(r[4]),this.setRGB(Math.min(255,parseInt(r[1],10))/255,Math.min(255,parseInt(r[2],10))/255,Math.min(255,parseInt(r[3],10))/255,t);if(r=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(l))return n(r[4]),this.setRGB(Math.min(100,parseInt(r[1],10))/100,Math.min(100,parseInt(r[2],10))/100,Math.min(100,parseInt(r[3],10))/100,t);break;case"hsl":case"hsla":if(r=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(l))return n(r[4]),this.setHSL(parseFloat(r[1])/360,parseFloat(r[2])/100,parseFloat(r[3])/100,t);break;default:Ue("Color: Unknown color model "+e)}}else if(i=/^\#([A-Fa-f\d]+)$/.exec(e)){const r=i[1],o=r.length;if(o===3)return this.setRGB(parseInt(r.charAt(0),16)/15,parseInt(r.charAt(1),16)/15,parseInt(r.charAt(2),16)/15,t);if(o===6)return this.setHex(parseInt(r,16),t);Ue("Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,t);return this}setColorName(e,t=ci){const n=Ly[e.toLowerCase()];return n!==void 0?this.setHex(n,t):Ue("Color: Unknown color "+e),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copySRGBToLinear(e){return this.r=ns(e.r),this.g=ns(e.g),this.b=ns(e.b),this}copyLinearToSRGB(e){return this.r=wl(e.r),this.g=wl(e.g),this.b=wl(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=ci){return Nt.workingToColorSpace(Qn.copy(this),e),Math.round(mt(Qn.r*255,0,255))*65536+Math.round(mt(Qn.g*255,0,255))*256+Math.round(mt(Qn.b*255,0,255))}getHexString(e=ci){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t=Nt.workingColorSpace){Nt.workingToColorSpace(Qn.copy(this),t);const n=Qn.r,i=Qn.g,r=Qn.b,o=Math.max(n,i,r),l=Math.min(n,i,r);let u,h;const f=(l+o)/2;if(l===o)u=0,h=0;else{const p=o-l;switch(h=f<=.5?p/(o+l):p/(2-o-l),o){case n:u=(i-r)/p+(i<r?6:0);break;
vendor: 4,323 bytes, line 9
9case i:u=(r-n)/p+2;break;case r:u=(n-i)/p+4;break}u/=6}return e.h=u,e.s=h,e.l=f,e}getRGB(e,t=Nt.workingColorSpace){return Nt.workingToColorSpace(Qn.copy(this),t),e.r=Qn.r,e.g=Qn.g,e.b=Qn.b,e}getStyle(e=ci){Nt.workingToColorSpace(Qn.copy(this),e);const t=Qn.r,n=Qn.g,i=Qn.b;return e!=="srgb"?`color(${e} ${t.toFixed(3)} ${n.toFixed(3)} ${i.toFixed(3)})`:`rgb(${Math.round(t*255)},${Math.round(n*255)},${Math.round(i*255)})`}offsetHSL(e,t,n){return this.getHSL(Ps),this.setHSL(Ps.h+e,Ps.s+t,Ps.l+n)}add(e){return this.r+=e.r,this.g+=e.g,this.b+=e.b,this}addColors(e,t){return this.r=e.r+t.r,this.g=e.g+t.g,this.b=e.b+t.b,this}addScalar(e){return this.r+=e,this.g+=e,this.b+=e,this}sub(e){return this.r=Math.max(0,this.r-e.r),this.g=Math.max(0,this.g-e.g),this.b=Math.max(0,this.b-e.b),this}multiply(e){return this.r*=e.r,this.g*=e.g,this.b*=e.b,this}multiplyScalar(e){return this.r*=e,this.g*=e,this.b*=e,this}lerp(e,t){return this.r+=(e.r-this.r)*t,this.g+=(e.g-this.g)*t,this.b+=(e.b-this.b)*t,this}lerpColors(e,t,n){return this.r=e.r+(t.r-e.r)*n,this.g=e.g+(t.g-e.g)*n,this.b=e.b+(t.b-e.b)*n,this}lerpHSL(e,t){this.getHSL(Ps),e.getHSL(Fu);const n=Ec(Ps.h,Fu.h,t),i=Ec(Ps.s,Fu.s,t),r=Ec(Ps.l,Fu.l,t);return this.setHSL(n,i,r),this}setFromVector3(e){return this.r=e.x,this.g=e.y,this.b=e.z,this}applyMatrix3(e){const t=this.r,n=this.g,i=this.b,r=e.elements;return this.r=r[0]*t+r[3]*n+r[6]*i,this.g=r[1]*t+r[4]*n+r[7]*i,this.b=r[2]*t+r[5]*n+r[8]*i,this}equals(e){return e.r===this.r&&e.g===this.g&&e.b===this.b}fromArray(e,t=0){return this.r=e[t],this.g=e[t+1],this.b=e[t+2],this}toArray(e=[],t=0){return e[t]=this.r,e[t+1]=this.g,e[t+2]=this.b,e}fromBufferAttribute(e,t){return this.r=e.getX(t),this.g=e.getY(t),this.b=e.getZ(t),this}toJSON(){return this.getHex()}*[Symbol.iterator](){yield this.r,yield this.g,yield this.b}},Qn=new Xe;Xe.NAMES=Ly;var Dy=class Uy{constructor(t,n=25e-5){this.isFogExp2=!0,this.name="",this.color=new Xe(t),this.density=n}clone(){return new Uy(this.color,this.density)}toJSON(){return{type:"FogExp2",name:this.name,color:this.color.getHex(),density:this.density}}},Oy=class Fy{constructor(t,n=1,i=1e3){this.isFog=!0,this.name="",this.color=new Xe(t),this.near=n,this.far=i}clone(){return new Fy(this.color,this.near,this.far)}toJSON(){return{type:"Fog",name:this.name,color:this.color.getHex(),near:this.near,far:this.far}}},r0=class extends Yt{constructor(){super(),this.isScene=!0,this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.backgroundRotation=new as,this.environmentIntensity=1,this.environmentRotation=new as,this.overrideMaterial=null,typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(e,t){return super.copy(e,t),e.background!==null&&(this.background=e.background.clone()),e.environment!==null&&(this.environment=e.environment.clone()),e.fog!==null&&(this.fog=e.fog.clone()),this.backgroundBlurriness=e.backgroundBlurriness,this.backgroundIntensity=e.backgroundIntensity,this.backgroundRotation.copy(e.backgroundRotation),this.environmentIntensity=e.environmentIntensity,this.environmentRotation.copy(e.environmentRotation),e.overrideMaterial!==null&&(this.overrideMaterial=e.overrideMaterial.clone()),this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){const t=super.toJSON(e);return this.fog!==null&&(t.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(t.object.backgroundBlurriness=this.backgroundBlurriness),this.backgroundIntensity!==1&&(t.object.backgroundIntensity=this.backgroundIntensity),t.object.backgroundRotation=this.backgroundRotation.toArray(),this.environmentIntensity!==1&&(t.object.environmentIntensity=this.environmentIntensity),t.object.environmentRotation=this.environmentRotation.toArray(),t}},lr=new k,Yr=new k,Ed=new k,$r=new k,el=new k,tl=new k,j1=new k,Td=new k,Cd=new k,Ad=new k,Rd=new tn,Id=new tn,Pd=new tn,ks=class _l{constructor(t=new k,n=new k,i=new k){this.a=t,this.b=n,this.c=i}static getNormal(t,n,i,r){r.subVectors(i,n),lr.subVectors(t,n),r.cross(lr);const o=r.lengthSq();return o>0?r.multiplyScalar(1/Math.sqrt(o)):r.set(0,0,0)}static getBarycoord(t,n,i,r,o){lr.subVectors(r,n),Yr.subVectors(i,n),Ed.subVectors(t,n);const l=lr.dot(lr),u=lr.dot(Yr),h=lr.dot(Ed),f=Yr.dot(Yr),p=Yr.dot
vendor: 4,577 bytes, line 9
9(Ed),g=l*f-u*u;if(g===0)return o.set(0,0,0),null;const m=1/g,v=(f*h-u*p)*m,b=(l*p-u*h)*m;return o.set(1-v-b,b,v)}static containsPoint(t,n,i,r){return this.getBarycoord(t,n,i,r,$r)===null?!1:$r.x>=0&&$r.y>=0&&$r.x+$r.y<=1}static getInterpolation(t,n,i,r,o,l,u,h){return this.getBarycoord(t,n,i,r,$r)===null?(h.x=0,h.y=0,"z"in h&&(h.z=0),"w"in h&&(h.w=0),null):(h.setScalar(0),h.addScaledVector(o,$r.x),h.addScaledVector(l,$r.y),h.addScaledVector(u,$r.z),h)}static getInterpolatedAttribute(t,n,i,r,o,l){return Rd.setScalar(0),Id.setScalar(0),Pd.setScalar(0),Rd.fromBufferAttribute(t,n),Id.fromBufferAttribute(t,i),Pd.fromBufferAttribute(t,r),l.setScalar(0),l.addScaledVector(Rd,o.x),l.addScaledVector(Id,o.y),l.addScaledVector(Pd,o.z),l}static isFrontFacing(t,n,i,r){return lr.subVectors(i,n),Yr.subVectors(t,n),lr.cross(Yr).dot(r)<0}set(t,n,i){return this.a.copy(t),this.b.copy(n),this.c.copy(i),this}setFromPointsAndIndices(t,n,i,r){return this.a.copy(t[n]),this.b.copy(t[i]),this.c.copy(t[r]),this}setFromAttributeAndIndices(t,n,i,r){return this.a.fromBufferAttribute(t,n),this.b.fromBufferAttribute(t,i),this.c.fromBufferAttribute(t,r),this}clone(){return new this.constructor().copy(this)}copy(t){return this.a.copy(t.a),this.b.copy(t.b),this.c.copy(t.c),this}getArea(){return lr.subVectors(this.c,this.b),Yr.subVectors(this.a,this.b),lr.cross(Yr).length()*.5}getMidpoint(t){return t.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(t){return _l.getNormal(this.a,this.b,this.c,t)}getPlane(t){return t.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(t,n){return _l.getBarycoord(t,this.a,this.b,this.c,n)}getInterpolation(t,n,i,r,o){return _l.getInterpolation(t,this.a,this.b,this.c,n,i,r,o)}containsPoint(t){return _l.containsPoint(t,this.a,this.b,this.c)}isFrontFacing(t){return _l.isFrontFacing(this.a,this.b,this.c,t)}intersectsBox(t){return t.intersectsTriangle(this)}closestPointToPoint(t,n){const i=this.a,r=this.b,o=this.c;let l,u;el.subVectors(r,i),tl.subVectors(o,i),Td.subVectors(t,i);const h=el.dot(Td),f=tl.dot(Td);if(h<=0&&f<=0)return n.copy(i);Cd.subVectors(t,r);const p=el.dot(Cd),g=tl.dot(Cd);if(p>=0&&g<=p)return n.copy(r);const m=h*g-p*f;if(m<=0&&h>=0&&p<=0)return l=h/(h-p),n.copy(i).addScaledVector(el,l);Ad.subVectors(t,o);const v=el.dot(Ad),b=tl.dot(Ad);if(b>=0&&v<=b)return n.copy(o);const w=v*f-h*b;if(w<=0&&f>=0&&b<=0)return u=f/(f-b),n.copy(i).addScaledVector(tl,u);const S=p*b-v*g;if(S<=0&&g-p>=0&&v-b>=0)return j1.subVectors(o,r),u=(g-p)/(g-p+(v-b)),n.copy(r).addScaledVector(j1,u);const _=1/(S+w+m);return l=w*_,u=m*_,n.copy(i).addScaledVector(el,l).addScaledVector(tl,u)}equals(t){return t.a.equals(this.a)&&t.b.equals(this.b)&&t.c.equals(this.c)}},ti=class{constructor(e=new k(1/0,1/0,1/0),t=new k(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromArray(e){this.makeEmpty();for(let t=0,n=e.length;t<n;t+=3)this.expandByPoint(cr.fromArray(e,t));return this}setFromBufferAttribute(e){this.makeEmpty();for(let t=0,n=e.count;t<n;t++)this.expandByPoint(cr.fromBufferAttribute(e,t));return this}setFromPoints(e){this.makeEmpty();for(let t=0,n=e.length;t<n;t++)this.expandByPoint(e[t]);return this}setFromCenterAndSize(e,t){const n=cr.copy(t).multiplyScalar(.5);return this.min.copy(e).sub(n),this.max.copy(e).add(n),this}setFromObject(e,t=!1){return this.makeEmpty(),this.expandByObject(e,t)}clone(){return new this.constructor().copy(this)}copy(e){return this.min.copy(e.min),this.max.copy(e.max),this}makeEmpty(){return this.min.x=this.min.y=this.min.z=1/0,this.max.x=this.max.y=this.max.z=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z}getCenter(e){return this.isEmpty()?e.set(0,0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(e){return this.isEmpty()?e.set(0,0,0):e.subVectors(this.max,this.min)}expandByPoint(e){return this.min.min(e),this.max.max(e),this}expandByVector(e){return this.min.sub(e),this.max.add(e),this}expandByScalar(e){return this.min.addScalar(-e),this.max.addScalar(e),this}expandByObject(e,t=!1){e.updateWorldMatrix(!1,!1);const n=e.geometry;if(n!==void 0){const r=n.getAttribute("position");if(t===!0&&r!==void 0&&e.isInstancedMesh!==!0)for(let o=0,l=r.count;o<l;o++)e.isMesh===!0?e.getVertexPosition(o,cr):cr.fromBufferAttribute(r,o),cr.applyMatrix4(e.matrixWorld),this.expandByPoint(cr);else e.boundingBox!==void 0?(e.boundingBox===null&&e.computeBoundingBox(),ku.copy(e.boundingBox)):(n.boundingBox===null&&n.computeBoundingBox(),ku.copy(n.boundingBox)),ku.applyM
vendor: 5,609 bytes, line 9
9atrix4(e.matrixWorld),this.union(ku)}const i=e.children;for(let r=0,o=i.length;r<o;r++)this.expandByObject(i[r],t);return this}containsPoint(e){return e.x>=this.min.x&&e.x<=this.max.x&&e.y>=this.min.y&&e.y<=this.max.y&&e.z>=this.min.z&&e.z<=this.max.z}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(e){return e.max.x>=this.min.x&&e.min.x<=this.max.x&&e.max.y>=this.min.y&&e.min.y<=this.max.y&&e.max.z>=this.min.z&&e.min.z<=this.max.z}intersectsSphere(e){return this.clampPoint(e.center,cr),cr.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let t,n;return e.normal.x>0?(t=e.normal.x*this.min.x,n=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,n=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,n+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,n+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,n+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,n+=e.normal.z*this.min.z),t<=-e.constant&&n>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(lc),Bu.subVectors(this.max,lc),nl.subVectors(e.a,lc),il.subVectors(e.b,lc),rl.subVectors(e.c,lc),Ns.subVectors(il,nl),Ls.subVectors(rl,il),Xa.subVectors(nl,rl);let t=[0,-Ns.z,Ns.y,0,-Ls.z,Ls.y,0,-Xa.z,Xa.y,Ns.z,0,-Ns.x,Ls.z,0,-Ls.x,Xa.z,0,-Xa.x,-Ns.y,Ns.x,0,-Ls.y,Ls.x,0,-Xa.y,Xa.x,0];return!Nd(t,nl,il,rl,Bu)||(t=[1,0,0,0,1,0,0,0,1],!Nd(t,nl,il,rl,Bu))?!1:(zu.crossVectors(Ns,Ls),t=[zu.x,zu.y,zu.z],Nd(t,nl,il,rl,Bu))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,cr).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(cr).length()*.5),e}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}applyMatrix4(e){return this.isEmpty()?this:(Zr[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),Zr[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),Zr[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),Zr[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),Zr[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),Zr[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),Zr[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),Zr[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(Zr),this)}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}toJSON(){return{min:this.min.toArray(),max:this.max.toArray()}}fromJSON(e){return this.min.fromArray(e.min),this.max.fromArray(e.max),this}},Zr=[new k,new k,new k,new k,new k,new k,new k,new k],cr=new k,ku=new ti,nl=new k,il=new k,rl=new k,Ns=new k,Ls=new k,Xa=new k,lc=new k,Bu=new k,zu=new k,qa=new k;function Nd(e,t,n,i,r){for(let o=0,l=e.length-3;o<=l;o+=3){qa.fromArray(e,o);const u=r.x*Math.abs(qa.x)+r.y*Math.abs(qa.y)+r.z*Math.abs(qa.z),h=t.dot(qa),f=n.dot(qa),p=i.dot(qa);if(Math.max(-Math.max(h,f,p),Math.min(h,f,p))>u)return!1}return!0}var Qr=l4();function l4(){const e=new ArrayBuffer(4),t=new Float32Array(e),n=new Uint32Array(e),i=new Uint32Array(512),r=new Uint32Array(512);for(let h=0;h<256;++h){const f=h-127;f<-27?(i[h]=0,i[h|256]=32768,r[h]=24,r[h|256]=24):f<-14?(i[h]=1024>>-f-14,i[h|256]=1024>>-f-14|32768,r[h]=-f-1,r[h|256]=-f-1):f<=15?(i[h]=f+15<<10,i[h|256]=f+15<<10|32768,r[h]=13,r[h|256]=13):f<128?(i[h]=31744,i[h|256]=64512,r[h]=24,r[h|256]=24):(i[h]=31744,i[h|256]=64512,r[h]=13,r[h|256]=13)}const o=new Uint32Array(2048),l=new Uint32Array(64),u=new Uint32Array(64);for(let h=1;h<1024;++h){let f=h<<13,p=0;for(;(f&8388608)===0;)f<<=1,p-=8388608;f&=-8388609,p+=947912704,o[h]=f|p}for(let h=1024;h<2048;++h)o[h]=939524096+(h-1024<<13);for(let h=1;h<31;++h)l[h]=h<<23;l[31]=1199570944,l[32]=2147483648;for(let h=33;h<63;++h)l[h]=2147483648+(h-32<<23);l[63]=3347054592;for(let h=1;h<64;++h)h!==32&&(u[h]=1024);return{floatView:t,uint32View:n,baseTable:i,shiftTable:r,mantissaTable:o,exponentTable:l,offsetTable:u}}function _i(e){Math.abs(e)>65504&&Ue("DataUtils.toHalfFloat(): Value out of range."),e=mt(e,-65504,65504),Qr.floatView[0]=e;const t=Qr.uint32View[0],n=t>>23&511;return Qr.baseTable[n]+((t&8388607)>>Qr.shiftTable[n])}function bc(e){const t=e>>10;return Qr.uint32View[0]=Qr.mantissaTable[Qr.offsetTable[t]+(e&1023)]+Qr.exponentTable[t],Qr.floatView[0]}var c4=class{static toHalfFloat(e){return _i(e)}static fromHalfFloat(e){return bc(e)}},Tn=new k,Vu=new ye,u4=0,Jt=class extends dr{constructor(e,t,n=!1){if(super(),Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,Object.defineProperty(this,"id",{value:u4++}),this.name="",this.array=e,this.itemSize=t,this.count=e!==void 0?e.length/t:0,this.normalized=n,this.usage=qh,this.updateRanges=[],this.gpuType=rs,this.version=0}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}setUsage(e){return this.usage=e,this}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this.gpuType=e.gpuType,this}copyAt(e,t,n){e*=this.itemSize,n*=t.itemSize;
vendor: 5,955 bytes, line 9
9for(let i=0,r=this.itemSize;i<r;i++)this.array[e+i]=t.array[n+i];return this}copyArray(e){return this.array.set(e),this}applyMatrix3(e){if(this.itemSize===2)for(let t=0,n=this.count;t<n;t++)Vu.fromBufferAttribute(this,t),Vu.applyMatrix3(e),this.setXY(t,Vu.x,Vu.y);else if(this.itemSize===3)for(let t=0,n=this.count;t<n;t++)Tn.fromBufferAttribute(this,t),Tn.applyMatrix3(e),this.setXYZ(t,Tn.x,Tn.y,Tn.z);return this}applyMatrix4(e){for(let t=0,n=this.count;t<n;t++)Tn.fromBufferAttribute(this,t),Tn.applyMatrix4(e),this.setXYZ(t,Tn.x,Tn.y,Tn.z);return this}applyNormalMatrix(e){for(let t=0,n=this.count;t<n;t++)Tn.fromBufferAttribute(this,t),Tn.applyNormalMatrix(e),this.setXYZ(t,Tn.x,Tn.y,Tn.z);return this}transformDirection(e){for(let t=0,n=this.count;t<n;t++)Tn.fromBufferAttribute(this,t),Tn.transformDirection(e),this.setXYZ(t,Tn.x,Tn.y,Tn.z);return this}set(e,t=0){return this.array.set(e,t),this}getComponent(e,t){let n=this.array[e*this.itemSize+t];return this.normalized&&(n=ui(n,this.array)),n}setComponent(e,t,n){return this.normalized&&(n=Ct(n,this.array)),this.array[e*this.itemSize+t]=n,this}getX(e){let t=this.array[e*this.itemSize];return this.normalized&&(t=ui(t,this.array)),t}setX(e,t){return this.normalized&&(t=Ct(t,this.array)),this.array[e*this.itemSize]=t,this}getY(e){let t=this.array[e*this.itemSize+1];return this.normalized&&(t=ui(t,this.array)),t}setY(e,t){return this.normalized&&(t=Ct(t,this.array)),this.array[e*this.itemSize+1]=t,this}getZ(e){let t=this.array[e*this.itemSize+2];return this.normalized&&(t=ui(t,this.array)),t}setZ(e,t){return this.normalized&&(t=Ct(t,this.array)),this.array[e*this.itemSize+2]=t,this}getW(e){let t=this.array[e*this.itemSize+3];return this.normalized&&(t=ui(t,this.array)),t}setW(e,t){return this.normalized&&(t=Ct(t,this.array)),this.array[e*this.itemSize+3]=t,this}setXY(e,t,n){return e*=this.itemSize,this.normalized&&(t=Ct(t,this.array),n=Ct(n,this.array)),this.array[e+0]=t,this.array[e+1]=n,this}setXYZ(e,t,n,i){return e*=this.itemSize,this.normalized&&(t=Ct(t,this.array),n=Ct(n,this.array),i=Ct(i,this.array)),this.array[e+0]=t,this.array[e+1]=n,this.array[e+2]=i,this}setXYZW(e,t,n,i,r){return e*=this.itemSize,this.normalized&&(t=Ct(t,this.array),n=Ct(n,this.array),i=Ct(i,this.array),r=Ct(r,this.array)),this.array[e+0]=t,this.array[e+1]=n,this.array[e+2]=i,this.array[e+3]=r,this}onUpload(e){return this.onUploadCallback=e,this}clone(){return new this.constructor(this.array,this.itemSize).copy(this)}toJSON(){const e={itemSize:this.itemSize,type:this.array.constructor.name,array:Array.from(this.array),normalized:this.normalized};return this.name!==""&&(e.name=this.name),this.usage!==35044&&(e.usage=this.usage),e}dispose(){this.dispatchEvent({type:"dispose"})}},h4=class extends Jt{constructor(e,t,n){super(new Int8Array(e),t,n)}},f4=class extends Jt{constructor(e,t,n){super(new Uint8Array(e),t,n)}},d4=class extends Jt{constructor(e,t,n){super(new Uint8ClampedArray(e),t,n)}},p4=class extends Jt{constructor(e,t,n){super(new Int16Array(e),t,n)}},s0=class extends Jt{constructor(e,t,n){super(new Uint16Array(e),t,n)}},m4=class extends Jt{constructor(e,t,n){super(new Int32Array(e),t,n)}},a0=class extends Jt{constructor(e,t,n){super(new Uint32Array(e),t,n)}},g4=class extends Jt{constructor(e,t,n){super(new Uint16Array(e),t,n),this.isFloat16BufferAttribute=!0}getX(e){let t=bc(this.array[e*this.itemSize]);return this.normalized&&(t=ui(t,this.array)),t}setX(e,t){return this.normalized&&(t=Ct(t,this.array)),this.array[e*this.itemSize]=_i(t),this}getY(e){let t=bc(this.array[e*this.itemSize+1]);return this.normalized&&(t=ui(t,this.array)),t}setY(e,t){return this.normalized&&(t=Ct(t,this.array)),this.array[e*this.itemSize+1]=_i(t),this}getZ(e){let t=bc(this.array[e*this.itemSize+2]);return this.normalized&&(t=ui(t,this.array)),t}setZ(e,t){return this.normalized&&(t=Ct(t,this.array)),this.array[e*this.itemSize+2]=_i(t),this}getW(e){let t=bc(this.array[e*this.itemSize+3]);return this.normalized&&(t=ui(t,this.array)),t}setW(e,t){return this.normalized&&(t=Ct(t,this.array)),this.array[e*this.itemSize+3]=_i(t),this}setXY(e,t,n){return e*=this.itemSize,this.normalized&&(t=Ct(t,this.array),n=Ct(n,this.array)),this.array[e+0]=_i(t),this.array[e+1]=_i(n),this}setXYZ(e,t,n,i){return e*=this.itemSize,this.normalized&&(t=Ct(t,this.array),n=Ct(n,this.array),i=Ct(i,this.array)),this.array[e+0]=_i(t),this.array[e+1]=_i(n),this.array[e+2]=_i(i),this}setXYZW(e,t,n,i,r){return e*=this.itemSize,this.normalized&&(t=Ct(t,this.array),n=Ct(n,this.array),i=Ct(i,this.array),r=Ct(r,this.array)),this.array[e+0]=_i(t),this.array[e+1]=_i(n),this.array[e+2]=_i(i),this.array[e+3]=_i(r),this}},Qe=class extends Jt{constructor(e,t,n){super(new Float32Array(e),t,n)}},v4=new ti,cc=new k,Ld=new k,Hn=class{constructor(e=new k,t=-1){this.isSphere=!0,this.center=e,this.radius=t}set(e,t){return this.center.copy(e),this.radius=t,this}setFromPoints(e,t){const n=this.center;t!==void 0?n.copy(t):v4.setFromPoints(e).getCenter(n);let i=0;for(let r=0,o=e.length;r<o;r++)i=Math.max(i,n.distanceToSquared(e[r]));return this.radius=Math.sqrt(i),this}copy(e){return this.center.copy(e.center),this.radius=e.radius,this}isEmpty(){return this.radius<0}makeEmpty(){return this.center.set(0,0,0),this.radius=-1,this}containsPoint(e){return e.distanceToSquared(this.center)<=this.radius*this.radius}distanceToPoint(e){return e.distanceTo(this.center)-this.radius}intersectsSphere(e){const t=this.radius+e.radius;return e.center.distanceToSquared(this.center)<=t*t}intersectsBox(e){return e.intersectsSphere(this)}intersectsPlane(e){return Math.abs(e.distanceToPoint(this.center))<=this.radius}clampPoint(e,t){const n=this.center.distanceToSquared(e);return t.copy(e),n>this.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t}getBoundingBox(e){return this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}
vendor: 18,499 bytes, line 9
9applyMatrix4(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this}translate(e){return this.center.add(e),this}expandByPoint(e){if(this.isEmpty())return this.center.copy(e),this.radius=0,this;cc.subVectors(e,this.center);const t=cc.lengthSq();if(t>this.radius*this.radius){const n=Math.sqrt(t),i=(n-this.radius)*.5;this.center.addScaledVector(cc,i/n),this.radius+=i}return this}union(e){return e.isEmpty()?this:this.isEmpty()?(this.copy(e),this):(this.center.equals(e.center)===!0?this.radius=Math.max(this.radius,e.radius):(Ld.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(cc.copy(e.center).add(Ld)),this.expandByPoint(cc.copy(e.center).sub(Ld))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}toJSON(){return{radius:this.radius,center:this.center.toArray()}}fromJSON(e){return this.radius=e.radius,this.center.fromArray(e.center),this}},y4=0,qi=new _t,Dd=new Yt,sl=new k,Ui=new ti,uc=new ti,Fn=new k,At=class ky extends dr{constructor(){super(),this.isBufferGeometry=!0,Object.defineProperty(this,"id",{value:y4++}),this.uuid=Oi(),this.name="",this.type="BufferGeometry",this.index=null,this.indirect=null,this.indirectOffset=0,this.attributes={},this.morphAttributes={},this.morphTargetsRelative=!1,this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0},this.userData={},this._transformed=!1}getIndex(){return this.index}setIndex(t){return Array.isArray(t)?this.index=new(CM(t)?a0:s0)(t,1):this.index=t,this}setIndirect(t,n=0){return this.indirect=t,this.indirectOffset=n,this}getIndirect(){return this.indirect}getAttribute(t){return this.attributes[t]}setAttribute(t,n){return this.attributes[t]=n,this}deleteAttribute(t){return delete this.attributes[t],this}hasAttribute(t){return this.attributes[t]!==void 0}addGroup(t,n,i=0){this.groups.push({start:t,count:n,materialIndex:i})}clearGroups(){this.groups=[]}setDrawRange(t,n){this.drawRange.start=t,this.drawRange.count=n}applyMatrix4(t){const n=this.attributes.position;n!==void 0&&(n.applyMatrix4(t),n.needsUpdate=!0);const i=this.attributes.normal;if(i!==void 0){const o=new Et().getNormalMatrix(t);i.applyNormalMatrix(o),i.needsUpdate=!0}const r=this.attributes.tangent;return r!==void 0&&(r.transformDirection(t),r.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this._transformed=!0,this}applyQuaternion(t){return qi.makeRotationFromQuaternion(t),this.applyMatrix4(qi),this}rotateX(t){return qi.makeRotationX(t),this.applyMatrix4(qi),this}rotateY(t){return qi.makeRotationY(t),this.applyMatrix4(qi),this}rotateZ(t){return qi.makeRotationZ(t),this.applyMatrix4(qi),this}translate(t,n,i){return qi.makeTranslation(t,n,i),this.applyMatrix4(qi),this}scale(t,n,i){return qi.makeScale(t,n,i),this.applyMatrix4(qi),this}lookAt(t){return Dd.lookAt(t),Dd.updateMatrix(),this.applyMatrix4(Dd.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(sl).negate(),this.translate(sl.x,sl.y,sl.z),this}setFromPoints(t){const n=this.getAttribute("position");if(n===void 0){const i=[];for(let r=0,o=t.length;r<o;r++){const l=t[r];i.push(l.x,l.y,l.z||0)}this.setAttribute("position",new Qe(i,3))}else{const i=Math.min(t.length,n.count);for(let r=0;r<i;r++){const o=t[r];n.setXYZ(r,o.x,o.y,o.z||0)}t.length>n.count&&Ue("BufferGeometry: Buffer size too small for points data. Use .dispose() and create a new geometry."),n.needsUpdate=!0}return this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new ti);const t=this.attributes.position,n=this.morphAttributes.position;if(t&&t.isGLBufferAttribute){rt("BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box.",this),this.boundingBox.set(new k(-1/0,-1/0,-1/0),new k(1/0,1/0,1/0));return}if(t!==void 0){if(this.boundingBox.setFromBufferAttribute(t),n)for(let i=0,r=n.length;i<r;i++){const o=n[i];Ui.setFromBufferAttribute(o),this.morphTargetsRelative?(Fn.addVectors(this.boundingBox.min,Ui.min),this.boundingBox.expandByPoint(Fn),Fn.addVectors(this.boundingBox.max,Ui.max),this.boundingBox.expandByPoint(Fn)):(this.boundingBox.expandByPoint(Ui.min),this.boundingBox.expandByPoint(Ui.max))}}else this.boundingBox.makeEmpty();(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&rt('BufferGeometry.computeBoundingBox(): Computed min/max have NaN values. The "position" attribute is likely to have NaN values.',this)}computeBoundingSphere(){this.boundingSphere===null&&(this.boundingSphere=new Hn);const t=this.attributes.position,n=this.morphAttributes.position;if(t&&t.isGLBufferAttribute){rt("BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere.",this),this.boundingSphere.set(new k,1/0);return}if(t){const i=this.boundingSphere.center;if(Ui.setFromBufferAttribute(t),n)for(let o=0,l=n.length;o<l;o++){const u=n[o];uc.setFromBufferAttribute(u),this.morphTargetsRelative?(Fn.addVectors(Ui.min,uc.min),Ui.expandByPoint(Fn),Fn.addVectors(Ui.max,uc.max),Ui.expandByPoint(Fn)):(Ui.expandByPoint(uc.min),Ui.expandByPoint(uc.max))}Ui.getCenter(i);let r=0;for(let o=0,l=t.count;o<l;o++)Fn.fromBufferAttribute(t,o),r=Math.max(r,i.distanceToSquared(Fn));if(n)for(let o=0,l=n.length;o<l;o++){const u=n[o],h=this.morphTargetsRelative;for(let f=0,p=u.count;f<p;f++)Fn.fromBufferAttribute(u,f),h&&(sl.fromBufferAttribute(t,f),Fn.add(sl)),r=Math.max(r,i.distanceToSquared(Fn))}this.boundingSphere.radius=Math.sqrt(r),isNaN(this.boundingSphere.radius)&&rt('BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this)}}computeTangents(){const t=this.index,n=this.attributes;if(t===null||n.position===void 0||n.normal===void 0||n.uv===void 0){rt("BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)");return}const i=n.position,r=n.normal,o=n.uv;let l=this.getAttribute("tangent");(l===void 0||l.count!==i.count)&&(l=new Jt(new Float32Array(4*i.count),4),this.setAttribute("tangent",l));const u=[],h=[];for(let T=0;T<i.count;T++)u[T]=new k,h[T]=new k;const f=new k,p=new k,g=new k,m=new ye,v=new ye,b=new ye,w=new k,S=new k;function _(T,R,B){f.fromBufferAttribute(i,T),p.fromBufferAttribute(i,R),g.fromBufferAttribute(i,B),m.fromBufferAttribute(o,T),v.fromBufferAttribute(o,R),b.fromBufferAttribute(o,B),p.sub(f),g.sub(f),v.sub(m),b.sub(m);const F=1/(v.x*b.y-b.x*v.y);isFinite(F)&&(w.copy(p).multiplyScalar(b.y).addScaledVector(g,-v.y).multiplyScalar(F),S.copy(g).multiplyScalar(v.x).addScaledVector(p,-b.x).multiplyScalar(F),u[T].add(w),u[R].add(w),u[B].add(w),h[T].add(S),h[R].add(S),h[B].add(S))}let C=this.groups;C.length===0&&(C=[{start:0,count:t.count}]);for(let T=0,R=C.length;T<R;++T){const B=C[T],F=B.start,j=B.count;for(let H=F,Y=F+j;H<Y;H+=3)_(t.getX(H+0),t.getX(H+1),t.getX(H+2))}const A=new k,E=new k,P=new k,N=new k;function O(T){P.fromBufferAttribute(r,T),N.copy(P);const R=u[T];A.copy(R),A.sub(P.multiplyScalar(P.dot(R))).normalize(),E.crossVectors(N,R);const B=E.dot(h[T])<0?-1:1;l.setXYZW(T,A.x,A.y,A.z,B)}for(let T=0,R=C.length;T<R;++T){const B=C[T],F=B.start,j=B.count;for(let H=F,Y=F+j;H<Y;H+=3)O(t.getX(H+0)),O(t.getX(H+1)),O(t.getX(H+2))}this._transformed=!0}computeVertexNormals(){const t=this.index,n=this.getAttribute("position");if(n!==void 0){let i=this.getAttribute("normal");if(i===void 0||i.count!==n.count)i=new Jt(new Float32Array(n.count*3),3),this.setAttribute("normal",i);else for(let m=0,v=i.count;m<v;m++)i.setXYZ(m,0,0,0);const r=new k,o=new k,l=new k,u=new k,h=new k,f=new k,p=new k,g=new k;if(t)for(let m=0,v=t.count;m<v;m+=3){const b=t.getX(m+0),w=t.getX(m+1),S=t.getX(m+2);r.fromBufferAttribute(n,b),o.fromBufferAttribute(n,w),l.fromBufferAttribute(n,S),p.subVectors(l,o),g.subVectors(r,o),p.cross(g),u.fromBufferAttribute(i,b),h.fromBufferAttribute(i,w),f.fromBufferAttribute(i,S),u.add(p),h.add(p),f.add(p),i.setXYZ(b,u.x,u.y,u.z),i.setXYZ(w,h.x,h.y,h.z),i.setXYZ(S,f.x,f.y,f.z)}else for(let m=0,v=n.count;m<v;m+=3)r.fromBufferAttribute(n,m+0),o.fromBufferAttribute(n,m+1),l.fromBufferAttribute(n,m+2),p.subVectors(l,o),g.subVectors(r,o),p.cross(g),i.setXYZ(m+0,p.x,p.y,p.z),i.setXYZ(m+1,p.x,p.y,p.z),i.setXYZ(m+2,p.x,p.y,p.z);this.normalizeNormals(),i.needsUpdate=!0}}normalizeNormals(){const t=this.attributes.normal;for(let n=0,i=t.count;n<i;n++)Fn.fromBufferAttribute(t,n),Fn.normalize(),t.setXYZ(n,Fn.x,Fn.y,Fn.z)}toNonIndexed(){function t(u,h){const f=u.array,p=u.itemSize,g=u.normalized,m=new f.constructor(h.length*p);let v=0,b=0;for(let w=0,S=h.length;w<S;w++){u.isInterleavedBufferAttribute?v=h[w]*u.data.stride+u.offset:v=h[w]*p;for(let _=0;_<p;_++)m[b++]=f[v++]}return new Jt(m,p,g)}if(this.index===null)return Ue("BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."),this;const n=new ky,i=this.index.array,r=this.attributes;for(const u in r){const h=r[u],f=t(h,i);n.setAttribute(u,f)}const o=this.morphAttributes;for(const u in o){const h=[],f=o[u];for(let p=0,g=f.length;p<g;p++){const m=f[p],v=t(m,i);h.push(v)}n.morphAttributes[u]=h}n.morphTargetsRelative=this.morphTargetsRelative;const l=this.groups;for(let u=0,h=l.length;u<h;u++){const f=l[u];n.addGroup(f.start,f.count,f.materialIndex)}return n}toJSON(){const t={metadata:{version:4.7,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(t.uuid=this.uuid,t.type=this.parameters!==void 0&&this._transformed===!0?"BufferGeometry":this.type,this.name!==""&&(t.name=this.name),Object.keys(this.userData).length>0&&(t.userData=this.userData),this.parameters!==void 0&&this._transformed!==!0){const h=this.parameters;for(const f in h)h[f]!==void 0&&(t[f]=h[f]);return t}t.data={attributes:{}};const n=this.index;n!==null&&(t.data.index={type:n.array.constructor.name,array:Array.prototype.slice.call(n.array)});const i=this.attributes;for(const h in i){const f=i[h];t.data.attributes[h]=f.toJSON(t.data)}const r={};let o=!1;for(const h in this.morphAttributes){const f=this.morphAttributes[h],p=[];for(let g=0,m=f.length;g<m;g++){const v=f[g];p.push(v.toJSON(t.data))}p.length>0&&(r[h]=p,o=!0)}o&&(t.data.morphAttributes=r,t.data.morphTargetsRelative=this.morphTargetsRelative);const l=this.groups;l.length>0&&(t.data.groups=JSON.parse(JSON.stringify(l)));const u=this.boundingSphere;return u!==null&&(t.data.boundingSphere=u.toJSON()),t}clone(){return new this.constructor().copy(this)}copy(t){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const n={};this.name=t.name;const i=t.index;i!==null&&this.setIndex(i.clone());const r=t.attributes;for(const f in r){const p=r[f];this.setAttribute(f,p.clone(n))}const o=t.morphAttributes;for(const f in o){const p=[],g=o[f];for(let m=0,v=g.length;m<v;m++)p.push(g[m].clone(n));this.morphAttributes[f]=p}this.morphTargetsRelative=t.morphTargetsRelative;const l=t.groups;for(let f=0,p=l.length;f<p;f++){const g=l[f];this.addGroup(g.start,g.count,g.materialIndex)}const u=t.boundingBox;u!==null&&(this.boundingBox=u.clone());const h=t.boundingSphere;return h!==null&&(this.boundingSphere=h.clone()),this.drawRange.start=t.drawRange.start,this.drawRange.count=t.drawRange.count,this.userData=t.userData,this._transformed=t._transformed,this}dispose(){this.dispatchEvent({type:"dispose"})}},Zh=class{constructor(e,t){this.isInterleavedBuffer=!0,this.array=e,this.stride=t,this.count=e!==void 0?e.length/t:0,this.usage=qh,this.updateRanges=[],this.version=0,this.uuid=Oi()}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}setUsage(e){return this.usage=e,this}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.array=new e.array.constructor(e.array),this.count=e.count,this.stride=e.stride,this.usage=e.usage,this}copyAt(e,t,n){e*=this.stride,n*=t.stride;for(let i=0,r=this.stride;i<r;i++)this.array[e+i]=t.array[n+i];return this}set(e,t=0){return this.array.set(e,t),this}clone(e){e.arrayBuffers===void 0&&(e.arrayBuffers={}),this.array.buffer._uuid===void 0&&(this.array.buffer._uuid=Oi()),e.arrayBuffers[this.array.buffer._uuid]===void 0&&(e.arrayBuffers[this.array.buffer._uuid]=this.array.slice(0).buffer);const t=new this.array.constructor(e.arrayBuffers[this.array.buffer._uuid]),n=new this.constructor(t,this.stride);return n.setUsage(this.usage),n}onUpload(e){return this.onUploadCallback=e,this}toJSON(e){return e.arrayBuffers===void 0&&(e.arrayBuffers={}),this.array.buffer._uuid===void 0&&(this.array.buffer._uuid=Oi()),e.arrayBuffers[this.array.buffer._uuid]===void 0&&(e.arrayBuffers[this.array.buffer._uuid]=Array.from(new Uint32Array(this.array.buffer))),{uuid:this.uuid,buffer:this.array.buffer._uuid,type:this.array.constructor.name,stride:this.stride}}},ai=new k,zc=class By{constructor(t,n,i,r=!1){this.isInterleavedBufferAttribute=!0,this.name="",this.data=t,this.itemSize=n,this.offset=i,this.normalized=r}get count(){return this.data.count}get array(){return this.data.array}set needsUpdate(t){this.data.needsUpdate=t}applyMatrix4(t){for(let n=0,i=this.data.count;n<i;n++)ai.fromBufferAttribute(this,n),ai.applyMatrix4(t),this.setXYZ(n,ai.x,ai.y,ai.z);return this}applyNormalMatrix(t){for(let n=0,i=this.count;n<i;n++)ai.fromBufferAttribute(this,n),ai.applyNormalMatrix(t),this.setXYZ(n,ai.x,ai.y,ai.z);return this}transformDirection(t){for(let n=0,i=this.count;n<i;n++)ai.fromBufferAttribute(this,n),ai.transformDirection(t),this.setXYZ(n,ai.x,ai.y,ai.z);return this}getComponent(t,n){let i=this.array[t*this.data.stride+this.offset+n];return this.normalized&&(i=ui(i,this.array)),i}setComponent(t,n,i){return this.normalized&&(i=Ct(i,this.array)),this.data.array[t*this.data.stride+this.offset+n]=i,this}setX(t,n){return this.normalized&&(n=Ct(n,this.array)),this.data.array[t*this.data.stride+this.offset]=n,this}setY(t,n){return this.normalized&&(n=Ct(n,this.array)),this.data.array[t*this.data.stride+this.offset+1]=n,this}setZ(t,n){return this.normalized&&(n=Ct(n,this.array)),this.data.array[t*this.data.stride+this.offset+2]=n,this}setW(t,n){return this.normalized&&(n=Ct(n,this.array)),this.data.array[t*this.data.stride+this.offset+3]=n,this}getX(t){let n=this.data.array[t*this.data.stride+this.offset];return this.normalized&&(n=ui(n,this.array)),n}getY(t){let n=this.data.array[t*this.data.stride+this.offset+1];return this.normalized&&(n=ui(n,this.array)),n}getZ(t){let n=this.data.array[t*this.data.stride+this.offset+2];return this.normalized&&(n=ui(n,this.array)),n}getW(t){let n=this.data.array[t*this.data.stride+this.offset+3];return this.normalized&&(n=ui(n,this.array)),n}setXY(t,n,i){return t=t*this.data.stride+this.offset,this.normalized&&(n=Ct(n,this.array),i=Ct(i,this.array)),this.data.array[t+0]=n,this.data.array[t+1]=i,this}setXYZ(t,n,i,r){return t=t*this.data.stride+this.offset,this.normalized&&(n=Ct(n,this.array),i=Ct(i,this.array),r=Ct(r,this.array)),this.data.array[t+0]=n,this.data.array[t+1]=i,this.data.array[t+2]=r,this}setXYZW(t,n,i,r,o){return t=t*this.data.stride+this.offset,this.normalized&&(n=Ct(n,this.array),i=Ct(i,this.array),r=Ct(r,this.array),o=Ct(o,this.array)),this.data.array[t+0]=n,this.data.array[t+1]=i,this.data.array[t+2]=r,this.data.array[t+3]=o,this}clone(t){if(t===void 0){Bc("InterleavedBufferAttribute.clone(): Cloning an interleaved buffer attribute will de-interleave buffer data.");const n=[];for(let i=0;i<this.count;i++){const r=i*this.data.stride+this.offset;for(let o=0;o<this.itemSize;o++)n.push(this.data.array[r+o])}return new Jt(new this.array.constructor(n),this.itemSize,this.normalized)}else return t.interleavedBuffers===void 0&&(t.interleavedBuffers={}),t.interleavedBuffers[this.data.uuid]===void 0&&(t.interleavedBuffers[this.data.uuid]=this.data.clone(t)),new By(t.interleavedBuffers[this.data.uuid],this.itemSize,this.offset,this.normalized)}toJSON(t){if(t===void 0){Bc("InterleavedBufferAttribute.toJSON(): Serializing an interleaved buffer attribute will de-interleave buffer data.");const n=[];for(let i=0;i<this.count;i++){const r=i*this.data.stride+this.offset;for(let o=0;o<this.itemSize;o++)n.push(this.data.array[r+o])}return{itemSize:this.itemSize,type:this.array.constructor.name,array:n,normalized:this.normalized}}else return t.interleavedBuffers===void 0&&(t.interleavedBuffers={}),t.interleavedBuffers[this.data.uuid]===void 0&&(t.interleavedBuffers[this.data.uuid]=this.data.toJSON(t)),{isInterleavedBufferAttribute:!0,itemSize:this.itemSize,data:this.data.uuid,offset:this.offset,normalized:this.normalized}}},x4=0,Wn=class extends dr{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:x4++}),this.uuid=Oi(),this.name="",this.type="Material",this.blending=1,this.side=0,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.alphaHash=!1,this.blendSrc=204,this.blendDst=205,this.blendEquation=100,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.blendColor=new Xe(0,0,0),this.blendAlpha=0,this.depthFunc=3,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=519,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=Ih,this.stencilZFail=Ih,this.stencilZPass=Ih,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.forceSinglePass=!1,this.allowOverride=!0,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0,this._alphaTest=0}get alphaTest(){return this._alphaTest}set alphaTest(e){this._alphaTest>0!=e>0&&this.version++,this._alphaTest=e}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(e!==void 0)for(const t in e){const n=e[t];if(n===void 0){Ue(`Material: parameter '${t}' has value of undefined.`);continue}const i=this[t];if(i===void 0){Ue(`Material: '${t}' is not a property of THREE.${this.type}.`);continue}i&&i.isColor?i.set(n):i&&i.isVector2&&n&&n.isVector2||i&&i.isEuler&&n&&n.isEuler||i&&i.isVector3&&n&&n.isVector3?i.copy(n):this[t]=n}}toJSON(e){const t=e===void 0||typeof e=="string";t&&(e={textures:{},images:{}});const n={metadata:{version:4.7,type:"Material",generator:"Material.toJSON"}};
vendor: 16,668 bytes, line 9
9n.uuid=this.uuid,n.type=this.type,this.name!==""&&(n.name=this.name),this.color&&this.color.isColor&&(n.color=this.color.getHex()),this.roughness!==void 0&&(n.roughness=this.roughness),this.metalness!==void 0&&(n.metalness=this.metalness),this.sheen!==void 0&&(n.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(n.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(n.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),this.emissiveIntensity!==void 0&&this.emissiveIntensity!==1&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(n.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(n.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(n.shininess=this.shininess),this.clearcoat!==void 0&&(n.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(n.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(n.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(n.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(n.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,n.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.sheenColorMap&&this.sheenColorMap.isTexture&&(n.sheenColorMap=this.sheenColorMap.toJSON(e).uuid),this.sheenRoughnessMap&&this.sheenRoughnessMap.isTexture&&(n.sheenRoughnessMap=this.sheenRoughnessMap.toJSON(e).uuid),this.dispersion!==void 0&&(n.dispersion=this.dispersion),this.iridescence!==void 0&&(n.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(n.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(n.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(n.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(n.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),this.anisotropy!==void 0&&(n.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(n.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(n.anisotropyMap=this.anisotropyMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(n.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(n.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(n.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(n.lightMap=this.lightMap.toJSON(e).uuid,n.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(n.aoMap=this.aoMap.toJSON(e).uuid,n.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(n.bumpMap=this.bumpMap.toJSON(e).uuid,n.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(n.normalMap=this.normalMap.toJSON(e).uuid,n.normalMapType=this.normalMapType,n.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(n.displacementMap=this.displacementMap.toJSON(e).uuid,n.displacementScale=this.displacementScale,n.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(n.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(n.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(n.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(n.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(n.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(n.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(e).uuid,this.combine!==void 0&&(n.combine=this.combine)),this.envMapRotation!==void 0&&(n.envMapRotation=this.envMapRotation.toArray()),this.envMapIntensity!==void 0&&(n.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(n.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(n.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(e).uuid),this.transmission!==void 0&&(n.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(n.transmissionMap=this.transmissionMap.toJSON(e).uuid),this.thickness!==void 0&&(n.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(n.thicknessMap=this.thicknessMap.toJSON(e).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(n.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(n.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(n.size=this.size),this.shadowSide!==null&&(n.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(n.sizeAttenuation=this.sizeAttenuation),this.blending!==1&&(n.blending=this.blending),this.side!==0&&(n.side=this.side),this.vertexColors===!0&&(n.vertexColors=!0),this.opacity<1&&(n.opacity=this.opacity),this.transparent===!0&&(n.transparent=!0),this.blendSrc!==204&&(n.blendSrc=this.blendSrc),this.blendDst!==205&&(n.blendDst=this.blendDst),this.blendEquation!==100&&(n.blendEquation=this.blendEquation),this.blendSrcAlpha!==null&&(n.blendSrcAlpha=this.blendSrcAlpha),this.blendDstAlpha!==null&&(n.blendDstAlpha=this.blendDstAlpha),this.blendEquationAlpha!==null&&(n.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(n.blendColor=this.blendColor.getHex()),this.blendAlpha!==0&&(n.blendAlpha=this.blendAlpha),this.depthFunc!==3&&(n.depthFunc=this.depthFunc),this.depthTest===!1&&(n.depthTest=this.depthTest),this.depthWrite===!1&&(n.depthWrite=this.depthWrite),this.colorWrite===!1&&(n.colorWrite=this.colorWrite),this.stencilWriteMask!==255&&(n.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==519&&(n.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(n.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(n.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==7680&&(n.stencilFail=this.stencilFail),this.stencilZFail!==7680&&(n.stencilZFail=this.stencilZFail),this.stencilZPass!==7680&&(n.stencilZPass=this.stencilZPass),this.stencilWrite===!0&&(n.stencilWrite=this.stencilWrite),this.rotation!==void 0&&this.rotation!==0&&(n.rotation=this.rotation),this.polygonOffset===!0&&(n.polygonOffset=!0),this.polygonOffsetFactor!==0&&(n.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(n.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(n.linewidth=this.linewidth),this.dashSize!==void 0&&(n.dashSize=this.dashSize),this.gapSize!==void 0&&(n.gapSize=this.gapSize),this.scale!==void 0&&(n.scale=this.scale),this.dithering===!0&&(n.dithering=!0),this.alphaTest>0&&(n.alphaTest=this.alphaTest),this.alphaHash===!0&&(n.alphaHash=!0),this.alphaToCoverage===!0&&(n.alphaToCoverage=!0),this.premultipliedAlpha===!0&&(n.premultipliedAlpha=!0),this.forceSinglePass===!0&&(n.forceSinglePass=!0),this.allowOverride===!1&&(n.allowOverride=!1),this.wireframe===!0&&(n.wireframe=!0),this.wireframeLinewidth>1&&(n.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(n.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(n.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(n.flatShading=!0),this.visible===!1&&(n.visible=!1),this.toneMapped===!1&&(n.toneMapped=!1),this.fog===!1&&(n.fog=!1),Object.keys(this.userData).length>0&&(n.userData=this.userData);function i(r){const o=[];for(const l in r){const u=r[l];delete u.metadata,o.push(u)}return o}if(t){const r=i(e.textures),o=i(e.images);r.length>0&&(n.textures=r),o.length>0&&(n.images=o)}return n}fromJSON(e,t){if(e.uuid!==void 0&&(this.uuid=e.uuid),e.name!==void 0&&(this.name=e.name),e.color!==void 0&&this.color!==void 0&&this.color.setHex(e.color),e.roughness!==void 0&&(this.roughness=e.roughness),e.metalness!==void 0&&(this.metalness=e.metalness),e.sheen!==void 0&&(this.sheen=e.sheen),e.sheenColor!==void 0&&(this.sheenColor=new Xe().setHex(e.sheenColor)),e.sheenRoughness!==void 0&&(this.sheenRoughness=e.sheenRoughness),e.emissive!==void 0&&this.emissive!==void 0&&this.emissive.setHex(e.emissive),e.specular!==void 0&&this.specular!==void 0&&this.specular.setHex(e.specular),e.specularIntensity!==void 0&&(this.specularIntensity=e.specularIntensity),e.specularColor!==void 0&&this.specularColor!==void 0&&this.specularColor.setHex(e.specularColor),e.shininess!==void 0&&(this.shininess=e.shininess),e.clearcoat!==void 0&&(this.clearcoat=e.clearcoat),e.clearcoatRoughness!==void 0&&(this.clearcoatRoughness=e.clearcoatRoughness),e.dispersion!==void 0&&(this.dispersion=e.dispersion),e.iridescence!==void 0&&(this.iridescence=e.iridescence),e.iridescenceIOR!==void 0&&(this.iridescenceIOR=e.iridescenceIOR),e.iridescenceThicknessRange!==void 0&&(this.iridescenceThicknessRange=e.iridescenceThicknessRange),e.transmission!==void 0&&(this.transmission=e.transmission),e.thickness!==void 0&&(this.thickness=e.thickness),e.attenuationDistance!==void 0&&(this.attenuationDistance=e.attenuationDistance),e.attenuationColor!==void 0&&this.attenuationColor!==void 0&&this.attenuationColor.setHex(e.attenuationColor),e.anisotropy!==void 0&&(this.anisotropy=e.anisotropy),e.anisotropyRotation!==void 0&&(this.anisotropyRotation=e.anisotropyRotation),e.fog!==void 0&&(this.fog=e.fog),e.flatShading!==void 0&&(this.flatShading=e.flatShading),e.blending!==void 0&&(this.blending=e.blending),e.combine!==void 0&&(this.combine=e.combine),e.side!==void 0&&(this.side=e.side),e.shadowSide!==void 0&&(this.shadowSide=e.shadowSide),e.opacity!==void 0&&(this.opacity=e.opacity),e.transparent!==void 0&&(this.transparent=e.transparent),e.alphaTest!==void 0&&(this.alphaTest=e.alphaTest),e.alphaHash!==void 0&&(this.alphaHash=e.alphaHash),e.depthFunc!==void 0&&(this.depthFunc=e.depthFunc),e.depthTest!==void 0&&(this.depthTest=e.depthTest),e.depthWrite!==void 0&&(this.depthWrite=e.depthWrite),e.colorWrite!==void 0&&(this.colorWrite=e.colorWrite),e.blendSrc!==void 0&&(this.blendSrc=e.blendSrc),e.blendDst!==void 0&&(this.blendDst=e.blendDst),e.blendEquation!==void 0&&(this.blendEquation=e.blendEquation),e.blendSrcAlpha!==void 0&&(this.blendSrcAlpha=e.blendSrcAlpha),e.blendDstAlpha!==void 0&&(this.blendDstAlpha=e.blendDstAlpha),e.blendEquationAlpha!==void 0&&(this.blendEquationAlpha=e.blendEquationAlpha),e.blendColor!==void 0&&this.blendColor!==void 0&&this.blendColor.setHex(e.blendColor),e.blendAlpha!==void 0&&(this.blendAlpha=e.blendAlpha),e.stencilWriteMask!==void 0&&(this.stencilWriteMask=e.stencilWriteMask),e.stencilFunc!==void 0&&(this.stencilFunc=e.stencilFunc),e.stencilRef!==void 0&&(this.stencilRef=e.stencilRef),e.stencilFuncMask!==void 0&&(this.stencilFuncMask=e.stencilFuncMask),e.stencilFail!==void 0&&(this.stencilFail=e.stencilFail),e.stencilZFail!==void 0&&(this.stencilZFail=e.stencilZFail),e.stencilZPass!==void 0&&(this.stencilZPass=e.stencilZPass),e.stencilWrite!==void 0&&(this.stencilWrite=e.stencilWrite),e.wireframe!==void 0&&(this.wireframe=e.wireframe),e.wireframeLinewidth!==void 0&&(this.wireframeLinewidth=e.wireframeLinewidth),e.wireframeLinecap!==void 0&&(this.wireframeLinecap=e.wireframeLinecap),e.wireframeLinejoin!==void 0&&(this.wireframeLinejoin=e.wireframeLinejoin),e.rotation!==void 0&&(this.rotation=e.rotation),e.linewidth!==void 0&&(this.linewidth=e.linewidth),e.dashSize!==void 0&&(this.dashSize=e.dashSize),e.gapSize!==void 0&&(this.gapSize=e.gapSize),e.scale!==void 0&&(this.scale=e.scale),e.polygonOffset!==void 0&&(this.polygonOffset=e.polygonOffset),e.polygonOffsetFactor!==void 0&&(this.polygonOffsetFactor=e.polygonOffsetFactor),e.polygonOffsetUnits!==void 0&&(this.polygonOffsetUnits=e.polygonOffsetUnits),e.dithering!==void 0&&(this.dithering=e.dithering),e.alphaToCoverage!==void 0&&(this.alphaToCoverage=e.alphaToCoverage),e.premultipliedAlpha!==void 0&&(this.premultipliedAlpha=e.premultipliedAlpha),e.forceSinglePass!==void 0&&(this.forceSinglePass=e.forceSinglePass),e.allowOverride!==void 0&&(this.allowOverride=e.allowOverride),e.visible!==void 0&&(this.visible=e.visible),e.toneMapped!==void 0&&(this.toneMapped=e.toneMapped),e.userData!==void 0&&(this.userData=e.userData),e.vertexColors!==void 0&&(typeof e.vertexColors=="number"?this.vertexColors=e.vertexColors>0:this.vertexColors=e.vertexColors),e.size!==void 0&&(this.size=e.size),e.sizeAttenuation!==void 0&&(this.sizeAttenuation=e.sizeAttenuation),e.map!==void 0&&(this.map=t[e.map]||null),e.matcap!==void 0&&(this.matcap=t[e.matcap]||null),e.alphaMap!==void 0&&(this.alphaMap=t[e.alphaMap]||null),e.bumpMap!==void 0&&(this.bumpMap=t[e.bumpMap]||null),e.bumpScale!==void 0&&(this.bumpScale=e.bumpScale),e.normalMap!==void 0&&(this.normalMap=t[e.normalMap]||null),e.normalMapType!==void 0&&(this.normalMapType=e.normalMapType),e.normalScale!==void 0){let n=e.normalScale;Array.isArray(n)===!1&&(n=[n,n]),this.normalScale=new ye().fromArray(n)}return e.displacementMap!==void 0&&(this.displacementMap=t[e.displacementMap]||null),e.displacementScale!==void 0&&(this.displacementScale=e.displacementScale),e.displacementBias!==void 0&&(this.displacementBias=e.displacementBias),e.roughnessMap!==void 0&&(this.roughnessMap=t[e.roughnessMap]||null),e.metalnessMap!==void 0&&(this.metalnessMap=t[e.metalnessMap]||null),e.emissiveMap!==void 0&&(this.emissiveMap=t[e.emissiveMap]||null),e.emissiveIntensity!==void 0&&(this.emissiveIntensity=e.emissiveIntensity),e.specularMap!==void 0&&(this.specularMap=t[e.specularMap]||null),e.specularIntensityMap!==void 0&&(this.specularIntensityMap=t[e.specularIntensityMap]||null),e.specularColorMap!==void 0&&(this.specularColorMap=t[e.specularColorMap]||null),e.envMap!==void 0&&(this.envMap=t[e.envMap]||null),e.envMapRotation!==void 0&&this.envMapRotation.fromArray(e.envMapRotation),e.envMapIntensity!==void 0&&(this.envMapIntensity=e.envMapIntensity),e.reflectivity!==void 0&&(this.reflectivity=e.reflectivity),e.refractionRatio!==void 0&&(this.refractionRatio=e.refractionRatio),e.lightMap!==void 0&&(this.lightMap=t[e.lightMap]||null),e.lightMapIntensity!==void 0&&(this.lightMapIntensity=e.lightMapIntensity),e.aoMap!==void 0&&(this.aoMap=t[e.aoMap]||null),e.aoMapIntensity!==void 0&&(this.aoMapIntensity=e.aoMapIntensity),e.gradientMap!==void 0&&(this.gradientMap=t[e.gradientMap]||null),e.clearcoatMap!==void 0&&(this.clearcoatMap=t[e.clearcoatMap]||null),e.clearcoatRoughnessMap!==void 0&&(this.clearcoatRoughnessMap=t[e.clearcoatRoughnessMap]||null),e.clearcoatNormalMap!==void 0&&(this.clearcoatNormalMap=t[e.clearcoatNormalMap]||null),e.clearcoatNormalScale!==void 0&&(this.clearcoatNormalScale=new ye().fromArray(e.clearcoatNormalScale)),e.iridescenceMap!==void 0&&(this.iridescenceMap=t[e.iridescenceMap]||null),e.iridescenceThicknessMap!==void 0&&(this.iridescenceThicknessMap=t[e.iridescenceThicknessMap]||null),e.transmissionMap!==void 0&&(this.transmissionMap=t[e.transmissionMap]||null),e.thicknessMap!==void 0&&(this.thicknessMap=t[e.thicknessMap]||null),e.anisotropyMap!==void 0&&(this.anisotropyMap=t[e.anisotropyMap]||null),e.sheenColorMap!==void 0&&(this.sheenColorMap=t[e.sheenColorMap]||null),e.sheenRoughnessMap!==void 0&&(this.sheenRoughnessMap=t[e.sheenRoughnessMap]||null),this}clone(){return new this.constructor().copy(this)}copy(e){this.name=e.name,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.blendColor.copy(e.blendColor),this.blendAlpha=e.blendAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;const t=e.clippingPlanes;let n=null;if(t!==null){const i=t.length;n=new Array(i);for(let r=0;r!==i;++r)n[r]=t[r].clone()}return this.clippingPlanes=n,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipSh
vendor: 4,349 bytes, line 9
9adows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaHash=e.alphaHash,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.forceSinglePass=e.forceSinglePass,this.allowOverride=e.allowOverride,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(e){e===!0&&this.version++}},o0=class extends Wn{constructor(e){super(),this.isSpriteMaterial=!0,this.type="SpriteMaterial",this.color=new Xe(16777215),this.map=null,this.alphaMap=null,this.rotation=0,this.sizeAttenuation=!0,this.transparent=!0,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.alphaMap=e.alphaMap,this.rotation=e.rotation,this.sizeAttenuation=e.sizeAttenuation,this.fog=e.fog,this}},al,hc=new k,ol=new k,ll=new k,cl=new ye,fc=new ye,zy=new _t,Gu=new k,dc=new k,Hu=new k,X1=new ye,Ud=new ye,q1=new ye,Vy=class extends Yt{constructor(e=new o0){if(super(),this.isSprite=!0,this.type="Sprite",al===void 0){al=new At;const t=new Float32Array([-.5,-.5,0,0,0,.5,-.5,0,1,0,.5,.5,0,1,1,-.5,.5,0,0,1]),n=new Zh(t,5);al.setIndex([0,1,2,0,2,3]),al.setAttribute("position",new zc(n,3,0,!1)),al.setAttribute("uv",new zc(n,2,3,!1))}this.geometry=al,this.material=e,this.center=new ye(.5,.5),this.count=1}raycast(e,t){e.camera===null&&rt('Sprite: "Raycaster.camera" needs to be set in order to raycast against sprites.'),ol.setFromMatrixScale(this.matrixWorld),zy.copy(e.camera.matrixWorld),this.modelViewMatrix.multiplyMatrices(e.camera.matrixWorldInverse,this.matrixWorld),ll.setFromMatrixPosition(this.modelViewMatrix),e.camera.isPerspectiveCamera&&this.material.sizeAttenuation===!1&&ol.multiplyScalar(-ll.z);const n=this.material.rotation;let i,r;n!==0&&(r=Math.cos(n),i=Math.sin(n));const o=this.center;Wu(Gu.set(-.5,-.5,0),ll,o,ol,i,r),Wu(dc.set(.5,-.5,0),ll,o,ol,i,r),Wu(Hu.set(.5,.5,0),ll,o,ol,i,r),X1.set(0,0),Ud.set(1,0),q1.set(1,1);let l=e.ray.intersectTriangle(Gu,dc,Hu,!1,hc);if(l===null&&(Wu(dc.set(-.5,.5,0),ll,o,ol,i,r),Ud.set(0,1),l=e.ray.intersectTriangle(Gu,Hu,dc,!1,hc),l===null))return;const u=e.ray.origin.distanceTo(hc);u<e.near||u>e.far||t.push({distance:u,point:hc.clone(),uv:ks.getInterpolation(hc,Gu,dc,Hu,X1,Ud,q1,new ye),face:null,object:this})}copy(e,t){return super.copy(e,t),e.center!==void 0&&this.center.copy(e.center),this.material=e.material,this}};function Wu(e,t,n,i,r,o){cl.subVectors(e,n).addScalar(.5).multiply(i),r!==void 0?(fc.x=o*cl.x-r*cl.y,fc.y=r*cl.x+o*cl.y):fc.copy(cl),e.copy(t),e.x+=fc.x,e.y+=fc.y,e.applyMatrix4(zy)}var ju=new k,Y1=new k,Gy=class extends Yt{constructor(){super(),this.isLOD=!0,this._currentLevel=0,this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]}}),this.autoUpdate=!0}copy(e){super.copy(e,!1);const t=e.levels;for(let n=0,i=t.length;n<i;n++){const r=t[n];this.addLevel(r.object.clone(),r.distance,r.hysteresis)}return this.autoUpdate=e.autoUpdate,this}addLevel(e,t=0,n=0){t=Math.abs(t);const i=this.levels;let r;for(r=0;r<i.length&&!(t<i[r].distance);r++);return i.splice(r,0,{distance:t,hysteresis:n,object:e}),this.add(e),this}removeLevel(e){const t=this.levels;for(let n=0;n<t.length;n++)if(t[n].distance===e){const i=t.splice(n,1);return this.remove(i[0].object),!0}return!1}getCurrentLevel(){return this._currentLevel}getObjectForDistance(e){const t=this.levels;if(t.length>0){let n,i;for(n=1,i=t.length;n<i;n++){let r=t[n].distance;if(t[n].object.visible&&(r-=r*t[n].hysteresis),e<r)break}return t[n-1].object}return null}raycast(e,t){if(this.levels.length>0){ju.setFromMatrixPosition(this.matrixWorld);const n=e.ray.origin.distanceTo(ju);this.getObjectForDistance(n).raycast(e,t)}}update(e){const t=this.levels;if(t.length>1){ju.setFromMatrixPosition(e.matrixWorld),Y1.setFromMatrixPosition(this.matrixWorld);const n=ju.distanceTo(Y1)/e.zoom;t[0].object.visible=!0;let i,r;for(i=1,r=t.length;i<r;i++){let o=t[i].distance;if(t[i].object.visible&&(o-=o*t[i].hysteresis),n>=o)t[i-1].object.visible=!1,t[i].object.visible=!0;else break}for(this._currentLevel=i-1;
vendor: 5,056 bytes, line 9
9i<r;i++)t[i].object.visible=!1}}toJSON(e){const t=super.toJSON(e);this.autoUpdate===!1&&(t.object.autoUpdate=!1),t.object.levels=[];const n=this.levels;for(let i=0,r=n.length;i<r;i++){const o=n[i];t.object.levels.push({object:o.object.uuid,distance:o.distance,hysteresis:o.hysteresis})}return t}},Jr=new k,Od=new k,Xu=new k,Ds=new k,Fd=new k,qu=new k,kd=new k,Dl=class{constructor(e=new k,t=new k(0,0,-1)){this.origin=e,this.direction=t}set(e,t){return this.origin.copy(e),this.direction.copy(t),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,t){return t.copy(this.origin).addScaledVector(this.direction,e)}lookAt(e){return this.direction.copy(e).sub(this.origin).normalize(),this}recast(e){return this.origin.copy(this.at(e,Jr)),this}closestPointToPoint(e,t){t.subVectors(e,this.origin);const n=t.dot(this.direction);return n<0?t.copy(this.origin):t.copy(this.origin).addScaledVector(this.direction,n)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){const t=Jr.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(Jr.copy(this.origin).addScaledVector(this.direction,t),Jr.distanceToSquared(e))}distanceSqToSegment(e,t,n,i){Od.copy(e).add(t).multiplyScalar(.5),Xu.copy(t).sub(e).normalize(),Ds.copy(this.origin).sub(Od);const r=e.distanceTo(t)*.5,o=-this.direction.dot(Xu),l=Ds.dot(this.direction),u=-Ds.dot(Xu),h=Ds.lengthSq(),f=Math.abs(1-o*o);let p,g,m,v;if(f>0)if(p=o*u-l,g=o*l-u,v=r*f,p>=0)if(g>=-v)if(g<=v){const b=1/f;p*=b,g*=b,m=p*(p+o*g+2*l)+g*(o*p+g+2*u)+h}else g=r,p=Math.max(0,-(o*g+l)),m=-p*p+g*(g+2*u)+h;else g=-r,p=Math.max(0,-(o*g+l)),m=-p*p+g*(g+2*u)+h;else g<=-v?(p=Math.max(0,-(-o*r+l)),g=p>0?-r:Math.min(Math.max(-r,-u),r),m=-p*p+g*(g+2*u)+h):g<=v?(p=0,g=Math.min(Math.max(-r,-u),r),m=g*(g+2*u)+h):(p=Math.max(0,-(o*r+l)),g=p>0?r:Math.min(Math.max(-r,-u),r),m=-p*p+g*(g+2*u)+h);else g=o>0?-r:r,p=Math.max(0,-(o*g+l)),m=-p*p+g*(g+2*u)+h;return n&&n.copy(this.origin).addScaledVector(this.direction,p),i&&i.copy(Od).addScaledVector(Xu,g),m}intersectSphere(e,t){Jr.subVectors(e.center,this.origin);const n=Jr.dot(this.direction),i=Jr.dot(Jr)-n*n,r=e.radius*e.radius;if(i>r)return null;const o=Math.sqrt(r-i),l=n-o,u=n+o;return u<0?null:l<0?this.at(u,t):this.at(l,t)}intersectsSphere(e){return e.radius<0?!1:this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){const t=e.normal.dot(this.direction);if(t===0)return e.distanceToPoint(this.origin)===0?0:null;const n=-(this.origin.dot(e.normal)+e.constant)/t;return n>=0?n:null}intersectPlane(e,t){const n=this.distanceToPlane(e);return n===null?null:this.at(n,t)}intersectsPlane(e){const t=e.distanceToPoint(this.origin);return t===0||e.normal.dot(this.direction)*t<0}intersectBox(e,t){let n,i,r,o,l,u;const h=1/this.direction.x,f=1/this.direction.y,p=1/this.direction.z,g=this.origin;return h>=0?(n=(e.min.x-g.x)*h,i=(e.max.x-g.x)*h):(n=(e.max.x-g.x)*h,i=(e.min.x-g.x)*h),f>=0?(r=(e.min.y-g.y)*f,o=(e.max.y-g.y)*f):(r=(e.max.y-g.y)*f,o=(e.min.y-g.y)*f),n>o||r>i||((r>n||isNaN(n))&&(n=r),(o<i||isNaN(i))&&(i=o),p>=0?(l=(e.min.z-g.z)*p,u=(e.max.z-g.z)*p):(l=(e.max.z-g.z)*p,u=(e.min.z-g.z)*p),n>u||l>i)||((l>n||n!==n)&&(n=l),(u<i||i!==i)&&(i=u),i<0)?null:this.at(n>=0?n:i,t)}intersectsBox(e){return this.intersectBox(e,Jr)!==null}intersectTriangle(e,t,n,i,r){Fd.subVectors(t,e),qu.subVectors(n,e),kd.crossVectors(Fd,qu);let o=this.direction.dot(kd),l;if(o>0){if(i)return null;l=1}else if(o<0)l=-1,o=-o;else return null;Ds.subVectors(this.origin,e);const u=l*this.direction.dot(qu.crossVectors(Ds,qu));if(u<0)return null;const h=l*this.direction.dot(Fd.cross(Ds));if(h<0||u+h>o)return null;const f=-l*Ds.dot(kd);return f<0?null:this.at(f/o,r)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}},qs=class extends Wn{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new Xe(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new as,this.combine=0,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}}
vendor: 10,624 bytes, line 9
9,$1=new _t,Ya=new Dl,Yu=new Hn,Z1=new k,$u=new k,Zu=new k,Ju=new k,Bd=new k,Ku=new k,J1=new k,Qu=new k,Cn=class extends Yt{constructor(e=new At,t=new qs){super(),this.isMesh=!0,this.type="Mesh",this.geometry=e,this.material=t,this.morphTargetDictionary=void 0,this.morphTargetInfluences=void 0,this.count=1,this.updateMorphTargets()}copy(e,t){return super.copy(e,t),e.morphTargetInfluences!==void 0&&(this.morphTargetInfluences=e.morphTargetInfluences.slice()),e.morphTargetDictionary!==void 0&&(this.morphTargetDictionary=Object.assign({},e.morphTargetDictionary)),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}updateMorphTargets(){const e=this.geometry.morphAttributes,t=Object.keys(e);if(t.length>0){const n=e[t[0]];if(n!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let i=0,r=n.length;i<r;i++){const o=n[i].name||String(i);this.morphTargetInfluences.push(0),this.morphTargetDictionary[o]=i}}}}getVertexPosition(e,t){const n=this.geometry,i=n.attributes.position,r=n.morphAttributes.position,o=n.morphTargetsRelative;t.fromBufferAttribute(i,e);const l=this.morphTargetInfluences;if(r&&l){Ku.set(0,0,0);for(let u=0,h=r.length;u<h;u++){const f=l[u],p=r[u];f!==0&&(Bd.fromBufferAttribute(p,e),o?Ku.addScaledVector(Bd,f):Ku.addScaledVector(Bd.sub(t),f))}t.add(Ku)}return t}raycast(e,t){const n=this.geometry,i=this.material,r=this.matrixWorld;i!==void 0&&(n.boundingSphere===null&&n.computeBoundingSphere(),Yu.copy(n.boundingSphere),Yu.applyMatrix4(r),Ya.copy(e.ray).recast(e.near),!(Yu.containsPoint(Ya.origin)===!1&&(Ya.intersectSphere(Yu,Z1)===null||Ya.origin.distanceToSquared(Z1)>(e.far-e.near)**2))&&($1.copy(r).invert(),Ya.copy(e.ray).applyMatrix4($1),!(n.boundingBox!==null&&Ya.intersectsBox(n.boundingBox)===!1)&&this._computeIntersections(e,t,Ya)))}_computeIntersections(e,t,n){let i;const r=this.geometry,o=this.material,l=r.index,u=r.attributes.position,h=r.attributes.uv,f=r.attributes.uv1,p=r.attributes.normal,g=r.groups,m=r.drawRange;if(l!==null)if(Array.isArray(o))for(let v=0,b=g.length;v<b;v++){const w=g[v],S=o[w.materialIndex],_=Math.max(w.start,m.start),C=Math.min(l.count,Math.min(w.start+w.count,m.start+m.count));for(let A=_,E=C;A<E;A+=3){const P=l.getX(A),N=l.getX(A+1),O=l.getX(A+2);i=eh(this,S,e,n,h,f,p,P,N,O),i&&(i.faceIndex=Math.floor(A/3),i.face.materialIndex=w.materialIndex,t.push(i))}}else{const v=Math.max(0,m.start),b=Math.min(l.count,m.start+m.count);for(let w=v,S=b;w<S;w+=3){const _=l.getX(w),C=l.getX(w+1),A=l.getX(w+2);i=eh(this,o,e,n,h,f,p,_,C,A),i&&(i.faceIndex=Math.floor(w/3),t.push(i))}}else if(u!==void 0)if(Array.isArray(o))for(let v=0,b=g.length;v<b;v++){const w=g[v],S=o[w.materialIndex],_=Math.max(w.start,m.start),C=Math.min(u.count,Math.min(w.start+w.count,m.start+m.count));for(let A=_,E=C;A<E;A+=3){const P=A,N=A+1,O=A+2;i=eh(this,S,e,n,h,f,p,P,N,O),i&&(i.faceIndex=Math.floor(A/3),i.face.materialIndex=w.materialIndex,t.push(i))}}else{const v=Math.max(0,m.start),b=Math.min(u.count,m.start+m.count);for(let w=v,S=b;w<S;w+=3){const _=w,C=w+1,A=w+2;i=eh(this,o,e,n,h,f,p,_,C,A),i&&(i.faceIndex=Math.floor(w/3),t.push(i))}}}};function _4(e,t,n,i,r,o,l,u){let h;if(t.side===1?h=i.intersectTriangle(l,o,r,!0,u):h=i.intersectTriangle(r,o,l,t.side===0,u),h===null)return null;Qu.copy(u),Qu.applyMatrix4(e.matrixWorld);const f=n.ray.origin.distanceTo(Qu);return f<n.near||f>n.far?null:{distance:f,point:Qu.clone(),object:e}}function eh(e,t,n,i,r,o,l,u,h,f){e.getVertexPosition(u,$u),e.getVertexPosition(h,Zu),e.getVertexPosition(f,Ju);const p=_4(e,t,n,i,$u,Zu,Ju,J1);if(p){const g=new k;ks.getBarycoord(J1,$u,Zu,Ju,g),r&&(p.uv=ks.getInterpolatedAttribute(r,u,h,f,g,new ye)),o&&(p.uv1=ks.getInterpolatedAttribute(o,u,h,f,g,new ye)),l&&(p.normal=ks.getInterpolatedAttribute(l,u,h,f,g,new k),p.normal.dot(i.direction)>0&&p.normal.multiplyScalar(-1));const m={a:u,b:h,c:f,normal:new k,materialIndex:0};ks.getNormal($u,Zu,Ju,m.normal),p.face=m,p.barycoord=g}return p}var pc=new tn,K1=new tn,Q1=new tn,b4=new tn,eg=new _t,th=new k,zd=new Hn,tg=new _t,Vd=new Dl,Hy=class extends Cn{constructor(e,t){super(e,t),this.isSkinnedMesh=!0,this.type="SkinnedMesh",this.bindMode=Iv,this.bindMatrix=new _t,this.bindMatrixInverse=new _t,this.boundingBox=null,this.boundingSphere=null}computeBoundingBox(){const e=this.geometry;this.boundingBox===null&&(this.boundingBox=new ti),this.boundingBox.makeEmpty();const t=e.getAttribute("position");for(let n=0;n<t.count;n++)this.getVertexPosition(n,th),this.boundingBox.expandByPoint(th)}computeBoundingSphere(){const e=this.geometry;this.boundingSphere===null&&(this.boundingSphere=new Hn),this.boundingSphere.makeEmpty();const t=e.getAttribute("position");for(let n=0;n<t.count;n++)this.getVertexPosition(n,th),this.boundingSphere.expandByPoint(th)}copy(e,t){return super.copy(e,t),this.bindMode=e.bindMode,this.bindMatrix.copy(e.bindMatrix),this.bindMatrixInverse.copy(e.bindMatrixInverse),this.skeleton=e.skeleton,e.boundingBox!==null&&(this.boundingBox=e.boundingBox.clone()),e.boundingSphere!==null&&(this.boundingSphere=e.boundingSphere.clone()),this}raycast(e,t){const n=this.material,i=this.matrixWorld;n!==void 0&&(this.boundingSphere===null&&this.computeBoundingSphere(),zd.copy(this.boundingSphere),zd.applyMatrix4(i),e.ray.intersectsSphere(zd)!==!1&&(tg.copy(i).invert(),Vd.copy(e.ray).applyMatrix4(tg),!(this.boundingBox!==null&&Vd.intersectsBox(this.boundingBox)===!1)&&this._computeIntersections(e,t,Vd)))}getVertexPosition(e,t){return super.getVertexPosition(e,t),this.applyBoneTransform(e,t),t}bind(e,t){this.skeleton=e,t===void 0&&(this.updateMatrixWorld(!0),this.skeleton.calculateInverses(),t=this.matrixWorld),this.bindMatrix.copy(t),this.bindMatrixInverse.copy(t).invert()}pose(){this.skeleton.pose()}normalizeSkinWeights(){const e=new tn,t=this.geometry.attributes.skinWeight;for(let n=0,i=t.count;n<i;n++){e.fromBufferAttribute(t,n);const r=1/e.manhattanLength();r!==1/0?e.multiplyScalar(r):e.set(1,0,0,0),t.setXYZW(n,e.x,e.y,e.z,e.w)}}updateMatrixWorld(e){super.updateMatrixWorld(e),this.bindMode==="attached"?this.bindMatrixInverse.copy(this.matrixWorld).invert():this.bindMode==="detached"?this.bindMatrixInverse.copy(this.bindMatrix).invert():Ue("SkinnedMesh: Unrecognized bindMode: "+this.bindMode)}applyBoneTransform(e,t){const n=this.skeleton,i=this.geometry;K1.fromBufferAttribute(i.attributes.skinIndex,e),Q1.fromBufferAttribute(i.attributes.skinWeight,e),t.isVector4?(pc.copy(t),t.set(0,0,0,0)):(pc.set(...t,1),t.set(0,0,0)),pc.applyMatrix4(this.bindMatrix);for(let r=0;r<4;r++){const o=Q1.getComponent(r);if(o!==0){const l=K1.getComponent(r);eg.multiplyMatrices(n.bones[l].matrixWorld,n.boneInverses[l]),t.addScaledVector(b4.copy(pc).applyMatrix4(eg),o)}}return t.isVector4&&(t.w=pc.w),t.applyMatrix4(this.bindMatrixInverse)}},l0=class extends Yt{constructor(){super(),this.isBone=!0,this.type="Bone"}},$i=class extends Ln{constructor(e=null,t=1,n=1,i,r,o,l,u,h=In,f=In,p,g){super(null,o,l,u,h,f,i,r,p,g),this.isDataTexture=!0,this.image={data:e,width:t,height:n},this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}},ng=new _t,S4=new _t,Wy=class jy{constructor(t=[],n=[]){this.uuid=Oi(),this.bones=t.slice(0),this.boneInverses=n,this.boneMatrices=null,this.boneTexture=null,this.init()}init(){const t=this.bones,n=this.boneInverses;if(this.boneMatrices=new Float32Array(t.length*16),n.length===0)this.calculateInverses();else if(t.length!==n.length){Ue("Skeleton: Number of inverse bone matrices does not match amount of bones."),this.boneInverses=[];for(let i=0,r=this.bones.length;i<r;i++)this.boneInverses.push(new _t)}}calculateInverses(){this.boneInverses.length=0;for(let t=0,n=this.bones.length;t<n;t++){const i=new _t;this.bones[t]&&i.copy(this.bones[t].matrixWorld).invert(),this.boneInverses.push(i)}}pose(){for(let t=0,n=this.bones.length;t<n;t++){const i=this.bones[t];i&&i.matrixWorld.copy(this.boneInverses[t]).invert()}for(let t=0,n=this.bones.length;t<n;t++){const i=this.bones[t];i&&(i.parent&&i.parent.isBone?(i.matrix.copy(i.parent.matrixWorld).invert(),i.matrix.multiply(i.matrixWorld)):i.matrix.copy(i.matrixWorld),i.matrix.decompose(i.position,i.quaternion,i.scale))}}update(){const t=this.bones,n=this.boneInverses,i=this.boneMatrices,r=this.boneTexture;for(let o=0,l=t.length;o<l;o++){const u=t[o]?t[o].matrixWorld:S4;ng.multiplyMatrices(u,n[o]),ng.toArray(i,o*16)}r!==null&&(r.needsUpdate=!0)}clone(){return new jy(this.bones,this.boneInverses)}computeBoneTexture(){let t=Math.sqrt(this.bones.length*4);t=Math.ceil(t/4)*4,t=Math.max(t,4);const n=new Float32Array(t*t*4);n.set(this.boneMatrices);const i=new $i(n,t,t,ss,rs);return i.needsUpdate=!0,this.boneMatrices=n,this.boneTexture=i,this}getBoneByName(t){for(let n=0,i=this.bones.length;n<i;n++){const r=this.bones[n];if(r.name===t)return r}}dispose(){this.boneTexture!==null&&(this.boneTexture.dispose(),this.boneTexture=null)}fromJSON(t,n){this.uuid=t.uuid;for(let i=0,r=t.bones.length;i<r;i++){const o=t.bones[i];let l=n[o];l===void 0&&(Ue("Skeleton: No bone found with UUID:",o),l=new l0),this.bones.push(l),this.boneInverses.push(new _t().fromArray(t.boneInverses[i]))}return this.init(),this}toJSON(){const t={metadata:{version:4.7,type:"Skeleton",generator:"Skeleton.toJSON"},bones:[],boneInverses:[]};t.uuid=this.uuid;const n=this.bones,i=this.boneInverses;for(let r=0,o=n.length;r<o;r++){const l=n[r];t.bones.push(l.uuid);const u=i[r];t.boneInverses.push(u.toArray())}return t}},Rl=class extends Jt{constructor(e,t,n,i=1){super(e,t,n),this.isInstancedBufferAttribute=!0,this.meshPerAttribute=i}copy(e){return super.copy(e),this.meshPerAttribute=e.meshPerAttribute,this}toJSON(){const e=super.toJSON();return e.meshPerAttribute=this.meshPerAttribute,e.isInstancedBufferAttribute=!0,e}},ul=new _t,ig=new _t,nh=[],rg=new ti,M4=new _t,mc=new Cn,gc=new Hn,Xy=class extends Cn{constructor(e,t,n){super(e,t),this.isInstancedMesh=!0,this.instanceMatrix=new Rl(new Float32Array(n*16),16),this.instanceColor=null,this.morphTexture=null,this.count=n,this.boundingBox=null,this.boundingSphere=null;for(let i=0;i<n;i++)this.setMatrixAt(i,M4)}computeBoundingBox(){const e=this.geometry,t=this.count;this.boundingBox===null&&(this.boundingBox=new ti),e.boundingBox===null&&e.computeBoundingBox(),this.boundingBox.makeEmpty();for(let n=0;n<t;n++)this.getMatrixAt(n,ul),rg.copy(e.boundingBox).applyMatrix4(ul),this.boundingBox.union(rg)}computeBoundingSphere(){const e=this.geometry,t=this.count;this.boundingSphere===null&&(this.boundingSphere=new Hn),e.boundingSphere===null&&e.computeBoundingSphere(),this.boundingSphere.makeEmpty();for(let n=0;n<t;
vendor: 4,145 bytes, line 9
9n++)this.getMatrixAt(n,ul),gc.copy(e.boundingSphere).applyMatrix4(ul),this.boundingSphere.union(gc)}copy(e,t){return super.copy(e,t),this.instanceMatrix.copy(e.instanceMatrix),e.morphTexture!==null&&(this.morphTexture=e.morphTexture.clone()),e.instanceColor!==null&&(this.instanceColor=e.instanceColor.clone()),this.count=e.count,e.boundingBox!==null&&(this.boundingBox=e.boundingBox.clone()),e.boundingSphere!==null&&(this.boundingSphere=e.boundingSphere.clone()),this}getColorAt(e,t){return this.instanceColor===null?t.setRGB(1,1,1):t.fromArray(this.instanceColor.array,e*3)}getMatrixAt(e,t){return t.fromArray(this.instanceMatrix.array,e*16)}getMorphAt(e,t){const n=t.morphTargetInfluences,i=this.morphTexture.source.data.data,r=e*(n.length+1)+1;for(let o=0;o<n.length;o++)n[o]=i[r+o]}raycast(e,t){const n=this.matrixWorld,i=this.count;if(mc.geometry=this.geometry,mc.material=this.material,mc.material!==void 0&&(this.boundingSphere===null&&this.computeBoundingSphere(),gc.copy(this.boundingSphere),gc.applyMatrix4(n),e.ray.intersectsSphere(gc)!==!1))for(let r=0;r<i;r++){this.getMatrixAt(r,ul),ig.multiplyMatrices(n,ul),mc.matrixWorld=ig,mc.raycast(e,nh);for(let o=0,l=nh.length;o<l;o++){const u=nh[o];u.instanceId=r,u.object=this,t.push(u)}nh.length=0}}setColorAt(e,t){return this.instanceColor===null&&(this.instanceColor=new Rl(new Float32Array(this.instanceMatrix.count*3).fill(1),3)),t.toArray(this.instanceColor.array,e*3),this}setMatrixAt(e,t){return t.toArray(this.instanceMatrix.array,e*16),this}setMorphAt(e,t){const n=t.morphTargetInfluences,i=n.length+1;this.morphTexture===null&&(this.morphTexture=new $i(new Float32Array(i*this.count),i,this.count,Kp,rs));const r=this.morphTexture.source.data.data;let o=0;for(let h=0;h<n.length;h++)o+=n[h];const l=this.geometry.morphTargetsRelative?1:1-o,u=i*e;return r[u]=l,r.set(n,u+1),this}updateMorphTargets(){}dispose(){this.dispatchEvent({type:"dispose"}),this.morphTexture!==null&&(this.morphTexture.dispose(),this.morphTexture=null)}},Gd=new k,w4=new k,E4=new Et,Fs=class{constructor(e=new k(1,0,0),t=0){this.isPlane=!0,this.normal=e,this.constant=t}set(e,t){return this.normal.copy(e),this.constant=t,this}setComponents(e,t,n,i){return this.normal.set(e,t,n),this.constant=i,this}setFromNormalAndCoplanarPoint(e,t){return this.normal.copy(e),this.constant=-t.dot(this.normal),this}setFromCoplanarPoints(e,t,n){const i=Gd.subVectors(n,t).cross(w4.subVectors(e,t)).normalize();return this.setFromNormalAndCoplanarPoint(i,e),this}copy(e){return this.normal.copy(e.normal),this.constant=e.constant,this}normalize(){const e=1/this.normal.length();return this.normal.multiplyScalar(e),this.constant*=e,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(e){return this.normal.dot(e)+this.constant}distanceToSphere(e){return this.distanceToPoint(e.center)-e.radius}projectPoint(e,t){return t.copy(e).addScaledVector(this.normal,-this.distanceToPoint(e))}intersectLine(e,t,n=!0){const i=e.delta(Gd),r=this.normal.dot(i);if(r===0)return this.distanceToPoint(e.start)===0?t.copy(e.start):null;const o=-(e.start.dot(this.normal)+this.constant)/r;return n===!0&&(o<0||o>1)?null:t.copy(e.start).addScaledVector(i,o)}intersectsLine(e){const t=this.distanceToPoint(e.start),n=this.distanceToPoint(e.end);return t<0&&n>0||n<0&&t>0}intersectsBox(e){return e.intersectsPlane(this)}intersectsSphere(e){return e.intersectsPlane(this)}coplanarPoint(e){return e.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(e,t){const n=t||E4.getNormalMatrix(e),i=this.coplanarPoint(Gd).applyMatrix4(e),r=this.normal.applyMatrix3(n).normalize();return this.constant=-i.dot(r),this}translate(e){return this.constant-=e.dot(this.normal),this}equals(e){return e.normal.equals(this.normal)&&e.constant===this.constant}clone(){return new this.constructor().copy(this)}},$a=new Hn,T4=new ye(.5,.5),ih=new k,fo=class{constructor(e=new Fs,t=new Fs,n=new Fs,i=new Fs,r=new Fs,o=new Fs){this.planes=[e,t,n,i,r,o]}set(e,t,n,i,r,o){const l=this.planes;return l[0].copy(e),l[1].copy(t),l[2].copy(n),l[3].copy(i),l[4].copy(r),l[5].copy(o),this}copy(e){const t=this.planes;for(let n=0;n<6;
9n++)t[n].copy(e.planes[n]);return this}setFromProjectionMatrix(e,t=Ws,n=!1){const i=this.planes,r=e.elements,o=r[0],l=r[1],u=r[2],h=r[3],f=r[4],p=r[5],g=r[6],m=r[7],v=r[8],b=r[9],w=r[10],S=r[11],_=r[12],C=r[13],A=r[14],E=r[15];if(i[0].setComponents(h-o,m-f,S-v,E-_).normalize(),i[1].setComponents(h+o,m+f,S+v,E+_).normalize(),i[2].setComponents(h+l,m+p,S+b,E+C).normalize(),i[3].setComponents(h-l,m-p,S-b,E-C).normalize(),n)i[4].setComponents(u,g,w,A).normalize(),i[5].setComponents(h-u,m-g,S-w,E-A).normalize();else if(i[4].setComponents(h-u,m-g,S-w,E-A).normalize(),t===2e3)i[5].setComponents(h+u,m+g,S+w,E+A).normalize();else if(t===2001)i[5].setComponents(u,g,w,A).normalize();else throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+t);return this}intersectsObject(e){if(e.boundingSphere!==void 0)e.boundingSphere===null&&e.computeBoundingSphere(),$a.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{const t=e.geometry;t.boundingSphere===null&&t.computeBoundingSphere(),$a.copy(t.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere($a)}intersectsSprite(e){$a.center.set(0,0,0);const t=T4.distanceTo(e.center);return $a.radius=.7071067811865476+t,$a.applyMatrix4(e.matrixWorld),this.intersectsSphere($a)}intersectsSphere(e){const t=this.planes,n=e.center,i=-e.radius;for(let r=0;r<6;r++)if(t[r].distanceToPoint(n)<i)return!1;return!0}intersectsBox(e){const t=this.planes;for(let n=0;n<6;n++){const i=t[n];if(ih.x=i.normal.x>0?e.max.x:e.min.x,ih.y=i.normal.y>0?e.max.y:e.min.y,ih.z=i.normal.z>0?e.max.z:e.min.z,i.distanceToPoint(ih)<0)return!1}return!0}containsPoint(e){const t=this.planes;for(let n=0;n<6;n++)if(t[n].distanceToPoint(e)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}},sg=new _t,qy=class Yy{constructor(){this.coordinateSystem=Ws,this._frustums=[],this._count=0}setFromArrayCamera(t){const n=t.cameras,i=this._frustums;for(let r=0;r<n.length;r++){const o=n[r];sg.multiplyMatrices(o.projectionMatrix,o.matrixWorldInverse),i[r]===void 0&&(i[r]=new fo),i[r].setFromProjectionMatrix(sg,o.coordinateSystem,o.reversedDepth)}return this._count=n.length,this}intersectsObject(t){const n=this._frustums;for(let i=0;i<this._count;i++)if(n[i].intersectsObject(t))return!0;return!1}intersectsSprite(t){const n=this._frustums;for(let i=0;i<this._count;i++)if(n[i].intersectsSprite(t))return!0;return!1}intersectsSphere(t){const n=this._frustums;for(let i=0;i<this._count;i++)if(n[i].intersectsSphere(t))return!0;return!1}intersectsBox(t){const n=this._frustums;for(let i=0;i<this._count;i++)if(n[i].intersectsBox(t))return!0;return!1}containsPoint(t){const n=this._frustums;for(let i=0;i<this._count;i++)if(n[i].containsPoint(t))return!0;return!1}copy(t){this.coordinateSystem=t.coordinateSystem;const n=this._frustums,i=t._frustums;for(let r=0;r<t._count;r++)n[r]===void 0&&(n[r]=new fo),n[r].copy(i[r]);return this._count=t._count,this}clone(){return new Yy().copy(this)}};function Hd(e,t){return e-t}function C4(e,t){return e.z-t.z}function A4(e,t){return t.z-e.z}var R4=class{constructor(){this.index=0,this.pool=[],this.list=[]}push(e,t,n,i){const r=this.pool,o=this.list;this.index>=r.length&&r.push({start:-1,count:-1,z:-1,index:-1});const l=r[this.index];o.push(l),this.index++,l.start=e,l.count=t,l.z=n,l.index=i}reset(){this.list.length=0,this.index=0}},xi=new _t,I4=new Xe(1,1,1),P4=new fo,N4=new qy,rh=new ti,Za=new Hn,vc=new k,ag=new k,L4=new k,Wd=new R4,ei=new Cn,sh=[];function D4(e,t,n=0){const i=t.itemSize;if(e.isInterleavedBufferAttribute||e.array.constructor!==t.array.constructor){const r=e.count;for(let o=0;o<r;o++)for(let l=0;l<i;l++)t.setComponent(o+n,l,e.getComponent(o,l))}else t.array.set(e.array,n*i);t.needsUpdate=!0}function Ja(e,t){if(e.constructor!==t.constructor){const n=Math.min(e.length,t.length);for(let i=0;i<n;i++)t[i]=e[i]}else{const n=Math.min(e.length,t.length);t.set(new e.constructor(e.buffer,0,n))}}var $y=class extends Cn{constructor(e,t,n=t*2,i){super(new At,i),this.isBatchedMesh=!0,this.perObjectFrustumCulled=!0,this.sortObjects=!0,this.boundingBox=null,this.boundingSphere=null,this.customSort=null,this._instanceInfo=[],this._geometryInfo=[],this._availableInstanceIds=[],this._availableGeometryIds=[],this._nextIndexStart=0,this._nextVertexStart=0,this._geometryCount=0,this._visibilityChanged=!0,this._geometryInitialized=!1,this._maxInstanceCount=e,this._maxVertexCount=t,this._maxIndexCount=n,this._multiDrawCounts=new Int32Array(e),this._multiDrawStarts=new Int32Array(e),this._multiDrawCount=0,this._matricesTexture=null,this._indirectTexture=null,this._colorsTexture=null,this._initMatricesTexture(),this._initIndirectTexture()}get maxInstanceCount(){return this._maxInstanceCount}get instanceCount(){return this._instanceInfo.length-this._availableInstanceIds.length}get unusedVertexCount(){return this._maxVertexCount-this._nextVertexStart}get unusedIndexCount(){return this._maxIndexCount-this._nextIndexStart}_initMatricesTexture(){let e=Math.sqrt(this._maxInstanceCount*4);e=Math.ceil(e/4)*4,e=Math.max(e,4);const t=new Float32Array(e*e*4),n=new $i(t,e,e,ss,rs);this._matricesTexture=n}_initIndirectTexture(){let e=Math.sqrt(this._maxInstanceCount);e=Math.ceil(e);const t=new Uint32Array(e*e),n=new $i(t,e,e,jh,is);this._indirectTexture=n}_initColorsTexture(){let e=Math.sqrt(this._maxInstanceCount);e=Math.ceil(e);const t=new Float32Array(e*e*4).fill(1),n=new $i(t,e,e,ss,rs);
9n.colorSpace=Nt.workingColorSpace,this._colorsTexture=n}_initializeGeometry(e){const t=this.geometry,n=this._maxVertexCount,i=this._maxIndexCount;if(this._geometryInitialized===!1){for(const r in e.attributes){const{array:o,itemSize:l,normalized:u}=e.getAttribute(r),h=new o.constructor(n*l),f=new Jt(h,l,u);t.setAttribute(r,f)}if(e.getIndex()!==null){const r=n>65535?new Uint32Array(i):new Uint16Array(i);t.setIndex(new Jt(r,1))}this._geometryInitialized=!0}}_validateGeometry(e){const t=this.geometry;if(!!e.getIndex()!=!!t.getIndex())throw new Error('THREE.BatchedMesh: All geometries must consistently have "index".');for(const n in t.attributes){if(!e.hasAttribute(n))throw new Error(`THREE.BatchedMesh: Added geometry missing "${n}". All geometries must have consistent attributes.`);const i=e.getAttribute(n),r=t.getAttribute(n);if(i.itemSize!==r.itemSize||i.normalized!==r.normalized)throw new Error("THREE.BatchedMesh: All attributes must have a consistent itemSize and normalized value.")}}validateInstanceId(e){const t=this._instanceInfo;if(e<0||e>=t.length||t[e].active===!1)throw new Error(`THREE.BatchedMesh: Invalid instanceId ${e}. Instance is either out of range or has been deleted.`)}validateGeometryId(e){const t=this._geometryInfo;if(e<0||e>=t.length||t[e].active===!1)throw new Error(`THREE.BatchedMesh: Invalid geometryId ${e}. Geometry is either out of range or has been deleted.`)}setCustomSort(e){return this.customSort=e,this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new ti);const e=this.boundingBox,t=this._instanceInfo;e.makeEmpty();for(let n=0,i=t.length;n<i;n++){if(t[n].active===!1)continue;const r=t[n].geometryIndex;this.getMatrixAt(n,xi),this.getBoundingBoxAt(r,rh).applyMatrix4(xi),e.union(rh)}}computeBoundingSphere(){this.boundingSphere===null&&(this.boundingSphere=new Hn);const e=this.boundingSphere,t=this._instanceInfo;e.makeEmpty();for(let n=0,i=t.length;n<i;n++){if(t[n].active===!1)continue;const r=t[n].geometryIndex;this.getMatrixAt(n,xi),this.getBoundingSphereAt(r,Za).applyMatrix4(xi),e.union(Za)}}addInstance(e){if(this._instanceInfo.length>=this.maxInstanceCount&&this._availableInstanceIds.length===0)throw new Error("THREE.BatchedMesh: Maximum item count reached.");const t={visible:!0,active:!0,geometryIndex:e};let n=null;this._availableInstanceIds.length>0?(this._availableInstanceIds.sort(Hd),n=this._availableInstanceIds.shift(),this._instanceInfo[n]=t):(n=this._instanceInfo.length,this._instanceInfo.push(t));const i=this._matricesTexture;xi.identity().toArray(i.image.data,n*16),i.needsUpdate=!0;const r=this._colorsTexture;return r&&(I4.toArray(r.image.data,n*4),r.needsUpdate=!0),this._visibilityChanged=!0,n}addGeometry(e,t=-1,n=-1){this._initializeGeometry(e),this._validateGeometry(e);const i={vertexStart:-1,vertexCount:-1,reservedVertexCount:-1,indexStart:-1,indexCount:-1,reservedIndexCount:-1,start:-1,count:-1,boundingBox:null,boundingSphere:null,active:!0},r=this._geometryInfo;i.vertexStart=this._nextVertexStart,i.reservedVertexCount=t===-1?e.getAttribute("position").count:t;const o=e.getIndex();if(o!==null&&(i.indexStart=this._nextIndexStart,i.reservedIndexCount=n===-1?o.count:n),i.indexStart!==-1&&i.indexStart+i.reservedIndexCount>this._maxIndexCount||i.vertexStart+i.reservedVertexCount>this._maxVertexCount)throw new Error("THREE.BatchedMesh: Reserved space request exceeds the maximum buffer size.");let l;return this._availableGeometryIds.length>0?(this._availableGeometryIds.sort(Hd),l=this._availableGeometryIds.shift(),r[l]=i):(l=this._geometryCount,this._geometryCount++,r.push(i)),this.setGeometryAt(l,e),this._nextIndexStart=i.indexStart+i.reservedIndexCount,this._nextVertexStart=i.vertexStart+i.reservedVertexCount,l}setGeometryAt(e,t){if(e>=this._geometryCount)throw new Error("THREE.BatchedMesh: Maximum geometry count reached.");this._validateGeometry(t);const n=this.geometry,i=n.getIndex()!==null,r=n.getIndex(),o=t.getIndex(),l=this._geometryInfo[e];if(i&&o.count>l.reservedIndexCount||t.attributes.position.count>l.reservedVertexCount)throw new Error("THREE.BatchedMesh: Reserved space not large enough for provided geometry.");const u=l.vertexStart,h=l.reservedVertexCount;l.vertexCount=t.getAttribute("position").count;for(const f in n.attributes){const p=t.getAttribute(f),g=n.getAttribute(f);D4(p,g,u);const m=p.itemSize;
vendor: 11,753 bytes, line 9
9for(let v=p.count,b=h;v<b;v++){const w=u+v;for(let S=0;S<m;S++)g.setComponent(w,S,0)}g.needsUpdate=!0,g.addUpdateRange(u*m,h*m)}if(i){const f=l.indexStart,p=l.reservedIndexCount;l.indexCount=t.getIndex().count;for(let g=0;g<o.count;g++)r.setX(f+g,u+o.getX(g));for(let g=o.count,m=p;g<m;g++)r.setX(f+g,u);r.needsUpdate=!0,r.addUpdateRange(f,l.reservedIndexCount)}return l.start=i?l.indexStart:l.vertexStart,l.count=i?l.indexCount:l.vertexCount,l.boundingBox=null,t.boundingBox!==null&&(l.boundingBox=t.boundingBox.clone()),l.boundingSphere=null,t.boundingSphere!==null&&(l.boundingSphere=t.boundingSphere.clone()),this._visibilityChanged=!0,e}deleteGeometry(e){const t=this._geometryInfo;if(e>=t.length||t[e].active===!1)return this;const n=this._instanceInfo;for(let i=0,r=n.length;i<r;i++)n[i].active&&n[i].geometryIndex===e&&this.deleteInstance(i);return t[e].active=!1,this._availableGeometryIds.push(e),this._visibilityChanged=!0,this}deleteInstance(e){return this.validateInstanceId(e),this._instanceInfo[e].active=!1,this._availableInstanceIds.push(e),this._visibilityChanged=!0,this}optimize(){let e=0,t=0;const n=this._geometryInfo,i=n.map((o,l)=>l).sort((o,l)=>n[o].vertexStart-n[l].vertexStart),r=this.geometry;for(let o=0,l=n.length;o<l;o++){const u=n[i[o]];if(u.active!==!1){if(r.index!==null){if(u.indexStart!==t){const{indexStart:h,vertexStart:f,reservedIndexCount:p}=u,g=r.index,m=g.array,v=e-f;for(let b=h;b<h+p;b++)m[b]=m[b]+v;g.array.copyWithin(t,h,h+p),g.addUpdateRange(t,p),g.needsUpdate=!0,u.indexStart=t}t+=u.reservedIndexCount}if(u.vertexStart!==e){const{vertexStart:h,reservedVertexCount:f}=u,p=r.attributes;for(const g in p){const m=p[g],{array:v,itemSize:b}=m;v.copyWithin(e*b,h*b,(h+f)*b),m.addUpdateRange(e*b,f*b),m.needsUpdate=!0}u.vertexStart=e}e+=u.reservedVertexCount,u.start=r.index?u.indexStart:u.vertexStart}}return this._nextIndexStart=t,this._nextVertexStart=e,this._visibilityChanged=!0,this}getBoundingBoxAt(e,t){if(e>=this._geometryCount)return null;const n=this.geometry,i=this._geometryInfo[e];if(i.boundingBox===null){const r=new ti,o=n.index,l=n.attributes.position;for(let u=i.start,h=i.start+i.count;u<h;u++){let f=u;o&&(f=o.getX(f)),r.expandByPoint(vc.fromBufferAttribute(l,f))}i.boundingBox=r}return t.copy(i.boundingBox),t}getBoundingSphereAt(e,t){if(e>=this._geometryCount)return null;const n=this.geometry,i=this._geometryInfo[e];if(i.boundingSphere===null){const r=new Hn;this.getBoundingBoxAt(e,rh),rh.getCenter(r.center);const o=n.index,l=n.attributes.position;let u=0;for(let h=i.start,f=i.start+i.count;h<f;h++){let p=h;o&&(p=o.getX(p)),vc.fromBufferAttribute(l,p),u=Math.max(u,r.center.distanceToSquared(vc))}r.radius=Math.sqrt(u),i.boundingSphere=r}return t.copy(i.boundingSphere),t}setMatrixAt(e,t){this.validateInstanceId(e);const n=this._matricesTexture,i=this._matricesTexture.image.data;return t.toArray(i,e*16),n.needsUpdate=!0,this}getMatrixAt(e,t){return this.validateInstanceId(e),t.fromArray(this._matricesTexture.image.data,e*16)}setColorAt(e,t){return this.validateInstanceId(e),this._colorsTexture===null&&this._initColorsTexture(),t.toArray(this._colorsTexture.image.data,e*4),this._colorsTexture.needsUpdate=!0,this}getColorAt(e,t){return this.validateInstanceId(e),this._colorsTexture===null?t.isVector4?t.set(1,1,1,1):t.setRGB(1,1,1):t.fromArray(this._colorsTexture.image.data,e*4)}setVisibleAt(e,t){return this.validateInstanceId(e),this._instanceInfo[e].visible===t?this:(this._instanceInfo[e].visible=t,this._visibilityChanged=!0,this)}getVisibleAt(e){return this.validateInstanceId(e),this._instanceInfo[e].visible}setGeometryIdAt(e,t){return this.validateInstanceId(e),this.validateGeometryId(t),this._instanceInfo[e].geometryIndex=t,this}getGeometryIdAt(e){return this.validateInstanceId(e),this._instanceInfo[e].geometryIndex}getGeometryRangeAt(e,t={}){this.validateGeometryId(e);const n=this._geometryInfo[e];return t.vertexStart=n.vertexStart,t.vertexCount=n.vertexCount,t.reservedVertexCount=n.reservedVertexCount,t.indexStart=n.indexStart,t.indexCount=n.indexCount,t.reservedIndexCount=n.reservedIndexCount,t.start=n.start,t.count=n.count,t}setInstanceCount(e){const t=this._availableInstanceIds,n=this._instanceInfo;for(t.sort(Hd);t[t.length-1]===n.length-1;)n.pop(),t.pop();if(e<n.length)throw new Error(`THREE.BatchedMesh: Instance ids outside the range ${e} are being used. Cannot shrink instance count.`);const i=new Int32Array(e),r=new Int32Array(e);Ja(this._multiDrawCounts,i),Ja(this._multiDrawStarts,r),this._multiDrawCounts=i,this._multiDrawStarts=r,this._maxInstanceCount=e;const o=this._indirectTexture,l=this._matricesTexture,u=this._colorsTexture;o.dispose(),this._initIndirectTexture(),Ja(o.image.data,this._indirectTexture.image.data),l.dispose(),this._initMatricesTexture(),Ja(l.image.data,this._matricesTexture.image.data),u&&(u.dispose(),this._initColorsTexture(),Ja(u.image.data,this._colorsTexture.image.data))}setGeometrySize(e,t){const n=[...this._geometryInfo].filter(o=>o.active);if(Math.max(...n.map(o=>o.vertexStart+o.reservedVertexCount))>e)throw new Error(`THREE.BatchedMesh: Geometry vertex values are being used outside the range ${t}. Cannot shrink further.`);if(this.geometry.index&&Math.max(...n.map(o=>o.indexStart+o.reservedIndexCount))>t)throw new Error(`THREE.BatchedMesh: Geometry index values are being used outside the range ${t}. Cannot shrink further.`);const i=this.geometry;i.dispose(),this._maxVertexCount=e,this._maxIndexCount=t,this._geometryInitialized&&(this._geometryInitialized=!1,this.geometry=new At,this._initializeGeometry(i));const r=this.geometry;i.index&&Ja(i.index.array,r.index.array);for(const o in i.attributes)Ja(i.attributes[o].array,r.attributes[o].array)}raycast(e,t){const n=this._instanceInfo,i=this._geometryInfo,r=this.matrixWorld,o=this.geometry;ei.material=this.material,ei.geometry.index=o.index,ei.geometry.attributes=o.attributes,ei.geometry.boundingBox===null&&(ei.geometry.boundingBox=new ti),ei.geometry.boundingSphere===null&&(ei.geometry.boundingSphere=new Hn);for(let l=0,u=n.length;l<u;l++){if(!n[l].visible||!n[l].active)continue;const h=n[l].geometryIndex,f=i[h];ei.geometry.setDrawRange(f.start,f.count),this.getMatrixAt(l,ei.matrixWorld).premultiply(r),this.getBoundingBoxAt(h,ei.geometry.boundingBox),this.getBoundingSphereAt(h,ei.geometry.boundingSphere),ei.raycast(e,sh);for(let p=0,g=sh.length;p<g;p++){const m=sh[p];m.object=this,m.batchId=l,t.push(m)}sh.length=0}ei.material=null,ei.geometry.index=null,ei.geometry.attributes={},ei.geometry.setDrawRange(0,1/0)}copy(e){return super.copy(e),this.geometry=e.geometry.clone(),this.perObjectFrustumCulled=e.perObjectFrustumCulled,this.sortObjects=e.sortObjects,this.boundingBox=e.boundingBox!==null?e.boundingBox.clone():null,this.boundingSphere=e.boundingSphere!==null?e.boundingSphere.clone():null,this._geometryInfo=e._geometryInfo.map(t=>({...t,boundingBox:t.boundingBox!==null?t.boundingBox.clone():null,boundingSphere:t.boundingSphere!==null?t.boundingSphere.clone():null})),this._instanceInfo=e._instanceInfo.map(t=>({...t})),this._availableInstanceIds=e._availableInstanceIds.slice(),this._availableGeometryIds=e._availableGeometryIds.slice(),this._nextIndexStart=e._nextIndexStart,this._nextVertexStart=e._nextVertexStart,this._geometryCount=e._geometryCount,this._maxInstanceCount=e._maxInstanceCount,this._maxVertexCount=e._maxVertexCount,this._maxIndexCount=e._maxIndexCount,this._geometryInitialized=e._geometryInitialized,this._multiDrawCounts=e._multiDrawCounts.slice(),this._multiDrawStarts=e._multiDrawStarts.slice(),this._indirectTexture=e._indirectTexture.clone(),this._indirectTexture.image.data=this._indirectTexture.image.data.slice(),this._matricesTexture=e._matricesTexture.clone(),this._matricesTexture.image.data=this._matricesTexture.image.data.slice(),this._colorsTexture!==null&&(this._colorsTexture=e._colorsTexture.clone(),this._colorsTexture.image.data=this._colorsTexture.image.data.slice()),this}dispose(){this.geometry.dispose(),this._matricesTexture.dispose(),this._matricesTexture=null,this._indirectTexture.dispose(),this._indirectTexture=null,this._colorsTexture!==null&&(this._colorsTexture.dispose(),this._colorsTexture=null)}onBeforeRender(e,t,n,i,r){if(!this._visibilityChanged&&!this.perObjectFrustumCulled&&!this.sortObjects)return;const o=i.getIndex();let l=o===null?1:o.array.BYTES_PER_ELEMENT,u=1;r.wireframe&&(u=2,l=i.attributes.position.count>65535?4:2);const h=this._instanceInfo,f=this._multiDrawStarts,p=this._multiDrawCounts,g=this._geometryInfo,m=this.perObjectFrustumCulled,v=this._indirectTexture,b=v.image.data,w=n.isArrayCamera?N4:P4;m&&(n.isArrayCamera?w.setFromArrayCamera(n):(xi.multiplyMatrices(n.projectionMatrix,n.matrixWorldInverse).multiply(this.matrixWorld),w.setFromProjectionMatrix(xi,n.coordinateSystem,n.reversedDepth)));let S=0;if(this.sortObjects){xi.copy(this.matrixWorld).invert(),vc.setFromMatrixPosition(n.matrixWorld).applyMatrix4(xi),ag.set(0,0,-1).transformDirection(n.matrixWorld).transformDirection(xi);for(let A=0,E=h.length;A<E;A++)if(h[A].visible&&h[A].active){const P=h[A].geometryIndex;this.getMatrixAt(A,xi),this.getBoundingSphereAt(P,Za).applyMatrix4(xi);let N=!1;if(m&&(N=!w.intersectsSphere(Za)),!N){const O=g[P],T=L4.subVectors(Za.center,vc).dot(ag);Wd.push(O.start,O.count,T,A)}}const _=Wd.list,C=this.customSort;C===null?_.sort(r.transparent?A4:C4):C.call(this,_,n);for(let A=0,E=_.length;A<E;A++){const P=_[A];f[S]=P.start*l*u,p[S]=P.count*u,b[S]=P.index,S++}Wd.reset()}else for(let _=0,C=h.length;_<C;_++)if(h[_].visible&&h[_].active){const A=h[_].geometryIndex;let E=!1;if(m&&(this.getMatrixAt(_,xi),this.getBoundingSphereAt(A,Za).applyMatrix4(xi),E=!w.intersectsSphere(Za)),!E){const P=g[A];f[S]=P.start*l*u,p[S]=P.count*u,b[S]=_,S++}}v.needsUpdate=!0,this._multiDrawCount=S,this._visibilityChanged=!1}onBeforeShadow(e,t,n,i,r,o){this.onBeforeRender(e,null,i,r,o)}},fi=class extends Wn{constructor(e){super(),this.isLineBasicMaterial=!0,this.type="LineBasicMaterial",this.color=new Xe(16777215),this.map=null,this.linewidth=1,this.linecap="round",this.linejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.linewidth=e.linewidth,this.linecap=e.linecap,this.linejoin=e.linejoin,this.fog=e.fog,this}},Fh=new k,kh=new k,og=new _t,yc=new Dl,ah=new Hn,jd=new k,lg=new k,Xs=class extends Yt{constructor(e=new At,t=new fi){super(),this.isLine=!0,this.type="Line",this.geometry=e,this.material=t,this.morphTargetDictionary=void 0,this.morphTargetInfluences=void 0,this.updateMorphTargets()}copy(e,t){return super.copy(e,t),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}computeLineDistances(){const e=this.geometry;if(e.index===null){const t=e.attributes.position,n=[0];for(let i=1,r=t.count;i<r;i++)Fh.fromBufferAttribute(t,i-1),kh.fromBufferAttribute(t,i),n[i]=n[i-1],n[i]+=Fh.distanceTo(kh);e.setAttribute("lineDistance",new Qe(n,1))}else Ue("Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}raycast(e,t){const n=this.geometry,i=this.matrixWorld,r=e.params.Line.threshold,o=n.drawRange;if(n.boundingSphere===null&&n.computeBoundingSphere(),ah.copy(n.boundingSphere),ah.applyMatrix4(i),ah.radius+=r,e.ray.intersectsSphere(ah)===!1)return;og.copy(i).invert(),yc.copy(e.ray).applyMatrix4(og);const l=r/((this.scale.x+this.scale.y+this.scale.z)/3),u=l*l,h=this.isLineSegments?2:1,f=n.index,p=n.attributes.position;if(f!==null){const g=Math.max(0,o.start),m=Math.min(f.count,o.start+o.count);for(let v=g,b=m-1;v<b;v+=h){const w=f.getX(v),S=f.getX(v+1),_=oh(this,e,yc,u,w,S,v);_&&t.push(_)}if(this.isLineLoop){const v=f.getX(m-1),b=f.getX(g),w=oh(this,e,yc,u,v,b,m-1);
vendor: 8,473 bytes, line 9
9w&&t.push(w)}}else{const g=Math.max(0,o.start),m=Math.min(p.count,o.start+o.count);for(let v=g,b=m-1;v<b;v+=h){const w=oh(this,e,yc,u,v,v+1,v);w&&t.push(w)}if(this.isLineLoop){const v=oh(this,e,yc,u,m-1,g,m-1);v&&t.push(v)}}}updateMorphTargets(){const e=this.geometry.morphAttributes,t=Object.keys(e);if(t.length>0){const n=e[t[0]];if(n!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let i=0,r=n.length;i<r;i++){const o=n[i].name||String(i);this.morphTargetInfluences.push(0),this.morphTargetDictionary[o]=i}}}}};function oh(e,t,n,i,r,o,l){const u=e.geometry.attributes.position;if(Fh.fromBufferAttribute(u,r),kh.fromBufferAttribute(u,o),n.distanceSqToSegment(Fh,kh,jd,lg)>i)return;jd.applyMatrix4(e.matrixWorld);const h=t.ray.origin.distanceTo(jd);if(!(h<t.near||h>t.far))return{distance:h,point:lg.clone().applyMatrix4(e.matrixWorld),index:l,face:null,faceIndex:null,barycoord:null,object:e}}var cg=new k,ug=new k,Ar=class extends Xs{constructor(e,t){super(e,t),this.isLineSegments=!0,this.type="LineSegments"}computeLineDistances(){const e=this.geometry;if(e.index===null){const t=e.attributes.position,n=[];for(let i=0,r=t.count;i<r;i+=2)cg.fromBufferAttribute(t,i),ug.fromBufferAttribute(t,i+1),n[i]=i===0?0:n[i-1],n[i+1]=n[i]+cg.distanceTo(ug);e.setAttribute("lineDistance",new Qe(n,1))}else Ue("LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}},Zy=class extends Xs{constructor(e,t){super(e,t),this.isLineLoop=!0,this.type="LineLoop"}},c0=class extends Wn{constructor(e){super(),this.isPointsMaterial=!0,this.type="PointsMaterial",this.color=new Xe(16777215),this.map=null,this.alphaMap=null,this.size=1,this.sizeAttenuation=!0,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.alphaMap=e.alphaMap,this.size=e.size,this.sizeAttenuation=e.sizeAttenuation,this.fog=e.fog,this}},hg=new _t,wp=new Dl,lh=new Hn,ch=new k,Jy=class extends Yt{constructor(e=new At,t=new c0){super(),this.isPoints=!0,this.type="Points",this.geometry=e,this.material=t,this.morphTargetDictionary=void 0,this.morphTargetInfluences=void 0,this.updateMorphTargets()}copy(e,t){return super.copy(e,t),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}raycast(e,t){const n=this.geometry,i=this.matrixWorld,r=e.params.Points.threshold,o=n.drawRange;if(n.boundingSphere===null&&n.computeBoundingSphere(),lh.copy(n.boundingSphere),lh.applyMatrix4(i),lh.radius+=r,e.ray.intersectsSphere(lh)===!1)return;hg.copy(i).invert(),wp.copy(e.ray).applyMatrix4(hg);const l=r/((this.scale.x+this.scale.y+this.scale.z)/3),u=l*l,h=n.index,f=n.attributes.position;if(h!==null){const p=Math.max(0,o.start),g=Math.min(h.count,o.start+o.count);for(let m=p,v=g;m<v;m++){const b=h.getX(m);ch.fromBufferAttribute(f,b),fg(ch,b,u,i,e,t,this)}}else{const p=Math.max(0,o.start),g=Math.min(f.count,o.start+o.count);for(let m=p,v=g;m<v;m++)ch.fromBufferAttribute(f,m),fg(ch,m,u,i,e,t,this)}}updateMorphTargets(){const e=this.geometry.morphAttributes,t=Object.keys(e);if(t.length>0){const n=e[t[0]];if(n!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let i=0,r=n.length;i<r;i++){const o=n[i].name||String(i);this.morphTargetInfluences.push(0),this.morphTargetDictionary[o]=i}}}}};function fg(e,t,n,i,r,o,l){const u=wp.distanceSqToPoint(e);if(u<n){const h=new k;wp.closestPointToPoint(e,h),h.applyMatrix4(i);const f=r.ray.origin.distanceTo(h);if(f<r.near||f>r.far)return;o.push({distance:f,distanceToRay:Math.sqrt(u),point:h,index:t,face:null,faceIndex:null,barycoord:null,object:l})}}var Ky=class extends Ln{constructor(e,t,n,i,r=mn,o=mn,l,u,h){super(e,t,n,i,r,o,l,u,h),this.isVideoTexture=!0,this.generateMipmaps=!1,this._requestVideoFrameCallbackId=0;const f=this;function p(){f.needsUpdate=!0,f._requestVideoFrameCallbackId=e.requestVideoFrameCallback(p)}"requestVideoFrameCallback"in e&&(this._requestVideoFrameCallbackId=e.requestVideoFrameCallback(p))}clone(){return new this.constructor(this.image).copy(this)}update(){const e=this.image;!("requestVideoFrameCallback"in e)&&e.readyState>=e.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}dispose(){this._requestVideoFrameCallbackId!==0&&(this.source.data.cancelVideoFrameCallback(this._requestVideoFrameCallbackId),this._requestVideoFrameCallbackId=0),super.dispose()}},U4=class extends Ky{constructor(e,t,n,i,r,o,l,u){super({},e,t,n,i,r,o,l,u),this.isVideoFrameTexture=!0}update(){}clone(){return new this.constructor().copy(this)}setFrame(e){this.image=e,this.needsUpdate=!0}},O4=class extends Ln{constructor(e,t){super({width:e,height:t}),this.isFramebufferTexture=!0,this.magFilter=In,this.minFilter=In,this.generateMipmaps=!1,this.needsUpdate=!0}},Jh=class extends Ln{constructor(e,t,n,i,r,o,l,u,h,f,p,g){super(null,o,l,u,h,f,i,r,p,g),this.isCompressedTexture=!0,this.image={width:t,height:n},this.mipmaps=e,this.flipY=!1,this.generateMipmaps=!1}},F4=class extends Jh{constructor(e,t,n,i,r,o){super(e,t,n,r,o),this.isCompressedArrayTexture=!0,this.image.depth=i,this.wrapR=bi,this.layerUpdates=new Set}addLayerUpdate(e){this.layerUpdates.add(e)}clearLayerUpdates(){this.layerUpdates.clear()}},k4=class extends Jh{constructor(e,t,n){super(void 0,e[0].width,e[0].height,t,n,301),this.isCompressedCubeTexture=!0,this.isCubeTexture=!0,this.image=e}},$c=class extends Ln{constructor(e=[],t=301,n,i,r,o,l,u,h,f){super(e,t,n,i,r,o,l,u,h,f),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(e){this.image=e}},B4=class extends Ln{constructor(e,t,n,i,r,o,l,u,h){super(e,t,n,i,r,o,l,u,h),this.isCanvasTexture=!0,this.needsUpdate=!0}},z4=class extends Ln{constructor(e,t,n,i,r,o,l,u,h){super(e,t,n,i,r,o,l,u,h),this.isHTMLTexture=!0,this.generateMipmaps=!1,this.needsUpdate=!0;const f=e?e.parentNode:null;f!==null&&"requestPaint"in f&&(f.onpaint=()=>{this.needsUpdate=!0},f.requestPaint())}dispose(){const e=this.image?this.image.parentNode:null;e!==null&&"onpaint"in e&&(e.onpaint=null),super.dispose()}},po=class extends Ln{constructor(e,t,n=is,i,r,o,l=In,u=In,h,f=Tl,p=1){if(f!==1026&&f!==1027)throw new Error("THREE.DepthTexture: format must be either THREE.DepthFormat or THREE.DepthStencilFormat");super({width:e,height:t,depth:p},i,r,o,l,u,f,n,h),this.isDepthTexture=!0,this.flipY=!1,this.generateMipmaps=!1,this.compareFunction=null}copy(e){return super.copy(e),this.source=new zs(Object.assign({},e.image)),this.compareFunction=e.compareFunction,this}toJSON(e){const t=super.toJSON(e);return this.compareFunction!==null&&(t.compareFunction=this.compareFunction),t}},Qy=class extends po{constructor(e,t=is,n=301,i,r,o=In,l=In,u,h=Tl){const f={width:e,height:e,depth:1},p=[f,f,f,f,f,f];super(e,e,t,n,i,r,o,l,u,h),this.image=p,this.isCubeDepthTexture=!0,this.isCubeTexture=!0}get images(){return this.image}set images(e){this.image=e}},u0=class extends Ln{constructor(e=null){super(),this.sourceTexture=e,this.isExternalTexture=!0}copy(e){return super.copy(e),this.sourceTexture=e.sourceTexture,this}},Zc=class e2 extends At{constructor(t=1,n=1,i=1,r=1,o=1,l=1){super(),this.type="BoxGeometry",this.parameters={width:t,height:n,depth:i,widthSegments:r,heightSegments:o,depthSegments:l};const u=this;r=Math.floor(r),o=Math.floor(o),l=Math.floor(l);const h=[],f=[],p=[],g=[];let m=0,v=0;b("z","y","x",-1,-1,i,n,t,l,o,0),b("z","y","x",1,-1,i,n,-t,l,o,1),b("x","z","y",1,1,t,i,n,r,l,2),b("x","z","y",1,-1,t,i,-n,r,l,3),b("x","y","z",1,-1,t,n,i,r,o,4),b("x","y","z",-1,-1,t,n,-i,r,o,5),this.setIndex(h),this.setAttribute("position",new Qe(f,3)),this.setAttribute("normal",new Qe(p,3)),this.setAttribute("uv",new Qe(g,2));function b(w,S,_,C,A,E,P,N,O,T,R){const B=E/O,F=P/T,j=E/2,H=P/2,Y=N/2,q=O+1,te=T+1;let J=0,he=0;const ue=new k;for(let ce=0;ce<te;ce++){const me=ce*F-H;for(let _e=0;_e<q;_e++)ue[w]=(_e*B-j)*C,ue[S]=me*A,ue[_]=Y,f.push(ue.x,ue.y,ue.z),ue[w]=0,ue[S]=0,ue[_]=N>0?1:-1,p.push(ue.x,ue.y,ue.z),g.push(_e/O),g.push(1-ce/T),J+=1}for(let ce=0;ce<T;ce++)for(let me=0;me<O;me++){const _e=m+me+q*ce,ht=m+me+q*(ce+1),tt=m+(me+1)+q*(ce+1),re=m+(me+1)+q*ce;h.push(_e,ht,re),h.push(ht,tt,re),he+=6}u.addGroup(v,he,R),v+=he,m+=J}}copy(t){return super.copy(t),this.parameters=Object.assign({},t.parameters),this}static fromJSON(t){return new e2(t.width,t.height,t.depth,t.widthSegments,t.heightSegments,t.depthSegments)}},t2=class n2 extends At{constructor(t=1,n=1,i=4,r=8,o=1){super(),this.type="CapsuleGeometry",this.parameters={radiu
9s:t,height:n,capSegments:i,radialSegments:r,heightSegments:o},n=Math.max(0,n),i=Math.max(1,Math.floor(i)),r=Math.max(3,Math.floor(r)),o=Math.max(1,Math.floor(o));const l=[],u=[],h=[],f=[],p=n/2,g=Math.PI/2*t,m=n,v=2*g+m,b=i*2+o,w=r+1,S=new k,_=new k;for(let C=0;C<=b;C++){let A=0,E=0,P=0,N=0;if(C<=i){const R=C/i,B=R*Math.PI/2;E=-p-t*Math.cos(B),P=t*Math.sin(B),N=-t*Math.cos(B),A=R*g}else if(C<=i+o){const R=(C-i)/o;E=-p+R*n,P=t,N=0,A=g+R*m}else{const R=(C-i-o)/i,B=R*Math.PI/2;E=p+t*Math.sin(B),P=t*Math.cos(B),N=t*Math.sin(B),A=g+m+R*g}const O=Math.max(0,Math.min(1,A/v));let T=0;C===0?T=.5/r:C===b&&(T=-.5/r);for(let R=0;R<=r;R++){const B=R/r,F=B*Math.PI*2,j=Math.sin(F),H=Math.cos(F);_.x=-P*H,_.y=E,_.z=P*j,u.push(_.x,_.y,_.z),S.set(-P*H,N,P*j),S.normalize(),h.push(S.x,S.y,S.z),f.push(B+T,O)}if(C>0){const R=(C-1)*w;for(let B=0;B<r;B++){const F=R+B,j=R+B+1,H=C*w+B,Y=C*w+B+1;l.push(F,j,H),l.push(j,Y,H)}}}this.setIndex(l),this.setAttribute("position",new Qe(u,3)),this.setAttribute("normal",new Qe(h,3)),this.setAttribute("uv",new Qe(f,2))}copy(t){return super.copy(t),this.parameters=Object.assign({},t.parameters),this}static fromJSON(t){return new n2(t.radius,t.height,t.capSegments,t.radialSegments,t.heightSegments)}},i2=class r2 extends At{constructor(t=1,n=32,i=0,r=Math.PI*2){super(),this.type="CircleGeometry",this.parameters={radius:t,segments:n,thetaStart:i,thetaLength:r},n=Math.max(3,n);const o=[],l=[],u=[],h=[],f=new k,p=new ye;l.push(0,0,0),u.push(0,0,1),h.push(.5,.5);for(let g=0,m=3;g<=n;g++,m+=3){const v=i+g/n*r;f.x=t*Math.cos(v),f.y=t*Math.sin(v),l.push(f.x,f.y,f.z),u.push(0,0,1),p.x=(l[m]/t+1)/2,p.y=(l[m+1]/t+1)/2,h.push(p.x,p.y)}for(let g=1;g<=n;g++)o.push(g,g+1,0);this.setIndex(o),this.setAttribute("position",new Qe(l,3)),this.setAttribute("normal",new Qe(u,3)),this.setAttribute("uv",new Qe(h,2))}copy(t){return super.copy(t),this.parameters=Object.assign({},t.parameters),this}static fromJSON(t){return new r2(t.radius,t.segments,t.thetaStart,t.thetaLength)}},h0=class s2 extends At{constructor(t=1,n=1,i=1,r=32,o=1,l=!1,u=0,h=Math.PI*2){super(),this.type="CylinderGeometry",this.parameters={radiusTop:t,radiusBottom:n,height:i,radialSegments:r,heightSegments:o,openEnded:l,thetaStart:u,thetaLength:h};const f=this;r=Math.floor(r),o=Math.floor(o);const p=[],g=[],m=[],v=[];let b=0;const w=[],S=i/2;let _=0;C(),l===!1&&(t>0&&A(!0),n>0&&A(!1)),this.setIndex(p),this.setAttribute("position",new Qe(g,3)),this.setAttribute("normal",new Qe(m,3)),this.setAttribute("uv",new Qe(v,2));function C(){const E=new k,P=new k;let N=0;const O=(n-t)/i;for(let T=0;T<=o;T++){const R=[],B=T/o,F=B*(n-t)+t;for(let j=0;j<=r;j++){const H=j/r,Y=H*h+u,q=Math.sin(Y),te=Math.cos(Y);P.x=F*q,P.y=-B*i+S,P.z=F*te,g.push(P.x,P.y,P.z),E.set(q,O,te).normalize(),m.push(E.x,E.y,E.z),v.push(H,1-B),R.push(b++)}w.push(R)}for(let T=0;T<r;T++)for(let R=0;R<o;R++){const B=w[R][T],F=w[R+1][T],j=w[R+1][T+1],H=w[R][T+1];(t>0||R!==0)&&(p.push(B,F,H),N+=3),(n>0||R!==o-1)&&(p.push(F,j,H),N+=3)}f.addGroup(_,N,0),_+=N}function A(E){const P=b,N=new ye,O=new k;let T=0;const R=E===!0?t:n,B=E===!0?1:-1;for(let j=1;j<=r;j++)g.push(0,S*B,0),m.push(0,B,0),v.push(.5,.5),b++;const F=b;for(let j=0;j<=r;j++){const H=j/r*h+u,Y=Math.cos(H),q=Math.sin(H);O.x=R*q,O.y=S*B,O.z=R*Y,g.push(O.x,O.y,O.z),m.push(0,B,0),N.x=Y*.5+.5,N.y=q*.5*B+.5,v.push(N.x,N.y),b++}for(let j=0;j<r;j++){const H=P+j,Y=F+j;E===!0?p.push(Y,Y+1,H):p.push(Y+1,Y,H),T+=3}f.addGroup(_,T,E===!0?1:2),_+=T}}copy(t){return super.copy(t),this.parameters=Object.assign({},t.parameters),this}static fromJSON(t){return new s2(t.radiusTop,t.radiusBottom,t.height,t.radialSegments,t.heightSegments,t.openEnded,t.thetaStart,t.thetaLength)}},f0=class a2 extends h0{constructor(t=1,n=1,i=32,r=1,o=!1,l=0,u=Math.PI*2){super(0,t,n,i,r,o,l,u),this.type="C
9oneGeometry",this.parameters={radius:t,height:n,radialSegments:i,heightSegments:r,openEnded:o,thetaStart:l,thetaLength:u}}static fromJSON(t){return new a2(t.radius,t.height,t.radialSegments,t.heightSegments,t.openEnded,t.thetaStart,t.thetaLength)}},Ul=class o2 extends At{constructor(t=[],n=[],i=1,r=0){super(),this.type="PolyhedronGeometry",this.parameters={vertices:t,indices:n,radius:i,detail:r};const o=[],l=[];u(r),f(i),p(),this.setAttribute("position",new Qe(o,3)),this.setAttribute("normal",new Qe(o.slice(),3)),this.setAttribute("uv",new Qe(l,2)),r===0?this.computeVertexNormals():this.normalizeNormals();function u(C){const A=new k,E=new k,P=new k;for(let N=0;N<n.length;N+=3)v(n[N+0],A),v(n[N+1],E),v(n[N+2],P),h(A,E,P,C)}function h(C,A,E,P){const N=P+1,O=[];for(let T=0;T<=N;T++){O[T]=[];const R=C.clone().lerp(E,T/N),B=A.clone().lerp(E,T/N),F=N-T;for(let j=0;j<=F;j++)j===0&&T===N?O[T][j]=R:O[T][j]=R.clone().lerp(B,j/F)}for(let T=0;T<N;T++)for(let R=0;R<2*(N-T)-1;R++){const B=Math.floor(R/2);R%2===0?(m(O[T][B+1]),m(O[T+1][B]),m(O[T][B])):(m(O[T][B+1]),m(O[T+1][B+1]),m(O[T+1][B]))}}function f(C){const A=new k;for(let E=0;E<o.length;E+=3)A.x=o[E+0],A.y=o[E+1],A.z=o[E+2],A.normalize().multiplyScalar(C),o[E+0]=A.x,o[E+1]=A.y,o[E+2]=A.z}function p(){const C=new k;for(let A=0;A<o.length;A+=3){C.x=o[A+0],C.y=o[A+1],C.z=o[A+2];const E=S(C)/2/Math.PI+.5,P=_(C)/Math.PI+.5;l.push(E,1-P)}b(),g()}function g(){for(let C=0;C<l.length;C+=6){const A=l[C+0],E=l[C+2],P=l[C+4];Math.max(A,E,P)>.9&&Math.min(A,E,P)<.1&&(A<.2&&(l[C+0]+=1),E<.2&&(l[C+2]+=1),P<.2&&(l[C+4]+=1))}}function m(C){o.push(C.x,C.y,C.z)}function v(C,A){const E=C*3;A.x=t[E+0],A.y=t[E+1],A.z=t[E+2]}function b(){const C=new k,A=new k,E=new k,P=new k,N=new ye,O=new ye,T=new ye;for(let R=0,B=0;R<o.length;R+=9,B+=6){C.set(o[R+0],o[R+1],o[R+2]),A.set(o[R+3],o[R+4],o[R+5]),E.set(o[R+6],o[R+7],o[R+8]),N.set(l[B+0],l[B+1]),O.set(l[B+2],l[B+3]),T.set(l[B+4],l[B+5]),P.copy(C).add(A).add(E).divideScalar(3);const F=S(P);w(N,B+0,C,F),w(O,B+2,A,F),w(T,B+4,E,F)}}function w(C,A,E,P){P<0&&C.x===1&&(l[A]=C.x-1),E.x===0&&E.z===0&&(l[A]=P/2/Math.PI+.5)}function S(C){return Math.atan2(C.z,-C.x)}function _(C){return Math.atan2(-C.y,Math.sqrt(C.x*C.x+C.z*C.z))}}copy(t){return super.copy(t),this.parameters=Object.assign({},t.parameters),this}static fromJSON(t){return new o2(t.vertices,t.indices,t.radius,t.detail)}},l2=class c2 extends Ul{constructor(t=1,n=0){const i=(1+Math.sqrt(5))/2,r=1/i,o=[-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,0,-r,-i,0,-r,i,0,r,-i,0,r,i,-r,-i,0,-r,i,0,r,-i,0,r,i,0,-i,0,-r,i,0,-r,-i,0,r,i,0,r];super(o,[3,11,7,3,7,15,3,15,13,7,19,17,7,17,6,7,6,15,17,4,8,17,8,10,17,10,6,8,0,16,8,16,2,8,2,10,0,12,1,0,1,18,0,18,16,6,10,2,6,2,13,6,13,15,2,16,18,2,18,3,2,3,13,18,1,9,18,9,11,18,11,3,4,14,12,4,12,0,4,0,8,11,9,5,11,5,19,11,19,7,
vendor: 17,720 bytes, line 9
919,5,14,19,14,4,19,4,17,1,12,14,1,14,5,1,5,9],t,n),this.type="DodecahedronGeometry",this.parameters={radius:t,detail:n}}static fromJSON(t){return new c2(t.radius,t.detail)}},uh=new k,hh=new k,Xd=new k,fh=new ks,u2=class extends At{constructor(e=null,t=1){if(super(),this.type="EdgesGeometry",this.parameters={geometry:e,thresholdAngle:t},e!==null){const n=Math.pow(10,4),i=Math.cos(ho*t),r=e.getIndex(),o=e.getAttribute("position"),l=r?r.count:o.count,u=[0,0,0],h=["a","b","c"],f=new Array(3),p={},g=[];for(let m=0;m<l;m+=3){r?(u[0]=r.getX(m),u[1]=r.getX(m+1),u[2]=r.getX(m+2)):(u[0]=m,u[1]=m+1,u[2]=m+2);const{a:v,b,c:w}=fh;if(v.fromBufferAttribute(o,u[0]),b.fromBufferAttribute(o,u[1]),w.fromBufferAttribute(o,u[2]),fh.getNormal(Xd),f[0]=`${Math.round(v.x*n)},${Math.round(v.y*n)},${Math.round(v.z*n)}`,f[1]=`${Math.round(b.x*n)},${Math.round(b.y*n)},${Math.round(b.z*n)}`,f[2]=`${Math.round(w.x*n)},${Math.round(w.y*n)},${Math.round(w.z*n)}`,!(f[0]===f[1]||f[1]===f[2]||f[2]===f[0]))for(let S=0;S<3;S++){const _=(S+1)%3,C=f[S],A=f[_],E=fh[h[S]],P=fh[h[_]],N=`${C}_${A}`,O=`${A}_${C}`;O in p&&p[O]?(Xd.dot(p[O].normal)<=i&&(g.push(E.x,E.y,E.z),g.push(P.x,P.y,P.z)),p[O]=null):N in p||(p[N]={index0:u[S],index1:u[_],normal:Xd.clone()})}}for(const m in p)if(p[m]){const{index0:v,index1:b}=p[m];uh.fromBufferAttribute(o,v),hh.fromBufferAttribute(o,b),g.push(uh.x,uh.y,uh.z),g.push(hh.x,hh.y,hh.z)}this.setAttribute("position",new Qe(g,3))}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}},pr=class{constructor(){this.type="Curve",this.arcLengthDivisions=200,this.needsUpdate=!1,this.cacheArcLengths=null}getPoint(){Ue("Curve: .getPoint() not implemented.")}getPointAt(e,t){const n=this.getUtoTmapping(e);return this.getPoint(n,t)}getPoints(e=5){const t=[];for(let n=0;n<=e;n++)t.push(this.getPoint(n/e));return t}getSpacedPoints(e=5){const t=[];for(let n=0;n<=e;n++)t.push(this.getPointAt(n/e));return t}getLength(){const e=this.getLengths();return e[e.length-1]}getLengths(e=this.arcLengthDivisions){if(this.cacheArcLengths&&this.cacheArcLengths.length===e+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;const t=[];let n,i=this.getPoint(0),r=0;t.push(0);for(let o=1;o<=e;o++)n=this.getPoint(o/e),r+=n.distanceTo(i),t.push(r),i=n;return this.cacheArcLengths=t,t}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(e,t=null){const n=this.getLengths();let i=0;const r=n.length;let o;t?o=t:o=e*n[r-1];let l=0,u=r-1,h;for(;l<=u;)if(i=Math.floor(l+(u-l)/2),h=n[i]-o,h<0)l=i+1;else if(h>0)u=i-1;else{u=i;break}if(i=u,n[i]===o)return i/(r-1);const f=n[i],p=n[i+1]-f,g=(o-f)/p;return(i+g)/(r-1)}getTangent(e,t){let i=e-1e-4,r=e+1e-4;i<0&&(i=0),r>1&&(r=1);const o=this.getPoint(i),l=this.getPoint(r),u=t||(o.isVector2?new ye:new k);return u.copy(l).sub(o).normalize(),u}getTangentAt(e,t){const n=this.getUtoTmapping(e);return this.getTangent(n,t)}computeFrenetFrames(e,t=!1){const n=new k,i=[],r=[],o=[],l=new k,u=new _t;for(let m=0;m<=e;m++){const v=m/e;i[m]=this.getTangentAt(v,new k)}r[0]=new k,o[0]=new k;let h=Number.MAX_VALUE;const f=Math.abs(i[0].x),p=Math.abs(i[0].y),g=Math.abs(i[0].z);f<=h&&(h=f,n.set(1,0,0)),p<=h&&(h=p,n.set(0,1,0)),g<=h&&n.set(0,0,1),l.crossVectors(i[0],n).normalize(),r[0].crossVectors(i[0],l),o[0].crossVectors(i[0],r[0]);for(let m=1;m<=e;m++){if(r[m]=r[m-1].clone(),o[m]=o[m-1].clone(),l.crossVectors(i[m-1],i[m]),l.length()>Number.EPSILON){l.normalize();const v=Math.acos(mt(i[m-1].dot(i[m]),-1,1));r[m].applyMatrix4(u.makeRotationAxis(l,v))}o[m].crossVectors(i[m],r[m])}if(t===!0){let m=Math.acos(mt(r[0].dot(r[e]),-1,1));m/=e,i[0].dot(l.crossVectors(r[0],r[e]))>0&&(m=-m);for(let v=1;v<=e;v++)r[v].applyMatrix4(u.makeRotationAxis(i[v],m*v)),o[v].crossVectors(i[v],r[v])}return{tangents:i,normals:r,binormals:o}}clone(){return new this.constructor().copy(this)}copy(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}toJSON(){const e={metadata:{version:4.7,type:"Curve",generator:"Curve.toJSON"}};return e.arcLengthDivisions=this.arcLengthDivisions,e.type=this.type,e}fromJSON(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}},Kh=class extends pr{constructor(e=0,t=0,n=1,i=1,r=0,o=Math.PI*2,l=!1,u=0){super(),this.isEllipseCurve=!0,this.type="EllipseCurve",this.aX=e,this.aY=t,this.xRadius=n,this.yRadius=i,this.aStartAngle=r,this.aEndAngle=o,this.aClockwise=l,this.aRotation=u}getPoint(e,t=new ye){const n=t,i=Math.PI*2;let r=this.aEndAngle-this.aStartAngle;const o=Math.abs(r)<Number.EPSILON;for(;r<0;)r+=i;for(;r>i;)r-=i;r<Number.EPSILON&&(o?r=0:r=i),this.aClockwise===!0&&!o&&(r===i?r=-i:r=r-i);const l=this.aStartAngle+e*r;let u=this.aX+this.xRadius*Math.cos(l),h=this.aY+this.yRadius*Math.sin(l);if(this.aRotation!==0){const f=Math.cos(this.aRotation),p=Math.sin(this.aRotation),g=u-this.aX,m=h-this.aY;u=g*f-m*p+this.aX,h=g*p+m*f+this.aY}return n.set(u,h)}copy(e){return super.copy(e),this.aX=e.aX,this.aY=e.aY,this.xRadius=e.xRadius,this.yRadius=e.yRadius,this.aStartAngle=e.aStartAngle,this.aEndAngle=e.aEndAngle,this.aClockwise=e.aClockwise,this.aRotation=e.aRotation,this}toJSON(){const e=super.toJSON();return e.aX=this.aX,e.aY=this.aY,e.xRadius=this.xRadius,e.yRadius=this.yRadius,e.aStartAngle=this.aStartAngle,e.aEndAngle=this.aEndAngle,e.aClockwise=this.aClockwise,e.aRotation=this.aRotation,e}fromJSON(e){return super.fromJSON(e),this.aX=e.aX,this.aY=e.aY,this.xRadius=e.xRadius,this.yRadius=e.yRadius,this.aStartAngle=e.aStartAngle,this.aEndAngle=e.aEndAngle,this.aClockwise=e.aClockwise,this.aRotation=e.aRotation,this}},h2=class extends Kh{constructor(e,t,n,i,r,o){super(e,t,n,n,i,r,o),this.isArcCurve=!0,this.type="ArcCurve"}};function d0(){let e=0,t=0,n=0,i=0;function r(o,l,u,h){e=o,t=u,n=-3*o+3*l-2*u-h,i=2*o-2*l+u+h}return{initCatmullRom:function(o,l,u,h,f){r(l,u,f*(u-o),f*(h-l))},initNonuniformCatmullRom:function(o,l,u,h,f,p,g){let m=(l-o)/f-(u-o)/(f+p)+(u-l)/p,v=(u-l)/p-(h-l)/(p+g)+(h-u)/g;m*=p,v*=p,r(l,u,m,v)},calc:function(o){const l=o*o,u=l*o;return e+t*o+n*l+i*u}}}var dg=new k,pg=new k,qd=new d0,Yd=new d0,$d=new d0,f2=class extends pr{constructor(e=[],t=!1,n="centripetal",i=.5){super(),this.isCatmullRomCurve3=!0,this.type="CatmullRomCurve3",this.points=e,this.closed=t,this.curveType=n,this.tension=i}getPoint(e,t=new k){const n=t,i=this.points,r=i.length,o=(r-(this.closed?0:1))*e;let l=Math.floor(o),u=o-l;this.closed?l+=l>0?0:(Math.floor(Math.abs(l)/r)+1)*r:u===0&&l===r-1&&(l=r-2,u=1);let h,f;this.closed||l>0?h=i[(l-1)%r]:(pg.subVectors(i[0],i[1]).add(i[0]),h=pg);const p=i[l%r],g=i[(l+1)%r];if(this.closed||l+2<r?f=i[(l+2)%r]:(dg.subVectors(i[r-1],i[r-2]).add(i[r-1]),f=dg),this.curveType==="centripetal"||this.curveType==="chordal"){const m=this.curveType==="chordal"?.5:.25;let v=Math.pow(h.distanceToSquared(p),m),b=Math.pow(p.distanceToSquared(g),m),w=Math.pow(g.distanceToSquared(f),m);b<1e-4&&(b=1),v<1e-4&&(v=b),w<1e-4&&(w=b),qd.initNonuniformCatmullRom(h.x,p.x,g.x,f.x,v,b,w),Yd.initNonuniformCatmullRom(h.y,p.y,g.y,f.y,v,b,w),$d.initNonuniformCatmullRom(h.z,p.z,g.z,f.z,v,b,w)}else this.curveType==="catmullrom"&&(qd.initCatmullRom(h.x,p.x,g.x,f.x,this.tension),Yd.initCatmullRom(h.y,p.y,g.y,f.y,this.tension),$d.initCatmullRom(h.z,p.z,g.z,f.z,this.tension));return n.set(qd.calc(u),Yd.calc(u),$d.calc(u)),n}copy(e){super.copy(e),this.points=[];for(let t=0,n=e.points.length;t<n;t++){const i=e.points[t];this.points.push(i.clone())}return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this}toJSON(){const e=super.toJSON();e.points=[];for(let t=0,n=this.points.length;t<n;t++){const i=this.points[t];e.points.push(i.toArray())}return e.closed=this.closed,e.curveType=this.curveType,e.tension=this.tension,e}fromJSON(e){super.fromJSON(e),this.points=[];for(let t=0,n=e.points.length;t<n;t++){const i=e.points[t];this.points.push(new k().fromArray(i))}return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this}};function mg(e,t,n,i,r){const o=(i-t)*.5,l=(r-n)*.5,u=e*e,h=e*u;return(2*n-2*i+o+l)*h+(-3*n+3*i-2*o-l)*u+o*e+n}function V4(e,t){const n=1-e;return n*n*t}function G4(e,t){return 2*(1-e)*e*t}function H4(e,t){return e*e*t}function Tc(e,t,n,i){return V4(e,t)+G4(e,n)+H4(e,i)}function W4(e,t){const n=1-e;return n*n*n*t}function j4(e,t){const n=1-e;return 3*n*n*e*t}function X4(e,t){return 3*(1-e)*e*e*t}function q4(e,t){return e*e*e*t}function Cc(e,t,n,i,r){return W4(e,t)+j4(e,n)+X4(e,i)+q4(e,r)}var p0=class extends pr{constructor(e=new ye,t=new ye,n=new ye,i=new ye){super(),this.isCubicBezierCurve=!0,this.type="CubicBezierCurve",this.v0=e,this.v1=t,this.v2=n,this.v3=i}getPoint(e,t=new ye){const n=t,i=this.v0,r=this.v1,o=this.v2,l=this.v3;return n.set(Cc(e,i.x,r.x,o.x,l.x),Cc(e,i.y,r.y,o.y,l.y)),n}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this.v3.copy(e.v3),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e.v3=this.v3.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this.v3.fromArray(e.v3),this}},d2=class extends pr{constructor(e=new k,t=new k,n=new k,i=new k){super(),this.isCubicBezierCurve3=!0,this.type="CubicBezierCurve3",this.v0=e,this.v1=t,this.v2=n,this.v3=i}getPoint(e,t=new k){const n=t,i=this.v0,r=this.v1,o=this.v2,l=this.v3;return n.set(Cc(e,i.x,r.x,o.x,l.x),Cc(e,i.y,r.y,o.y,l.y),Cc(e,i.z,r.z,o.z,l.z)),n}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this.v3.copy(e.v3),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e.v3=this.v3.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this.v3.fromArray(e.v3),this}},m0=class extends pr{constructor(e=new ye,t=new ye){super(),this.isLineCurve=!0,this.type="LineCurve",this.v1=e,this.v2=t}getPoint(e,t=new ye){const n=t;return e===1?n.copy(this.v2):(n.copy(this.v2).sub(this.v1),n.multiplyScalar(e).add(this.v1)),n}getPointAt(e,t){return this.getPoint(e,t)}getTangent(e,t=new ye){return t.subVectors(this.v2,this.v1).normalize()}getTangentAt(e,t){return this.getTangent(e,t)}copy(e){return super.copy(e),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}},p2=class extends pr{constructor(e=new k,t=new k){super(),this.isLineCurve3=!0,this.type="LineCurve3",this.v1=e,this.v2=t}getPoint(e,t=new k){const n=t;return e===1?n.copy(this.v2):(n.copy(this.v2).sub(this.v1),n.multiplyScalar(e).add(this.v1)),n}getPointAt(e,t){return this.getPoint(e,t)}getTangent(e,t=new k){return t.subVectors(this.v2,this.v1).normalize()}getTangentAt(e,t){return this.getTangent(e,t)}copy(e){return super.copy(e),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}},g0=class extends pr{constructor(e=new ye,t=new ye,n=new ye){super(),this.isQuadraticBezierCurve=!0,this.type="QuadraticBezierCurve",this.v0=e,this.v1=t,this.v2=n}getPoint(e,t=new ye){const n=t,i=this.v0,r=this.v1,o=this.v2;return n.set(Tc(e,i.x,r.x,o.x),Tc(e,i.y,r.y,o.y)),n}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}},v0=class extends pr{constructor(e=new k,t=new k,n=new k){super(),this.isQuadraticBezierCurve3=!0,this.type="QuadraticBezierCurve3",this.v0=e,this.v1=t,this.v2=n}getPoint(e,t=new k){const n=t,i=this.v0,r=this.v1,o=this.v2;return n.set(Tc(e,i.x,r.x,o.x),Tc(e,i.y,r.y,o.y),Tc(e,i.z,r.z,o.z)),n}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}},y0=class extends pr{constructor(e=[]){super(),this.isSplineCurve=!0,this.type="SplineCurve",this.points=e}getPoint(e,t=new ye){const n=t,i=this.points,r=(i.length-1)*e,o=Math.floor(r),l=r-o,u=i[o===0?o:o-1],h=i[o],f=i[o>i.length-2?i.length-1:o+1],p=i[o>i.length-3?i.length-1:o+2];return n.set(mg(l,u.x,h.x,f.x,p.x),mg(l,u.y,h.y,f.y,p.y)),n}copy(e){super.copy(e),this.points=[];for(let t=0,n=e.points.length;t<n;t++){const i=e.points[t];this.points.push(i.clone())}return this}toJSON(){const e=super.toJSON();e.points=[];for(let t=0,n=this.points.length;t<n;t++){const i=this.points[t];e.points.push(i.toArray())}return e}fromJSON(e){super.fromJSON(e),this.points=[];for(let t=0,n=e.points.length;t<n;t++){const i=e.points[t];this.points.push(new ye().fromArray(i))}return this}},Bh=Object.freeze({__proto__:null,ArcCurve:h2,CatmullRomCurve3:f2,CubicBezierCurve:p0,CubicBezierCurve3:d2,EllipseCurve:Kh,LineCurve:m0,LineCurve3:p2,QuadraticBezierCurve:g0,QuadraticBezierCurve3:v0,SplineCurve:y0}),m2=class extends pr{constructor(){super(),this.type="CurvePath",this.curves=[],this.autoClose=!1}add(e){this.curves.push(e)}closePath(){const e=this.curves[0].getPoint(0),t=this.curves[this.curves.length-1].getPoint(1);if(!e.equals(t)){const n=e.isVector2===!0?"LineCurve":"LineCurve3";this.curves.push(new Bh[n](t,e))}return this}getPoint(e,t){const n=e*this.getLength(),i=this.getCurveLengths();let r=0;for(;r<i.length;){if(i[r]>=n){const o=i[r]-n,l=this.curves[r],u=l.getLength(),h=u===0?0:1-o/u;return l.getPointAt(h,t)}r++}return null}getLength(){const e=this.getCurveLengths();return e[e.length-1]}updateArcLengths(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()}getCurveLengths(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;const e=[];let t=0;for(let n=0,i=this.curves.length;n<i;n++)t+=this.curves[n].getLength(),e.push(t);return this.cacheLengths=e,e}getSpacedPoints(e=40){const t=[];for(let n=0;n<=e;n++)t.push(this.getPoint(n/e));return this.autoClose&&t.push(t[0]),t}getPoints(e=12){const t=[];let n;for(let i=0,r=this.curves;i<r.length;i++){const o=r[i],l=o.isEllipseCurve?e*2:o.isLineCurve||o.isLineCurve3?1:o.isSplineCurve?e*o.points.length:e,u=o.getPoints(l);for(let h=0;h<u.length;h++){const f=u[h];n&&n.equals(f)||(t.push(f),n=f)}}return this.autoClose&&t.length>1&&!t[t.length-1].equals(t[0])&&t.push(t[0]),t}copy(e){super.copy(e),this.curves=[];for(let t=0,n=e.curves.length;t<n;t++){const i=e.curves[t];this.curves.push(i.clone())}return this.autoClose=e.autoClose,this}toJSON(){const e=super.toJSON();e.autoClose=this.autoClose,e.curves=[];for(let t=0,n=this.curves.length;t<n;t++){const i=this.curves[t];e.curves.push(i.toJSON())}return e}fromJSON(e){super.fromJSON(e),this.autoClose=e.autoClose,this.curves=[];for(let t=0,n=e.curves.length;t<n;t++){const i=e.curves[t];this.curves.push(new Bh[i.type]().fromJSON(i))}return this}},Vc=class extends m2{constructor(e){super(),this.type="Path",this.currentPoint=new ye,e&&this.setFromPoints(e)}setFromPoints(e){this.moveTo(e[0].x,e[0].y);for(let t=1,n=e.length;t<n;t++)this.lineTo(e[t].x,e[t].y);return this}moveTo(e,t){return this.currentPoint.set(e,t),this}lineTo(e,t){const n=new m0(this.currentPoint.clone(),new ye(e,t));return this.curves.push(n),this.currentPoint.set(e,t),this}quadraticCurveTo(e,t,n,i){const r=new g0(this.currentPoint.clone(),new ye(e,t),new ye(n,i));return this.curves.push(r),this.currentPoint.set(n,i),this}bezierCurveTo(e,t,n,i,r,o){const l=new p0(this.currentPoint.clone(),new ye(e,t),new ye(n,i),new ye(r,o));return this.curves.push(l),this.currentPoint.set(r,o),this}splineThru(e){const t=[this.currentPoint.clone()].concat(e),n=new y0(t);return this.curves.push(n),this.currentPoint.copy(e[e.length-1]),this}arc(e,t,n,i,r,o){const l=this.currentPoint.x,u=this.currentPoint.y;return this.absarc(e+l,t+u,n,i,r,o),this}absarc(e,t,n,i,r,o){return this.absellipse(e,t,n,n,i,r,o),this}ellipse(e,t,n,i,r,o,l,u){const h=this.currentPoint.x,f=this.currentPoint.y;return this.absellipse(e+h,t+f,n,i,r,o,l,u),this}absellipse(e,t,n,i,r,o,l,u){const h=new Kh(e,t,n,i,r,o,l,u);if(this.curves.length>0){const p=h.getPoint(0);p.equals(this.currentPoint)||this.lineTo(p.x,p.y)}this.curves.push(h);const f=h.getPoint(1);return this.currentPoint.copy(f),this}copy(e){return super.copy(e),this.currentPoint.copy(e.currentPoint),this}toJSON(){const e=super.toJSON();return e.currentPoint=this.currentPoint.toArray(),e}fromJSON(e){return super.fromJSON(e),this.currentPoint.fromArray(e.currentPoint),this}},Jc=class extends Vc{constructor(e){super(e),this.uuid=Oi(),this.type="Shape",this.holes=[]}getPointsHoles(e){const t=[];for(let n=0,i=this.holes.length;n<i;n++)t[n]=this.holes[n].getPoints(e);return t}extractPoints(e){return{shape:this.getPoints(e),holes:this.getPointsHoles(e)}}copy(e){super.copy(e),this.holes=[];for(let t=0,n=e.holes.length;t<n;t++){const i=e.holes[t];this.holes.push(i.clone())}return this}toJSON(){const e=super.toJSON();e.uuid=this.uuid,e.holes=[];for(let t=0,n=this.holes.length;t<n;t++){const i=this.holes[t];e.holes.push(i.toJSON())}return e}fromJSON(e){super.fromJSON(e),this.uuid=e.uuid,this.holes=[];for(let t=0,n=e.holes.length;t<n;t++){const i=e.holes[t];this.holes.push(new Vc().fromJSON(i))}return this}};function Y4(e,t,n=2){const i=t&&t.length,r=i?t[0]*n:e.length;let o=g2(e,0,r,n,!0);const l=[];
vendor: 6,413 bytes, line 9
9if(!o||o.next===o.prev)return l;let u,h,f;if(i&&(o=Q4(e,t,o,n)),e.length>80*n){u=e[0],h=e[1];let p=u,g=h;for(let m=n;m<r;m+=n){const v=e[m],b=e[m+1];v<u&&(u=v),b<h&&(h=b),v>p&&(p=v),b>g&&(g=b)}f=Math.max(p-u,g-h),f=f!==0?32767/f:0}return Gc(o,l,n,u,h,f,0),l}function g2(e,t,n,i,r){let o;if(r===uw(e,t,n,i)>0)for(let l=t;l<n;l+=i)o=gg(l/i|0,e[l],e[l+1],o);else for(let l=n-i;l>=t;l-=i)o=gg(l/i|0,e[l],e[l+1],o);return o&&Il(o,o.next)&&(Wc(o),o=o.next),o}function mo(e,t){if(!e)return e;t||(t=e);let n=e,i;do if(i=!1,!n.steiner&&(Il(n,n.next)||hn(n.prev,n,n.next)===0)){if(Wc(n),n=t=n.prev,n===n.next)break;i=!0}else n=n.next;while(i||n!==t);return t}function Gc(e,t,n,i,r,o,l){if(!e)return;!l&&o&&rw(e,i,r,o);let u=e;for(;e.prev!==e.next;){const h=e.prev,f=e.next;if(o?Z4(e,i,r,o):$4(e)){t.push(h.i,e.i,f.i),Wc(e),e=f.next,u=f.next;continue}if(e=f,e===u){l?l===1?(e=J4(mo(e),t),Gc(e,t,n,i,r,o,2)):l===2&&K4(e,t,n,i,r,o):Gc(mo(e),t,n,i,r,o,1);break}}}function $4(e){const t=e.prev,n=e,i=e.next;if(hn(t,n,i)>=0)return!1;const r=t.x,o=n.x,l=i.x,u=t.y,h=n.y,f=i.y,p=Math.min(r,o,l),g=Math.min(u,h,f),m=Math.max(r,o,l),v=Math.max(u,h,f);let b=i.next;for(;b!==t;){if(b.x>=p&&b.x<=m&&b.y>=g&&b.y<=v&&Sc(r,u,o,h,l,f,b.x,b.y)&&hn(b.prev,b,b.next)>=0)return!1;b=b.next}return!0}function Z4(e,t,n,i){const r=e.prev,o=e,l=e.next;if(hn(r,o,l)>=0)return!1;const u=r.x,h=o.x,f=l.x,p=r.y,g=o.y,m=l.y,v=Math.min(u,h,f),b=Math.min(p,g,m),w=Math.max(u,h,f),S=Math.max(p,g,m),_=Ep(v,b,t,n,i),C=Ep(w,S,t,n,i);let A=e.prevZ,E=e.nextZ;for(;A&&A.z>=_&&E&&E.z<=C;){if(A.x>=v&&A.x<=w&&A.y>=b&&A.y<=S&&A!==r&&A!==l&&Sc(u,p,h,g,f,m,A.x,A.y)&&hn(A.prev,A,A.next)>=0||(A=A.prevZ,E.x>=v&&E.x<=w&&E.y>=b&&E.y<=S&&E!==r&&E!==l&&Sc(u,p,h,g,f,m,E.x,E.y)&&hn(E.prev,E,E.next)>=0))return!1;E=E.nextZ}for(;A&&A.z>=_;){if(A.x>=v&&A.x<=w&&A.y>=b&&A.y<=S&&A!==r&&A!==l&&Sc(u,p,h,g,f,m,A.x,A.y)&&hn(A.prev,A,A.next)>=0)return!1;A=A.prevZ}for(;E&&E.z<=C;){if(E.x>=v&&E.x<=w&&E.y>=b&&E.y<=S&&E!==r&&E!==l&&Sc(u,p,h,g,f,m,E.x,E.y)&&hn(E.prev,E,E.next)>=0)return!1;E=E.nextZ}return!0}function J4(e,t){let n=e;do{const i=n.prev,r=n.next.next;!Il(i,r)&&y2(i,n,n.next,r)&&Hc(i,r)&&Hc(r,i)&&(t.push(i.i,n.i,r.i),Wc(n),Wc(n.next),n=e=r),n=n.next}while(n!==e);return mo(n)}function K4(e,t,n,i,r,o){let l=e;do{let u=l.next.next;for(;u!==l.prev;){if(l.i!==u.i&&ow(l,u)){let h=x2(l,u);l=mo(l,l.next),h=mo(h,h.next),Gc(l,t,n,i,r,o,0),Gc(h,t,n,i,r,o,0);return}u=u.next}l=l.next}while(l!==e)}function Q4(e,t,n,i){const r=[];for(let o=0,l=t.length;o<l;o++){const u=g2(e,t[o]*i,o<l-1?t[o+1]*i:e.length,i,!1);u===u.next&&(u.steiner=!0),r.push(aw(u))}r.sort(ew);for(let o=0;o<r.length;o++)n=tw(r[o],n);return n}function ew(e,t){let n=e.x-t.x;return n===0&&(n=e.y-t.y,n===0&&(n=(e.next.y-e.y)/(e.next.x-e.x)-(t.next.y-t.y)/(t.next.x-t.x))),n}function tw(e,t){const n=nw(e,t);if(!n)return t;const i=x2(n,e);return mo(i,i.next),mo(n,n.next)}function nw(e,t){let n=t;const i=e.x,r=e.y;let o=-1/0,l;if(Il(e,n))return n;do{if(Il(e,n.next))return n.next;if(r<=n.y&&r>=n.next.y&&n.next.y!==n.y){const g=n.x+(r-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(g<=i&&g>o&&(o=g,l=n.x<n.next.x?n:n.next,g===i))return l}n=n.next}while(n!==t);if(!l)return null;const u=l,h=l.x,f=l.y;let p=1/0;n=l;do{if(i>=n.x&&n.x>=h&&i!==n.x&&v2(r<f?i:o,r,h,f,r<f?o:i,r,n.x,n.y)){const g=Math.abs(r-n.y)/(i-n.x);Hc(n,e)&&(g<p||g===p&&(n.x>l.x||n.x===l.x&&iw(l,n)))&&(l=n,p=g)}n=n.next}while(n!==u);return l}function iw(e,t){return hn(e.prev,e,t.prev)<0&&hn(t.next,e,e.next)<0}function rw(e,t,n,i){let r=e;do r.z===0&&(r.z=Ep(r.x,r.y,t,n,i)),r.prevZ=r.prev,r.nextZ=r.next,r=r.next;while(r!==e);r.prevZ.nextZ=null,r.prevZ=null,sw(r)}function sw(e){let t,n=1;do{let i=e,r;e=null;let o=null;for(t=0;i;){t++;let l=i,u=0;for(let f=0;f<n&&(u++,l=l.nextZ,!!l);f++);let h=n;for(;u>0||h>0&&l;)u!==0&&(h===0||!l||i.z<=l.z)?(r=i,i=i.nextZ,u--):(r=l,l=l.nextZ,h--),o?o.nextZ=r:e=r,r.prevZ=o,o=r;i=l}o.nextZ=null,n*=2}while(t>1);return e}function Ep(e,t,n,i,r){return e=(e-n)*r|0,t=(t-i)*r|0,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,e|t<<1}function aw(e){let t=e,n=e;do(t.x<n.x||t.x===n.x&&t.y<n.y)&&(n=t),t=t.next;while(t!==e);return n}function v2(e,t,n,i,r,o,l,u){return(r-l)*(t-u)>=(e-l)*(o-u)&&(e-l)*(i-u)>=(n-l)*(t-u)&&(n-l)*(o-u)>=(r-l)*(i-u)}function Sc(e,t,n,i,r,o,l,u){return!(e===l&&t===u)&&v2(e,t,n,i,r,o,l,u)}function ow(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!lw(e,t)&&(Hc(e,t)&&Hc(t,e)&&cw(e,t)&&(hn(e.prev,e,t.prev)||hn(e,t.prev,t))||Il(e,t)&&hn(e.prev,e,e.next)>0&&hn(t.prev,t,t.next)>0)}function hn(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function Il(e,t){return e.x===t.x&&e.y===t.y}function y2(e,t,n,i){const r=ph(hn(e,t,n)),o=ph(hn(e,t,i)),l=ph(hn(n,i,e)),u=ph(hn(n,i,t));return!!(r!==o&&l!==u||r===0&&dh(e,n,t)||o===0&&dh(e,i,t)||l===0&&dh(n,e,i)||u===0&&dh(n,t,i))}function dh(e,t,n){return t.x<=Math.max(e.x,n.x)&&t.x>=Math.min(e.x,n.x)&&t.y<=Math.max(e.y,n.y)&&t.y>=Math.min(e.y,n.y)}function ph(e){return e>0?1:e<0?-1:0}function lw(e,t){let n=e;do{if(n.i!==e.i&&n.next.i!==e.i&&n.i!==t.i&&n.next.i!==t.i&&y2(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}function Hc(e,t){return hn(e.prev,e,e.next)<0?hn(e,t,e.next)>=0&&hn(e,e.prev,t)>=0:hn(e,t,e.prev)<0||hn(e,e.next,t)<0}function cw(e,t){let n=e,i=!1;const r=(e.x+t.x)/2,o=(e.y+t.y)/2;do n.y>o!=n.next.y>o&&n.next.y!==n.y&&r<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(i=!i),n=n.next;while(n!==e);return i}function x2(e,t){const n=Tp(e.i,e.x,e.y),i=Tp(t.i,t.x,t.y),r=e.next,o=t.prev;return e.next=t,t.prev=e,n.next=r,r.prev=n,i.next=n,n.prev=i,o.next=i,i.prev=o,i}function gg(e,t,n,i){const r=Tp(e,t,n);return i?(r.next=i.next,r.prev=i,i.next.prev=r,i.next=r):(r.prev=r,r.next=r),r}function Wc(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function Tp(e,t,n){return{i:e,x:t,y:n,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}function uw(e,t,n,i){let r=0;for(let o=t,l=n-i;o<n;o+=i)r+=(e[l]-e[o])*(e[o+1]+e[l+1]),l=o;return r}var hw=class{static triangulate(e,t,n=2){return Y4(e,t,n)}},es=class _2{static area(t){const n=t.length;let i=0;for(let r=n-1,o=0;o<n;r=o++)i+=t[r].x*t[o].y-t[o].x*t[r].y;return i*.5}static isClockWise(t){return _2.area(t)<0}static triangulateShape(t,n){const i=[],r=[],o=[];vg(t),yg(i,t);let l=t.length;
vendor: 19,733 bytes, line 9
9n.forEach(vg);for(let h=0;h<n.length;h++)r.push(l),l+=n[h].length,yg(i,n[h]);const u=hw.triangulate(i,r);for(let h=0;h<u.length;h+=3)o.push(u.slice(h,h+3));return o}};function vg(e){const t=e.length;t>2&&e[t-1].equals(e[0])&&e.pop()}function yg(e,t){for(let n=0;n<t.length;n++)e.push(t[n].x),e.push(t[n].y)}var b2=class S2 extends At{constructor(t=new Jc([new ye(.5,.5),new ye(-.5,.5),new ye(-.5,-.5),new ye(.5,-.5)]),n={}){super(),this.type="ExtrudeGeometry",this.parameters={shapes:t,options:n},t=Array.isArray(t)?t:[t];const i=this,r=[],o=[];for(let u=0,h=t.length;u<h;u++){const f=t[u];l(f)}this.setAttribute("position",new Qe(r,3)),this.setAttribute("uv",new Qe(o,2)),this.computeVertexNormals();function l(u){const h=[],f=n.curveSegments!==void 0?n.curveSegments:12,p=n.steps!==void 0?n.steps:1,g=n.depth!==void 0?n.depth:1;let m=n.bevelEnabled!==void 0?n.bevelEnabled:!0,v=n.bevelThickness!==void 0?n.bevelThickness:.2,b=n.bevelSize!==void 0?n.bevelSize:v-.1,w=n.bevelOffset!==void 0?n.bevelOffset:0,S=n.bevelSegments!==void 0?n.bevelSegments:3;const _=n.extrudePath,C=n.UVGenerator!==void 0?n.UVGenerator:fw;let A,E=!1,P,N,O,T;if(_){A=_.getSpacedPoints(p),E=!0,m=!1;const oe=_.isCatmullRomCurve3?_.closed:!1;P=_.computeFrenetFrames(p,oe),N=new k,O=new k,T=new k}m||(S=0,v=0,b=0,w=0);const R=u.extractPoints(f);let B=R.shape;const F=R.holes;if(!es.isClockWise(B)){B=B.reverse();for(let oe=0,Se=F.length;oe<Se;oe++){const Ae=F[oe];es.isClockWise(Ae)&&(F[oe]=Ae.reverse())}}function j(oe){const Ae=10000000000000001e-36;let De=oe[0];for(let Le=1;Le<=oe.length;Le++){const Ye=Le%oe.length,Je=oe[Ye],lt=Je.x-De.x,ut=Je.y-De.y,z=lt*lt+ut*ut,vt=Math.max(Math.abs(Je.x),Math.abs(Je.y),Math.abs(De.x),Math.abs(De.y));if(z<=Ae*vt*vt){oe.splice(Ye,1),Le--;continue}De=Je}}j(B),F.forEach(j);const H=F.length,Y=B;for(let oe=0;oe<H;oe++){const Se=F[oe];B=B.concat(Se)}function q(oe,Se,Ae){return Se||rt("ExtrudeGeometry: vec does not exist"),oe.clone().addScaledVector(Se,Ae)}const te=B.length;function J(oe,Se,Ae){let De,Le,Ye;const Je=oe.x-Se.x,lt=oe.y-Se.y,ut=Ae.x-oe.x,z=Ae.y-oe.y,vt=Je*Je+lt*lt,bt=Je*z-lt*ut;if(Math.abs(bt)>Number.EPSILON){const xt=Math.sqrt(vt),U=Math.sqrt(ut*ut+z*z),I=Se.x-lt/xt,G=Se.y+Je/xt,ee=Ae.x-z/U,fe=Ae.y+ut/U,we=((ee-I)*z-(fe-G)*ut)/(Je*z-lt*ut);De=I+Je*we-oe.x,Le=G+lt*we-oe.y;const Ne=De*De+Le*Le;if(Ne<=2)return new ye(De,Le);Ye=Math.sqrt(Ne/2)}else{let xt=!1;Je>Number.EPSILON?ut>Number.EPSILON&&(xt=!0):Je<-Number.EPSILON?ut<-Number.EPSILON&&(xt=!0):Math.sign(lt)===Math.sign(z)&&(xt=!0),xt?(De=-lt,Le=Je,Ye=Math.sqrt(vt)):(De=Je,Le=lt,Ye=Math.sqrt(vt/2))}return new ye(De/Ye,Le/Ye)}const he=[];for(let oe=0,Se=Y.length,Ae=Se-1,De=oe+1;oe<Se;oe++,Ae++,De++)Ae===Se&&(Ae=0),De===Se&&(De=0),he[oe]=J(Y[oe],Y[Ae],Y[De]);const ue=[];let ce,me=he.concat();for(let oe=0,Se=H;oe<Se;oe++){const Ae=F[oe];ce=[];for(let De=0,Le=Ae.length,Ye=Le-1,Je=De+1;De<Le;De++,Ye++,Je++)Ye===Le&&(Ye=0),Je===Le&&(Je=0),ce[De]=J(Ae[De],Ae[Ye],Ae[Je]);ue.push(ce),me=me.concat(ce)}let _e;if(S===0)_e=es.triangulateShape(Y,F);else{const oe=[],Se=[];for(let Ae=0;Ae<S;Ae++){const De=Ae/S,Le=v*Math.cos(De*Math.PI/2),Ye=b*Math.sin(De*Math.PI/2)+w;for(let Je=0,lt=Y.length;Je<lt;Je++){const ut=q(Y[Je],he[Je],Ye);Ce(ut.x,ut.y,-Le),De===0&&oe.push(ut)}for(let Je=0,lt=H;Je<lt;Je++){const ut=F[Je];ce=ue[Je];const z=[];for(let vt=0,bt=ut.length;vt<bt;vt++){const xt=q(ut[vt],ce[vt],Ye);Ce(xt.x,xt.y,-Le),De===0&&z.push(xt)}De===0&&Se.push(z)}}_e=es.triangulateShape(oe,Se)}const ht=_e.length,tt=b+w;for(let oe=0;oe<te;oe++){const Se=m?q(B[oe],me[oe],tt):B[oe];E?(O.copy(P.normals[0]).multiplyScalar(Se.x),N.copy(P.binormals[0]).multiplyScalar(Se.y),T.copy(A[0]).add(O).add(N),Ce(T.x,T.y,T.z)):Ce(Se.x,Se.y,0)}for(let oe=1;oe<=p;oe++)for(let Se=0;Se<te;Se++){const Ae=m?q(B[Se],me[Se],tt):B[Se];E?(O.copy(P.normals[oe]).multiplyScalar(Ae.x),N.copy(P.binormals[oe]).multiplyScalar(Ae.y),T.copy(A[oe]).add(O).add(N),Ce(T.x,T.y,T.z)):Ce(Ae.x,Ae.y,g/p*oe)}for(let oe=S-1;oe>=0;oe--){const Se=oe/S,Ae=v*Math.cos(Se*Math.PI/2),De=b*Math.sin(Se*Math.PI/2)+w;for(let Le=0,Ye=Y.length;Le<Ye;Le++){const Je=q(Y[Le],he[Le],De);Ce(Je.x,Je.y,g+Ae)}for(let Le=0,Ye=F.length;Le<Ye;Le++){const Je=F[Le];ce=ue[Le];for(let lt=0,ut=Je.length;lt<ut;lt++){const z=q(Je[lt],ce[lt],De);E?Ce(z.x,z.y+A[p-1].y,A[p-1].x+Ae):Ce(z.x,z.y,g+Ae)}}}re(),ge();function re(){const oe=r.length/3;if(m){let Se=0,Ae=te*Se;for(let De=0;De<ht;De++){const Le=_e[De];We(Le[2]+Ae,Le[1]+Ae,Le[0]+Ae)}Se=p+S*2,Ae=te*Se;for(let De=0;De<ht;De++){const Le=_e[De];We(Le[0]+Ae,Le[1]+Ae,Le[2]+Ae)}}else{for(let Se=0;Se<ht;Se++){const Ae=_e[Se];We(Ae[2],Ae[1],Ae[0])}for(let Se=0;Se<ht;Se++){const Ae=_e[Se];We(Ae[0]+te*p,Ae[1]+te*p,Ae[2]+te*p)}}i.addGroup(oe,r.length/3-oe,0)}function ge(){const oe=r.length/3;let Se=0;Ie(Y,Se),Se+=Y.length;for(let Ae=0,De=F.length;Ae<De;Ae++){const Le=F[Ae];Ie(Le,Se),Se+=Le.length}i.addGroup(oe,r.length/3-oe,1)}function Ie(oe,Se){let Ae=oe.length;for(;--Ae>=0;){const De=Ae;let Le=Ae-1;Le<0&&(Le=oe.length-1);for(let Ye=0,Je=p+S*2;Ye<Je;Ye++){const lt=te*Ye,ut=te*(Ye+1);et(Se+De+lt,Se+Le+lt,Se+Le+ut,Se+De+ut)}}}function Ce(oe,Se,Ae){h.push(oe),h.push(Se),h.push(Ae)}function We(oe,Se,Ae){Ze(oe),Ze(Se),Ze(Ae);const De=r.length/3,Le=C.generateTopUV(i,r,De-3,De-2,De-1);ct(Le[0]),ct(Le[1]),ct(Le[2])}function et(oe,Se,Ae,De){Ze(oe),Ze(Se),Ze(De),Ze(Se),Ze(Ae),Ze(De);const Le=r.length/3,Ye=C.generateSideWallUV(i,r,Le-6,Le-3,Le-2,Le-1);ct(Ye[0]),ct(Ye[1]),ct(Ye[3]),ct(Ye[1]),ct(Ye[2]),ct(Ye[3])}function Ze(oe){r.push(h[oe*3+0]),r.push(h[oe*3+1]),r.push(h[oe*3+2])}function ct(oe){o.push(oe.x),o.push(oe.y)}}}copy(t){return super.copy(t),this.parameters=Object.assign({},t.parameters),this}toJSON(){const t=super.toJSON(),n=this.parameters.shapes,i=this.parameters.options;return dw(n,i,t)}static fromJSON(t,n){const i=[];for(let o=0,l=t.shapes.length;o<l;o++){const u=n[t.shapes[o]];i.push(u)}const r=t.options.extrudePath;return r!==void 0&&(t.options.extrudePath=new Bh[r.type]().fromJSON(r)),new S2(i,t.options)}},fw={generateTopUV:function(e,t,n,i,r){const o=t[n*3],l=t[n*3+1],u=t[i*3],h=t[i*3+1],f=t[r*3],p=t[r*3+1];return[new ye(o,l),new ye(u,h),new ye(f,p)]},generateSideWallUV:function(e,t,n,i,r,o){const l=t[n*3],u=t[n*3+1],h=t[n*3+2],f=t[i*3],p=t[i*3+1],g=t[i*3+2],m=t[r*3],v=t[r*3+1],b=t[r*3+2],w=t[o*3],S=t[o*3+1],_=t[o*3+2];return Math.abs(u-p)<Math.abs(l-f)?[new ye(l,1-h),new ye(f,1-g),new ye(m,1-b),new ye(w,1-_)]:[new ye(u,1-h),new ye(p,1-g),new ye(v,1-b),new ye(S,1-_)]}};function dw(e,t,n){if(n.shapes=[],Array.isArray(e))for(let i=0,r=e.length;i<r;i++){const o=e[i];n.shapes.push(o.uuid)}else n.shapes.push(e.uuid);return n.options=Object.assign({},t),t.extrudePath!==void 0&&(n.options.extrudePath=t.extrudePath.toJSON()),n}var M2=class w2 extends Ul{constructor(t=1,n=0){const i=(1+Math.sqrt(5))/2,r=[-1,i,0,1,i,0,-1,-i,0,1,-i,0,0,-1,i,0,1,i,0,-1,-i,0,1,-i,i,0,-1,i,0,1,-i,0,-1,-i,0,1];super(r,[0,11,5,0,5,1,0,1,7,0,7,10,0,10,11,1,5,9,5,11,4,11,10,2,10,7,6,7,1,8,3,9,4,3,4,2,3,2,6,3,6,8,3,8,9,4,9,5,2,4,11,6,2,10,8,6,7,9,8,1],t,n),this.type="IcosahedronGeometry",this.parameters={radius:t,detail:n}}static fromJSON(t){return new w2(t.radius,t.detail)}},E2=class T2 extends At{constructor(t=[new ye(0,-.5),new ye(.5,0),new ye(0,.5)],n=12,i=0,r=Math.PI*2){super(),this.type="LatheGeometry",this.parameters={points:t,segments:n,phiStart:i,phiLength:r},n=Math.floor(n),r=mt(r,0,Math.PI*2);const o=[],l=[],u=[],h=[],f=[],p=1/n,g=new k,m=new ye,v=new k,b=new k,w=new k;let S=0,_=0;for(let C=0;C<=t.length-1;C++)switch(C){case 0:S=t[C+1].x-t[C].x,_=t[C+1].y-t[C].y,v.x=_*1,v.y=-S,v.z=_*0,w.copy(v),v.normalize(),h.push(v.x,v.y,v.z);break;case t.length-1:h.push(w.x,w.y,w.z);break;default:S=t[C+1].x-t[C].x,_=t[C+1].y-t[C].y,v.x=_*1,v.y=-S,v.z=_*0,b.copy(v),v.x+=w.x,v.y+=w.y,v.z+=w.z,v.normalize(),h.push(v.x,v.y,v.z),w.copy(b)}for(let C=0;C<=n;C++){const A=i+C*p*r,E=Math.sin(A),P=Math.cos(A);for(let N=0;N<=t.length-1;N++){g.x=t[N].x*E,g.y=t[N].y,g.z=t[N].x*P,l.push(g.x,g.y,g.z),m.x=C/n,m.y=N/(t.length-1),u.push(m.x,m.y);const O=h[3*N+0]*E,T=h[3*N+1],R=h[3*N+0]*P;f.push(O,T,R)}}for(let C=0;C<n;C++)for(let A=0;A<t.length-1;A++){const E=A+C*t.length,P=E,N=E+t.length,O=E+t.length+1,T=E+1;o.push(P,N,T),o.push(O,T,N)}this.setIndex(o),this.setAttribute("position",new Qe(l,3)),this.setAttribute("uv",new Qe(u,2)),this.setAttribute("normal",new Qe(f,3))}copy(t){return super.copy(t),this.parameters=Object.assign({},t.parameters),this}static fromJSON(t){return new T2(t.points,t.segments,t.phiStart,t.phiLength)}},x0=class C2 extends Ul{constructor(t=1,n=0){super([1,0,0,-1,0,0,0,1,0,0,-1,0,0,0,1,0,0,-1],[0,2,4,0,4,3,0,3,5,0,5,2,1,2,5,1,5,3,1,3,4,1,4,2],t,n),this.type="OctahedronGeometry",this.parameters={radius:t,detail:n}}static fromJSON(t){return new C2(t.radius,t.detail)}},Qh=class A2 extends At{constructor(t=1,n=1,i=1,r=1){super(),this.type="PlaneGeometry",this.parameters={width:t,height:n,widthSegments:i,heightSegments:r};const o=t/2,l=n/2,u=Math.floor(i),h=Math.floor(r),f=u+1,p=h+1,g=t/u,m=n/h,v=[],b=[],w=[],S=[];for(let _=0;_<p;_++){const C=_*m-l;for(let A=0;A<f;A++){const E=A*g-o;b.push(E,-C,0),w.push(0,0,1),S.push(A/u),S.push(1-_/h)}}for(let _=0;_<h;_++)for(let C=0;C<u;C++){const A=C+f*_,E=C+f*(_+1),P=C+1+f*(_+1),N=C+1+f*_;v.push(A,E,N),v.push(E,P,N)}this.setIndex(v),this.setAttribute("position",new Qe(b,3)),this.setAttribute("normal",new Qe(w,3)),this.setAttribute("uv",new Qe(S,2))}copy(t){return super.copy(t),this.parameters=Object.assign({},t.parameters),this}static fromJSON(t){return new A2(t.width,t.height,t.widthSegments,t.heightSegments)}},R2=class I2 extends At{constructor(t=.5,n=1,i=32,r=1,o=0,l=Math.PI*2){super(),this.type="RingGeometry",this.parameters={innerRadius:t,outerRadius:n,thetaSegments:i,phiSegments:r,thetaStart:o,thetaLength:l},i=Math.max(3,i),r=Math.max(1,r);const u=[],h=[],f=[],p=[];let g=t;const m=(n-t)/r,v=new k,b=new ye;for(let w=0;w<=r;w++){for(let S=0;S<=i;S++){const _=o+S/i*l;v.x=g*Math.cos(_),v.y=g*Math.sin(_),h.push(v.x,v.y,v.z),f.push(0,0,1),b.x=(v.x/n+1)/2,b.y=(v.y/n+1)/2,p.push(b.x,b.y)}g+=m}for(let w=0;w<r;w++){const S=w*(i+1);for(let _=0;_<i;_++){const C=_+S,A=C,E=C+i+1,P=C+i+2,N=C+1;u.push(A,E,N),u.push(E,P,N)}}this.setIndex(u),this.setAttribute("position",new Qe(h,3)),this.setAttribute("normal",new Qe(f,3)),this.setAttribute("uv",new Qe(p,2))}copy(t){return super.copy(t),this.parameters=Object.assign({},t.parameters),this}static fromJSON(t){return new I2(t.innerRadius,t.outerRadius,t.thetaSegments,t.phiSegments,t.thetaStart,t.thetaLength)}},P2=class N2 extends At{constructor(t=new Jc([new ye(0,.5),new ye(-.5,-.5),new ye(.5,-.5)]),n=12){super(),this.type="ShapeGeometry",this.parameters={shapes:t,curveSegments:n};const i=[],r=[],o=[],l=[];let u=0,h=0;if(Array.isArray(t)===!1)f(t);else for(let p=0;p<t.length;p++)f(t[p]),this.addGroup(u,h,p),u+=h,h=0;this.setIndex(i),this.setAttribute("position",new Qe(r,3)),this.setAttribute("normal",new Qe(o,3)),this.setAttribute("uv",new Qe(l,2));function f(p){const g=r.length/3,m=p.extractPoints(n);let v=m.shape;const b=m.holes;es.isClockWise(v)===!1&&(v=v.reverse());for(let S=0,_=b.length;S<_;S++){const C=b[S];es.isClockWise(C)===!0&&(b[S]=C.reverse())}const w=es.triangulateShape(v,b);for(let S=0,_=b.length;S<_;S++){const C=b[S];v=v.concat(C)}for(let S=0,_=v.length;S<_;S++){const C=v[S];r.push(C.x,C.y,0),o.push(0,0,1),l.push(C.x,C.y)}for(let S=0,_=w.length;S<_;S++){const C=w[S],A=C[0]+g,E=C[1]+g,P=C[2]+g;i.push(A,E,P),h+=3}}}copy(t){return super.copy(t),this.parameters=Object.assign({},t.parameters),this}toJSON(){const t=super.toJSON(),n=this.parameters.shapes;return pw(n,t)}static fromJSON(t,n){const i=[];for(let r=0,o=t.shapes.length;r<o;r++){const l=n[t.shapes[r]];i.push(l)}return new N2(i,t.curveSegments)}};function pw(e,t){if(t.shapes=[],Array.isArray(e))for(let n=0,i=e.length;n<i;n++){const r=e[n];t.shapes.push(r.uuid)}else t.shapes.push(e.uuid);return t}var _0=class L2 extends At{constructor(t=1,n=32,i=16,r=0,o=Math.PI*2,l=0,u=Math.PI){super(),this.type="SphereGeometry",this.parameters={radius:t,widthSegments:n,heightSegments:i,phiStart:r,phiLength:o,thetaStart:l,thetaLength:u},n=Math.max(3,Math.floor(n)),i=Math.max(2,Math.floor(i));const h=Math.min(l+u,Math.PI);let f=0;const p=[],g=new k,m=new k,v=[],b=[],w=[],S=[];for(let _=0;_<=i;_++){const C=[],A=_/i,E=l+A*u,P=t*Math.cos(E),N=Math.sqrt(t*t-P*P);let O=0;_===0&&l===0?O=.5/n:_===i&&h===Math.PI&&(O=-.5/n);for(let T=0;T<=n;T++){const R=T/n,B=r+R*o;g.x=-N*Math.cos(B),g.y=P,g.z=N*Math.sin(B),b.push(g.x,g.y,g.z),m.copy(g).normalize(),w.push(m.x,m.y,m.z),S.push(R+O,1-A),C.push(f++)}p.push(C)}for(let _=0;_<i;_++)for(let C=0;C<n;C++){const A=p[_][C+1],E=p[_][C],P=p[_+1][C],N=p[_+1][C+1];(_!==0||l>0)&&v.push(A,E,N),(_!==i-1||h<Math.PI)&&v.push(E,P,N)}this.setIndex(v),this.setAttribute("position",new Qe(b,3)),this.setAttribute("normal",new Qe(w,3)),this.setAttribute("uv",new Qe(S,2))}copy(t){return super.copy(t),this.parameters=Object.assign({},t.parameters),this}static fromJSON(t){return new L2(t.radius,t.widthSegments,t.heightSegments,t.phiStart,t.phiLength,t.thetaStart,t.thetaLength)}},D2=class U2 extends Ul{constructor(t=1,n=0){super([1,1,1,-1,-1,1,-1,1,-1,1,-1,-1],[2,1,0,0,3,2,1,3,0,2,3,1],t,n),this.type="TetrahedronGeometry",this.parameters={radius:t,detail:n}}static fromJSON(t){return new U2(t.radius,t.detail)}},O2=class F2 extends At{constructor(t=1,n=.4,i=12,r=48,o=Math.PI*2,l=0,u=Math.PI*2){super(),this.type="TorusGeometry",this.parameters={radius:t,tube:n,radialSegments:i,tubularSegments:r,arc:o,thetaStart:l,thetaLength:u},i=Math.floor(i),r=Math.floor(r);const h=[],f=[],p=[],g=[],m=new k,v=new k,b=new k;for(let w=0;w<=i;w++){const S=l+w/i*u;for(let _=0;_<=r;_++){const C=_/r*o;v.x=(t+n*Math.cos(S))*Math.cos(C),v.y=(t+n*Math.cos(S))*Math.sin(C),v.z=n*Math.sin(S),f.push(v.x,v.y,v.z),m.x=t*Math.cos(C),m.y=t*Math.sin(C),b.subVectors(v,m).normalize(),p.push(b.x,b.y,b.z),g.push(_/r),g.push(w/i)}}for(let w=1;w<=i;w++)for(let S=1;S<=r;S++){const _=(r+1)*w+S-1,C=(r+1)*(w-1)+S-1,A=(r+1)*(w-1)+S,E=(r+1)*w+S;h.push(_,C,E),h.push(C,A,E)}this.setIndex(h),this.setAttribute("position",new Qe(f,3)),this.setAttribute("normal",new Qe(p,3)),this.setAttribute("uv",new Qe(g,2))}copy(t){return super.copy(t),this.parameters=Object.assign({},t.parameters),this}static fromJSON(t){return new F2(t.radius,t.tube,t.radialSegments,t.tubularSegments,t.arc)}},k2=class B2 extends At{constructor(t=1,n=.4,i=64,r=8,o=2,l=3){super(),this.type="TorusKnotGeometry",this.parameters={radius:t,tube:n,tubularSegments:i,radialSegments:r,p:o,q:l},i=Math.floor(i),r=Math.floor(r);const u=[],h=[],f=[],p=[],g=new k,m=new k,v=new k,b=new k,w=new k,S=new k,_=new k;for(let A=0;A<=i;++A){const E=A/i*o*Math.PI*2;C(E,o,l,t,v),C(E+.01,o,l,t,b),S.subVectors(b,v),_.addVectors(b,v),w.crossVectors(S,_),_.crossVectors(w,S),w.normalize(),_.normalize();for(let P=0;P<=r;++P){const N=P/r*Math.PI*2,O=-n*Math.cos(N),T=n*Math.sin(N);g.x=v.x+(O*_.x+T*w.x),g.y=v.y+(O*_.y+T*w.y),g.z=v.z+(O*_.z+T*w.z),h.push(g.x,g.y,g.z),m.subVectors(g,v).normalize(),f.push(m.x,m.y,m.z),p.push(A/i),p.push(P/r)}}for(let A=1;A<=i;A++)for(let E=1;E<=r;E++){const P=(r+1)*(A-1)+(E-1),N=(r+1)*A+(E-1),O=(r+1)*A+E,T=(r+1)*(A-1)+E;u.push(P,N,T),u.push(N,O,T)}this.setIndex(u),this.setAttribute("position",new Qe(h,3)),this.setAttribute("normal",new Qe(f,3)),this.setAttribute("uv",new Qe(p,2));function C(A,E,P,N,O){const T=Math.cos(A),R=Math.sin(A),B=P/E*A,F=Math.cos(B);O.x=N*(2+F)*.5*T,O.y=N*(2+F)*R*.5,O.z=N*Math.sin(B)*.5}}copy(t){return super.copy(t),this.parameters=Object.assign({},t.parameters),this}static fromJSON(t){return new B2(t.radius,t.tube,t.tubularSegments,t.radialSegments,t.p,t.q)}},z2=class V2 extends At{constructor(t=new v0(new k(-1,-1,0),new k(-1,1,0),new k(1,1,0)),n=64,i=1,r=8,o=!1){super(),this.type="TubeGeometry",this.parameters={path:t,tubularSegments:n,radius:i,radialSegments:r,closed:o};const l=t.computeFrenetFrames(n,o);this.tangents=l.tangents,this.normals=l.normals,this.binormals=l.binormals;const u=new k,h=new k,f=new ye;let p=new k;const g=[],m=[],v=[],b=[];w(),this.setIndex(b),this.setAttribute("position",new Qe(g,3)),this.setAttribute("normal",new Qe(m,3)),this.setAttribute("uv",new Qe(v,2));function w(){for(let A=0;A<n;A++)S(A);S(o===!1?n:0),C(),_()}function S(A){p=t.getPointAt(A/n,p);const E=l.normals[A],P=l.binormals[A];for(let N=0;N<=r;N++){const O=N/r*Math.PI*2,T=Math.sin(O),R=-Math.cos(O);h.x=R*E.x+T*P.x,h.y=R*E.y+T*P.y,h.z=R*E.z+T*P.z,h.normalize(),m.push(h.x,h.y,h.z),u.x=p.x+i*h.x,u.y=p.y+i*h.y,u.z=p.z+i*h.z,g.push(u.x,u.y,u.z)}}function _(){for(let A=1;A<=n;A++)for(let E=1;E<=r;E++){const P=(r+1)*(A-1)+(E-1),N=(r+1)*A+(E-1),O=(r+1)*A+E,T=(r+1)*(A-1)+E;b.push(P,N,T),b.push(N,O,T)}}function C(){for(let A=0;A<=n;A++)for(let E=0;E<=r;E++)f.x=A/n,f.y=E/r,v.push(f.x,f.y)}}copy(t){return super.copy(t),this.parameters=Object.assign({},t.parameters),this}toJSON(){const t=super.toJSON();return t.path=this.parameters.path.toJSON(),t}static fromJSON(t){return new V2(new Bh[t.path.type]().fromJSON(t.path),t.tubularSegments,t.radius,t.radialSegments,t.closed)}},G2=class extends At{constructor(e=null){if(super(),this.type="WireframeGeometry",this.parameters={geometry:e},e!==null){const t=[],n=new Set,i=new k,r=new k;if(e.index!==null){const o=e.attributes.position,l=e.index;let u=e.groups;u.length===0&&(u=[{start:0,count:l.count,materialIndex:0}]);for(let h=0,f=u.length;h<f;++h){const p=u[h],g=p.start,m=p.count;for(let v=g,b=g+m;v<b;v+=3)for(let w=0;w<3;w++){const S=l.getX(v+w),_=l.getX(v+(w+1)%3);i.fromBufferAttribute(o,S),r.fromBufferAttribute(o,_),xg(i,r,n)===!0&&(t.push(i.x,i.y,i.z),t.push(r.x,r.y,r.z))}}}else{const o=e.attributes.position;for(let l=0,u=o.count/3;l<u;l++)for(let h=0;h<3;h++){const f=3*l+h,p=3*l+(h+1)%3;i.fromBufferAttribute(o,f),r.fromBufferAttribute(o,p),xg(i,r,n)===!0&&(t.push(i.x,i.y,i.z),t.push(r.x,r.y,r.z))}}this.setAttribute("position",new Qe(t,3))}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}};function xg(e,t,n){const i=`${e.x},${e.y},${e.z}-${t.x},${t.y},${t.z}`,r=`${t.x},${t.y},${t.z}-${e.x},${e.y},${e.z}`;return n.has(i)===!0||n.has(r)===!0?!1:(n.add(i),n.add(r),!0)}var _g=Object.freeze({__proto__:null,BoxGeometry:Zc,CapsuleGeometry:t2,CircleGeometry:i2,ConeGeometry:f0,CylinderGeometry:h0,DodecahedronGeometry:l2,EdgesGeometry:u2,ExtrudeGeometry:b2,IcosahedronGeometry:M2,LatheGeometry:E2,OctahedronGeometry:x0,PlaneGeometry:Qh,PolyhedronGeometry:Ul,RingGeometry:R2,ShapeGeometry:P2,SphereGeometry:_0,TetrahedronGeometry:D2,TorusGeometry:O2,TorusKnotGeometry:k2,TubeGeometry:z2,WireframeGeometry:G2}),H2=class extends Wn{constructor(e){super(),this.isShadowMaterial=!0,this.type="ShadowMaterial",this.color=new Xe(0),this.transparent=!0,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.fog=e.fog,this}};function Pl(e){const t={};for(const n in e){t[n]={};for(const i in e[n]){const r=e[n][i];if(bg(r))r.isRenderTargetTexture?(Ue("UniformsUtils: Textures of render targets cannot be cloned via cloneUniforms() or mergeUniforms()."),t[n][i]=null):t[n][i]=r.clone();else if(Array.isArray(r))if(bg(r[0])){const o=[];for(let l=0,u=r.length;l<u;l++)o[l]=r[l].clone();t[n][i]=o}else t[n][i]=r.slice();else t[n][i]=r}}return t}function oi(e){const t={};for(let n=0;n<e.length;n++){const i=Pl(e[n]);for(const r in i)t[r]=i[r]}return t}function bg(e){return e&&(e.isColor||e.isMatrix3||e.isMatrix4||e.isVector2||e.isVector3||e.isVector4||e.isTexture||e.isQuaternion)}function mw(e){const t=[];for(let n=0;n<e.length;n++)t.push(e[n].clone());return t}function W2(e){const t=e.getRenderTarget();return t===null?e.outputColorSpace:t.isXRRenderTarget===!0?t.texture.colorSpace:Nt.
vendor: 2,746 bytes, lines 9-13
9workingColorSpace}var j2={clone:Pl,merge:oi},gw=`void main() {
10	gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
11}`,vw=`void main() {
12	gl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );
13}`,Si=class extends Wn{constructor(e){super(),this.isShaderMaterial=!0,this.type="ShaderMaterial",this.defines={},this.uniforms={},this.uniformsGroups=[],this.vertexShader=gw,this.fragmentShader=vw,this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!1,this.forceSinglePass=!0,this.extensions={clipCullDistance:!1,multiDraw:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv1:[0,0]},this.index0AttributeName=void 0,this.uniformsNeedUpdate=!1,this.glslVersion=null,e!==void 0&&this.setValues(e)}copy(e){return super.copy(e),this.fragmentShader=e.fragmentShader,this.vertexShader=e.vertexShader,this.uniforms=Pl(e.uniforms),this.uniformsGroups=mw(e.uniformsGroups),this.defines=Object.assign({},e.defines),this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.fog=e.fog,this.lights=e.lights,this.clipping=e.clipping,this.extensions=Object.assign({},e.extensions),this.glslVersion=e.glslVersion,this.defaultAttributeValues=Object.assign({},e.defaultAttributeValues),this.index0AttributeName=e.index0AttributeName,this.uniformsNeedUpdate=e.uniformsNeedUpdate,this}toJSON(e){const t=super.toJSON(e);t.glslVersion=this.glslVersion,t.uniforms={};for(const i in this.uniforms){const r=this.uniforms[i].value;r&&r.isTexture?t.uniforms[i]={type:"t",value:r.toJSON(e).uuid}:r&&r.isColor?t.uniforms[i]={type:"c",value:r.getHex()}:r&&r.isVector2?t.uniforms[i]={type:"v2",value:r.toArray()}:r&&r.isVector3?t.uniforms[i]={type:"v3",value:r.toArray()}:r&&r.isVector4?t.uniforms[i]={type:"v4",value:r.toArray()}:r&&r.isMatrix3?t.uniforms[i]={type:"m3",value:r.toArray()}:r&&r.isMatrix4?t.uniforms[i]={type:"m4",value:r.toArray()}:t.uniforms[i]={value:r}}Object.keys(this.defines).length>0&&(t.defines=this.defines),t.vertexShader=this.vertexShader,t.fragmentShader=this.fragmentShader,t.lights=this.lights,t.clipping=this.clipping;const n={};for(const i in this.extensions)this.extensions[i]===!0&&(n[i]=!0);return Object.keys(n).length>0&&(t.extensions=n),t}fromJSON(e,t){if(super.fromJSON(e,t),e.uniforms!==void 0)for(const n in e.uniforms){const i=e.uniforms[n];switch(this.uniforms[n]={},i.type){case"t":this.uniforms[n].value=t[i.value]||null;break;case"c":this.uniforms[n].value=new Xe().setHex(i.value);break;case"v2":this.uniforms[n].value=new ye().fromArray(i.value);break;case"v3":this.uniforms[n].value=new k().fromArray(i.value);break;case"v4":this.uniforms[n].value=new tn().fromArray(i.value);break;case"m3":this.uniforms[n].value=new Et().fromArray(i.value);break;
vendor: 12,645 bytes, line 13
13case"m4":this.uniforms[n].value=new _t().fromArray(i.value);break;default:this.uniforms[n].value=i.value}}if(e.defines!==void 0&&(this.defines=e.defines),e.vertexShader!==void 0&&(this.vertexShader=e.vertexShader),e.fragmentShader!==void 0&&(this.fragmentShader=e.fragmentShader),e.glslVersion!==void 0&&(this.glslVersion=e.glslVersion),e.extensions!==void 0)for(const n in e.extensions)this.extensions[n]=e.extensions[n];return e.lights!==void 0&&(this.lights=e.lights),e.clipping!==void 0&&(this.clipping=e.clipping),this}},b0=class extends Si{constructor(e){super(e),this.isRawShaderMaterial=!0,this.type="RawShaderMaterial"}},S0=class extends Wn{constructor(e){super(),this.isMeshStandardMaterial=!0,this.type="MeshStandardMaterial",this.defines={STANDARD:""},this.color=new Xe(16777215),this.roughness=1,this.metalness=0,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Xe(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new ye(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.roughnessMap=null,this.metalnessMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new as,this.envMapIntensity=1,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.defines={STANDARD:""},this.color.copy(e.color),this.roughness=e.roughness,this.metalness=e.metalness,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.roughnessMap=e.roughnessMap,this.metalnessMap=e.metalnessMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.envMapIntensity=e.envMapIntensity,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}},X2=class extends S0{constructor(e){super(),this.isMeshPhysicalMaterial=!0,this.defines={STANDARD:"",PHYSICAL:""},this.type="MeshPhysicalMaterial",this.anisotropyRotation=0,this.anisotropyMap=null,this.clearcoatMap=null,this.clearcoatRoughness=0,this.clearcoatRoughnessMap=null,this.clearcoatNormalScale=new ye(1,1),this.clearcoatNormalMap=null,this.ior=1.5,Object.defineProperty(this,"reflectivity",{get:function(){return mt(2.5*(this.ior-1)/(this.ior+1),0,1)},set:function(t){this.ior=(1+.4*t)/(1-.4*t)}}),this.iridescenceMap=null,this.iridescenceIOR=1.3,this.iridescenceThicknessRange=[100,400],this.iridescenceThicknessMap=null,this.sheenColor=new Xe(0),this.sheenColorMap=null,this.sheenRoughness=1,this.sheenRoughnessMap=null,this.transmissionMap=null,this.thickness=0,this.thicknessMap=null,this.attenuationDistance=1/0,this.attenuationColor=new Xe(1,1,1),this.specularIntensity=1,this.specularIntensityMap=null,this.specularColor=new Xe(1,1,1),this.specularColorMap=null,this._anisotropy=0,this._clearcoat=0,this._dispersion=0,this._iridescence=0,this._sheen=0,this._transmission=0,this.setValues(e)}get anisotropy(){return this._anisotropy}set anisotropy(e){this._anisotropy>0!=e>0&&this.version++,this._anisotropy=e}get clearcoat(){return this._clearcoat}set clearcoat(e){this._clearcoat>0!=e>0&&this.version++,this._clearcoat=e}get iridescence(){return this._iridescence}set iridescence(e){this._iridescence>0!=e>0&&this.version++,this._iridescence=e}get dispersion(){return this._dispersion}set dispersion(e){this._dispersion>0!=e>0&&this.version++,this._dispersion=e}get sheen(){return this._sheen}set sheen(e){this._sheen>0!=e>0&&this.version++,this._sheen=e}get transmission(){return this._transmission}set transmission(e){this._transmission>0!=e>0&&this.version++,this._transmission=e}copy(e){return super.copy(e),this.defines={STANDARD:"",PHYSICAL:""},this.anisotropy=e.anisotropy,this.anisotropyRotation=e.anisotropyRotation,this.anisotropyMap=e.anisotropyMap,this.clearcoat=e.clearcoat,this.clearcoatMap=e.clearcoatMap,this.clearcoatRoughness=e.clearcoatRoughness,this.clearcoatRoughnessMap=e.clearcoatRoughnessMap,this.clearcoatNormalMap=e.clearcoatNormalMap,this.clearcoatNormalScale.copy(e.clearcoatNormalScale),this.dispersion=e.dispersion,this.ior=e.ior,this.iridescence=e.iridescence,this.iridescenceMap=e.iridescenceMap,this.iridescenceIOR=e.iridescenceIOR,this.iridescenceThicknessRange=[...e.iridescenceThicknessRange],this.iridescenceThicknessMap=e.iridescenceThicknessMap,this.sheen=e.sheen,this.sheenColor.copy(e.sheenColor),this.sheenColorMap=e.sheenColorMap,this.sheenRoughness=e.sheenRoughness,this.sheenRoughnessMap=e.sheenRoughnessMap,this.transmission=e.transmission,this.transmissionMap=e.transmissionMap,this.thickness=e.thickness,this.thicknessMap=e.thicknessMap,this.attenuationDistance=e.attenuationDistance,this.attenuationColor.copy(e.attenuationColor),this.specularIntensity=e.specularIntensity,this.specularIntensityMap=e.specularIntensityMap,this.specularColor.copy(e.specularColor),this.specularColorMap=e.specularColorMap,this}},q2=class extends Wn{constructor(e){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new Xe(16777215),this.specular=new Xe(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Xe(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new ye(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new as,this.combine=0,this.reflectivity=1,this.envMapIntensity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.specular.copy(e.specular),this.shininess=e.shininess,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.envMapIntensity=e.envMapIntensity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}},Y2=class extends Wn{constructor(e){super(),this.isMeshToonMaterial=!0,this.defines={TOON:""},this.type="MeshToonMaterial",this.color=new Xe(16777215),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Xe(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new ye(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.gradientMap=e.gradientMap,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}},$2=class extends Wn{constructor(e){super(),this.isMeshNormalMaterial=!0,this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new ye(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.flatShading=!1,this.setValues(e)}copy(e){return super.copy(e),this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.flatShading=e.flatShading,this}},Z2=class extends Wn{constructor(e){super(),this.isMeshLambertMaterial=!0,this.type="MeshLambertMaterial",this.color=new Xe(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Xe(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new ye(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new as,this.combine=0,this.reflectivity=1,this.envMapIntensity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.envMapIntensity=e.envMapIntensity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}},M0=class extends Wn{constructor(e){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=Sy,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(e)}copy(e){return super.copy(e),this.depthPacking=e.depthPacking,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this}},w0=class extends Wn{constructor(e){super(),this.isMeshDistanceMaterial=!0,this.type="MeshDistanceMaterial",this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(e)}copy(e){return super.copy(e),this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this}}
vendor: 6,225 bytes, line 13
13,J2=class extends Wn{constructor(e){super(),this.isMeshMatcapMaterial=!0,this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new Xe(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new ye(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.wireframe=!1,this.wireframeLinewidth=1,this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.defines={MATCAP:""},this.color.copy(e.color),this.matcap=e.matcap,this.map=e.map,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.flatShading=e.flatShading,this.fog=e.fog,this}},K2=class extends fi{constructor(e){super(),this.isLineDashedMaterial=!0,this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(e)}copy(e){return super.copy(e),this.scale=e.scale,this.dashSize=e.dashSize,this.gapSize=e.gapSize,this}};function lo(e,t){return!e||e.constructor===t?e:typeof t.BYTES_PER_ELEMENT=="number"?new t(e):Array.prototype.slice.call(e)}function Q2(e){function t(r,o){return e[r]-e[o]}const n=e.length,i=new Array(n);for(let r=0;r!==n;++r)i[r]=r;return i.sort(t),i}function Cp(e,t,n){const i=e.length,r=new e.constructor(i);for(let o=0,l=0;l!==i;++o){const u=n[o]*t;for(let h=0;h!==t;++h)r[l++]=e[u+h]}return r}function ex(e,t,n,i){let r=1,o=e[0];for(;o!==void 0&&o[i]===void 0;)o=e[r++];if(o===void 0)return;let l=o[i];if(l!==void 0)if(Array.isArray(l))do l=o[i],l!==void 0&&(t.push(o.time),n.push(...l)),o=e[r++];while(o!==void 0);else if(l.toArray!==void 0)do l=o[i],l!==void 0&&(t.push(o.time),l.toArray(n,n.length)),o=e[r++];while(o!==void 0);else do l=o[i],l!==void 0&&(t.push(o.time),n.push(l)),o=e[r++];while(o!==void 0)}function yw(e,t,n,i,r=30){const o=e.clone();o.name=t;const l=[];for(let h=0;h<o.tracks.length;++h){const f=o.tracks[h],p=f.getValueSize(),g=[],m=[];for(let v=0;v<f.times.length;++v){const b=f.times[v]*r;if(!(b<n||b>=i)){g.push(f.times[v]);for(let w=0;w<p;++w)m.push(f.values[v*p+w])}}g.length!==0&&(f.times=lo(g,f.times.constructor),f.values=lo(m,f.values.constructor),l.push(f))}o.tracks=l;let u=1/0;for(let h=0;h<o.tracks.length;++h)u>o.tracks[h].times[0]&&(u=o.tracks[h].times[0]);for(let h=0;h<o.tracks.length;++h)o.tracks[h].shift(-1*u);return o.resetDuration(),o}function xw(e,t=0,n=e,i=30){i<=0&&(i=30);const r=n.tracks.length,o=t/i;for(let l=0;l<r;++l){const u=n.tracks[l],h=u.ValueTypeName;if(h==="bool"||h==="string")continue;const f=e.tracks.find(function(_){return _.name===u.name&&_.ValueTypeName===h});if(f===void 0)continue;let p=0;const g=u.getValueSize();u.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline&&(p=g/3);let m=0;const v=f.getValueSize();f.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline&&(m=v/3);const b=u.times.length-1;let w;if(o<=u.times[0]){const _=p,C=g-p;w=u.values.slice(_,C)}else if(o>=u.times[b]){const _=b*g+p,C=_+g-p;w=u.values.slice(_,C)}else{const _=u.createInterpolant(),C=p,A=g-p;_.evaluate(o),w=_.resultBuffer.slice(C,A)}h==="quaternion"&&new hi().fromArray(w).normalize().conjugate().toArray(w);const S=f.times.length;for(let _=0;_<S;++_){const C=_*v+m;if(h==="quaternion")hi.multiplyQuaternionsFlat(f.values,C,w,0,f.values,C);else{const A=v-m*2;for(let E=0;E<A;++E)f.values[C+E]-=w[E]}}}return e.blendMode=t0,e}var _w=class{static convertArray(e,t){return lo(e,t)}static isTypedArray(e){return wy(e)}static getKeyframeOrder(e){return Q2(e)}static sortedArray(e,t,n){return Cp(e,t,n)}static flattenJSON(e,t,n,i){ex(e,t,n,i)}static subclip(e,t,n,i,r=30){return yw(e,t,n,i,r)}static makeClipAdditive(e,t=0,n=e,i=30){return xw(e,t,n,i)}},Ol=class{constructor(e,t,n,i){this.parameterPositions=e,this._cachedIndex=0,this.resultBuffer=i!==void 0?i:new t.constructor(n),this.sampleValues=t,this.valueSize=n,this.settings=null,this.DefaultSettings_={}}evaluate(e){const t=this.parameterPositions;let n=this._cachedIndex,i=t[n],r=t[n-1];e:{t:{let o;n:{i:if(!(e<i)){for(let l=n+2;;){if(i===void 0){if(e<r)break i;return n=t.length,this._cachedIndex=n,this.copySampleValue_(n-1)}if(n===l)break;if(r=i,i=t[++n],e<i)break t}o=t.length;break n}if(!(e>=r)){const l=t[1];e<l&&(n=2,r=l);for(let u=n-2;;){if(r===void 0)return this._cachedIndex=0,this.copySampleValue_(0);if(n===u)break;if(i=r,r=t[--n-1],e>=r)break t}o=n,n=0;break n}break e}for(;n<o;){const l=n+o>>>1;e<t[l]?o=l:n=l+1}if(i=t[n],r=t[n-1],r===void 0)return this._cachedIndex=0,this.copySampleValue_(0);if(i===void 0)return n=t.length,this._cachedIndex=n,this.copySampleValue_(n-1)}this._cachedIndex=n,this.intervalChanged_(n,r,i)}return this.interpolate_(n,r,e,i)}getSettings_(){return this.settings||this.DefaultSettings_}copySampleValue_(e){const t=this.resultBuffer,n=this.sampleValues,i=this.valueSize,r=e*i;for(let o=0;o!==i;++o)t[o]=n[r+o];return t}interpolate_(){throw new Error("THREE.Interpolant: Call to abstract method.")}intervalChanged_(){}},tx=class extends Ol{constructor(e,t,n,i){super(e,t,n,i),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0,this.DefaultSettings_={endingStart:ao,endingEnd:ao}}intervalChanged_(e,t,n){const i=this.parameterPositions;let r=e-2,o=e+1,l=i[r],u=i[o];if(l===void 0)switch(this.getSettings_().endingStart){case oo:r=e,l=2*t-n;break;case Dc:r=i.length-2,l=t+i[r]-i[r+1];break;default:r=e,l=n}if(u===void 0)switch(this.getSettings_().endingEnd){case oo:o=e,u=2*n-t;break;case Dc:o=1,u=n+i[1]-i[0];break;default:o=e-1,u=t}const h=(n-t)*.5,f=this.valueSize;this._weightPrev=h/(t-l),this._weightNext=h/(u-n),this._offsetPrev=r*f,this._offsetNext=o*f}interpolate_(e,t,n,i){const r=this.resultBuffer,o=this.sampleValues,l=this.valueSize,u=e*l,h=u-l,f=this._offsetPrev,p=this._offsetNext,g=this._weightPrev,m=this._weightNext,v=(n-t)/(i-t),b=v*v,w=b*v,S=-g*w+2*g*b-g*v,_=(1+g)*w+(-1.5-2*g)*b+(-.5+g)*v+1,C=(-1-m)*w+(1.5+m)*b+.5*v,A=m*w-m*b;
13for(let E=0;E!==l;++E)r[E]=S*o[f+E]+_*o[h+E]+C*o[u+E]+A*o[p+E];return r}},E0=class extends Ol{constructor(e,t,n,i){super(e,t,n,i)}interpolate_(e,t,n,i){const r=this.resultBuffer,o=this.sampleValues,l=this.valueSize,u=e*l,h=u-l,f=(n-t)/(i-t),p=1-f;for(let g=0;g!==l;++g)r[g]=o[h+g]*p+o[u+g]*f;return r}},nx=class extends Ol{constructor(e,t,n,i){super(e,t,n,i)}interpolate_(e){return this.copySampleValue_(e-1)}},ix=class extends Ol{interpolate_(e,t,n,i){const r=this.resultBuffer,o=this.sampleValues,l=this.valueSize,u=e*l,h=u-l,f=this.inTangents,p=this.outTangents;if(!f||!p){const v=(n-t)/(i-t),b=1-v;for(let w=0;w!==l;++w)r[w]=o[h+w]*b+o[u+w]*v;return r}const g=l*2,m=e-1;for(let v=0;v!==l;++v){const b=o[h+v],w=o[u+v],S=m*g+v*2,_=p[S],C=p[S+1],A=e*g+v*2,E=f[A],P=f[A+1];let N=(n-t)/(i-t),O,T,R,B,F;for(let j=0;j<8;j++){O=N*N,T=O*N,R=1-N,B=R*R,F=B*R;const H=F*t+3*B*N*_+3*R*O*E+T*i-n;if(Math.abs(H)<1e-10)break;const Y=3*B*(_-t)+6*R*N*(E-_)+3*O*(i-E);if(Math.abs(Y)<1e-10)break;N=N-H/Y,N=Math.max(0,Math.min(1,N))}r[v]=F*b+3*B*N*C+3*R*O*P+T*w}return r}},Zi=class{constructor(e,t,n,i){if(e===void 0)throw new Error("THREE.KeyframeTrack: track name is undefined");if(t===void 0||t.length===0)throw new Error("THREE.KeyframeTrack: no keyframes in track named "+e);this.name=e,this.times=lo(t,this.TimeBufferType),this.values=lo(n,this.ValueBufferType),this.setInterpolation(i||this.DefaultInterpolation)}static toJSON(e){const t=e.constructor;let n;if(t.toJSON!==this.toJSON)n=t.toJSON(e);else{n={name:e.name,times:lo(e.times,Array),values:lo(e.values,Array)};const i=e.getInterpolation();i!==e.DefaultInterpolation&&(n.interpolation=i)}return n.type=e.ValueTypeName,n}InterpolantFactoryMethodDiscrete(e){return new nx(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodLinear(e){return new E0(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodSmooth(e){return new tx(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodBezier(e){const t=new ix(this.times,this.values,this.getValueSize(),e);return this.settings&&(t.inTangents=this.settings.inTangents,t.outTangents=this.settings.outTangents),t}setInterpolation(e){let t;switch(e){case Lc:t=this.InterpolantFactoryMethodDiscrete;break;case Oh:t=this.InterpolantFactoryMethodLinear;break;case Rh:t=this.InterpolantFactoryMethodSmooth;break;case Sp:t=this.InterpolantFactoryMethodBezier;break}if(t===void 0){const n="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(this.createInterpolant===void 0)if(e!==this.DefaultInterpolation)this.setInterpolation(this.DefaultInterpolation);else throw new Error(n);return Ue("KeyframeTrack:",n),this}return this.createInterpolant=t,this}getInterpolation(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return Lc;case this.InterpolantFactoryMethodLinear:return Oh;case this.InterpolantFactoryMethodSmooth:return Rh;case this.InterpolantFactoryMethodBezier:return Sp}}getValueSize(){return this.values.length/this.times.length}shift(e){if(e!==0){const t=this.times;for(let n=0,i=t.length;n!==i;++n)t[n]+=e}return this}scale(e){if(e!==1){const t=this.times;for(let n=0,i=t.length;n!==i;++n)t[n]*=e}return this}trim(e,t){const n=this.times,i=n.length;let r=0,o=i-1;for(;r!==i&&n[r]<e;)++r;for(;o!==-1&&n[o]>t;)--o;if(++o,r!==0||o!==i){r>=o&&(o=Math.max(o,1),r=o-1);const l=this.getValueSize();this.times=n.slice(r,o),this.values=this.values.slice(r*l,o*l)}return this}validate(){let e=!0;const t=this.getValueSize();t-Math.floor(t)!==0&&(rt("KeyframeTrack: Invalid value size in track.",this),e=!1);const n=this.times,i=this.values,r=n.length;r===0&&(rt("KeyframeTrack: Track is empty.",this),e=!1);let o=null;for(let l=0;l!==r;l++){const u=n[l];if(typeof u=="number"&&isNaN(u)){rt("KeyframeTrack: Time is not a valid number.",this,l,u),e=!1;break}if(o!==null&&o>u){rt("KeyframeTrack: Out of order keys.",this,l,u,o),e=!1;break}o=u}if(i!==void 0&&wy(i))for(let l=0,u=i.length;l!==u;++l){const h=i[l];if(isNaN(h)){rt("KeyframeTrack: Value is not a valid number.",this,l,h),e=!1;break}}return e}optimize(){const e=this.times.slice(),t=this.values.slice(),n=this.getValueSize(),i=this.getInterpolation()===Rh,r=e.length-1;let o=1;for(let l=1;l<r;++l){let u=!1;const h=e[l];
vendor: 4,272 bytes, line 13
13if(h!==e[l+1]&&(l!==1||h!==e[0]))if(i)u=!0;else{const f=l*n,p=f-n,g=f+n;for(let m=0;m!==n;++m){const v=t[f+m];if(v!==t[p+m]||v!==t[g+m]){u=!0;break}}}if(u){if(l!==o){e[o]=e[l];const f=l*n,p=o*n;for(let g=0;g!==n;++g)t[p+g]=t[f+g]}++o}}if(r>0){e[o]=e[r];for(let l=r*n,u=o*n,h=0;h!==n;++h)t[u+h]=t[l+h];++o}return o!==e.length?(this.times=e.slice(0,o),this.values=t.slice(0,o*n)):(this.times=e,this.values=t),this}clone(){const e=this.times.slice(),t=this.values.slice(),n=this.constructor,i=new n(this.name,e,t);return i.createInterpolant=this.createInterpolant,i}};Zi.prototype.ValueTypeName="";Zi.prototype.TimeBufferType=Float32Array;Zi.prototype.ValueBufferType=Float32Array;Zi.prototype.DefaultInterpolation=Oh;var vo=class extends Zi{constructor(e,t,n){super(e,t,n)}};vo.prototype.ValueTypeName="bool";vo.prototype.ValueBufferType=Array;vo.prototype.DefaultInterpolation=Lc;vo.prototype.InterpolantFactoryMethodLinear=void 0;vo.prototype.InterpolantFactoryMethodSmooth=void 0;var T0=class extends Zi{constructor(e,t,n,i){super(e,t,n,i)}};T0.prototype.ValueTypeName="color";var ef=class extends Zi{constructor(e,t,n,i){super(e,t,n,i)}};ef.prototype.ValueTypeName="number";var rx=class extends Ol{constructor(e,t,n,i){super(e,t,n,i)}interpolate_(e,t,n,i){const r=this.resultBuffer,o=this.sampleValues,l=this.valueSize,u=(n-t)/(i-t);let h=e*l;for(let f=h+l;h!==f;h+=4)hi.slerpFlat(r,0,o,h-l,o,h,u);return r}},tf=class extends Zi{constructor(e,t,n,i){super(e,t,n,i)}InterpolantFactoryMethodLinear(e){return new rx(this.times,this.values,this.getValueSize(),e)}};tf.prototype.ValueTypeName="quaternion";tf.prototype.InterpolantFactoryMethodSmooth=void 0;var yo=class extends Zi{constructor(e,t,n){super(e,t,n)}};yo.prototype.ValueTypeName="string";yo.prototype.ValueBufferType=Array;yo.prototype.DefaultInterpolation=Lc;yo.prototype.InterpolantFactoryMethodLinear=void 0;yo.prototype.InterpolantFactoryMethodSmooth=void 0;var C0=class extends Zi{constructor(e,t,n,i){super(e,t,n,i)}};C0.prototype.ValueTypeName="vector";var jc=class{constructor(e="",t=-1,n=[],i=Xh){this.name=e,this.tracks=n,this.duration=t,this.blendMode=i,this.uuid=Oi(),this.userData={},this.duration<0&&this.resetDuration()}static parse(e){const t=[],n=e.tracks,i=1/(e.fps||1);for(let o=0,l=n.length;o!==l;++o)t.push(Sw(n[o]).scale(i));const r=new this(e.name,e.duration,t,e.blendMode);return r.uuid=e.uuid,r.userData=JSON.parse(e.userData||"{}"),r}static toJSON(e){const t=[],n=e.tracks,i={name:e.name,duration:e.duration,tracks:t,uuid:e.uuid,blendMode:e.blendMode,userData:JSON.stringify(e.userData)};for(let r=0,o=n.length;r!==o;++r)t.push(Zi.toJSON(n[r]));return i}static CreateFromMorphTargetSequence(e,t,n,i){const r=t.length,o=[];for(let l=0;l<r;l++){let u=[],h=[];u.push((l+r-1)%r,l,(l+1)%r),h.push(0,1,0);const f=Q2(u);u=Cp(u,1,f),h=Cp(h,1,f),!i&&u[0]===0&&(u.push(r),h.push(h[0])),o.push(new ef(".morphTargetInfluences["+t[l].name+"]",u,h).scale(1/n))}return new this(e,-1,o)}static findByName(e,t){let n=e;if(!Array.isArray(e)){const i=e;n=i.geometry&&i.geometry.animations||i.animations}for(let i=0;i<n.length;i++)if(n[i].name===t)return n[i];return null}static CreateClipsFromMorphTargetSequences(e,t,n){const i={},r=/^([\w-]*?)([\d]+)$/;for(let l=0,u=e.length;l<u;l++){const h=e[l],f=h.name.match(r);if(f&&f.length>1){const p=f[1];let g=i[p];g||(i[p]=g=[]),g.push(h)}}const o=[];for(const l in i)o.push(this.CreateFromMorphTargetSequence(l,i[l],t,n));return o}resetDuration(){const e=this.tracks;let t=0;for(let n=0,i=e.length;n!==i;++n){const r=this.tracks[n];t=Math.max(t,r.times[r.times.length-1])}return this.duration=t,this}trim(){for(let e=0;e<this.tracks.length;e++)this.tracks[e].trim(0,this.duration);return this}validate(){let e=!0;for(let t=0;t<this.tracks.length;t++)e=e&&this.tracks[t].validate();return e}optimize(){for(let e=0;e<this.tracks.length;e++)this.tracks[e].optimize();return this}clone(){const e=[];for(let n=0;n<this.tracks.length;n++)e.push(this.tracks[n].clone());const t=new this.constructor(this.name,this.duration,e,this.blendMode);return t.userData=JSON.parse(JSON.stringify(this.userData)),t}toJSON(){return this.constructor.toJSON(this)}};function bw(e){switch(e.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return ef;
vendor: 5,913 bytes, line 13
13case"vector":case"vector2":case"vector3":case"vector4":return C0;case"color":return T0;case"quaternion":return tf;case"bool":case"boolean":return vo;case"string":return yo}throw new Error("THREE.KeyframeTrack: Unsupported typeName: "+e)}function Sw(e){if(e.type===void 0)throw new Error("THREE.KeyframeTrack: track type undefined, can not parse");const t=bw(e.type);if(e.times===void 0){const n=[],i=[];ex(e.keys,n,i,"value"),e.times=n,e.values=i}return t.parse!==void 0?t.parse(e):new t(e.name,e.times,e.values,e.interpolation)}var Cr={enabled:!1,files:{},add:function(e,t){this.enabled!==!1&&(Sg(e)||(this.files[e]=t))},get:function(e){if(this.enabled!==!1&&!Sg(e))return this.files[e]},remove:function(e){delete this.files[e]},clear:function(){this.files={}}};function Sg(e){try{const t=e.slice(e.indexOf(":")+1);return new URL(t).protocol==="blob:"}catch{return!1}}var A0=class{constructor(e,t,n){const i=this;let r=!1,o=0,l=0,u;const h=[];this.onStart=void 0,this.onLoad=e,this.onProgress=t,this.onError=n,this._abortController=null,this.itemStart=function(f){l++,r===!1&&i.onStart!==void 0&&i.onStart(f,o,l),r=!0},this.itemEnd=function(f){o++,i.onProgress!==void 0&&i.onProgress(f,o,l),o===l&&(r=!1,i.onLoad!==void 0&&i.onLoad())},this.itemError=function(f){i.onError!==void 0&&i.onError(f)},this.resolveURL=function(f){return f=f.normalize("NFC"),u?u(f):f},this.setURLModifier=function(f){return u=f,this},this.addHandler=function(f,p){return h.push(f,p),this},this.removeHandler=function(f){const p=h.indexOf(f);return p!==-1&&h.splice(p,2),this},this.getHandler=function(f){for(let p=0,g=h.length;p<g;p+=2){const m=h[p],v=h[p+1];if(m.global&&(m.lastIndex=0),m.test(f))return v}return null},this.abort=function(){return this.abortController.abort(),this._abortController=null,this}}get abortController(){return this._abortController||(this._abortController=new AbortController),this._abortController}},sx=new A0,Mi=class{constructor(e){this.manager=e!==void 0?e:sx,this.crossOrigin="anonymous",this.withCredentials=!1,this.path="",this.resourcePath="",this.requestHeader={},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}load(){}loadAsync(e,t){const n=this;return new Promise(function(i,r){n.load(e,i,t,r)})}parse(){}setCrossOrigin(e){return this.crossOrigin=e,this}setWithCredentials(e){return this.withCredentials=e,this}setPath(e){return this.path=e,this}setResourcePath(e){return this.resourcePath=e,this}setRequestHeader(e){return this.requestHeader=e,this}abort(){return this}};Mi.DEFAULT_MATERIAL_NAME="__DEFAULT";var Kr={},Mw=class extends Error{constructor(e,t){super(e),this.response=t}},os=class extends Mi{constructor(e){super(e),this.mimeType="",this.responseType="",this._abortController=new AbortController}load(e,t,n,i){e===void 0&&(e=""),this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const r=Cr.get(`file:${e}`);if(r!==void 0){this.manager.itemStart(e),setTimeout(()=>{t&&t(r),this.manager.itemEnd(e)},0);return}if(Kr[e]!==void 0){Kr[e].push({onLoad:t,onProgress:n,onError:i});return}Kr[e]=[],Kr[e].push({onLoad:t,onProgress:n,onError:i});const o=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin",signal:typeof AbortSignal.any=="function"?AbortSignal.any([this._abortController.signal,this.manager.abortController.signal]):this._abortController.signal}),l=this.mimeType,u=this.responseType;fetch(o).then(h=>{if(h.status===200||h.status===0){if(h.status===0&&Ue("FileLoader: HTTP Status 0 received."),typeof ReadableStream>"u"||h.body===void 0||h.body.getReader===void 0)return h;const f=Kr[e],p=h.body.getReader(),g=h.headers.get("X-File-Size")||h.headers.get("Content-Length"),m=g?parseInt(g):0,v=m!==0;let b=0;const w=new ReadableStream({start(S){_();function _(){p.read().then(({done:C,value:A})=>{if(C)S.close();else{b+=A.byteLength;const E=new ProgressEvent("progress",{lengthComputable:v,loaded:b,total:m});for(let P=0,N=f.length;P<N;P++){const O=f[P];O.onProgress&&O.onProgress(E)}S.enqueue(A),_()}},C=>{S.error(C)})}}});return new Response(w)}else throw new Mw(`fetch for "${h.url}" responded with ${h.status}: ${h.statusText}`,h)}).then(h=>{switch(u){case"arraybuffer":return h.arrayBuffer();case"blob":return h.blob();case"document":return h.text().then(f=>new DOMParser().parseFromString(f,l));case"json":return h.json();default:if(l==="")return h.text();{const f=/charset="?([^;"\s]*)"?/i.exec(l),p=f&&f[1]?f[1].toLowerCase():void 0,g=new TextDecoder(p);return h.arrayBuffer().then(m=>g.decode(m))}}}).then(h=>{Cr.add(`file:${e}`,h);const f=Kr[e];delete Kr[e];for(let p=0,g=f.length;p<g;p++){const m=f[p];m.onLoad&&m.onLoad(h)}}).catch(h=>{const f=Kr[e];if(f===void 0)throw this.manager.itemError(e),h;delete Kr[e];for(let p=0,g=f.length;p<g;p++){const m=f[p];m.onError&&m.onError(h)}this.manager.itemError(e)}).finally(()=>{this.manager.itemEnd(e)}),this.manager.itemStart(e)}setResponseType(e){return this.responseType=e,this}setMimeType(e){return this.mimeType=e,this}abort(){return this._abortController.abort(),this._abortController=new AbortController,this}},ww=class extends Mi{constructor(e){super(e)}load(e,t,n,i){const r=this,o=new os(this.manager);o.setPath(this.path),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(e,function(l){try{t(r.parse(JSON.parse(l)))}catch(u){i?i(u):rt(u),r.manager.itemError(e)}},n,i)}parse(e){const t=[];for(let n=0;n<e.length;n++){const i=jc.parse(e[n]);t.push(i)}return t}},Ew=class extends Mi{constructor(e){super(e)}load(e,t,n,i){const r=this,o=[],l=new Jh,u=new os(this.manager);u.setPath(this.path),u.setResponseType("arraybuffer"),u.setRequestHeader(this.requestHeader),u.setWithCredentials(r.withCredentials);let h=0;function f(p){u.load(e[p],function(g){const m=r.parse(g,!0);o[p]={width:m.width,height:m.height,format:m.format,mipmaps:m.mipmaps}
vendor: 5,408 bytes, line 13
13,h+=1,h===6&&(m.mipmapCount===1&&(l.minFilter=mn),l.image=o,l.format=m.format,l.needsUpdate=!0,t&&t(l))},n,i)}if(Array.isArray(e))for(let p=0,g=e.length;p<g;++p)f(p);else u.load(e,function(p){const g=r.parse(p,!0);if(g.isCubemap){const m=g.mipmaps.length/g.mipmapCount;for(let v=0;v<m;v++){o[v]={mipmaps:[]};for(let b=0;b<g.mipmapCount;b++)o[v].mipmaps.push(g.mipmaps[v*g.mipmapCount+b]),o[v].format=g.format,o[v].width=g.width,o[v].height=g.height}l.image=o}else l.image.width=g.width,l.image.height=g.height,l.mipmaps=g.mipmaps;g.mipmapCount===1&&(l.minFilter=mn),l.format=g.format,l.needsUpdate=!0,t&&t(l)},n,i);return l}},hl=new WeakMap,Xc=class extends Mi{constructor(e){super(e)}load(e,t,n,i){this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const r=this,o=Cr.get(`image:${e}`);if(o!==void 0){if(o.complete===!0)r.manager.itemStart(e),setTimeout(function(){t&&t(o),r.manager.itemEnd(e)},0);else{let p=hl.get(o);p===void 0&&(p=[],hl.set(o,p)),p.push({onLoad:t,onError:i})}return o}const l=kc("img");function u(){f(),t&&t(this);const p=hl.get(this)||[];for(let g=0;g<p.length;g++){const m=p[g];m.onLoad&&m.onLoad(this)}hl.delete(this),r.manager.itemEnd(e)}function h(p){f(),i&&i(p),Cr.remove(`image:${e}`);const g=hl.get(this)||[];for(let m=0;m<g.length;m++){const v=g[m];v.onError&&v.onError(p)}hl.delete(this),r.manager.itemError(e),r.manager.itemEnd(e)}function f(){l.removeEventListener("load",u,!1),l.removeEventListener("error",h,!1)}return l.addEventListener("load",u,!1),l.addEventListener("error",h,!1),e.slice(0,5)!=="data:"&&this.crossOrigin!==void 0&&(l.crossOrigin=this.crossOrigin),Cr.add(`image:${e}`,l),r.manager.itemStart(e),l.src=e,l}},Tw=class extends Mi{constructor(e){super(e)}load(e,t,n,i){const r=new $c;r.colorSpace=ci;const o=new Xc(this.manager);o.setCrossOrigin(this.crossOrigin),o.setPath(this.path);let l=0;function u(h){o.load(e[h],function(f){r.images[h]=f,l++,l===6&&(r.needsUpdate=!0,t&&t(r))},void 0,i)}for(let h=0;h<e.length;++h)u(h);return r}},Cw=class extends Mi{constructor(e){super(e)}load(e,t,n,i){const r=this,o=new $i,l=new os(this.manager);return l.setResponseType("arraybuffer"),l.setRequestHeader(this.requestHeader),l.setPath(this.path),l.setWithCredentials(r.withCredentials),l.load(e,function(u){let h;try{h=r.parse(u)}catch(f){i!==void 0?i(f):rt(f);return}r._applyTexData(o,h),t&&t(o,h)},n,i),o}createDataTexture(e){const t=new $i;return this._applyTexData(t,this.parse(e)),t}_applyTexData(e,t){t.image!==void 0?e.image=t.image:t.data!==void 0&&(e.image.width=t.width,e.image.height=t.height,e.image.data=t.data),e.wrapS=t.wrapS!==void 0?t.wrapS:bi,e.wrapT=t.wrapT!==void 0?t.wrapT:bi,e.magFilter=t.magFilter!==void 0?t.magFilter:mn,e.minFilter=t.minFilter!==void 0?t.minFilter:mn,e.anisotropy=t.anisotropy!==void 0?t.anisotropy:1,t.colorSpace!==void 0&&(e.colorSpace=t.colorSpace),t.flipY!==void 0&&(e.flipY=t.flipY),t.format!==void 0&&(e.format=t.format),t.type!==void 0&&(e.type=t.type),t.mipmaps!==void 0&&(e.mipmaps=t.mipmaps,e.minFilter=Ll),t.mipmapCount===1&&(e.minFilter=mn),t.generateMipmaps!==void 0&&(e.generateMipmaps=t.generateMipmaps),e.needsUpdate=!0}},Aw=class extends Mi{constructor(e){super(e)}load(e,t,n,i){const r=new Ln,o=new Xc(this.manager);return o.setCrossOrigin(this.crossOrigin),o.setPath(this.path),o.load(e,function(l){r.image=l,r.needsUpdate=!0,t!==void 0&&t(r)},n,i),r}},Ys=class extends Yt{constructor(e,t=1){super(),this.isLight=!0,this.type="Light",this.color=new Xe(e),this.intensity=t}dispose(){this.dispatchEvent({type:"dispose"})}copy(e,t){return super.copy(e,t),this.color.copy(e.color),this.intensity=e.intensity,this}toJSON(e){const t=super.toJSON(e);return t.object.color=this.color.getHex(),t.object.intensity=this.intensity,t}},ax=class extends Ys{constructor(e,t,n){super(e,n),this.isHemisphereLight=!0,this.type="HemisphereLight",this.position.copy(Yt.DEFAULT_UP),this.updateMatrix(),this.groundColor=new Xe(t)}copy(e,t){return super.copy(e,t),this.groundColor.copy(e.groundColor),this}toJSON(e){const t=super.toJSON(e);return t.object.groundColor=this.groundColor.getHex(),t}},Zd=new _t,Mg=new k,wg=new k,R0=class{constructor(e){this.camera=e,this.intensity=1,this.bias=0,this.biasNode=null,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new ye(512,512),this.mapType=ts,this.map=null,this.mapPass=null,this.matrix=new _t,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new fo,this._frameExtents=new ye(1,1),this._viewportCount=1,this._viewports=[new tn(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(e){const t=this.camera,n=this.matrix;Mg.setFromMatrixPosition(e.matrixWorld),t.position.copy(Mg),wg.setFromMatrixPosition(e.target.matrixWorld),t.lookAt(wg),t.updateMatrixWorld(),Zd.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),this._frustum.setFromProjectionMatrix(Zd,t.coordinateSystem,t.reversedDepth),t.coordinateSystem===2001||t.reversedDepth?n.set(.5,0,0,.5,0,.5,0,.5,0,0,1,0,0,0,0,1):n.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),n.multiply(Zd)}getViewport(e){return this._viewports[e]}getFrameExtents(){return this._frameExtents}dispose(){this.map&&this.map.dispose(),this.mapPass&&this.mapPass.dispose()}copy(e){return this.camera=e.camera.clone(),this.intensity=e.intensity,this.bias=e.bias,this.radius=e.radius,this.autoUpdate=e.autoUpdate,this.needsUpdate=e.needsUpdate,this.normalBias=e.n
vendor: 5,511 bytes, line 13
13ormalBias,this.blurSamples=e.blurSamples,this.mapSize.copy(e.mapSize),this.biasNode=e.biasNode,this}clone(){return new this.constructor().copy(this)}toJSON(){const e={};return this.intensity!==1&&(e.intensity=this.intensity),this.bias!==0&&(e.bias=this.bias),this.normalBias!==0&&(e.normalBias=this.normalBias),this.radius!==1&&(e.radius=this.radius),(this.mapSize.x!==512||this.mapSize.y!==512)&&(e.mapSize=this.mapSize.toArray()),e.camera=this.camera.toJSON(!1).object,delete e.camera.matrix,e}},mh=new k,gh=new hi,Er=new k,nf=class extends Yt{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new _t,this.projectionMatrix=new _t,this.projectionMatrixInverse=new _t,this.coordinateSystem=Ws,this._reversedDepth=!1}get reversedDepth(){return this._reversedDepth}copy(e,t){return super.copy(e,t),this.matrixWorldInverse.copy(e.matrixWorldInverse),this.projectionMatrix.copy(e.projectionMatrix),this.projectionMatrixInverse.copy(e.projectionMatrixInverse),this.coordinateSystem=e.coordinateSystem,this}getWorldDirection(e){return super.getWorldDirection(e).negate()}updateMatrixWorld(e){super.updateMatrixWorld(e),this.matrixWorld.decompose(mh,gh,Er),Er.x===1&&Er.y===1&&Er.z===1?this.matrixWorldInverse.copy(this.matrixWorld).invert():this.matrixWorldInverse.compose(mh,gh,Er.set(1,1,1)).invert()}updateWorldMatrix(e,t,n=!1){super.updateWorldMatrix(e,t,n),this.matrixWorld.decompose(mh,gh,Er),Er.x===1&&Er.y===1&&Er.z===1?this.matrixWorldInverse.copy(this.matrixWorld).invert():this.matrixWorldInverse.compose(mh,gh,Er.set(1,1,1)).invert()}clone(){return new this.constructor().copy(this)}},Us=new k,Eg=new ye,Tg=new ye,kn=class extends nf{constructor(e=50,t=1,n=.1,i=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=e,this.zoom=1,this.near=n,this.far=i,this.focus=10,this.aspect=t,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.fov=e.fov,this.zoom=e.zoom,this.near=e.near,this.far=e.far,this.focus=e.focus,this.aspect=e.aspect,this.view=e.view===null?null:Object.assign({},e.view),this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this}setFocalLength(e){const t=.5*this.getFilmHeight()/e;this.fov=Cl*2*Math.atan(t),this.updateProjectionMatrix()}getFocalLength(){const e=Math.tan(ho*.5*this.fov);return .5*this.getFilmHeight()/e}getEffectiveFOV(){return Cl*2*Math.atan(Math.tan(ho*.5*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}getViewBounds(e,t,n){Us.set(-1,-1,.5).applyMatrix4(this.projectionMatrixInverse),t.set(Us.x,Us.y).multiplyScalar(-e/Us.z),Us.set(1,1,.5).applyMatrix4(this.projectionMatrixInverse),n.set(Us.x,Us.y).multiplyScalar(-e/Us.z)}getViewSize(e,t){return this.getViewBounds(e,Eg,Tg),t.subVectors(Tg,Eg)}setViewOffset(e,t,n,i,r,o){this.aspect=e/t,this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=n,this.view.offsetY=i,this.view.width=r,this.view.height=o,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=this.near;let t=e*Math.tan(ho*.5*this.fov)/this.zoom,n=2*t,i=this.aspect*n,r=-.5*i;const o=this.view;if(this.view!==null&&this.view.enabled){const u=o.fullWidth,h=o.fullHeight;r+=o.offsetX*i/u,t-=o.offsetY*n/h,i*=o.width/u,n*=o.height/h}const l=this.filmOffset;l!==0&&(r+=e*l/this.getFilmWidth()),this.projectionMatrix.makePerspective(r,r+i,t,t-n,e,this.far,this.coordinateSystem,this.reversedDepth),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const t=super.toJSON(e);return t.object.fov=this.fov,t.object.zoom=this.zoom,t.object.near=this.near,t.object.far=this.far,t.object.focus=this.focus,t.object.aspect=this.aspect,this.view!==null&&(t.object.view=Object.assign({},this.view)),t.object.filmGauge=this.filmGauge,t.object.filmOffset=this.filmOffset,t}},Rw=class extends R0{constructor(){super(new kn(50,1,.5,500)),this.isSpotLightShadow=!0,this.focus=1,this.aspect=1}updateMatrices(e){const t=this.camera,n=Cl*2*e.angle*this.focus,i=this.mapSize.width/this.mapSize.height*this.aspect,r=e.distance||t.far;(n!==t.fov||i!==t.aspect||r!==t.far)&&(t.fov=n,t.aspect=i,t.far=r,t.updateProjectionMatrix()),super.updateMatrices(e)}copy(e){return super.copy(e),this.focus=e.focus,this}},ox=class extends Ys{constructor(e,t,n=0,i=Math.PI/3,r=0,o=2){super(e,t),this.isSpotLight=!0,this.type="SpotLight",this.position.copy(Yt.DEFAULT_UP),this.updateMatrix(),this.target=new Yt,this.distance=n,this.angle=i,this.penumbra=r,this.decay=o,this.map=null,this.shadow=new Rw}get power(){return this.intensity*Math.PI}set power(e){this.intensity=e/Math.PI}dispose(){super.dispose(),this.shadow.dispose()}copy(e,t){return super.copy(e,t),this.distance=e.distance,this.angle=e.angle,this.penumbra=e.penumbra,this.decay=e.decay,this.target=e.target.clone(),this.map=e.map,this.shadow=e.shadow.clone(),this}toJSON(e){const t=super.toJSON(e);return t.object.distance=this.distance,t.object.angle=this.angle,t.object.decay=this.decay,t.object.penumbra=this.penumbra,t.object.target=this.target.uuid,this.map&&this.map.isTexture&&(t.object.map=this.map.toJSON(e).uuid),t.object.shadow=this.shadow.toJSON(),t}},Iw=class extends R0{constructor(){super(new kn(90,1,.5,500)),this.isPointLightShadow=!0}
vendor: 4,406 bytes, line 13
13},lx=class extends Ys{constructor(e,t,n=0,i=2){super(e,t),this.isPointLight=!0,this.type="PointLight",this.distance=n,this.decay=i,this.shadow=new Iw}get power(){return this.intensity*4*Math.PI}set power(e){this.intensity=e/(4*Math.PI)}dispose(){super.dispose(),this.shadow.dispose()}copy(e,t){return super.copy(e,t),this.distance=e.distance,this.decay=e.decay,this.shadow=e.shadow.clone(),this}toJSON(e){const t=super.toJSON(e);return t.object.distance=this.distance,t.object.decay=this.decay,t.object.shadow=this.shadow.toJSON(),t}},Fl=class extends nf{constructor(e=-1,t=1,n=1,i=-1,r=.1,o=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=e,this.right=t,this.top=n,this.bottom=i,this.near=r,this.far=o,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.near=e.near,this.far=e.far,this.zoom=e.zoom,this.view=e.view===null?null:Object.assign({},e.view),this}setViewOffset(e,t,n,i,r,o){this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=n,this.view.offsetY=i,this.view.width=r,this.view.height=o,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=(this.right-this.left)/(2*this.zoom),t=(this.top-this.bottom)/(2*this.zoom),n=(this.right+this.left)/2,i=(this.top+this.bottom)/2;let r=n-e,o=n+e,l=i+t,u=i-t;if(this.view!==null&&this.view.enabled){const h=(this.right-this.left)/this.view.fullWidth/this.zoom,f=(this.top-this.bottom)/this.view.fullHeight/this.zoom;r+=h*this.view.offsetX,o=r+h*this.view.width,l-=f*this.view.offsetY,u=l-f*this.view.height}this.projectionMatrix.makeOrthographic(r,o,l,u,this.near,this.far,this.coordinateSystem,this.reversedDepth),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const t=super.toJSON(e);return t.object.zoom=this.zoom,t.object.left=this.left,t.object.right=this.right,t.object.top=this.top,t.object.bottom=this.bottom,t.object.near=this.near,t.object.far=this.far,this.view!==null&&(t.object.view=Object.assign({},this.view)),t}},Pw=class extends R0{constructor(){super(new Fl(-5,5,5,-5,.5,500)),this.isDirectionalLightShadow=!0}},cx=class extends Ys{constructor(e,t){super(e,t),this.isDirectionalLight=!0,this.type="DirectionalLight",this.position.copy(Yt.DEFAULT_UP),this.updateMatrix(),this.target=new Yt,this.shadow=new Pw}dispose(){super.dispose(),this.shadow.dispose()}copy(e){return super.copy(e),this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}toJSON(e){const t=super.toJSON(e);return t.object.shadow=this.shadow.toJSON(),t.object.target=this.target.uuid,t}},ux=class extends Ys{constructor(e,t){super(e,t),this.isAmbientLight=!0,this.type="AmbientLight"}},hx=class extends Ys{constructor(e,t,n=10,i=10){super(e,t),this.isRectAreaLight=!0,this.type="RectAreaLight",this.width=n,this.height=i}get power(){return this.intensity*this.width*this.height*Math.PI}set power(e){this.intensity=e/(this.width*this.height*Math.PI)}copy(e){return super.copy(e),this.width=e.width,this.height=e.height,this}toJSON(e){const t=super.toJSON(e);return t.object.width=this.width,t.object.height=this.height,t}},I0=class{constructor(){this.isSphericalHarmonics3=!0,this.coefficients=[];for(let e=0;e<9;e++)this.coefficients.push(new k)}set(e){for(let t=0;t<9;t++)this.coefficients[t].copy(e[t]);return this}zero(){for(let e=0;e<9;e++)this.coefficients[e].set(0,0,0);return this}getAt(e,t){const n=e.x,i=e.y,r=e.z,o=this.coefficients;return t.copy(o[0]).multiplyScalar(.282095),t.addScaledVector(o[1],.488603*i),t.addScaledVector(o[2],.488603*r),t.addScaledVector(o[3],.488603*n),t.addScaledVector(o[4],1.092548*(n*i)),t.addScaledVector(o[5],1.092548*(i*r)),t.addScaledVector(o[6],.315392*(3*r*r-1)),t.addScaledVector(o[7],1.092548*(n*r)),t.addScaledVector(o[8],.546274*(n*n-i*i)),t}getIrradianceAt(e,t){const n=e.x,i=e.y,r=e.z,o=this.coefficients;return t.copy(o[0]).multiplyScalar(.886227),t.addScaledVector(o[1],2*.511664*i),t.addScaledVector(o[2],2*.511664*r),t.addScaledVector(o[3],2*.511664*n),t.addScaledVector(o[4],2*.429043*n*i),t.addScaledVector(o[5],2*.429043*i*r),t.addScaledVector(o[6],.743125*r*r-.247708),t.addScaledVector(o[7
vendor: 8,919 bytes, line 13
13],2*.429043*n*r),t.addScaledVector(o[8],.429043*(n*n-i*i)),t}add(e){for(let t=0;t<9;t++)this.coefficients[t].add(e.coefficients[t]);return this}addScaledSH(e,t){for(let n=0;n<9;n++)this.coefficients[n].addScaledVector(e.coefficients[n],t);return this}scale(e){for(let t=0;t<9;t++)this.coefficients[t].multiplyScalar(e);return this}lerp(e,t){for(let n=0;n<9;n++)this.coefficients[n].lerp(e.coefficients[n],t);return this}equals(e){for(let t=0;t<9;t++)if(!this.coefficients[t].equals(e.coefficients[t]))return!1;return!0}copy(e){return this.set(e.coefficients)}clone(){return new this.constructor().copy(this)}fromArray(e,t=0){const n=this.coefficients;for(let i=0;i<9;i++)n[i].fromArray(e,t+i*3);return this}toArray(e=[],t=0){const n=this.coefficients;for(let i=0;i<9;i++)n[i].toArray(e,t+i*3);return e}static getBasisAt(e,t){const n=e.x,i=e.y,r=e.z;t[0]=.282095,t[1]=.488603*i,t[2]=.488603*r,t[3]=.488603*n,t[4]=1.092548*n*i,t[5]=1.092548*i*r,t[6]=.315392*(3*r*r-1),t[7]=1.092548*n*r,t[8]=.546274*(n*n-i*i)}},fx=class extends Ys{constructor(e=new I0,t=1){super(void 0,t),this.isLightProbe=!0,this.sh=e}copy(e){return super.copy(e),this.sh.copy(e.sh),this}toJSON(e){const t=super.toJSON(e);return t.object.sh=this.sh.toArray(),t}},Cg={},dx=class px extends Mi{constructor(t){super(t),this.textures={}}load(t,n,i,r){const o=this,l=new os(o.manager);l.setPath(o.path),l.setRequestHeader(o.requestHeader),l.setWithCredentials(o.withCredentials),l.load(t,function(u){try{n(o.parse(JSON.parse(u)))}catch(h){r?r(h):rt(h),o.manager.itemError(t)}},i,r)}parse(t){const n=this.createMaterialFromType(t.type);return n.fromJSON(t,this.textures),n}setTextures(t){return this.textures=t,this}createMaterialFromType(t){return px.createMaterialFromType(t)}static createMaterialFromType(t){const n={ShadowMaterial:H2,SpriteMaterial:o0,RawShaderMaterial:b0,ShaderMaterial:Si,PointsMaterial:c0,MeshPhysicalMaterial:X2,MeshStandardMaterial:S0,MeshPhongMaterial:q2,MeshToonMaterial:Y2,MeshNormalMaterial:$2,MeshLambertMaterial:Z2,MeshDepthMaterial:M0,MeshDistanceMaterial:w0,MeshBasicMaterial:qs,MeshMatcapMaterial:J2,LineDashedMaterial:K2,LineBasicMaterial:fi,Material:Wn,...Cg}[t];let i;return n===void 0?(Gs(`MaterialLoader: Unknown material type "${t}". Use .registerMaterial() before starting the deserialization process.`),i=new Wn):i=new n,i}static registerMaterial(t,n){Cg[t]=n}},Ap=class{static extractUrlBase(e){const t=e.lastIndexOf("/");return t===-1?"./":e.slice(0,t+1)}static resolveURL(e,t){return typeof e!="string"||e===""?"":(/^https?:\/\//i.test(t)&&/^\//.test(e)&&(t=t.replace(/(^https?:\/\/[^\/]+).*/i,"$1")),/^(https?:)?\/\//i.test(e)||/^data:.*,.*$/i.test(e)||/^blob:.*$/i.test(e)?e:t+e)}},mx=class extends At{constructor(){super(),this.isInstancedBufferGeometry=!0,this.type="InstancedBufferGeometry",this.instanceCount=1/0}copy(e){return super.copy(e),this.instanceCount=e.instanceCount,this}toJSON(){const e=super.toJSON();return e.instanceCount=this.instanceCount,e.isInstancedBufferGeometry=!0,e}},gx=class extends Mi{constructor(e){super(e)}load(e,t,n,i){const r=this,o=new os(r.manager);o.setPath(r.path),o.setRequestHeader(r.requestHeader),o.setWithCredentials(r.withCredentials),o.load(e,function(l){try{t(r.parse(JSON.parse(l)))}catch(u){i?i(u):rt(u),r.manager.itemError(e)}},n,i)}parse(e){const t={},n={};function i(g,m){if(t[m]!==void 0)return t[m];const v=g.interleavedBuffers[m],b=r(g,v.buffer),w=Sl(v.type,b),S=new Zh(w,v.stride);return S.uuid=v.uuid,t[m]=S,S}function r(g,m){if(n[m]!==void 0)return n[m];const v=g.arrayBuffers[m],b=new Uint32Array(v).buffer;return n[m]=b,b}const o=e.isInstancedBufferGeometry?new mx:new At,l=e.data.index;if(l!==void 0){const g=Sl(l.type,l.array);o.setIndex(new Jt(g,1))}const u=e.data.attributes;for(const g in u){const m=u[g];let v;if(m.isInterleavedBufferAttribute){const b=i(e.data,m.data);v=new zc(b,m.itemSize,m.offset,m.normalized)}else{const b=Sl(m.type,m.array);v=new(m.isInstancedBufferAttribute?Rl:Jt)(b,m.itemSize,m.normalized)}m.name!==void 0&&(v.name=m.name),m.usage!==void 0&&v.setUsage(m.usage),o.setAttribute(g,v)}const h=e.data.morphAttributes;if(h)for(const g in h){const m=h[g],v=[];for(let b=0,w=m.length;b<w;b++){const S=m[b];let _;if(S.isInterleavedBufferAttribute){const C=i(e.data,S.data);_=new zc(C,S.itemSize,S.offset,S.normalized)}else{const C=Sl(S.type,S.array);_=new Jt(C,S.itemSize,S.normalized)}S.name!==void 0&&(_.name=S.name),v.push(_)}o.morphAttributes[g]=v}e.data.morphTargetsRelative&&(o.morphTargetsRelative=!0);const f=e.data.groups||e.data.drawcalls||e.data.offsets;if(f!==void 0)for(let g=0,m=f.length;g!==m;++g){const v=f[g];o.addGroup(v.start,v.count,v.materialIndex)}const p=e.data.boundingSphere;return p!==void 0&&(o.boundingSphere=new Hn().fromJSON(p)),e.name&&(o.name=e.name),e.userData&&(o.userData=e.userData),o}},Jd={},Nw=class extends Mi{constructor(e){super(e)}load(e,t,n,i){const r=this,o=this.path===""?Ap.extractUrlBase(e):this.path;this.resourcePath=this.resourcePath||o;const l=new os(this.manager);l.setPath(this.path),l.setRequestHeader(this.requestHeader),l.setWithCredentials(this.withCredentials),l.load(e,function(u){let h=null;try{h=JSON.parse(u)}catch(p){i!==void 0&&i(p),rt("ObjectLoader: Can't parse "+e+".",p.message);return}const f=h.metadata;if(f===void 0||f.type===void 0||f.type.toLowerCase()==="geometry"){i!==void 0&&i(new Error("THREE.ObjectLoader: Can't load "+e)),rt("ObjectLoader: Can't load "+e);return}r.parse(h,t)},n,i)}async loadAsync(e,t){const n=this,i=this.path===""?Ap.extractUrlBase(e):this.path;this.resourcePath=this.resourcePath||i;const r=new os(this.manager);r.setPath(this.path),r.setRequestHeader(this.requestHeader),r.setWithCredentials(this.withCredentials);const o=await r.loadAsync(e,t);let l;try{l=JSON.parse(o)}catch(h){throw new Error("THREE.ObjectLoader: Can't parse "+e+". "+h.message)}const u=l.metadata;if(u===void 0||u.type===void 0||u.type.toLowerCase()==="geometry")throw new Error("THREE.ObjectLoader: Can't load "+e);return await n.parseAsync(l)}parse(e,t){const n=this.parseAnimations(e.animations),i=this.parseShapes(e.shapes),r=this.parseGeometries(e.geometries,i),o=this.parseImages(e.images,function(){t!==void 0&&t(h)}),l=this.parseTextures(e.textures,o),u=this.parseMaterials(e.materials,l),h=this.parseObject(e.object,r,u,l,n),f=this.parseSkeletons(e.skeletons,h);if(this.bindSkeletons(h,f),this.bindLightTargets(h),t!==void 0){let p=!1;for(const g in o)if(o[g].data instanceof HTMLImageElement){p=!0;break}p===!1&&t(h)}return h}async parseAsync(e){const t=this.parseAnimations(e.animations),n=this.parseShapes(e.shapes),i=this.parseGeometries(e.geometries,n),r=await this.parseImagesAsync(e.images),o=this.parseTextures(e.textures,r),l=this.parseMaterials(e.materials,o),u=this.parseObject(e.object,i,l,o,t),h=this.parseSkeletons(e.skeletons,u);return this.bindSkeletons(u,h),this.bindLightTargets(u),u}static registerGeometry(e,t){Jd[e]=t}parseShapes(e){const t={};if(e!==void 0)for(let n=0,i=e.length;n<i;n++){const r=new Jc().fromJSON(e[n]);t[r.uuid]=r}return t}parseSkeletons(e,t){const n={},i={};if(t.traverse(function(r){r.isBone&&(i[r.uuid]=r)}),e!==void 0)for(let r=0,o=e.length;r<o;r++){const l=new Wy().fromJSON(e[r],i);n[l.uuid]=l}return n}parseGeometries(e,t){const n={};if(e!==void 0){const i=new gx;for(let r=0,o=e.length;r<o;r++){let l;const u=e[r];switch(u.type){case"BufferGeometry":case"InstancedBufferGeometry":l=i.parse(u);break;default:u.type in _g?l=_g[u.type].fromJSON(u,t):u.type in Jd?l=Jd[u.type].fromJSON(u,t):Ue(`ObjectLoader: Unknown geometry type "${u.type}". Use .registerGeometry() before starting the deserialization process.`)}l.uuid=u.uuid,u.name!==void 0&&(l.name=u.name),u.userData!==void 0&&(l.userData=u.userData),n[u.uuid]=l}}return n}parseMaterials(e,t){const n={},i={};if(e!==void 0){const r=new dx;r.setTextures(t);for(let o=0,l=e.length;o<l;o++){const u=e[o];n[u.uuid]===void 0&&(n[u.uuid]=r.parse(u)),i[u.uuid]=n[u.uuid]}}return i}parseAnimations(e){const t={};if(e!==void 0)for(let n=0;n<e.length;n++){const i=e[n],r=jc.parse(i);t[r.uuid]=r}return t}parseImages(e,t){const n=this,i={};let r;function o(u){return u=n.manager.resolveURL(u),n.manager.itemStart(u),r.load(u,function(){n.manager.itemEnd(u)},void 0,function(){n.manager.itemError(u),n.manager.itemEnd(u)})}function l(u){if(typeof u=="string"){const h=u;return o(/^(\/\/)|([a-z]+:(\/\/)?)/i.test(h)?h:n.resourcePath+h)}else return u.data?{data:Sl(u.type,u.data),width:u.width,height:u.height}:null}if(e!==void 0&&e.length>0){const u=new A0(t);r=new Xc(u),r.setCrossOrigin(this.crossOrigin);for(let h=0,f=e.length;h<f;h++){const p=e[h],g=p.url;if(Array.isArray(g)){const m=[];for(let v=0,b=g.length;v<b;v++){const w=g[v],S=l(w);S!==null&&(S instanceof HTMLImageElement?m.push(S):m.push(new $i(S.data,S.width,S.height)))}i[p.uuid]=new zs(m)}else{const m=l(p.url);i[p.uuid]=new zs(m)}}}return i}async parseImagesAsync(e){const t=this,n={};let i;
vendor: 9,997 bytes, line 13
13async function r(o){if(typeof o=="string"){const l=o,u=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(l)?l:t.resourcePath+l;return await i.loadAsync(u)}else return o.data?{data:Sl(o.type,o.data),width:o.width,height:o.height}:null}if(e!==void 0&&e.length>0){i=new Xc(this.manager),i.setCrossOrigin(this.crossOrigin);for(let o=0,l=e.length;o<l;o++){const u=e[o],h=u.url;if(Array.isArray(h)){const f=[];for(let p=0,g=h.length;p<g;p++){const m=h[p],v=await r(m);v!==null&&(v instanceof HTMLImageElement?f.push(v):f.push(new $i(v.data,v.width,v.height)))}n[u.uuid]=new zs(f)}else{const f=await r(u.url);n[u.uuid]=new zs(f)}}}return n}parseTextures(e,t){function n(r,o){return typeof r=="number"?r:(Ue("ObjectLoader.parseTexture: Constant should be in numeric form.",r),o[r])}const i={};if(e!==void 0)for(let r=0,o=e.length;r<o;r++){const l=e[r];l.image===void 0&&Ue('ObjectLoader: No "image" specified for',l.uuid),t[l.image]===void 0&&Ue("ObjectLoader: Undefined image",l.image);const u=t[l.image],h=u.data;let f;Array.isArray(h)?(f=new $c,h.length===6&&(f.needsUpdate=!0)):(h&&h.data?f=new $i:f=new Ln,h&&(f.needsUpdate=!0)),f.source=u,f.uuid=l.uuid,l.name!==void 0&&(f.name=l.name),l.mapping!==void 0&&(f.mapping=n(l.mapping,Lw)),l.channel!==void 0&&(f.channel=l.channel),l.offset!==void 0&&f.offset.fromArray(l.offset),l.repeat!==void 0&&f.repeat.fromArray(l.repeat),l.center!==void 0&&f.center.fromArray(l.center),l.rotation!==void 0&&(f.rotation=l.rotation),l.wrap!==void 0&&(f.wrapS=n(l.wrap[0],Ag),f.wrapT=n(l.wrap[1],Ag)),l.format!==void 0&&(f.format=l.format),l.internalFormat!==void 0&&(f.internalFormat=l.internalFormat),l.type!==void 0&&(f.type=l.type),l.colorSpace!==void 0&&(f.colorSpace=l.colorSpace),l.minFilter!==void 0&&(f.minFilter=n(l.minFilter,Rg)),l.magFilter!==void 0&&(f.magFilter=n(l.magFilter,Rg)),l.anisotropy!==void 0&&(f.anisotropy=l.anisotropy),l.flipY!==void 0&&(f.flipY=l.flipY),l.generateMipmaps!==void 0&&(f.generateMipmaps=l.generateMipmaps),l.premultiplyAlpha!==void 0&&(f.premultiplyAlpha=l.premultiplyAlpha),l.unpackAlignment!==void 0&&(f.unpackAlignment=l.unpackAlignment),l.compareFunction!==void 0&&(f.compareFunction=l.compareFunction),l.normalized!==void 0&&(f.normalized=l.normalized),l.userData!==void 0&&(f.userData=l.userData),i[l.uuid]=f}return i}parseObject(e,t,n,i,r){let o;function l(g){return t[g]===void 0&&Ue("ObjectLoader: Undefined geometry",g),t[g]}function u(g){if(g!==void 0){if(Array.isArray(g)){const m=[];for(let v=0,b=g.length;v<b;v++){const w=g[v];n[w]===void 0&&Ue("ObjectLoader: Undefined material",w),m.push(n[w])}return m}return n[g]===void 0&&Ue("ObjectLoader: Undefined material",g),n[g]}}function h(g){return i[g]===void 0&&Ue("ObjectLoader: Undefined texture",g),i[g]}let f,p;switch(e.type){case"Scene":o=new r0,e.background!==void 0&&(Number.isInteger(e.background)?o.background=new Xe(e.background):o.background=h(e.background)),e.environment!==void 0&&(o.environment=h(e.environment)),e.fog!==void 0&&(e.fog.type==="Fog"?o.fog=new Oy(e.fog.color,e.fog.near,e.fog.far):e.fog.type==="FogExp2"&&(o.fog=new Dy(e.fog.color,e.fog.density)),e.fog.name!==""&&(o.fog.name=e.fog.name)),e.backgroundBlurriness!==void 0&&(o.backgroundBlurriness=e.backgroundBlurriness),e.backgroundIntensity!==void 0&&(o.backgroundIntensity=e.backgroundIntensity),e.backgroundRotation!==void 0&&o.backgroundRotation.fromArray(e.backgroundRotation),e.environmentIntensity!==void 0&&(o.environmentIntensity=e.environmentIntensity),e.environmentRotation!==void 0&&o.environmentRotation.fromArray(e.environmentRotation);break;case"PerspectiveCamera":o=new kn(e.fov,e.aspect,e.near,e.far),e.focus!==void 0&&(o.focus=e.focus),e.zoom!==void 0&&(o.zoom=e.zoom),e.filmGauge!==void 0&&(o.filmGauge=e.filmGauge),e.filmOffset!==void 0&&(o.filmOffset=e.filmOffset),e.view!==void 0&&(o.view=Object.assign({},e.view));break;case"OrthographicCamera":o=new Fl(e.left,e.right,e.top,e.bottom,e.near,e.far),e.zoom!==void 0&&(o.zoom=e.zoom),e.view!==void 0&&(o.view=Object.assign({},e.view));break;case"AmbientLight":o=new ux(e.color,e.intensity);break;case"DirectionalLight":o=new cx(e.color,e.intensity),o.target=e.target||"";break;case"PointLight":o=new lx(e.color,e.intensity,e.distance,e.decay);break;case"RectAreaLight":o=new hx(e.color,e.intensity,e.width,e.height);break;case"SpotLight":o=new ox(e.color,e.intensity,e.distance,e.angle,e.penumbra,e.decay),o.target=e.target||"";break;case"HemisphereLight":o=new ax(e.color,e.groundColor,e.intensity);break;case"LightProbe":const g=new I0().fromArray(e.sh);o=new fx(g,e.intensity);break;case"SkinnedMesh":f=l(e.geometry),p=u(e.material),o=new Hy(f,p),e.bindMode!==void 0&&(o.bindMode=e.bindMode),e.bindMatrix!==void 0&&o.bindMatrix.fromArray(e.bindMatrix),e.skeleton!==void 0&&(o.skeleton=e.skeleton);break;case"Mesh":f=l(e.geometry),p=u(e.material),o=new Cn(f,p);break;case"InstancedMesh":f=l(e.geometry),p=u(e.material);const m=e.count,v=e.instanceMatrix,b=e.instanceColor;o=new Xy(f,p,m),o.instanceMatrix=new Rl(new Float32Array(v.array),16),b!==void 0&&(o.instanceColor=new Rl(new Float32Array(b.array),b.itemSize));break;case"BatchedMesh":f=l(e.geometry),p=u(e.material),o=new $y(e.maxInstanceCount,e.maxVertexCount,e.maxIndexCount,p),o.geometry=f,o.perObjectFrustumCulled=e.perObjectFrustumCulled,o.sortObjects=e.sortObjects,o._drawRanges=e.drawRanges,o._reservedRanges=e.reservedRanges,o._geometryInfo=e.geometryInfo.map(w=>{let S=null,_=null;return w.boundingBox!==void 0&&(S=new ti().fromJSON(w.boundingBox)),w.boundingSphere!==void 0&&(_=new Hn().fromJSON(w.boundingSphere)),{...w,boundingBox:S,boundingSphere:_}}),o._instanceInfo=e.instanceInfo,o._availableInstanceIds=e._availableInstanceIds,o._availableGeometryIds=e._availableGeometryIds,o._nextIndexStart=e.nextIndexStart,o._nextVertexStart=e.nextVertexStart,o._geometryCount=e.geometryCount,o._maxInstanceCount=e.maxInstanceCount,o._maxVertexCount=e.maxVertexCount,o._maxIndexCount=e.maxIndexCount,o._geometryInitialized=e.geometryInitialized,o._matricesTexture=h(e.matricesTexture.uuid),o._indirectTexture=h(e.indirectTexture.uuid),e.colorsTexture!==void 0&&(o._colorsTexture=h(e.colorsTexture.uuid)),e.boundingSphere!==void 0&&(o.boundingSphere=new Hn().fromJSON(e.boundingSphere)),e.boundingBox!==void 0&&(o.boundingBox=new ti().fromJSON(e.boundingBox));break;case"LOD":o=new Gy;break;case"Line":o=new Xs(l(e.geometry),u(e.material));break;case"LineLoop":o=new Zy(l(e.geometry),u(e.material));break;case"LineSegments":o=new Ar(l(e.geometry),u(e.material));break;case"PointCloud":case"Points":o=new Jy(l(e.geometry),u(e.material));break;case"Sprite":o=new Vy(u(e.material));break;case"Group":o=new Ml;break;case"Bone":o=new l0;break;default:o=new Yt}if(o.uuid=e.uuid,e.name!==void 0&&(o.name=e.name),e.matrix!==void 0?(o.matrix.fromArray(e.matrix),e.matrixAutoUpdate!==void 0&&(o.matrixAutoUpdate=e.matrixAutoUpdate),o.matrixAutoUpdate&&o.matrix.decompose(o.position,o.quaternion,o.scale)):(e.position!==void 0&&o.position.fromArray(e.position),e.rotation!==void 0&&o.rotation.fromArray(e.rotation),e.quaternion!==void 0&&o.quaternion.fromArray(e.quaternion),e.scale!==void 0&&o.scale.fromArray(e.scale)),e.up!==void 0&&o.up.fromArray(e.up),e.pivot!==void 0&&(o.pivot=new k().fromArray(e.pivot)),e.morphTargetDictionary!==void 0&&(o.morphTargetDictionary=Object.assign({},e.morphTargetDictionary)),e.morphTargetInfluences!==void 0&&(o.morphTargetInfluences=e.morphTargetInfluences.slice()),e.castShadow!==void 0&&(o.castShadow=e.castShadow),e.receiveShadow!==void 0&&(o.receiveShadow=e.receiveShadow),e.shadow&&(e.shadow.intensity!==void 0&&(o.shadow.intensity=e.shadow.intensity),e.shadow.bias!==void 0&&(o.shadow.bias=e.shadow.bias),e.shadow.normalBias!==void 0&&(o.shadow.normalBias=e.shadow.normalBias),e.shadow.radius!==void 0&&(o.shadow.radius=e.shadow.radius),e.shadow.mapSize!==void 0&&o.shadow.mapSize.fromArray(e.shadow.mapSize),e.shadow.camera!==void 0&&(o.shadow.camera=this.parseObject(e.shadow.camera))),e.visible!==void 0&&(o.visible=e.visible),e.frustumCulled!==void 0&&(o.frustumCulled=e.frustumCulled),e.renderOrder!==void 0&&(o.renderOrder=e.renderOrder),e.static!==void 0&&(o.static=e.static),e.userData!==void 0&&(o.userData=e.userData),e.layers!==void 0&&(o.layers.mask=e.layers),e.children!==void 0){const g=e.children;for(let m=0;m<g.length;m++)o.add(this.parseObject(g[m],t,n,i,r))}if(e.animations!==void 0){const g=e.animations;for(let m=0;m<g.length;m++){const v=g[m];o.animations.push(r[v])}}if(e.type==="LOD"){e.autoUpdate!==void 0&&(o.autoUpdate=e.autoUpdate);const g=e.levels;for(let m=0;m<g.length;m++){const v=g[m],b=o.getObjectByProperty("uuid",v.object);b!==void 0&&o.addLevel(b,v.distance,v.hysteresis)}}return o}bindSkeletons(e,t){Object.keys(t).length!==0&&e.traverse(function(n){if(n.isSkinnedMesh===!0&&n.skeleton!==void 0){const i=t[n.skeleton];i===void 0?Ue("ObjectLoader: No skeleton found with UUID:",n.skeleton):n.bind(i,n.bindMatrix)}})}bindLightTargets(e){e.traverse(function(t){if(t.isDirectionalLight||t.isSpotLight){const n=t.target,i=e.getObjectByProperty("uuid",n);i!==void 0?t.target=i:t.target=new Yt}})}},Lw={UVMapping:300,CubeReflectionMapping:301,CubeRefractionMapping:302,EquirectangularReflectionMapping:303,EquirectangularRefractionMapping:304,CubeUVReflectionMapping:306},Ag={RepeatWrapping:Ic,ClampToEdgeWrapping:bi,MirroredRepeatWrapping:Pc},Rg={NearestFilter:In,NearestMipmapNearestFilter:Wp,NearestMipmapLinearFilter:jp,LinearFilter:mn,LinearMipmapNearestFilter:Xp,LinearMipmapLinearFilter:Ll},Kd=new WeakMap,Dw=class extends Mi{constructor(e){super(e),this.isImageBitmapLoader=!0,typeof createImageBitmap>"u"&&Ue("ImageBitmapLoader: createImageBitmap() not supported."),typeof fetch>"u"&&Ue("ImageBitmapLoader: fetch() not supported."),this.options={premultiplyAlpha:"none"},this._abortController=new AbortController}setOptions(e){return this.options=e,this}load(e,t,n,i){e===void 0&&(e=""),this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const r=this,o=Cr.get(`image-bitmap:${e}`);
13if(o!==void 0){if(r.manager.itemStart(e),o.then){o.then(h=>{Kd.has(o)===!0?(i&&i(Kd.get(o)),r.manager.itemError(e),r.manager.itemEnd(e)):(t&&t(h),r.manager.itemEnd(e))});return}setTimeout(function(){t&&t(o),r.manager.itemEnd(e)},0);return}const l={};l.credentials=this.crossOrigin==="anonymous"?"same-origin":"include",l.headers=this.requestHeader,l.signal=typeof AbortSignal.any=="function"?AbortSignal.any([this._abortController.signal,this.manager.abortController.signal]):this._abortController.signal;const u=fetch(e,l).then(function(h){return h.blob()}).then(function(h){return createImageBitmap(h,Object.assign(r.options,{colorSpaceConversion:"none"}))}).then(function(h){Cr.add(`image-bitmap:${e}`,h),t&&t(h),r.manager.itemEnd(e)}).catch(function(h){i&&i(h),Kd.set(u,h),Cr.remove(`image-bitmap:${e}`),r.manager.itemError(e),r.manager.itemEnd(e)});Cr.add(`image-bitmap:${e}`,u),r.manager.itemStart(e)}abort(){return this._abortController.abort(),this._abortController=new AbortController,this}},vh,P0=class{static getContext(){return vh===void 0&&(vh=new(window.AudioContext||window.webkitAudioContext)),vh}static setContext(e){vh=e}},Uw=class extends Mi{constructor(e){super(e)}load(e,t,n,i){const r=this,o=new os(this.manager);o.setResponseType("arraybuffer"),o.setPath(this.path),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(e,function(u){try{const h=u.slice(0),f=P0.getContext(),p=e+"#decode";r.manager.itemStart(p),f.decodeAudioData(h,function(g){t(g),r.manager.itemEnd(p)}).catch(function(g){l(g),r.manager.itemEnd(p)})}catch(h){l(h)}},n,i);function l(u){i?i(u):rt(u),r.manager.itemError(e)}}},Ig=new _t,Pg=new _t,Ka=new _t,Ow=class{constructor(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new kn,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new kn,this.cameraR.layers.enable(2),this.cameraR.matrixAutoUpdate=!1,this._cache={focus:null,fov:null,aspect:null,near:null,far:null,zoom:null,eyeSep:null}}update(e){const t=this._cache;if(t.focus!==e.focus||t.fov!==e.fov||t.aspect!==e.aspect*this.aspect||t.near!==e.near||t.far!==e.far||t.zoom!==e.zoom||t.eyeSep!==this.eyeSep){t.focus=e.focus,t.fov=e.fov,t.aspect=e.aspect*this.aspect,t.near=e.near,t.far=e.far,t.zoom=e.zoom,t.eyeSep=this.eyeSep,Ka.copy(e.projectionMatrix);const n=t.eyeSep/2,i=n*t.near/t.focus,r=t.near*Math.tan(ho*t.fov*.5)/t.zoom;let o,l;Pg.elements[12]=-n,Ig.elements[12]=n,o=-r*t.aspect+i,l=r*t.aspect+i,Ka.elements[0]=2*t.near/(l-o),Ka.elements[8]=(l+o)/(l-o),this.cameraL.projectionMatrix.copy(Ka),o=-r*t.aspect-i,l=r*t.aspect-i,Ka.elements[0]=2*t.near/(l-o),Ka.elements[8]=(l+o)/(l-o),this.cameraR.projectionMatrix.copy(Ka)}this.cameraL.matrix.copy(e.matrixWorld).multiply(Pg),this.cameraL.matrixWorldNeedsUpdate=!0,this.cameraR.matrix.copy(e.matrixWorld).multiply(Ig),this.cameraR.matrixWorldNeedsUpdate=!0}},fl=-90,dl=1,vx=class extends Yt{constructor(e,t,n){super(),this.type="CubeCamera",this.renderTarget=n,this.coordinateSystem=null,this.activeMipmapLevel=0;const i=new kn(fl,dl,e,t);i.layers=this.layers,this.add(i);const r=new kn(fl,dl,e,t);r.layers=this.layers,this.add(r);const o=new kn(fl,dl,e,t);o.layers=this.layers,this.add(o);const l=new kn(fl,dl,e,t);l.layers=this.layers,this.add(l);const u=new kn(fl,dl,e,t);u.layers=this.layers,this.add(u);const h=new kn(fl,dl,e,t);h.layers=this.layers,this.add(h)}updateCoordinateSystem(){const e=this.coordinateSystem,t=this.children.concat(),[n,i,r,o,l,u]=t;for(const h of t)this.remove(h);if(e===2e3)n.up.set(0,1,0),n.lookAt(1,0,0),i.up.set(0,1,0),i.lookAt(-1,0,0),r.up.set(0,0,-1),r.lookAt(0,1,0),o.up.set(0,0,1),o.lookAt(0,-1,0),l.up.set(0,1,0),l.lookAt(0,0,1),u.up.set(0,1,0),u.lookAt(0,0,-1);else if(e===2001)n.up.set(0,-1,0),n.lookAt(-1,0,0),i.up.set(0,-1,0),i.lookAt(1,0,0),r.up.set(0,0,1),r.lookAt(0,1,0),o.up.set(0,0,-1),o.lookAt(0,-1,0),l.up.set(0,-1,0),l.lookAt(0,0,1),u.up.set(0,-1,0),u.lookAt(0,0,-1);else throw new Error("THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: "+e);for(const h of t)this.add(h),h.updateMatrixWorld()}update(e,t){this.parent===null&&this.updateMatrixWorld();const{renderTarget:n,activeMipmapLevel:i}=this;this.coordinateSystem!==e.coordinateSystem&&(this.coordinateSystem=e.coordinateSystem,this.updateCoordinateSystem());const[r,o,l,u,h,f]=this.children,p=e.getRenderTarget(),g=e.getActiveCubeFace(),m=e.getActiveMipmapLevel(),v=e.xr.enabled;e.xr.enabled=!1;const b=n.texture.generateMipmaps;n.texture.generateMipmaps=!1;let w=!1;e.isWebGLRenderer===!0?w=e.state.buffers.depth.getReversed():w=e.reversedDepthBuffer,e.setRenderTarget(n,0,i),w&&e.autoClear===!1&&e.clearDepth(),e.render(t,r),e.setRenderTarget(n,1,i),w&&e.autoClear===!1&&e.clearDepth(),e.render(t,o),e.setRenderTarget(n,2,i),w&&e.autoClear===!1&&e.clearDepth(),e.render(t,l),e.setRenderTarget(n,3,i),w&&e.autoClear===!1&&e.clearDepth(),e.render(t,u),e.setRenderTarget(n,4,i),w&&e.autoClear===!1&&e.clearDepth(),e.render(t,h),n.texture.generateMipmaps=b,e.setRenderTarget(n,5,i),w&&e.autoClear===!1&&e.clearDepth(),e.render(t,f),e.setRenderTarget(p,g,m),e.xr.enabled=v,n.texture.needsPMREMUpdate=!0}},yx=class extends kn{constructor(e=[]){super(),this.isArrayCamera=!0,this.isMultiViewCamera=!1,this.cameras=e}},xx=class{constructor(){this._previousTime=0,this._currentTime=0,this._startTime=performance.now(),this._delta=0,this._elapsed=0,this._timescale=1,this._document=null,this._pageVisibilityHandler=null}connect(e){this._document=e,e.hidden!==void 0&&(this._pageVisibilityHandler=Fw.bind(this),e.addEventListener("visibilitychange",this._pageVisibilityHandler,!1))}disconnect(){this._pageVisibilityHandler!==null&&(this._document.removeEventListener("visibilitychange",this._pageVisibilityHandler),this._pageVisibilityHandler=null),this._document=null}getDelta(){return this._delta/1e3}getElapsed(){return this._elapsed/1e3}getTimescale(){return this._timescale}setTimescale(e){return this._timescale=e,this}reset(){return this._currentTime=performance.now()-this._startTime,this}dispose(){this.disconnect()}update(e){return this._pageVisibilityHandler!==null&&this._document.hidden===!0?this._delta=0:(this._previousTime=this._currentTime,this._currentTime=(e!==void 0?e:performance.now())-this._startTime,this._delta=(this._currentTime-this._previousTime)*this._timescale,this._elapsed+=this._delta),this}};function Fw(){this._document.hidden===!1&&this.reset()}var Qa=new k,Qd=new hi,kw=new k,eo=new k,to=new k,Bw=class extends Yt{constructor(){super(),this.type="AudioListener",this.context=P0.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null,this.timeDelta=0,this._timer=new xx}getInput(){return this.gain}removeFilter(){return this.filter!==null&&(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination),this.gain.connect(this.context.destination),this.filter=null),this}getFilter(){return this.filter}setFilter(e){return this.filter!==null?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)):this.gain.disconnect(this.context.destination),this.filter=e,this.gain.connect(this.filter),this.filter.connect(this.context.destination),this}getMasterVolume(){return this.gain.gain.value}setMasterVolume(e){return this.gain.gain.setTargetAtTime(e,this.context.currentTime,.01),this}updateMatrixWorld(e){super.updateMatrixWorld(e),this._timer.update(
vendor: 4,319 bytes, line 13
13);const t=this.context.listener;if(this.timeDelta=this._timer.getDelta(),this.matrixWorld.decompose(Qa,Qd,kw),eo.set(0,0,-1).applyQuaternion(Qd),to.set(0,1,0).applyQuaternion(Qd),t.positionX){const n=this.context.currentTime+this.timeDelta;t.positionX.linearRampToValueAtTime(Qa.x,n),t.positionY.linearRampToValueAtTime(Qa.y,n),t.positionZ.linearRampToValueAtTime(Qa.z,n),t.forwardX.linearRampToValueAtTime(eo.x,n),t.forwardY.linearRampToValueAtTime(eo.y,n),t.forwardZ.linearRampToValueAtTime(eo.z,n),t.upX.linearRampToValueAtTime(to.x,n),t.upY.linearRampToValueAtTime(to.y,n),t.upZ.linearRampToValueAtTime(to.z,n)}else t.setPosition(Qa.x,Qa.y,Qa.z),t.setOrientation(eo.x,eo.y,eo.z,to.x,to.y,to.z)}},_x=class extends Yt{constructor(e){super(),this.type="Audio",this.listener=e,this.context=e.context,this.gain=this.context.createGain(),this.gain.connect(e.getInput()),this.autoplay=!1,this.buffer=null,this.detune=0,this.loop=!1,this.loopStart=0,this.loopEnd=0,this.offset=0,this.duration=void 0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.source=null,this.sourceType="empty",this._startedAt=0,this._progress=0,this._connected=!1,this.filters=[]}getOutput(){return this.gain}setNodeSource(e){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=e,this.connect(),this}setMediaElementSource(e){return this.hasPlaybackControl=!1,this.sourceType="mediaNode",this.source=this.context.createMediaElementSource(e),this.connect(),this}setMediaStreamSource(e){return this.hasPlaybackControl=!1,this.sourceType="mediaStreamNode",this.source=this.context.createMediaStreamSource(e),this.connect(),this}setBuffer(e){return this.buffer=e,this.sourceType="buffer",this.autoplay&&this.play(),this}play(e=0){if(this.isPlaying===!0){Ue("Audio: Audio is already playing.");return}if(this.hasPlaybackControl===!1){Ue("Audio: this Audio has no playback control.");return}this._startedAt=this.context.currentTime+e;const t=this.context.createBufferSource();return t.buffer=this.buffer,t.loop=this.loop,t.loopStart=this.loopStart,t.loopEnd=this.loopEnd,t.onended=this.onEnded.bind(this),t.start(this._startedAt,this._progress+this.offset,this.duration),this.isPlaying=!0,this.source=t,this.setDetune(this.detune),this.setPlaybackRate(this.playbackRate),this.connect()}pause(){if(this.hasPlaybackControl===!1){Ue("Audio: this Audio has no playback control.");return}return this.isPlaying===!0&&(this._progress+=Math.max(this.context.currentTime-this._startedAt,0)*this.playbackRate,this.loop===!0&&(this._progress=this._progress%(this.duration||this.buffer.duration)),this.source.stop(),this.source.onended=null,this.isPlaying=!1),this}stop(e=0){if(this.hasPlaybackControl===!1){Ue("Audio: this Audio has no playback control.");return}return this._progress=0,this.source!==null&&(this.source.stop(this.context.currentTime+e),this.source.onended=null),this.isPlaying=!1,this}connect(){if(this.filters.length>0){this.source.connect(this.filters[0]);for(let e=1,t=this.filters.length;e<t;e++)this.filters[e-1].connect(this.filters[e]);this.filters[this.filters.length-1].connect(this.getOutput())}else this.source.connect(this.getOutput());return this._connected=!0,this}disconnect(){if(this._connected!==!1){if(this.filters.length>0){this.source.disconnect(this.filters[0]);for(let e=1,t=this.filters.length;e<t;e++)this.filters[e-1].disconnect(this.filters[e]);this.filters[this.filters.length-1].disconnect(this.getOutput())}else this.source.disconnect(this.getOutput());return this._connected=!1,this}}getFilters(){return this.filters}setFilters(e){return e||(e=[]),this._connected===!0?(this.disconnect(),this.filters=e.slice(),this.connect()):this.filters=e.slice(),this}setDetune(e){return this.detune=e,this.isPlaying===!0&&this.source.detune!==void 0&&this.source.detune.setTargetAtTime(this.detune,this.context.currentTime,.01),this}getDetune(){return this.detune}getFilter(){return this.getFilters()[0]}setFilter(e){return this.setFilters(e?[e]:[])}setPlaybackRate(e){if(this.hasPlaybackControl===!1){Ue("Audio: this Audio has no playback control.");return}return this.playbackRate=e,this.isPlaying===!0&&this.source.playbackRate.setTargetAtTime(this.playbackRate,this.context.currentTime,.01),this}getPlaybackRate(){return this.playbackRate}onEnded(){this.isPlaying=!1,this._progress=0}
vendor: 7,623 bytes, line 13
13getLoop(){return this.hasPlaybackControl===!1?(Ue("Audio: this Audio has no playback control."),!1):this.loop}setLoop(e){if(this.hasPlaybackControl===!1){Ue("Audio: this Audio has no playback control.");return}return this.loop=e,this.isPlaying===!0&&(this.source.loop=this.loop),this}setLoopStart(e){return this.loopStart=e,this}setLoopEnd(e){return this.loopEnd=e,this}getVolume(){return this.gain.gain.value}setVolume(e){return this.gain.gain.setTargetAtTime(e,this.context.currentTime,.01),this}copy(e,t){return super.copy(e,t),e.sourceType!=="buffer"?(Ue("Audio: Audio source type cannot be copied."),this):(this.autoplay=e.autoplay,this.buffer=e.buffer,this.detune=e.detune,this.loop=e.loop,this.loopStart=e.loopStart,this.loopEnd=e.loopEnd,this.offset=e.offset,this.duration=e.duration,this.playbackRate=e.playbackRate,this.hasPlaybackControl=e.hasPlaybackControl,this.sourceType=e.sourceType,this.filters=e.filters.slice(),this)}clone(e){return new this.constructor(this.listener).copy(this,e)}},no=new k,Ng=new hi,zw=new k,io=new k,Vw=class extends _x{constructor(e){super(e),this.panner=this.context.createPanner(),this.panner.panningModel="HRTF",this.panner.connect(this.gain)}connect(){return super.connect(),this.panner.connect(this.gain),this}disconnect(){return super.disconnect(),this.panner.disconnect(this.gain),this}getOutput(){return this.panner}getRefDistance(){return this.panner.refDistance}setRefDistance(e){return this.panner.refDistance=e,this}getRolloffFactor(){return this.panner.rolloffFactor}setRolloffFactor(e){return this.panner.rolloffFactor=e,this}getDistanceModel(){return this.panner.distanceModel}setDistanceModel(e){return this.panner.distanceModel=e,this}getMaxDistance(){return this.panner.maxDistance}setMaxDistance(e){return this.panner.maxDistance=e,this}setDirectionalCone(e,t,n){return this.panner.coneInnerAngle=e,this.panner.coneOuterAngle=t,this.panner.coneOuterGain=n,this}updateMatrixWorld(e){if(super.updateMatrixWorld(e),this.hasPlaybackControl===!0&&this.isPlaying===!1)return;this.matrixWorld.decompose(no,Ng,zw),io.set(0,0,1).applyQuaternion(Ng);const t=this.panner;if(t.positionX){const n=this.context.currentTime+this.listener.timeDelta;t.positionX.linearRampToValueAtTime(no.x,n),t.positionY.linearRampToValueAtTime(no.y,n),t.positionZ.linearRampToValueAtTime(no.z,n),t.orientationX.linearRampToValueAtTime(io.x,n),t.orientationY.linearRampToValueAtTime(io.y,n),t.orientationZ.linearRampToValueAtTime(io.z,n)}else t.setPosition(no.x,no.y,no.z),t.setOrientation(io.x,io.y,io.z)}},Gw=class{constructor(e,t=2048){this.analyser=e.context.createAnalyser(),this.analyser.fftSize=t,this.data=new Uint8Array(this.analyser.frequencyBinCount),e.getOutput().connect(this.analyser)}getFrequencyData(){return this.analyser.getByteFrequencyData(this.data),this.data}getAverageFrequency(){let e=0;const t=this.getFrequencyData();for(let n=0;n<t.length;n++)e+=t[n];return e/t.length}},bx=class{constructor(e,t,n){this.binding=e,this.valueSize=n;let i,r,o;switch(t){case"quaternion":i=this._slerp,r=this._slerpAdditive,o=this._setAdditiveIdentityQuaternion,this.buffer=new Float64Array(n*6),this._workIndex=5;break;case"string":case"bool":i=this._select,r=this._select,o=this._setAdditiveIdentityOther,this.buffer=new Array(n*5);break;default:i=this._lerp,r=this._lerpAdditive,o=this._setAdditiveIdentityNumeric,this.buffer=new Float64Array(n*5)}this._mixBufferRegion=i,this._mixBufferRegionAdditive=r,this._setIdentity=o,this._origIndex=3,this._addIndex=4,this.cumulativeWeight=0,this.cumulativeWeightAdditive=0,this.useCount=0,this.referenceCount=0}accumulate(e,t){const n=this.buffer,i=this.valueSize,r=e*i+i;let o=this.cumulativeWeight;if(o===0){for(let l=0;l!==i;++l)n[r+l]=n[l];o=t}else{o+=t;const l=t/o;this._mixBufferRegion(n,r,0,l,i)}this.cumulativeWeight=o}accumulateAdditive(e){const t=this.buffer,n=this.valueSize,i=n*this._addIndex;this.cumulativeWeightAdditive===0&&this._setIdentity(),this._mixBufferRegionAdditive(t,i,0,e,n),this.cumulativeWeightAdditive+=e}apply(e){const t=this.valueSize,n=this.buffer,i=e*t+t,r=this.cumulativeWeight,o=this.cumulativeWeightAdditive,l=this.binding;if(this.cumulativeWeight=0,this.cumulativeWeightAdditive=0,r<1){const u=t*this._origIndex;this._mixBufferRegion(n,i,u,1-r,t)}o>0&&this._mixBufferRegionAdditive(n,i,this._addIndex*t,1,t);for(let u=t,h=t+t;u!==h;++u)if(n[u]!==n[u+t]){l.setValue(n,i);break}}saveOriginalState(){const e=this.binding,t=this.buffer,n=this.valueSize,i=n*this._origIndex;e.getValue(t,i);for(let r=n,o=i;r!==o;++r)t[r]=t[i+r%n];this._setIdentity(),this.cumulativeWeight=0,this.cumulativeWeightAdditive=0}restoreOriginalState(){const e=this.valueSize*3;this.binding.setValue(this.buffer,e)}_setAdditiveIdentityNumeric(){const e=this._addIndex*this.valueSize,t=e+this.valueSize;for(let n=e;n<t;n++)this.buffer[n]=0}_setAdditiveIdentityQuaternion(){this._setAdditiveIdentityNumeric(),this.buffer[this._addIndex*this.valueSize+3]=1}_setAdditiveIdentityOther(){const e=this._origIndex*this.valueSize,t=this._addIndex*this.valueSize;for(let n=0;n<this.valueSize;n++)this.buffer[t+n]=this.buffer[e+n]}_select(e,t,n,i,r){if(i>=.5)for(let o=0;o!==r;++o)e[t+o]=e[n+o]}_slerp(e,t,n,i){hi.slerpFlat(e,t,e,t,e,n,i)}_slerpAdditive(e,t,n,i,r){const o=this._workIndex*r;hi.multiplyQuaternionsFlat(e,o,e,t,e,n),hi.slerpFlat(e,t,e,t,e,o,i)}_lerp(e,t,n,i,r){const o=1-i;for(let l=0;l!==r;++l){const u=t+l;e[u]=e[u]*o+e[n+l]*i}}_lerpAdditive(e,t,n,i,r){for(let o=0;o!==r;++o){const l=t+o;e[l]=e[l]+e[n+o]*i}}},Hw="\\[\\]\\.:\\/",Ww=new RegExp("[\\[\\]\\.:\\/]","g"),N0="[^\\[\\]\\.:\\/]",jw="[^"+Hw.replace("\\.","")+"]",Xw=/((?:WC+[\/:])*)/.source.replace("WC",N0),qw=/(WCOD+)?/.source.replace("WCOD",jw),Yw=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",N0),$w=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",N0),Zw=new RegExp("^"+Xw+qw+Yw+$w+"$"),Jw=["material","materials","bones","map"],Kw=class{constructor(e,t,n){const i=n||en.parseTrackName(t);this._targetGroup=e,this._bindings=e.subscribe_(t,i)}getValue(e,t){this.bind();const n=this._targetGroup.nCachedObjects_,i=this._bindings[n];i!==void 0&&i.getValue(e,t)}setValue(e,t){const n=this._bindings;for(let i=this._targetGroup.nCachedObjects_,r=n.length;i!==r;++i)n[i].setValue(e,t)}bind(){const e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,n=e.length;t!==n;++t)e[t].bind()}unbind(){const e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,n=e.length;t!==n;++t)e[t].unbind()}},en=class bl{constructor(t,n,i){this.path=n,this.parsedPath=i||bl.parseTrackName(n),this.node=bl.findNode(t,this.parsedPath.nodeName),this.rootNode=t,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(t,n,i){return t&&t.isAnimationObjectGroup?new bl.Composite(t,n,i):new bl(t,n,i)}static sanitizeNodeName(t){return t.replace(/\s/g,"_").replace(Ww,"")}static parseTrackName(t){const n=Zw.exec(t);if(n===null)throw new Error("THREE.PropertyBinding: Cannot parse trackName: "+t);const i={nodeName:n[2],objectName:n[3],objectIndex:n[4],propertyName:n[5],propertyIndex:n[6]},r=i.nodeName&&i.nodeName.lastIndexOf(".");if(r!==void 0&&r!==-1){const o=i.nodeName.substring(r+1);Jw.indexOf(o)!==-1&&(i.nodeName=i.nodeName.substring(0,r),i.objectName=o)}if(i.propertyName===null||i.propertyName.length===0)throw new Error("THREE.PropertyBinding: can not parse propertyName from trackName: "+t);return i}static findNode(t,n){if(n===void 0||n===""||n==="."||n===-1||n===t.name||n===t.uuid)return t;if(t.skeleton){const i=t.skeleton.getBoneByName(n);if(i!==void 0)return i}if(t.children){const i=function(o){for(let l=0;l<o.length;l++){const u=o[l];
vendor: 5,185 bytes, line 13
13if(u.name===n||u.uuid===n)return u;const h=i(u.children);if(h)return h}return null},r=i(t.children);if(r)return r}return null}_getValue_unavailable(){}_setValue_unavailable(){}_getValue_direct(t,n){t[n]=this.targetObject[this.propertyName]}_getValue_array(t,n){const i=this.resolvedProperty;for(let r=0,o=i.length;r!==o;++r)t[n++]=i[r]}_getValue_arrayElement(t,n){t[n]=this.resolvedProperty[this.propertyIndex]}_getValue_toArray(t,n){this.resolvedProperty.toArray(t,n)}_setValue_direct(t,n){this.targetObject[this.propertyName]=t[n]}_setValue_direct_setNeedsUpdate(t,n){this.targetObject[this.propertyName]=t[n],this.targetObject.needsUpdate=!0}_setValue_direct_setMatrixWorldNeedsUpdate(t,n){this.targetObject[this.propertyName]=t[n],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_array(t,n){const i=this.resolvedProperty;for(let r=0,o=i.length;r!==o;++r)i[r]=t[n++]}_setValue_array_setNeedsUpdate(t,n){const i=this.resolvedProperty;for(let r=0,o=i.length;r!==o;++r)i[r]=t[n++];this.targetObject.needsUpdate=!0}_setValue_array_setMatrixWorldNeedsUpdate(t,n){const i=this.resolvedProperty;for(let r=0,o=i.length;r!==o;++r)i[r]=t[n++];this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_arrayElement(t,n){this.resolvedProperty[this.propertyIndex]=t[n]}_setValue_arrayElement_setNeedsUpdate(t,n){this.resolvedProperty[this.propertyIndex]=t[n],this.targetObject.needsUpdate=!0}_setValue_arrayElement_setMatrixWorldNeedsUpdate(t,n){this.resolvedProperty[this.propertyIndex]=t[n],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_fromArray(t,n){this.resolvedProperty.fromArray(t,n)}_setValue_fromArray_setNeedsUpdate(t,n){this.resolvedProperty.fromArray(t,n),this.targetObject.needsUpdate=!0}_setValue_fromArray_setMatrixWorldNeedsUpdate(t,n){this.resolvedProperty.fromArray(t,n),this.targetObject.matrixWorldNeedsUpdate=!0}_getValue_unbound(t,n){this.bind(),this.getValue(t,n)}_setValue_unbound(t,n){this.bind(),this.setValue(t,n)}bind(){let t=this.node;const n=this.parsedPath,i=n.objectName,r=n.propertyName;let o=n.propertyIndex;if(t||(t=bl.findNode(this.rootNode,n.nodeName),this.node=t),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,!t){Ue("PropertyBinding: No target node found for track: "+this.path+".");return}if(i){let f=n.objectIndex;switch(i){case"materials":if(!t.material){rt("PropertyBinding: Can not bind to material as node does not have a material.",this);return}if(!t.material.materials){rt("PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.",this);return}t=t.material.materials;break;case"bones":if(!t.skeleton){rt("PropertyBinding: Can not bind to bones as node does not have a skeleton.",this);return}t=t.skeleton.bones;for(let p=0;p<t.length;p++)if(t[p].name===f){f=p;break}break;case"map":if("map"in t){t=t.map;break}if(!t.material){rt("PropertyBinding: Can not bind to material as node does not have a material.",this);return}if(!t.material.map){rt("PropertyBinding: Can not bind to material.map as node.material does not have a map.",this);return}t=t.material.map;break;default:if(t[i]===void 0){rt("PropertyBinding: Can not bind to objectName of node undefined.",this);return}t=t[i]}if(f!==void 0){if(t[f]===void 0){rt("PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,t);return}t=t[f]}}const l=t[r];if(l===void 0){const f=n.nodeName;rt("PropertyBinding: Trying to update property for track: "+f+"."+r+" but it wasn't found.",t);return}let u=this.Versioning.None;this.targetObject=t,t.isMaterial===!0?u=this.Versioning.NeedsUpdate:t.isObject3D===!0&&(u=this.Versioning.MatrixWorldNeedsUpdate);let h=this.BindingType.Direct;if(o!==void 0){if(r==="morphTargetInfluences"){if(!t.geometry){rt("PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.",this);return}if(!t.geometry.morphAttributes){rt("PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.",this);return}t.morphTargetDictionary[o]!==void 0&&(o=t.morphTargetDictionary[o])}h=this.BindingType.ArrayElement,this.resolvedProperty=l,this.propertyIndex=o}else l.fromArray!==void 0&&l.toArray!==void 0?(h=this.BindingType.HasFromToArray,this.resolvedProperty=l):Array.isArray(l)?(h=this.BindingType.EntireArray,this.resolvedProperty=l):this.propertyName=r;this.getValue=this.GetterByBindingType[h],this.setValue=this.SetterByBindingTypeAndVersioning[h][u]}unbind(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}};en.Composite=Kw;en.prototype.BindingType={Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3};en.prototype.Versioning={None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2};en.prototype.GetterByBindingType=[en.prototype._getValue_direct,en.prototype._getValue_array,en.prototype._getValue_arrayElement,en.prototype._getValue_toArray];en.prototype.SetterByBindingTypeAndVersioning=[[en.prototype._setValue_direct,en.prototype._setValue_direct_setNeedsUpdate,en.prototype._setValue_direct_setMatrixWorldNeedsUpdate],[en.prototype._setValue_array,en.prototype._setValue_array_setNeedsUpdate,en.prototype._setValue_array_setMatr
vendor: 4,385 bytes, line 13
13ixWorldNeedsUpdate],[en.prototype._setValue_arrayElement,en.prototype._setValue_arrayElement_setNeedsUpdate,en.prototype._setValue_arrayElement_setMatrixWorldNeedsUpdate],[en.prototype._setValue_fromArray,en.prototype._setValue_fromArray_setNeedsUpdate,en.prototype._setValue_fromArray_setMatrixWorldNeedsUpdate]];var Qw=class{constructor(){this.isAnimationObjectGroup=!0,this.uuid=Oi(),this._objects=Array.prototype.slice.call(arguments),this.nCachedObjects_=0;const e={};this._indicesByUUID=e;for(let n=0,i=arguments.length;n!==i;++n)e[arguments[n].uuid]=n;this._paths=[],this._parsedPaths=[],this._bindings=[],this._bindingsIndicesByPath={};const t=this;this.stats={objects:{get total(){return t._objects.length},get inUse(){return this.total-t.nCachedObjects_}},get bindingsPerObject(){return t._bindings.length}}}add(){const e=this._objects,t=this._indicesByUUID,n=this._paths,i=this._parsedPaths,r=this._bindings,o=r.length;let l,u=e.length,h=this.nCachedObjects_;for(let f=0,p=arguments.length;f!==p;++f){const g=arguments[f],m=g.uuid;let v=t[m];if(v===void 0){v=u++,t[m]=v,e.push(g);for(let b=0,w=o;b!==w;++b)r[b].push(new en(g,n[b],i[b]))}else if(v<h){l=e[v];const b=--h,w=e[b];t[w.uuid]=v,e[v]=w,t[m]=b,e[b]=g;for(let S=0,_=o;S!==_;++S){const C=r[S],A=C[b];let E=C[v];C[v]=A,E===void 0&&(E=new en(g,n[S],i[S])),C[b]=E}}else e[v]!==l&&rt("AnimationObjectGroup: Different objects with the same UUID detected. Clean the caches or recreate your infrastructure when reloading scenes.")}this.nCachedObjects_=h}remove(){const e=this._objects,t=this._indicesByUUID,n=this._bindings,i=n.length;let r=this.nCachedObjects_;for(let o=0,l=arguments.length;o!==l;++o){const u=arguments[o],h=u.uuid,f=t[h];if(f!==void 0&&f>=r){const p=r++,g=e[p];t[g.uuid]=f,e[f]=g,t[h]=p,e[p]=u;for(let m=0,v=i;m!==v;++m){const b=n[m],w=b[p],S=b[f];b[f]=w,b[p]=S}}}this.nCachedObjects_=r}uncache(){const e=this._objects,t=this._indicesByUUID,n=this._bindings,i=n.length;let r=this.nCachedObjects_,o=e.length;for(let l=0,u=arguments.length;l!==u;++l){const h=arguments[l].uuid,f=t[h];if(f!==void 0)if(delete t[h],f<r){const p=--r,g=e[p],m=--o,v=e[m];t[g.uuid]=f,e[f]=g,t[v.uuid]=p,e[p]=v,e.pop();for(let b=0,w=i;b!==w;++b){const S=n[b],_=S[p],C=S[m];S[f]=_,S[p]=C,S.pop()}}else{const p=--o,g=e[p];p>0&&(t[g.uuid]=f),e[f]=g,e.pop();for(let m=0,v=i;m!==v;++m){const b=n[m];b[f]=b[p],b.pop()}}}this.nCachedObjects_=r}subscribe_(e,t){const n=this._bindingsIndicesByPath;let i=n[e];const r=this._bindings;if(i!==void 0)return r[i];const o=this._paths,l=this._parsedPaths,u=this._objects,h=u.length,f=this.nCachedObjects_,p=new Array(h);i=r.length,n[e]=i,o.push(e),l.push(t),r.push(p);for(let g=f,m=u.length;g!==m;++g){const v=u[g];p[g]=new en(v,e,t)}return p}unsubscribe_(e){const t=this._bindingsIndicesByPath,n=t[e];if(n!==void 0){const i=this._paths,r=this._parsedPaths,o=this._bindings,l=o.length-1,u=o[l],h=e[l];t[h]=n,o[n]=u,o.pop(),r[n]=r[l],r.pop(),i[n]=i[l],i.pop()}}},Sx=class{constructor(e,t,n=null,i=t.blendMode){this._mixer=e,this._clip=t,this._localRoot=n,this.blendMode=i;const r=t.tracks,o=r.length,l=new Array(o),u={endingStart:ao,endingEnd:ao};for(let h=0;h!==o;++h){const f=r[h].createInterpolant(null);l[h]=f,f.settings=u}this._interpolantSettings=u,this._interpolants=l,this._propertyBindings=new Array(o),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._restoreTimeScale=null,this._weightInterpolant=null,this.loop=_y,this._loopCount=-1,this._startTime=null,this.time=0,this.timeScale=1,this._effectiveTimeScale=1,this.weight=1,this._effectiveWeight=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtStart=!0,this.zeroSlopeAtEnd=!0}play(){return this._mixer._activateAction(this),this}stop(){return this._mixer._deactivateAction(this),this.reset()}reset(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()}isRunning(){return this.enabled&&!this.paused&&this.timeScale!==0&&this._startTime===null&&this._mixer._isActiveAction(this)}isScheduled(){return this._mixer._isActiveAction(this)}startAt(e){return this._startTime=e,this}setLoop(e,t){return this.loop=e,this.repetitions=t,this}setEffectiveWeight(e){return this.weight=e,this._effectiveWeight=this.enabled?e:0,this.stopFading()}getEffectiveWeight(){return this._effectiveWeight}
vendor: 4,489 bytes, line 13
13fadeIn(e){return this._scheduleFading(e,0,1)}fadeOut(e){return this._scheduleFading(e,1,0)}crossFadeFrom(e,t,n=!1){if(e.fadeOut(t),this.fadeIn(t),n===!0){const i=this._clip.duration,r=e._clip.duration,o=r/i,l=i/r;e._restoreTimeScale=e.timeScale,this._restoreTimeScale=this.timeScale,e.warp(1,o,t),this.warp(l,1,t)}return this}crossFadeTo(e,t,n=!1){return e.crossFadeFrom(this,t,n)}stopFading(){const e=this._weightInterpolant;return e!==null&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}setEffectiveTimeScale(e){return this.timeScale=e,this._effectiveTimeScale=this.paused?0:e,this.stopWarping()}getEffectiveTimeScale(){return this._effectiveTimeScale}setDuration(e){return this.timeScale=this._clip.duration/e,this.stopWarping()}syncWith(e){return this.time=e.time,this.timeScale=e.timeScale,this.stopWarping()}halt(e){return this.warp(this._effectiveTimeScale,0,e)}warp(e,t,n){const i=this._mixer,r=i.time,o=this.timeScale;let l=this._timeScaleInterpolant;l===null&&(l=i._lendControlInterpolant(),this._timeScaleInterpolant=l);const u=l.parameterPositions,h=l.sampleValues;return u[0]=r,u[1]=r+n,h[0]=e/o,h[1]=t/o,this}stopWarping(){const e=this._timeScaleInterpolant;return e!==null&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this._restoreTimeScale=null,this}getMixer(){return this._mixer}getClip(){return this._clip}getRoot(){return this._localRoot||this._mixer._root}_update(e,t,n,i){if(!this.enabled){this._updateWeight(e);return}const r=this._startTime;if(r!==null){const u=(e-r)*n;u<0||n===0?t=0:(this._startTime=null,t=n*u)}t*=this._updateTimeScale(e);const o=this._updateTime(t),l=this._updateWeight(e);if(l>0){const u=this._interpolants,h=this._propertyBindings;switch(this.blendMode){case t0:for(let f=0,p=u.length;f!==p;++f)u[f].evaluate(o),h[f].accumulateAdditive(l);break;case Xh:default:for(let f=0,p=u.length;f!==p;++f)u[f].evaluate(o),h[f].accumulate(i,l)}}}_updateWeight(e){let t=0;if(this.enabled){t=this.weight;const n=this._weightInterpolant;if(n!==null){const i=n.evaluate(e)[0];t*=i,e>n.parameterPositions[1]&&(this.stopFading(),i===0&&(this.enabled=!1))}}return this._effectiveWeight=t,t}_updateTimeScale(e){let t=0;if(!this.paused){t=this.timeScale;const n=this._timeScaleInterpolant;if(n!==null){const i=n.evaluate(e)[0];t*=i,e>n.parameterPositions[1]&&(t===0?this.paused=!0:(this._restoreTimeScale!==null&&(t=this._restoreTimeScale),this.timeScale=t),this.stopWarping())}}return this._effectiveTimeScale=t,t}_updateTime(e){const t=this._clip.duration,n=this.loop;let i=this.time+e,r=this._loopCount;const o=n===by;if(e===0)return r===-1?i:o&&(r&1)===1?t-i:i;if(n===2200){r===-1&&(this._loopCount=0,this._setEndings(!0,!0,!1));e:{if(i>=t)i=t;else if(i<0)i=0;else{this.time=i;break e}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=i,this._mixer.dispatchEvent({type:"finished",action:this,direction:e<0?-1:1})}}else{if(r===-1&&(e>=0?(r=0,this._setEndings(!0,this.repetitions===0,o)):this._setEndings(this.repetitions===0,!0,o)),i>=t||i<0){const l=Math.floor(i/t);i-=t*l,r+=Math.abs(l);const u=this.repetitions-r;if(u<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,i=e>0?t:0,this.time=i,this._mixer.dispatchEvent({type:"finished",action:this,direction:e>0?1:-1});else{if(u===1){const h=e<0;this._setEndings(h,!h,o)}else this._setEndings(!1,!1,o);this._loopCount=r,this.time=i,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:l})}}else this._loopCount=r,this.time=i;if(o&&(r&1)===1)return t-i}return i}_setEndings(e,t,n){const i=this._interpolantSettings;n?(i.endingStart=oo,i.endingEnd=oo):(e?i.endingStart=this.zeroSlopeAtStart?oo:ao:i.endingStart=Dc,t?i.endingEnd=this.zeroSlopeAtEnd?oo:ao:i.endingEnd=Dc)}_scheduleFading(e,t,n){const i=this._mixer,r=i.time;let o=this._weightInterpolant;o===null&&(o=i._lendControlInterpolant(),this._weightInterpolant=o);const l=o.parameterPositions,u=o.sampleValues;return l[0]=r,u[0]=t,l[1]=r+e,u[1]=n,this}},e5=new Float32Array(1),t5=class extends dr{constructor(e){super(),this._root=e,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1,typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}_bindAction(e,t){const n=e._localRoot||this._root,i=e._clip.tracks,r=i.length,o=e._propertyBindings,l=e._interpolants,u=n.uuid,h=this._bindingsByRootAndName;let f=h[u];f===void 0&&(f={},h[u]=f);for(let p=0;p!==r;++p){const g=i[p],m=g.name;let v=f[m];
vendor: 8,099 bytes, line 13
13if(v!==void 0)++v.referenceCount,o[p]=v;else{if(v=o[p],v!==void 0){v._cacheIndex===null&&(++v.referenceCount,this._addInactiveBinding(v,u,m));continue}const b=t&&t._propertyBindings[p].binding.parsedPath;v=new bx(en.create(n,m,b),g.ValueTypeName,g.getValueSize()),++v.referenceCount,this._addInactiveBinding(v,u,m),o[p]=v}l[p].resultBuffer=v.buffer}}_activateAction(e){if(!this._isActiveAction(e)){if(e._cacheIndex===null){const n=(e._localRoot||this._root).uuid,i=e._clip.uuid,r=this._actionsByClip[i];this._bindAction(e,r&&r.knownActions[0]),this._addInactiveAction(e,i,n)}const t=e._propertyBindings;for(let n=0,i=t.length;n!==i;++n){const r=t[n];r.useCount++===0&&(this._lendBinding(r),r.saveOriginalState())}this._lendAction(e)}}_deactivateAction(e){if(this._isActiveAction(e)){const t=e._propertyBindings;for(let n=0,i=t.length;n!==i;++n){const r=t[n];--r.useCount===0&&(r.restoreOriginalState(),this._takeBackBinding(r))}this._takeBackAction(e)}}_initMemoryManager(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;const e=this;this.stats={actions:{get total(){return e._actions.length},get inUse(){return e._nActiveActions}},bindings:{get total(){return e._bindings.length},get inUse(){return e._nActiveBindings}},controlInterpolants:{get total(){return e._controlInterpolants.length},get inUse(){return e._nActiveControlInterpolants}}}}_isActiveAction(e){const t=e._cacheIndex;return t!==null&&t<this._nActiveActions}_addInactiveAction(e,t,n){const i=this._actions,r=this._actionsByClip;let o=r[t];if(o===void 0)o={knownActions:[e],actionByRoot:{}},e._byClipCacheIndex=0,r[t]=o;else{const l=o.knownActions;e._byClipCacheIndex=l.length,l.push(e)}e._cacheIndex=i.length,i.push(e),o.actionByRoot[n]=e}_removeInactiveAction(e){const t=this._actions,n=t[t.length-1],i=e._cacheIndex;n._cacheIndex=i,t[i]=n,t.pop(),e._cacheIndex=null;const r=e._clip.uuid,o=this._actionsByClip,l=o[r],u=l.knownActions,h=u[u.length-1],f=e._byClipCacheIndex;h._byClipCacheIndex=f,u[f]=h,u.pop(),e._byClipCacheIndex=null;const p=l.actionByRoot,g=(e._localRoot||this._root).uuid;delete p[g],u.length===0&&delete o[r],this._removeInactiveBindingsForAction(e)}_removeInactiveBindingsForAction(e){const t=e._propertyBindings;for(let n=0,i=t.length;n!==i;++n){const r=t[n];--r.referenceCount===0&&this._removeInactiveBinding(r)}}_lendAction(e){const t=this._actions,n=e._cacheIndex,i=this._nActiveActions++,r=t[i];e._cacheIndex=i,t[i]=e,r._cacheIndex=n,t[n]=r}_takeBackAction(e){const t=this._actions,n=e._cacheIndex,i=--this._nActiveActions,r=t[i];e._cacheIndex=i,t[i]=e,r._cacheIndex=n,t[n]=r}_addInactiveBinding(e,t,n){const i=this._bindingsByRootAndName,r=this._bindings;let o=i[t];o===void 0&&(o={},i[t]=o),o[n]=e,e._cacheIndex=r.length,r.push(e)}_removeInactiveBinding(e){const t=this._bindings,n=e.binding,i=n.rootNode.uuid,r=n.path,o=this._bindingsByRootAndName,l=o[i],u=t[t.length-1],h=e._cacheIndex;u._cacheIndex=h,t[h]=u,t.pop(),delete l[r],Object.keys(l).length===0&&delete o[i]}_lendBinding(e){const t=this._bindings,n=e._cacheIndex,i=this._nActiveBindings++,r=t[i];e._cacheIndex=i,t[i]=e,r._cacheIndex=n,t[n]=r}_takeBackBinding(e){const t=this._bindings,n=e._cacheIndex,i=--this._nActiveBindings,r=t[i];e._cacheIndex=i,t[i]=e,r._cacheIndex=n,t[n]=r}_lendControlInterpolant(){const e=this._controlInterpolants,t=this._nActiveControlInterpolants++;let n=e[t];return n===void 0&&(n=new E0(new Float32Array(2),new Float32Array(2),1,e5),n.__cacheIndex=t,e[t]=n),n}_takeBackControlInterpolant(e){const t=this._controlInterpolants,n=e.__cacheIndex,i=--this._nActiveControlInterpolants,r=t[i];e.__cacheIndex=i,t[i]=e,r.__cacheIndex=n,t[n]=r}clipAction(e,t,n){const i=t||this._root,r=i.uuid;let o=typeof e=="string"?jc.findByName(i,e):e;const l=o!==null?o.uuid:e,u=this._actionsByClip[l];let h=null;if(n===void 0&&(o!==null?n=o.blendMode:n=Xh),u!==void 0){const p=u.actionByRoot[r];if(p!==void 0&&p.blendMode===n)return p;h=u.knownActions[0],o===null&&(o=h._clip)}if(o===null)return null;const f=new Sx(this,o,t,n);return this._bindAction(f,h),this._addInactiveAction(f,l,r),f}existingAction(e,t){const n=t||this._root,i=n.uuid,r=typeof e=="string"?jc.findByName(n,e):e,o=r?r.uuid:e,l=this._actionsByClip[o];return l!==void 0&&l.actionByRoot[i]||null}stopAllAction(){const e=this._actions,t=this._nActiveActions;for(let n=t-1;n>=0;--n)e[n].stop();return this}update(e){e*=this.timeScale;const t=this._actions,n=this._nActiveActions,i=this.time+=e,r=Math.sign(e),o=this._accuIndex^=1;for(let h=0;h!==n;++h)t[h]._update(i,e,r,o);const l=this._bindings,u=this._nActiveBindings;for(let h=0;h!==u;++h)l[h].apply(o);return this}setTime(e){this.time=0;for(let t=0;t<this._actions.length;t++)this._actions[t].time=0;return this.update(e)}getRoot(){return this._root}uncacheClip(e){const t=this._actions,n=e.uuid,i=this._actionsByClip,r=i[n];if(r!==void 0){const o=r.knownActions;for(let l=0,u=o.length;l!==u;++l){const h=o[l];this._deactivateAction(h);const f=h._cacheIndex,p=t[t.length-1];h._cacheIndex=null,h._byClipCacheIndex=null,p._cacheIndex=f,t[f]=p,t.pop(),this._removeInactiveBindingsForAction(h)}delete i[n]}}uncacheRoot(e){const t=e.uuid,n=this._actionsByClip;for(const r in n){const o=n[r].actionByRoot[t];o!==void 0&&(this._deactivateAction(o),this._removeInactiveAction(o))}const i=this._bindingsByRootAndName[t];if(i!==void 0)for(const r in i){const o=i[r];o.restoreOriginalState(),this._removeInactiveBinding(o)}}uncacheAction(e,t){const n=this.existingAction(e,t);n!==null&&(this._deactivateAction(n),this._removeInactiveAction(n))}},n5=class extends i0{constructor(e=1,t=1,n=1,i={}){super(e,t,i),this.isRenderTarget3D=!0,this.depth=n,this.texture=new $h(null,e,t,n),this._setTextureOptions(i),this.texture.isRenderTargetTexture=!0}},i5=class Mx{constructor(t){this.value=t}clone(){return new Mx(this.value.clone===void 0?this.value:this.value.clone())}},r5=0,s5=class extends dr{constructor(){super(),this.isUniformsGroup=!0,Object.defineProperty(this,"id",{value:r5++}),this.name="",this.usage=qh,this.uniforms=[]}add(e){return this.uniforms.push(e),this}remove(e){const t=this.uniforms.indexOf(e);return t!==-1&&this.uniforms.splice(t,1),this}setName(e){return this.name=e,this}setUsage(e){return this.usage=e,this}dispose(){this.dispatchEvent({type:"dispose"})}copy(e){this.name=e.name,this.usage=e.usage;const t=e.uniforms;this.uniforms.length=0;for(let n=0,i=t.length;n<i;n++){const r=Array.isArray(t[n])?t[n]:[t[n]];for(let o=0;o<r.length;o++)this.uniforms.push(r[o].clone())}return this}clone(){return new this.constructor().copy(this)}},a5=class extends Zh{constructor(e,t,n=1){super(e,t),this.isInstancedInterleavedBuffer=!0,this.meshPerAttribute=n}copy(e){return super.copy(e),this.meshPerAttribute=e.meshPerAttribute,this}clone(e){const t=super.clone(e);return t.meshPerAttribute=this.meshPerAttribute,t}toJSON(e){const t=super.toJSON(e);return t.isInstancedInterleavedBuffer=!0,t.meshPerAttribute=this.meshPerAttribute,t}},o5=class{constructor(e,t,n,i,r,o=!1){this.isGLBufferAttribute=!0,this.name="",this.buffer=e,this.type=t,this.itemSize=n,this.elementSize=i,this.count=r,this.normalized=o,this.version=0}set needsUpdate(e){e===!0&&this.version++}setBuffer(e){return this.buffer=e,this}setType(e,t){return this.type=e,this.elementSize=t,this}setItemSize(e){return this.itemSize=e,this}setCount(e){return this.count=e,this}},Lg=new _t,wx=class{constructor(e,t,n=0,i=1/0){this.ray=new Dl(e,t),this.near=n,this.far=i,this.camera=null,this.layers=new Al,this.params={Mesh:{},Line:{threshold:1},LOD:{},Points:{threshold:1},Sprite:{}}}set(e,t){this.ray.set(e,t)}setFromCamera(e,t){t.isPerspectiveCamera?(this.ray.origin.setFromMatrixPosition(t.matrixWorld),this.ray.direction.set(e.x,e.y,.5).unproject(t).sub(this.ray.origin).normalize(),this.camera=t):t.isOrthographicCamera?(this.ray.origin.set(e.x,e.y,t.projectionMatrix.elements[14]).unproject(t),this.ray.direction.set(0,0,-1).transformDirection(t.matrixWorld),this.camera=t):rt("Raycaster: 
13Unsupported camera type: "+t.type)}setFromXRController(e){return Lg.identity().extractRotation(e.matrixWorld),this.ray.origin.setFromMatrixPosition(e.matrixWorld),this.ray.direction.set(0,0,-1).applyMatrix4(Lg),this}intersectObject(e,t=!0,n=[]){return Rp(e,this,n,t),n.sort(Dg),n}intersectObjects(e,t=!0,n=[]){for(let i=0,r=e.length;i<r;i++)Rp(e[i],this,n,t);return n.sort(Dg),n}};function Dg(e,t){return e.distance-t.distance}function Rp(e,t,n,i){let r=!0;if(e.layers.test(t.layers)&&e.raycast(t,n)===!1&&(r=!1),r===!0&&i===!0){const o=e.children;for(let l=0,u=o.length;l<u;l++)Rp(o[l],t,n,!0)}}var Ex=class{constructor(e=!0){this.autoStart=e,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1,Ue("Clock: This module has been deprecated. Please use THREE.Timer instead.")}start(){this.startTime=performance.now(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let e=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){const t=performance.now();e=(t-this.oldTime)/1e3,this.oldTime=t,this.elapsedTime+=e}return e}},l5=class{constructor(e=1,t=0,n=0){this.radius=e,this.phi=t,this.theta=n}set(e,t,n){return this.radius=e,this.phi=t,this.theta=n,this}copy(e){return this.radius=e.radius,this.phi=e.phi,this.theta=e.theta,this}makeSafe(){return this.phi=mt(this.phi,1e-6,Math.PI-1e-6),this}setFromVector3(e){return this.setFromCartesianCoords(e.x,e.y,e.z)}setFromCartesianCoords(e,t,n){return this.radius=Math.sqrt(e*e+t*t+n*n),this.radius===0?(this.theta=0,this.phi=0):(this.theta=Math.atan2(e,n),this.phi=Math.acos(mt(t/this.radius,-1,1))),this}clone(){return new this.constructor().copy(this)}},c5=class{constructor(e=1,t=0,n=0){this.radius=e,this.theta=t,this.y=n}set(e,t,n){return this.radius=e,this.theta=t,this.y=n,this}copy(e){return this.radius=e.radius,this.theta=e.theta,this.y=e.y,this}setFromVector3(e){return this.setFromCartesianCoords(e.x,e.y,e.z)}setFromCartesianCoords(e,t,n){return this.radius=Math.sqrt(e*e+n*n),this.theta=Math.atan2(e,n),this.y=t,this}clone(){return new this.constructor().copy(this)}},u5=class Tx{static{Tx.prototype.isMatrix2=!0}constructor(t,n,i,r){this.elements=[1,0,0,1],t!==void 0&&this.set(t,n,i,r)}identity(){return this.set(1,0,0,1),this}fromArray(t,n=0){for(let i=0;i<4;i++)this.elements[i]=t[i+n];return this}set(t,n,i,r){const o=this.elements;return o[0]=t,o[2]=n,o[1]=i,o[3]=r,this}},Ug=new ye,Cx=class{constructor(e=new ye(1/0,1/0),t=new ye(-1/0,-1/0)){this.isBox2=!0,this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromPoints(e){this.makeEmpty();for(let t=0,n=e.length;t<n;t++)this.expandByPoint(e[t]);return this}setFromCenterAndSize(e,t){const n=Ug.copy(t).multiplyScalar(.5);return this.min.copy(e).sub(n),this.max.copy(e).add(n),this}clone(){return new this.constructor().copy(this)}copy(e){return this.min.copy(e.min),this.max.copy(e.max),this}makeEmpty(){return this.min.x=this.min.y=1/0,this.max.x=this.max.y=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y}getCenter(e){return this.isEmpty()?e.set(0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(e){return this.isEmpty()?e.set(0,0):e.subVectors(this.max,this.min)}expandByPoint(e){return this.min.min(e),this.max.max(e),this}expandByVector(e){return this.min.sub(e),this.max.add(e),this}expandByScalar(e){return this.min.addScalar(-e),this.max.addScalar(e),this}containsPoint(e){return e.x>=this.min.x&&e.x<=this.max.x&&e.y>=this.min.y&&e.y<=this.max.y}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y))}intersectsBox(e){return e.max.x>=this.min.x&&e.min.x<=this.max.x&&e.max.y>=this.min.y&&e.min.y<=this.max.y}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,Ug).distanceTo(e)}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}},Og=new k,yh=new k,pl=new k,ml=new k,ep=new k,h5=new k,f5=new k,d5=class{constructor(e=new k,t=new k){this.start=e,this.end=t}set(e,t){return this.start.copy(e),this.end.copy(t),this}copy(e){return this.start.copy(e.start),this.end.copy(e.end),this}getCenter(e){return e.addVectors(this.start,this.end).multiplyScalar(.5)}delta(e){return e.subVectors(this.end,this.start)}distanceSq(){return this.start.distanceToSquared(this.end)}distance(){return this.start.distanceTo(this.end)}at(e,t){return this.delta(t).multiplyScalar(e).add(this.start)}closestPointToPointParameter(e,t){Og.subVectors(e,this.start),yh.subVectors(this.end,this.start);const n=yh.dot(yh);if(n===0)return 0;let i=yh.dot(Og)/n;return t&&(i=mt(i,0,1)),i}closestPointToPoint(e,t,n){const i=this.closestPointToPointParameter(e,t);return this.delta(n).multiplyScalar(i).add(this.start)}
vendor: 5,448 bytes, line 13
13distanceSqToLine3(e,t=h5,n=f5){const i=10000000000000001e-32;let r,o;const l=this.start,u=e.start,h=this.end,f=e.end;pl.subVectors(h,l),ml.subVectors(f,u),ep.subVectors(l,u);const p=pl.dot(pl),g=ml.dot(ml),m=ml.dot(ep);if(p<=i&&g<=i)return t.copy(l),n.copy(u),t.sub(n),t.dot(t);if(p<=i)r=0,o=m/g,o=mt(o,0,1);else{const v=pl.dot(ep);if(g<=i)o=0,r=mt(-v/p,0,1);else{const b=pl.dot(ml),w=p*g-b*b;w!==0?r=mt((b*m-v*g)/w,0,1):r=0,o=(b*r+m)/g,o<0?(o=0,r=mt(-v/p,0,1)):o>1&&(o=1,r=mt((b-v)/p,0,1))}}return t.copy(l).addScaledVector(pl,r),n.copy(u).addScaledVector(ml,o),t.distanceToSquared(n)}applyMatrix4(e){return this.start.applyMatrix4(e),this.end.applyMatrix4(e),this}equals(e){return e.start.equals(this.start)&&e.end.equals(this.end)}clone(){return new this.constructor().copy(this)}},Fg=new k,p5=class extends Yt{constructor(e,t){super(),this.light=e,this.matrixAutoUpdate=!1,this.color=t,this.type="SpotLightHelper";const n=new At,i=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1];for(let o=0,l=1,u=32;o<u;o++,l++){const h=o/u*Math.PI*2,f=l/u*Math.PI*2;i.push(Math.cos(h),Math.sin(h),1,Math.cos(f),Math.sin(f),1)}n.setAttribute("position",new Qe(i,3));const r=new fi({fog:!1,toneMapped:!1});this.cone=new Ar(n,r),this.add(this.cone),this.update()}dispose(){this.cone.geometry.dispose(),this.cone.material.dispose()}update(){this.light.updateWorldMatrix(!0,!1),this.light.target.updateWorldMatrix(!0,!1),this.parent?(this.parent.updateWorldMatrix(!0),this.matrix.copy(this.parent.matrixWorld).invert().multiply(this.light.matrixWorld)):this.matrix.copy(this.light.matrixWorld),this.matrixWorldNeedsUpdate=!0;const e=this.light.distance?this.light.distance:1e3,t=e*Math.tan(this.light.angle);this.cone.scale.set(t,t,e),Fg.setFromMatrixPosition(this.light.target.matrixWorld),this.cone.lookAt(Fg),this.color!==void 0?this.cone.material.color.set(this.color):this.cone.material.color.copy(this.light.color)}},Os=new k,xh=new _t,tp=new _t,m5=class extends Ar{constructor(e){const t=Ax(e),n=new At,i=[],r=[];for(let h=0;h<t.length;h++){const f=t[h];f.parent&&f.parent.isBone&&(i.push(0,0,0),i.push(0,0,0),r.push(0,0,0),r.push(0,0,0))}n.setAttribute("position",new Qe(i,3)),n.setAttribute("color",new Qe(r,3));const o=new fi({vertexColors:!0,depthTest:!1,depthWrite:!1,toneMapped:!1,transparent:!0});super(n,o),this.isSkeletonHelper=!0,this.type="SkeletonHelper",this.root=e,this.bones=t,this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1;const l=new Xe(255),u=new Xe(65280);this.setColors(l,u)}updateMatrixWorld(e){const t=this.bones,n=this.geometry,i=n.getAttribute("position");tp.copy(this.root.matrixWorld).invert();for(let r=0,o=0;r<t.length;r++){const l=t[r];l.parent&&l.parent.isBone&&(xh.multiplyMatrices(tp,l.matrixWorld),Os.setFromMatrixPosition(xh),i.setXYZ(o,Os.x,Os.y,Os.z),xh.multiplyMatrices(tp,l.parent.matrixWorld),Os.setFromMatrixPosition(xh),i.setXYZ(o+1,Os.x,Os.y,Os.z),o+=2)}n.getAttribute("position").needsUpdate=!0,super.updateMatrixWorld(e)}setColors(e,t){const n=this.geometry.getAttribute("color");for(let i=0;i<n.count;i+=2)n.setXYZ(i,e.r,e.g,e.b),n.setXYZ(i+1,t.r,t.g,t.b);return n.needsUpdate=!0,this}dispose(){this.geometry.dispose(),this.material.dispose()}};function Ax(e){const t=[];e.isBone===!0&&t.push(e);for(let n=0;n<e.children.length;n++)t.push(...Ax(e.children[n]));return t}var g5=class extends Cn{constructor(e,t,n){const i=new _0(t,4,2),r=new qs({wireframe:!0,fog:!1,toneMapped:!1});super(i,r),this.light=e,this.color=n,this.type="PointLightHelper",this.matrix=this.light.matrixWorld,this.matrixAutoUpdate=!1,this.update()}dispose(){this.geometry.dispose(),this.material.dispose()}update(){this.matrixWorldNeedsUpdate=!0,this.light.updateWorldMatrix(!0,!1),this.color!==void 0?this.material.color.set(this.color):this.material.color.copy(this.light.color)}},v5=new k,kg=new Xe,Bg=new Xe,y5=class extends Yt{constructor(e,t,n){super(),this.light=e,this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=n,this.type="HemisphereLightHelper";const i=new x0(t);i.rotateY(Math.PI*.5),this.material=new qs({wireframe:!0,fog:!1,toneMapped:!1}),this.color===void 0&&(this.material.vertexColors=!0);const r=i.getAttribute("position"),o=new Float32Array(r.count*3);i.setAttribute("color",new Jt(o,3)),this.add(new Cn(i,this.material)),this.update()}dispose(){this.children[0].geometry.dispose(),this.children[0].material.dispose()}update(){const e=this.children[0];if(this.color!==void 0)this.material.color.set(this.color);else{const t=e.geometry.getAttribute("color");kg.copy(this.light.color),Bg.copy(this.light.groundColor);for(let n=0,i=t.count;n<i;n++){const r=n<i/2?kg:Bg;t.setXYZ(n,r.r,r.g,r.b)}t.needsUpdate=!0}this.matrixWorldNeedsUpdate=!0,this.light.updateWorldMatrix(!0,!1),e.lookAt(v5.setFromMatrixPosition(this.light.matrixWorld).negate())}},x5=class extends Ar{constructor(e=10,t=10,n=4473924,i=8947848){n=new Xe(n),i=new Xe(i);const r=t/2,o=e/t,l=e/2,u=[],h=[];for(let g=0,m=0,v=-l;g<=t;g++,v+=o){u.push(-l,0,v,l,0,v),u.push(v,0,-l,v,0,l);const b=g===r?n:i;b.toArray(h,m),m+=3,b.toArray(h,m),m+=3,b.toArray(h,m),m+=3,b.toArray(h,m),m+=3}const f=new At;f.setAttribute("position",new Qe(u,3)),f.setAttribute("color",new Qe(h,3));const p=new fi({vertexColors:!0,toneMapped:!1});super(f,p),this.type="GridHelper"}dispose(){this.geometry.dispose(),this.material.dispose()}},_5=class extends Ar{constructor(e=10,t=16,n=8,i=64,r=4473924,o=8947848){r=new Xe(r),o=new Xe(o);const l=[],u=[];
vendor: 4,472 bytes, line 13
13if(t>1)for(let p=0;p<t;p++){const g=p/t*(Math.PI*2),m=Math.sin(g)*e,v=Math.cos(g)*e;l.push(0,0,0),l.push(m,0,v);const b=p&1?r:o;u.push(b.r,b.g,b.b),u.push(b.r,b.g,b.b)}for(let p=0;p<n;p++){const g=p&1?r:o,m=e-e/n*p;for(let v=0;v<i;v++){let b=v/i*(Math.PI*2),w=Math.sin(b)*m,S=Math.cos(b)*m;l.push(w,0,S),u.push(g.r,g.g,g.b),b=(v+1)/i*(Math.PI*2),w=Math.sin(b)*m,S=Math.cos(b)*m,l.push(w,0,S),u.push(g.r,g.g,g.b)}}const h=new At;h.setAttribute("position",new Qe(l,3)),h.setAttribute("color",new Qe(u,3));const f=new fi({vertexColors:!0,toneMapped:!1});super(h,f),this.type="PolarGridHelper"}dispose(){this.geometry.dispose(),this.material.dispose()}},zg=new k,_h=new k,Vg=new k,b5=class extends Yt{constructor(e,t,n){super(),this.light=e,this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=n,this.type="DirectionalLightHelper",t===void 0&&(t=1);let i=new At;i.setAttribute("position",new Qe([-t,t,0,t,t,0,t,-t,0,-t,-t,0,-t,t,0],3));const r=new fi({fog:!1,toneMapped:!1});this.lightPlane=new Xs(i,r),this.add(this.lightPlane),i=new At,i.setAttribute("position",new Qe([0,0,0,0,0,1],3)),this.targetLine=new Xs(i,r),this.add(this.targetLine),this.update()}dispose(){this.lightPlane.geometry.dispose(),this.lightPlane.material.dispose(),this.targetLine.geometry.dispose(),this.targetLine.material.dispose()}update(){this.matrixWorldNeedsUpdate=!0,this.light.updateWorldMatrix(!0,!1),this.light.target.updateWorldMatrix(!0,!1),zg.setFromMatrixPosition(this.light.matrixWorld),_h.setFromMatrixPosition(this.light.target.matrixWorld),Vg.subVectors(_h,zg),this.lightPlane.lookAt(_h),this.color!==void 0?(this.lightPlane.material.color.set(this.color),this.targetLine.material.color.set(this.color)):(this.lightPlane.material.color.copy(this.light.color),this.targetLine.material.color.copy(this.light.color)),this.targetLine.lookAt(_h),this.targetLine.scale.z=Vg.length()}},bh=new k,pn=new nf,S5=class extends Ar{constructor(e){const t=new At,n=new fi({color:16777215,vertexColors:!0,toneMapped:!1}),i=[],r=[],o={};l("n1","n2"),l("n2","n4"),l("n4","n3"),l("n3","n1"),l("f1","f2"),l("f2","f4"),l("f4","f3"),l("f3","f1"),l("n1","f1"),l("n2","f2"),l("n3","f3"),l("n4","f4"),l("p","n1"),l("p","n2"),l("p","n3"),l("p","n4"),l("u1","u2"),l("u2","u3"),l("u3","u1"),l("c","t"),l("p","c"),l("cn1","cn2"),l("cn3","cn4"),l("cf1","cf2"),l("cf3","cf4");function l(v,b){u(v),u(b)}function u(v){i.push(0,0,0),r.push(0,0,0),o[v]===void 0&&(o[v]=[]),o[v].push(i.length/3-1)}t.setAttribute("position",new Qe(i,3)),t.setAttribute("color",new Qe(r,3)),super(t,n),this.type="CameraHelper",this.camera=e,this.camera.updateProjectionMatrix&&this.camera.updateProjectionMatrix(),this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.pointMap=o,this.update();const h=new Xe(16755200),f=new Xe(16711680),p=new Xe(43775),g=new Xe(16777215),m=new Xe(3355443);this.setColors(h,f,p,g,m)}setColors(e,t,n,i,r){const o=this.geometry.getAttribute("color");return o.setXYZ(0,e.r,e.g,e.b),o.setXYZ(1,e.r,e.g,e.b),o.setXYZ(2,e.r,e.g,e.b),o.setXYZ(3,e.r,e.g,e.b),o.setXYZ(4,e.r,e.g,e.b),o.setXYZ(5,e.r,e.g,e.b),o.setXYZ(6,e.r,e.g,e.b),o.setXYZ(7,e.r,e.g,e.b),o.setXYZ(8,e.r,e.g,e.b),o.setXYZ(9,e.r,e.g,e.b),o.setXYZ(10,e.r,e.g,e.b),o.setXYZ(11,e.r,e.g,e.b),o.setXYZ(12,e.r,e.g,e.b),o.setXYZ(13,e.r,e.g,e.b),o.setXYZ(14,e.r,e.g,e.b),o.setXYZ(15,e.r,e.g,e.b),o.setXYZ(16,e.r,e.g,e.b),o.setXYZ(17,e.r,e.g,e.b),o.setXYZ(18,e.r,e.g,e.b),o.setXYZ(19,e.r,e.g,e.b),o.setXYZ(20,e.r,e.g,e.b),o.setXYZ(21,e.r,e.g,e.b),o.setXYZ(22,e.r,e.g,e.b),o.setXYZ(23,e.r,e.g,e.b),o.setXYZ(24,t.r,t.g,t.b),o.setXYZ(25,t.r,t.g,t.b),o.setXYZ(26,t.r,t.g,t.b),o.setXYZ(27,t.r,t.g,t.b),o.setXYZ(28,t.r,t.g,t.b),o.setXYZ(29,t.r,t.g,t.b),o.setXYZ(30,t.r,t.g,t.b),o.setXYZ(31,t.r,t.g,t.b),o.setXYZ(32,n.r,n.g,n.b),o.setXYZ(33,n.r,n.g,n.b),o.setXYZ(34,n.r,n.g,n.b),o.setXYZ(35,n.r,n.g,n.b),o.setXYZ(36,n.r,n.g,n.b),o.setXYZ(37,n.r,n.g,n.b),o.setXYZ(38,i.r,i.g,i.b),o.setXYZ(39,i.r,i.g,i.b),o.setXYZ(40,r.r,r.g,r.b),o.setXYZ(41,r.r,r.g,r.b),o.setXYZ(42,r.r,r.g,r.b),o.setXYZ(43,r.r,r.g,r.b),o.setXYZ(44,r.r,r.g,r.b),o.setXYZ(45,r.r,r.g,r.b),o.setXYZ(46,r.r,r.g,r.b),o.setXYZ(47,r.r,r.g,r.b),o.setXYZ(48,r.r,r.g,r.b),o.setXYZ(49,r.r,r.g,r.b),o.needsUpdate=!0,this}update(){const e=this.geometry,t=this.pointMap,n=1,i=1;let r,o;if(pn.projectionMatrixInverse.copy(this.camera.projectionMatrixInverse),this.camera.reversedDepth===!0)r=1,o=0;else if(this.camera.coordinateSystem===2e3)r=-1,o=1;else if(this.camera.coordinateSystem===2001)r=0,o=1;
vendor: 4,744 bytes, line 13
13else throw new Error("THREE.CameraHelper.update(): Invalid coordinate system: "+this.camera.coordinateSystem);yn("c",t,e,pn,0,0,r),yn("t",t,e,pn,0,0,o),yn("n1",t,e,pn,-1,-1,r),yn("n2",t,e,pn,n,-1,r),yn("n3",t,e,pn,-1,i,r),yn("n4",t,e,pn,n,i,r),yn("f1",t,e,pn,-1,-1,o),yn("f2",t,e,pn,n,-1,o),yn("f3",t,e,pn,-1,i,o),yn("f4",t,e,pn,n,i,o),yn("u1",t,e,pn,n*.7,i*1.1,r),yn("u2",t,e,pn,-1*.7,i*1.1,r),yn("u3",t,e,pn,0,i*2,r),yn("cf1",t,e,pn,-1,0,o),yn("cf2",t,e,pn,n,0,o),yn("cf3",t,e,pn,0,-1,o),yn("cf4",t,e,pn,0,i,o),yn("cn1",t,e,pn,-1,0,r),yn("cn2",t,e,pn,n,0,r),yn("cn3",t,e,pn,0,-1,r),yn("cn4",t,e,pn,0,i,r),e.getAttribute("position").needsUpdate=!0}dispose(){this.geometry.dispose(),this.material.dispose()}};function yn(e,t,n,i,r,o,l){bh.set(r,o,l).unproject(i);const u=t[e];if(u!==void 0){const h=n.getAttribute("position");for(let f=0,p=u.length;f<p;f++)h.setXYZ(u[f],bh.x,bh.y,bh.z)}}var Sh=new ti,M5=class extends Ar{constructor(e,t=16776960){const n=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),i=new Float32Array(24),r=new At;r.setIndex(new Jt(n,1)),r.setAttribute("position",new Jt(i,3)),super(r,new fi({color:t,toneMapped:!1})),this.object=e,this.type="BoxHelper",this.matrixAutoUpdate=!1,this.update()}update(){if(this.object!==void 0&&Sh.setFromObject(this.object),Sh.isEmpty())return;const e=Sh.min,t=Sh.max,n=this.geometry.attributes.position,i=n.array;i[0]=t.x,i[1]=t.y,i[2]=t.z,i[3]=e.x,i[4]=t.y,i[5]=t.z,i[6]=e.x,i[7]=e.y,i[8]=t.z,i[9]=t.x,i[10]=e.y,i[11]=t.z,i[12]=t.x,i[13]=t.y,i[14]=e.z,i[15]=e.x,i[16]=t.y,i[17]=e.z,i[18]=e.x,i[19]=e.y,i[20]=e.z,i[21]=t.x,i[22]=e.y,i[23]=e.z,n.needsUpdate=!0,this.geometry.computeBoundingSphere()}setFromObject(e){return this.object=e,this.update(),this}copy(e,t){return super.copy(e,t),this.object=e.object,this}dispose(){this.geometry.dispose(),this.material.dispose()}},w5=class extends Ar{constructor(e,t=16776960){const n=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),i=[1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1],r=new At;r.setIndex(new Jt(n,1)),r.setAttribute("position",new Qe(i,3)),super(r,new fi({color:t,toneMapped:!1})),this.box=e,this.type="Box3Helper",this.geometry.computeBoundingSphere()}updateMatrixWorld(e){const t=this.box;t.isEmpty()||(t.getCenter(this.position),t.getSize(this.scale),this.scale.multiplyScalar(.5),super.updateMatrixWorld(e))}dispose(){this.geometry.dispose(),this.material.dispose()}},E5=class extends Xs{constructor(e,t=1,n=16776960){const i=n,r=[1,-1,0,-1,1,0,-1,-1,0,1,1,0,-1,1,0,-1,-1,0,1,-1,0,1,1,0],o=new At;o.setAttribute("position",new Qe(r,3)),o.computeBoundingSphere(),super(o,new fi({color:i,toneMapped:!1})),this.type="PlaneHelper",this.plane=e,this.size=t;const l=[1,1,0,-1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,-1,0],u=new At;u.setAttribute("position",new Qe(l,3)),u.computeBoundingSphere(),this.add(new Cn(u,new qs({color:i,opacity:.2,transparent:!0,depthWrite:!1,toneMapped:!1})))}updateMatrixWorld(e){this.position.set(0,0,0),this.scale.set(.5*this.size,.5*this.size,1),this.lookAt(this.plane.normal),this.translateZ(-this.plane.constant),super.updateMatrixWorld(e)}dispose(){this.geometry.dispose(),this.material.dispose(),this.children[0].geometry.dispose(),this.children[0].material.dispose()}},Gg=new k,Mh,np,T5=class extends Yt{constructor(e=new k(0,0,1),t=new k(0,0,0),n=1,i=16776960,r=n*.2,o=r*.2){super(),this.type="ArrowHelper",Mh===void 0&&(Mh=new At,Mh.setAttribute("position",new Qe([0,0,0,0,1,0],3)),np=new f0(.5,1,5,1),np.translate(0,-.5,0)),this.position.copy(t),this.line=new Xs(Mh,new fi({color:i,toneMapped:!1})),this.line.matrixAutoUpdate=!1,this.add(this.line),this.cone=new Cn(np,new qs({color:i,toneMapped:!1})),this.cone.matrixAutoUpdate=!1,this.add(this.cone),this.setDirection(e),this.setLength(n,r,o)}setDirection(e){if(e.y>.99999)this.quaternion.set(0,0,0,1);else if(e.y<-.99999)this.quaternion.set(1,0,0,0);else{Gg.set(e.z,0,-e.x).normalize();const t=Math.acos(e.y);this.quaternion.setFromAxisAngle(Gg,t)}}setLength(e,t=e*.2,n=t*.2){this.line.scale.set(1,Math.max(1e-4,e-t),1),this.line.updateMatrix(),this.cone.scale.set(n,t,n),this.cone.position.y=e,this.cone.updateMatrix()}setColor(e){this.line.material.color.set(e),this.cone.material.color.set(e)}copy(e){return super.copy(e,!1),this.line.copy(e.line),this.cone.copy(e.cone),this}dispose(){this.line.geometry.dispose(),this.line.material.dispose(),this.cone.geometry.dispose(),this.cone.material.dispose()}},C5=class extends Ar{constructor(e=1){const t=[0,0,0,e,0,0,0,0,0,0,e,0,0,0,0,0,0,e],n=[1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],i=new At;i.setAttribute("position",new Qe(t,3)),i.setAttribute("color",new Qe(n,3));const r=new fi({vertexColors:!0,toneMapped:!1});super(i,r),this.type="AxesHelper"}
13setColors(e,t,n){const i=new Xe,r=this.geometry.attributes.color.array;return i.set(e),i.toArray(r,0),i.toArray(r,3),i.set(t),i.toArray(r,6),i.toArray(r,9),i.set(n),i.toArray(r,12),i.toArray(r,15),this.geometry.attributes.color.needsUpdate=!0,this}dispose(){this.geometry.dispose(),this.material.dispose()}},A5=class{constructor(){this.type="ShapePath",this.color=new Xe,this.subPaths=[],this.currentPath=null,this.userData={}}moveTo(e,t){return this.currentPath=new Vc,this.subPaths.push(this.currentPath),this.currentPath.moveTo(e,t),this}lineTo(e,t){return this.currentPath.lineTo(e,t),this}quadraticCurveTo(e,t,n,i){return this.currentPath.quadraticCurveTo(e,t,n,i),this}bezierCurveTo(e,t,n,i,r,o){return this.currentPath.bezierCurveTo(e,t,n,i,r,o),this}splineThru(e){return this.currentPath.splineThru(e),this}toShapes(){function e(u,h){let f=!1;const p=h.length;for(let g=0,m=p-1;g<p;m=g++){const v=h[g],b=h[m];v.y>u.y!=b.y>u.y&&u.x<(b.x-v.x)*(u.y-v.y)/(b.y-v.y)+v.x&&(f=!f)}return f}function t(u,h){const f=h.getCenter(new ye);if(e(f,u))return f;const p=f.y,g=[],m=u.length;for(let v=0;v<m;v++){const b=u[v],w=u[(v+1)%m];if(b.y>p!=w.y>p){const S=b.x+(p-b.y)*(w.x-b.x)/(w.y-b.y);g.push(S)}}return g.length>1&&(g.sort((v,b)=>v-b),f.x=(g[0]+g[1])/2),f}let n=this.userData.style&&this.userData.style.fillRule||"nonzero";n!=="nonzero"&&n!=="evenodd"&&(Ue('Fill-rule "'+n+'" is not supported, falling back to "nonzero".'),n="nonzero");const i=n==="nonzero"?(u=>u!==0):(u=>(u&1)!==0),r=[];for(const u of this.subPaths){const h=u.getPoints();if(h.length<3)continue;const f=es.area(h);if(f===0)continue;const p=new Cx;for(let g=0;g<h.length;g++)p.expandByPoint(h[g]);r.push({subPath:u,points:h,boundingBox:p,interiorPoint:t(h,p),absArea:Math.abs(f),winding:f<0?-1:1,container:null,exclude:!1,role:null})}r.sort((u,h)=>h.absArea-u.absArea);for(let u=0;u<r.length;u++){const h=r[u];let f=0;for(let p=u-1;p>=0;p--){const g=r[p];if(g.boundingBox.containsBox(h.boundingBox)&&e(h.interiorPoint,g.points)){h.container=g.exclude?g.container:g,f=g.winding,h.winding+=f;break}}i(h.winding)===i(f)&&(h.exclude=!0)}for(const u of r)u.exclude||(u.role=u.container===null||u.container.role==="hole"?"outer":"hole");const o=[],l=new Map;for(const u of r){if(u.exclude||u.role!=="outer")continue;const h=new Jc;h.curves=u.subPath.curves,o.push(h),l.set(u,h)}for(const u of r){if(u.exclude||u.role!=="hole")continue;const h=l.get(u.container);if(!h)continue;const f=new Vc;f.curves=u.subPath.curves,h.holes.push(f)}return o}},R5=class extends dr{constructor(e,t=null){super(),this.object=e,this.domElement=t,this.enabled=!0,this.state=-1,this.keys={},this.mouseButtons={LEFT:null,MIDDLE:null,RIGHT:null},this.touches={ONE:null,TWO:null}}connect(e){if(e===void 0){Ue("Controls: connect() now requires an element.");return}this.domElement!==null&&this.disconnect(),this.domElement=e}disconnect(){}dispose(){}update(){}};function I5(e,t){const n=e.image&&e.image.width?e.image.width/e.image.height:1;return n>t?(e.repeat.x=1,e.repeat.y=n/t,e.offset.x=0,e.offset.y=(1-e.repeat.y)/2):(e.repeat.x=t/n,e.repeat.y=1,e.offset.x=(1-e.repeat.x)/2,e.offset.y=0),e}function P5(e,t){const n=e.image&&e.image.width?e.image.width/e.image.height:1;return n>t?(e.repeat.x=t/n,e.repeat.y=1,e.offset.x=(1-e.repeat.x)/2,e.offset.y=0):(e.repeat.x=1,e.repeat.y=n/t,e.offset.x=0,e.offset.y=(1-e.repeat.y)/2),e}function N5(e){return e.repeat.x=1,e.repeat.y=1,e.offset.x=0,e.offset.y=0,e}function Ip(e,t,n,i){const r=L5(i);switch(n){case Ov:return e*t;case Kp:return e*t/r.components*r.byteLength;case jh:return e*t/r.components*r.byteLength;case Nc:return e*t*2/r.components*r.byteLength;case Qp:return e*t*2/r.components*r.byteLength;case Fv:return e*t*3/r.components*r.byteLength;case ss:return e*t*4/r.components*r.byteLength;case e0:return e*t*4/r.components*r.byteLength;case kv:case Bv:return Math.floor((e+3)/4)*Math.floor((t+3)/4)*8;case zv:case Vv:return Math.floor((e+3)/4)*Math.floor((t+3)/4)*16;case Hv:case jv:return Math.max(e,16)*Math.max(t,8)/4;case Gv:case Wv:return Math.max(e,8)*Math.max(t,8)/2;case Xv:case qv:case $v:case Zv:return Math.floor((e+3)/4)*Math.floor((t+3)/4)*8;case Yv:case Jv:case Kv:return Math.floor((e+3)/4)*Math.floor((t+3)/4)*16;case Qv:return Math.floor((e+3)/4)*Math.floor((t+3)/4)*16;case ey:return Math.floor((e+4)/5)*Math.floor((t+3)/4)*16;case ty:return Math.floor((e+4)/5)*Math.floor((t+4)/5)*16;case ny:return Math.floor((e+5)/6)*Math.floor((t+4)/5)*16;case iy:return Math.floor((e+5)/6)*Math.floor((t+5)/6)*16;case ry:return Math.floor((e+7)/8)*Math.floor((t+4)/5)*16;case sy:return Math.floor((e+7)/8)*Math.floor((t+5)/6)*16;case ay:return Math.floor((e+7)/8)*Math.floor((t+7)/8)*16;case oy:return Math.floor((e+9)/10)*Math.floor((t+4)/5)*16;case ly:return Math.floor((e+9)/10)*Math.floor((t+5)/6)*16;case cy:return Math.floor((e+9)/10)*Math.floor((t+7)/8)*16;case uy:return Math.floor((e+9)/10)*Math.floor((t+9)/10)*16;case hy:return Math.floor((e+11)/12)*Math.floor((t+9)/10)*16;case fy:return Math.floor((e+11)/12)*Math.floor((t+11)/12)*16;case dy:case py:case my:return Math.ceil(e/4)*Math.ceil(t/4)*16;case gy:case vy:return Math.ceil(e/4)*Math.ceil(t/4)*8;case yy:case xy:return Math.ceil(e/4)*Math.ceil(t/4)*16}throw new Error(`Unable to determine texture byte length for ${n} format.`)}function L5(e){switch(e){case ts:case Pv:return{byteLength:1,components:1};case qp:case Nv:case Hs:return{byteLength:2,components:1};case Yp:case $p:return{byteLength:2,components:4};case is:case Lv:case rs:return{byteLength:4,components:1};case Dv:case Uv:return{byteLength:4,components:3}}throw new Error(`THREE.TextureUtils: Unknown texture type ${e}.`)}var D5=class{static contain(e,t){return I5(e,t)}static cover(e,t){return P5(e,t)}static fill(e){return N5(e)}static getByteLength(e,t,n,i){return Ip(e,t,n,i)}};typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:"185"}}));typeof window<"u"&&(window.__THREE__?Ue("WARNING: Multiple instances of Three.js being imported."):window.__THREE__="
13185");var U5=mb({ACESFilmicToneMapping:()=>4,AddEquation:()=>100,AddOperation:()=>2,AdditiveAnimationBlendMode:()=>t0,AdditiveBlending:()=>2,AgXToneMapping:()=>6,AlphaFormat:()=>Ov,AlwaysCompare:()=>519,AlwaysDepth:()=>1,AlwaysStencilFunc:()=>519,AmbientLight:()=>ux,AnimationAction:()=>Sx,AnimationClip:()=>jc,AnimationLoader:()=>ww,AnimationMixer:()=>t5,AnimationObjectGroup:()=>Qw,AnimationUtils:()=>_w,ArcCurve:()=>h2,ArrayCamera:()=>yx,ArrowHelper:()=>T5,AttachedBindMode:()=>Iv,Audio:()=>_x,AudioAnalyser:()=>Gw,AudioContext:()=>P0,AudioListener:()=>Bw,AudioLoader:()=>Uw,AxesHelper:()=>C5,BackSide:()=>1,BasicDepthPacking:()=>Sy,BasicShadowMap:()=>0,BatchedMesh:()=>$y,BezierInterpolant:()=>ix,Bone:()=>l0,BooleanKeyframeTrack:()=>vo,Box2:()=>Cx,Box3:()=>ti,Box3Helper:()=>w5,BoxGeometry:()=>Zc,BoxHelper:()=>M5,BufferAttribute:()=>Jt,BufferGeometry:()=>At,BufferGeometryLoader:()=>gx,ByteType:()=>Pv,Cache:()=>Cr,Camera:()=>nf,CameraHelper:()=>S5,CanvasTexture:()=>B4,CapsuleGeometry:()=>t2,CatmullRomCurve3:()=>f2,CineonToneMapping:()=>3,CircleGeometry:()=>i2,ClampToEdgeWrapping:()=>bi,Clock:()=>Ex,Color:()=>Xe,ColorKeyframeTrack:()=>T0,ColorManagement:()=>Nt,Compatibility:()=>TM,CompressedArrayTexture:()=>F4,CompressedCubeTexture:()=>k4,CompressedTexture:()=>Jh,CompressedTextureLoader:()=>Ew,ConeGeometry:()=>f0,ConstantAlphaFactor:()=>213,ConstantColorFactor:()=>211,Controls:()=>R5,CubeCamera:()=>vx,CubeDepthTexture:()=>Qy,CubeReflectionMapping:()=>301,CubeRefractionMapping:()=>302,CubeTexture:()=>$c,CubeTextureLoader:()=>Tw,CubeUVReflectionMapping:()=>306,CubicBezierCurve:()=>p0,CubicBezierCurve3:()=>d2,CubicInterpolant:()=>tx,CullFaceBack:()=>1,CullFaceFront:()=>2,CullFaceFrontBack:()=>3,CullFaceNone:()=>0,Curve:()=>pr,CurvePath:()=>m2,CustomBlending:()=>5,CustomToneMapping:()=>5,CylinderGeometry:()=>h0,Cylindrical:()=>c5,Data3DTexture:()=>$h,DataArrayTexture:()=>Yh,DataTexture:()=>$i,DataTextureLoader:()=>Cw,DataUtils:()=>c4,DecrementStencilOp:()=>uM,DecrementWrapStencilOp:()=>fM,DefaultLoadingManager:()=>sx,DepthFormat:()=>Tl,DepthStencilFormat:()=>Jp,DepthTexture:()=>po,DetachedBindMode:()=>KS,DirectionalLight:()=>cx,DirectionalLightHelper:()=>b5,DiscreteInterpolant:()=>nx,DodecahedronGeometry:()=>l2,DoubleSide:()=>2,DstAlphaFactor:()=>206,DstColorFactor:()=>208,DynamicCopyUsage:()=>_M,DynamicDrawUsage:()=>pM,DynamicReadUsage:()=>vM,EdgesGeometry:()=>u2,EllipseCurve:()=>Kh,EqualCompare:()=>514,EqualDepth:()=>4,EqualStencilFunc:()=>514,EquirectangularReflectionMapping:()=>303,EquirectangularRefractionMapping:()=>304,Euler:()=>as,EventDispatcher:()=>dr,ExternalTexture:()=>u0,ExtrudeGeometry:()=>b2,FileLoader:()=>os,Float16BufferAttribute:()=>g4,Float32BufferAttribute:()=>Qe,FloatType:()=>rs,Fog:()=>Oy,FogExp2:()=>Dy,FramebufferTexture:()=>O4,FrontSide:()=>0,Frustum:()=>fo,FrustumArray:()=>qy,GLBufferAttribute:()=>o5,GLSL1:()=>"100",GLSL3:()=>My,GreaterCompare:()=>516,GreaterDepth:()=>6,GreaterEqualCompare:()=>518,GreaterEqualDepth:()=>5,GreaterEqualStencilFunc:()=>518,GreaterStencilFunc:()=>516,GridHelper:()=>x5,Group:()=>Ml,HTMLTexture:()=>z4,HalfFloatType:()=>Hs,HemisphereLight:()=>ax,HemisphereLightHelper:()=>y5,IcosahedronGeometry:()=>M2,ImageBitmapLoader:()=>Dw,ImageLoader:()=>Xc,ImageUtils:()=>Iy,IncrementStencilOp:()=>cM,IncrementWrapStencilOp:()=>hM,InstancedBufferAttribute:()=>Rl,InstancedBufferGeometry:()=>mx,InstancedInterleavedBuffer:()=>a5,InstancedMesh:()=>Xy,Int16BufferAttribute:()=>p4,Int32BufferAttribute:()=>m4,Int8BufferAttribute:()=>h4,IntType:()=>Lv,InterleavedBuffer:()=>Zh,InterleavedBufferAttribute:()=>zc,Interpolant:()=>Ol,InterpolateBezier:()=>Sp,InterpolateDiscrete:()=>Lc,InterpolateLinear:()=>Oh,InterpolateSmooth:()=>Rh,InterpolationSamplingMode:()=>EM,InterpolationSamplingType:()=>wM,InvertStencilOp:()=>dM,KeepStencilOp:()=>Ih,KeyframeTrack:()=>Zi,LOD:()=>Gy,LatheGeometry:()=>E2,Layers:()=>Al,LessCompare:()=>513,LessDepth:()=>2,LessEqualCompare:()=>515,LessEqualDepth:()=>3,LessEqualStencilFunc:()=>515,LessStencilFunc:()=>513,Light:()=>Ys,LightProbe:()=>fx,Line:()=>Xs,Line3:()=>d5,LineBasicMaterial:()=>fi,LineCurve:()=>m0,LineCurve3:()=>p2,LineDashedMaterial:()=>K2,LineLoop:()=>Zy,LineSegments:()=>Ar,LinearFilter:()=>mn,LinearInterpolant:()=>E0,LinearMipMapLinearFilter:()=>nM,LinearMipMapNearestFilter:()=>tM,LinearMipmapLinearFilter:()=>Ll,LinearMipmapNearestFilter:()=>
13Xp,LinearSRGBColorSpace:()=>Uc,LinearToneMapping:()=>1,LinearTransfer:()=>Oc,Loader:()=>Mi,LoaderUtils:()=>Ap,LoadingManager:()=>A0,LoopOnce:()=>rM,LoopPingPong:()=>by,LoopRepeat:()=>_y,MOUSE:()=>ZS,Material:()=>Wn,MaterialBlending:()=>6,MaterialLoader:()=>dx,MathUtils:()=>$M,Matrix2:()=>u5,Matrix3:()=>Et,Matrix4:()=>_t,MaxEquation:()=>104,Mesh:()=>Cn,MeshBasicMaterial:()=>qs,MeshDepthMaterial:()=>M0,MeshDistanceMaterial:()=>w0,MeshLambertMaterial:()=>Z2,MeshMatcapMaterial:()=>J2,MeshNormalMaterial:()=>$2,MeshPhongMaterial:()=>q2,MeshPhysicalMaterial:()=>X2,MeshStandardMaterial:()=>S0,MeshToonMaterial:()=>Y2,MinEquation:()=>103,MirroredRepeatWrapping:()=>Pc,MixOperation:()=>1,MultiplyBlending:()=>4,MultiplyOperation:()=>0,NearestFilter:()=>In,NearestMipMapLinearFilter:()=>eM,NearestMipMapNearestFilter:()=>QS,NearestMipmapLinearFilter:()=>jp,NearestMipmapNearestFilter:()=>Wp,NeutralToneMapping:()=>7,NeverCompare:()=>512,NeverDepth:()=>0,NeverStencilFunc:()=>512,NoBlending:()=>0,NoColorSpace:()=>"",NoNormalPacking:()=>"",NoToneMapping:()=>0,NormalAnimationBlendMode:()=>Xh,NormalBlending:()=>1,NormalGAPacking:()=>"ga",NormalRGPacking:()=>"rg",NotEqualCompare:()=>517,NotEqualDepth:()=>7,NotEqualStencilFunc:()=>517,NumberKeyframeTrack:()=>ef,Object3D:()=>Yt,ObjectLoader:()=>Nw,ObjectSpaceNormalMap:()=>1,OctahedronGeometry:()=>x0,OneFactor:()=>201,OneMinusConstantAlphaFactor:()=>214,OneMinusConstantColorFactor:()=>212,OneMinusDstAlphaFactor:()=>207,OneMinusDstColorFactor:()=>209,OneMinusSrcAlphaFactor:()=>205,OneMinusSrcColorFactor:()=>203,OrthographicCamera:()=>Fl,PCFShadowMap:()=>1,PCFSoftShadowMap:()=>2,PMREMGenerator:()=>Pp,Path:()=>Vc,PerspectiveCamera:()=>kn,Plane:()=>Fs,PlaneGeometry:()=>Qh,PlaneHelper:()=>E5,PointLight:()=>lx,PointLightHelper:()=>g5,Points:()=>Jy,PointsMaterial:()=>c0,PolarGridHelper:()=>_5,PolyhedronGeometry:()=>Ul,PositionalAudio:()=>Vw,PropertyBinding:()=>en,PropertyMixer:()=>bx,QuadraticBezierCurve:()=>g0,QuadraticBezierCurve3:()=>v0,Quaternion:()=>hi,QuaternionKeyframeTrack:()=>tf,QuaternionLinearInterpolant:()=>rx,R11_EAC_Format:()=>$v,RED_GREEN_RGTC2_Format:()=>yy,RED_RGTC1_Format:()=>gy,REVISION:()=>"185",RG11_EAC_Format:()=>Jv,RGBADepthPacking:()=>sM,RGBAFormat:()=>ss,RGBAIntegerFormat:()=>e0,RGBA_ASTC_10x10_Format:()=>uy,RGBA_ASTC_10x5_Format:()=>oy,RGBA_ASTC_10x6_Format:()=>ly,RGBA_ASTC_10x8_Format:()=>cy,RGBA_ASTC_12x10_Format:()=>hy,RGBA_ASTC_12x12_Format:()=>fy,RGBA_ASTC_4x4_Format:()=>Qv,RGBA_ASTC_5x4_Format:()=>ey,RGBA_ASTC_5x5_Format:()=>ty,RGBA_ASTC_6x5_Format:()=>ny,RGBA_ASTC_6x6_Format:()=>iy,RGBA_ASTC_8x5_Format:()=>ry,RGBA_ASTC_8x6_Format:()=>sy,RGBA_ASTC_8x8_Format:()=>ay,RGBA_BPTC_Format:()=>dy,RGBA_ETC2_EAC_Format:()=>Yv,RGBA_PVRTC_2BPPV1_Format:()=>jv,RGBA_PVRTC_4BPPV1_Format:()=>Wv,RGBA_S3TC_DXT1_Format:()=>Bv,RGBA_S3TC_DXT3_Format:()=>zv,RGBA_S3TC_DXT5_Format:()=>Vv,RGBDepthPacking:()=>aM,RGBFormat:()=>Fv,RGBIntegerFormat:()=>iM,RGB_BPTC_SIGNED_Format:()=>py,RGB_BPTC_UNSIGNED_Format:()=>my,RGB_ETC1_Format:()=>Xv,RGB_ETC2_Format:()=>qv,RGB_PVRTC_2BPPV1_Format:()=>Hv,RGB_PVRTC_4BPPV1_Format:()=>Gv,RGB_S3TC_DXT1_Format:()=>kv,RGDepthPacking:()=>oM,RGFormat:()=>Nc,RGIntegerFormat:()=>Qp,RawShaderMaterial:()=>b0,Ray:()=>Dl,Raycaster:()=>wx,RectAreaLight:()=>hx,RedFormat:()=>Kp,RedIntegerFormat:()=>jh,ReinhardToneMapping:()=>2,RenderTarget:()=>i0,RenderTarget3D:()=>n5,RepeatWrapping:()=>Ic,ReplaceStencilOp:()=>lM,ReverseSubtractEquation:()=>102,RingGeometry:()=>R2,SIGNED_R11_EAC_Format:()=>Zv,SIGNED_RED_GREEN_RGTC2_Format:()=>xy,SIGNED_RED_RGTC1_Format:()=>vy,SIGNED_RG11_EAC_Format:()=>Kv,SRGBColorSpace:()=>ci,SRGBTransfer:()=>Fc,Scene:()=>r0,ShaderChunk:()=>It,ShaderLib:()=>ur,ShaderMaterial:()=>Si,ShadowMaterial:()=>H2,Shape:()=>Jc,ShapeGeometry:()=>P2,ShapePath:()=>A5,ShapeUtils:()=>es,ShortType:()=>Nv,Skeleton:()=>Wy,SkeletonHelper:()=>m5,SkinnedMesh:()=>Hy,Source:()=>zs,Sphere:()=>Hn,SphereGeometry:()=>_0,Spherical:()=>l5,SphericalHarmonics3:()=>I0,SplineCurve:()=>y0,SpotLight:()=>ox,SpotLightHelper:()=>p5,Sprite:()=>Vy,SpriteMaterial:()=>o0,SrcAlphaFactor:()=>204,SrcAlphaSaturateFactor:()=>210,SrcColorFactor:()=>202,StaticCopyUsage:()=>xM,StaticDrawUsage:()=>qh,StaticReadUsage:()=>gM,StereoCamera:()=>Ow,StreamCopyUsage:()=>bM,StreamDrawUsage:()=>mM,StreamReadUsage:()=>yM,StringKeyframeTrack:()=>yo,SubtractEquation:()=>101,SubtractiveBlending:()=>
vendor: 6,021 bytes, lines 13-72
133,TOUCH:()=>JS,TangentSpaceNormalMap:()=>0,TetrahedronGeometry:()=>D2,Texture:()=>Ln,TextureLoader:()=>Aw,TextureUtils:()=>D5,Timer:()=>xx,TimestampQuery:()=>MM,TorusGeometry:()=>O2,TorusKnotGeometry:()=>k2,Triangle:()=>ks,TriangleFanDrawMode:()=>2,TriangleStripDrawMode:()=>1,TrianglesDrawMode:()=>0,TubeGeometry:()=>z2,UVMapping:()=>300,Uint16BufferAttribute:()=>s0,Uint32BufferAttribute:()=>a0,Uint8BufferAttribute:()=>f4,Uint8ClampedBufferAttribute:()=>d4,Uniform:()=>i5,UniformsGroup:()=>s5,UniformsLib:()=>ke,UniformsUtils:()=>j2,UnsignedByteType:()=>ts,UnsignedInt101111Type:()=>Uv,UnsignedInt248Type:()=>Zp,UnsignedInt5999Type:()=>Dv,UnsignedIntType:()=>is,UnsignedShort4444Type:()=>Yp,UnsignedShort5551Type:()=>$p,UnsignedShortType:()=>qp,VSMShadowMap:()=>3,Vector2:()=>ye,Vector3:()=>k,Vector4:()=>tn,VectorKeyframeTrack:()=>C0,VideoFrameTexture:()=>U4,VideoTexture:()=>Ky,WebGL3DRenderTarget:()=>e4,WebGLArrayRenderTarget:()=>QM,WebGLCoordinateSystem:()=>Ws,WebGLCubeRenderTarget:()=>L0,WebGLRenderTarget:()=>Fi,WebGLRenderer:()=>Fx,WebGLUtils:()=>Ux,WebGPUCoordinateSystem:()=>SM,WebXRController:()=>Lh,WireframeGeometry:()=>G2,WrapAroundEnding:()=>Dc,ZeroCurvatureEnding:()=>ao,ZeroFactor:()=>200,ZeroSlopeEnding:()=>oo,ZeroStencilOp:()=>0,createCanvasElement:()=>Ey,error:()=>rt,getConsoleFunction:()=>IM,log:()=>Bc,setConsoleFunction:()=>RM,warn:()=>Ue,warnOnce:()=>Gs});function Rx(){let e=null,t=!1,n=null,i=null;function r(o,l){n(o,l),i=e.requestAnimationFrame(r)}return{start:function(){t!==!0&&n!==null&&e!==null&&(i=e.requestAnimationFrame(r),t=!0)},stop:function(){e!==null&&e.cancelAnimationFrame(i),t=!1},setAnimationLoop:function(o){n=o},setContext:function(o){e=o}}}function O5(e){const t=new WeakMap;function n(u,h){const f=u.array,p=u.usage,g=f.byteLength,m=e.createBuffer();e.bindBuffer(h,m),e.bufferData(h,f,p),u.onUploadCallback();let v;if(f instanceof Float32Array)v=e.FLOAT;else if(typeof Float16Array<"u"&&f instanceof Float16Array)v=e.HALF_FLOAT;else if(f instanceof Uint16Array)u.isFloat16BufferAttribute?v=e.HALF_FLOAT:v=e.UNSIGNED_SHORT;else if(f instanceof Int16Array)v=e.SHORT;else if(f instanceof Uint32Array)v=e.UNSIGNED_INT;else if(f instanceof Int32Array)v=e.INT;else if(f instanceof Int8Array)v=e.BYTE;else if(f instanceof Uint8Array)v=e.UNSIGNED_BYTE;else if(f instanceof Uint8ClampedArray)v=e.UNSIGNED_BYTE;else throw new Error("THREE.WebGLAttributes: Unsupported buffer data format: "+f);return{buffer:m,type:v,bytesPerElement:f.BYTES_PER_ELEMENT,version:u.version,size:g}}function i(u,h,f){const p=h.array,g=h.updateRanges;if(e.bindBuffer(f,u),g.length===0)e.bufferSubData(f,0,p);else{g.sort((v,b)=>v.start-b.start);let m=0;for(let v=1;v<g.length;v++){const b=g[m],w=g[v];w.start<=b.start+b.count+1?b.count=Math.max(b.count,w.start+w.count-b.start):(++m,g[m]=w)}g.length=m+1;for(let v=0,b=g.length;v<b;v++){const w=g[v];e.bufferSubData(f,w.start*p.BYTES_PER_ELEMENT,p,w.start,w.count)}h.clearUpdateRanges()}h.onUploadCallback()}function r(u){return u.isInterleavedBufferAttribute&&(u=u.data),t.get(u)}function o(u){u.isInterleavedBufferAttribute&&(u=u.data);const h=t.get(u);h&&(e.deleteBuffer(h.buffer),t.delete(u))}function l(u,h){if(u.isInterleavedBufferAttribute&&(u=u.data),u.isGLBufferAttribute){const p=t.get(u);(!p||p.version<u.version)&&t.set(u,{buffer:u.buffer,type:u.type,bytesPerElement:u.elementSize,version:u.version});return}const f=t.get(u);if(f===void 0)t.set(u,n(u,h));else if(f.version<u.version){if(f.size!==u.array.byteLength)throw new Error("THREE.WebGLAttributes: The size of the buffer attribute's array buffer does not match the original size. Resizing buffer attributes is not supported.");i(f.buffer,u,h),f.version=u.version}}return{get:r,remove:o,update:l}}var It={alphahash_fragment:`#ifdef USE_ALPHAHASH
14	if ( diffuseColor.a < getAlphaHashThreshold( vPosition ) ) discard;
15#endif`,alphahash_pars_fragment:`#ifdef USE_ALPHAHASH
16	const float ALPHA_HASH_SCALE = 0.05;
17	float hash2D( vec2 value ) {
18		return fract( 1.0e4 * sin( 17.0 * value.x + 0.1 * value.y ) * ( 0.1 + abs( sin( 13.0 * value.y + value.x ) ) ) );
19	}
20	float hash3D( vec3 value ) {
21		return hash2D( vec2( hash2D( value.xy ), value.z ) );
22	}
23	float getAlphaHashThreshold( vec3 position ) {
24		float maxDeriv = max(
25			length( dFdx( position.xyz ) ),
26			length( dFdy( position.xyz ) )
27		);
28		float pixScale = 1.0 / ( ALPHA_HASH_SCALE * maxDeriv );
29		vec2 pixScales = vec2(
30			exp2( floor( log2( pixScale ) ) ),
31			exp2( ceil( log2( pixScale ) ) )
32		);
33		vec2 alpha = vec2(
34			hash3D( floor( pixScales.x * position.xyz ) ),
35			hash3D( floor( pixScales.y * position.xyz ) )
36		);
37		float lerpFactor = fract( log2( pixScale ) );
38		float x = ( 1.0 - lerpFactor ) * alpha.x + lerpFactor * alpha.y;
39		float a = min( lerpFactor, 1.0 - lerpFactor );
40		vec3 cases = vec3(
41			x * x / ( 2.0 * a * ( 1.0 - a ) ),
42			( x - 0.5 * a ) / ( 1.0 - a ),
43			1.0 - ( ( 1.0 - x ) * ( 1.0 - x ) / ( 2.0 * a * ( 1.0 - a ) ) )
44		);
45		float threshold = ( x < ( 1.0 - a ) )
46			? ( ( x < a ) ? cases.x : cases.y )
47			: cases.z;
48		return clamp( threshold , 1.0e-6, 1.0 );
49	}
50#endif`,alphamap_fragment:`#ifdef USE_ALPHAMAP
51	diffuseColor.a *= texture2D( alphaMap, vAlphaMapUv ).g;
52#endif`,alphamap_pars_fragment:`#ifdef USE_ALPHAMAP
53	uniform sampler2D alphaMap;
54#endif`,alphatest_fragment:`#ifdef USE_ALPHATEST
55	#ifdef ALPHA_TO_COVERAGE
56	diffuseColor.a = smoothstep( alphaTest, alphaTest + fwidth( diffuseColor.a ), diffuseColor.a );
57	if ( diffuseColor.a == 0.0 ) discard;
58	#else
59	if ( diffuseColor.a < alphaTest ) discard;
60	#endif
61#endif`,alphatest_pars_fragment:`#ifdef USE_ALPHATEST
62	uniform float alphaTest;
63#endif`,aomap_fragment:`#ifdef USE_AOMAP
64	float ambientOcclusion = ( texture2D( aoMap, vAoMapUv ).r - 1.0 ) * aoMapIntensity + 1.0;
65	reflectedLight.indirectDiffuse *= ambientOcclusion;
66	#if defined( USE_CLEARCOAT ) 
67		clearcoatSpecularIndirect *= ambientOcclusion;
68	#endif
69	#if defined( USE_SHEEN ) 
70		sheenSpecularIndirect *= ambientOcclusion;
71	#endif
72	#if defined( USE_ENVMAP ) && defined( STANDARD )
73		float dotNV = saturate( dot( geometryNormal, geometryViewDir ) );
74		reflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.roughness );
75	#endif
76#endif`,aomap_pars_fragment:`#ifdef USE_AOMAP
77	uniform sampler2D aoMap;
78	uniform float aoMapIntensity;
79#endif`,batching_pars_vertex:`#ifdef USE_BATCHING
80	#if ! defined( GL_ANGLE_multi_draw )
81	#define gl_DrawID _gl_DrawID
82	uniform int _gl_DrawID;
83	#endif
84	uniform highp sampler2D batchingTexture;
85	uniform highp usampler2D batchingIdTexture;
86	mat4 getBatchingMatrix( const in float i ) {
87		int size = textureSize( batchingTexture, 0 ).x;
88		int j = int( i ) * 4;
89		int x = j % size;
90		int y = j / size;
91		vec4 v1 = texelFetch( batchingTexture, ivec2( x, y ), 0 );
92		vec4 v2 = texelFetch( batchingTexture, ivec2( x + 1, y ), 0 );
93		vec4 v3 = texelFetch( batchingTexture, ivec2( x + 2, y ), 0 );
94		vec4 v4 = texelFetch( batchingTexture, ivec2( x + 3, y ), 0 );
95		return mat4( v1, v2, v3, v4 );
96	}
97	float getIndirectIndex( const in int i ) {
98		int size = textureSize( batchingIdTexture, 0 ).x;
99		int x = i % size;
100		int y = i / size;
101		return float( texelFetch( batchingIdTexture, ivec2( x, y ), 0 ).r );
102	}
103#endif
104#ifdef USE_BATCHING_COLOR
105	uniform sampler2D batchingColorTexture;
106	vec4 getBatchingColor( const in float i ) {
107		int size = textureSize( batchingColorTexture, 0 ).x;
108		int j = int( i );
109		int x = j % size;
110		int y = j / size;
111		return texelFetch( batchingColorTexture, ivec2( x, y ), 0 );
112	}
113#endif`,batching_vertex:`#ifdef USE_BATCHING
114	mat4 batchingMatrix = getBatchingMatrix( getIndirectIndex( gl_DrawID ) );
115#endif`,begin_vertex:`vec3 transformed = vec3( position );
116#ifdef USE_ALPHAHASH
117	vPosition = vec3( position );
118#endif`,beginnormal_vertex:`vec3 objectNormal = vec3( normal );
119#ifdef USE_TANGENT
120	vec3 objectTangent = vec3( tangent.xyz );
121#endif`,bsdfs:`float G_BlinnPhong_Implicit( ) {
122	return 0.25;
123}
124float D_BlinnPhong( const in float shininess, const in float dotNH ) {
125	return RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );
126}
127vec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float shininess ) {
128	vec3 halfDir = normalize( lightDir + viewDir );
129	float dotNH = saturate( dot( normal, halfDir ) );
130	float dotVH = saturate( dot( viewDir, halfDir ) );
131	vec3 F = F_Schlick( specularColor, 1.0, dotVH );
132	float G = G_BlinnPhong_Implicit( );
133	float D = D_BlinnPhong( shininess, dotNH );
134	return F * ( G * D );
135} // validated`,iridescence_fragment:`#ifdef USE_IRIDESCENCE
136	const mat3 XYZ_TO_REC709 = mat3(
137		 3.2404542, -0.9692660,  0.0556434,
138		-1.5371385,  1.8760108, -0.2040259,
139		-0.4985314,  0.0415560,  1.0572252
140	);
141	vec3 Fresnel0ToIor( vec3 fresnel0 ) {
142		vec3 sqrtF0 = sqrt( fresnel0 );
143		return ( vec3( 1.0 ) + sqrtF0 ) / ( vec3( 1.0 ) - sqrtF0 );
144	}
145	vec3 IorToFresnel0( vec3 transmittedIor, float incidentIor ) {
146		return pow2( ( transmittedIor - vec3( incidentIor ) ) / ( transmittedIor + vec3( incidentIor ) ) );
147	}
148	float IorToFresnel0( float transmittedIor, float incidentIor ) {
149		return pow2( ( transmittedIor - incidentIor ) / ( transmittedIor + incidentIor ));
150	}
151	vec3 evalSensitivity( float OPD, vec3 shift ) {
152		float phase = 2.0 * PI * OPD * 1.0e-9;
153		vec3 val = vec3( 5.4856e-13, 4.4201e-13, 5.2481e-13 );
154		vec3 pos = vec3( 1.6810e+06, 1.7953e+06, 2.2084e+06 );
155		vec3 var = vec3( 4.3278e+09, 9.3046e+09, 6.6121e+09 );
156		vec3 xyz = val * sqrt( 2.0 * PI * var ) * cos( pos * phase + shift ) * exp( - pow2( phase ) * var );
157		xyz.x += 9.7470e-14 * sqrt( 2.0 * PI * 4.5282e+09 ) * cos( 2.2399e+06 * phase + shift[ 0 ] ) * exp( - 4.5282e+09 * pow2( phase ) );
158		xyz /= 1.0685e-7;
159		vec3 rgb = XYZ_TO_REC709 * xyz;
160		return rgb;
161	}
162	vec3 evalIridescence( float outsideIOR, float eta2, float cosTheta1, float thinFilmThickness, vec3 baseF0 ) {
163		vec3 I;
164		float iridescenceIOR = mix( outsideIOR, eta2, smoothstep( 0.0, 0.03, thinFilmThickness ) );
165		float sinTheta2Sq = pow2( outsideIOR / iridescenceIOR ) * ( 1.0 - pow2( cosTheta1 ) );
166		float cosTheta2Sq = 1.0 - sinTheta2Sq;
167		if ( cosTheta2Sq < 0.0 ) {
168			return vec3( 1.0 );
169		}
170		float cosTheta2 = sqrt( cosTheta2Sq );
171		float R0 = IorToFresnel0( iridescenceIOR, outsideIOR );
172		float R12 = F_Schlick( R0, 1.0, cosTheta1 );
173		float T121 = 1.0 - R12;
174		float phi12 = 0.0;
175		if ( iridescenceIOR < outsideIOR ) phi12 = PI;
176		float phi21 = PI - phi12;
177		vec3 baseIOR = Fresnel0ToIor( clamp( baseF0, 0.0, 0.9999 ) );		vec3 R1 = IorToFresnel0( baseIOR, iridescenceIOR );
178		vec3 R23 = F_Schlick( R1, 1.0, cosTheta2 );
179		vec3 phi23 = vec3( 0.0 );
180		if ( baseIOR[ 0 ] < iridescenceIOR ) phi23[ 0 ] = PI;
181		if ( baseIOR[ 1 ] < iridescenceIOR ) phi23[ 1 ] = PI;
182		if ( baseIOR[ 2 ] < iridescenceIOR ) phi23[ 2 ] = PI;
183		float OPD = 2.0 * iridescenceIOR * thinFilmThickness * cosTheta2;
184		vec3 phi = vec3( phi21 ) + phi23;
185		vec3 R123 = clamp( R12 * R23, 1e-5, 0.9999 );
186		vec3 r123 = sqrt( R123 );
187		vec3 Rs = pow2( T121 ) * R23 / ( vec3( 1.0 ) - R123 );
188		vec3 C0 = R12 + Rs;
189		I = C0;
190		vec3 Cm = Rs - T121;
191		for ( int m = 1; m <= 2; ++ m ) {
192			Cm *= r123;
193			vec3 Sm = 2.0 * evalSensitivity( float( m ) * OPD, float( m ) * phi );
194			I += Cm * Sm;
195		}
196		return max( I, vec3( 0.0 ) );
197	}
198#endif`,bumpmap_pars_fragment:`#ifdef USE_BUMPMAP
199	uniform sampler2D bumpMap;
200	uniform float bumpScale;
201	vec2 dHdxy_fwd() {
202		vec2 dSTdx = dFdx( vBumpMapUv );
203		vec2 dSTdy = dFdy( vBumpMapUv );
204		float Hll = bumpScale * texture2D( bumpMap, vBumpMapUv ).x;
205		float dBx = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdx ).x - Hll;
206		float dBy = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdy ).x - Hll;
207		return vec2( dBx, dBy );
208	}
209	vec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy, float faceDirection ) {
210		vec3 vSigmaX = normalize( dFdx( surf_pos.xyz ) );
211		vec3 vSigmaY = normalize( dFdy( surf_pos.xyz ) );
212		vec3 vN = surf_norm;
213		vec3 R1 = cross( vSigmaY, vN );
214		vec3 R2 = cross( vN, vSigmaX );
215		float fDet = dot( vSigmaX, R1 ) * faceDirection;
216		vec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );
217		return normalize( abs( fDet ) * surf_norm - vGrad );
218	}
219#endif`,clipping_planes_fragment:`#if NUM_CLIPPING_PLANES > 0
220	vec4 plane;
221	#ifdef ALPHA_TO_COVERAGE
222		float distanceToPlane, distanceGradient;
223		float clipOpacity = 1.0;
224		#pragma unroll_loop_start
225		for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {
226			plane = clippingPlanes[ i ];
227			distanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w;
228			distanceGradient = fwidth( distanceToPlane ) / 2.0;
229			clipOpacity *= smoothstep( - distanceGradient, distanceGradient, distanceToPlane );
230			if ( clipOpacity == 0.0 ) discard;
231		}
232		#pragma unroll_loop_end
233		#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES
234			float unionClipOpacity = 1.0;
235			#pragma unroll_loop_start
236			for ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {
237				plane = clippingPlanes[ i ];
238				distanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w;
239				distanceGradient = fwidth( distanceToPlane ) / 2.0;
240				unionClipOpacity *= 1.0 - smoothstep( - distanceGradient, distanceGradient, distanceToPlane );
241			}
242			#pragma unroll_loop_end
243			clipOpacity *= 1.0 - unionClipOpacity;
244		#endif
245		diffuseColor.a *= clipOpacity;
246		if ( diffuseColor.a == 0.0 ) discard;
247	#else
248		#pragma unroll_loop_start
249		for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {
250			plane = clippingPlanes[ i ];
251			if ( dot( vClipPosition, plane.xyz ) > plane.w ) discard;
252		}
253		#pragma unroll_loop_end
254		#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES
255			bool clipped = true;
256			#pragma unroll_loop_start
257			for ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {
258				plane = clippingPlanes[ i ];
259				clipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped;
260			}
261			#pragma unroll_loop_end
262			if ( clipped ) discard;
263		#endif
264	#endif
265#endif`,clipping_planes_pars_fragment:`#if NUM_CLIPPING_PLANES > 0
266	varying vec3 vClipPosition;
267	uniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];
268#endif`,clipping_planes_pars_vertex:`#if NUM_CLIPPING_PLANES > 0
269	varying vec3 vClipPosition;
270#endif`,clipping_planes_vertex:`#if NUM_CLIPPING_PLANES > 0
271	vClipPosition = - mvPosition.xyz;
272#endif`,color_fragment:`#if defined( USE_COLOR ) || defined( USE_COLOR_ALPHA )
273	diffuseColor *= vColor;
274#endif`,color_pars_fragment:`#if defined( USE_COLOR ) || defined( USE_COLOR_ALPHA )
275	varying vec4 vColor;
276#endif`,color_pars_vertex:`#if defined( USE_COLOR ) || defined( USE_COLOR_ALPHA ) || defined( USE_INSTANCING_COLOR ) || defined( USE_BATCHING_COLOR )
277	varying vec4 vColor;
278#endif`,color_vertex:`#if defined( USE_COLOR ) || defined( USE_COLOR_ALPHA ) || defined( USE_INSTANCING_COLOR ) || defined( USE_BATCHING_COLOR )
279	vColor = vec4( 1.0 );
280#endif
281#ifdef USE_COLOR_ALPHA
282	vColor *= color;
283#elif defined( USE_COLOR )
284	vColor.rgb *= color;
285#endif
286#ifdef USE_INSTANCING_COLOR
287	vColor.rgb *= instanceColor.rgb;
288#endif
289#ifdef USE_BATCHING_COLOR
290	vColor *= getBatchingColor( getIndirectIndex( gl_DrawID ) );
291#endif`,common:`#define PI 3.141592653589793
292#define PI2 6.283185307179586
293#define PI_HALF 1.5707963267948966
294#define RECIPROCAL_PI 0.3183098861837907
295#define RECIPROCAL_PI2 0.15915494309189535
296#define EPSILON 1e-6
297#ifndef saturate
298#define saturate( a ) clamp( a, 0.0, 1.0 )
299#endif
300#define whiteComplement( a ) ( 1.0 - saturate( a ) )
301float pow2( const in float x ) { return x*x; }
302vec3 pow2( const in vec3 x ) { return x*x; }
303float pow3( const in float x ) { return x*x*x; }
304float pow4( const in float x ) { float x2 = x*x; return x2*x2; }
305float max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); }
306float average( const in vec3 v ) { return dot( v, vec3( 0.3333333 ) ); }
307highp float rand( const in vec2 uv ) {
308	const highp float a = 12.9898, b = 78.233, c = 43758.5453;
309	highp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );
310	return fract( sin( sn ) * c );
311}
312#ifdef HIGH_PRECISION
313	float precisionSafeLength( vec3 v ) { return length( v ); }
314#else
315	float precisionSafeLength( vec3 v ) {
316		float maxComponent = max3( abs( v ) );
317		return length( v / maxComponent ) * maxComponent;
318	}
319#endif
320struct IncidentLight {
321	vec3 color;
322	vec3 direction;
323	bool visible;
324};
325struct ReflectedLight {
326	vec3 directDiffuse;
327	vec3 directSpecular;
328	vec3 indirectDiffuse;
329	vec3 indirectSpecular;
330};
331#ifdef USE_ALPHAHASH
332	varying vec3 vPosition;
333#endif
334vec3 transformDirection( in vec3 dir, in mat4 matrix ) {
335	return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );
336}
337#define inverseTransformDirection transformDirectionByInverseViewMatrix
338vec3 transformNormalByInverseViewMatrix( in vec3 normal, in mat4 viewMatrix ) {
339	return normalize( ( vec4( normal, 0.0 ) * viewMatrix ).xyz );
340}
341vec3 transformDirectionByInverseViewMatrix( in vec3 dir, in mat4 viewMatrix ) {
342	return normalize( ( vec4( dir, 0.0 ) * viewMatrix ).xyz );
343}
344bool isPerspectiveMatrix( mat4 m ) {
345	return m[ 2 ][ 3 ] == - 1.0;
346}
347vec2 equirectUv( in vec3 dir ) {
348	float u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5;
349	float v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;
350	return vec2( u, v );
351}
352vec3 BRDF_Lambert( const in vec3 diffuseColor ) {
353	return RECIPROCAL_PI * diffuseColor;
354}
355vec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) {
356	float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );
357	return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );
358}
359float F_Schlick( const in float f0, const in float f90, const in float dotVH ) {
360	float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );
361	return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );
362} // validated`,cube_uv_reflection_fragment:`#ifdef ENVMAP_TYPE_CUBE_UV
363	#define cubeUV_minMipLevel 4.0
364	#define cubeUV_minTileSize 16.0
365	float getFace( vec3 direction ) {
366		vec3 absDirection = abs( direction );
367		float face = - 1.0;
368		if ( absDirection.x > absDirection.z ) {
369			if ( absDirection.x > absDirection.y )
370				face = direction.x > 0.0 ? 0.0 : 3.0;
371			else
372				face = direction.y > 0.0 ? 1.0 : 4.0;
373		} else {
374			if ( absDirection.z > absDirection.y )
375				face = direction.z > 0.0 ? 2.0 : 5.0;
376			else
377				face = direction.y > 0.0 ? 1.0 : 4.0;
378		}
379		return face;
380	}
381	vec2 getUV( vec3 direction, float face ) {
382		vec2 uv;
383		if ( face == 0.0 ) {
384			uv = vec2( direction.z, direction.y ) / abs( direction.x );
385		} else if ( face == 1.0 ) {
386			uv = vec2( - direction.x, - direction.z ) / abs( direction.y );
387		} else if ( face == 2.0 ) {
388			uv = vec2( - direction.x, direction.y ) / abs( direction.z );
389		} else if ( face == 3.0 ) {
390			uv = vec2( - direction.z, direction.y ) / abs( direction.x );
391		} else if ( face == 4.0 ) {
392			uv = vec2( - direction.x, direction.z ) / abs( direction.y );
393		} else {
394			uv = vec2( direction.x, direction.y ) / abs( direction.z );
395		}
396		return 0.5 * ( uv + 1.0 );
397	}
398	vec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) {
399		float face = getFace( direction );
400		float filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );
401		mipInt = max( mipInt, cubeUV_minMipLevel );
402		float faceSize = exp2( mipInt );
403		highp vec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0;
404		if ( face > 2.0 ) {
405			uv.y += faceSize;
406			face -= 3.0;
407		}
408		uv.x += face * faceSize;
409		uv.x += filterInt * 3.0 * cubeUV_minTileSize;
410		uv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize );
411		uv.x *= CUBEUV_TEXEL_WIDTH;
412		uv.y *= CUBEUV_TEXEL_HEIGHT;
413		#ifdef texture2DGradEXT
414			return texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb;
415		#else
416			return texture2D( envMap, uv ).rgb;
417		#endif
418	}
419	#define cubeUV_r0 1.0
420	#define cubeUV_m0 - 2.0
421	#define cubeUV_r1 0.8
422	#define cubeUV_m1 - 1.0
423	#define cubeUV_r4 0.4
424	#define cubeUV_m4 2.0
425	#define cubeUV_r5 0.305
426	#define cubeUV_m5 3.0
427	#define cubeUV_r6 0.21
428	#define cubeUV_m6 4.0
429	float roughnessToMip( float roughness ) {
430		float mip = 0.0;
431		if ( roughness >= cubeUV_r1 ) {
432			mip = ( cubeUV_r0 - roughness ) * ( cubeUV_m1 - cubeUV_m0 ) / ( cubeUV_r0 - cubeUV_r1 ) + cubeUV_m0;
433		} else if ( roughness >= cubeUV_r4 ) {
434			mip = ( cubeUV_r1 - roughness ) * ( cubeUV_m4 - cubeUV_m1 ) / ( cubeUV_r1 - cubeUV_r4 ) + cubeUV_m1;
435		} else if ( roughness >= cubeUV_r5 ) {
436			mip = ( cubeUV_r4 - roughness ) * ( cubeUV_m5 - cubeUV_m4 ) / ( cubeUV_r4 - cubeUV_r5 ) + cubeUV_m4;
437		} else if ( roughness >= cubeUV_r6 ) {
438			mip = ( cubeUV_r5 - roughness ) * ( cubeUV_m6 - cubeUV_m5 ) / ( cubeUV_r5 - cubeUV_r6 ) + cubeUV_m5;
439		} else {
440			mip = - 2.0 * log2( 1.16 * roughness );		}
441		return mip;
442	}
443	vec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) {
444		float mip = clamp( roughnessToMip( roughness ), cubeUV_m0, CUBEUV_MAX_MIP );
445		float mipF = fract( mip );
446		float mipInt = floor( mip );
447		vec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt );
448		if ( mipF == 0.0 ) {
449			return vec4( color0, 1.0 );
450		} else {
451			vec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 );
452			return vec4( mix( color0, color1, mipF ), 1.0 );
453		}
454	}
455#endif`,defaultnormal_vertex:`vec3 transformedNormal = objectNormal;
456#ifdef USE_TANGENT
457	vec3 transformedTangent = objectTangent;
458#endif
459#ifdef USE_BATCHING
460	mat3 bm = mat3( batchingMatrix );
461	transformedNormal /= vec3( dot( bm[ 0 ], bm[ 0 ] ), dot( bm[ 1 ], bm[ 1 ] ), dot( bm[ 2 ], bm[ 2 ] ) );
462	transformedNormal = bm * transformedNormal;
463	#ifdef USE_TANGENT
464		transformedTangent = bm * transformedTangent;
465	#endif
466#endif
467#ifdef USE_INSTANCING
468	mat3 im = mat3( instanceMatrix );
469	transformedNormal /= vec3( dot( im[ 0 ], im[ 0 ] ), dot( im[ 1 ], im[ 1 ] ), dot( im[ 2 ], im[ 2 ] ) );
470	transformedNormal = im * transformedNormal;
471	#ifdef USE_TANGENT
472		transformedTangent = im * transformedTangent;
473	#endif
474#endif
475transformedNormal = normalMatrix * transformedNormal;
476#ifdef FLIP_SIDED
477	transformedNormal = - transformedNormal;
478#endif
479#ifdef USE_TANGENT
480	transformedTangent = ( modelViewMatrix * vec4( transformedTangent, 0.0 ) ).xyz;
481#endif`,displacementmap_pars_vertex:`#ifdef USE_DISPLACEMENTMAP
482	uniform sampler2D displacementMap;
483	uniform float displacementScale;
484	uniform float displacementBias;
485#endif`,displacementmap_vertex:`#ifdef USE_DISPLACEMENTMAP
486	transformed += normalize( objectNormal ) * ( texture2D( displacementMap, vDisplacementMapUv ).x * displacementScale + dis
486placementBias );
487#endif`,emissivemap_fragment:`#ifdef USE_EMISSIVEMAP
488	vec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv );
489	#ifdef DECODE_VIDEO_TEXTURE_EMISSIVE
490		emissiveColor = sRGBTransferEOTF( emissiveColor );
491	#endif
492	totalEmissiveRadiance *= emissiveColor.rgb;
493#endif`,emissivemap_pars_fragment:`#ifdef USE_EMISSIVEMAP
494	uniform sampler2D emissiveMap;
495#endif`,colorspace_fragment:"gl_FragColor = linearToOutputTexel( gl_FragColor );",colorspace_pars_fragment:`vec4 LinearTransferOETF( in vec4 value ) {
496	return value;
497}
498vec4 sRGBTransferEOTF( in vec4 value ) {
499	return vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.a );
500}
501vec4 sRGBTransferOETF( in vec4 value ) {
502	return vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a );
503}`,envmap_fragment:`#ifdef USE_ENVMAP
504	#ifdef ENV_WORLDPOS
505		vec3 cameraToFrag;
506		if ( isOrthographic ) {
507			cameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );
508		} else {
509			cameraToFrag = normalize( vWorldPosition - cameraPosition );
510		}
511		vec3 worldNormal = transformNormalByInverseViewMatrix( normal, viewMatrix );
512		#ifdef ENVMAP_MODE_REFLECTION
513			vec3 reflectVec = reflect( cameraToFrag, worldNormal );
514		#else
515			vec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio );
516		#endif
517	#else
518		vec3 reflectVec = vReflect;
519	#endif
520	#ifdef ENVMAP_TYPE_CUBE
521		vec4 envColor = textureCube( envMap, envMapRotation * reflectVec );
522		#ifdef ENVMAP_BLENDING_MULTIPLY
523			outgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );
524		#elif defined( ENVMAP_BLENDING_MIX )
525			outgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );
526		#elif defined( ENVMAP_BLENDING_ADD )
527			outgoingLight += envColor.xyz * specularStrength * reflectivity;
528		#endif
529	#endif
530#endif`,envmap_common_pars_fragment:`#ifdef USE_ENVMAP
531	uniform float envMapIntensity;
532	uniform mat3 envMapRotation;
533	#ifdef ENVMAP_TYPE_CUBE
534		uniform samplerCube envMap;
535	#else
536		uniform sampler2D envMap;
537	#endif
538#endif`,envmap_pars_fragment:`#ifdef USE_ENVMAP
539	uniform float reflectivity;
540	#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )
541		#define ENV_WORLDPOS
542	#endif
543	#ifdef ENV_WORLDPOS
544		varying vec3 vWorldPosition;
545		uniform float refractionRatio;
546	#else
547		varying vec3 vReflect;
548	#endif
549#endif`,envmap_pars_vertex:`#ifdef USE_ENVMAP
550	#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )
551		#define ENV_WORLDPOS
552	#endif
553	#ifdef ENV_WORLDPOS
554		
555		varying vec3 vWorldPosition;
556	#else
557		varying vec3 vReflect;
558		uniform float refractionRatio;
559	#endif
560#endif`,envmap_physical_pars_fragment:`#ifdef USE_ENVMAP
561	vec3 getIBLIrradiance( const in vec3 normal ) {
562		#ifdef ENVMAP_TYPE_CUBE_UV
563			vec3 worldNormal = transformNormalByInverseViewMatrix( normal, viewMatrix );
564			vec4 envMapColor = textureCubeUV( envMap, envMapRotation * worldNormal, 1.0 );
565			return PI * envMapColor.rgb * envMapIntensity;
566		#else
567			return vec3( 0.0 );
568		#endif
569	}
570	vec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) {
571		#ifdef ENVMAP_TYPE_CUBE_UV
572			vec3 reflectVec = reflect( - viewDir, normal );
573			reflectVec = normalize( mix( reflectVec, normal, pow4( roughness ) ) );
574			reflectVec = transformDirectionByInverseViewMatrix( reflectVec, viewMatrix );
575			vec4 envMapColor = textureCubeUV( envMap, envMapRotation * reflectVec, roughness );
576			return envMapColor.rgb * envMapIntensity;
577		#else
578			return vec3( 0.0 );
579		#endif
580	}
581	#ifdef USE_ANISOTROPY
582		vec3 getIBLAnisotropyRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in vec3 bitangent, const in float anisotropy ) {
583			#ifdef ENVMAP_TYPE_CUBE_UV
584				vec3 bentNormal = cross( bitangent, viewDir );
585				bentNormal = normalize( cross( bentNormal, bitangent ) );
586				bentNormal = normalize( mix( bentNormal, normal, pow2( pow2( 1.0 - anisotropy * ( 1.0 - roughness ) ) ) ) );
587				return getIBLRadiance( viewDir, bentNormal, roughness );
588			#else
589				return vec3( 0.0 );
590			#endif
591		}
592	#endif
593#endif`,envmap_vertex:`#ifdef USE_ENVMAP
594	#ifdef ENV_WORLDPOS
595		vWorldPosition = worldPosition.xyz;
596	#else
597		vec3 cameraToVertex;
598		if ( isOrthographic ) {
599			cameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );
600		} else {
601			cameraToVertex = normalize( worldPosition.xyz - cameraPosition );
602		}
603		vec3 worldNormal = transformNormalByInverseViewMatrix( transformedNormal, viewMatrix );
604		#ifdef ENVMAP_MODE_REFLECTION
605			vReflect = reflect( cameraToVertex, worldNormal );
606		#else
607			vReflect = refract( cameraToVertex, worldNormal, refractionRatio );
608		#endif
609	#endif
610#endif`,fog_vertex:`#ifdef USE_FOG
611	vFogDepth = - mvPosition.z;
612#endif`,fog_pars_vertex:`#ifdef USE_FOG
613	varying float vFogDepth;
614#endif`,fog_fragment:`#ifdef USE_FOG
615	#ifdef FOG_EXP2
616		float fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth );
617	#else
618		float fogFactor = smoothstep( fogNear, fogFar, vFogDepth );
619	#endif
620	gl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );
621#endif`,fog_pars_fragment:`#ifdef USE_FOG
622	uniform vec3 fogColor;
623	varying float vFogDepth;
624	#ifdef FOG_EXP2
625		uniform float fogDensity;
626	#else
627		uniform float fogNear;
628		uniform float fogFar;
629	#endif
630#endif`,gradientmap_pars_fragment:`#ifdef USE_GRADIENTMAP
631	uniform sampler2D gradientMap;
632#endif
633vec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {
634	float dotNL = dot( normal, lightDirection );
635	vec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );
636	#ifdef USE_GRADIENTMAP
637		return vec3( texture2D( gradientMap, coord ).r );
638	#else
639		vec2 fw = fwidth( coord ) * 0.5;
640		return mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) );
641	#endif
642}`,lightmap_pars_fragment:`#ifdef USE_LIGHTMAP
643	uniform sampler2D lightMap;
644	uniform float lightMapIntensity;
645#endif`,lights_lambert_fragment:`LambertMaterial material;
646material.diffuseColor = diffuseColor.rgb;
647material.specularStrength = specularStrength;`,lights_lambert_pars_fragment:`varying vec3 vViewPosition;
648struct LambertMaterial {
649	vec3 diffuseColor;
650	float specularStrength;
651};
652void RE_Direct_Lambert( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {
653	float dotNL = saturate( dot( geometryNormal, directLight.direction ) );
654	vec3 irradiance = dotNL * directLight.color;
655	reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );
656}
657void RE_IndirectDiffuse_Lambert( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {
658	reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );
659}
660#define RE_Direct				RE_Direct_Lambert
661#define RE_IndirectDiffuse		RE_IndirectDiffuse_Lambert`,lights_pars_begin:`uniform bool receiveShadow;
662uniform vec3 ambientLightColor;
663#if defined( USE_LIGHT_PROBES )
664	uniform vec3 lightProbe[ 9 ];
665#endif
666vec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {
667	float x = normal.x, y = normal.y, z = normal.z;
668	vec3 result = shCoefficients[ 0 ] * 0.886227;
669	result += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;
670	result += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;
671	result += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;
672	result += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;
673	result += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;
674	result += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );
675	result += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;
676	result += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );
677	return result;
678}
679vec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in vec3 normal ) {
680	vec3 worldNormal = transformNormalByInverseViewMatrix( normal, viewMatrix );
681	vec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe );
682	return irradiance;
683}
684vec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {
685	vec3 irradiance = ambientLightColor;
686	return irradiance;
687}
688float getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {
689	float distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );
690	if ( cutoffDistance > 0.0 ) {
691		distanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );
692	}
693	return distanceFalloff;
694}
695float getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) {
696	return smoothstep( coneCosine, penumbraCosine, angleCosine );
697}
698#if NUM_DIR_LIGHTS > 0
699	struct DirectionalLight {
700		vec3 direction;
701		vec3 color;
702	};
703	uniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];
704	void getDirectionalLightInfo( const in DirectionalLight directionalLight, out IncidentLight light ) {
705		light.color = directionalLight.color;
706		light.direction = directionalLight.direction;
707		light.visible = true;
708	}
709#endif
710#if NUM_POINT_LIGHTS > 0
711	struct PointLight {
712		vec3 position;
713		vec3 color;
714		float distance;
715		float decay;
716	};
717	uniform PointLight pointLights[ NUM_POINT_LIGHTS ];
718	void getPointLightInfo( const in PointLight pointLight, const in vec3 geometryPosition, out IncidentLight light ) {
719		vec3 lVector = pointLight.position - geometryPosition;
720		light.direction = normalize( lVector );
721		float lightDistance = length( lVector );
722		light.color = pointLight.color;
723		light.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay );
724		light.visible = ( light.color != vec3( 0.0 ) );
725	}
726#endif
727#if NUM_SPOT_LIGHTS > 0
728	struct SpotLight {
729		vec3 position;
730		vec3 direction;
731		vec3 color;
732		float distance;
733		float decay;
734		float coneCos;
735		float penumbraCos;
736	};
737	uniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];
738	void getSpotLightInfo( const in SpotLight spotLight, const in vec3 geometryPosition, out IncidentLight light ) {
739		vec3 lVector = spotLight.position - geometryPosition;
740		light.direction = normalize( lVector );
741		float angleCos = dot( light.direction, spotLight.direction );
742		float spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos );
743		if ( spotAttenuation > 0.0 ) {
744			float lightDistance = length( lVector );
745			light.color = spotLight.color * spotAttenuation;
746			light.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay );
747			light.visible = ( light.color != vec3( 0.0 ) );
748		} else {
749			light.color = vec3( 0.0 );
750			light.visible = false;
751		}
752	}
753#endif
754#if NUM_RECT_AREA_LIGHTS > 0
755	struct RectAreaLight {
756		vec3 color;
757		vec3 position;
758		vec3 halfWidth;
759		vec3 halfHeight;
760	};
761	uniform sampler2D ltc_1;	uniform sampler2D ltc_2;
762	uniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];
763#endif
764#if NUM_HEMI_LIGHTS > 0
765	struct HemisphereLight {
766		vec3 direction;
767		vec3 skyColor;
768		vec3 groundColor;
769	};
770	uniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];
771	vec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in vec3 normal ) {
772		float dotNL = dot( normal, hemiLight.direction );
773		float hemiDiffuseWeight = 0.5 * dotNL + 0.5;
774		vec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );
775		return irradiance;
776	}
777#endif
778#include <lightprobes_pars_fragment>`,lights_toon_fragment:`ToonMaterial material;
779material.diffuseColor = diffuseColor.rgb;`,lights_toon_pars_fragment:`varying vec3 vViewPosition;
780struct ToonMaterial {
781	vec3 diffuseColor;
782};
783void RE_Direct_Toon( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {
784	vec3 irradiance = getGradientIrradiance( geometryNormal, directLight.direction ) * directLight.color;
785	reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );
786}
787void RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {
788	reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );
789}
790#define RE_Direct				RE_Direct_Toon
791#define RE_IndirectDiffuse		RE_IndirectDiffuse_Toon`,lights_phong_fragment:`BlinnPhongMaterial material;
792material.diffuseColor = diffuseColor.rgb;
793material.specularColor = specular;
794material.specularShininess = shininess;
795material.specularStrength = specularStrength;`,lights_phong_pars_fragment:`varying vec3 vViewPosition;
796struct BlinnPhongMaterial {
797	vec3 diffuseColor;
798	vec3 specularColor;
799	float specularShininess;
800	float specularStrength;
801};
802void RE_Direct_BlinnPhong( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {
803	float dotNL = saturate( dot( geometryNormal, directLight.direction ) );
804	vec3 irradiance = dotNL * directLight.color;
805	reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );
806	reflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometryViewDir, geometryNormal, material.specularColor, material.specularShininess ) * material.specularStrength;
807}
808void RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {
809	reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );
810}
811#define RE_Direct				RE_Direct_BlinnPhong
812#define RE_IndirectDiffuse		RE_IndirectDiffuse_BlinnPhong`,lights_physical_fragment:`PhysicalMaterial material;
813material.diffuseColor = diffuseColor.rgb;
814material.diffuseContribution = diffuseColor.rgb * ( 1.0 - metalnessFactor );
815material.metalness = metalnessFactor;
816vec3 dxy = max( abs( dFdx( nonPerturbedNormal ) ), abs( dFdy( nonPerturbedNormal ) ) );
817float geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );
818material.roughness = max( roughnessFactor, 0.0525 );material.roughness += geometryRoughness;
819material.roughness = min( material.roughness, 1.0 );
820#ifdef IOR
821	material.ior = ior;
822	#ifdef USE_SPECULAR
823		float specularIntensityFactor = specularIntensity;
824		vec3 specularColorFactor = specularColor;
825		#ifdef USE_SPECULAR_COLORMAP
826			specularColorFactor *= texture2D( specularColorMap, vSpecularColorMapUv ).rgb;
827		#endif
828		#ifdef USE_SPECULAR_INTENSITYMAP
829			specularIntensityFactor *= texture2D( specularIntensityMap, vSpecularIntensityMapUv ).a;
830		#endif
831		material.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor );
832	#else
833		float specularIntensityFactor = 1.0;
834		vec3 specularColorFactor = vec3( 1.0 );
835		material.specularF90 = 1.0;
836	#endif
837	material.specularColor = min( pow2( ( material.ior - 1.0 ) / ( material.ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor;
838	material.specularColorBlended = mix( material.specularColor, diffuseColor.rgb, metalnessFactor );
839#else
840	material.specularColor = vec3( 0.04 );
841	material.specularColorBlended = mix( material.specularColor, diffuseColor.rgb, metalnessFactor );
842	material.specularF90 = 1.0;
843#endif
844#ifdef USE_CLEARCOAT
845	material.clearcoat = clearcoat;
846	material.clearcoatRoughness = clearcoatRoughness;
847	material.clearcoatF0 = vec3( 0.04 );
848	material.clearcoatF90 = 1.0;
849	#ifdef USE_CLEARCOATMAP
850		material.clearcoat *= texture2D( clearcoatMap, vClearcoatMapUv ).x;
851	#endif
852	#ifdef USE_CLEARCOAT_ROUGHNESSMAP
853		material.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vClearcoatRoughnessMapUv ).y;
854	#endif
855	material.clearcoat = saturate( material.clearcoat );	material.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 );
856	material.clearcoatRoughness += geometryRoughness;
857	material.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 );
858#endif
859#ifdef USE_DISPERSION
860	material.dispersion = dispersion;
861#endif
862#ifdef USE_IRIDESCENCE
863	material.iridescence = iridescence;
864	material.iridescenceIOR = iridescenceIOR;
865	#ifdef USE_IRIDESCENCEMAP
866		material.iridescence *= texture2D( iridescenceMap, vIridescenceMapUv ).r;
867	#endif
868	#ifdef USE_IRIDESCENCE_THICKNESSMAP
869		material.iridescenceThickness = (iridescenceThicknessMaximum - iridescenceThicknessMinimum) * texture2D( iridescenceThicknessMap, vIridescenceThicknessMapUv ).g + iridescenceThicknessMinimum;
870	#else
871		material.iridescenceThickness = iridescenceThicknessMaximum;
872	#endif
873#endif
874#ifdef USE_SHEEN
875	material.sheenColor = sheenColor;
876	#ifdef USE_SHEEN_COLORMAP
877		material.sheenColor *= texture2D( sheenColorMap, vSheenColorMapUv ).rgb;
878	#endif
879	material.sheenRoughness = clamp( sheenRoughness, 0.0001, 1.0 );
880	#ifdef USE_SHEEN_ROUGHNESSMAP
881		material.sheenRoughness *= texture2D( sheenRoughnessMap, vSheenRoughnessMapUv ).a;
882	#endif
883#endif
884#ifdef USE_ANISOTROPY
885	#ifdef USE_ANISOTROPYMAP
886		mat2 anisotropyMat = mat2( anisotropyVector.x, anisotropyVector.y, - anisotropyVector.y, anisotropyVector.x );
887		vec3 anisotropyPolar = texture2D( anisotropyMap, vAnisotropyMapUv ).rgb;
888		vec2 anisotropyV = anisotropyMat * normalize( 2.0 * anisotropyPolar.rg - vec2( 1.0 ) ) * anisotropyPolar.b;
889	#else
890		vec2 anisotropyV = anisotropyVector;
891	#endif
892	material.anisotropy = length( anisotropyV );
893	if( material.anisotropy == 0.0 ) {
894		anisotropyV = vec2( 1.0, 0.0 );
895	} else {
896		anisotropyV /= material.anisotropy;
897		material.anisotropy = saturate( material.anisotropy );
898	}
899	material.alphaT = mix( pow2( material.roughness ), 1.0, pow2( material.anisotropy ) );
900	material.anisotropyT = tbn[ 0 ] * anisotropyV.x + tbn[ 1 ] * anisotropyV.y;
901	material.anisotropyB = tbn[ 1 ] * anisotropyV.x - tbn[ 0 ] * anisotropyV.y;
902#endif`,lights_physical_pars_fragment:`uniform sampler2D dfgLUT;
903struct PhysicalMaterial {
904	vec3 diffuseColor;
905	vec3 diffuseContribution;
906	vec3 specularColor;
907	vec3 specularColorBlended;
908	float roughness;
909	float metalness;
910	float specularF90;
911	float dispersion;
912	#ifdef USE_CLEARCOAT
913		float clearcoat;
914		float clearcoatRoughness;
915		vec3 clearcoatF0;
916		float clearcoatF90;
917	#endif
918	#ifdef USE_IRIDESCENCE
919		float iridescence;
920		float iridescenceIOR;
921		float iridescenceThickness;
922		vec3 iridescenceFresnel;
923		vec3 iridescenceF0;
924		vec3 iridescenceFresnelDielectric;
925		vec3 iridescenceFresnelMetallic;
926	#endif
927	#ifdef USE_SHEEN
928		vec3 sheenColor;
929		float sheenRoughness;
930	#endif
931	#ifdef IOR
932		float ior;
933	#endif
934	#ifdef USE_TRANSMISSION
935		float transmission;
936		float transmissionAlpha;
937		float thickness;
938		float attenuationDistance;
939		vec3 attenuationColor;
940	#endif
941	#ifdef USE_ANISOTROPY
942		float anisotropy;
943		float alphaT;
944		vec3 anisotropyT;
945		vec3 anisotropyB;
946	#endif
947};
948vec3 clearcoatSpecularDirect = vec3( 0.0 );
949vec3 clearcoatSpecularIndirect = vec3( 0.0 );
950vec3 sheenSpecularDirect = vec3( 0.0 );
951vec3 sheenSpecularIndirect = vec3(0.0 );
952vec3 Schlick_to_F0( const in vec3 f, const in float f90, const in float dotVH ) {
953    float x = clamp( 1.0 - dotVH, 0.0, 1.0 );
954    float x2 = x * x;
955    float x5 = clamp( x * x2 * x2, 0.0, 0.9999 );
956    return ( f - vec3( f90 ) * x5 ) / ( 1.0 - x5 );
957}
958float V_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {
959	float a2 = pow2( alpha );
960	float gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );
961	float gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );
962	return 0.5 / max( gv + gl, EPSILON );
963}
964float D_GGX( const in float alpha, const in float dotNH ) {
965	float a2 = pow2( alpha );
966	float denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;
967	return RECIPROCAL_PI * a2 / pow2( denom );
968}
969#ifdef USE_ANISOTROPY
970	float V_GGX_SmithCorrelated_Anisotropic( const in float alphaT, const in float alphaB, const in float dotTV, const in float dotBV, const in float dotTL, const in float dotBL, const in float dotNV, const in float dotNL ) {
971		float gv = dotNL * length( vec3( alphaT * dotTV, alphaB * dotBV, dotNV ) );
972		float gl = dotNV * length( vec3( alphaT * dotTL, alphaB * dotBL, dotNL ) );
973		return 0.5 / max( gv + gl, EPSILON )
vendor: 3,169 bytes, lines 973-1048
973;
974	}
975	float D_GGX_Anisotropic( const in float alphaT, const in float alphaB, const in float dotNH, const in float dotTH, const in float dotBH ) {
976		float a2 = alphaT * alphaB;
977		highp vec3 v = vec3( alphaB * dotTH, alphaT * dotBH, a2 * dotNH );
978		highp float v2 = dot( v, v );
979		float w2 = a2 / v2;
980		return RECIPROCAL_PI * a2 * pow2 ( w2 );
981	}
982#endif
983#ifdef USE_CLEARCOAT
984	vec3 BRDF_GGX_Clearcoat( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material) {
985		vec3 f0 = material.clearcoatF0;
986		float f90 = material.clearcoatF90;
987		float roughness = material.clearcoatRoughness;
988		float alpha = pow2( roughness );
989		vec3 halfDir = normalize( lightDir + viewDir );
990		float dotNL = saturate( dot( normal, lightDir ) );
991		float dotNV = saturate( dot( normal, viewDir ) );
992		float dotNH = saturate( dot( normal, halfDir ) );
993		float dotVH = saturate( dot( viewDir, halfDir ) );
994		vec3 F = F_Schlick( f0, f90, dotVH );
995		float V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );
996		float D = D_GGX( alpha, dotNH );
997		return F * ( V * D );
998	}
999#endif
1000vec3 BRDF_GGX( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material ) {
1001	vec3 f0 = material.specularColorBlended;
1002	float f90 = material.specularF90;
1003	float roughness = material.roughness;
1004	float alpha = pow2( roughness );
1005	vec3 halfDir = normalize( lightDir + viewDir );
1006	float dotNL = saturate( dot( normal, lightDir ) );
1007	float dotNV = saturate( dot( normal, viewDir ) );
1008	float dotNH = saturate( dot( normal, halfDir ) );
1009	float dotVH = saturate( dot( viewDir, halfDir ) );
1010	vec3 F = F_Schlick( f0, f90, dotVH );
1011	#ifdef USE_IRIDESCENCE
1012		F = mix( F, material.iridescenceFresnel, material.iridescence );
1013	#endif
1014	#ifdef USE_ANISOTROPY
1015		float dotTL = dot( material.anisotropyT, lightDir );
1016		float dotTV = dot( material.anisotropyT, viewDir );
1017		float dotTH = dot( material.anisotropyT, halfDir );
1018		float dotBL = dot( material.anisotropyB, lightDir );
1019		float dotBV = dot( material.anisotropyB, viewDir );
1020		float dotBH = dot( material.anisotropyB, halfDir );
1021		float V = V_GGX_SmithCorrelated_Anisotropic( material.alphaT, alpha, dotTV, dotBV, dotTL, dotBL, dotNV, dotNL );
1022		float D = D_GGX_Anisotropic( material.alphaT, alpha, dotNH, dotTH, dotBH );
1023	#else
1024		float V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );
1025		float D = D_GGX( alpha, dotNH );
1026	#endif
1027	return F * ( V * D );
1028}
1029vec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {
1030	const float LUT_SIZE = 64.0;
1031	const float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;
1032	const float LUT_BIAS = 0.5 / LUT_SIZE;
1033	float dotNV = saturate( dot( N, V ) );
1034	vec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );
1035	uv = uv * LUT_SCALE + LUT_BIAS;
1036	return uv;
1037}
1038float LTC_ClippedSphereFormFactor( const in vec3 f ) {
1039	float l = length( f );
1040	return max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );
1041}
1042vec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {
1043	float x = dot( v1, v2 );
1044	float y = abs( x );
1045	float a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;
1046	float b = 3.4175940 + ( 4.1616724 + y ) * y;
1047	float v = a / b;
1048	float theta_sintheta = ( x >
vendor: 4,203 bytes, lines 1048-1132
1048 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;
1049	return cross( v1, v2 ) * theta_sintheta;
1050}
1051vec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {
1052	vec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];
1053	vec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];
1054	vec3 lightNormal = cross( v1, v2 );
1055	if( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );
1056	vec3 T1, T2;
1057	T1 = normalize( V - N * dot( V, N ) );
1058	T2 = - cross( N, T1 );
1059	mat3 mat = mInv * transpose( mat3( T1, T2, N ) );
1060	vec3 coords[ 4 ];
1061	coords[ 0 ] = mat * ( rectCoords[ 0 ] - P );
1062	coords[ 1 ] = mat * ( rectCoords[ 1 ] - P );
1063	coords[ 2 ] = mat * ( rectCoords[ 2 ] - P );
1064	coords[ 3 ] = mat * ( rectCoords[ 3 ] - P );
1065	coords[ 0 ] = normalize( coords[ 0 ] );
1066	coords[ 1 ] = normalize( coords[ 1 ] );
1067	coords[ 2 ] = normalize( coords[ 2 ] );
1068	coords[ 3 ] = normalize( coords[ 3 ] );
1069	vec3 vectorFormFactor = vec3( 0.0 );
1070	vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );
1071	vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );
1072	vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );
1073	vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );
1074	float result = LTC_ClippedSphereFormFactor( vectorFormFactor );
1075	return vec3( result );
1076}
1077#if defined( USE_SHEEN )
1078float D_Charlie( float roughness, float dotNH ) {
1079	float alpha = pow2( roughness );
1080	float invAlpha = 1.0 / alpha;
1081	float cos2h = dotNH * dotNH;
1082	float sin2h = max( 1.0 - cos2h, 0.0078125 );
1083	return ( 2.0 + invAlpha ) * pow( sin2h, invAlpha * 0.5 ) / ( 2.0 * PI );
1084}
1085float V_Neubelt( float dotNV, float dotNL ) {
1086	return saturate( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) );
1087}
1088vec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) {
1089	vec3 halfDir = normalize( lightDir + viewDir );
1090	float dotNL = saturate( dot( normal, lightDir ) );
1091	float dotNV = saturate( dot( normal, viewDir ) );
1092	float dotNH = saturate( dot( normal, halfDir ) );
1093	float D = D_Charlie( sheenRoughness, dotNH );
1094	float V = V_Neubelt( dotNV, dotNL );
1095	return sheenColor * ( D * V );
1096}
1097#endif
1098float IBLSheenBRDF( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {
1099	float dotNV = saturate( dot( normal, viewDir ) );
1100	float r2 = roughness * roughness;
1101	float rInv = 1.0 / ( roughness + 0.1 );
1102	float a = -1.9362 + 1.0678 * roughness + 0.4573 * r2 - 0.8469 * rInv;
1103	float b = -0.6014 + 0.5538 * roughness - 0.4670 * r2 - 0.1255 * rInv;
1104	float DG = exp( a * dotNV + b );
1105	return saturate( DG );
1106}
1107vec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) {
1108	float dotNV = saturate( dot( normal, viewDir ) );
1109	vec2 fab = texture2D( dfgLUT, vec2( roughness, dotNV ) ).rg;
1110	return specularColor * fab.x + specularF90 * fab.y;
1111}
1112#ifdef USE_IRIDESCENCE
1113void computeMultiscatteringIridescence( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float iridescence, const in vec3 iridescenceF0, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {
1114#else
1115void computeMultiscattering( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {
1116#endif
1117	float dotNV = saturate( dot( normal, viewDir ) );
1118	vec2 fab = texture2D( dfgLUT, vec2( roughness, dotNV ) ).rg;
1119	#ifdef USE_IRIDESCENCE
1120		vec3 Fr = mix( specularColor, iridescenceF0, iridescence );
1121	#else
1122		vec3 Fr = specularColor;
1123	#endif
1124	vec3 FssEss = Fr * fab.x + specularF90 * fab.y;
1125	float Ess = fab.x + fab.y;
1126	float Ems = 1.0 - Ess;
1127	vec3 Favg = Fr + ( 1.0 - Fr ) * 0.047619;	vec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );
1128	singleScatter += FssEss;
1129	multiScatter += Fms * Ems;
1130}
1131vec3 BRDF_GGX_Multiscatter( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material ) {
1132	vec3 singleScatter = BRDF_GGX( lightDir, viewDir, normal, material );
vendor: 6,009 bytes, lines 1133-1231
1133	float dotNL = saturate( dot( normal, lightDir ) );
1134	float dotNV = saturate( dot( normal, viewDir ) );
1135	vec2 dfgV = texture2D( dfgLUT, vec2( material.roughness, dotNV ) ).rg;
1136	vec2 dfgL = texture2D( dfgLUT, vec2( material.roughness, dotNL ) ).rg;
1137	vec3 FssEss_V = material.specularColorBlended * dfgV.x + material.specularF90 * dfgV.y;
1138	vec3 FssEss_L = material.specularColorBlended * dfgL.x + material.specularF90 * dfgL.y;
1139	float Ess_V = dfgV.x + dfgV.y;
1140	float Ess_L = dfgL.x + dfgL.y;
1141	float Ems_V = 1.0 - Ess_V;
1142	float Ems_L = 1.0 - Ess_L;
1143	vec3 Favg = material.specularColorBlended + ( 1.0 - material.specularColorBlended ) * 0.047619;
1144	vec3 Fms = FssEss_V * FssEss_L * Favg / ( 1.0 - Ems_V * Ems_L * Favg + EPSILON );
1145	float compensationFactor = Ems_V * Ems_L;
1146	vec3 multiScatter = Fms * compensationFactor;
1147	return singleScatter + multiScatter;
1148}
1149#if NUM_RECT_AREA_LIGHTS > 0
1150	void RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {
1151		vec3 normal = geometryNormal;
1152		vec3 viewDir = geometryViewDir;
1153		vec3 position = geometryPosition;
1154		vec3 lightPos = rectAreaLight.position;
1155		vec3 halfWidth = rectAreaLight.halfWidth;
1156		vec3 halfHeight = rectAreaLight.halfHeight;
1157		vec3 lightColor = rectAreaLight.color;
1158		float roughness = material.roughness;
1159		vec3 rectCoords[ 4 ];
1160		rectCoords[ 0 ] = lightPos + halfWidth - halfHeight;		rectCoords[ 1 ] = lightPos - halfWidth - halfHeight;
1161		rectCoords[ 2 ] = lightPos - halfWidth + halfHeight;
1162		rectCoords[ 3 ] = lightPos + halfWidth + halfHeight;
1163		vec2 uv = LTC_Uv( normal, viewDir, roughness );
1164		vec4 t1 = texture2D( ltc_1, uv );
1165		vec4 t2 = texture2D( ltc_2, uv );
1166		mat3 mInv = mat3(
1167			vec3( t1.x, 0, t1.y ),
1168			vec3(    0, 1,    0 ),
1169			vec3( t1.z, 0, t1.w )
1170		);
1171		vec3 fresnel = ( material.specularColorBlended * t2.x + ( material.specularF90 - material.specularColorBlended ) * t2.y );
1172		reflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );
1173		reflectedLight.directDiffuse += lightColor * material.diffuseContribution * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );
1174		#ifdef USE_CLEARCOAT
1175			vec3 Ncc = geometryClearcoatNormal;
1176			vec2 uvClearcoat = LTC_Uv( Ncc, viewDir, material.clearcoatRoughness );
1177			vec4 t1Clearcoat = texture2D( ltc_1, uvClearcoat );
1178			vec4 t2Clearcoat = texture2D( ltc_2, uvClearcoat );
1179			mat3 mInvClearcoat = mat3(
1180				vec3( t1Clearcoat.x, 0, t1Clearcoat.y ),
1181				vec3(             0, 1,             0 ),
1182				vec3( t1Clearcoat.z, 0, t1Clearcoat.w )
1183			);
1184			vec3 fresnelClearcoat = material.clearcoatF0 * t2Clearcoat.x + ( material.clearcoatF90 - material.clearcoatF0 ) * t2Clearcoat.y;
1185			clearcoatSpecularDirect += lightColor * fresnelClearcoat * LTC_Evaluate( Ncc, viewDir, position, mInvClearcoat, rectCoords );
1186		#endif
1187	}
1188#endif
1189void RE_Direct_Physical( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {
1190	float dotNL = saturate( dot( geometryNormal, directLight.direction ) );
1191	vec3 irradiance = dotNL * directLight.color;
1192	#ifdef USE_CLEARCOAT
1193		float dotNLcc = saturate( dot( geometryClearcoatNormal, directLight.direction ) );
1194		vec3 ccIrradiance = dotNLcc * directLight.color;
1195		clearcoatSpecularDirect += ccIrradiance * BRDF_GGX_Clearcoat( directLight.direction, geometryViewDir, geometryClearcoatNormal, material );
1196	#endif
1197	#ifdef USE_SHEEN
1198 
1199 		sheenSpecularDirect += irradiance * BRDF_Sheen( directLight.direction, geometryViewDir, geometryNormal, material.sheenColor, material.sheenRoughness );
1200 
1201 		float sheenAlbedoV = IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness );
1202 		float sheenAlbedoL = IBLSheenBRDF( geometryNormal, directLight.direction, material.sheenRoughness );
1203 
1204 		float sheenEnergyComp = 1.0 - max3( material.sheenColor ) * max( sheenAlbedoV, sheenAlbedoL );
1205 
1206 		irradiance *= sheenEnergyComp;
1207 
1208 	#endif
1209	reflectedLight.directSpecular += irradiance * BRDF_GGX_Multiscatter( directLight.direction, geometryViewDir, geometryNormal, material );
1210	reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseContribution );
1211}
1212void RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {
1213	vec3 diffuse = irradiance * BRDF_Lambert( material.diffuseContribution );
1214	#ifdef USE_SHEEN
1215		float sheenAlbedo = IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness );
1216		float sheenEnergyComp = 1.0 - max3( material.sheenColor ) * sheenAlbedo;
1217		diffuse *= sheenEnergyComp;
1218	#endif
1219	reflectedLight.indirectDiffuse += diffuse;
1220}
1221void RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) {
1222	#ifdef USE_CLEARCOAT
1223		clearcoatSpecularIndirect += clearcoatRadiance * EnvironmentBRDF( geometryClearcoatNormal, geometryViewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness );
1224	#endif
1225	#ifdef USE_SHEEN
1226		sheenSpecularIndirect += irradiance * material.sheenColor * IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness ) * RECIPROCAL_PI;
1227 	#endif
1228	vec3 singleScatteringDielectric = vec3( 0.0 );
1229	vec3 multiScatteringDielectric = vec3( 0.0 );
1230	vec3 singleScatteringMetallic = vec3( 0.0 );
1231	vec3 multiScatteringMetallic = vec3( 0.0 );
vendor: 8,137 bytes, lines 1232-1374
1232	#ifdef USE_IRIDESCENCE
1233		computeMultiscatteringIridescence( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnelDielectric, material.roughness, singleScatteringDielectric, multiScatteringDielectric );
1234		computeMultiscatteringIridescence( geometryNormal, geometryViewDir, material.diffuseColor, material.specularF90, material.iridescence, material.iridescenceFresnelMetallic, material.roughness, singleScatteringMetallic, multiScatteringMetallic );
1235	#else
1236		computeMultiscattering( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.roughness, singleScatteringDielectric, multiScatteringDielectric );
1237		computeMultiscattering( geometryNormal, geometryViewDir, material.diffuseColor, material.specularF90, material.roughness, singleScatteringMetallic, multiScatteringMetallic );
1238	#endif
1239	vec3 singleScattering = mix( singleScatteringDielectric, singleScatteringMetallic, material.metalness );
1240	vec3 multiScattering = mix( multiScatteringDielectric, multiScatteringMetallic, material.metalness );
1241	vec3 totalScatteringDielectric = singleScatteringDielectric + multiScatteringDielectric;
1242	vec3 diffuse = material.diffuseContribution * ( 1.0 - totalScatteringDielectric );
1243	vec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;
1244	vec3 indirectSpecular = radiance * singleScattering;
1245	indirectSpecular += multiScattering * cosineWeightedIrradiance;
1246	vec3 indirectDiffuse = diffuse * cosineWeightedIrradiance;
1247	#ifdef USE_SHEEN
1248		float sheenAlbedo = IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness );
1249		float sheenEnergyComp = 1.0 - max3( material.sheenColor ) * sheenAlbedo;
1250		indirectSpecular *= sheenEnergyComp;
1251		indirectDiffuse *= sheenEnergyComp;
1252	#endif
1253	reflectedLight.indirectSpecular += indirectSpecular;
1254	reflectedLight.indirectDiffuse += indirectDiffuse;
1255}
1256#define RE_Direct				RE_Direct_Physical
1257#define RE_Direct_RectArea		RE_Direct_RectArea_Physical
1258#define RE_IndirectDiffuse		RE_IndirectDiffuse_Physical
1259#define RE_IndirectSpecular		RE_IndirectSpecular_Physical
1260float computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {
1261	return saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );
1262}`,lights_fragment_begin:`
1263vec3 geometryPosition = - vViewPosition;
1264vec3 geometryNormal = normal;
1265vec3 geometryViewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );
1266vec3 geometryClearcoatNormal = vec3( 0.0 );
1267#ifdef USE_CLEARCOAT
1268	geometryClearcoatNormal = clearcoatNormal;
1269#endif
1270#ifdef USE_IRIDESCENCE
1271	float dotNVi = saturate( dot( normal, geometryViewDir ) );
1272	if ( material.iridescenceThickness == 0.0 ) {
1273		material.iridescence = 0.0;
1274	} else {
1275		material.iridescence = saturate( material.iridescence );
1276	}
1277	if ( material.iridescence > 0.0 ) {
1278		material.iridescenceFresnelDielectric = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.specularColor );
1279		material.iridescenceFresnelMetallic = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.diffuseColor );
1280		material.iridescenceFresnel = mix( material.iridescenceFresnelDielectric, material.iridescenceFresnelMetallic, material.metalness );
1281		material.iridescenceF0 = Schlick_to_F0( material.iridescenceFresnel, 1.0, dotNVi );
1282	}
1283#endif
1284IncidentLight directLight;
1285#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )
1286	PointLight pointLight;
1287	#if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0
1288	PointLightShadow pointLightShadow;
1289	#endif
1290	#pragma unroll_loop_start
1291	for ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {
1292		pointLight = pointLights[ i ];
1293		getPointLightInfo( pointLight, geometryPosition, directLight );
1294		#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS ) && ( defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_BASIC ) )
1295		pointLightShadow = pointLightShadows[ i ];
1296		directLight.color *= ( directLight.visible && receiveShadow ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowIntensity, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0;
1297		#endif
1298		RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );
1299	}
1300	#pragma unroll_loop_end
1301#endif
1302#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )
1303	SpotLight spotLight;
1304	vec4 spotColor;
1305	vec3 spotLightCoord;
1306	bool inSpotLightMap;
1307	#if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0
1308	SpotLightShadow spotLightShadow;
1309	#endif
1310	#pragma unroll_loop_start
1311	for ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {
1312		spotLight = spotLights[ i ];
1313		getSpotLightInfo( spotLight, geometryPosition, directLight );
1314		#if ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )
1315		#define SPOT_LIGHT_MAP_INDEX UNROLLED_LOOP_INDEX
1316		#elif ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )
1317		#define SPOT_LIGHT_MAP_INDEX NUM_SPOT_LIGHT_MAPS
1318		#else
1319		#define SPOT_LIGHT_MAP_INDEX ( UNROLLED_LOOP_INDEX - NUM_SPOT_LIGHT_SHADOWS + NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )
1320		#endif
1321		#if ( SPOT_LIGHT_MAP_INDEX < NUM_SPOT_LIGHT_MAPS )
1322			spotLightCoord = vSpotLightCoord[ i ].xyz / vSpotLightCoord[ i ].w;
1323			inSpotLightMap = all( lessThan( abs( spotLightCoord * 2. - 1. ), vec3( 1.0 ) ) );
1324			spotColor = texture2D( spotLightMap[ SPOT_LIGHT_MAP_INDEX ], spotLightCoord.xy );
1325			directLight.color = inSpotLightMap ? directLight.color * spotColor.rgb : directLight.color;
1326		#endif
1327		#undef SPOT_LIGHT_MAP_INDEX
1328		#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )
1329		spotLightShadow = spotLightShadows[ i ];
1330		directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowIntensity, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;
1331		#endif
1332		RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );
1333	}
1334	#pragma unroll_loop_end
1335#endif
1336#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )
1337	DirectionalLight directionalLight;
1338	#if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0
1339	DirectionalLightShadow directionalLightShadow;
1340	#endif
1341	#pragma unroll_loop_start
1342	for ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {
1343		directionalLight = directionalLights[ i ];
1344		getDirectionalLightInfo( directionalLight, directLight );
1345		#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )
1346		directionalLightShadow = directionalLightShadows[ i ];
1347		directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowIntensity, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;
1348		#endif
1349		RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );
1350	}
1351	#pragma unroll_loop_end
1352#endif
1353#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )
1354	RectAreaLight rectAreaLight;
1355	#pragma unroll_loop_start
1356	for ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {
1357		rectAreaLight = rectAreaLights[ i ];
1358		RE_Direct_RectArea( rectAreaLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );
1359	}
1360	#pragma unroll_loop_end
1361#endif
1362#if defined( RE_IndirectDiffuse )
1363	vec3 iblIrradiance = vec3( 0.0 );
1364	vec3 irradiance = getAmbientLightIrradiance( ambientLightColor );
1365	#if defined( USE_LIGHT_PROBES )
1366		irradiance += getLightProbeIrradiance( lightProbe, geometryNormal );
1367	#endif
1368	#if ( NUM_HEMI_LIGHTS > 0 )
1369		#pragma unroll_loop_start
1370		for ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {
1371			irradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometryNormal );
1372		}
1373		#pragma unroll_loop_end
1374	#endif
1375	#ifdef USE_LIGHT_PROBES_GRID
1376		vec3 probeWorldPos = ( ( vec4( geometryPosition, 1.0 ) - viewMatrix[ 3 ] ) * viewMatrix ).xyz;
1377		vec3 probeWorldNormal = transformNormalByInverseViewMatrix( geometryNormal, viewMatrix );
1378		irradiance += getLightProbeGridIrradiance( probeWorldPos, probeWorldNormal );
1379	#endif
1380#endif
1381#if defined( RE_IndirectSpecular )
1382	vec3 radiance = vec3( 0.0 );
1383	vec3 clearcoatRadiance = vec3( 0.0 );
1384#endif`,lights_fragment_maps:`#if defined( RE_IndirectDiffuse )
1385	#ifdef USE_LIGHTMAP
1386		vec4 lightMapTexel = texture2D( lightMap, vLightMapUv );
1387		vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;
1388		irradiance += lightMapIrradiance;
1389	#endif
1390	#if defined( USE_ENVMAP ) && defined( ENVMAP_TYPE_CUBE_UV )
1391		#if defined( STANDARD ) || defined( LAMBERT ) || defined( PHONG )
1392			iblIrradiance += getIBLIrradiance( geometryNormal );
1393		#endif
1394	#endif
1395#endif
1396#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )
1397	#ifdef USE_ANISOTROPY
1398		radiance += getIBLAnisotropyRadiance( geometryViewDir, geometryNormal, material.roughness, material.anisotropyB, material.anisotropy );
1399	#else
1400		radiance += getIBLRadiance( geometryViewDir, geometryNormal, material.roughness );
1401	#endif
1402	#ifdef USE_CLEARCOAT
1403		clearcoatRadiance += getIBLRadiance( geometryViewDir, geometryClearcoatNormal, material.clearcoatRoughness );
1404	#endif
1405#endif`,lights_fragment_end:`#if defined( RE_IndirectDiffuse )
1406	#if defined( LAMBERT ) || defined( PHONG )
1407		irradiance += iblIrradiance;
1408	#endif
1409	RE_IndirectDiffuse( irradiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );
1410#endif
1411#if defined( RE_IndirectSpecular )
1412	RE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );
1413#endif`,lightprobes_pars_fragment:`#ifdef USE_LIGHT_PROBES_GRID
1414uniform highp sampler3D probesSH;
1415uniform vec3 probesMin;
1416uniform vec3 probesMax;
1417uniform vec3 probesResolution;
1418vec3 getLightProbeGridIrradiance( vec3 worldPos, vec3 worldNormal ) {
1419	vec3 res = probesResolution;
1420	vec3 gridRange = probesMax - probesMin;
1421	vec3 resMinusOne = res - 1.0;
1422	vec3 probeSpacing = gridRange / resMinusOne;
1423	vec3 samplePos = worldPos + worldNormal * probeSpacing * 0.5;
1424	vec3 uvw = clamp( ( samplePos - probesMin ) / gridRange, 0.0, 1.0 );
1425	uvw = uvw * resMinusOne / res + 0.5 / res;
1426	float nz          = res.z;
1427	float paddedSlices = nz + 2.0;
1428	float atlasDepth  = 7.0 * paddedSlices;
1429	float uvZBase     = uvw.z * nz + 1.0;
1430	vec4 s0 = texture( probesSH, vec3( uvw.xy, ( uvZBase                       ) / atlasDepth ) );
1431	vec4 s1 = texture( probesSH, vec3( uvw.xy, ( uvZBase +       paddedSlices   ) / atlasDepth ) );
1432	vec4 s2 = texture( probesSH, vec3( uvw.xy, ( uvZBase + 2.0 * paddedSlices   ) / atlasDepth ) );
1433	vec4 s3 = texture( probesSH, vec3( uvw.xy, ( uvZBase + 3.0 * paddedSlices   ) / atlasDepth ) );
1434	vec4 s4 = texture( probesSH, vec3( uvw.xy, ( uvZBase + 4.0 * paddedSlices   ) / atlasDepth ) );
1435	vec4 s5 = texture( probesSH, vec3( uvw.xy, ( uvZBase + 5.0 * paddedSlices   ) / atlasDepth ) );
1436	vec4 s6 = texture( probesSH, vec3( uvw.xy, ( uvZBase + 6.0 * paddedSlices   ) / atlasDepth ) );
1437	vec3 c0 = s0.xyz;
1438	vec3 c1 = vec3( s0.w, s1.xy );
1439	vec3 c2 = vec3( s1.zw, s2.x );
1440	vec3 c3 = s2.yzw;
1441	vec3 c4 = s3.xyz;
1442	vec3 c5 = vec3( s3.w, s4.xy );
1443	vec3 c6 = vec3( s4.zw, s5.x );
1444	vec3 c7 = s5.yzw;
1445	vec3 c8 = s6.xyz;
1446	float x = worldNormal.x, y = worldNormal.y, z = worldNormal.z;
1447	vec3 result = c0 * 0.886227;
1448	result += c1 * 2.0 * 0.511664 * y;
1449	result += c2 * 2.0 * 0.511664 * z;
1450	result += c3 * 2.0 * 0.511664 * x;
1451	result += c4 * 2.0 * 0.429043 * x * y;
1452	result += c5 * 2.0 * 0.429043 * y * z;
1453	result += c6 * ( 0.743125 * z * z - 0.247708 );
1454	result += c7 * 2.0 * 0.429043 * x * z;
1455	result += c8 * 0.429043 * ( x * x - y * y );
1456	return max( result, vec3( 0.0 ) );
1457}
1458#endif`,logdepthbuf_fragment:`#if defined( USE_LOGARITHMIC_DEPTH_BUFFER )
1459	gl_FragDepth = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;
1460#endif`,logdepthbuf_pars_fragment:`#if defined( USE_LOGARITHMIC_DEPTH_BUFFER )
1461	uniform float logDepthBufFC;
1462	varying float vFragDepth;
1463	varying float vIsPerspective;
1464#endif`,logdepthbuf_pars_vertex:`#ifdef USE_LOGARITHMIC_DEPTH_BUFFER
1465	varying float vFragDepth;
1466	varying float vIsPerspective;
1467#endif`,logdepthbuf_vertex:`#ifdef USE_LOGARITHMIC_DEPTH_BUFFER
1468	vFragDepth = 1.0 + gl_Position.w;
1469	vIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );
1470#endif`,map_fragment:`#ifdef USE_MAP
1471	vec4 sampledDiffuseColor = texture2D( map, vMapUv );
1472	#ifdef DECODE_VIDEO_TEXTURE
1473		sampledDiffuseColor = sRGBTransferEOTF( sampledDiffuseColor );
1474	#endif
1475	diffuseColor *= sampledDiffuseColor;
1476#endif`,map_pars_fragment:`#ifdef USE_MAP
1477	uniform sampler2D map;
1478#endif`,map_particle_fragment:`#if defined( USE_MAP ) || defined( USE_ALPHAMAP )
1479	#if defined( USE_POINTS_UV )
1480		vec2 uv = vUv;
1481	#else
1482		vec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;
1483	#endif
1484#endif
1485#ifdef USE_MAP
1486	diffuseColor *= texture2D( map, uv );
1487#endif
1488#ifdef USE_ALPHAMAP
1489	diffuseColor.a *= texture2D( alphaMap, uv ).g;
1490#endif`,map_particle_pars_fragment:`#if defined( USE_POINTS_UV )
1491	varying vec2 vUv;
1492#else
1493	#if defined( USE_MAP ) || defined( USE_ALPHAMAP )
1494		uniform mat3 uvTransform;
1495	#endif
1496#endif
1497#ifdef USE_MAP
1498	uniform sampler2D map;
1499#endif
1500#ifdef USE_ALPHAMAP
1501	uniform sampler2D alphaMap;
1502#endif`,metalnessmap_fragment:`float metalnessFactor = metalness;
1503#ifdef USE_METALNESSMAP
1504	vec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv );
1505	metalnessFactor *= texelMetalness.b;
1506#endif`,metalnessmap_pars_fragment:`#ifdef USE_METALNESSMAP
1507	uniform sampler2D metalnessMap;
1508#endif`,morphinstance_vertex:`#ifdef USE_INSTANCING_MORPH
1509	float morphTargetInfluences[ MORPHTARGETS_COUNT ];
1510	float morphTargetBaseInfluence = texelFetch( morphTexture, ivec2( 0, gl_InstanceID ), 0 ).r;
1511	for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {
1512		morphTargetInfluences[i] =  texelFetch( morphTexture, ivec2( i + 1, gl_InstanceID ), 0 ).r;
1513	}
1514#endif`,morphcolor_vertex:`#if defined( USE_MORPHCOLORS )
1515	vColor *= morphTargetBaseInfluence;
1516	for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {
1517		#if defined( USE_COLOR_ALPHA )
1518			if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ) * morphTargetInfluences[ i ];
1519		#elif defined( USE_COLOR )
1520			if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ];
1521		#endif
1522	}
1523#endif`,morphnormal_vertex:`#ifdef USE_MORPHNORMALS
1524	objectNormal *= morphTargetBaseInfluence;
1525	for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {
1526		if ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ];
1527	}
1528#endif`,morphtarget_pars_vertex:`#ifdef USE_MORPHTARGETS
1529	#ifndef USE_INSTANCING_MORPH
1530		uniform float morphTargetBaseInfluence;
1531		uniform float morphTargetInfluences[ MORPHTARGETS_COUNT ];
1532	#endif
1533	uniform sampler2DArray morphTargetsTexture;
1534	uniform ivec2 morphTargetsTextureSize;
1535	vec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) {
1536		int texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset;
1537		int y = texelIndex / morphTargetsTextureSize.x;
1538		int x = texelIndex - y * morphTargetsTextureSize.x;
1539		ivec3 morphUV = ivec3( x, y, morphTargetIndex );
1540		return texelFetch( morphTargetsTexture, morphUV, 0 );
1541	}
1542#endif`,morphtarget_vertex:`#ifdef USE_MORPHTARGETS
1543	transformed *= morphTargetBaseInfluence;
1544	for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {
1545		if ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ];
1546	}
1547#endif`,normal_fragment_begin:`float faceDirection = gl_FrontFacing ? 1.0 : - 1.0;
1548#ifdef FLAT_SHADED
1549	vec3 fdx = dFdx( vViewPosition );
1550	vec3 fdy = dFdy( vViewPosition );
1551	vec3 normal = normalize( cross( fdx, fdy ) );
1552#else
1553	vec3 normal = normalize( vNormal );
1554	#ifdef DOUBLE_SIDED
1555		normal *= faceDirection;
1556	#endif
1557#endif
1558#if defined( USE_NORMALMAP_TANGENTSPACE ) || defined( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY )
1559	#ifdef USE_TANGENT
1560		mat3 tbn = mat3( normalize( vTangent ), normalize( vBitangent ), normal );
1561	#else
1562		mat3 tbn = getTangentFrame( - vViewPosition, normal,
1563		#if defined( USE_NORMALMAP )
1564			vNormalMapUv
1565		#elif defined( USE_CLEARCOAT_NORMALMAP )
1566			vClearcoatNormalMapUv
1567		#else
1568			vUv
1569		#endif
1570		);
1571	#endif
1572	#ifdef DOUBLE_SIDED
1573		tbn[0] *= faceDirection;
1574		tbn[1] *= faceDirection;
1575	#endif
1576#endif
1577#ifdef USE_CLEARCOAT_NORMALMAP
1578	#ifdef USE_TANGENT
1579		mat3 tbn2 = mat3( normalize( vTangent ), normalize( vBitangent ), normal );
1580	#else
1581		mat3 tbn2 = getTangentFrame( - vViewPosition, normal, vClearcoatNormalMapUv );
1582	#endif
1583	#ifdef DOUBLE_SIDED
1584		tbn2[0] *= faceDirection;
1585		tbn2[1] *= faceDirection;
1586	#endif
1587#endif
1588vec3 nonPerturbedNormal = normal;`,normal_fragment_maps:`#ifdef USE_NORMALMAP_OBJECTSPACE
1589	normal = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;
1590	#ifdef FLIP_SIDED
1591		normal = - normal;
1592	#endif
1593	#ifdef DOUBLE_SIDED
1594		normal = normal * faceDirection;
1595	#endif
1596	normal = normalize( normalMatrix * normal );
1597#elif defined( USE_NORMALMAP_TANGENTSPACE )
1598	vec3 mapN = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;
1599	#if defined( USE_PACKED_NORMALMAP )
1600		mapN = vec3( mapN.xy, sqrt( saturate( 1.0 - dot( mapN.xy, mapN.xy ) ) ) );
1601	#endif
1602	mapN.xy *= normalScale;
1603	normal = normalize( tbn * mapN );
1604#elif defined( USE_BUMPMAP )
1605	normal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection );
1606#endif`,normal_pars_fragment:`#ifndef FLAT_SHADED
1607	varying vec3 vNormal;
1608	#ifdef USE_TANGENT
1609		varying vec3 vTangent;
1610		varying vec3 vBitangent;
1611	#endif
1612#endif`,normal_pars_vertex:`#ifndef FLAT_SHADED
1613	varying vec3 vNormal;
1614	#ifdef USE_TANGENT
1615		varying vec3 vTangent;
1616		varying vec3 vBitangent;
1617	#endif
1618#endif`,normal_vertex:`#ifndef FLAT_SHADED
1619	vNormal = normalize( transformedNormal );
1620	#ifdef USE_TANGENT
1621		vTangent = normalize( transformedTangent );
1622		vBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );
1623		#ifdef FLIP_SIDED
1624			vBitangent = - vBitangent;
1625		#endif
1626	#endif
1627#endif`,normalmap_pars_fragment:`#ifdef USE_NORMALMAP
1628	uniform sampler2D normalMap;
1629	uniform vec2 normalScale;
1630#endif
1631#ifdef USE_NORMALMAP_OBJECTSPACE
1632	uniform mat3 normalMatrix;
1633#endif
1634#if ! defined ( USE_TANGENT ) && ( defined ( USE_NORMALMAP_TANGENTSPACE ) || defined ( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY ) )
1635	mat3 getTangentFrame( vec3 eye_pos, vec3 surf_norm, vec2 uv ) {
1636		vec3 q0 = dFdx( eye_pos.xyz );
1637		vec3 q1 = dFdy( eye_pos.xyz );
1638		vec2 st0 = dFdx( uv.st );
1639		vec2 st1 = dFdy( uv.st );
1640		vec3 N = surf_norm;
1641		vec3 q1perp = cross( q1, N );
1642		vec3 q0perp = cross( N, q0 );
1643		vec3 T = q1perp * st0.x + q0perp * st1.x;
1644		vec3 B = q1perp * st0.y + q0perp * st1.y;
1645		float det = max( dot( T, T ), dot( B, B ) );
1646		float scale = ( det == 0.0 ) ? 0.0 : inversesqrt( det );
1647		return mat3( T * scale, B * scale, N );
1648	}
1649#endif`,clearcoat_normal_fragment_begin:`#ifdef USE_CLEARCOAT
1650	vec3 clearcoatNormal = nonPerturbedNormal;
1651#endif`,clearcoat_normal_fragment_maps:`#ifdef USE_CLEARCOAT_NORMALMAP
1652	vec3 clearcoatMapN = texture2D( clearcoatNormalMap, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0;
1653	clearcoatMapN.xy *= clearcoatNormalScale;
1654	clearcoatNormal = normalize( tbn2 * clearcoatMapN );
1655#endif`,clearcoat_pars_fragment:`#ifdef USE_CLEARCOATMAP
1656	uniform sampler2D clearcoatMap;
1657#endif
1658#ifdef USE_CLEARCOAT_NORMALMAP
1659	uniform sampler2D clearcoatNormalMap;
1660	uniform vec2 clearcoatNormalScale;
1661#endif
1662#ifdef USE_CLEARCOAT_ROUGHNESSMAP
1663	uniform sampler2D clearcoatRoughnessMap;
1664#endif`,iridescence_pars_fragment:`#ifdef USE_IRIDESCENCEMAP
1665	uniform sampler2D iridescenceMap;
1666#endif
1667#ifdef USE_IRIDESCENCE_THICKNESSMAP
1668	uniform sampler2D iridescenceThicknessMap;
1669#endif`,opaque_fragment:`#ifdef OPAQUE
1670diffuseColor.a = 1.0;
1671#endif
1672#ifdef USE_TRANSMISSION
1673diffuseColor.a *= material.transmissionAlpha;
1674#endif
1675gl_FragColor = vec4( outgoingLight, diffuseColor.a );`,packing:`vec3 packNormalToRGB( const in vec3 normal ) {
1676	return normalize( normal ) * 0.5 + 0.5;
1677}
1678vec3 unpackRGBToNormal( const in vec3 rgb ) {
1679	return 2.0 * rgb.xyz - 1.0;
1680}
1681const float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;const float ShiftRight8 = 1. / 256.;
1682const float Inv255 = 1. / 255.;
1683const vec4 PackFactors = vec4( 1.0, 256.0, 256.0 * 256.0, 256.0 * 256.0 * 256.0 );
1684const vec2 UnpackFactors2 = vec2( UnpackDownscale, 1.0 / PackFactors.g );
1685const vec3 UnpackFactors3 = vec3( UnpackDownscale / PackFactors.rg, 1.0 / PackFactors.b );
1686const vec4 UnpackFactors4 = vec4( UnpackDownscale / PackFactors.rgb, 1.0 / PackFactors.a );
1687vec4 packDepthToRGBA( const in float v ) {
1688	if( v <= 0.0 )
1689		return vec4( 0., 0., 0., 0. );
1690	if( v >= 1.0 )
1691		return vec4( 1., 1., 1., 1. );
1692	float vuf;
1693	float af = modf( v * PackFactors.a, vuf );
1694	float bf = modf( vuf * ShiftRight8, vuf );
1695	float gf = modf( vuf * ShiftRight8, vuf );
1696	return vec4( vuf * Inv255, gf * PackUpscale, bf * PackUpscale, af );
1697}
1698vec3 packDepthToRGB( const in float v ) {
1699	if( v <= 0.0 )
1700		return vec3( 0., 0., 0. );
1701	if( v >= 1.0 )
1702		return vec3( 1., 1., 1. );
1703	float vuf;
1704	float bf = modf( v * PackFactors.b, vuf );
1705	float gf = modf( vuf * ShiftRight8, vuf );
1706	return vec3( vuf * Inv255, gf * PackUpscale, bf );
1707}
1708vec2 packDepthToRG( const in float v ) {
1709	if( v <= 0.0 )
1710		return vec2( 0., 0. );
1711	if( v >= 1.0 )
1712		return vec2( 1., 1. );
1713	float vuf;
1714	float gf = modf( v * 256., vuf );
1715	return vec2( vuf * Inv255, gf );
1716}
1717float unpackRGBAToDepth( const in vec4 v ) {
1718	return dot( v, UnpackFactors4 );
1719}
1720float unpackRGBToDepth( const in vec3 v ) {
1721	return dot( v, UnpackFactors3 );
1722}
1723float unpackRGToDepth( const in vec2 v ) {
1724	return v.r * UnpackFactors2.r + v.g * UnpackFactors2.g;
1725}
1726vec4 pack2HalfToRGBA( const in vec2 v ) {
1727	vec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ) );
1728	return vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w );
1729}
1730vec2 unpackRGBATo2Half( const in vec4 v ) {
1731	return vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) );
1732}
1733float viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {
1734	return ( viewZ + near ) / ( near - far );
1735}
1736float orthographicDepthToViewZ( const in float depth, const in float near, const in float far ) {
1737	#ifdef USE_REVERSED_DEPTH_BUFFER
1738	
1739		return depth * ( far - near ) - far;
1740	#else
1741		return depth * ( near - far ) - near;
1742	#endif
1743}
1744float viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {
1745	return ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ );
1746}
1747float perspectiveDepthToViewZ( const in float depth, const in float near, const in float far ) {
1748	
1749	#ifdef USE_REVERSED_DEPTH_BUFFER
1750		return ( near * far ) / ( ( near - far ) * depth - near );
1751	#else
1752		return ( near * far ) / ( ( far - near ) * depth - far );
1753	#endif
1754}`,premultiplied_alpha_fragment:`#ifdef PREMULTIPLIED_ALPHA
1755	gl_FragColor.rgb *= gl_FragColor.a;
1756#endif`,project_vertex:`vec4 mvPosition = vec4( transformed, 1.0 );
1757#ifdef USE_BATCHING
1758	mvPosition = batchingMatrix * mvPosition;
1759#endif
1760#ifdef USE_INSTANCING
1761	mvPosition = instanceMatrix * mvPosition;
1762#endif
1763mvPosition = modelViewMatrix * mvPosition;
1764gl_Position = projectionMatrix * mvPosition;`,dithering_fragment:`#ifdef DITHERING
1765	gl_FragColor.rgb = dithering( gl_FragColor.rgb );
1766#endif`,dithering_pars_fragment:`#ifdef DITHERING
1767	vec3 dithering( vec3 color ) {
1768		float grid_position = rand( gl_FragCoord.xy );
1769		vec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );
1770		dither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );
1771		return color + dither_shift_RGB;
1772	}
1773#endif`,roughnessmap_fragment:`float roughnessFactor = roughness;
1774#ifdef USE_ROUGHNESSMAP
1775	vec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv );
1776	roughnessFactor *= texelRoughness.g;
1777#endif`,roughnessmap_pars_fragment:`#ifdef USE_ROUGHNESSMAP
1778	uniform sampler2D roughnessMap;
1779#endif`,shadowmap_pars_fragment:`#if NUM_SPOT_LIGHT_COORDS > 0
1780	varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];
1781#endif
1782#if NUM_SPOT_LIGHT_MAPS > 0
1783	uniform sampler2D spotLightMap[ NUM_SPOT_LIGHT_MAPS ];
1784#endif
1785#ifdef USE_SHADOWMAP
1786	#if NUM_DIR_LIGHT_SHADOWS > 0
1787		#if defined( SHADOWMAP_TYPE_PCF )
1788			uniform sampler2DShadow directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];
1789		#else
1790			uniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];
1791		#endif
1792		varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];
1793		struct DirectionalLightShadow {
1794			float shadowIntensity;
1795			float shadowBias;
1796			float shadowNormalBias;
1797			float shadowRadius;
1798			vec2 shadowMapSize;
1799		};
1800		uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];
1801	#endif
1802	#if NUM_SPOT_LIGHT_SHADOWS > 0
1803		#if defined( SHADOWMAP_TYPE_PCF )
1804			uniform sampler2DShadow spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];
1805		#else
1806			uniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];
1807		#endif
1808		struct SpotLightShadow {
1809			float shadowIntensity;
1810			float shadowBias;
1811			float shadowNormalBias;
1812			float shadowRadius;
1813			vec2 shadowMapSize;
1814		};
1815		uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];
1816	#endif
1817	#if NUM_POINT_LIGHT_SHADOWS > 0
1818		#if defined( SHADOWMAP_TYPE_PCF )
1819			uniform samplerCubeShadow pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];
1820		#elif defined( SHADOWMAP_TYPE_BASIC )
1821			uniform samplerCube pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];
1822		#endif
1823		varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];
1824		struct PointLightShadow {
1825			float shadowIntensity;
1826			float shadowBias;
1827			float shadowNormalBias;
1828			float shadowRadius;
1829			vec2 shadowMapSize;
1830			float shadowCameraNear;
1831			float shadowCameraFar;
1832		};
1833		uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];
1834	#endif
1835	#if defined( SHADOWMAP_TYPE_PCF )
1836		float interleavedGradientNoise( vec2 position ) {
1837			return fract( 52.9829189 * fract( dot( position, vec2( 0.06711056, 0.00583715 ) ) ) );
1838		}
1839		vec2 vogelDiskSample( int sampleIndex, int samplesCount, float phi ) {
1840			const float goldenAngle = 2.399963229728653;
1841			float r = sqrt( ( float( sampleIndex ) + 0.5 ) / float( samplesCount ) );
1842			float theta = float( sampleIndex ) * goldenAngle + phi;
1843			return vec2( cos( theta ), sin( theta ) ) * r;
1844		}
1845	#endif
1846	#if defined( SHADOWMAP_TYPE_PCF )
1847		float getShadow( sampler2DShadow shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord ) {
1848			float shadow = 1.0;
1849			shadowCoord.xyz /= shadowCoord.w;
1850			shadowCoord.z += shadowBias;
1851			bool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0;
1852			bool frustumTest = inFrustum && shadowCoord.z <= 1.0;
1853			if ( frustumTest ) {
1854				vec2 texelSize = vec2( 1.0 ) / shadowMapSize;
1855				float radius = shadowRadius * texelSize.x;
1856				float phi = interleavedGradientNoise( gl_FragCoord.xy ) * PI2;
1857				shadow = (
1858					texture( shadowMap, vec3( shadowCoord.xy + vogelDiskSample( 0, 5, phi ) * radius, shadowCoord.z ) ) +
1859					texture( shadowMap, vec3( shadowCoord.xy + vogelDiskSample( 1, 5, phi ) * radius, shadowCoord.z ) ) +
1860					texture( shadowMap, vec3( shadowCoord.xy + vogelDiskSample( 2, 5, phi ) * radius, shadowCoord.z ) ) +
1861					texture( shadowMap, vec3( shadowCoord.xy + vogelDiskSample( 3, 5, phi ) * radius, shadowCoord.z ) ) +
1862					texture( shadowMap, vec3( shadowCoord.xy + vogelDiskSample( 4, 5, phi ) * radius, shadowCoord.z ) )
1863				) * 0.2;
1864			}
1865			return mix( 1.0, shadow, shadowIntensity );
1866		}
1867	#elif defined( SHADOWMAP_TYPE_VSM )
1868		float getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord ) {
1869			float shadow = 1.0;
1870			shadowCoord.xyz /= shadowCoord.w;
1871			#ifdef USE_REVERSED_DEPTH_BUFFER
1872				shadowCoord.z -= shadowBias;
1873			#else
1874				shadowCoord.z += shadowBias;
1875			#endif
1876			bool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0;
1877			bool frustumTest = inFrustum && shadowCoord.z <= 1.0;
1878			if ( frustumTest ) {
1879				vec2 distribution = texture2D( shadowMap, shadowCoord.xy ).rg;
1880				float mean = distribution.x;
1881				float variance = distribution.y * distribution.y;
1882				#ifdef USE_REVERSED_DEPTH_BUFFER
1883					float hard_shadow = step( mean, shadowCoord.z );
1884				#else
1885					float hard_shadow = step( shadowCoord.z, mean );
1886				#endif
1887				
1888				if ( hard_shadow == 1.0 ) {
1889					shadow = 1.0;
1890				} else {
1891					variance = max( variance, 0.0000001 );
1892					float d = shadowCoord.z - mean;
1893					float p_max = variance / ( variance + d * d );
1894					p_max = clamp( ( p_max - 0.3 ) / 0.65, 0.0, 1.0 );
1895					shadow = max( hard_shadow, p_max );
1896				}
1897			}
1898			return mix( 1.0, shadow, shadowIntensity );
1899		}
1900	#else
1901		float getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord ) {
1902			float shadow = 1.0;
1903			shadowCoord.xyz /= shadowCoord.w;
1904			#ifdef USE_REVERSED_DEPTH_BUFFER
1905				shadowCoord.z -= shadowBias;
1906			#else
1907				shadowCoord.z += shadowBias;
1908			#endif
1909			bool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0;
1910			bool frustumTest = inFrustum && shadowCoord.z <= 1.0;
1911			if ( frustumTest ) {
1912				float depth = texture2D( shadowMap, shadowCoord.xy ).r;
1913				#ifdef USE_REVERSED_DEPTH_BUFFER
1914					shadow = step( depth, shadowCoord.z );
1915				#else
1916					shadow = step( shadowCoord.z, depth );
1917				#endif
1918			}
1919			return mix( 1.0, shadow, shadowIntensity );
1920		}
1921	#endif
1922	#if NUM_POINT_LIGHT_SHADOWS > 0
1923	#if defined( SHADOWMAP_TYPE_PCF )
1924	float getPointShadow( samplerCubeShadow shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {
1925		float shadow = 1.0;
1926		vec3 lightToPosition = shadowCoord.xyz;
1927		vec3 bd3D = normalize( lightToPosition );
1928		vec3 absVec = abs( lightToPosition );
1929		float viewSpaceZ = max( max( absVec.x, absVec.y ), absVec.z );
1930		if ( viewSpaceZ - shadowCameraFar <= 0.0 && viewSpaceZ - shadowCameraNear >= 0.0 ) {
1931			#ifdef USE_REVERSED_DEPTH_BUFFER
1932				float dp = ( shadowCameraNear * ( shadowCameraFar - viewSpaceZ ) ) / ( viewSpaceZ * ( shadowCameraFar - shadowCameraNear ) );
1933				dp -= shadowBias;
1934			#else
1935				float dp = ( shadowCameraFar * ( viewSpaceZ - shadowCameraNear ) ) / ( viewSpaceZ * ( shadowCameraFar - shadowCameraNear ) );
1936				dp += shadowBias;
1937			#endif
1938			float texelSize = shadowRadius / shadowMapSize.x;
1939			vec3 absDir = abs( bd3D );
1940			vec3 tangent = absDir.x > absDir.z ? vec3( 0.0, 1.0, 0.0 ) : vec3( 1.0, 0.0, 0.0 );
1941			tangent = normalize( cross( bd3D, tangent ) );
1942			vec3 bitangent = cross( bd3D, tangent );
1943			float phi = interleavedGradientNoise( gl_FragCoord.xy ) * PI2;
1944			vec2 sample0 = vogelDiskSample( 0, 5, phi );
1945			vec2 sample1 = vogelDiskSample( 1, 5, phi );
1946			vec2 sample2 = vogelDiskSample( 2, 5, phi );
1947			vec2 sample3 = vogelDiskSample( 3, 5, phi );
1948			vec2 sample4 = vogelDiskSample( 4, 5, phi );
1949			shadow = (
1950				texture( shadowMap, vec4( bd3D + ( tangent * sample0.x + bitangent * sample0.y ) * texelSize, dp ) ) +
1951				texture( shadowMap, vec4( bd3D + ( tangent * sample1.x + bitangent * sample1.y ) * texelSize, dp ) ) +
1952				texture( shadowMap, vec4( bd3D + ( tangent * sample2.x + bitangent * sample2.y ) * texelSize, dp ) ) +
1953				texture( shadowMap, vec4( bd3D + ( tangent * sample3.x + bitangent * sample3.y ) * texelSize, dp ) ) +
1954				texture( shadowMap, vec4( bd3D + ( tangent * sample4.x + bitangent * sample4.y ) * texelSize, dp ) )
1955			) * 0.2;
1956		}
1957		return mix( 1.0, shadow, shadowIntensity );
1958	}
1959	#elif defined( SHADOWMAP_TYPE_BASIC )
1960	float getPointShadow( samplerCube shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {
1961		float shadow = 1.0;
1962		vec3 lightToPosition = shadowCoord.xyz;
1963		vec3 absVec = abs( lightToPosition );
1964		float viewSpaceZ = max( max( absVec.x, absVec.y ), absVec.z );
1965		if ( viewSpaceZ - shadowCameraFar <= 0.0 && viewSpaceZ - shadowCameraNear >= 0.0 ) {
1966			float dp = ( shadowCameraFar * ( viewSpaceZ - shadowCameraNear ) ) / ( viewSpaceZ * ( shadowCameraFar - shadowCameraNear ) );
1967			dp += shadowBias;
1968			vec3 bd3D = normalize( lightToPosition );
1969			float depth = textureCube( shadowMap, bd3D ).r;
1970			#ifdef USE_REVERSED_DEPTH_BUFFER
1971				depth = 1.0 - depth;
1972			#endif
1973			shadow = step( dp, depth );
1974		}
1975		return mix( 1.0, shadow, shadowIntensity );
1976	}
1977	#endif
1978	#endif
1979#endif`,shadowmap_pars_vertex:`#if NUM_SPOT_LIGHT_COORDS > 0
1980	uniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ];
1981	varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];
1982#endif
1983#ifdef USE_SHADOWMAP
1984	#if NUM_DIR_LIGHT_SHADOWS > 0
1985		uniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ];
1986		varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];
1987		struct DirectionalLightShadow {
1988			float shadowIntensity;
1989			float shadowBias;
1990			float shadowNormalBias;
1991			float shadowRadius;
1992			vec2 shadowMapSize;
1993		};
1994		uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];
1995	#endif
1996	#if NUM_SPOT_LIGHT_SHADOWS > 0
1997		struct SpotLightShadow {
1998			float shadowIntensity;
1999			float shadowBias;
2000			float shadowNormalBias;
2001			float shadowRadius;
2002			vec2 shadowMapSize;
2003		};
2004		uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];
2005	#endif
2006	#if NUM_POINT_LIGHT_SHADOWS > 0
2007		uniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ];
2008		varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];
2009		struct PointLightShadow {
2010			float shadowIntensity;
2011			float shadowBias;
2012			float shadowNormalBias;
2013			float shadowRadius;
2014			vec2 shadowMapSize;
2015			float shadowCameraNear;
2016			float shadowCameraFar;
2017		};
2018		uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];
2019	#endif
2020#endif`,shadowmap_vertex:`#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 )
2021	#ifdef HAS_NORMAL
2022		vec3 shadowWorldNormal = transformNormalByInverseViewMatrix( transformedNormal, viewMatrix );
2023	#else
2024		vec3 shadowWorldNormal = vec3( 0.0 );
2025	#endif
2026	vec4 shadowWorldPosition;
2027#endif
2028#if defined( USE_SHADOWMAP )
2029	#if NUM_DIR_LIGHT_SHADOWS > 0
2030		#pragma unroll_loop_start
2031		for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {
2032			shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 );
2033			vDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition;
2034		}
2035		#pragma unroll_loop_end
2036	#endif
2037	#if NUM_POINT_LIGHT_SHADOWS > 0
2038		#pragma unroll_loop_start
2039		for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {
2040			shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 );
2041			vPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition;
2042		}
2043		#pragma unroll_loop_end
2044	#endif
2045#endif
2046#if NUM_SPOT_LIGHT_COORDS > 0
2047	#pragma unroll_loop_start
2048	for ( int i = 0; i < NUM_SPOT_LIGHT_COORDS; i ++ ) {
2049		shadowWorldPosition = worldPosition;
2050		#if ( defined( USE_SHADOWMAP ) && UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )
2051			shadowWorldPosition.xyz += shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias;
2052		#endif
2053		vSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition;
2054	}
2055	#pragma unroll_loop_end
2056#endif`,shadowmask_pars_fragment:`float getShadowMask() {
2057	float shadow = 1.0;
2058	#ifdef USE_SHADOWMAP
2059	#if NUM_DIR_LIGHT_SHADOWS > 0
2060	DirectionalLightShadow directionalLight;
2061	#pragma unroll_loop_start
2062	for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {
2063		directionalLight = directionalLightShadows[ i ];
2064		shadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowIntensity, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;
2065	}
2066	#pragma unroll_loop_end
2067	#endif
2068	#if NUM_SPOT_LIGHT_SHADOWS > 0
2069	SpotLightShadow spotLight;
2070	#pragma unroll_loop_start
2071	for ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {
2072		spotLight = spotLightShadows[ i ];
2073		shadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowIntensity, spotLight.shadowBias, spotLight.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;
2074	}
2075	#pragma unroll_loop_end
2076	#endif
2077	#if NUM_POINT_LIGHT_SHADOWS > 0 && ( defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_BASIC ) )
2078	PointLightShadow pointLight;
2079	#pragma unroll_loop_start
2080	for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {
2081		pointLight = pointLightShadows[ i ];
2082		shadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowIntensity, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;
2083	}
2084	#pragma unroll_loop_end
2085	#endif
2086	#endif
2087	return shadow;
2088}`,skinbase_vertex:`#ifdef USE_SKINNING
2089	mat4 boneMatX = getBoneMatrix( skinIndex.x );
2090	mat4 boneMatY = getBoneMatrix( skinIndex.y );
2091	mat4 boneMatZ = getBoneMatrix( skinIndex.z );
2092	mat4 boneMatW = getBoneMatrix( skinIndex.w );
2093#endif`,skinning_pars_vertex:`#ifdef USE_SKINNING
2094	uniform mat4 bindMatrix;
2095	uniform mat4 bindMatrixInverse;
2096	uniform highp sampler2D boneTexture;
2097	mat4 getBoneMatrix( const in float i ) {
2098		int size = textureSize( boneTexture, 0 ).x;
2099		int j = int( i ) * 4;
2100		int x = j % size;
2101		int y = j / size;
2102		vec4 v1 = texelFetch( boneTexture, ivec2( x, y ), 0 );
2103		vec4 v2 = texelFetch( boneTexture, ivec2( x + 1, y ), 0 );
2104		vec4 v3 = texelFetch( boneTexture, ivec2( x + 2, y ), 0 );
2105		vec4 v4 = texelFetch( boneTexture, ivec2( x + 3, y ), 0 );
2106		return mat4( v1, v2, v3, v4 );
2107	}
2108#endif`,skinning_vertex:`#ifdef USE_SKINNING
2109	vec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );
2110	vec4 skinned = vec4( 0.0 );
2111	skinned += boneMatX * skinVertex * skinWeight.x;
2112	skinned += boneMatY * skinVertex * skinWeight.y;
2113	skinned += boneMatZ * skinVertex * skinWeight.z;
2114	skinned += boneMatW * skinVertex * skinWeight.w;
2115	transformed = ( bindMatrixInverse * skinned ).xyz;
2116#endif`,skinnormal_vertex:`#ifdef USE_SKINNING
2117	mat4 skinMatrix = mat4( 0.0 );
2118	skinMatrix += skinWeight.x * boneMatX;
2119	skinMatrix += skinWeight.y * boneMatY;
2120	skinMatrix += skinWeight.z * boneMatZ;
2121	skinMatrix += skinWeight.w * boneMatW;
2122	skinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;
2123	objectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;
2124	#ifdef USE_TANGENT
2125		objectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz;
2126	#endif
2127#endif`,specularmap_fragment:`float specularStrength;
2128#ifdef USE_SPECULARMAP
2129	vec4 texelSpecular = texture2D( specularMap, vSpecularMapUv );
2130	specularStrength = texelSpecular.r;
2131#else
2132	specularStrength = 1.0;
2133#endif`,specularmap_pars_fragment:`#ifdef USE_SPECULARMAP
2134	uniform sampler2D specularMap;
2135#endif`,tonemapping_fragment:`#if defined( TONE_MAPPING )
2136	gl_FragColor.rgb = toneMapping( gl_FragColor.rgb );
2137#endif`,tonemapping_pars_fragment:`#ifndef saturate
2138#define saturate( a ) clamp( a, 0.0, 1.0 )
2139#endif
2140uniform float toneMappingExposure;
2141vec3 LinearToneMapping( vec3 color ) {
2142	return saturate( toneMappingExposure * color );
2143}
2144vec3 ReinhardToneMapping( vec3 color ) {
2145	color *= toneMappingExposure;
2146	return saturate( color / ( vec3( 1.0 ) + color ) );
2147}
2148vec3 CineonToneMapping( vec3 color ) {
2149	color *= toneMappingExposure;
2150	color = max( vec3( 0.0 ), color - 0.004 );
2151	return pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );
2152}
2153vec3 RRTAndODTFit( vec3 v ) {
2154	vec3 a = v * ( v + 0.0245786 ) - 0.000090537;
2155	vec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081;
2156	return a / b;
2157}
2158vec3 ACESFilmicToneMapping( vec3 color ) {
2159	const mat3 ACESInputMat = mat3(
2160		vec3( 0.59719, 0.07600, 0.02840 ),		vec3( 0.35458, 0.90834, 0.13383 ),
2161		vec3( 0.04823, 0.01566, 0.83777 )
2162	);
2163	const mat3 ACESOutputMat = mat3(
2164		vec3(  1.60475, -0.10208, -0.00327 ),		vec3( -0.53108,  1.10813, -0.07276 ),
2165		vec3( -0.07367, -0.00605,  1.07602 )
2166	);
2167	color *= toneMappingExposure / 0.6;
2168	color = ACESInputMat * color;
2169	color = RRTAndODTFit( color );
2170	color = ACESOutputMat * color;
2171	return saturate( color );
2172}
2173const mat3 LINEAR_REC2020_TO_LINEAR_SRGB = mat3(
2174	vec3( 1.6605, - 0.1246, - 0.0182 ),
2175	vec3( - 0.5876, 1.1329, - 0.1006 ),
2176	vec3( - 0.0728, - 0.0083, 1.1187 )
2177);
2178const mat3 LINEAR_SRGB_TO_LINEAR_REC2020 = mat3(
2179	vec3( 0.6274, 0.0691, 0.0164 ),
2180	vec3( 0.3293, 0.9195, 0.0880 ),
2181	vec3( 0.0433, 0.0113, 0.8956 )
2182);
2183vec3 agxDefaultContrastApprox( vec3 x ) {
2184	vec3 x2 = x * x;
2185	vec3 x4 = x2 * x2;
2186	return + 15.5 * x4 * x2
2187		- 40.14 * x4 * x
2188		+ 31.96 * x4
2189		- 6.868 * x2 * x
2190		+ 0.4298 * x2
2191		+ 0.1191 * x
2192		- 0.00232;
2193}
2194vec3 AgXToneMapping( vec3 color ) {
2195	const mat3 AgXInsetMatrix = mat3(
2196		vec3( 0.856627153315983, 0.137318972929847, 0.11189821299995 ),
2197		vec3( 0.0951212405381588, 0.761241990602591, 0.0767994186031903 ),
2198		vec3( 0.0482516061458583, 0.101439036467562, 0.811302368396859 )
2199	);
2200	const mat3 AgXOutsetMatrix = mat3(
2201		vec3( 1.1271005818144368, - 0.1413297634984383, - 0.14132976349843826 ),
2202		vec3( - 0.11060664309660323, 1.157823702216272, - 0.11060664309660294 ),
2203		vec3( - 0.016493938717834573, - 0.016493938717834257, 1.2519364065950405 )
2204	);
2205	const float AgxMinEv = - 12.47393;	const float AgxMaxEv = 4.026069;
2206	color *= toneMappingExposure;
2207	color = LINEAR_SRGB_TO_LINEAR_REC2020 * color;
2208	color = AgXInsetMatrix * color;
2209	color = max( color, 1e-10 );	color = log2( color );
2210	color = ( color - AgxMinEv ) / ( AgxMaxEv - AgxMinEv );
2211	color = clamp( color, 0.0, 1.0 );
2212	color = agxDefaultContrastApprox( color );
2213	color = AgXOutsetMatrix * color;
2214	color = pow( max( vec3( 0.0 ), color ), vec3( 2.2 ) );
2215	color = LINEAR_REC2020_TO_LINEAR_SRGB * color;
2216	color = clamp( color, 0.0, 1.0 );
2217	return color;
2218}
2219vec3 NeutralToneMapping( vec3 color ) {
2220	const float StartCompression = 0.8 - 0.04;
2221	const float Desaturation = 0.15;
2222	color *= toneMappingExposure;
2223	float x = min( color.r, min( color.g, color.b ) );
2224	float offset = x < 0.08 ? x - 6.25 * x * x : 0.04;
2225	color -= offset;
2226	float peak = max( color.r, max( color.g, color.b ) );
2227	if ( peak < StartCompression ) return color;
2228	float d = 1. - StartCompression;
2229	float newPeak = 1. - d * d / ( peak + d - StartCompression );
2230	color *= newPeak / peak;
2231	float g = 1. - 1. / ( Desaturation * ( peak - newPeak ) + 1. );
2232	return mix( color, vec3( newPeak ), g );
2233}
2234vec3 CustomToneMapping( vec3 color ) { return color; }`,transmission_fragment:`#ifdef USE_TRANSMISSION
2235	material.transmission = transmission;
2236	material.transmissionAlpha = 1.0;
2237	material.thickness = thickness;
2238	material.attenuationDistance = attenuationDistance;
2239	material.attenuationColor = attenuationColor;
2240	#ifdef USE_TRANSMISSIONMAP
2241		material.transmission *= texture2D( transmissionMap, vTransmissionMapUv ).r;
2242	#endif
2243	#ifdef USE_THICKNESSMAP
2244		material.thickness *= texture2D( thicknessMap, vThicknessMapUv ).g;
2245	#endif
2246	vec3 pos = vWorldPosition;
2247	vec3 v = normalize( cameraPosition - pos );
2248	vec3 n = transformNormalByInverseViewMatrix( normal, viewMatrix );
2249	vec4 transmitted = getIBLVolumeRefraction(
2250		n, v, material.roughness, material.diffuseContribution, material.specularColorBlended
vendor: 14,463 bytes, lines 2250-2654
2250, material.specularF90,
2251		pos, modelMatrix, viewMatrix, projectionMatrix, material.dispersion, material.ior, material.thickness,
2252		material.attenuationColor, material.attenuationDistance );
2253	material.transmissionAlpha = mix( material.transmissionAlpha, transmitted.a, material.transmission );
2254	totalDiffuse = mix( totalDiffuse, transmitted.rgb, material.transmission );
2255#endif`,transmission_pars_fragment:`#ifdef USE_TRANSMISSION
2256	uniform float transmission;
2257	uniform float thickness;
2258	uniform float attenuationDistance;
2259	uniform vec3 attenuationColor;
2260	#ifdef USE_TRANSMISSIONMAP
2261		uniform sampler2D transmissionMap;
2262	#endif
2263	#ifdef USE_THICKNESSMAP
2264		uniform sampler2D thicknessMap;
2265	#endif
2266	uniform vec2 transmissionSamplerSize;
2267	uniform sampler2D transmissionSamplerMap;
2268	uniform mat4 modelMatrix;
2269	uniform mat4 projectionMatrix;
2270	varying vec3 vWorldPosition;
2271	float w0( float a ) {
2272		return ( 1.0 / 6.0 ) * ( a * ( a * ( - a + 3.0 ) - 3.0 ) + 1.0 );
2273	}
2274	float w1( float a ) {
2275		return ( 1.0 / 6.0 ) * ( a *  a * ( 3.0 * a - 6.0 ) + 4.0 );
2276	}
2277	float w2( float a ){
2278		return ( 1.0 / 6.0 ) * ( a * ( a * ( - 3.0 * a + 3.0 ) + 3.0 ) + 1.0 );
2279	}
2280	float w3( float a ) {
2281		return ( 1.0 / 6.0 ) * ( a * a * a );
2282	}
2283	float g0( float a ) {
2284		return w0( a ) + w1( a );
2285	}
2286	float g1( float a ) {
2287		return w2( a ) + w3( a );
2288	}
2289	float h0( float a ) {
2290		return - 1.0 + w1( a ) / ( w0( a ) + w1( a ) );
2291	}
2292	float h1( float a ) {
2293		return 1.0 + w3( a ) / ( w2( a ) + w3( a ) );
2294	}
2295	vec4 bicubic( sampler2D tex, vec2 uv, vec4 texelSize, float lod ) {
2296		uv = uv * texelSize.zw + 0.5;
2297		vec2 iuv = floor( uv );
2298		vec2 fuv = fract( uv );
2299		float g0x = g0( fuv.x );
2300		float g1x = g1( fuv.x );
2301		float h0x = h0( fuv.x );
2302		float h1x = h1( fuv.x );
2303		float h0y = h0( fuv.y );
2304		float h1y = h1( fuv.y );
2305		vec2 p0 = ( vec2( iuv.x + h0x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;
2306		vec2 p1 = ( vec2( iuv.x + h1x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;
2307		vec2 p2 = ( vec2( iuv.x + h0x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;
2308		vec2 p3 = ( vec2( iuv.x + h1x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;
2309		return g0( fuv.y ) * ( g0x * textureLod( tex, p0, lod ) + g1x * textureLod( tex, p1, lod ) ) +
2310			g1( fuv.y ) * ( g0x * textureLod( tex, p2, lod ) + g1x * textureLod( tex, p3, lod ) );
2311	}
2312	vec4 textureBicubic( sampler2D sampler, vec2 uv, float lod ) {
2313		vec2 fLodSize = vec2( textureSize( sampler, int( lod ) ) );
2314		vec2 cLodSize = vec2( textureSize( sampler, int( lod + 1.0 ) ) );
2315		vec2 fLodSizeInv = 1.0 / fLodSize;
2316		vec2 cLodSizeInv = 1.0 / cLodSize;
2317		vec4 fSample = bicubic( sampler, uv, vec4( fLodSizeInv, fLodSize ), floor( lod ) );
2318		vec4 cSample = bicubic( sampler, uv, vec4( cLodSizeInv, cLodSize ), ceil( lod ) );
2319		return mix( fSample, cSample, fract( lod ) );
2320	}
2321	vec3 getVolumeTransmissionRay( const in vec3 n, const in vec3 v, const in float thickness, const in float ior, const in mat4 modelMatrix ) {
2322		vec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior );
2323		vec3 modelScale;
2324		modelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) );
2325		modelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) );
2326		modelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) );
2327		return normalize( refractionVector ) * thickness * modelScale;
2328	}
2329	float applyIorToRoughness( const in float roughness, const in float ior ) {
2330		return roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 );
2331	}
2332	vec4 getTransmissionSample( const in vec2 fragCoord, const in float roughness, const in float ior ) {
2333		float lod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior );
2334		return textureBicubic( transmissionSamplerMap, fragCoord.xy, lod );
2335	}
2336	vec3 volumeAttenuation( const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) {
2337		if ( isinf( attenuationDistance ) ) {
2338			return vec3( 1.0 );
2339		} else {
2340			vec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance;
2341			vec3 transmittance = exp( - attenuationCoefficient * transmissionDistance );			return transmittance;
2342		}
2343	}
2344	vec4 getIBLVolumeRefraction( const in vec3 n, const in vec3 v, const in float roughness, const in vec3 diffuseColor,
2345		const in vec3 specularColor, const in float specularF90, const in vec3 position, const in mat4 modelMatrix,
2346		const in mat4 viewMatrix, const in mat4 projMatrix, const in float dispersion, const in float ior, const in float thickness,
2347		const in vec3 attenuationColor, const in float attenuationDistance ) {
2348		vec4 transmittedLight;
2349		vec3 transmittance;
2350		#ifdef USE_DISPERSION
2351			float halfSpread = ( ior - 1.0 ) * 0.025 * dispersion;
2352			vec3 iors = vec3( ior - halfSpread, ior, ior + halfSpread );
2353			for ( int i = 0; i < 3; i ++ ) {
2354				vec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, iors[ i ], modelMatrix );
2355				vec3 refractedRayExit = position + transmissionRay;
2356				vec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );
2357				vec2 refractionCoords = ndcPos.xy / ndcPos.w;
2358				refractionCoords += 1.0;
2359				refractionCoords /= 2.0;
2360				vec4 transmissionSample = getTransmissionSample( refractionCoords, roughness, iors[ i ] );
2361				transmittedLight[ i ] = transmissionSample[ i ];
2362				transmittedLight.a += transmissionSample.a;
2363				transmittance[ i ] = diffuseColor[ i ] * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance )[ i ];
2364			}
2365			transmittedLight.a /= 3.0;
2366		#else
2367			vec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix );
2368			vec3 refractedRayExit = position + transmissionRay;
2369			vec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );
2370			vec2 refractionCoords = ndcPos.xy / ndcPos.w;
2371			refractionCoords += 1.0;
2372			refractionCoords /= 2.0;
2373			transmittedLight = getTransmissionSample( refractionCoords, roughness, ior );
2374			transmittance = diffuseColor * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance );
2375		#endif
2376		vec3 attenuatedColor = transmittance * transmittedLight.rgb;
2377		vec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness );
2378		float transmittanceFactor = ( transmittance.r + transmittance.g + transmittance.b ) / 3.0;
2379		return vec4( ( 1.0 - F ) * attenuatedColor, 1.0 - ( 1.0 - transmittedLight.a ) * transmittanceFactor );
2380	}
2381#endif`,uv_pars_fragment:`#if defined( USE_UV ) || defined( USE_ANISOTROPY )
2382	varying vec2 vUv;
2383#endif
2384#ifdef USE_MAP
2385	varying vec2 vMapUv;
2386#endif
2387#ifdef USE_ALPHAMAP
2388	varying vec2 vAlphaMapUv;
2389#endif
2390#ifdef USE_LIGHTMAP
2391	varying vec2 vLightMapUv;
2392#endif
2393#ifdef USE_AOMAP
2394	varying vec2 vAoMapUv;
2395#endif
2396#ifdef USE_BUMPMAP
2397	varying vec2 vBumpMapUv;
2398#endif
2399#ifdef USE_NORMALMAP
2400	varying vec2 vNormalMapUv;
2401#endif
2402#ifdef USE_EMISSIVEMAP
2403	varying vec2 vEmissiveMapUv;
2404#endif
2405#ifdef USE_METALNESSMAP
2406	varying vec2 vMetalnessMapUv;
2407#endif
2408#ifdef USE_ROUGHNESSMAP
2409	varying vec2 vRoughnessMapUv;
2410#endif
2411#ifdef USE_ANISOTROPYMAP
2412	varying vec2 vAnisotropyMapUv;
2413#endif
2414#ifdef USE_CLEARCOATMAP
2415	varying vec2 vClearcoatMapUv;
2416#endif
2417#ifdef USE_CLEARCOAT_NORMALMAP
2418	varying vec2 vClearcoatNormalMapUv;
2419#endif
2420#ifdef USE_CLEARCOAT_ROUGHNESSMAP
2421	varying vec2 vClearcoatRoughnessMapUv;
2422#endif
2423#ifdef USE_IRIDESCENCEMAP
2424	varying vec2 vIridescenceMapUv;
2425#endif
2426#ifdef USE_IRIDESCENCE_THICKNESSMAP
2427	varying vec2 vIridescenceThicknessMapUv;
2428#endif
2429#ifdef USE_SHEEN_COLORMAP
2430	varying vec2 vSheenColorMapUv;
2431#endif
2432#ifdef USE_SHEEN_ROUGHNESSMAP
2433	varying vec2 vSheenRoughnessMapUv;
2434#endif
2435#ifdef USE_SPECULARMAP
2436	varying vec2 vSpecularMapUv;
2437#endif
2438#ifdef USE_SPECULAR_COLORMAP
2439	varying vec2 vSpecularColorMapUv;
2440#endif
2441#ifdef USE_SPECULAR_INTENSITYMAP
2442	varying vec2 vSpecularIntensityMapUv;
2443#endif
2444#ifdef USE_TRANSMISSIONMAP
2445	uniform mat3 transmissionMapTransform;
2446	varying vec2 vTransmissionMapUv;
2447#endif
2448#ifdef USE_THICKNESSMAP
2449	uniform mat3 thicknessMapTransform;
2450	varying vec2 vThicknessMapUv;
2451#endif`,uv_pars_vertex:`#if defined( USE_UV ) || defined( USE_ANISOTROPY )
2452	varying vec2 vUv;
2453#endif
2454#ifdef USE_MAP
2455	uniform mat3 mapTransform;
2456	varying vec2 vMapUv;
2457#endif
2458#ifdef USE_ALPHAMAP
2459	uniform mat3 alphaMapTransform;
2460	varying vec2 vAlphaMapUv;
2461#endif
2462#ifdef USE_LIGHTMAP
2463	uniform mat3 lightMapTransform;
2464	varying vec2 vLightMapUv;
2465#endif
2466#ifdef USE_AOMAP
2467	uniform mat3 aoMapTransform;
2468	varying vec2 vAoMapUv;
2469#endif
2470#ifdef USE_BUMPMAP
2471	uniform mat3 bumpMapTransform;
2472	varying vec2 vBumpMapUv;
2473#endif
2474#ifdef USE_NORMALMAP
2475	uniform mat3 normalMapTransform;
2476	varying vec2 vNormalMapUv;
2477#endif
2478#ifdef USE_DISPLACEMENTMAP
2479	uniform mat3 displacementMapTransform;
2480	varying vec2 vDisplacementMapUv;
2481#endif
2482#ifdef USE_EMISSIVEMAP
2483	uniform mat3 emissiveMapTransform;
2484	varying vec2 vEmissiveMapUv;
2485#endif
2486#ifdef USE_METALNESSMAP
2487	uniform mat3 metalnessMapTransform;
2488	varying vec2 vMetalnessMapUv;
2489#endif
2490#ifdef USE_ROUGHNESSMAP
2491	uniform mat3 roughnessMapTransform;
2492	varying vec2 vRoughnessMapUv;
2493#endif
2494#ifdef USE_ANISOTROPYMAP
2495	uniform mat3 anisotropyMapTransform;
2496	varying vec2 vAnisotropyMapUv;
2497#endif
2498#ifdef USE_CLEARCOATMAP
2499	uniform mat3 clearcoatMapTransform;
2500	varying vec2 vClearcoatMapUv;
2501#endif
2502#ifdef USE_CLEARCOAT_NORMALMAP
2503	uniform mat3 clearcoatNormalMapTransform;
2504	varying vec2 vClearcoatNormalMapUv;
2505#endif
2506#ifdef USE_CLEARCOAT_ROUGHNESSMAP
2507	uniform mat3 clearcoatRoughnessMapTransform;
2508	varying vec2 vClearcoatRoughnessMapUv;
2509#endif
2510#ifdef USE_SHEEN_COLORMAP
2511	uniform mat3 sheenColorMapTransform;
2512	varying vec2 vSheenColorMapUv;
2513#endif
2514#ifdef USE_SHEEN_ROUGHNESSMAP
2515	uniform mat3 sheenRoughnessMapTransform;
2516	varying vec2 vSheenRoughnessMapUv;
2517#endif
2518#ifdef USE_IRIDESCENCEMAP
2519	uniform mat3 iridescenceMapTransform;
2520	varying vec2 vIridescenceMapUv;
2521#endif
2522#ifdef USE_IRIDESCENCE_THICKNESSMAP
2523	uniform mat3 iridescenceThicknessMapTransform;
2524	varying vec2 vIridescenceThicknessMapUv;
2525#endif
2526#ifdef USE_SPECULARMAP
2527	uniform mat3 specularMapTransform;
2528	varying vec2 vSpecularMapUv;
2529#endif
2530#ifdef USE_SPECULAR_COLORMAP
2531	uniform mat3 specularColorMapTransform;
2532	varying vec2 vSpecularColorMapUv;
2533#endif
2534#ifdef USE_SPECULAR_INTENSITYMAP
2535	uniform mat3 specularIntensityMapTransform;
2536	varying vec2 vSpecularIntensityMapUv;
2537#endif
2538#ifdef USE_TRANSMISSIONMAP
2539	uniform mat3 transmissionMapTransform;
2540	varying vec2 vTransmissionMapUv;
2541#endif
2542#ifdef USE_THICKNESSMAP
2543	uniform mat3 thicknessMapTransform;
2544	varying vec2 vThicknessMapUv;
2545#endif`,uv_vertex:`#if defined( USE_UV ) || defined( USE_ANISOTROPY )
2546	vUv = vec3( uv, 1 ).xy;
2547#endif
2548#ifdef USE_MAP
2549	vMapUv = ( mapTransform * vec3( MAP_UV, 1 ) ).xy;
2550#endif
2551#ifdef USE_ALPHAMAP
2552	vAlphaMapUv = ( alphaMapTransform * vec3( ALPHAMAP_UV, 1 ) ).xy;
2553#endif
2554#ifdef USE_LIGHTMAP
2555	vLightMapUv = ( lightMapTransform * vec3( LIGHTMAP_UV, 1 ) ).xy;
2556#endif
2557#ifdef USE_AOMAP
2558	vAoMapUv = ( aoMapTransform * vec3( AOMAP_UV, 1 ) ).xy;
2559#endif
2560#ifdef USE_BUMPMAP
2561	vBumpMapUv = ( bumpMapTransform * vec3( BUMPMAP_UV, 1 ) ).xy;
2562#endif
2563#ifdef USE_NORMALMAP
2564	vNormalMapUv = ( normalMapTransform * vec3( NORMALMAP_UV, 1 ) ).xy;
2565#endif
2566#ifdef USE_DISPLACEMENTMAP
2567	vDisplacementMapUv = ( displacementMapTransform * vec3( DISPLACEMENTMAP_UV, 1 ) ).xy;
2568#endif
2569#ifdef USE_EMISSIVEMAP
2570	vEmissiveMapUv = ( emissiveMapTransform * vec3( EMISSIVEMAP_UV, 1 ) ).xy;
2571#endif
2572#ifdef USE_METALNESSMAP
2573	vMetalnessMapUv = ( metalnessMapTransform * vec3( METALNESSMAP_UV, 1 ) ).xy;
2574#endif
2575#ifdef USE_ROUGHNESSMAP
2576	vRoughnessMapUv = ( roughnessMapTransform * vec3( ROUGHNESSMAP_UV, 1 ) ).xy;
2577#endif
2578#ifdef USE_ANISOTROPYMAP
2579	vAnisotropyMapUv = ( anisotropyMapTransform * vec3( ANISOTROPYMAP_UV, 1 ) ).xy;
2580#endif
2581#ifdef USE_CLEARCOATMAP
2582	vClearcoatMapUv = ( clearcoatMapTransform * vec3( CLEARCOATMAP_UV, 1 ) ).xy;
2583#endif
2584#ifdef USE_CLEARCOAT_NORMALMAP
2585	vClearcoatNormalMapUv = ( clearcoatNormalMapTransform * vec3( CLEARCOAT_NORMALMAP_UV, 1 ) ).xy;
2586#endif
2587#ifdef USE_CLEARCOAT_ROUGHNESSMAP
2588	vClearcoatRoughnessMapUv = ( clearcoatRoughnessMapTransform * vec3( CLEARCOAT_ROUGHNESSMAP_UV, 1 ) ).xy;
2589#endif
2590#ifdef USE_IRIDESCENCEMAP
2591	vIridescenceMapUv = ( iridescenceMapTransform * vec3( IRIDESCENCEMAP_UV, 1 ) ).xy;
2592#endif
2593#ifdef USE_IRIDESCENCE_THICKNESSMAP
2594	vIridescenceThicknessMapUv = ( iridescenceThicknessMapTransform * vec3( IRIDESCENCE_THICKNESSMAP_UV, 1 ) ).xy;
2595#endif
2596#ifdef USE_SHEEN_COLORMAP
2597	vSheenColorMapUv = ( sheenColorMapTransform * vec3( SHEEN_COLORMAP_UV, 1 ) ).xy;
2598#endif
2599#ifdef USE_SHEEN_ROUGHNESSMAP
2600	vSheenRoughnessMapUv = ( sheenRoughnessMapTransform * vec3( SHEEN_ROUGHNESSMAP_UV, 1 ) ).xy;
2601#endif
2602#ifdef USE_SPECULARMAP
2603	vSpecularMapUv = ( specularMapTransform * vec3( SPECULARMAP_UV, 1 ) ).xy;
2604#endif
2605#ifdef USE_SPECULAR_COLORMAP
2606	vSpecularColorMapUv = ( specularColorMapTransform * vec3( SPECULAR_COLORMAP_UV, 1 ) ).xy;
2607#endif
2608#ifdef USE_SPECULAR_INTENSITYMAP
2609	vSpecularIntensityMapUv = ( specularIntensityMapTransform * vec3( SPECULAR_INTENSITYMAP_UV, 1 ) ).xy;
2610#endif
2611#ifdef USE_TRANSMISSIONMAP
2612	vTransmissionMapUv = ( transmissionMapTransform * vec3( TRANSMISSIONMAP_UV, 1 ) ).xy;
2613#endif
2614#ifdef USE_THICKNESSMAP
2615	vThicknessMapUv = ( thicknessMapTransform * vec3( THICKNESSMAP_UV, 1 ) ).xy;
2616#endif`,worldpos_vertex:`#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0
2617	vec4 worldPosition = vec4( transformed, 1.0 );
2618	#ifdef USE_BATCHING
2619		worldPosition = batchingMatrix * worldPosition;
2620	#endif
2621	#ifdef USE_INSTANCING
2622		worldPosition = instanceMatrix * worldPosition;
2623	#endif
2624	worldPosition = modelMatrix * worldPosition;
2625#endif`,background_vert:`varying vec2 vUv;
2626uniform mat3 uvTransform;
2627void main() {
2628	vUv = ( uvTransform * vec3( uv, 1 ) ).xy;
2629	gl_Position = vec4( position.xy, 1.0, 1.0 );
2630}`,background_frag:`uniform sampler2D t2D;
2631uniform float backgroundIntensity;
2632varying vec2 vUv;
2633void main() {
2634	vec4 texColor = texture2D( t2D, vUv );
2635	#ifdef DECODE_VIDEO_TEXTURE
2636		texColor = vec4( mix( pow( texColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), texColor.rgb * 0.0773993808, vec3( lessThanEqual( texColor.rgb, vec3( 0.04045 ) ) ) ), texColor.w );
2637	#endif
2638	texColor.rgb *= backgroundIntensity;
2639	gl_FragColor = texColor;
2640	#include <tonemapping_fragment>
2641	#include <colorspace_fragment>
2642}`,backgroundCube_vert:`varying vec3 vWorldDirection;
2643#include <common>
2644void main() {
2645	vWorldDirection = transformDirection( position, modelMatrix );
2646	#include <begin_vertex>
2647	#include <project_vertex>
2648	gl_Position.z = gl_Position.w;
2649}`,backgroundCube_frag:`#ifdef ENVMAP_TYPE_CUBE
2650	uniform samplerCube envMap;
2651#elif defined( ENVMAP_TYPE_CUBE_UV )
2652	uniform sampler2D envMap;
2653#endif
2654uniform float 
2654backgroundBlurriness;
2655uniform float backgroundIntensity;
2656uniform mat3 backgroundRotation;
2657varying vec3 vWorldDirection;
2658#include <cube_uv_reflection_fragment>
2659void main() {
2660	#ifdef ENVMAP_TYPE_CUBE
2661		vec4 texColor = textureCube( envMap, backgroundRotation * vWorldDirection );
2662	#elif defined( ENVMAP_TYPE_CUBE_UV )
2663		vec4 texColor = textureCubeUV( envMap, backgroundRotation * vWorldDirection, backgroundBlurriness );
2664	#else
2665		vec4 texColor = vec4( 0.0, 0.0, 0.0, 1.0 );
2666	#endif
2667	texColor.rgb *= backgroundIntensity;
2668	gl_FragColor = texColor;
2669	#include <tonemapping_fragment>
2670	#include <colorspace_fragment>
2671}`,cube_vert:`varying vec3 vWorldDirection;
2672#include <common>
2673void main() {
2674	vWorldDirection = transformDirection( position, modelMatrix );
2675	#include <begin_vertex>
2676	#include <project_vertex>
2677	gl_Position.z = gl_Position.w;
2678}`,cube_frag:`uniform samplerCube tCube;
2679uniform float tFlip;
2680uniform float opacity;
2681varying vec3 vWorldDirection;
2682void main() {
2683	vec4 texColor = textureCube( tCube, vec3( tFlip * vWorldDirection.x, vWorldDirection.yz ) );
2684	gl_FragColor = texColor;
2685	gl_FragColor.a *= opacity;
2686	#include <tonemapping_fragment>
2687	#include <colorspace_fragment>
2688}`,depth_vert:`#include <common>
2689#include <batching_pars_vertex>
2690#include <uv_pars_vertex>
2691#include <displacementmap_pars_vertex>
2692#include <morphtarget_pars_vertex>
2693#include <skinning_pars_vertex>
2694#include <logdepthbuf_pars_vertex>
2695#include <clipping_planes_pars_vertex>
2696varying vec2 vHighPrecisionZW;
2697void main() {
2698	#include <uv_vertex>
2699	#include <batching_vertex>
2700	#include <skinbase_vertex>
2701	#include <morphinstance_vertex>
2702	#ifdef USE_DISPLACEMENTMAP
2703		#include <beginnormal_vertex>
2704		#include <morphnormal_vertex>
2705		#include <skinnormal_vertex>
2706	#endif
2707	#include <begin_vertex>
2708	#include <morphtarget_vertex>
2709	#include <skinning_vertex>
2710	#include <displacementmap_vertex>
2711	#include <project_vertex>
2712	#include <logdepthbuf_vertex>
2713	#include <clipping_planes_vertex>
2714	vHighPrecisionZW = gl_Position.zw;
2715}`,depth_frag:`#if DEPTH_PACKING == 3200
2716	uniform float opacity;
2717#endif
2718#include <common>
2719#include <packing>
2720#include <uv_pars_fragment>
2721#include <map_pars_fragment>
2722#include <alphamap_pars_fragment>
2723#include <alphatest_pars_fragment>
2724#include <alphahash_pars_fragment>
2725#include <logdepthbuf_pars_fragment>
2726#include <clipping_planes_pars_fragment>
2727varying vec2 vHighPrecisionZW;
2728void main() {
2729	vec4 diffuseColor = vec4( 1.0 );
2730	#include <clipping_planes_fragment>
2731	#if DEPTH_PACKING == 3200
2732		diffuseColor.a = opacity;
2733	#endif
2734	#include <map_fragment>
2735	#include <alphamap_fragment>
2736	#include <alphatest_fragment>
2737	#include <alphahash_fragment>
2738	#include <logdepthbuf_fragment>
2739	#ifdef USE_REVERSED_DEPTH_BUFFER
2740		float fragCoordZ = vHighPrecisionZW[ 0 ] / vHighPrecisionZW[ 1 ];
2741	#else
2742		float fragCoordZ = 0.5 * vHighPrecisionZW[ 0 ] / vHighPrecisionZW[ 1 ] + 0.5;
2743	#endif
2744	#if DEPTH_PACKING == 3200
2745		gl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );
2746	#elif DEPTH_PACKING == 3201
2747		gl_FragColor = packDepthToRGBA( fragCoordZ );
2748	#elif DEPTH_PACKING == 3202
2749		gl_FragColor = vec4( packDepthToRGB( fragCoordZ ), 1.0 );
2750	#elif DEPTH_PACKING == 3203
2751		gl_FragColor = vec4( packDepthToRG( fragCoordZ ), 0.0, 1.0 );
2752	#endif
2753}`,distance_vert:`#define DISTANCE
2754varying vec3 vWorldPosition;
2755#include <common>
2756#include <batching_pars_vertex>
2757#include <uv_pars_vertex>
2758#include <displacementmap_pars_vertex>
2759#include <morphtarget_pars_vertex>
2760#include <skinning_pars_vertex>
2761#include <clipping_planes_pars_vertex>
2762void main() {
2763	#include <uv_vertex>
2764	#include <batching_vertex>
2765	#include <skinbase_vertex>
2766	#include <morphinstance_vertex>
2767	#ifdef USE_DISPLACEMENTMAP
2768		#include <beginnormal_vertex>
2769		#include <morphnormal_vertex>
2770		#include <skinnormal_vertex>
2771	#endif
2772	#include <begin_vertex>
2773	#include <morphtarget_vertex>
2774	#include <skinning_vertex>
2775	#include <displacementmap_vertex>
2776	#include <project_vertex>
2777	#include <worldpos_vertex>
2778	#include <clipping_planes_vertex>
2779	vWorldPosition = worldPosition.xyz;
2780}`,distance_frag:`#define DISTANCE
2781uniform vec3 referencePosition;
2782uniform float nearDistance;
2783uniform float farDistance;
2784varying vec3 vWorldPosition;
2785#include <common>
2786#include <uv_pars_fragment>
2787#include <map_pars_fragment>
2788#include <alphamap_pars_fragment>
2789#include <alphatest_pars_fragment>
2790#include <alphahash_pars_fragment>
2791#include <clipping_planes_pars_fragment>
2792void main() {
2793	vec4 diffuseColor = vec4( 1.0 );
2794	#include <clipping_planes_fragment>
2795	#include <map_fragment>
2796	#include <alphamap_fragment>
2797	#include <alphatest_fragment>
2798	#include <alphahash_fragment>
2799	float dist = length( vWorldPosition - referencePosition );
2800	dist = ( dist - nearDistance ) / ( farDistance - nearDistance );
2801	dist = saturate( dist );
2802	gl_FragColor = vec4( dist, 0.0, 0.0, 1.0 );
2803}`,equirect_vert:`varying vec3 vWorldDirection;
2804#include <common>
2805void main() {
2806	vWorldDirection = transformDirection( position, modelMatrix );
2807	#include <begin_vertex>
2808	#include <project_vertex>
2809}`,equirect_frag:`uniform sampler2D tEquirect;
2810varying vec3 vWorldDirection;
2811#include <common>
2812void main() {
2813	vec3 direction = normalize( vWorldDirection );
2814	vec2 sampleUV = equirectUv( direction );
2815	gl_FragColor = texture2D( tEquirect, sampleUV );
2816	#include <tonemapping_fragment>
2817	#include <colorspace_fragment>
2818}`,linedashed_vert:`uniform float scale;
2819attribute float lineDistance;
2820varying float vLineDistance;
2821#include <common>
2822#include <uv_pars_vertex>
2823#include <color_pars_vertex>
2824#include <fog_pars_vertex>
2825#include <morphtarget_pars_vertex>
2826#include <logdepthbuf_pars_vertex>
2827#include <clipping_planes_pars_vertex>
2828void main() {
2829	vLineDistance = scale * lineDistance;
2830	#include <uv_vertex>
2831	#include <color_vertex>
2832	#include <morphinstance_vertex>
2833	#include <morphcolor_vertex>
2834	#include <begin_vertex>
2835	#include <morphtarget_vertex>
2836	#include <project_vertex>
2837	#include <logdepthbuf_vertex>
2838	#include <clipping_planes_vertex>
2839	#include <fog_vertex>
2840}`,linedashed_frag:`uniform vec3 diffuse;
2841uniform float opacity;
2842uniform float dashSize;
2843uniform float totalSize;
2844varying float vLineDistance;
2845#include <common>
2846#include <color_pars_fragment>
2847#include <uv_pars_fragment>
2848#include <map_pars_fragment>
2849#include <fog_pars_fragment>
2850#include <logdepthbuf_pars_fragment>
2851#include <clipping_planes_pars_fragment>
2852void main() {
2853	vec4 diffuseColor = vec4( diffuse, opacity );
2854	#include <clipping_planes_fragment>
2855	if ( mod( vLineDistance, totalSize ) > dashSize ) {
2856		discard;
2857	}
2858	vec3 outgoingLight = vec3( 0.0 );
2859	#include <logdepthbuf_fragment>
2860	#include <map_fragment>
2861	#include <color_fragment>
2862	outgoingLight = diffuseColor.rgb;
2863	#include <opaque_fragment>
2864	#include <tonemapping_fragment>
2865	#include <colorspace_fragment>
2866	#include <fog_fragment>
2867	#include <premultiplied_alpha_fragment>
2868}`,meshbasic_vert:`#include <common>
2869#include <batching_pars_vertex>
2870#include <uv_pars_vertex>
2871#include <envmap_pars_vertex>
2872#include <color_pars_vertex>
2873#include <fog_pars_vertex>
2874#include <morphtarget_pars_vertex>
2875#include <skinning_pars_vertex>
2876#include <logdepthbuf_pars_vertex>
2877#include <clipping_planes_pars_vertex>
2878void main() {
2879	#include <uv_vertex>
2880	#include <color_vertex>
2881	#include <morphinstance_vertex>
2882	#include <morphcolor_vertex>
2883	#include <batching_vertex>
2884	#if defined ( USE_ENVMAP ) || defined ( USE_SKINNING )
2885		#include <beginnormal_vertex>
2886		#include <morphnormal_vertex>
2887		#include <skinbase_vertex>
2888		#include <skinnormal_vertex>
2889		#include <defaultnormal_vertex>
2890	#endif
2891	#include <begin_vertex>
2892	#include <morphtarget_vertex>
2893	#include <skinning_vertex>
2894	#include <project_vertex>
2895	#include <logdepthbuf_vertex>
2896	#include <clipping_planes_vertex>
2897	#include <worldpos_vertex>
2898	#include <envmap_vertex>
2899	#include <fog_vertex>
2900}`,meshbasic_frag:`uniform vec3 diffuse;
2901uniform float opacity;
2902#ifndef FLAT_SHADED
2903	varying vec3 vNormal;
2904#endif
2905#include <common>
2906#include <dithering_pars_fragment>
2907#include <color_pars_fragment>
2908#include <uv_pars_fragment>
2909#include <map_pars_fragment>
2910#include <alphamap_pars_fragment>
2911#include <alphatest_pars_fragment>
2912#include <alphahash_pars_fragment>
2913#include <aomap_pars_fragment>
2914#include <lightmap_pars_fragment>
2915#include <envmap_common_pars_fragment>
2916#include <envmap_pars_fragment>
2917#include <fog_pars_fragment>
2918#include <specularmap_pars_fragment>
2919#include <logdepthbuf_pars_fragment>
2920#include <clipping_planes_pars_fragment>
2921void main() {
2922	vec4 diffuseColor = vec4( diffuse, opacity );
2923	#include <clipping_planes_fragment>
2924	#include <logdepthbuf_fragment>
2925	#include <map_fragment>
2926	#include <color_fragment>
2927	#include <alphamap_fragment>
2928	#include <alphatest_fragment>
2929	#include <alphahash_fragment>
2930	#include <specularmap_fragment>
2931	ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );
2932	#ifdef USE_LIGHTMAP
2933		vec4 lightMapTexel = texture2D( lightMap, vLightMapUv );
2934		reflectedLight.indirectDiffuse += lightMapTexel.rgb * lightMapIntensity * RECIPROCAL_PI;
2935	#else
2936		reflectedLight.indirectDiffuse += vec3( 1.0 );
2937	#endif
2938	#include <aomap_fragment>
2939	reflectedLight.indirectDiffuse *= diffuseColor.rgb;
2940	vec3 outgoingLight = reflectedLight.indirectDiffuse;
2941	#include <envmap_fragment>
2942	#include <opaque_fragment>
2943	#include <tonemapping_fragment>
2944	#include <colorspace_fragment>
2945	#include <fog_fragment>
2946	#include <premultiplied_alpha_fragment>
2947	#include <dithering_fragment>
2948}`,meshlambert_vert:`#define LAMBERT
2949varying vec3 vViewPosition;
2950#include <common>
2951#include <batching_pars_vertex>
2952#include <uv_pars_vertex>
2953#include <displacementmap_pars_vertex>
2954#include <envmap_pars_vertex>
2955#include <color_pars_vertex>
2956#include <fog_pars_vertex>
2957#include <normal_pars_vertex>
2958#include <morphtarget_pars_vertex>
2959#include <skinning_pars_vertex>
2960#include <shadowmap_pars_vertex>
2961#include <logdepthbuf_pars_vertex>
2962#include <clipping_planes_pars_vertex>
2963void main() {
2964	#include <uv_vertex>
2965	#include <color_vertex>
2966	#include <morphinstance_vertex>
2967	#include <morphcolor_vertex>
2968	#include <batching_vertex>
2969	#include <beginnormal_vertex>
2970	#include <morphnormal_vertex>
2971	#include <skinbase_vertex>
2972	#include <skinnormal_vertex>
2973	#include <defaultnormal_vertex>
2974	#include <normal_vertex>
2975	#include <begin_vertex>
2976	#include <morphtarget_vertex>
2977	#include <skinning_vertex>
2978	#include <displacementmap_vertex>
2979	#include <project_vertex>
2980	#include <logdepthbuf_vertex>
2981	#include <clipping_planes_vertex>
2982	vViewPosition = - mvPosition.xyz;
2983	#include <worldpos_vertex>
2984	#include <envmap_vertex>
2985	#include <shadowmap_vertex>
2986	#include <fog_vertex>
2987}`,meshlambert_frag:`#define LAMBERT
2988uniform vec3 diffuse;
2989uniform vec3 emissive;
2990uniform float opacity;
2991#include <common>
2992#include <dithering_pars_fragment>
2993#include <color_pars_fragment>
2994#include <uv_pars_fragment>
2995#include <map_pars_fragment>
2996#include <alphamap_pars_fragment>
2997#include <alphatest_pars_fragment>
2998#include <alphahash_pars_fragment>
2999#include <aomap_pars_fragment>
3000#include <lightmap_pars_fragment>
3001#include <emissivemap_pars_fragment>
3002#include <cube_uv_reflection_fragment>
3003#include <envmap_common_pars_fragment>
3004#include <envmap_pars_fragment>
3005#include <envmap_physical_pars_fragment>
3006#include <fog_pars_fragment>
3007#include <bsdfs>
3008#include <lights_pars_begin>
3009#include <normal_pars_fragment>
3010#include <lights_lambert_pars_fragment>
3011#include <shadowmap_pars_fragment>
3012#include <bumpmap_pars_fragment>
3013#include <normalmap_pars_fragment>
3014#include <specularmap_pars_fragment>
3015#include <logdepthbuf_pars_fragment>
3016#include <clipping_planes_pars_fragment>
3017void main() {
3018	vec4 diffuseColor = vec4( diffuse, opacity );
3019	#include <clipping_planes_fragment>
3020	ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );
3021	vec3 totalEmissiveRadiance = emissive;
3022	#include <logdepthbuf_fragment>
3023	#include <map_fragment>
3024	#include <color_fragment>
3025	#include <alphamap_fragment>
3026	#include <alphatest_fragment>
3027	#include <alphahash_fragment>
3028	#include <specularmap_fragment>
3029	#include <normal_fragment_begin>
3030	#include <normal_fragment_maps>
3031	#include <emissivemap_fragment>
3032	#include <lights_lambert_fragment>
3033	#include <lights_fragment_begin>
3034	#include <lights_fragment_maps>
3035	#include <lights_fragment_end>
3036	#include <aomap_fragment>
3037	vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;
3038	#include <envmap_fragment>
3039	#include <opaque_fragment>
3040	#include <tonemapping_fragment>
3041	#include <colorspace_fragment>
3042	#include <fog_fragment>
3043	#include <premultiplied_alpha_fragment>
3044	#include <dithering_fragment>
3045}`,meshmatcap_vert:`#define MATCAP
3046varying vec3 vViewPosition;
3047#include <common>
3048#include <batching_pars_vertex>
3049#include <uv_pars_vertex>
3050#include <color_pars_vertex>
3051#include <displacementmap_pars_vertex>
3052#include <fog_pars_vertex>
3053#include <normal_pars_vertex>
3054#include <morphtarget_pars_vertex>
3055#include <skinning_pars_vertex>
3056#include <logdepthbuf_pars_vertex>
3057#include <clipping_planes_pars_vertex>
3058void main() {
3059	#include <uv_vertex>
3060	#include <color_vertex>
3061	#include <morphinstance_vertex>
3062	#include <morphcolor_vertex>
3063	#include <batching_vertex>
3064	#include <beginnormal_vertex>
3065	#include <morphnormal_vertex>
3066	#include <skinbase_vertex>
3067	#include <skinnormal_vertex>
3068	#include <defaultnormal_vertex>
3069	#include <normal_vertex>
3070	#include <begin_vertex>
3071	#include <morphtarget_vertex>
3072	#include <skinning_vertex>
3073	#include <displacementmap_vertex>
3074	#include <project_vertex>
3075	#include <logdepthbuf_vertex>
3076	#include <clipping_planes_vertex>
3077	#include <fog_vertex>
3078	vViewPosition = - mvPosition.xyz;
3079}`,meshmatcap_frag:`#define MATCAP
3080uniform vec3 diffuse;
3081uniform float opacity;
3082uniform sampler2D matcap;
3083varying vec3 vViewPosition;
3084#include <common>
3085#include <dithering_pars_fragment>
3086#include <color_pars_fragment>
3087#include <uv_pars_fragment>
3088#include <map_pars_fragment>
3089#include <alphamap_pars_fragment>
3090#include <alphatest_pars_fragment>
3091#include <alphahash_pars_fragment>
3092#include <fog_pars_fragment>
3093#include <normal_pars_fragment>
3094#include <bumpmap_pars_fragment>
3095#include <normalmap_pars_fragment>
3096#include <logdepthbuf_pars_fragment>
3097#include <clipping_planes_pars_fragment>
3098void main() {
3099	vec4 diffuseColor = vec4( diffuse, opacity );
3100	#include <clipping_planes_fragment>
3101	#include <logdepthbuf_fragment>
3102	#include <map_fragment>
3103	#include <color_fragment>
3104	#include <alphamap_fragment>
3105	#include <alphatest_fragment>
3106	#include <alphahash_fragment>
3107	#include <normal_fragment_begin>
3108	#include <normal_fragment_maps>
3109	vec3 viewDir = normalize( vViewPosition );
3110	vec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) );
3111	vec3 y = cross( viewDir, x );
3112	vec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5;
3113	#ifdef USE_MATCAP
3114		vec4 matcapColor = texture2D( matcap, uv );
3115	#else
3116		vec4 matcapColor = vec4( vec3( mix( 0.2, 0.8, uv.y ) ), 1.0 );
3117	#endif
3118	vec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb;
3119	#include <opaque_fragment>
3120	#include <tonemapping_fragment>
3121	#include <colorspace_fragment>
3122	#include <fog_fragment>
3123	#include <premultiplied_alpha_fragment>
3124	#include <dithering_fragment>
3125}`,meshnormal_vert:`#define NORMAL
3126#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )
3127	varying vec3 vViewPosition;
3128#endif
3129#include <common>
3130#include <batching_pars_vertex>
3131#include <uv_pars_vertex>
3132#include <displacementmap_pars_vertex>
3133#include <normal_pars_vertex>
3134#include <morphtarget_pars_vertex>
3135#include <skinning_pars_vertex>
3136#include <logdepthbuf_pars_vertex>
3137#include <clipping_planes_pars_vertex>
3138void main() {
3139	#include <uv_vertex>
3140	#include <batching_vertex>
3141	#include <beginnormal_vertex>
3142	#include <morphinstance_vertex>
3143	#include <morphnormal_vertex>
3144	#include <skinbase_vertex>
3145	#include <skinnormal_vertex>
3146	#include <defaultnormal_vertex>
3147	#include <normal_vertex>
3148	#include <begin_vertex>
3149	#include <morphtarget_vertex>
3150	#include <skinning_vertex>
3151	#include <displacementmap_vertex>
3152	#include <project_vertex>
3153	#include <logdepthbuf_vertex>
3154	#include <clipping_planes_vertex>
3155#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )
3156	vViewPosition = - mvPosition.xyz;
3157#endif
3158}`,meshnormal_frag:`#define NORMAL
3159uniform float opacity;
3160#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )
3161	varying vec3 vViewPosition;
3162#endif
3163#include <uv_pars_fragment>
3164#include <normal_pars_fragment>
3165#include <bumpmap_pars_fragment>
3166#include <normalmap_pars_fragment>
3167#include <logdepthbuf_pars_fragment>
3168#include <clipping_planes_pars_fragment>
3169void main() {
3170	vec4 diffuseColor = vec4( 0.0, 0.0, 0.0, opacity );
3171	#include <clipping_planes_fragment>
3172	#include <logdepthbuf_fragment>
3173	#include <normal_fragment_begin>
3174	#include <normal_fragment_maps>
3175	gl_FragColor = vec4( normalize( normal ) * 0.5 + 0.5, diffuseColor.a );
3176	#ifdef OPAQUE
3177		gl_FragColor.a = 1.0;
3178	#endif
3179}`,meshphong_vert:`#define PHONG
3180varying vec3 vViewPosition;
3181#include <common>
3182#include <batching_pars_vertex>
3183#include <uv_pars_vertex>
3184#include <displacementmap_pars_vertex>
3185#include <envmap_pars_vertex>
3186#include <color_pars_vertex>
3187#include <fog_pars_vertex>
3188#include <normal_pars_vertex>
3189#include <morphtarget_pars_vertex>
3190#include <skinning_pars_vertex>
3191#include <shadowmap_pars_vertex>
3192#include <logdepthbuf_pars_vertex>
3193#include <clipping_planes_pars_vertex>
3194void main() {
3195	#include <uv_vertex>
3196	#include <color_vertex>
3197	#include <morphcolor_vertex>
3198	#include <batching_vertex>
3199	#include <beginnormal_vertex>
3200	#include <morphinstance_vertex>
3201	#include <morphnormal_vertex>
3202	#include <skinbase_vertex>
3203	#include <skinnormal_vertex>
3204	#include <defaultnormal_vertex>
3205	#include <normal_vertex>
3206	#include <begin_vertex>
3207	#include <morphtarget_vertex>
3208	#include <skinning_vertex>
3209	#include <displacementmap_vertex>
3210	#include <project_vertex>
3211	#include <logdepthbuf_vertex>
3212	#include <clipping_planes_vertex>
3213	vViewPosition = - mvPosition.xyz;
3214	#include <worldpos_vertex>
3215	#include <envmap_vertex>
3216	#include <shadowmap_vertex>
3217	#include <fog_vertex>
3218}`,meshphong_frag:`#define PHONG
3219uniform vec3 diffuse;
3220uniform vec3 emissive;
3221uniform vec3 specular;
3222uniform float shininess;
3223uniform float opacity;
3224#include <common>
3225#include <dithering_pars_fragment>
3226#include <color_pars_fragment>
3227#include <uv_pars_fragment>
3228#include <map_pars_fragment>
3229#include <alphamap_pars_fragment>
3230#include <alphatest_pars_fragment>
3231#include <alphahash_pars_fragment>
3232#include <aomap_pars_fragment>
3233#include <lightmap_pars_fragment>
3234#include <emissivemap_pars_fragment>
3235#include <cube_uv_reflection_fragment>
3236#include <envmap_common_pars_fragment>
3237#include <envmap_pars_fragment>
3238#include <envmap_physical_pars_fragment>
3239#include <fog_pars_fragment>
3240#include <bsdfs>
3241#include <lights_pars_begin>
3242#include <normal_pars_fragment>
3243#include <lights_phong_pars_fragment>
3244#include <shadowmap_pars_fragment>
3245#include <bumpmap_pars_fragment>
3246#include <normalmap_pars_fragment>
3247#include <specularmap_pars_fragment>
3248#include <logdepthbuf_pars_fragment>
3249#include <clipping_planes_pars_fragment>
3250void main() {
3251	vec4 diffuseColor = vec4( diffuse, opacity );
3252	#include <clipping_planes_fragment>
3253	ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );
3254	vec3 totalEmissiveRadiance = emissive;
3255	#include <logdepthbuf_fragment>
3256	#include <map_fragment>
3257	#include <color_fragment>
3258	#include <alphamap_fragment>
3259	#include <alphatest_fragment>
3260	#include <alphahash_fragment>
3261	#include <specularmap_fragment>
3262	#include <normal_fragment_begin>
3263	#include <normal_fragment_maps>
3264	#include <emissivemap_fragment>
3265	#include <lights_phong_fragment>
3266	#include <lights_fragment_begin>
3267	#include <lights_fragment_maps>
3268	#include <lights_fragment_end>
3269	#include <aomap_fragment>
3270	vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;
3271	#include <envmap_fragment>
3272	#include <opaque_fragment>
3273	#include <tonemapping_fragment>
3274	#include <colorspace_fragment>
3275	#include <fog_fragment>
3276	#include <premultiplied_alpha_fragment>
3277	#include <dithering_fragment>
3278}`,meshphysical_vert:`#define STANDARD
3279varying vec3 vViewPosition;
3280#ifdef USE_TRANSMISSION
3281	varying vec3 vWorldPosition;
3282#endif
3283#include <common>
3284#include <batching_pars_vertex>
3285#include <uv_pars_vertex>
3286#include <displacementmap_pars_vertex>
3287#include <color_pars_vertex>
3288#include <fog_pars_vertex>
3289#include <normal_pars_vertex>
3290#include <morphtarget_pars_vertex>
3291#include <skinning_pars_vertex>
3292#include <shadowmap_pars_vertex>
3293#include <logdepthbuf_pars_vertex>
3294#include <clipping_planes_pars_vertex>
3295void main() {
3296	#include <uv_vertex>
3297	#include <color_vertex>
3298	#include <morphinstance_vertex>
3299	#include <morphcolor_vertex>
3300	#include <batching_vertex>
3301	#include <beginnormal_vertex>
3302	#include <morphnormal_vertex>
3303	#include <skinbase_vertex>
3304	#include <skinnormal_vertex>
3305	#include <defaultnormal_vertex>
3306	#include <normal_vertex>
3307	#include <begin_vertex>
3308	#include <morphtarget_vertex>
3309	#include <skinning_vertex>
3310	#include <displacementmap_vertex>
3311	#include <project_vertex>
3312	#include <logdepthbuf_vertex>
3313	#include <clipping_planes_vertex>
3314	vViewPosition = - mvPosition.xyz;
3315	#include <worldpos_vertex>
3316	#include <shadowmap_vertex>
3317	#include <fog_vertex>
3318#ifdef USE_TRANSMISSION
3319	vWorldPosition = worldPosition.xyz;
3320#endif
3321}`,meshphysical_frag:`#define STANDARD
3322#ifdef PHYSICAL
3323	#define IOR
3324	#define USE_SPECULAR
3325#endif
3326uniform vec3 diffuse;
3327uniform vec3 emissive;
3328uniform float roughness;
3329uniform float metalness;
3330uniform float opacity;
3331#ifdef IOR
3332	uniform float ior;
3333#endif
3334#ifdef USE_SPECULAR
3335	uniform float specularIntensity;
3336	uniform vec3 specularColor;
3337	#ifdef USE_SPECULAR_COLORMAP
3338		uniform sampler2D specularColorMap;
3339	#endif
3340	#ifdef USE_SPECULAR_INTENSITYMAP
3341		uniform sampler2D specularIntensityMap;
3342	#endif
3343#endif
3344#ifdef USE_CLEARCOAT
3345	uniform float clearcoat;
3346	uniform float clearcoatRoughness;
3347#endif
3348#ifdef USE_DISPERSION
3349	uniform float dispersion;
3350#endif
3351#ifdef USE_IRIDESCENCE
3352	uniform float iridescence;
3353	uniform float iridescenceIOR;
3354	uniform float iridescenceThicknessMinimum;
3355	uniform float iridescenceThicknessMaximum;
3356#endif
3357#ifdef USE_SHEEN
3358	uniform vec3 sheenColor;
3359	uniform float sheenRoughness;
3360	#ifdef USE_SHEEN_COLORMAP
3361		uniform sampler2D sheenColorMap;
3362	#endif
3363	#ifdef USE_SHEEN_ROUGHNESSMAP
3364		uniform sampler2D sheenRoughnessMap;
3365	#endif
3366#endif
3367#ifdef USE_ANISOTROPY
3368	uniform vec2 anisotropyVector;
3369	#ifdef USE_ANISOTROPYMAP
3370		uniform sampler2D anisotropyMap;
3371	#endif
3372#endif
3373varying vec3 vViewPosition;
3374#include <common>
3375#include <dithering_pars_fragment>
3376#include <color_pars_fragment>
3377#include <uv_pars_fragment>
3378#include <map_pars_fragment>
3379#include <alphamap_pars_fragment>
3380#include <alphatest_pars_fragment>
3381#include <alphahash_pars_fragment>
3382#include <aomap_pars_fragment>
3383#include <lightmap_pars_fragment>
3384#include <emissivemap_pars_fragment>
3385#include <iridescence_fragment>
3386#include <cube_uv_reflection_fragment>
3387#include <envmap_common_pars_fragment>
3388#include <envmap_physical_pars_fragment>
3389#include <fog_pars_fragment>
3390#include <lights_pars_begin>
3391#include <normal_pars_fragment>
3392#include <lights_physical_pars_fragment>
3393#include <transmission_pars_fragment>
3394#include <shadowmap_pars_fragment>
3395#include <bumpmap_pars_fragment>
3396#include <normalmap_pars_fragment>
3397#include <clearcoat_pars_fragment>
3398#include <iridescence_pars_fragment>
3399#include <roughnessmap_pars_fragment>
3400#include <metalnessmap_pars_fragment>
3401#include <logdepthbuf_pars_fragment>
3402#include <clipping_planes_pars_fragment>
3403void main() {
3404	vec4 diffuseColor = vec4( diffuse, opacity );
3405	#include <clipping_planes_fragment>
3406	ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );
3407	vec3 totalEmissiveRadiance = emissive;
3408	#include <logdepthbuf_fragment>
3409	#include <map_fragment>
3410	#include <color_fragment>
3411	#include <alphamap_fragment>
3412	#include <alphatest_fragment>
3413	#include <alphahash_fragment>
3414	#include <roughnessmap_fragment>
3415	#include <metalnessmap_fragment>
3416	#include <normal_fragment_begin>
3417	#include <normal_fragment_maps>
3418	#include <clearcoat_normal_fragment_begin>
3419	#include <clearcoat_normal_fragment_maps>
3420	#include <emissivemap_fragment>
3421	#include <lights_physical_fragment>
3422	#include <lights_fragment_begin>
3423	#include <lights_fragment_maps>
3424	#include <lights_fragment_end>
3425	#include <aomap_fragment>
3426	vec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse;
3427	vec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular;
3428	#include <transmission_fragment>
3429	vec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance;
3430	#ifdef USE_SHEEN
3431 
3432		outgoingLight = outgoingLight + sheenSpecularDirect + sheenSpecularIndirect;
3433 
3434 	#endif
3435	#ifdef USE_CLEARCOAT
3436		float dotNVcc = saturate( dot( geometryClearcoatNormal, geometryViewDir ) );
3437		vec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc );
3438		outgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + ( clearcoatSpecularDirect + clearcoatSpecularIndirect ) * material.clearcoat;
3439	#endif
3440	#include <opaque_fragment>
3441	#include <tonemapping_fragment>
3442	#include <colorspace_fragment>
3443	#include <fog_fragment>
3444	#include <premultiplied_alpha_fragment>
3445	#include <dithering_fragment>
3446}`,meshtoon_vert:`#define TOON
3447varying vec3 vViewPosition;
3448#include <common>
3449#include <batching_pars_vertex>
3450#include <uv_pars_vertex>
3451#include <displacementmap_pars_vertex>
3452#include <color_pars_vertex>
3453#include <fog_pars_vertex>
3454#include <normal_pars_vertex>
3455#include <morphtarget_pars_vertex>
3456#include <skinning_pars_vertex>
3457#include <shadowmap_pars_vertex>
3458#include <logdepthbuf_pars_vertex>
3459#include <clipping_planes_pars_vertex>
3460void main() {
3461	#include <uv_vertex>
3462	#include <color_vertex>
3463	#include <morphinstance_vertex>
3464	#include <morphcolor_vertex>
3465	#include <batching_vertex>
3466	#include <beginnormal_vertex>
3467	#include <morphnormal_vertex>
3468	#include <skinbase_vertex>
3469	#include <skinnormal_vertex>
3470	#include <defaultnormal_vertex>
3471	#include <normal_vertex>
3472	#include <begin_vertex>
3473	#include <morphtarget_vertex>
3474	#include <skinning_vertex>
3475	#include <displacementmap_vertex>
3476	#include <project_vertex>
3477	#include <logdepthbuf_vertex>
3478	#include <clipping_planes_vertex>
3479	vViewPosition = - mvPosition.xyz;
3480	#include <worldpos_vertex>
3481	#include <shadowmap_vertex>
3482	#include <fog_vertex>
3483}`,meshtoon_frag:`#define TOON
3484uniform vec3 diffuse;
3485uniform vec3 emissive;
3486uniform float opacity;
3487#include <common>
3488#include <dithering_pars_fragment>
3489#include <color_pars_fragment>
3490#include <uv_pars_fragment>
3491#include <map_pars_fragment>
3492#include <alphamap_pars_fragment>
3493#include <alphatest_pars_fragment>
3494#include <alphahash_pars_fragment>
3495#include <aomap_pars_fragment>
3496#include <lightmap_pars_fragment>
3497#include <emissivemap_pars_fragment>
3498#include <gradientmap_pars_fragment>
3499#include <fog_pars_fragment>
3500#include <bsdfs>
3501#include <lights_pars_begin>
3502#include <normal_pars_fragment>
3503#include <lights_toon_pars_fragment>
3504#include <shadowmap_pars_fragment>
3505#include <bumpmap_pars_fragment>
3506#include <normalmap_pars_fragment>
3507#include <logdepthbuf_pars_fragment>
3508#include <clipping_planes_pars_fragment>
3509void main() {
3510	vec4 diffuseColor = vec4( diffuse, opacity );
3511	#include <clipping_planes_fragment>
3512	ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );
3513	vec3 totalEmissiveRadiance = emissive;
3514	#include <logdepthbuf_fragment>
3515	#include <map_fragment>
3516	#include <color_fragment>
3517	#include <alphamap_fragment>
3518	#include <alphatest_fragment>
3519	#include <alphahash_fragment>
3520	#include <normal_fragment_begin>
3521	#include <normal_fragment_maps>
3522	#include <emissivemap_fragment>
3523	#include <lights_toon_fragment>
3524	#include <lights_fragment_begin>
3525	#include <lights_fragment_maps>
3526	#include <lights_fragment_end>
3527	#include <aomap_fragment>
3528	vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;
3529	#include <opaque_fragment>
3530	#include <tonemapping_fragment>
3531	#include <colorspace_fragment>
3532	#include <fog_fragment>
3533	#include <premultiplied_alpha_fragment>
3534	#include <dithering_fragment>
3535}`,points_vert:`uniform float size;
3536uniform float scale;
3537#include <common>
3538#include <color_pars_vertex>
3539#include <fog_pars_vertex>
3540#include <morphtarget_pars_vertex>
3541#include <logdepthbuf_pars_vertex>
3542#include <clipping_planes_pars_vertex>
3543#ifdef USE_POINTS_UV
3544	varying vec2 vUv;
3545	uniform mat3 uvTransform;
3546#endif
3547void main() {
3548	#ifdef USE_POINTS_UV
3549		vUv = ( uvTransform * vec3( uv, 1 ) ).xy;
3550	#endif
3551	#include <color_vertex>
3552	#include <morphinstance_vertex>
3553	#include <morphcolor_vertex>
3554	#include <begin_vertex>
3555	#include <morphtarget_vertex>
3556	#include <project_vertex>
3557	gl_PointSize = size;
3558	#ifdef USE_SIZEATTENUATION
3559		bool isPerspective = isPerspectiveMatrix( projectionMatrix );
3560		if ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z );
3561	#endif
3562	#include <logdepthbuf_vertex>
3563	#include <clipping_planes_vertex>
3564	#include <worldpos_vertex>
3565	#include <fog_vertex>
3566}`,points_frag:`uniform vec3 diffuse;
3567uniform float opacity;
3568#include <common>
3569#include <color_pars_fragment>
3570#include <map_particle_pars_fragment>
3571#include <alphatest_pars_fragment>
3572#include <alphahash_pars_fragment>
3573#include <fog_pars_fragment>
3574#include <logdepthbuf_pars_fragment>
3575#include <clipping_planes_pars_fragment>
3576void main() {
3577	vec4 diffuseColor = vec4( diffuse, opacity );
3578	#include <clipping_planes_fragment>
3579	vec3 outgoingLight = vec3( 0.0 );
3580	#include <logdepthbuf_fragment>
3581	#include <map_particle_fragment>
3582	#include <color_fragment>
3583	#include <alphatest_fragment>
3584	#include <alphahash_fragment>
3585	outgoingLight = diffuseColor.rgb;
3586	#include <opaque_fragment>
3587	#include <tonemapping_fragment>
3588	#include <colorspace_fragment>
3589	#include <fog_fragment>
3590	#include <premultiplied_alpha_fragment>
3591}`,shadow_vert:`#include <common>
3592#include <batching_pars_vertex>
3593#include <fog_pars_vertex>
3594#include <morphtarget_pars_vertex>
3595#include <skinning_pars_vertex>
3596#include <logdepthbuf_pars_vertex>
3597#include <shadowmap_pars_vertex>
3598void main() {
3599	#include <batching_vertex>
3600	#include <beginnormal_vertex>
3601	#include <morphinstance_vertex>
3602	#include <morphnormal_vertex>
3603	#include <skinbase_vertex>
3604	#include <skinnormal_vertex>
3605	#include <defaultnormal_vertex>
3606	#include <begin_vertex>
3607	#include <morphtarget_vertex>
3608	#include <skinning_vertex>
3609	#include <project_vertex>
3610	#include <logdepthbuf_vertex>
3611	#include <worldpos_vertex>
3612	#include <shadowmap_vertex>
3613	#include <fog_vertex>
3614}`,shadow_frag:`uniform vec3 color;
3615uniform float opacity;
3616#include <common>
3617#include <fog_pars_fragment>
3618#include <bsdfs>
3619#include <lights_pars_begin>
3620#include <logdepthbuf_pars_fragment>
3621#include <shadowmap_pars_fragment>
3622#include <shadowmask_pars_fragment>
3623void main() {
3624	#include <logdepthbuf_fragment>
3625	gl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );
3626	#include <tonemapping_fragment>
3627	#include <colorspace_fragment>
3628	#include <fog_fragment>
3629	#include <premultiplied_alpha_fragment>
3630}`,sprite_vert:`uniform float rotation;
3631uniform vec2 center;
3632#include <common>
3633#include <uv_pars_vertex>
3634#include <fog_pars_vertex>
3635#include <logdepthbuf_pars_vertex>
3636#include <clipping_planes_pars_vertex>
3637void main() {
3638	#include <uv_vertex>
3639	vec4 mvPosition = modelViewMatrix[ 3 ];
3640	vec2 scale = vec2( length( modelMatrix[ 0 ].xyz ), length( modelMatrix[ 1 ].xyz ) );
3641	#ifndef USE_SIZEATTENUATION
3642		bool isPerspective = isPerspectiveMatrix( projectionMatrix );
3643		if ( isPerspective ) scale *= - mvPosition.z;
3644	#endif
3645	vec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;
3646	vec2 rotatedPosition;
3647	rotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;
3648	rotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;
3649	mvPosition.xy += rotatedPosition;
3650	gl_Position = projectionMatrix * mvPosition;
3651	#include <logdepthbuf_vertex>
3652	#include <clipping_planes_vertex>
3653	#include <fog_vertex>
3654}`,sprite_frag:`uniform vec3 diffuse;
3655uniform float opacity;
3656#include <common>
3657#include <uv_pars_fragment>
3658#include <map_pars_fragment>
3659#include <alphamap_pars_fragment>
3660#include <alphatest_pars_fragment>
3661#include <alphahash_pars_fragment>
3662#include <fog_pars_fragment>
3663#include <logdepthbuf_pars_fragment>
3664#include <clipping_planes_pars_fragment>
3665void main() {
3666	vec4 diffuseColor = vec4( diffuse, opacity );
3667	#include <clipping_planes_fragment>
3668	vec3 outgoingLight = vec3( 0.0 );
3669	#include <logdepthbuf_fragment>
3670	#include <map_fragment>
3671	#include <alphamap_fragment>
3672	#include <alphatest_fragment>
3673	#include <alphahash_fragment>
3674	outgoingLight = diffuseColor.rgb;
3675	#include <opaque_fragment>
3676	#include <tonemapping_fragment>
3677	#include <colorspace_fragment>
3678	#include <fog_fragment>
3679}`},ke={common:{diffuse:{value:new Xe(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new Et},alphaMap:{value:null},alphaMapTransform:{value:new Et},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new Et}},envmap:{envMap:{value:null},envMapRotation:{value:new Et},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98},dfgLUT:{value:null}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new Et}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new Et}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new Et},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new Et},normalScale:{value:new ye(1,1)}}
vendor: 4,862 bytes, line 3679
3679,displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new Et},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new Et}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new Et}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new Et}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new Xe(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null},probesSH:{value:null},probesMin:{value:new k},probesMax:{value:new k},probesResolution:{value:new k}},points:{diffuse:{value:new Xe(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new Et},alphaTest:{value:0},uvTransform:{value:new Et}},sprite:{diffuse:{value:new Xe(16777215)},opacity:{value:1},center:{value:new ye(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new Et},alphaMap:{value:null},alphaMapTransform:{value:new Et},alphaTest:{value:0}}},ur={basic:{uniforms:oi([ke.common,ke.specularmap,ke.envmap,ke.aomap,ke.lightmap,ke.fog]),vertexShader:It.meshbasic_vert,fragmentShader:It.meshbasic_frag},lambert:{uniforms:oi([ke.common,ke.specularmap,ke.envmap,ke.aomap,ke.lightmap,ke.emissivemap,ke.bumpmap,ke.normalmap,ke.displacementmap,ke.fog,ke.lights,{emissive:{value:new Xe(0)},envMapIntensity:{value:1}}]),vertexShader:It.meshlambert_vert,fragmentShader:It.meshlambert_frag},phong:{uniforms:oi([ke.common,ke.specularmap,ke.envmap,ke.aomap,ke.lightmap,ke.emissivemap,ke.bumpmap,ke.normalmap,ke.displacementmap,ke.fog,ke.lights,{emissive:{value:new Xe(0)},specular:{value:new Xe(1118481)},shininess:{value:30},envMapIntensity:{value:1}}]),vertexShader:It.meshphong_vert,fragmentShader:It.meshphong_frag},standard:{uniforms:oi([ke.common,ke.envmap,ke.aomap,ke.lightmap,ke.emissivemap,ke.bumpmap,ke.normalmap,ke.displacementmap,ke.roughnessmap,ke.metalnessmap,ke.fog,ke.lights,{emissive:{value:new Xe(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:It.meshphysical_vert,fragmentShader:It.meshphysical_frag},toon:{uniforms:oi([ke.common,ke.aomap,ke.lightmap,ke.emissivemap,ke.bumpmap,ke.normalmap,ke.displacementmap,ke.gradientmap,ke.fog,ke.lights,{emissive:{value:new Xe(0)}}]),vertexShader:It.meshtoon_vert,fragmentShader:It.meshtoon_frag},matcap:{uniforms:oi([ke.common,ke.bumpmap,ke.normalmap,ke.displacementmap,ke.fog,{matcap:{value:null}}]),vertexShader:It.meshmatcap_vert,fragmentShader:It.meshmatcap_frag},points:{uniforms:oi([ke.points,ke.fog]),vertexShader:It.points_vert,fragmentShader:It.points_frag},dashed:{uniforms:oi([ke.common,ke.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:It.linedashed_vert,fragmentShader:It.linedashed_frag},depth:{uniforms:oi([ke.common,ke.displacementmap]),vertexShader:It.depth_vert,fragmentShader:It.depth_frag},normal:{uniforms:oi([ke.common,ke.bumpmap,ke.normalmap,ke.displacementmap,{opacity:{value:1}}]),vertexShader:It.meshnormal_vert,fragmentShader:It.meshnormal_frag},sprite:{uniforms:oi([ke.sprite,ke.fog]),vertexShader:It.sprite_vert,fragmentShader:It.sprite_frag},background:{uniforms:{uvTransform:{value:new Et},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:It.background_vert,fragmentShader:It.background_frag},backgroundCube:{uniforms:{envMap:{value:null},backgroundBlurriness:{value:0},backgroundIntensity:{value:1},backgroundRotation:{value:new Et}},vertexShader:It.backgroundCube_vert,fragmentShader:It.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:It.cube_vert,fragmentShader:It.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:It.equirect_vert,fragmentShader:It.equirect_frag}
vendor: 4,450 bytes, line 3679
3679,distance:{uniforms:oi([ke.common,ke.displacementmap,{referencePosition:{value:new k},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:It.distance_vert,fragmentShader:It.distance_frag},shadow:{uniforms:oi([ke.lights,ke.fog,{color:{value:new Xe(0)},opacity:{value:1}}]),vertexShader:It.shadow_vert,fragmentShader:It.shadow_frag}};ur.physical={uniforms:oi([ur.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new Et},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new Et},clearcoatNormalScale:{value:new ye(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new Et},dispersion:{value:0},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new Et},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new Et},sheen:{value:0},sheenColor:{value:new Xe(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new Et},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new Et},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new Et},transmissionSamplerSize:{value:new ye},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new Et},attenuationDistance:{value:0},attenuationColor:{value:new Xe(0)},specularColor:{value:new Xe(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new Et},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new Et},anisotropyVector:{value:new ye},anisotropyMap:{value:null},anisotropyMapTransform:{value:new Et}}]),vertexShader:It.meshphysical_vert,fragmentShader:It.meshphysical_frag};var wh={r:0,b:0,g:0},F5=new _t,Ix=new Et;Ix.set(-1,0,0,0,1,0,0,0,1);function k5(e,t,n,i,r,o){const l=new Xe(0);let u=r===!0?0:1,h,f,p=null,g=0,m=null;function v(C){let A=C.isScene===!0?C.background:null;if(A&&A.isTexture){const E=C.backgroundBlurriness>0;A=t.get(A,E)}return A}function b(C){let A=!1;const E=v(C);E===null?S(l,u):E&&E.isColor&&(S(E,1),A=!0);const P=e.xr.getEnvironmentBlendMode();P==="additive"?n.buffers.color.setClear(0,0,0,1,o):P==="alpha-blend"&&n.buffers.color.setClear(0,0,0,0,o),(e.autoClear||A)&&(n.buffers.depth.setTest(!0),n.buffers.depth.setMask(!0),n.buffers.color.setMask(!0),e.clear(e.autoClearColor,e.autoClearDepth,e.autoClearStencil))}function w(C,A){const E=v(A);E&&(E.isCubeTexture||E.mapping===306)?(f===void 0&&(f=new Cn(new Zc(1,1,1),new Si({name:"BackgroundCubeMaterial",uniforms:Pl(ur.backgroundCube.uniforms),vertexShader:ur.backgroundCube.vertexShader,fragmentShader:ur.backgroundCube.fragmentShader,side:1,depthTest:!1,depthWrite:!1,fog:!1,allowOverride:!1})),f.geometry.deleteAttribute("normal"),f.geometry.deleteAttribute("uv"),f.onBeforeRender=function(P,N,O){this.matrixWorld.copyPosition(O.matrixWorld)},Object.defineProperty(f.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),i.update(f)),f.material.uniforms.envMap.value=E,f.material.uniforms.backgroundBlurriness.value=A.backgroundBlurriness,f.material.uniforms.backgroundIntensity.value=A.backgroundIntensity,f.material.uniforms.backgroundRotation.value.setFromMatrix4(F5.makeRotationFromEuler(A.backgroundRotation)).transpose(),E.isCubeTexture&&E.isRenderTargetTexture===!1&&f.material.uniforms.backgroundRotation.value.premultiply(Ix),f.material.toneMapped=Nt.getTransfer(E.colorSpace)!==Fc,(p!==E||g!==E.version||m!==e.toneMapping)&&(f.material.needsUpdate=!0,p=E,g=E.version,m=e.toneMapping),f.layers.enableAll(),C.unshift(f,f.geometry,f.material,0,0,null)):E&&E.isTexture&&(h===void 0&&(h=new Cn(new Qh(2,2),new Si({name:"BackgroundMaterial",uniforms:Pl(ur.background.uniforms),vertexShader:ur.background.vertexShader,fragmentShader:ur.background.fragmentShader,side:0,depthTest:!1,depthWrite:!1,fog:!1,allowOverride:!1})),h.geometry.deleteAttribute("normal"),Object.defineProperty(h.material,"map",{get:function(){return this.uniforms.t2D.value}}),i.update(h)),h.material.uniforms.t2D.value=E,h.material.uniforms.backgroundIntensity.value=A.backgroundIntensity,h.material.toneMapped=Nt.getTransfer(E.colorSpace)!==Fc,E.matrixAutoUpdate===!0&&E.updateMatrix(),h.material.uniforms.uvTransform.value.copy(E.matrix
vendor: 12,664 bytes, line 3679
3679),(p!==E||g!==E.version||m!==e.toneMapping)&&(h.material.needsUpdate=!0,p=E,g=E.version,m=e.toneMapping),h.layers.enableAll(),C.unshift(h,h.geometry,h.material,0,0,null))}function S(C,A){C.getRGB(wh,W2(e)),n.buffers.color.setClear(wh.r,wh.g,wh.b,A,o)}function _(){f!==void 0&&(f.geometry.dispose(),f.material.dispose(),f=void 0),h!==void 0&&(h.geometry.dispose(),h.material.dispose(),h=void 0)}return{getClearColor:function(){return l},setClearColor:function(C,A=1){l.set(C),u=A,S(l,u)},getClearAlpha:function(){return u},setClearAlpha:function(C){u=C,S(l,u)},render:b,addToRenderList:w,dispose:_}}function B5(e,t){const n=e.getParameter(e.MAX_VERTEX_ATTRIBS),i={},r=m(null);let o=r,l=!1;function u(F,j,H,Y,q){let te=!1;const J=g(F,Y,H,j);o!==J&&(o=J,f(o.object)),te=v(F,Y,H,q),te&&b(F,Y,H,q),q!==null&&t.update(q,e.ELEMENT_ARRAY_BUFFER),(te||l)&&(l=!1,E(F,j,H,Y),q!==null&&e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,t.get(q).buffer))}function h(){return e.createVertexArray()}function f(F){return e.bindVertexArray(F)}function p(F){return e.deleteVertexArray(F)}function g(F,j,H,Y){const q=Y.wireframe===!0;let te=i[j.id];te===void 0&&(te={},i[j.id]=te);const J=F.isInstancedMesh===!0?F.id:0;let he=te[J];he===void 0&&(he={},te[J]=he);let ue=he[H.id];ue===void 0&&(ue={},he[H.id]=ue);let ce=ue[q];return ce===void 0&&(ce=m(h()),ue[q]=ce),ce}function m(F){const j=[],H=[],Y=[];for(let q=0;q<n;q++)j[q]=0,H[q]=0,Y[q]=0;return{geometry:null,program:null,wireframe:!1,newAttributes:j,enabledAttributes:H,attributeDivisors:Y,object:F,attributes:{},index:null}}function v(F,j,H,Y){const q=o.attributes,te=j.attributes;let J=0;const he=H.getAttributes();for(const ue in he)if(he[ue].location>=0){const ce=q[ue];let me=te[ue];if(me===void 0&&(ue==="instanceMatrix"&&F.instanceMatrix&&(me=F.instanceMatrix),ue==="instanceColor"&&F.instanceColor&&(me=F.instanceColor)),ce===void 0||ce.attribute!==me||me&&ce.data!==me.data)return!0;J++}return o.attributesNum!==J||o.index!==Y}function b(F,j,H,Y){const q={},te=j.attributes;let J=0;const he=H.getAttributes();for(const ue in he)if(he[ue].location>=0){let ce=te[ue];ce===void 0&&(ue==="instanceMatrix"&&F.instanceMatrix&&(ce=F.instanceMatrix),ue==="instanceColor"&&F.instanceColor&&(ce=F.instanceColor));const me={};me.attribute=ce,ce&&ce.data&&(me.data=ce.data),q[ue]=me,J++}o.attributes=q,o.attributesNum=J,o.index=Y}function w(){const F=o.newAttributes;for(let j=0,H=F.length;j<H;j++)F[j]=0}function S(F){_(F,0)}function _(F,j){const H=o.newAttributes,Y=o.enabledAttributes,q=o.attributeDivisors;H[F]=1,Y[F]===0&&(e.enableVertexAttribArray(F),Y[F]=1),q[F]!==j&&(e.vertexAttribDivisor(F,j),q[F]=j)}function C(){const F=o.newAttributes,j=o.enabledAttributes;for(let H=0,Y=j.length;H<Y;H++)j[H]!==F[H]&&(e.disableVertexAttribArray(H),j[H]=0)}function A(F,j,H,Y,q,te,J){J===!0?e.vertexAttribIPointer(F,j,H,q,te):e.vertexAttribPointer(F,j,H,Y,q,te)}function E(F,j,H,Y){w();const q=Y.attributes,te=H.getAttributes(),J=j.defaultAttributeValues;for(const he in te){const ue=te[he];if(ue.location>=0){let ce=q[he];if(ce===void 0&&(he==="instanceMatrix"&&F.instanceMatrix&&(ce=F.instanceMatrix),he==="instanceColor"&&F.instanceColor&&(ce=F.instanceColor)),ce!==void 0){const me=ce.normalized,_e=ce.itemSize,ht=t.get(ce);if(ht===void 0)continue;const tt=ht.buffer,re=ht.type,ge=ht.bytesPerElement,Ie=re===e.INT||re===e.UNSIGNED_INT||ce.gpuType===1013;if(ce.isInterleavedBufferAttribute){const Ce=ce.data,We=Ce.stride,et=ce.offset;if(Ce.isInstancedInterleavedBuffer){for(let Ze=0;Ze<ue.locationSize;Ze++)_(ue.location+Ze,Ce.meshPerAttribute);F.isInstancedMesh!==!0&&Y._maxInstanceCount===void 0&&(Y._maxInstanceCount=Ce.meshPerAttribute*Ce.count)}else for(let Ze=0;Ze<ue.locationSize;Ze++)S(ue.location+Ze);e.bindBuffer(e.ARRAY_BUFFER,tt);for(let Ze=0;Ze<ue.locationSize;Ze++)A(ue.location+Ze,_e/ue.locationSize,re,me,We*ge,(et+_e/ue.locationSize*Ze)*ge,Ie)}else{if(ce.isInstancedBufferAttribute){for(let Ce=0;Ce<ue.locationSize;Ce++)_(ue.location+Ce,ce.meshPerAttribute);F.isInstancedMesh!==!0&&Y._maxInstanceCount===void 0&&(Y._maxInstanceCount=ce.meshPerAttribute*ce.count)}else for(let Ce=0;Ce<ue.locationSize;Ce++)S(ue.location+Ce);e.bindBuffer(e.ARRAY_BUFFER,tt);for(let Ce=0;Ce<ue.locationSize;Ce++)A(ue.location+Ce,_e/ue.locationSize,re,me,_e*ge,_e/ue.locationSize*Ce*ge,Ie)}}else if(J!==void 0){const me=J[he];if(me!==void 0)switch(me.length){case 2:e.vertexAttrib2fv(ue.location,me);break;case 3:e.vertexAttrib3fv(ue.location,me);break;case 4:e.vertexAttrib4fv(ue.location,me);break;default:e.vertexAttrib1fv(ue.location,me)}}}}C()}function P(){R();for(const F in i){const j=i[F];for(const H in j){const Y=j[H];for(const q in Y){const te=Y[q];for(const J in te)p(te[J].object),delete te[J];delete Y[q]}}delete i[F]}}function N(F){if(i[F.id]===void 0)return;const j=i[F.id];for(const H in j){const Y=j[H];for(const q in Y){const te=Y[q];for(const J in te)p(te[J].object),delete te[J];delete Y[q]}}delete i[F.id]}function O(F){for(const j in i){const H=i[j];for(const Y in H){const q=H[Y];if(q[F.id]===void 0)continue;const te=q[F.id];for(const J in te)p(te[J].object),delete te[J];delete q[F.id]}}}function T(F){for(const j in i){const H=i[j],Y=F.isInstancedMesh===!0?F.id:0,q=H[Y];if(q!==void 0){for(const te in q){const J=q[te];for(const he in J)p(J[he].object),delete J[he];delete q[te]}delete H[Y],Object.keys(H).length===0&&delete i[j]}}}function R(){B(),l=!0,o!==r&&(o=r,f(o.object))}function B(){r.geometry=null,r.program=null,r.wireframe=!1}return{setup:u,reset:R,resetDefaultState:B,dispose:P,releaseStatesOfGeometry:N,releaseStatesOfObject:T,releaseStatesOfProgram:O,initAttributes:w,enableAttribute:S,disableUnusedAttributes:C}}function z5(e,t,n){let i;function r(h){i=h}function o(h,f){e.drawArrays(i,h,f),n.update(f,i,1)}function l(h,f,p){p!==0&&(e.drawArraysInstanced(i,h,f,p),n.update(f,i,p))}function u(h,f,p){if(p===0)return;t.get("WEBGL_multi_draw").multiDrawArraysWEBGL(i,h,0,f,0,p);let g=0;for(let m=0;m<p;m++)g+=f[m];n.update(g,i,1)}this.setMode=r,this.render=o,this.renderInstances=l,this.renderMultiDraw=u}function V5(e,t,n,i){let r;function o(){if(r!==void 0)return r;if(t.has("EXT_texture_filter_anisotropic")===!0){const O=t.get("EXT_texture_filter_anisotropic");r=e.getParameter(O.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else r=0;return r}function l(O){return!(O!==1023&&i.convert(O)!==e.getParameter(e.IMPLEMENTATION_COLOR_READ_FORMAT))}function u(O){const T=O===1016&&(t.has("EXT_color_buffer_half_float")||t.has("EXT_color_buffer_float"));return!(O!==1009&&i.convert(O)!==e.getParameter(e.IMPLEMENTATION_COLOR_READ_TYPE)&&O!==1015&&!T)}function h(O){if(O==="highp"){if(e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.HIGH_FLOAT).precision>0&&e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.HIGH_FLOAT).precision>0)return"highp";O="mediump"}return O==="mediump"&&e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.MEDIUM_FLOAT).precision>0&&e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}let f=n.precision!==void 0?n.precision:"highp";const p=h(f);p!==f&&(Ue("WebGLRenderer:",f,"not supported, using",p,"instead."),f=p);const g=n.logarithmicDepthBuffer===!0,m=n.reversedDepthBuffer===!0&&t.has("EXT_clip_control");n.reversedDepthBuffer===!0&&m===!1&&Ue("WebGLRenderer: Unable to use reversed depth buffer due to missing EXT_clip_control extension. Fallback to default depth buffer.");const v=e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS),b=e.getParameter(e.MAX_VERTEX_TEXTURE_IMAGE_UNITS),w=e.getParameter(e.MAX_TEXTURE_SIZE),S=e.getParameter(e.MAX_CUBE_MAP_TEXTURE_SIZE),_=e.getParameter(e.MAX_VERTEX_ATTRIBS),C=e.getParameter(e.MAX_VERTEX_UNIFORM_VECTORS),A=e.getParameter(e.MAX_VARYING_VECTORS),E=e.getParameter(e.MAX_FRAGMENT_UNIFORM_VECTORS),P=e.getParameter(e.MAX_SAMPLES),N=e.getParameter(e.SAMPLES);return{isWebGL2:!0,getMaxAnisotropy:o,getMaxPrecision:h,textureFormatReadable:l,textureTypeReadable:u,precision:f,logarithmicDepthBuffer:g,reversedDepthBuffer:m,maxTextures:v,maxVertexTextures:b,maxTextureSize:w,maxCubemapSize:S,maxAttributes:_,maxVertexUniforms:C,maxVaryings:A,maxFragmentUniforms:E,maxSamples:P,samples:N}}function G5(e){const t=this;let n=null,i=0,r=!1,o=!1;const l=new Fs,u=new Et,h={value:null,needsUpdate:!1};this.uniform=h,this.numPlanes=0,this.numIntersection=0,this.init=function(g,m){const v=g.length!==0||m||i!==0||r;return r=m,i=g.length,v},this.beginShadows=function(){o=!0,p(null)},this.endShadows=function(){o=!1},this.setGlobalState=function(g,m){n=p(g,m,0)},this.setState=function(g,m,v){const b=g.clippingPlanes,w=g.clipIntersection,S=g.clipShadows,_=e.get(g);if(!r||b===null||b.length===0||o&&!S)o?p(null):f();else{const C=o?0:i,A=C*4;let E=_.clippingState||null;h.value=E,E=p(b,m,A,v);for(let P=0;P!==A;++P)E[P]=n[P];_.clippingState=E,this.numIntersection=w?this.numPlanes:0,this.numPlanes+=C}};function f(){h.value!==n&&(h.value=n,h.needsUpdate=i>0),t.numPlanes=i,t.numIntersection=0}function p(g,m,v,b){const w=g!==null?g.length:0;let S=null;if(w!==0){if(S=h.value,b!==!0||S===null){const _=v+w*4,C=m.matrixWorldInverse;u.getNormalMatrix(C),(S===null||S.length<_)&&(S=new Float32Array(_));for(let A=0,E=v;A!==w;++A,E+=4)l.copy(g[A]).applyMatrix4(C,u),l.normal.toArray(S,E),S[E+3]=l.constant}h.value=S,h.needsUpdate=!0}return t.numPlanes=w,t.numIntersection=0,S}}var Vs=4,Hg=[.125,.215,.35,.446,.526,.582],ro=20,H5=256,xc=new Fl,Wg=new Xe,ip=null,rp=0,sp=0,ap=!1,W5=new k,Pp=class{constructor(e){this._renderer=e,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._sizeLods=[],this._sigmas=[],this._lodMeshes=[],this._backgroundBox=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._blurMaterial=null,this._ggxMaterial=null}fromScene(e,t=0,n=.1,i=100,r={}){const{size:o=256,position:l=W5}=r;ip=this._renderer.getRenderTarget(),rp=this._renderer.getActiveCubeFace(),sp=this._renderer.getActiveMipmapLevel(),ap=this._renderer.xr.enabled,this._renderer.xr.enabled=!1,this._setSize(o);const u=this._allocateTargets();return u.depthBuffer=!0,this._sceneToCubeUV(e,n,i,u,l),t>0&&this._blur(u,0,0,t),this._applyPMREM(u),this._cleanup(u),u}fromEquirectangular(e,t=null){return this._fromTexture(e,t)}fromCubemap(e,t=null){return this._fromTexture(e,t)}compileCubemapShader(){this._cubemapMaterial===null&&(this._cubemapMaterial=qg(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=Xg(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),this._cubemapMaterial!==null&&this._cubemapMaterial.dispose(),this._equirectMaterial!==null&&this._equirectMaterial.dispose(),this._backgroundBox!==null&&(this._backgroundBox.geometry.dispose(),this._backgroundBox.material.dispose())}_setSize(e){this._lodMax=Math.floor(Math.log2(e)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){this._blurMaterial!==null&&this._blurMaterial.dispose(),this._ggxMaterial!==null&&this._ggxMaterial.dispose(),this._pingPongRenderTarget!==null&&this._pingPongRenderTarget.dispose();for(let e=0;e<this._lodMeshes.length;e++)this._lodMeshes[e].geometry.dispose()}_cleanup(e){this._renderer.setRenderTarget(ip,rp,sp),this._renderer.xr.enabled=ap,e.scissorTest=!1,gl(e,0,0,e.width,e.height)}_fromTexture(e,t){e.mapping===301||e.mapping===302?this._setSize(e.image.length===0?16:e.image[0].width||e.image[0].image.width):this._setSize(e.image.width/4),ip=this._renderer.getRenderTarget(),rp=this._renderer.getActiveCubeFace(),sp=this._renderer.getActiveMipmapLevel(),ap=this._renderer.xr.enabled,this._renderer.xr.enabled=!1;const n=t||this._allocateTargets();return this._textureToCubeUV(e,n),this._applyPMREM(n),this._cleanup(n),n}_allocateTargets(){const e=3*Math.max(this._cubeSize,112),t=4*this._cubeSize,n={magFilter:mn,minFilter:mn,generateMipmaps:!1,type:Hs,format:ss,colorSpace:Uc,depthBuffer:!1},i=jg(e,t,n);if(this._pingPongRenderTarget===null||this._pingPongRenderTarget.width!==e||this._pingPongRenderTarget.height!==t){this._pingPongRenderTarget!==null&&this._dispose(),this._pingPongRenderTarget=jg(e,t,n);const{_lodMax:r}=this;({lodMeshes:this._lodMeshes,sizeLods:this._sizeLods,sigmas:this._sigmas}=j5(r)),this._blurMaterial=q5(r,e,t),this._ggxMaterial=X5(r,e,t)}return i}_compileMaterial(e){const t=new Cn(new At,e);this._renderer.compile(t,xc)}_sceneToCubeUV(e,t,n,i,r){const o=new kn(90,1,t,n),l=[1,-1,1,1,1,1],u=[1,1,1,-1,-1,-1],h=this._renderer,f=h.autoClear,p=h.toneMapping;h.getClearColor(Wg),h.toneMapping=0,h.autoClear=!1,h.state.buffers.depth.getReversed()&&(h.setRenderTarget(i),h.clearDepth(),h.setRenderTarget(null)),this._backgroundBox===null&&(this._backgroundBox=new Cn(new Zc,new qs({name:"PMREM.Backgroun
3679d",side:1,depthWrite:!1,depthTest:!1})));const g=this._backgroundBox,m=g.material;let v=!1;const b=e.background;b?b.isColor&&(m.color.copy(b),e.background=null,v=!0):(m.color.copy(Wg),v=!0);for(let w=0;w<6;w++){const S=w%3;S===0?(o.up.set(0,l[w],0),o.position.set(r.x,r.y,r.z),o.lookAt(r.x+u[w],r.y,r.z)):S===1?(o.up.set(0,0,l[w]),o.position.set(r.x,r.y,r.z),o.lookAt(r.x,r.y+u[w],r.z)):(o.up.set(0,l[w],0),o.position.set(r.x,r.y,r.z),o.lookAt(r.x,r.y,r.z+u[w]));const _=this._cubeSize;gl(i,S*_,w>2?_:0,_,_),h.setRenderTarget(i),v&&h.render(g,o),h.render(e,o)}h.toneMapping=p,h.autoClear=f,e.background=b}_textureToCubeUV(e,t){const n=this._renderer,i=e.mapping===301||e.mapping===302;i?(this._cubemapMaterial===null&&(this._cubemapMaterial=qg()),this._cubemapMaterial.uniforms.flipEnvMap.value=e.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=Xg());const r=i?this._cubemapMaterial:this._equirectMaterial,o=this._lodMeshes[0];o.material=r;const l=r.uniforms;l.envMap.value=e;const u=this._cubeSize;gl(t,0,0,3*u,2*u),n.setRenderTarget(t),n.render(o,xc)}_applyPMREM(e){const t=this._renderer,n=t.autoClear;t.autoClear=!1;const i=this._lodMeshes.length;for(let r=1;r<i;r++)this._applyGGXFilter(e,r-1,r);t.autoClear=n}_applyGGXFilter(e,t,n){const i=this._renderer,r=this._pingPongRenderTarget,o=this._ggxMaterial,l=this._lodMeshes[n];l.material=o;const u=o.uniforms,h=n/(this._lodMeshes.length-1),f=t/(this._lodMeshes.length-1),p=Math.sqrt(h*h-f*f)*(0+h*1.25),{_lodMax:g}=this,m=this._sizeLods[n],v=3*m*(n>g-Vs?n-g+Vs:0),b=4*(this._cubeSize-m);u.envMap.value=e.texture,u.roughness.value=p,u.mipInt.value=g-t,gl(r,v,b,3*m,2*m),i.setRenderTarget(r),i.render(l,xc),u.envMap.value=r.texture,u.roughness.value=0,u.mipInt.value=g-n,gl(e,v,b,3*m,2*m),i.setRenderTarget(e),i.render(l,xc)}_blur(e,t,n,i,r){const o=this._pingPongRenderTarget;this._halfBlur(e,o,t,n,i,"latitudinal",r),this._halfBlur(o,e,n,n,i,"longitudinal",r)}_halfBlur(e,t,n,i,r,o,l){const u=this._renderer,h=this._blurMaterial;o!=="latitudinal"&&o!=="longitudinal"&&rt("blur direction must be either latitudinal or longitudinal!");const f=3,p=this._lodMeshes[i];p.material=h;const g=h.uniforms,m=this._sizeLods[n]-1,v=isFinite(r)?Math.PI/(2*m):2*Math.PI/(2*ro-1),b=r/v,w=isFinite(r)?1+Math.floor(f*b):ro;w>ro&&Ue(`sigmaRadians, ${r}, is too large and will clip, as it requested ${w} samples when the maximum is set to ${ro}`);const S=[];let _=0;for(let E=0;E<ro;++E){const P=E/b,N=Math.exp(-P*P/2);S.push(N),E===0?_+=N:E<w&&(_+=2*N)}for(let E=0;E<S.length;E++)S[E]=S[E]/_;g.envMap.value=e.texture,g.samples.value=w,g.weights.value=S,g.latitudinal.value=o==="latitudinal",l&&(g.poleAxis.value=l);const{_lodMax:C}=this;g.dTheta.value=v,g.mipInt.value=C-n;const A=this._sizeLods[i];gl(t,3*A*(i>C-Vs?i-C+Vs:0),4*(this._cubeSize-A),3*A,2*A),u.setRenderTarget(t),u.render(p,xc)}};function j5(e){const t=[],n=[],i=[];let r=e;const o=e-Vs+1+Hg.length;for(let l=0;l<o;l++){const u=Math.pow(2,r);t.push(u);let h=1/u;l>e-Vs?h=Hg[l-e+Vs-1]:l===0&&(h=0),n.push(h);const f=1/(u-2),p=-f,g=1+f,m=[p,p,g,p,g,g,p,p,g,g,p,g],v=6,b=6,w=3,S=2,_=1,C=new Float32Array(w*b*v),A=new Float32Array(S*b*v),E=new Float32Array(_*b*v);for(let N=0;N<v;N++){const O=N%3*2/3-1,T=N>2?0:-1,R=[O,T,0,O+2/3,T,0,O+2/3,T+1,0,O,T,0,O+2/3,T+1,0,O,T+1,0];C.set(R,w*b*N),A.set(m,S*b*N);const B=[N,N,N,N,N,N];E.set(B,_*b*N)}const P=new At;P.setAttribute("position",new Jt(C,w)),P.setAttribute("uv",new Jt(A,S)),P.setAttribute("faceIndex",new Jt(E,_)),i.push(new Cn(P,null)),r>Vs&&r--}return{lodMeshes:i,sizeLods:t,sigmas:n}}function jg(e,t,n){const i=new Fi(e,t,n);return i.texture.mapping=306,i.texture.name="PMREM.cubeUv",i.scissorTest=!0,i}function gl(e,t,n,i,r){e.viewport.set(t,n,i,r),e.scissor.set(t,n,i,r)}function X5(e,t,n){return new Si({name:"PMREMGGXConvolution",defines:{GGX_SAMPLES:H5,CUBEUV_TEXEL_WIDTH:1/t,CUBEUV_TEXEL_HEIGHT:1/n,CUBEUV_MAX_MIP:`${e}.0`},uniforms:{envMap:{value:null},roughness:{value:0},mipInt:{value:0}},vertexShader:rf(),fragmentShader:`
3680
3681			precision highp float;
3682			precision highp int;
3683
3684			varying vec3 vOutputDirection;
3685
3686			uniform sampler2D envMap;
3687			uniform float roughness;
3688			uniform float mipInt;
3689
3690			#define ENVMAP_TYPE_CUBE_UV
3691			#include <cube_uv_reflection_fragment>
3692
3693			#define PI 3.14159265359
3694
3695			// Van der Corput radical inverse
3696			float radicalInverse_VdC(uint bits) {
3697				bits = (bits << 16u) | (bits >> 16u);
3698				bits = ((bits & 0x55555555u) << 1u) | ((bits & 0xAAAAAAAAu) >> 1u);
3699				bits = ((bits & 0x33333333u) << 2u) | ((bits & 0xCCCCCCCCu) >> 2u);
3700				bits = ((bits & 0x0F0F0F0Fu) << 4u) | ((bits & 0xF0F0F0F0u) >> 4u);
3701				bits = ((bits & 0x00FF00FFu) << 8u) | ((bits & 0xFF00FF00u) >> 8u);
3702				return float(bits) * 2.3283064365386963e-10; // / 0x100000000
3703			}
3704
3705			// Hammersley sequence
3706			vec2 hammersley(uint i, uint N) {
3707				return vec2(float(i) / float(N), radicalInverse_VdC(i));
3708			}
3709
3710			// GGX VNDF importance sampling (Eric Heitz 2018)
3711			// "Sampling the GGX Distribution of Visible Normals"
3712			// https://jcgt.org/published/0007/04/01/
3713			vec3 importanceSampleGGX_VNDF(vec2 Xi, vec3 V, float roughness) {
3714				float alpha = roughness * roughness;
3715
3716				// Section 4.1: Orthonormal basis
3717				vec3 T1 = vec3(1.0, 0.0, 0.0);
3718				vec3 T2 = cross(V, T1);
3719
3720				// Section 4.2: Parameterization of projected area
3721				float r = sqrt(Xi.x);
3722				float phi = 2.0 * PI * Xi.y;
3723				float t1 = r * cos(phi);
3724				float t2 = r * sin(phi);
3725				float s = 0.5 * (1.0 + V.z);
3726				t2 = (1.0 - s) * sqrt(1.0 - t1 * t1) + s * t2;
3727
3728				// Section 4.3: Reprojection onto hemisphere
3729				vec3 Nh = t1 * T1 + t2 * T2 + sqrt(max(0.0, 1.0 - t1 * t1 - t2 * t2)) * V;
3730
3731				// Section 3.4: Transform back to ellipsoid configuration
3732				return normalize(vec3(alpha * Nh.x, alpha * Nh.y, max(0.0, Nh.z)));
3733			}
3734
3735			void main() {
3736				vec3 N = normalize(vOutputDirection);
3737				vec3 V = N; // Assume view direction equals normal for pre-filtering
3738
3739				vec3 prefilteredColor = vec3(0.0);
3740				float totalWeight = 0.0;
3741
3742				// For very low roughness, just sample the environment directly
3743				if (roughness < 0.001) {
3744					gl_FragColor = vec4(bilinearCubeUV(envMap, N, mipInt), 1.0);
3745					return;
3746				}
3747
3748				// Tangent space basis for VNDF sampling
3749				vec3 up = abs(N.z) < 0.999 ? vec3(0.0, 0.0, 1.0) : vec3(1.0, 0.0, 0.0);
3750				vec3 tangent = normalize(cross(up, N));
3751				vec3 bitangent = cross(N, tangent);
3752
3753				for(uint i = 0u; i < uint(GGX_SAMPLES); i++) {
3754					vec2 Xi = hammersley(i, uint(GGX_SAMPLES));
3755
3756					// For PMREM, V = N, so in tangent space V is always (0, 0, 1)
3757					vec3 H_tangent = importanceSampleGGX_VNDF(Xi, vec3(0.0, 0.0, 1.0), roughness);
3758
3759					// Transform H back to world space
3760					vec3 H = normalize(tangent * H_tangent.x + bitangent * H_tangent.y + N * H_tangent.z);
3761					vec3 L = normalize(2.0 * dot(V, H) * H - V);
3762
3763					float NdotL = max(dot(N, L), 0.0);
3764
3765					if(NdotL > 0.0) {
3766						// Sample environment at fixed mip level
3767						// VNDF importance sampling handles the distribution filtering
3768						vec3 sampleColor = bilinearCubeUV(envMap, L, mipInt);
3769
3770						// Weight by NdotL for the split-sum approximation
3771						// VNDF PDF naturally accounts for the visible microfacet distribution
3772						prefilteredColor += sampleColor * NdotL;
3773						totalWeight += NdotL;
3774					}
3775				}
3776
3777				if (totalWeight > 0.0) {
3778					prefilteredColor = prefilteredColor / totalWeight;
3779				}
3780
3781				gl_FragColor = vec4(prefilteredColor, 1.0);
3782			}
3783		`,blending:0,depthTest:!1,depthWrite:!1})}function q5(e,t,n){const i=new Float32Array(ro),r=new k(0,1,0);return new Si({name:"SphericalGaussianBlur",defines:{n:ro,CUBEUV_TEXEL_WIDTH:1/t,CUBEUV_TEXEL_HEIGHT:1/n,CUBEUV_MAX_MIP:`${e}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:i},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:r}},vertexShader:rf(),fragmentShader:`
3784
3785			precision mediump float;
3786			precision mediump int;
3787
3788			varying vec3 vOutputDirection;
3789
3790			uniform sampler2D envMap;
3791			uniform int samples;
3792			uniform float weights[ n ];
3793			uniform bool latitudinal;
3794			uniform float dTheta;
3795			uniform float mipInt;
3796			uniform vec3 poleAxis;
3797
3798			#define ENVMAP_TYPE_CUBE_UV
3799			#include <cube_uv_reflection_fragment>
3800
3801			vec3 getSample( float theta, vec3 axis ) {
3802
3803				float cosTheta = cos( theta );
3804				// Rodrigues' axis-angle rotation
3805				vec3 sampleDirection = vOutputDirection * cosTheta
3806					+ cross( axis, vOutputDirection ) * sin( theta )
3807					+ axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta );
3808
3809				return bilinearCubeUV( envMap, sampleDirection, mipInt );
3810
3811			}
3812
3813			void main() {
3814
3815				vec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection );
3816
3817				if ( all( equal( axis, vec3( 0.0 ) ) ) ) {
3818
3819					axis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x );
3820
3821				}
3822
3823				axis = normalize( axis );
3824
3825				gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );
3826				gl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis );
3827
3828				for ( int i = 1; i < n; i++ ) {
3829
3830					if ( i >= samples ) {
3831
3832						break;
3833
3834					}
3835
3836					float theta = dTheta * float( i );
3837					gl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis );
3838					gl_FragColor.rgb += weights[ i ] * getSample( theta, axis );
3839
3840				}
3841
3842			}
3843		`,blending:0,depthTest:!1,depthWrite:!1})}function Xg(){return new Si({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:rf(),fragmentShader:`
3844
3845			precision mediump float;
3846			precision mediump int;
3847
3848			varying vec3 vOutputDirection;
3849
3850			uniform sampler2D envMap;
3851
3852			#include <common>
3853
3854			void main() {
3855
3856				vec3 outputDirection = normalize( vOutputDirection );
3857				vec2 uv = equirectUv( outputDirection );
3858
3859				gl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 );
3860
3861			}
3862		`,blending:0,depthTest:!1,depthWrite:!1})}function qg(){return new Si({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:rf(),fragmentShader:`
3863
3864			precision mediump float;
3865			precision mediump int;
3866
3867			uniform float flipEnvMap;
3868
3869			varying vec3 vOutputDirection;
3870
3871			uniform samplerCube envMap;
3872
3873			void main() {
3874
3875				gl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) );
3876
3877			}
3878		`,blending:0,depthTest:!1,depthWrite:!1})}function rf(){return`
3879
3880		precision mediump float;
3881		precision mediump int;
3882
3883		attribute float faceIndex;
3884
3885		varying vec3 vOutputDirection;
3886
3887		// RH coordinate system; PMREM face-indexing convention
3888		vec3 getDirection( vec2 uv, float face ) {
3889
3890			uv = 2.0 * uv - 1.0;
3891
3892			vec3 direction = vec3( uv, 1.0 );
3893
3894			if ( face == 0.0 ) {
3895
3896				direction = direction.zyx; // ( 1, v, u ) pos x
3897
3898			} else if ( face == 1.0 ) {
3899
3900				direction = direction.xzy;
3901				direction.xz *= -1.0; // ( -u, 1, -v ) pos y
3902
3903			} else if ( face == 2.0 ) {
3904
3905				direction.x *= -1.0; // ( -u, v, 1 ) pos z
3906
3907			} else if ( face == 3.0 ) {
3908
3909				direction = direction.zyx;
3910				direction.xz *= -1.0; // ( -1, v, -u ) neg x
3911
3912			} else if ( face == 4.0 ) {
3913
3914				direction = direction.xzy;
3915				direction.xy *= -1.0; // ( -u, -1, v ) neg y
3916
3917			} else if ( face == 5.0 ) {
3918
3919				direction.z *= -1.0; // ( u, v, -1 ) neg z
3920
3921			}
3922
3923			return direction;
3924
3925		}
3926
3927		void main() {
3928
3929			vOutputDirection = getDirection( uv, faceIndex );
3930			gl_Position = vec4( position, 1.0 );
3931
3932		}
3933	`}var L0=class extends Fi{constructor(e=1,t={}
vendor: 25,711 bytes, lines 3933-4049
3933){super(e,e,t),this.isWebGLCubeRenderTarget=!0;const n={width:e,height:e,depth:1},i=[n,n,n,n,n,n];this.texture=new $c(i),this._setTextureOptions(t),this.texture.isRenderTargetTexture=!0}fromEquirectangularTexture(e,t){this.texture.type=t.type,this.texture.colorSpace=t.colorSpace,this.texture.generateMipmaps=t.generateMipmaps,this.texture.minFilter=t.minFilter,this.texture.magFilter=t.magFilter;const n={uniforms:{tEquirect:{value:null}},vertexShader:`
3934
3935				varying vec3 vWorldDirection;
3936
3937				vec3 transformDirection( in vec3 dir, in mat4 matrix ) {
3938
3939					return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );
3940
3941				}
3942
3943				void main() {
3944
3945					vWorldDirection = transformDirection( position, modelMatrix );
3946
3947					#include <begin_vertex>
3948					#include <project_vertex>
3949
3950				}
3951			`,fragmentShader:`
3952
3953				uniform sampler2D tEquirect;
3954
3955				varying vec3 vWorldDirection;
3956
3957				#include <common>
3958
3959				void main() {
3960
3961					vec3 direction = normalize( vWorldDirection );
3962
3963					vec2 sampleUV = equirectUv( direction );
3964
3965					gl_FragColor = texture2D( tEquirect, sampleUV );
3966
3967				}
3968			`},i=new Zc(5,5,5),r=new Si({name:"CubemapFromEquirect",uniforms:Pl(n.uniforms),vertexShader:n.vertexShader,fragmentShader:n.fragmentShader,side:1,blending:0});r.uniforms.tEquirect.value=t;const o=new Cn(i,r),l=t.minFilter;return t.minFilter===1008&&(t.minFilter=mn),new vx(1,10,this).update(e,o),t.minFilter=l,o.geometry.dispose(),o.material.dispose(),this}clear(e,t=!0,n=!0,i=!0){const r=e.getRenderTarget();for(let o=0;o<6;o++)e.setRenderTarget(this,o),e.clear(t,n,i);e.setRenderTarget(r)}};function Y5(e){let t=new WeakMap,n=new WeakMap,i=null;function r(m,v=!1){return m==null?null:v?l(m):o(m)}function o(m){if(m&&m.isTexture){const v=m.mapping;if(v===303||v===304)if(t.has(m)){const b=t.get(m).texture;return u(b,m.mapping)}else{const b=m.image;if(b&&b.height>0){const w=new L0(b.height);return w.fromEquirectangularTexture(e,m),t.set(m,w),m.addEventListener("dispose",f),u(w.texture,m.mapping)}else return null}}return m}function l(m){if(m&&m.isTexture){const v=m.mapping,b=v===303||v===304,w=v===301||v===302;if(b||w){let S=n.get(m);const _=S!==void 0?S.texture.pmremVersion:0;if(m.isRenderTargetTexture&&m.pmremVersion!==_)return i===null&&(i=new Pp(e)),S=b?i.fromEquirectangular(m,S):i.fromCubemap(m,S),S.texture.pmremVersion=m.pmremVersion,n.set(m,S),S.texture;if(S!==void 0)return S.texture;{const C=m.image;return b&&C&&C.height>0||w&&C&&h(C)?(i===null&&(i=new Pp(e)),S=b?i.fromEquirectangular(m):i.fromCubemap(m),S.texture.pmremVersion=m.pmremVersion,n.set(m,S),m.addEventListener("dispose",p),S.texture):null}}}return m}function u(m,v){return v===303?m.mapping=301:v===304&&(m.mapping=302),m}function h(m){let v=0;const b=6;for(let w=0;w<b;w++)m[w]!==void 0&&v++;return v===b}function f(m){const v=m.target;v.removeEventListener("dispose",f);const b=t.get(v);b!==void 0&&(t.delete(v),b.dispose())}function p(m){const v=m.target;v.removeEventListener("dispose",p);const b=n.get(v);b!==void 0&&(n.delete(v),b.dispose())}function g(){t=new WeakMap,n=new WeakMap,i!==null&&(i.dispose(),i=null)}return{get:r,dispose:g}}function $5(e){const t={};function n(i){if(t[i]!==void 0)return t[i];const r=e.getExtension(i);return t[i]=r,r}return{has:function(i){return n(i)!==null},init:function(){n("EXT_color_buffer_float"),n("WEBGL_clip_cull_distance"),n("OES_texture_float_linear"),n("EXT_color_buffer_half_float"),n("WEBGL_multisampled_render_to_texture"),n("WEBGL_render_shared_exponent")},get:function(i){const r=n(i);return r===null&&Gs("WebGLRenderer: "+i+" extension not supported."),r}}}function Z5(e,t,n,i){const r={},o=new WeakMap;function l(g){const m=g.target;m.index!==null&&t.remove(m.index);for(const b in m.attributes)t.remove(m.attributes[b]);m.removeEventListener("dispose",l),delete r[m.id];const v=o.get(m);v&&(t.remove(v),o.delete(m)),i.releaseStatesOfGeometry(m),m.isInstancedBufferGeometry===!0&&delete m._maxInstanceCount,n.memory.geometries--}function u(g,m){return r[m.id]===!0||(m.addEventListener("dispose",l),r[m.id]=!0,n.memory.geometries++),m}function h(g){const m=g.attributes;for(const v in m)t.update(m[v],e.ARRAY_BUFFER)}function f(g){const m=[],v=g.index,b=g.attributes.position;let w=0;if(b===void 0)return;if(v!==null){const C=v.array;w=v.version;for(let A=0,E=C.length;A<E;A+=3){const P=C[A+0],N=C[A+1],O=C[A+2];m.push(P,N,N,O,O,P)}}else{const C=b.array;w=b.version;for(let A=0,E=C.length/3-1;A<E;A+=3){const P=A+0,N=A+1,O=A+2;m.push(P,N,N,O,O,P)}}const S=new(b.count>=65535?a0:s0)(m,1);S.version=w;const _=o.get(g);_&&t.remove(_),o.set(g,S)}function p(g){const m=o.get(g);if(m){const v=g.index;v!==null&&m.version<v.version&&f(g)}else f(g);return o.get(g)}return{get:u,update:h,getWireframeAttribute:p}}function J5(e,t,n){let i;function r(g){i=g}let o,l;function u(g){o=g.type,l=g.bytesPerElement}function h(g,m){e.drawElements(i,m,o,g*l),n.update(m,i,1)}function f(g,m,v){v!==0&&(e.drawElementsInstanced(i,m,o,g*l,v),n.update(m,i,v))}function p(g,m,v){if(v===0)return;t.get("WEBGL_multi_draw").multiDrawElementsWEBGL(i,m,0,o,g,0,v);let b=0;for(let w=0;w<v;w++)b+=m[w];n.update(b,i,1)}this.setMode=r,this.setIndex=u,this.render=h,this.renderInstances=f,this.renderMultiDraw=p}function K5(e){const t={geometries:0,textures:0},n={frame:0,calls:0,triangles:0,points:0,lines:0};function i(o,l,u){switch(n.calls++,l){case e.TRIANGLES:n.triangles+=u*(o/3);break;case e.LINES:n.lines+=u*(o/2);break;case e.LINE_STRIP:n.lines+=u*(o-1);break;case e.LINE_LOOP:n.lines+=u*o;break;case e.POINTS:n.points+=u*o;break;default:rt("WebGLInfo: Unknown draw mode:",l);break}}function r(){n.calls=0,n.triangles=0,n.points=0,n.lines=0}return{memory:t,render:n,programs:null,autoReset:!0,reset:r,update:i}}function Q5(e,t,n){const i=new WeakMap,r=new tn;function o(l,u,h){const f=l.morphTargetInfluences,p=u.morphAttributes.position||u.morphAttributes.normal||u.morphAttributes.color,g=p!==void 0?p.length:0;let m=i.get(u);if(m===void 0||m.count!==g){let R=function(){O.dispose(),i.delete(u),u.removeEventListener("dispose",R)};m!==void 0&&m.texture.dispose();const v=u.morphAttributes.position!==void 0,b=u.morphAttributes.normal!==void 0,w=u.morphAttributes.color!==void 0,S=u.morphAttributes.position||[],_=u.morphAttributes.normal||[],C=u.morphAttributes.color||[];let A=0;v===!0&&(A=1),b===!0&&(A=2),w===!0&&(A=3);let E=u.attributes.position.count*A,P=1;E>t.maxTextureSize&&(P=Math.ceil(E/t.maxTextureSize),E=t.maxTextureSize);const N=new Float32Array(E*P*4*g),O=new Yh(N,E,P,g);O.type=rs,O.needsUpdate=!0;const T=A*4;for(let B=0;B<g;B++){const F=S[B],j=_[B],H=C[B],Y=E*P*4*B;for(let q=0;q<F.count;q++){const te=q*T;v===!0&&(r.fromBufferAttribute(F,q),N[Y+te+0]=r.x,N[Y+te+1]=r.y,N[Y+te+2]=r.z,N[Y+te+3]=0),b===!0&&(r.fromBufferAttribute(j,q),N[Y+te+4]=r.x,N[Y+te+5]=r.y,N[Y+te+6]=r.z,N[Y+te+7]=0),w===!0&&(r.fromBufferAttribute(H,q),N[Y+te+8]=r.x,N[Y+te+9]=r.y,N[Y+te+10]=r.z,N[Y+te+11]=H.itemSize===4?r.w:1)}}m={count:g,texture:O,size:new ye(E,P)},i.set(u,m),u.addEventListener("dispose",R)}if(l.isInstancedMesh===!0&&l.morphTexture!==null)h.getUniforms().setValue(e,"morphTexture",l.morphTexture,n);else{let v=0;for(let w=0;w<f.length;w++)v+=f[w];const b=u.morphTargetsRelative?1:1-v;h.getUniforms().setValue(e,"morphTargetBaseInfluence",b),h.getUniforms().setValue(e,"morphTargetInfluences",f)}h.getUniforms().setValue(e,"morphTargetsTexture",m.texture,n),h.getUniforms().setValue(e,"morphTargetsTextureSize",m.size)}return{update:o}}function e6(e,t,n,i,r){let o=new WeakMap;function l(f){const p=r.render.frame,g=f.geometry,m=t.get(f,g);if(o.get(m)!==p&&(t.update(m),o.set(m,p)),f.isInstancedMesh&&(f.hasEventListener("dispose",h)===!1&&f.addEventListener("dispose",h),o.get(f)!==p&&(n.update(f.instanceMatrix,e.ARRAY_BUFFER),f.instanceColor!==null&&n.update(f.instanceColor,e.ARRAY_BUFFER),o.set(f,p))),f.isSkinnedMesh){const v=f.skeleton;o.get(v)!==p&&(v.update(),o.set(v,p))}return m}function u(){o=new WeakMap}function h(f){const p=f.target;p.removeEventListener("dispose",h),i.releaseStatesOfObject(p),n.remove(p.instanceMatrix),p.instanceColor!==null&&n.remove(p.instanceColor)}return{update:l,dispose:u}}var t6={1:"LINEAR_TONE_MAPPING",2:"REINHARD_TONE_MAPPING",3:"CINEON_TONE_MAPPING",4:"ACES_FILMIC_TONE_MAPPING",6:"AGX_TONE_MAPPING",7:"NEUTRAL_TONE_MAPPING",5:"CUSTOM_TONE_MAPPING"};function n6(e,t,n,i,r,o){const l=new Fi(t,n,{type:e,depthBuffer:r,stencilBuffer:o,samples:i?4:0,depthTexture:r?new po(t,n):void 0}),u=new Fi(t,n,{type:Hs,depthBuffer:!1,stencilBuffer:!1}),h=new At;h.setAttribute("position",new Qe([-1,3,0,-1,-1,0,3,-1,0],3)),h.setAttribute("uv",new Qe([0,2,0,0,2,0],2));const f=new b0({uniforms:{tDiffuse:{value:null}},vertexShader:`
3969			precision highp float;
3970
3971			uniform mat4 modelViewMatrix;
3972			uniform mat4 projectionMatrix;
3973
3974			attribute vec3 position;
3975			attribute vec2 uv;
3976
3977			varying vec2 vUv;
3978
3979			void main() {
3980				vUv = uv;
3981				gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
3982			}`,fragmentShader:`
3983			precision highp float;
3984
3985			uniform sampler2D tDiffuse;
3986
3987			varying vec2 vUv;
3988
3989			#include <tonemapping_pars_fragment>
3990			#include <colorspace_pars_fragment>
3991
3992			void main() {
3993				gl_FragColor = texture2D( tDiffuse, vUv );
3994
3995				#ifdef LINEAR_TONE_MAPPING
3996					gl_FragColor.rgb = LinearToneMapping( gl_FragColor.rgb );
3997				#elif defined( REINHARD_TONE_MAPPING )
3998					gl_FragColor.rgb = ReinhardToneMapping( gl_FragColor.rgb );
3999				#elif defined( CINEON_TONE_MAPPING )
4000					gl_FragColor.rgb = CineonToneMapping( gl_FragColor.rgb );
4001				#elif defined( ACES_FILMIC_TONE_MAPPING )
4002					gl_FragColor.rgb = ACESFilmicToneMapping( gl_FragColor.rgb );
4003				#elif defined( AGX_TONE_MAPPING )
4004					gl_FragColor.rgb = AgXToneMapping( gl_FragColor.rgb );
4005				#elif defined( NEUTRAL_TONE_MAPPING )
4006					gl_FragColor.rgb = NeutralToneMapping( gl_FragColor.rgb );
4007				#elif defined( CUSTOM_TONE_MAPPING )
4008					gl_FragColor.rgb = CustomToneMapping( gl_FragColor.rgb );
4009				#endif
4010
4011				#ifdef SRGB_TRANSFER
4012					gl_FragColor = sRGBTransferOETF( gl_FragColor );
4013				#endif
4014			}`,depthTest:!1,depthWrite:!1}),p=new Cn(h,f),g=new Fl(-1,1,1,-1,0,1);let m=null,v=null,b=!1,w,S=null,_=[],C=!1;this.setSize=function(A,E){l.setSize(A,E),u.setSize(A,E);for(let P=0;P<_.length;P++){const N=_[P];N.setSize&&N.setSize(A,E)}},this.setEffects=function(A){_=A,C=_.length>0&&_[0].isRenderPass===!0;const E=l.width,P=l.height;for(let N=0;N<_.length;N++){const O=_[N];O.setSize&&O.setSize(E,P)}},this.begin=function(A,E){if(b||A.toneMapping===0&&_.length===0)return!1;if(S=E,E!==null){const P=E.width,N=E.height;(l.width!==P||l.height!==N)&&this.setSize(P,N)}return C===!1&&A.setRenderTarget(l),w=A.toneMapping,A.toneMapping=0,!0},this.hasRenderPass=function(){return C},this.end=function(A,E){A.toneMapping=w,b=!0;let P=l,N=u;for(let O=0;O<_.length;O++){const T=_[O];if(T.enabled!==!1&&(T.render(A,N,P,E),T.needsSwap!==!1)){const R=P;P=N,N=R}}if(m!==A.outputColorSpace||v!==A.toneMapping){m=A.outputColorSpace,v=A.toneMapping,f.defines={},Nt.getTransfer(m)==="srgb"&&(f.defines.SRGB_TRANSFER="");const O=t6[v];O&&(f.defines[O]=""),f.needsUpdate=!0}f.uniforms.tDiffuse.value=P.texture,A.setRenderTarget(S),A.render(p,g),S=null,b=!1},this.isCompositing=function(){return b},this.dispose=function(){l.depthTexture&&l.depthTexture.dispose(),l.dispose(),u.dispose(),h.dispose(),f.dispose()}}var Px=new Ln,Np=new po(1,1),Nx=new Yh,Lx=new $h,Dx=new $c,Yg=[],$g=[],Zg=new Float32Array(16),Jg=new Float32Array(9),Kg=new Float32Array(4);function kl(e,t,n){const i=e[0];if(i<=0||i>0)return e;const r=t*n;let o=Yg[r];if(o===void 0&&(o=new Float32Array(r),Yg[r]=o),t!==0){i.toArray(o,0);for(let l=1,u=0;l!==t;++l)u+=n,e[l].toArray(o,u)}return o}function Pn(e,t){if(e.length!==t.length)return!1;for(let n=0,i=e.length;n<i;n++)if(e[n]!==t[n])return!1;return!0}function Nn(e,t){for(let n=0,i=t.length;n<i;n++)e[n]=t[n]}function sf(e,t){let n=$g[t];n===void 0&&(n=new Int32Array(t),$g[t]=n);for(let i=0;i!==t;++i)n[i]=e.allocateTextureUnit();return n}function i6(e,t){const n=this.cache;n[0]!==t&&(e.uniform1f(this.addr,t),n[0]=t)}function r6(e,t){const n=this.cache;if(t.x!==void 0)(n[0]!==t.x||n[1]!==t.y)&&(e.uniform2f(this.addr,t.x,t.y),n[0]=t.x,n[1]=t.y);else{if(Pn(n,t))return;e.uniform2fv(this.addr,t),Nn(n,t)}}function s6(e,t){const n=this.cache;if(t.x!==void 0)(n[0]!==t.x||n[1]!==t.y||n[2]!==t.z)&&(e.uniform3f(this.addr,t.x,t.y,t.z),n[0]=t.x,n[1]=t.y,n[2]=t.z);else if(t.r!==void 0)(n[0]!==t.r||n[1]!==t.g||n[2]!==t.b)&&(e.uniform3f(this.addr,t.r,t.g,t.b),n[0]=t.r,n[1]=t.g,n[2]=t.b);else{if(Pn(n,t))return;e.uniform3fv(this.addr,t),Nn(n,t)}}function a6(e,t){const n=this.cache;if(t.x!==void 0)(n[0]!==t.x||n[1]!==t.y||n[2]!==t.z||n[3]!==t.w)&&(e.uniform4f(this.addr,t.x,t.y,t.z,t.w),n[0]=t.x,n[1]=t.y,n[2]=t.z,n[3]=t.w);else{if(Pn(n,t))return;e.uniform4fv(this.addr,t),Nn(n,t)}}function o6(e,t){const n=this.cache,i=t.elements;if(i===void 0){if(Pn(n,t))return;e.uniformMatrix2fv(this.addr,!1,t),Nn(n,t)}else{if(Pn(n,i))return;Kg.set(i),e.uniformMatrix2fv(this.addr,!1,Kg),Nn(n,i)}}function l6(e,t){const n=this.cache,i=t.elements;if(i===void 0){if(Pn(n,t))return;e.uniformMatrix3fv(this.addr,!1,t),Nn(n,t)}else{if(Pn(n,i))return;Jg.set(i),e.uniformMatrix3fv(this.addr,!1,Jg),Nn(n,i)}}function c6(e,t){const n=this.cache,i=t.elements;if(i===void 0){if(Pn(n,t))return;e.uniformMatrix4fv(this.addr,!1,t),Nn(n,t)}else{if(Pn(n,i))return;Zg.set(i),e.uniformMatrix4fv(this.addr,!1,Zg),Nn(n,i)}}function u6(e,t){const n=this.cache;n[0]!==t&&(e.uniform1i(this.addr,t),n[0]=t)}function h6(e,t){const n=this.cache;if(t.x!==void 0)(n[0]!==t.x||n[1]!==t.y)&&(e.uniform2i(this.addr,t.x,t.y),n[0]=t.x,n[1]=t.y);else{if(Pn(n,t))return;e.uniform2iv(this.addr,t),Nn(n,t)}}function f6(e,t){const n=this.cache;if(t.x!==void 0)(n[0]!==t.x||n[1]!==t.y||n[2]!==t.z)&&(e.uniform3i(this.addr,t.x,t.y,t.z),n[0]=t.x,n[1]=t.y,n[2]=t.z);else{if(Pn(n,t))return;e.uniform3iv(this.addr,t),Nn(n,t)}}function d6(e,t){const n=this.cache;if(t.x!==void 0)(n[0]!==t.x||n[1]!==t.y||n[2]!==t.z||n[3]!==t.w)&&(e.uniform4i(this.addr,t.x,t.y,t.z,t.w),n[0]=t.x,n[1]=t.y,n[2]=t.z,n[3]=t.w);else{if(Pn(n,t))return;e.uniform4iv(this.addr,t),Nn(n,t)}}function p6(e,t){const n=this.cache;n[0]!==t&&(e.uniform1ui(this.addr,t),n[0]=t)}function m6(e,t){const n=this.cache;if(t.x!==void 0)(n[0]!==t.x||n[1]!==t.y)&&(e.uniform2ui(this.addr,t.x,t.y),n[0]=t.x,n[1]=t.y);else{if(Pn(n,t))return;e.uniform2uiv(this.addr,t),Nn(n,t)}}function g6(e,t){const n=this.cache;if(t.x!==void 0)(n[0]!==t.x||n[1]!==t.y||n[2]!==t.z)&&(e.uniform3ui(this.addr,t.x,t.y,t.z),n[0]=t.x,n[1]=t.y,n[2]=t.z);else{if(Pn(n,t))return;e.uniform3uiv(this.addr,t),Nn(n,t)}}function v6(e,t){const n=this.cache;if(t.x!==void 0)(n[0]!==t.x||n[1]!==t.y||n[2]!==t.z||n[3]!==t.w)&&(e.uniform4ui(this.addr,t.x,t.y,t.z,t.w),n[0]=t.x,n[1]=t.y,n[2]=t.z,n[3]=t.w);else{if(Pn(n,t))return;e.uniform4uiv(this.addr,t),Nn(n,t)}}function y6(e,t,n){const i=this.cache,r=n.allocateTextureUnit();i[0]!==r&&(e.uniform1i(this.addr,r),i[0]=r);let o;this.type===e.SAMPLER_2D_SHADOW?(Np.compareFunction=n.isReversedDepthBuffer()?518:515,o=Np):o=Px,n.setTexture2D(t||o,r)}function x6(e,t,n){const i=this.cache,r=n.allocateTextureUnit();i[0]!==r&&(e.uniform1i(this.addr,r),i[0]=r),n.setTexture3D(t||Lx,r)}function _6(e,t,n){const i=this.cache,r=n.allocateTextureUnit();i[0]!==r&&(e.uniform1i(this.addr,r),i[0]=r),n.setTextureCube(t||Dx,r)}function b6(e,t,n){const i=this.cache,r=n.allocateTextureUnit();i[0]!==r&&(e.uniform1i(this.addr,r),i[0]=r),n.setTexture2DArray(t||Nx,r)}function S6(e){switch(e){case 5126:return i6;case 35664:return r6;case 35665:return s6;case 35666:return a6;case 35674:return o6;case 35675:return l6;case 35676:return c6;case 5124:case 35670:return u6;case 35667:case 35671:return h6;case 35668:case 35672:return f6;case 35669:case 35673:return d6;case 5125:return p6;case 36294:return m6;case 36295:return g6;case 36296:return v6;case 35678:case 36198:case 36298:case 36306:case 35682:return y6;case 35679:case 36299:case 36307:return x6;case 35680:case 36300:case 36308:case 36293:return _6;case 36289:case 36303:case 36311:case 36292:return b6}}function M6(e,t){e.uniform1fv(this.addr,t)}function w6(e,t){const n=kl(t,this.size,2);e.uniform2fv(this.addr,n)}function E6(e,t){const n=kl(t,this.size,3);e.uniform3fv(this.addr,n)}function T6(e,t){const n=kl(t,this.size,4);e.uniform4fv(this.addr,n)}function C6(e,t){const n=kl(t,this.size,4);e.uniformMatrix2fv(this.addr,!1,n)}function A6(e,t){const n=kl(t,this.size,9);e.uniformMatrix3fv(this.addr,!1,n)}function R6(e,t){const n=kl(t,this.size,16);e.uniformMatrix4fv(this.addr,!1,n)}function I6(e,t){e.uniform1iv(this.addr,t)}function P6(e,t){e.uniform2iv(this.addr,t)}function N6(e,t){e.uniform3iv(this.addr,t)}function L6(e,t){e.uniform4iv(this.addr,t)}function D6(e,t){e.uniform1uiv(this.addr,t)}function U6(e,t){e.uniform2uiv(this.addr,t)}function O6(e,t){e.uniform3uiv(this.addr,t)}function F6(e,t){e.uniform4uiv(this.addr,t)}function k6(e,t,n){const i=this.cache,r=t.length,o=sf(n,r);Pn(i,o)||(e.uniform1iv(this.addr,o),Nn(i,o));let l;this.type===e.SAMPLER_2D_SHADOW?l=Np:l=Px;for(let u=0;u!==r;++u)n.setTexture2D(t[u]||l,o[u])}function B6(e,t,n){const i=this.cache,r=t.length,o=sf(n,r);Pn(i,o)||(e.uniform1iv(this.addr,o),Nn(i,o));for(let l=0;l!==r;++l)n.setTexture3D(t[l]||Lx,o[l])}function z6(e,t,n){const i=this.cache,r=t.length,o=sf(n,r);Pn(i,o)||(e.uniform1iv(this.addr,o),Nn(i,o));for(let l=0;l!==r;++l)n.setTextureCube(t[l]||Dx,o[l])}function V6(e,t,n){const i=this.cache,r=t.length,o=sf(n,r);Pn(i,o)||(e.uniform1iv(this.addr,o),Nn(i,o));for(let l=0;l!==r;++l)n.setTexture2DArray(t[l]||Nx,o[l])}function G6(e){switch(e){case 5126:return M6;case 35664:return w6;case 35665:return E6;case 35666:return T6;case 35674:return C6;case 35675:return A6;case 35676:return R6;case 5124:case 35670:return I6;case 35667:case 35671:return P6;case 35668:case 35672:return N6;case 35669:case 35673:return L6;case 5125:return D6;case 36294:return U6;case 36295:return O6;case 36296:return F6;case 35678:case 36198:case 36298:case 36306:case 35682:return k6;case 35679:case 36299:case 36307:return B6;case 35680:case 36300:case 36308:case 36293:return z6;case 36289:case 36303:case 36311:case 36292:return V6}}var H6=class{constructor(e,t,n){this.id=e,this.addr=n,this.cache=[],this.type=t.type,this.setValue=S6(t.type)}},W6=class{constructor(e,t,n){this.id=e,this.addr=n,this.cache=[],this.type=t.type,this.size=t.size,this.setValue=G6(t.type)}},j6=class{constructor(e){this.id=e,this.seq=[],this.map={}}setValue(e,t,n){const i=this.seq;for(let r=0,o=i.length;r!==o;++r){const l=i[r];l.setValue(e,t[l.id],n)}}},op=/(\w+)(\])?(\[|\.)?/g;function Qg(e,t){e.seq.push(t),e.map[t.id]=t}function X6(e,t,n){const i=e.name,r=i.length;for(op.lastIndex=0;;){const o=op.exec(i),l=op.lastIndex;let u=o[1];const h=o[2]==="]",f=o[3];if(h&&(u=u|0),f===void 0||f==="["&&l+2===r){Qg(n,f===void 0?new H6(u,e,t):new W6(u,e,t));break}else{let p=n.map[u];p===void 0&&(p=new j6(u),Qg(n,p)),n=p}}}var Dh=class{constructor(e,t){this.seq=[],this.map={};const n=e.getProgramParameter(t,e.ACTIVE_UNIFORMS);for(let o=0;o<n;++o){const l=e.getActiveUniform(t,o);X6(l,e.getUniformLocation(t,l.name),this)}const i=[],r=[];for(const o of this.seq)o.type===e.SAMPLER_2D_SHADOW||o.type===e.SAMPLER_CUBE_SHADOW||o.type===e.SAMPLER_2D_ARRAY_SHADOW?i.push(o):r.push(o);i.length>0&&(this.seq=i.concat(r))}setValue(e,t,n,i){const r=this.map[t];r!==void 0&&r.setValue(e,n,i)}setOptional(e,t,n){const i=t[n];i!==void 0&&this.setValue(e,n,i)}static upload(e,t,n,i){for(let r=0,o=t.length;r!==o;++r){const l=t[r],u=n[l.id];u.needsUpdate!==!1&&l.setValue(e,u.value,i)}}static seqWithValue(e,t){const n=[];for(let i=0,r=e.length;i!==r;++i){const o=e[i];o.id in t&&n.push(o)}return n}};function ev(e,t,n){const i=e.createShader(t);return e.shaderSource(i,n),e.compileShader(i),i}var q6=37297,Y6=0;function $6(e,t){const n=e.split(`
4015`),i=[],r=Math.max(t-6,0),o=Math.min(t+6,n.length);for(let l=r;l<o;l++){const u=l+1;i.push(`${u===t?">":" "} ${u}: ${n[l]}`)}return i.join(`
4016`)}var tv=new Et;function Z6(e){Nt._getMatrix(tv,Nt.workingColorSpace,e);const t=`mat3( ${tv.elements.map(n=>n.toFixed(4))} )`;switch(Nt.getTransfer(e)){case Oc:return[t,"LinearTransferOETF"];case Fc:return[t,"sRGBTransferOETF"];default:return Ue("WebGLProgram: Unsupported color space: ",e),[t,"LinearTransferOETF"]}}function nv(e,t,n){const i=e.getShaderParameter(t,e.COMPILE_STATUS),r=(e.getShaderInfoLog(t)||"").trim();if(i&&r==="")return"";const o=/ERROR: 0:(\d+)/.exec(r);if(o){const l=parseInt(o[1]);return n.toUpperCase()+`
4017
4018`+r+`
4019
4020`+$6(e.getShaderSource(t),l)}else return r}function J6(e,t){const n=Z6(t);return[`vec4 ${e}( vec4 value ) {`,`	return ${n[1]}( vec4( value.rgb * ${n[0]}, value.a ) );`,"}"].join(`
4021`)}var K6={1:"Linear",2:"Reinhard",3:"Cineon",4:"ACESFilmic",6:"AgX",7:"Neutral",5:"Custom"};function Q6(e,t){const n=K6[t];return n===void 0?(Ue("WebGLProgram: Unsupported toneMapping:",t),"vec3 "+e+"( vec3 color ) { return LinearToneMapping( color ); }"):"vec3 "+e+"( vec3 color ) { return "+n+"ToneMapping( color ); }"}var Eh=new k;function eE(){return Nt.getLuminanceCoefficients(Eh),["float luminance( const in vec3 rgb ) {",`	const vec3 weights = vec3( ${Eh.x.toFixed(4)}, ${Eh.y.toFixed(4)}, ${Eh.z.toFixed(4)} );`,"	return dot( weights, rgb );","}"].join(`
4022`)}function tE(e){return[e.extensionClipCullDistance?"#extension GL_ANGLE_clip_cull_distance : require":"",e.extensionMultiDraw?"#extension GL_ANGLE_multi_draw : require":""].filter(Mc).join(`
4023`)}function nE(e){const t=[];for(const n in e){const i=e[n];i!==!1&&t.push("#define "+n+" "+i)}return t.join(`
4024`)}function iE(e,t){const n={},i=e.getProgramParameter(t,e.ACTIVE_ATTRIBUTES);for(let r=0;r<i;r++){const o=e.getActiveAttrib(t,r),l=o.name;let u=1;o.type===e.FLOAT_MAT2&&(u=2),o.type===e.FLOAT_MAT3&&(u=3),o.type===e.FLOAT_MAT4&&(u=4),n[l]={type:o.type,location:e.getAttribLocation(t,l),locationSize:u}}return n}function Mc(e){return e!==""}function iv(e,t){const n=t.numSpotLightShadows+t.numSpotLightMaps-t.numSpotLightShadowsWithMaps;return e.replace(/NUM_DIR_LIGHTS/g,t.numDirLights).replace(/NUM_SPOT_LIGHTS/g,t.numSpotLights).replace(/NUM_SPOT_LIGHT_MAPS/g,t.numSpotLightMaps).replace(/NUM_SPOT_LIGHT_COORDS/g,n).replace(/NUM_RECT_AREA_LIGHTS/g,t.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g,t.numPointLights).replace(/NUM_HEMI_LIGHTS/g,t.numHemiLights).replace(/NUM_DIR_LIGHT_SHADOWS/g,t.numDirLightShadows).replace(/NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS/g,t.numSpotLightShadowsWithMaps).replace(/NUM_SPOT_LIGHT_SHADOWS/g,t.numSpotLightShadows).replace(/NUM_POINT_LIGHT_SHADOWS/g,t.numPointLightShadows)}function rv(e,t){return e.replace(/NUM_CLIPPING_PLANES/g,t.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,t.numClippingPlanes-t.numClipIntersection)}var rE=/^[ \t]*#include +<([\w\d./]+)>/gm;function Lp(e){return e.replace(rE,aE)}var sE=new Map;function aE(e,t){let n=It[t];if(n===void 0){const i=sE.get(t);if(i!==void 0)n=It[i],Ue('WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',t,i);else throw new Error("THREE.WebGLProgram: Can not resolve #include <"+t+">")}return Lp(n)}var oE=/#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;function sv(e){return e.replace(oE,lE)}function lE(e,t,n,i){let r="";for(let o=parseInt(t);o<parseInt(n);o++)r+=i.replace(/\[\s*i\s*\]/g,"[ "+o+" ]").replace(/UNROLLED_LOOP_INDEX/g,o);return r}function av(e){let t=`precision ${e.precision} float;
4025	precision ${e.precision} int;
4026	precision ${e.precision} sampler2D;
4027	precision ${e.precision} samplerCube;
4028	precision ${e.precision} sampler3D;
4029	precision ${e.precision} sampler2DArray;
4030	precision ${e.precision} sampler2DShadow;
4031	precision ${e.precision} samplerCubeShadow;
4032	precision ${e.precision} sampler2DArrayShadow;
4033	precision ${e.precision} isampler2D;
4034	precision ${e.precision} isampler3D;
4035	precision ${e.precision} isamplerCube;
4036	precision ${e.precision} isampler2DArray;
4037	precision ${e.precision} usampler2D;
4038	precision ${e.precision} usampler3D;
4039	precision ${e.precision} usamplerCube;
4040	precision ${e.precision} usampler2DArray;
4041	`;return e.precision==="highp"?t+=`
4042#define HIGH_PRECISION`:e.precision==="mediump"?t+=`
4043#define MEDIUM_PRECISION`:e.precision==="lowp"&&(t+=`
4044#define LOW_PRECISION`),t}var cE={1:"SHADOWMAP_TYPE_PCF",3:"SHADOWMAP_TYPE_VSM"};function uE(e){return cE[e.shadowMapType]||"SHADOWMAP_TYPE_BASIC"}var hE={301:"ENVMAP_TYPE_CUBE",302:"ENVMAP_TYPE_CUBE",306:"ENVMAP_TYPE_CUBE_UV"};function fE(e){return e.envMap===!1?"ENVMAP_TYPE_CUBE":hE[e.envMapMode]||"ENVMAP_TYPE_CUBE"}var dE={302:"ENVMAP_MODE_REFRACTION"};function pE(e){return e.envMap===!1?"ENVMAP_MODE_REFLECTION":dE[e.envMapMode]||"ENVMAP_MODE_REFLECTION"}var mE={0:"ENVMAP_BLENDING_MULTIPLY",1:"ENVMAP_BLENDING_MIX",2:"ENVMAP_BLENDING_ADD"};function gE(e){return e.envMap===!1?"ENVMAP_BLENDING_NONE":mE[e.combine]||"ENVMAP_BLENDING_NONE"}function vE(e){const t=e.envMapCubeUVHeight;if(t===null)return null;const n=Math.log2(t)-2,i=1/t;return{texelWidth:1/(3*Math.max(Math.pow(2,n),112)),texelHeight:i,maxMip:n}}function yE(e,t,n,i){const r=e.getContext(),o=n.defines;let l=n.vertexShader,u=n.fragmentShader;const h=uE(n),f=fE(n),p=pE(n),g=gE(n),m=vE(n),v=tE(n),b=nE(o),w=r.createProgram();let S,_,C=n.glslVersion?"#version "+n.glslVersion+`
4045`:"";n.isRawShaderMaterial?(S=["#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,b].filter(Mc).join(`
4046`),S.length>0&&(S+=`
4047`),_=["#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,b].filter(Mc).join(`
4048`),_.length>0&&(_+=`
4049`)):(S=[av(n),"#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,b,n.extensionCl
vendor: 5,485 bytes, lines 4049-4051
4049ipCullDistance?"#define USE_CLIP_DISTANCE":"",n.batching?"#define USE_BATCHING":"",n.batchingColor?"#define USE_BATCHING_COLOR":"",n.instancing?"#define USE_INSTANCING":"",n.instancingColor?"#define USE_INSTANCING_COLOR":"",n.instancingMorph?"#define USE_INSTANCING_MORPH":"",n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.map?"#define USE_MAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+p:"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",n.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",n.displacementMap?"#define USE_DISPLACEMENTMAP":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.anisotropy?"#define USE_ANISOTROPY":"",n.anisotropyMap?"#define USE_ANISOTROPYMAP":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",n.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",n.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.alphaHash?"#define USE_ALPHAHASH":"",n.transmission?"#define USE_TRANSMISSION":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.thicknessMap?"#define USE_THICKNESSMAP":"",n.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",n.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",n.mapUv?"#define MAP_UV "+n.mapUv:"",n.alphaMapUv?"#define ALPHAMAP_UV "+n.alphaMapUv:"",n.lightMapUv?"#define LIGHTMAP_UV "+n.lightMapUv:"",n.aoMapUv?"#define AOMAP_UV "+n.aoMapUv:"",n.emissiveMapUv?"#define EMISSIVEMAP_UV "+n.emissiveMapUv:"",n.bumpMapUv?"#define BUMPMAP_UV "+n.bumpMapUv:"",n.normalMapUv?"#define NORMALMAP_UV "+n.normalMapUv:"",n.displacementMapUv?"#define DISPLACEMENTMAP_UV "+n.displacementMapUv:"",n.metalnessMapUv?"#define METALNESSMAP_UV "+n.metalnessMapUv:"",n.roughnessMapUv?"#define ROUGHNESSMAP_UV "+n.roughnessMapUv:"",n.anisotropyMapUv?"#define ANISOTROPYMAP_UV "+n.anisotropyMapUv:"",n.clearcoatMapUv?"#define CLEARCOATMAP_UV "+n.clearcoatMapUv:"",n.clearcoatNormalMapUv?"#define CLEARCOAT_NORMALMAP_UV "+n.clearcoatNormalMapUv:"",n.clearcoatRoughnessMapUv?"#define CLEARCOAT_ROUGHNESSMAP_UV "+n.clearcoatRoughnessMapUv:"",n.iridescenceMapUv?"#define IRIDESCENCEMAP_UV "+n.iridescenceMapUv:"",n.iridescenceThicknessMapUv?"#define IRIDESCENCE_THICKNESSMAP_UV "+n.iridescenceThicknessMapUv:"",n.sheenColorMapUv?"#define SHEEN_COLORMAP_UV "+n.sheenColorMapUv:"",n.sheenRoughnessMapUv?"#define SHEEN_ROUGHNESSMAP_UV "+n.sheenRoughnessMapUv:"",n.specularMapUv?"#define SPECULARMAP_UV "+n.specularMapUv:"",n.specularColorMapUv?"#define SPECULAR_COLORMAP_UV "+n.specularColorMapUv:"",n.specularIntensityMapUv?"#define SPECULAR_INTENSITYMAP_UV "+n.specularIntensityMapUv:"",n.transmissionMapUv?"#define TRANSMISSIONMAP_UV "+n.transmissionMapUv:"",n.thicknessMapUv?"#define THICKNESSMAP_UV "+n.thicknessMapUv:"",n.vertexTangents&&n.flatShading===!1?"#define USE_TANGENT":"",n.vertexNormals?"#define HAS_NORMAL":"",n.vertexColors?"#define USE_COLOR":"",n.vertexAlphas?"#define USE_COLOR_ALPHA":"",n.vertexUv1s?"#define USE_UV1":"",n.vertexUv2s?"#define USE_UV2":"",n.vertexUv3s?"#define USE_UV3":"",n.pointsUvs?"#define USE_POINTS_UV":"",n.flatShading?"#define FLAT_SHADED":"",n.skinning?"#define USE_SKINNING":"",n.morphTargets?"#define USE_MORPHTARGETS":"",n.morphNormals&&n.flatShading===!1?"#define USE_MORPHNORMALS":"",n.morphColors?"#define USE_MORPHCOLORS":"",n.morphTargetsCount>0?"#define MORPHTARGETS_TEXTURE_STRIDE "+n.morphTextureStride:"",n.morphTargetsCount>0?"#define MORPHTARGETS_COUNT "+n.morphTargetsCount:"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"",n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+h:"",n.sizeAttenuation?"#define USE_SIZEATTENUATION":"",n.numLightProbes>0?"#define USE_LIGHT_PROBES":"",n.logarithmicDepthBuffer?"#define USE_LOGARITHMIC_DEPTH_BUFFER":"",n.reversedDepthBuffer?"#define USE_REVERSED_DEPTH_BUFFER":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING","	attribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR","	attribute vec3 instanceColor;","#endif","#ifdef USE_INSTANCING_MORPH","	uniform sampler2D morphTexture;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_UV1","	attribute vec2 uv1;","#endif","#ifdef USE_UV2","	attribute vec2 uv2;","#endif","#ifdef USE_UV3","	attribute vec2 uv3;","#endif","#ifdef USE_TANGENT","	attribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )","	attribute vec4 color;","#elif defined( USE_COLOR )","	attribute vec3 color;","#endif","#ifdef USE_SKINNING","	attribute vec4 skinIndex;","	attribute vec4 skinWeight;","#endif",`
4050`].filter(Mc).join(`
4051`),_=[av(n),"#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,b,n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.alph
4051aToCoverage?"#define ALPHA_TO_COVERAGE":"",n.map?"#define USE_MAP":"",n.matcap?"#define USE_MATCAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+f:"",n.envMap?"#define "+p:"",n.envMap?"#define "+g:"",m?"#define CUBEUV_TEXEL_WIDTH "+m.texelWidth:"",m?"#define CUBEUV_TEXEL_HEIGHT "+m.texelHeight:"",m?"#define CUBEUV_MAX_MIP "+m.maxMip+".0":"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",n.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",n.packedNormalMap?"#define USE_PACKED_NORMALMAP":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.anisotropy?"#define USE_ANISOTROPY":"",n.anisotropyMap?"#define USE_ANISOTROPYMAP":"",n.clearcoat?"#define USE_CLEARCOAT":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.dispersion?"#define USE_DISPERSION":"",n.iridescence?"#define USE_IRIDESCENCE":"",n.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",n.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",n.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.alphaTest?"#define USE_ALPHATEST":"",n.alphaHash?"#define USE_ALPHAHASH":"",n.sheen?"#define USE_SHEEN":"",n.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",n.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",n.transmission?"#define USE_TRANSMISSION":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.thicknessMap?"#define USE_THICKNESSMAP":"",n.vertexTangents&&n.flatShading===!1?"#define USE_TANGENT":"",n.vertexColors||n.instancingColor?"#define USE_COLOR":"",n.vertexAlphas||n.batchingColor?"#define USE_COLOR_ALPHA":"",n.vertexUv1s?"#define USE_UV1":"",n.vertexUv2s?"#define USE_UV2":"",n.vertexUv3s?"#define USE_UV3":"",n.pointsUvs?"#define USE_POINTS_UV":"",n.gradientMap?"#define USE_GRADIENTMAP":"",n.flatShading?"#define FLAT_SHADED":"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"",n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+h:"",n.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",n.numLightProbes>0?"#define USE_LIGHT_PROBES":"",n.numLightProbeGrids>0?"#define USE_LIGHT_PROBES_GRID":"",n.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",n.decodeVideoTextureEmissive?"#define DECODE_VIDEO_TEXTURE_EMISSIVE":"",n.logarithmicDepthBuffer?"#define USE_LOGARITHMIC_DEPTH_BUFFER":"",n.reversedDepthBuffer?"#define USE_REVERSED_DEPTH_BUFFER":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",n.toneMapping!==0?"#define TONE_MAPPING":"",n.toneMapping!==0?It.tonemapping_pars_fragment:"",n.toneMapping!==0?Q6("toneMapping",n.toneMapping):"",n.dithering?"#define DITHERING":"",n.opaque?"#define OPAQUE":"",It.colorspace_pars_fragment,J6("linearToOutputTexel",n.outputColorSpace),eE(),n.useDepthPacking?"#define DEPTH_PACKING "+n.depthPacking:"",`
4052`].filter(Mc).join(`
4053`)),l=Lp(l),l=iv(l,n),l=rv(l,n),u=Lp(u),u=iv(u,n),u=rv(u,n),l=sv(l),u=sv(u),n.isRawShaderMaterial!==!0&&(C=`#version 300 es
4054`,S=[v,"#define attribute in","#define varying out","#define texture2D texture"].join(`
4055`)+`
4056`+S,_=["#define varying in",n.glslVersion==="300 es"?"":"layout(location = 0) out highp vec4 pc_fragColor;",n.glslVersion==="300 es"?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth","#define texture2D texture","#define textureCube texture","#define texture2DProj textureProj","#define texture2DLodEXT textureLod","#define texture2DProjLodEXT textureProjLod","#define textureCubeLodEXT textureLod","#define texture2DGradEXT textureGrad","#define texture2DProjGradEXT textureProjGrad","#define textureCubeGradEXT textureGrad"].join(`
4057`)+`
4058`+_);const A=C+S+l,E=C+_+u,P=ev(r,r.VERTEX_SHADER,A),N=ev(r,r.FRAGMENT_SHADER,E);r.attachShader(w,P),r.attachShader(w,N),n.index0AttributeName!==void 0?r.bindAttribLocation(w,0,n.index0AttributeName):n.hasPositionAttribute===!0&&r.bindAttribLocation(w,0,"position"),r.linkProgram(w);
vendor: 5,234 bytes, lines 4058-4065
4058function O(F){if(e.debug.checkShaderErrors){const j=r.getProgramInfoLog(w)||"",H=r.getShaderInfoLog(P)||"",Y=r.getShaderInfoLog(N)||"",q=j.trim(),te=H.trim(),J=Y.trim();let he=!0,ue=!0;if(r.getProgramParameter(w,r.LINK_STATUS)===!1)if(he=!1,typeof e.debug.onShaderError=="function")e.debug.onShaderError(r,w,P,N);else{const ce=nv(r,P,"vertex"),me=nv(r,N,"fragment");rt("WebGLProgram: Shader Error "+r.getError()+" - VALIDATE_STATUS "+r.getProgramParameter(w,r.VALIDATE_STATUS)+`
4059
4060Material Name: `+F.name+`
4061Material Type: `+F.type+`
4062
4063Program Info Log: `+q+`
4064`+ce+`
4065`+me)}else q!==""?Ue("WebGLProgram: Program Info Log:",q):(te===""||J==="")&&(ue=!1);ue&&(F.diagnostics={runnable:he,programLog:q,vertexShader:{log:te,prefix:S},fragmentShader:{log:J,prefix:_}})}r.deleteShader(P),r.deleteShader(N),T=new Dh(r,w),R=iE(r,w)}let T;this.getUniforms=function(){return T===void 0&&O(this),T};let R;this.getAttributes=function(){return R===void 0&&O(this),R};let B=n.rendererExtensionParallelShaderCompile===!1;return this.isReady=function(){return B===!1&&(B=r.getProgramParameter(w,q6)),B},this.destroy=function(){i.releaseStatesOfProgram(this),r.deleteProgram(w),this.program=void 0},this.type=n.shaderType,this.name=n.shaderName,this.id=Y6++,this.cacheKey=t,this.usedTimes=1,this.program=w,this.vertexShader=P,this.fragmentShader=N,this}var xE=0,_E=class{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(e,t,n){const i=this._getShaderCacheForMaterial(e);return i.has(t)===!1&&(i.add(t),t.usedTimes++),i.has(n)===!1&&(i.add(n),n.usedTimes++),this}remove(e){const t=this.materialCache.get(e);for(const n of t)n.usedTimes--,n.usedTimes===0&&this.shaderCache.delete(n.code);return this.materialCache.delete(e),this}getVertexShaderStage(e){return this._getShaderStage(e.vertexShader)}getFragmentShaderStage(e){return this._getShaderStage(e.fragmentShader)}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(e){const t=this.materialCache;let n=t.get(e);return n===void 0&&(n=new Set,t.set(e,n)),n}_getShaderStage(e){const t=this.shaderCache;let n=t.get(e);return n===void 0&&(n=new bE(e),t.set(e,n)),n}},bE=class{constructor(e){this.id=xE++,this.code=e,this.usedTimes=0}};function SE(e){return e===1030||e===37490||e===36285}function ME(e,t,n,i,r,o){const l=new Al,u=new _E,h=new Set,f=[],p=new Map,g=i.logarithmicDepthBuffer;let m=i.precision;const v={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distance",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"};function b(T){return h.add(T),T===0?"uv":`uv${T}`}function w(T,R,B,F,j,H){const Y=F.fog,q=j.geometry,te=T.isMeshStandardMaterial||T.isMeshLambertMaterial||T.isMeshPhongMaterial?F.environment:null,J=T.isMeshStandardMaterial||T.isMeshLambertMaterial&&!T.envMap||T.isMeshPhongMaterial&&!T.envMap,he=t.get(T.envMap||te,J),ue=he&&he.mapping===306?he.image.height:null,ce=v[T.type];T.precision!==null&&(m=i.getMaxPrecision(T.precision),m!==T.precision&&Ue("WebGLProgram.getParameters:",T.precision,"not supported, using",m,"instead."));const me=q.morphAttributes.position||q.morphAttributes.normal||q.morphAttributes.color,_e=me!==void 0?me.length:0;let ht=0;q.morphAttributes.position!==void 0&&(ht=1),q.morphAttributes.normal!==void 0&&(ht=2),q.morphAttributes.color!==void 0&&(ht=3);let tt,re,ge,Ie;if(ce){const at=ur[ce];tt=at.vertexShader,re=at.fragmentShader}else{tt=T.vertexShader,re=T.fragmentShader;const at=u.getVertexShaderStage(T),sn=u.getFragmentShaderStage(T);u.update(T,at,sn),ge=at.id,Ie=sn.id}const Ce=e.getRenderTarget(),We=e.state.buffers.depth.getReversed(),et=j.isInstancedMesh===!0,Ze=j.isBatchedMesh===!0,ct=!!T.map,oe=!!T.matcap,Se=!!he,Ae=!!T.aoMap,De=!!T.lightMap,Le=!!T.bumpMap&&T.wireframe===!1,Ye=!!T.normalMap,Je=!!T.displacementMap,lt=!!T.emissiveMap,ut=!!T.metalnessMap,z=!!T.roughnessMap,vt=T.anisotropy>0,bt=T.clearcoat>0,xt=T.dispersion>0,U=T.iridescence>0,I=T.sheen>0,G=T.transmission>0,ee=vt&&!!T.anisotropyMap,fe=bt&&!!T.clearcoatMap,we=bt&&!!T.clearcoatNormalMap,Ne=bt&&!!T.clearcoatRoughnessMap,X=U&&!!T.iridescenceMap,Ee=U&&!!T.iridescenceThicknessMap,ze=I&&!!T.sheenColorMap,qe=I&&!!T.sheenRoughnessMap,xe=!!T.specularMap,Ke=!!T.specularColorMap,nt=!!T.specularIntensityMap,ft=G&&!!T.transmissionMap,Rt=G&&!!T.thicknessMap,W=!!T.gradientMap,le=!!T.alphaMap,ve=T.alphaTest>0,Be=!!T.alphaHash,je=!!T.extensions;let pe=0;T.toneMapped&&(Ce===null||Ce.isXRRenderTarget===!0)&&(pe=e.toneMapping);const Oe={shaderID:ce,shaderType:T.type,shaderName:T.name,vertexShader:tt,fragmentShader:re,defines:T.defines,customVertexShaderID:ge,customFragmentShaderID:Ie,isRawShaderMaterial:T.isRawShaderMaterial===!0,glslVersion:T.glslVersion,precision:m,batching:Ze,batchingColor:Ze&&j._colorsTexture!==null,instancing:et,instancingColor:et&&j.instanceColor!==null,instancingMorph:et&&j.morphTexture!==null,outputColorSpace:Ce===null?e.outputColorSpace:Ce.isXRRenderTarget===!0?Ce.texture.colorSpace:Nt.
vendor: 9,597 bytes, line 4065
4065workingColorSpace,alphaToCoverage:!!T.alphaToCoverage,map:ct,matcap:oe,envMap:Se,envMapMode:Se&&he.mapping,envMapCubeUVHeight:ue,aoMap:Ae,lightMap:De,bumpMap:Le,normalMap:Ye,displacementMap:Je,emissiveMap:lt,normalMapObjectSpace:Ye&&T.normalMapType===1,normalMapTangentSpace:Ye&&T.normalMapType===0,packedNormalMap:Ye&&T.normalMapType===0&&SE(T.normalMap.format),metalnessMap:ut,roughnessMap:z,anisotropy:vt,anisotropyMap:ee,clearcoat:bt,clearcoatMap:fe,clearcoatNormalMap:we,clearcoatRoughnessMap:Ne,dispersion:xt,iridescence:U,iridescenceMap:X,iridescenceThicknessMap:Ee,sheen:I,sheenColorMap:ze,sheenRoughnessMap:qe,specularMap:xe,specularColorMap:Ke,specularIntensityMap:nt,transmission:G,transmissionMap:ft,thicknessMap:Rt,gradientMap:W,opaque:T.transparent===!1&&T.blending===1&&T.alphaToCoverage===!1,alphaMap:le,alphaTest:ve,alphaHash:Be,combine:T.combine,mapUv:ct&&b(T.map.channel),aoMapUv:Ae&&b(T.aoMap.channel),lightMapUv:De&&b(T.lightMap.channel),bumpMapUv:Le&&b(T.bumpMap.channel),normalMapUv:Ye&&b(T.normalMap.channel),displacementMapUv:Je&&b(T.displacementMap.channel),emissiveMapUv:lt&&b(T.emissiveMap.channel),metalnessMapUv:ut&&b(T.metalnessMap.channel),roughnessMapUv:z&&b(T.roughnessMap.channel),anisotropyMapUv:ee&&b(T.anisotropyMap.channel),clearcoatMapUv:fe&&b(T.clearcoatMap.channel),clearcoatNormalMapUv:we&&b(T.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:Ne&&b(T.clearcoatRoughnessMap.channel),iridescenceMapUv:X&&b(T.iridescenceMap.channel),iridescenceThicknessMapUv:Ee&&b(T.iridescenceThicknessMap.channel),sheenColorMapUv:ze&&b(T.sheenColorMap.channel),sheenRoughnessMapUv:qe&&b(T.sheenRoughnessMap.channel),specularMapUv:xe&&b(T.specularMap.channel),specularColorMapUv:Ke&&b(T.specularColorMap.channel),specularIntensityMapUv:nt&&b(T.specularIntensityMap.channel),transmissionMapUv:ft&&b(T.transmissionMap.channel),thicknessMapUv:Rt&&b(T.thicknessMap.channel),alphaMapUv:le&&b(T.alphaMap.channel),vertexTangents:!!q.attributes.tangent&&(Ye||vt),vertexNormals:!!q.attributes.normal,vertexColors:T.vertexColors,vertexAlphas:T.vertexColors===!0&&!!q.attributes.color&&q.attributes.color.itemSize===4,pointsUvs:j.isPoints===!0&&!!q.attributes.uv&&(ct||le),fog:!!Y,useFog:T.fog===!0,fogExp2:!!Y&&Y.isFogExp2,flatShading:T.wireframe===!1&&(T.flatShading===!0||q.attributes.normal===void 0&&Ye===!1&&(T.isMeshLambertMaterial||T.isMeshPhongMaterial||T.isMeshStandardMaterial||T.isMeshPhysicalMaterial)),sizeAttenuation:T.sizeAttenuation===!0,logarithmicDepthBuffer:g,reversedDepthBuffer:We,skinning:j.isSkinnedMesh===!0,hasPositionAttribute:q.attributes.position!==void 0,morphTargets:q.morphAttributes.position!==void 0,morphNormals:q.morphAttributes.normal!==void 0,morphColors:q.morphAttributes.color!==void 0,morphTargetsCount:_e,morphTextureStride:ht,numDirLights:R.directional.length,numPointLights:R.point.length,numSpotLights:R.spot.length,numSpotLightMaps:R.spotLightMap.length,numRectAreaLights:R.rectArea.length,numHemiLights:R.hemi.length,numDirLightShadows:R.directionalShadowMap.length,numPointLightShadows:R.pointShadowMap.length,numSpotLightShadows:R.spotShadowMap.length,numSpotLightShadowsWithMaps:R.numSpotLightShadowsWithMaps,numLightProbes:R.numLightProbes,numLightProbeGrids:H.length,numClippingPlanes:o.numPlanes,numClipIntersection:o.numIntersection,dithering:T.dithering,shadowMapEnabled:e.shadowMap.enabled&&B.length>0,shadowMapType:e.shadowMap.type,toneMapping:pe,decodeVideoTexture:ct&&T.map.isVideoTexture===!0&&Nt.getTransfer(T.map.colorSpace)==="srgb",decodeVideoTextureEmissive:lt&&T.emissiveMap.isVideoTexture===!0&&Nt.getTransfer(T.emissiveMap.colorSpace)==="srgb",premultipliedAlpha:T.premultipliedAlpha,doubleSided:T.side===2,flipSided:T.side===1,useDepthPacking:T.depthPacking>=0,depthPacking:T.depthPacking||0,index0AttributeName:T.index0AttributeName,extensionClipCullDistance:je&&T.extensions.clipCullDistance===!0&&n.has("WEBGL_clip_cull_distance"),extensionMultiDraw:(je&&T.extensions.multiDraw===!0||Ze)&&n.has("WEBGL_multi_draw"),rendererExtensionParallelShaderCompile:n.has("KHR_parallel_shader_compile"),customProgramCacheKey:T.customProgramCacheKey()};return Oe.vertexUv1s=h.has(1),Oe.vertexUv2s=h.has(2),Oe.vertexUv3s=h.has(3),h.clear(),Oe}function S(T){const R=[];if(T.shaderID?R.push(T.shaderID):(R.push(T.customVertexShaderID),R.push(T.customFragmentShaderID)),T.defines!==void 0)for(const B in T.defines)R.push(B),R.push(T.defines[B]);return T.isRawShaderMaterial===!1&&(_(R,T),C(R,T),R.push(e.outputColorSpace)),R.push(T.customProgramCacheKey),R.join()}function _(T,R){T.push(R.precision),T.push(R.outputColorSpace),T.push(R.envMapMode),T.push(R.envMapCubeUVHeight),T.push(R.mapUv),T.push(R.alphaMapUv),T.push(R.lightMapUv),T.push(R.aoMapUv),T.push(R.bumpMapUv),T.push(R.normalMapUv),T.push(R.displacementMapUv),T.push(R.emissiveMapUv),T.push(R.metalnessMapUv),T.push(R.roughnessMapUv),T.push(R.anisotropyMapUv),T.push(R.clearcoatMapUv),T.push(R.clearcoatNormalMapUv),T.push(R.clearcoatRoughnessMapUv),T.push(R.iridescenceMapUv),T.push(R.iridescenceThicknessMapUv),T.push(R.sheenColorMapUv),T.push(R.sheenRoughnessMapUv),T.push(R.specularMapUv),T.push(R.specularColorMapUv),T.push(R.specularIntensityMapUv),T.push(R.transmissionMapUv),T.push(R.thicknessMapUv),T.push(R.combine),T.push(R.fogExp2),T.push(R.sizeAttenuation),T.push(R.morphTargetsCount),T.push(R.morphAttributeCount),T.push(R.numDirLights),T.push(R.numPointLights),T.push(R.numSpotLights),T.push(R.numSpotLightMaps),T.push(R.numHemiLights),T.push(R.numRectAreaLights),T.push(R.numDirLightShadows),T.push(R.numPointLightShadows),T.push(R.numSpotLightShadows),T.push(R.numSpotLightShadowsWithMaps),T.push(R.numLightProbes),T.push(R.shadowMapType),T.push(R.toneMapping),T.push(R.numClippingPlanes),T.push(R.numClipIntersection),T.push(R.depthPacking)}function C(T,R){l.disableAll(),R.instancing&&l.enable(0),R.instancingColor&&l.enable(1),R.instancingMorph&&l.enable(2),R.matcap&&l.enable(3),R.envMap&&l.enable(4),R.normalMapObjectSpace&&l.enable(5),R.normalMapTangentSpace&&l.enable(6),R.clearcoat&&l.enable(7),R.iridescence&&l.enable(8),R.alphaTest&&l.enable(9),R.vertexColors&&l.enable(10),R.vertexAlphas&&l.enable(11),R.vertexUv1s&&l.enable(12),R.vertexUv2s&&l.enable(13),R.vertexUv3s&&l.enable(14),R.vertexTangents&&l.enable(15),R.anisotropy&&l.enable(16),R.alphaHash&&l.enable(17),R.batching&&l.enable(18),R.dispersion&&l.enable(19),R.batchingColor&&l.enable(20),R.gradientMap&&l.enable(21),R.packedNormalMap&&l.enable(22),R.vertexNormals&&l.enable(23),T.push(l.mask),l.disableAll(),R.fog&&l.enable(0),R.useFog&&l.enable(1),R.flatShading&&l.enable(2),R.logarithmicDepthBuffer&&l.enable(3),R.reversedDepthBuffer&&l.enable(4),R.skinning&&l.enable(5),R.morphTargets&&l.enable(6),R.morphNormals&&l.enable(7),R.morphColors&&l.enable(8),R.premultipliedAlpha&&l.enable(9),R.shadowMapEnabled&&l.enable(10),R.doubleSided&&l.enable(11),R.flipSided&&l.enable(12),R.useDepthPacking&&l.enable(13),R.dithering&&l.enable(14),R.transmission&&l.enable(15),R.sheen&&l.enable(16),R.opaque&&l.enable(17),R.pointsUvs&&l.enable(18),R.decodeVideoTexture&&l.enable(19),R.decodeVideoTextureEmissive&&l.enable(20),R.alphaToCoverage&&l.enable(21),R.numLightProbeGrids>0&&l.enable(22),R.hasPositionAttribute&&l.enable(23),T.push(l.mask)}function A(T){const R=v[T.type];let B;if(R){const F=ur[R];B=j2.clone(F.uniforms)}else B=T.uniforms;return B}function E(T,R){let B=p.get(R);return B!==void 0?++B.usedTimes:(B=new yE(e,R,T,r),f.push(B),p.set(R,B)),B}function P(T){if(--T.usedTimes===0){const R=f.indexOf(T);f[R]=f[f.length-1],f.pop(),p.delete(T.cacheKey),T.destroy()}}function N(T){u.remove(T)}function O(){u.dispose()}return{getParameters:w,getProgramCacheKey:S,getUniforms:A,acquireProgram:E,releaseProgram:P,releaseShaderCache:N,programs:f,dispose:O}}function wE(){let e=new WeakMap;function t(l){return e.has(l)}function n(l){let u=e.get(l);return u===void 0&&(u={},e.set(l,u)),u}function i(l){e.delete(l)}function r(l,u,h){e.get(l)[u]=h}function o(){e=new WeakMap}return{has:t,get:n,remove:i,update:r,dispose:o}}function EE(e,t){return e.groupOrder!==t.groupOrder?e.groupOrder-t.groupOrder:e.renderOrder!==t.renderOrder?e.renderOrder-t.renderOrder:e.material.id!==t.material.id?e.material.id-t.material.id:e.materialVariant!==t.materialVariant?e.materialVariant-t.materialVariant:e.z!==t.z?e.z-t.z:e.id-t.id}function ov(e,t){return e.groupOrder!==t.groupOrder?e.groupOrder-t.groupOrder:e.renderOrder!==t.renderOrder?e.renderOrder-t.renderOrder:e.z!==t.z?t.z-e.z:e.id-t.id}function lv(){const e=[];let t=0;const n=[],i=[],r=[];function o(){t=0,n.length=0,i.length=0,r.length=0}function l(m){let v=0;return m.isInstancedMesh&&(v+=2),m.isSkinnedMesh&&(v+=1),v}function u(m,v,b,w,S,_){let C=e[t];return C===void 0?(C={id:m.id,object:m,geometry:v,material:b,materialVariant:l(m),groupOrder:w,renderOrder:m.renderOrder,z:S,group:_},e[t]=C):(C.id=m.id,C.object=m,C.geometry=v,C.material=b,C.materialVariant=l(m),C.groupOrder=w,C.renderOrder=m.renderOrder,C.z=S,C.group=_),t++,C}function h(m,v,b,w,S,_){const C=u(m,v,b,w,S,_);b.transmission>0?i.push(C):b.transparent===!0?r.push(C):n.push(C)}function f(m,v,b,w,S,_){const C=u(m,v,b,w,S,_);b.transmission>0?i.unshift(C):b.transparent===!0?r.unshift(C):n.unshift(C)}function p(m,v,b){n.length>1&&n.sort(m||EE),i.length>1&&i.sort(v||ov),r.length>1&&r.sort(v||ov),b&&(n.reverse(),i.reverse(),r.reverse())}function g(){for(let m=t,v=e.length;m<v;m++){const b=e[m];if(b.id===null)break;b.id=null,b.object=null,b.geometry=null,b.material=null,b.group=null}}return{opaque:n,transmissive:i,transparent:r,init:o,push:h,unshift:f,finish:g,
vendor: 8,687 bytes, lines 4065-4092
4065sort:p}}function TE(){let e=new WeakMap;function t(i,r){const o=e.get(i);let l;return o===void 0?(l=new lv,e.set(i,[l])):r>=o.length?(l=new lv,o.push(l)):l=o[r],l}function n(){e=new WeakMap}return{get:t,dispose:n}}function CE(){const e={};return{get:function(t){if(e[t.id]!==void 0)return e[t.id];let n;switch(t.type){case"DirectionalLight":n={direction:new k,color:new Xe};break;case"SpotLight":n={position:new k,direction:new k,color:new Xe,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":n={position:new k,color:new Xe,distance:0,decay:0};break;case"HemisphereLight":n={direction:new k,skyColor:new Xe,groundColor:new Xe};break;case"RectAreaLight":n={color:new Xe,position:new k,halfWidth:new k,halfHeight:new k};break}return e[t.id]=n,n}}}function AE(){const e={};return{get:function(t){if(e[t.id]!==void 0)return e[t.id];let n;switch(t.type){case"DirectionalLight":n={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new ye};break;case"SpotLight":n={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new ye};break;case"PointLight":n={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new ye,shadowCameraNear:1,shadowCameraFar:1e3};break}return e[t.id]=n,n}}}var RE=0;function IE(e,t){return(t.castShadow?2:0)-(e.castShadow?2:0)+(t.map?1:0)-(e.map?1:0)}function PE(e){const t=new CE,n=AE(),i={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-1,numLightProbes:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotLightMap:[],spotShadow:[],spotShadowMap:[],spotLightMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],numSpotLightShadowsWithMaps:0,numLightProbes:0};for(let f=0;f<9;f++)i.probe.push(new k);const r=new k,o=new _t,l=new _t;function u(f){let p=0,g=0,m=0;for(let R=0;R<9;R++)i.probe[R].set(0,0,0);let v=0,b=0,w=0,S=0,_=0,C=0,A=0,E=0,P=0,N=0,O=0;f.sort(IE);for(let R=0,B=f.length;R<B;R++){const F=f[R],j=F.color,H=F.intensity,Y=F.distance;let q=null;if(F.shadow&&F.shadow.map&&(F.shadow.map.texture.format===1030?q=F.shadow.map.texture:q=F.shadow.map.depthTexture||F.shadow.map.texture),F.isAmbientLight)p+=j.r*H,g+=j.g*H,m+=j.b*H;else if(F.isLightProbe){for(let te=0;te<9;te++)i.probe[te].addScaledVector(F.sh.coefficients[te],H);O++}else if(F.isDirectionalLight){const te=t.get(F);if(te.color.copy(F.color).multiplyScalar(F.intensity),F.castShadow){const J=F.shadow,he=n.get(F);he.shadowIntensity=J.intensity,he.shadowBias=J.bias,he.shadowNormalBias=J.normalBias,he.shadowRadius=J.radius,he.shadowMapSize=J.mapSize,i.directionalShadow[v]=he,i.directionalShadowMap[v]=q,i.directionalShadowMatrix[v]=F.shadow.matrix,C++}i.directional[v]=te,v++}else if(F.isSpotLight){const te=t.get(F);te.position.setFromMatrixPosition(F.matrixWorld),te.color.copy(j).multiplyScalar(H),te.distance=Y,te.coneCos=Math.cos(F.angle),te.penumbraCos=Math.cos(F.angle*(1-F.penumbra)),te.decay=F.decay,i.spot[w]=te;const J=F.shadow;if(F.map&&(i.spotLightMap[P]=F.map,P++,J.updateMatrices(F),F.castShadow&&N++),i.spotLightMatrix[w]=J.matrix,F.castShadow){const he=n.get(F);he.shadowIntensity=J.intensity,he.shadowBias=J.bias,he.shadowNormalBias=J.normalBias,he.shadowRadius=J.radius,he.shadowMapSize=J.mapSize,i.spotShadow[w]=he,i.spotShadowMap[w]=q,E++}w++}else if(F.isRectAreaLight){const te=t.get(F);te.color.copy(j).multiplyScalar(H),te.halfWidth.set(F.width*.5,0,0),te.halfHeight.set(0,F.height*.5,0),i.rectArea[S]=te,S++}else if(F.isPointLight){const te=t.get(F);if(te.color.copy(F.color).multiplyScalar(F.intensity),te.distance=F.distance,te.decay=F.decay,F.castShadow){const J=F.shadow,he=n.get(F);he.shadowIntensity=J.intensity,he.shadowBias=J.bias,he.shadowNormalBias=J.normalBias,he.shadowRadius=J.radius,he.shadowMapSize=J.mapSize,he.shadowCameraNear=J.camera.near,he.shadowCameraFar=J.camera.far,i.pointShadow[b]=he,i.pointShadowMap[b]=q,i.pointShadowMatrix[b]=F.shadow.matrix,A++}i.point[b]=te,b++}else if(F.isHemisphereLight){const te=t.get(F);te.skyColor.copy(F.color).multiplyScalar(H),te.groundColor.copy(F.groundColor).multiplyScalar(H),i.hemi[_]=te,_++}}S>0&&(e.has("OES_texture_float_linear")===!0?(i.rectAreaLTC1=ke.LTC_FLOAT_1,i.rectAreaLTC2=ke.LTC_FLOAT_2):(i.rectAreaLTC1=ke.LTC_HALF_1,i.rectAreaLTC2=ke.LTC_HALF_2)),i.ambient[0]=p,i.ambient[1]=g,i.ambient[2]=m;const T=i.hash;(T.directionalLength!==v||T.pointLength!==b||T.spotLength!==w||T.rectAreaLength!==S||T.hemiLength!==_||T.numDirectionalShadows!==C||T.numPointShadows!==A||T.numSpotShadows!==E||T.numSpotMaps!==P||T.numLightProbes!==O)&&(i.directional.length=v,i.spot.length=w,i.rectArea.length=S,i.point.length=b,i.hemi.length=_,i.directionalShadow.length=C,i.directionalShadowMap.length=C,i.pointShadow.length=A,i.pointShadowMap.length=A,i.spotShadow.length=E,i.spotShadowMap.length=E,i.directionalShadowMatrix.length=C,i.pointShadowMatrix.length=A,i.spotLightMatrix.length=E+P-N,i.spotLightMap.length=P,i.numSpotLightShadowsWithMaps=N,i.numLightProbes=O,T.directionalLength=v,T.pointLength=b,T.spotLength=w,T.rectAreaLength=S,T.hemiLength=_,T.numDirectionalShadows=C,T.numPointShadows=A,T.numSpotShadows=E,T.numSpotMaps=P,T.numLightProbes=O,i.version=RE++)}function h(f,p){let g=0,m=0,v=0,b=0,w=0;const S=p.matrixWorldInverse;for(let _=0,C=f.length;_<C;_++){const A=f[_];if(A.isDirectionalLight){const E=i.directional[g];E.direction.setFromMatrixPosition(A.matrixWorld),r.setFromMatrixPosition(A.target.matrixWorld),E.direction.sub(r),E.direction.transformDirection(S),g++}else if(A.isSpotLight){const E=i.spot[v];E.position.setFromMatrixPosition(A.matrixWorld),E.position.applyMatrix4(S),E.direction.setFromMatrixPosition(A.matrixWorld),r.setFromMatrixPosition(A.target.matrixWorld),E.direction.sub(r),E.direction.transformDirection(S),v++}else if(A.isRectAreaLight){const E=i.rectArea[b];E.position.setFromMatrixPosition(A.matrixWorld),E.position.applyMatrix4(S),l.identity(),o.copy(A.matrixWorld),o.premultiply(S),l.extractRotation(o),E.halfWidth.set(A.width*.5,0,0),E.halfHeight.set(0,A.height*.5,0),E.halfWidth.applyMatrix4(l),E.halfHeight.applyMatrix4(l),b++}else if(A.isPointLight){const E=i.point[m];E.position.setFromMatrixPosition(A.matrixWorld),E.position.applyMatrix4(S),m++}else if(A.isHemisphereLight){const E=i.hemi[w];E.direction.setFromMatrixPosition(A.matrixWorld),E.direction.transformDirection(S),w++}}}return{setup:u,setupView:h,state:i}}function cv(e){const t=new PE(e),n=[],i=[],r=[];function o(m){g.camera=m,n.length=0,i.length=0,r.length=0}function l(m){n.push(m)}function u(m){i.push(m)}function h(m){r.push(m)}function f(){t.setup(n)}function p(m){t.setupView(n,m)}const g={lightsArray:n,shadowsArray:i,lightProbeGridArray:r,camera:null,lights:t,transmissionRenderTarget:{},textureUnits:0};return{init:o,state:g,setupLights:f,setupLightsView:p,pushLight:l,pushShadow:u,pushLightProbeGrid:h}}function NE(e){let t=new WeakMap;function n(r,o=0){const l=t.get(r);let u;return l===void 0?(u=new cv(e),t.set(r,[u])):o>=l.length?(u=new cv(e),l.push(u)):u=l[o],u}function i(){t=new WeakMap}return{get:n,dispose:i}}var LE=`void main() {
4066	gl_Position = vec4( position, 1.0 );
4067}`,DE=`uniform sampler2D shadow_pass;
4068uniform vec2 resolution;
4069uniform float radius;
4070void main() {
4071	const float samples = float( VSM_SAMPLES );
4072	float mean = 0.0;
4073	float squared_mean = 0.0;
4074	float uvStride = samples <= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 );
4075	float uvStart = samples <= 1.0 ? 0.0 : - 1.0;
4076	for ( float i = 0.0; i < samples; i ++ ) {
4077		float uvOffset = uvStart + i * uvStride;
4078		#ifdef HORIZONTAL_PASS
4079			vec2 distribution = texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ).rg;
4080			mean += distribution.x;
4081			squared_mean += distribution.y * distribution.y + distribution.x * distribution.x;
4082		#else
4083			float depth = texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ).r;
4084			mean += depth;
4085			squared_mean += depth * depth;
4086		#endif
4087	}
4088	mean = mean / samples;
4089	squared_mean = squared_mean / samples;
4090	float std_dev = sqrt( max( 0.0, squared_mean - mean * mean ) );
4091	gl_FragColor = vec4( mean, std_dev, 0.0, 1.0 );
4092}`,UE=[new k(1,0,0),new k(-1,0,0),new k(0,1,0),new k(0,-1,0),new k(0,0,1),new k(0,0,-1)],OE=[new k(0,-1,0),new k(0,-1,0),new k(0,0,1),new k(0,0,-1),new k(0,-1,0),new k(0,-1,0)],uv=new _t,_c=new k,lp=new k;function FE(e,t,n){let i=new fo;const r=new ye,o=new ye,l=new tn,u=new M0,h=new w0,f={},p=n.maxTextureSize,g={0:1,1:0,2:2}
vendor: 4,372 bytes, line 4092
4092,m=new Si({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new ye},radius:{value:4}},vertexShader:LE,fragmentShader:DE}),v=m.clone();v.defines.HORIZONTAL_PASS=1;const b=new At;b.setAttribute("position",new Jt(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const w=new Cn(b,m),S=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=1;let _=this.type;this.render=function(N,O,T){if(S.enabled===!1||S.autoUpdate===!1&&S.needsUpdate===!1||N.length===0)return;this.type===2&&(Ue("WebGLShadowMap: PCFSoftShadowMap has been deprecated. Using PCFShadowMap instead."),this.type=1);const R=e.getRenderTarget(),B=e.getActiveCubeFace(),F=e.getActiveMipmapLevel(),j=e.state;j.setBlending(0),j.buffers.depth.getReversed()===!0?j.buffers.color.setClear(0,0,0,0):j.buffers.color.setClear(1,1,1,1),j.buffers.depth.setTest(!0),j.setScissorTest(!1);const H=_!==this.type;H&&O.traverse(function(Y){Y.material&&(Array.isArray(Y.material)?Y.material.forEach(q=>q.needsUpdate=!0):Y.material.needsUpdate=!0)});for(let Y=0,q=N.length;Y<q;Y++){const te=N[Y],J=te.shadow;if(J===void 0){Ue("WebGLShadowMap:",te,"has no shadow.");continue}if(J.autoUpdate===!1&&J.needsUpdate===!1)continue;r.copy(J.mapSize);const he=J.getFrameExtents();r.multiply(he),o.copy(J.mapSize),(r.x>p||r.y>p)&&(r.x>p&&(o.x=Math.floor(p/he.x),r.x=o.x*he.x,J.mapSize.x=o.x),r.y>p&&(o.y=Math.floor(p/he.y),r.y=o.y*he.y,J.mapSize.y=o.y));const ue=e.state.buffers.depth.getReversed();if(J.camera._reversedDepth=ue,J.map===null||H===!0){if(J.map!==null&&(J.map.depthTexture!==null&&(J.map.depthTexture.dispose(),J.map.depthTexture=null),J.map.dispose()),this.type===3){if(te.isPointLight){Ue("WebGLShadowMap: VSM shadow maps are not supported for PointLights. Use PCF or BasicShadowMap instead.");continue}J.map=new Fi(r.x,r.y,{format:Nc,type:Hs,minFilter:mn,magFilter:mn,generateMipmaps:!1}),J.map.texture.name=te.name+".shadowMap",J.map.depthTexture=new po(r.x,r.y,rs),J.map.depthTexture.name=te.name+".shadowMapDepth",J.map.depthTexture.format=Tl,J.map.depthTexture.compareFunction=null,J.map.depthTexture.minFilter=In,J.map.depthTexture.magFilter=In}else te.isPointLight?(J.map=new L0(r.x),J.map.depthTexture=new Qy(r.x,is)):(J.map=new Fi(r.x,r.y),J.map.depthTexture=new po(r.x,r.y,is)),J.map.depthTexture.name=te.name+".shadowMap",J.map.depthTexture.format=Tl,this.type===1?(J.map.depthTexture.compareFunction=ue?518:515,J.map.depthTexture.minFilter=mn,J.map.depthTexture.magFilter=mn):(J.map.depthTexture.compareFunction=null,J.map.depthTexture.minFilter=In,J.map.depthTexture.magFilter=In);J.camera.updateProjectionMatrix()}const ce=J.map.isWebGLCubeRenderTarget?6:1;for(let me=0;me<ce;me++){if(J.map.isWebGLCubeRenderTarget)e.setRenderTarget(J.map,me),e.clear();else{me===0&&(e.setRenderTarget(J.map),e.clear());const _e=J.getViewport(me);l.set(o.x*_e.x,o.y*_e.y,o.x*_e.z,o.y*_e.w),j.viewport(l)}if(te.isPointLight){const _e=J.camera,ht=J.matrix,tt=te.distance||_e.far;tt!==_e.far&&(_e.far=tt,_e.updateProjectionMatrix()),_c.setFromMatrixPosition(te.matrixWorld),_e.position.copy(_c),lp.copy(_e.position),lp.add(UE[me]),_e.up.copy(OE[me]),_e.lookAt(lp),_e.updateMatrixWorld(),ht.makeTranslation(-_c.x,-_c.y,-_c.z),uv.multiplyMatrices(_e.projectionMatrix,_e.matrixWorldInverse),J._frustum.setFromProjectionMatrix(uv,_e.coordinateSystem,_e.reversedDepth)}else J.updateMatrices(te);i=J.getFrustum(),E(O,T,J.camera,te,this.type)}J.isPointLightShadow!==!0&&this.type===3&&C(J,T),J.needsUpdate=!1}_=this.type,S.needsUpdate=!1,e.setRenderTarget(R,B,F)};function C(N,O){const T=t.update(w);m.defines.VSM_SAMPLES!==N.blurSamples&&(m.defines.VSM_SAMPLES=N.blurSamples,v.defines.VSM_SAMPLES=N.blurSamples,m.needsUpdate=!0,v.needsUpdate=!0),N.mapPass===null&&(N.mapPass=new Fi(r.x,r.y,{format:Nc,type:Hs})),m.uniforms.shadow_pass.value=N.map.depthTexture,m.uniforms.resolution.value=N.mapSize,m.uniforms.radius.value=N.radius,e.setRenderTarget(N.mapPass),e.clear(),e.renderBufferDirect(O,null,T,m,w,null),v.uniforms.shadow_pass.value=N.mapPass.texture,v.uniforms.resolution.value=N.mapSize,v.uniforms.radius.value=N.radius,e.setRenderTarget(N.map),e.clear(),e.renderBufferDirect(O,null,T,v,w,null)}function A(N,O,T,R){let B=null;const F=T.isPointLight===!0?N.customDistanceMaterial:N.customDepthMaterial;if(F!==void 0)B=F;else if(B=T.isPointLight===!0?h:u,e.localClippingEnabled&&O.clipSh
vendor: 5,166 bytes, line 4092
4092adows===!0&&Array.isArray(O.clippingPlanes)&&O.clippingPlanes.length!==0||O.displacementMap&&O.displacementScale!==0||O.alphaMap&&O.alphaTest>0||O.map&&O.alphaTest>0||O.alphaToCoverage===!0){const j=B.uuid,H=O.uuid;let Y=f[j];Y===void 0&&(Y={},f[j]=Y);let q=Y[H];q===void 0&&(q=B.clone(),Y[H]=q,O.addEventListener("dispose",P)),B=q}if(B.visible=O.visible,B.wireframe=O.wireframe,R===3?B.side=O.shadowSide!==null?O.shadowSide:O.side:B.side=O.shadowSide!==null?O.shadowSide:g[O.side],B.alphaMap=O.alphaMap,B.alphaTest=O.alphaToCoverage===!0?.5:O.alphaTest,B.map=O.map,B.clipShadows=O.clipShadows,B.clippingPlanes=O.clippingPlanes,B.clipIntersection=O.clipIntersection,B.displacementMap=O.displacementMap,B.displacementScale=O.displacementScale,B.displacementBias=O.displacementBias,B.wireframeLinewidth=O.wireframeLinewidth,B.linewidth=O.linewidth,T.isPointLight===!0&&B.isMeshDistanceMaterial===!0){const j=e.properties.get(B);j.light=T}return B}function E(N,O,T,R,B){if(N.visible===!1)return;if(N.layers.test(O.layers)&&(N.isMesh||N.isLine||N.isPoints)&&(N.castShadow||N.receiveShadow&&B===3)&&(!N.frustumCulled||i.intersectsObject(N))){N.modelViewMatrix.multiplyMatrices(T.matrixWorldInverse,N.matrixWorld);const j=t.update(N),H=N.material;if(Array.isArray(H)){const Y=j.groups;for(let q=0,te=Y.length;q<te;q++){const J=Y[q],he=H[J.materialIndex];if(he&&he.visible){const ue=A(N,he,R,B);N.onBeforeShadow(e,N,O,T,j,ue,J),e.renderBufferDirect(T,null,j,ue,N,J),N.onAfterShadow(e,N,O,T,j,ue,J)}}}else if(H.visible){const Y=A(N,H,R,B);N.onBeforeShadow(e,N,O,T,j,Y,null),e.renderBufferDirect(T,null,j,Y,N,null),N.onAfterShadow(e,N,O,T,j,Y,null)}}const F=N.children;for(let j=0,H=F.length;j<H;j++)E(F[j],O,T,R,B)}function P(N){N.target.removeEventListener("dispose",P);for(const O in f){const T=f[O],R=N.target.uuid;R in T&&(T[R].dispose(),delete T[R])}}}function kE(e,t){function n(){let W=!1;const le=new tn;let ve=null;const Be=new tn(0,0,0,0);return{setMask:function(je){ve!==je&&!W&&(e.colorMask(je,je,je,je),ve=je)},setLocked:function(je){W=je},setClear:function(je,pe,Oe,at,sn){sn===!0&&(je*=at,pe*=at,Oe*=at),le.set(je,pe,Oe,at),Be.equals(le)===!1&&(e.clearColor(je,pe,Oe,at),Be.copy(le))},reset:function(){W=!1,ve=null,Be.set(-1,0,0,0)}}}function i(){let W=!1,le=!1,ve=null,Be=null,je=null;return{setReversed:function(pe){if(le!==pe){const Oe=t.get("EXT_clip_control");pe?Oe.clipControlEXT(Oe.LOWER_LEFT_EXT,Oe.ZERO_TO_ONE_EXT):Oe.clipControlEXT(Oe.LOWER_LEFT_EXT,Oe.NEGATIVE_ONE_TO_ONE_EXT),le=pe;const at=je;je=null,this.setClear(at)}},getReversed:function(){return le},setTest:function(pe){pe?Ce(e.DEPTH_TEST):We(e.DEPTH_TEST)},setMask:function(pe){ve!==pe&&!W&&(e.depthMask(pe),ve=pe)},setFunc:function(pe){if(le&&(pe=NM[pe]),Be!==pe){switch(pe){case 0:e.depthFunc(e.NEVER);break;case 1:e.depthFunc(e.ALWAYS);break;case 2:e.depthFunc(e.LESS);break;case 3:e.depthFunc(e.LEQUAL);break;case 4:e.depthFunc(e.EQUAL);break;case 5:e.depthFunc(e.GEQUAL);break;case 6:e.depthFunc(e.GREATER);break;case 7:e.depthFunc(e.NOTEQUAL);break;default:e.depthFunc(e.LEQUAL)}Be=pe}},setLocked:function(pe){W=pe},setClear:function(pe){je!==pe&&(je=pe,le&&(pe=1-pe),e.clearDepth(pe))},reset:function(){W=!1,ve=null,Be=null,je=null,le=!1}}}function r(){let W=!1,le=null,ve=null,Be=null,je=null,pe=null,Oe=null,at=null,sn=null;return{setTest:function(Lt){W||(Lt?Ce(e.STENCIL_TEST):We(e.STENCIL_TEST))},setMask:function(Lt){le!==Lt&&!W&&(e.stencilMask(Lt),le=Lt)},setFunc:function(Lt,xn,Bn){(ve!==Lt||Be!==xn||je!==Bn)&&(e.stencilFunc(Lt,xn,Bn),ve=Lt,Be=xn,je=Bn)},setOp:function(Lt,xn,Bn){(pe!==Lt||Oe!==xn||at!==Bn)&&(e.stencilOp(Lt,xn,Bn),pe=Lt,Oe=xn,at=Bn)},setLocked:function(Lt){W=Lt},setClear:function(Lt){sn!==Lt&&(e.clearStencil(Lt),sn=Lt)},reset:function(){W=!1,le=null,ve=null,Be=null,je=null,pe=null,Oe=null,at=null,sn=null}}}const o=new n,l=new i,u=new r,h=new WeakMap,f=new WeakMap;let p={},g={},m={},v=new WeakMap,b=[],w=null,S=!1,_=null,C=null,A=null,E=null,P=null,N=null,O=null,T=new Xe(0,0,0),R=0,B=!1,F=null,j=null,H=null,Y=null,q=null;const te=e.getParameter(e.MAX_COMBINED_TEXTURE_IMAGE_UNITS);let J=!1,he=0;const ue=e.getParameter(e.VERSION);ue.indexOf("WebGL")!==-1?(he=parseFloat(/^WebGL (\d)/.exec(ue)[1]),J=he>=1):ue.indexOf("OpenGL ES")!==-1&&(he=parseFloat(/^OpenGL ES (\d)/.exec(ue)[1]),J=he>=2);let ce=null,me={};const _e=e.getParameter(e.SCISSOR_BOX),ht=e.getParameter(e.VIEWPORT),tt=new tn().fromArray(_e),re=new tn().fromArray(ht);function ge(W,le,ve,Be){const je=new Uint8Array(4),pe=e.createTexture();e.bindTexture(W,pe),e.texParameteri(W,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(W,e.TEXTURE_MAG_FILTER,e.NEAREST);for(let Oe=0;Oe<ve;Oe++)W===e.TEXTURE_3D||W===e.TEXTURE_2D_ARRAY?e.texImage3D(le,0,e.RGBA,1,1,Be,0,e.RGBA,e.UNSIGNED_BYTE,je):e.texImage2D(le+Oe,0,e.RGBA,1,1,0,e.RGBA,e.UNSIGNED_BYTE,je);return pe}const Ie={};Ie[e.TEXTURE_2D]=ge(e.TEXTURE_2D,e.TEXTURE_2D,1),Ie[e.TEXTURE_CUBE_MAP]=ge(e.TEXTURE_CUBE_MAP,e.TEXTURE_CUBE_MAP_POSITIVE_X,6),Ie[e.TEXTURE_2D_ARRAY]=ge(e.TEXTURE_2D_ARRAY,e.TEXTURE_2D_ARRAY,1,1),Ie[e.TEXTURE_3D]=ge(e.TEXTURE_3D,e.TEXTURE_3D,1,1),o.setClear(0,0,0,1),l.setClear(1),u.setClear(0),Ce(e.DEPTH_TEST),l.setFu
4092nc(3),Le(!1),Ye(1),Ce(e.CULL_FACE),Ae(0);function Ce(W){p[W]!==!0&&(e.enable(W),p[W]=!0)}function We(W){p[W]!==!1&&(e.disable(W),p[W]=!1)}function et(W,le){return m[W]!==le?(e.bindFramebuffer(W,le),m[W]=le,W===e.DRAW_FRAMEBUFFER&&(m[e.FRAMEBUFFER]=le),W===e.FRAMEBUFFER&&(m[e.DRAW_FRAMEBUFFER]=le),!0):!1}function Ze(W,le){let ve=b,Be=!1;if(W){ve=v.get(le),ve===void 0&&(ve=[],v.set(le,ve));const je=W.textures;if(ve.length!==je.length||ve[0]!==e.COLOR_ATTACHMENT0){for(let pe=0,Oe=je.length;pe<Oe;pe++)ve[pe]=e.COLOR_ATTACHMENT0+pe;ve.length=je.length,Be=!0}}else ve[0]!==e.BACK&&(ve[0]=e.BACK,Be=!0);Be&&e.drawBuffers(ve)}function ct(W){return w!==W?(e.useProgram(W),w=W,!0):!1}const oe={100:e.FUNC_ADD,101:e.FUNC_SUBTRACT,102:e.FUNC_REVERSE_SUBTRACT};oe[103]=e.MIN,oe[104]=e.MAX;const Se={200:e.ZERO,201:e.ONE,202:e.SRC_COLOR,204:e.SRC_ALPHA,210:e.SRC_ALPHA_SATURATE,208:e.DST_COLOR,206:e.DST_ALPHA,203:e.ONE_MINUS_SRC_COLOR,205:e.ONE_MINUS_SRC_ALPHA,209:e.ONE_MINUS_DST_COLOR,207:e.ONE_MINUS_DST_ALPHA,211:e.CONSTANT_COLOR,212:e.ONE_MINUS_CONSTANT_COLOR,213:e.CONSTANT_ALPHA,214:e.ONE_MINUS_CONSTANT_ALPHA};function Ae(W,le,ve,Be,je,pe,Oe,at,sn,Lt){if(W===0){S===!0&&(We(e.BLEND),S=!1);return}if(S===!1&&(Ce(e.BLEND),S=!0),W!==5){if(W!==_||Lt!==B){if((C!==100||P!==100)&&(e.blendEquation(e.FUNC_ADD),C=100,P=100),Lt)switch(W){case 1:e.blendFuncSeparate(e.ONE,e.ONE_MINUS_SRC_ALPHA,e.ONE,e.ONE_MINUS_SRC_ALPHA);break;case 2:e.blendFunc(e.ONE,e.ONE);break;case 3:e.blendFuncSeparate(e.ZERO,e.ONE_MINUS_SRC_COLOR,e.ZERO,e.ONE);break;case 4:e.blendFuncSeparate(e.DST_COLOR,e.ONE_MINUS_SRC_ALPHA,e.ZERO,e.ONE);break;default:rt("WebGLState: Invalid blending: ",W);break}else switch(W){case 1:e.blendFuncSeparate(e.SRC_ALPHA,e.ONE_MINUS_SRC_ALPHA,e.ONE,e.ONE_MINUS_SRC_ALPHA);break;case 2:e.blendFuncSeparate(e.SRC_ALPHA,e.ONE,e.ONE,e.ONE);break;case 3:rt("WebGLState: SubtractiveBlending requires material.premultipliedAlpha = true");break;case 4:rt("WebGLState: MultiplyBlending requires material.premultipliedAlpha = true");break;default:rt("WebGLState: Invalid blending: ",W);break}A=null,E=null,N=null,O=null,T.set(0,0,0),R=0,_=W,B=Lt}return}je=je||le,pe=pe||ve,Oe=Oe||Be,(le!==C||je!==P)&&(e.blendEquationSeparate(oe[le],oe[je]),C=le,P=je),(ve!==A||Be!==E||pe!==N||Oe!==O)&&(e.blendFuncSeparate(Se[ve],Se[Be],Se[pe],Se[Oe]),A=ve,E=Be,N=pe,O=Oe),(at.equals(T)===!1||sn!==R)&&(e.blendColor(at.r,at.g,at.b,sn),T.copy(at),R=sn),_=W,B=!1}function De(W,le){W.side===2?We(e.CULL_FACE):Ce(e.CULL_FACE);let ve=W.side===1;le&&(ve=!ve),Le(ve),W.blending===1&&W.transparent===!1?Ae(0):Ae(W.blending,W.blendEquation,W.blendSrc,W.blendDst,W.blendEquationAlpha,W.blendSrcAlpha,W.blendDstAlpha,W.blendColor,W.blendAlpha,W.premultipliedAlpha),l.setFunc(W.depthFunc),l.setTest(W.depthTest),l.setMask(W.depthWrite),o.setMask(W.colorWrite);const Be=W.stencilWrite;u.setTest(Be),Be&&(u.setMask(W.stencilWriteMask),u.setFunc(W.stencilFunc,W.stencilRef,W.stencilFuncMask),u.setOp(W.stencilFail,W.stencilZFail,W.stencilZPass)),lt(W.polygonOffset,W.polygonOffsetFactor,W.polygonOffsetUnits),W.alphaToCoverage===!0?Ce(e.SAMPLE_ALPHA_TO_COVERAGE):We(e.SAMPLE_ALPHA_TO_COVERAGE)}function Le(W){F!==W&&(W?e.frontFace(e.CW):e.frontFace(e.CCW),F=W)}function Ye(W){W!==0?(Ce(e.CULL_FACE),W!==j&&(W===1?e.cullFace(e.BACK):W===2?e.cullFace(e.FRONT):e.cullFace(e.FRONT_AND_BACK))):We(e.CULL_FACE),j=W}function Je(W){W!==H&&(J&&e.lineWidth(W),H=W)}function lt(W,le,ve){W?(Ce(e.POLYGON_OFFSET_FILL),(Y!==le||q!==ve)&&(Y=le,q=ve,l.getReversed()&&(le=-le),e.polygonOffset(le,ve))):We(e.POLYGON_OFFSET_FILL)}function ut(W){W?Ce(e.SCISSOR_TEST):We(e.SCISSOR_TEST)}function z(W){W===void 0&&(W=e.TEXTURE0+te-1),ce!==W&&(e.activeTexture(W),ce=W)}function vt(W,le,ve){ve===void 0&&(ce===null?ve=e.TEXTURE0+te-1:ve=ce);let Be=me[ve];Be===void 0&&(Be={type:void 0,texture:void 0},me[ve]=Be),(Be.type!==W||Be.texture!==le)&&(ce!==ve&&(e.activeTexture(ve),ce=ve),e.bindTexture(W,le||Ie[W]),Be.type=W,Be.texture=le)}function bt(){const W=me[ce];W!==void 0&&W.type!==void 0&&(e.bindTexture(W.type,null),W.type=void 0,W.texture=void 0)}
vendor: 4,104 bytes, line 4092
4092function xt(){try{e.compressedTexImage2D(...arguments)}catch(W){rt("WebGLState:",W)}}function U(){try{e.compressedTexImage3D(...arguments)}catch(W){rt("WebGLState:",W)}}function I(){try{e.texSubImage2D(...arguments)}catch(W){rt("WebGLState:",W)}}function G(){try{e.texSubImage3D(...arguments)}catch(W){rt("WebGLState:",W)}}function ee(){try{e.compressedTexSubImage2D(...arguments)}catch(W){rt("WebGLState:",W)}}function fe(){try{e.compressedTexSubImage3D(...arguments)}catch(W){rt("WebGLState:",W)}}function we(){try{e.texStorage2D(...arguments)}catch(W){rt("WebGLState:",W)}}function Ne(){try{e.texStorage3D(...arguments)}catch(W){rt("WebGLState:",W)}}function X(){try{e.texImage2D(...arguments)}catch(W){rt("WebGLState:",W)}}function Ee(){try{e.texImage3D(...arguments)}catch(W){rt("WebGLState:",W)}}function ze(W){return g[W]!==void 0?g[W]:e.getParameter(W)}function qe(W,le){g[W]!==le&&(e.pixelStorei(W,le),g[W]=le)}function xe(W){tt.equals(W)===!1&&(e.scissor(W.x,W.y,W.z,W.w),tt.copy(W))}function Ke(W){re.equals(W)===!1&&(e.viewport(W.x,W.y,W.z,W.w),re.copy(W))}function nt(W,le){let ve=f.get(le);ve===void 0&&(ve=new WeakMap,f.set(le,ve));let Be=ve.get(W);Be===void 0&&(Be=e.getUniformBlockIndex(le,W.name),ve.set(W,Be))}function ft(W,le){const ve=f.get(le).get(W);h.get(le)!==ve&&(e.uniformBlockBinding(le,ve,W.__bindingPointIndex),h.set(le,ve))}function Rt(){e.disable(e.BLEND),e.disable(e.CULL_FACE),e.disable(e.DEPTH_TEST),e.disable(e.POLYGON_OFFSET_FILL),e.disable(e.SCISSOR_TEST),e.disable(e.STENCIL_TEST),e.disable(e.SAMPLE_ALPHA_TO_COVERAGE),e.blendEquation(e.FUNC_ADD),e.blendFunc(e.ONE,e.ZERO),e.blendFuncSeparate(e.ONE,e.ZERO,e.ONE,e.ZERO),e.blendColor(0,0,0,0),e.colorMask(!0,!0,!0,!0),e.clearColor(0,0,0,0),e.depthMask(!0),e.depthFunc(e.LESS),l.setReversed(!1),e.clearDepth(1),e.stencilMask(4294967295),e.stencilFunc(e.ALWAYS,0,4294967295),e.stencilOp(e.KEEP,e.KEEP,e.KEEP),e.clearStencil(0),e.cullFace(e.BACK),e.frontFace(e.CCW),e.polygonOffset(0,0),e.activeTexture(e.TEXTURE0),e.bindFramebuffer(e.FRAMEBUFFER,null),e.bindFramebuffer(e.DRAW_FRAMEBUFFER,null),e.bindFramebuffer(e.READ_FRAMEBUFFER,null),e.useProgram(null),e.lineWidth(1),e.scissor(0,0,e.canvas.width,e.canvas.height),e.viewport(0,0,e.canvas.width,e.canvas.height),e.pixelStorei(e.PACK_ALIGNMENT,4),e.pixelStorei(e.UNPACK_ALIGNMENT,4),e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,!1),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),e.pixelStorei(e.UNPACK_COLORSPACE_CONVERSION_WEBGL,e.BROWSER_DEFAULT_WEBGL),e.pixelStorei(e.PACK_ROW_LENGTH,0),e.pixelStorei(e.PACK_SKIP_PIXELS,0),e.pixelStorei(e.PACK_SKIP_ROWS,0),e.pixelStorei(e.UNPACK_ROW_LENGTH,0),e.pixelStorei(e.UNPACK_IMAGE_HEIGHT,0),e.pixelStorei(e.UNPACK_SKIP_PIXELS,0),e.pixelStorei(e.UNPACK_SKIP_ROWS,0),e.pixelStorei(e.UNPACK_SKIP_IMAGES,0),p={},g={},ce=null,me={},m={},v=new WeakMap,b=[],w=null,S=!1,_=null,C=null,A=null,E=null,P=null,N=null,O=null,T=new Xe(0,0,0),R=0,B=!1,F=null,j=null,H=null,Y=null,q=null,tt.set(0,0,e.canvas.width,e.canvas.height),re.set(0,0,e.canvas.width,e.canvas.height),o.reset(),l.reset(),u.reset()}return{buffers:{color:o,depth:l,stencil:u},enable:Ce,disable:We,bindFramebuffer:et,drawBuffers:Ze,useProgram:ct,setBlending:Ae,setMaterial:De,setFlipSided:Le,setCullFace:Ye,setLineWidth:Je,setPolygonOffset:lt,setScissorTest:ut,activeTexture:z,bindTexture:vt,unbindTexture:bt,compressedTexImage2D:xt,compressedTexImage3D:U,texImage2D:X,texImage3D:Ee,pixelStorei:qe,getParameter:ze,updateUBOMapping:nt,uniformBlockBinding:ft,texStorage2D:we,texStorage3D:Ne,texSubImage2D:I,texSubImage3D:G,compressedTexSubImage2D:ee,compressedTexSubImage3D:fe,scissor:xe,viewport:Ke,reset:Rt}}function BE(e,t,n,i,r,o,l){const u=t.has("WEBGL_multisampled_render_to_texture")?t.get("WEBGL_multisampled_render_to_texture"):null,h=typeof navigator>"u"?!1:/OculusBrowser/g.test(navigator.userAgent),f=new ye,p=new WeakMap,g=new Set;let m;const v=new WeakMap;let b=!1;try{b=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")!==null}catch{}function w(U,I){return b?new OffscreenCanvas(U,I):kc("canvas")}function S(U,I,G){let ee=1;const fe=xt(U);
4092if((fe.width>G||fe.height>G)&&(ee=G/Math.max(fe.width,fe.height)),ee<1)if(typeof HTMLImageElement<"u"&&U instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&U instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&U instanceof ImageBitmap||typeof VideoFrame<"u"&&U instanceof VideoFrame){const we=Math.floor(ee*fe.width),Ne=Math.floor(ee*fe.height);m===void 0&&(m=w(we,Ne));const X=I?w(we,Ne):m;return X.width=we,X.height=Ne,X.getContext("2d").drawImage(U,0,0,we,Ne),Ue("WebGLRenderer: Texture has been resized from ("+fe.width+"x"+fe.height+") to ("+we+"x"+Ne+")."),X}else return"data"in U&&Ue("WebGLRenderer: Image in DataTexture is too big ("+fe.width+"x"+fe.height+")."),U;return U}function _(U){return U.generateMipmaps}function C(U){e.generateMipmap(U)}function A(U){return U.isWebGLCubeRenderTarget?e.TEXTURE_CUBE_MAP:U.isWebGL3DRenderTarget?e.TEXTURE_3D:U.isWebGLArrayRenderTarget||U.isCompressedArrayTexture?e.TEXTURE_2D_ARRAY:e.TEXTURE_2D}function E(U,I,G,ee,fe,we=!1){if(U!==null){if(e[U]!==void 0)return e[U];Ue("WebGLRenderer: Attempt to use non-existing WebGL internal format '"+U+"'")}let Ne;ee&&(Ne=t.get("EXT_texture_norm16"),Ne||Ue("WebGLRenderer: Unable to use normalized textures without EXT_texture_norm16 extension"));let X=I;if(I===e.RED&&(G===e.FLOAT&&(X=e.R32F),G===e.HALF_FLOAT&&(X=e.R16F),G===e.UNSIGNED_BYTE&&(X=e.R8),G===e.UNSIGNED_SHORT&&Ne&&(X=Ne.R16_EXT),G===e.SHORT&&Ne&&(X=Ne.R16_SNORM_EXT)),I===e.RED_INTEGER&&(G===e.UNSIGNED_BYTE&&(X=e.R8UI),G===e.UNSIGNED_SHORT&&(X=e.R16UI),G===e.UNSIGNED_INT&&(X=e.R32UI),G===e.BYTE&&(X=e.R8I),G===e.SHORT&&(X=e.R16I),G===e.INT&&(X=e.R32I)),I===e.RG&&(G===e.FLOAT&&(X=e.RG32F),G===e.HALF_FLOAT&&(X=e.RG16F),G===e.UNSIGNED_BYTE&&(X=e.RG8),G===e.UNSIGNED_SHORT&&Ne&&(X=Ne.RG16_EXT),G===e.SHORT&&Ne&&(X=Ne.RG16_SNORM_EXT)),I===e.RG_INTEGER&&(G===e.UNSIGNED_BYTE&&(X=e.RG8UI),G===e.UNSIGNED_SHORT&&(X=e.RG16UI),G===e.UNSIGNED_INT&&(X=e.RG32UI),G===e.BYTE&&(X=e.RG8I),G===e.SHORT&&(X=e.RG16I),G===e.INT&&(X=e.RG32I)),I===e.RGB_INTEGER&&(G===e.UNSIGNED_BYTE&&(X=e.RGB8UI),G===e.UNSIGNED_SHORT&&(X=e.RGB16UI),G===e.UNSIGNED_INT&&(X=e.RGB32UI),G===e.BYTE&&(X=e.RGB8I),G===e.SHORT&&(X=e.RGB16I),G===e.INT&&(X=e.RGB32I)),I===e.RGBA_INTEGER&&(G===e.UNSIGNED_BYTE&&(X=e.RGBA8UI),G===e.UNSIGNED_SHORT&&(X=e.RGBA16UI),G===e.UNSIGNED_INT&&(X=e.RGBA32UI),G===e.BYTE&&(X=e.RGBA8I),G===e.SHORT&&(X=e.RGBA16I),G===e.INT&&(X=e.RGBA32I)),I===e.RGB&&(G===e.UNSIGNED_SHORT&&Ne&&(X=Ne.RGB16_EXT),G===e.SHORT&&Ne&&(X=Ne.RGB16_SNORM_EXT),G===e.UNSIGNED_INT_5_9_9_9_REV&&(X=e.RGB9_E5),G===e.UNSIGNED_INT_10F_11F_11F_REV&&(X=e.R11F_G11F_B10F)),I===e.RGBA){const Ee=we?Oc:Nt.getTransfer(fe);G===e.FLOAT&&(X=e.RGBA32F),G===e.HALF_FLOAT&&(X=e.RGBA16F),G===e.UNSIGNED_BYTE&&(X=Ee==="srgb"?e.SRGB8_ALPHA8:e.RGBA8),G===e.UNSIGNED_SHORT&&Ne&&(X=Ne.RGBA16_EXT),G===e.SHORT&&Ne&&(X=Ne.RGBA16_SNORM_EXT),G===e.UNSIGNED_SHORT_4_4_4_4&&(X=e.RGBA4),G===e.UNSIGNED_SHORT_5_5_5_1&&(X=e.RGB5_A1)}return(X===e.R16F||X===e.R32F||X===e.RG16F||X===e.RG32F||X===e.RGBA16F||X===e.RGBA32F)&&t.get("EXT_color_buffer_float"),X}function P(U,I){let G;return U?I===null||I===1014||I===1020?G=e.DEPTH24_STENCIL8:I===1015?G=e.DEPTH32F_STENCIL8:I===1012&&(G=e.DEPTH24_STENCIL8,Ue("DepthTexture: 16 bit depth attachment is not supported with stencil. Using 24-bit attachment.")):I===null||I===1014||I===1020?G=e.DEPTH_COMPONENT24:I===1015?G=e.DEPTH_COMPONENT32F:I===1012&&(G=e.DEPTH_COMPONENT16),G}function N(U,I){return _(U)===!0||U.isFramebufferTexture&&U.minFilter!==1003&&U.minFilter!==1006?Math.log2(Math.max(I.width,I.height))+1:U.mipmaps!==void 0&&U.mipmaps.length>0?U.mipmaps.length:U.isCompressedTexture&&Array.isArray(U.image)?I.mipmaps.length:1}function O(U){const I=U.target;I.removeEventListener("dispose",O),R(I),I.isVideoTexture&&p.delete(I),I.isHTMLTexture&&g.delete(I)}function T(U){const I=U.target;I.removeEventListener("dispose",T),F(I)}function R(U){const I=i.get(U);if(I.__webglInit===void 0)return;const G=U.source,ee=v.get(G);if(ee){const fe=ee[I.__cacheKey];fe.usedTimes--,fe.usedTimes===0&&B(U),Object.keys(ee).length===0&&v.delete(G)}i.remove(U)}function B(U){const I=i.get(U);e.deleteTexture(I.__webglTexture);const G=U.source,ee=v.get(G);delete ee[I.__cacheKey],l.memory.textures--}function F(U){const I=i.get(U);if(U.depthTexture&&(U.depthTexture.dispose(),i.remove(U.depthTexture)),U.isWebGLCubeRen
vendor: 4,633 bytes, line 4092
4092derTarget)for(let ee=0;ee<6;ee++){if(Array.isArray(I.__webglFramebuffer[ee]))for(let fe=0;fe<I.__webglFramebuffer[ee].length;fe++)e.deleteFramebuffer(I.__webglFramebuffer[ee][fe]);else e.deleteFramebuffer(I.__webglFramebuffer[ee]);I.__webglDepthbuffer&&e.deleteRenderbuffer(I.__webglDepthbuffer[ee])}else{if(Array.isArray(I.__webglFramebuffer))for(let ee=0;ee<I.__webglFramebuffer.length;ee++)e.deleteFramebuffer(I.__webglFramebuffer[ee]);else e.deleteFramebuffer(I.__webglFramebuffer);if(I.__webglDepthbuffer&&e.deleteRenderbuffer(I.__webglDepthbuffer),I.__webglMultisampledFramebuffer&&e.deleteFramebuffer(I.__webglMultisampledFramebuffer),I.__webglColorRenderbuffer)for(let ee=0;ee<I.__webglColorRenderbuffer.length;ee++)I.__webglColorRenderbuffer[ee]&&e.deleteRenderbuffer(I.__webglColorRenderbuffer[ee]);I.__webglDepthRenderbuffer&&e.deleteRenderbuffer(I.__webglDepthRenderbuffer)}const G=U.textures;for(let ee=0,fe=G.length;ee<fe;ee++){const we=i.get(G[ee]);we.__webglTexture&&(e.deleteTexture(we.__webglTexture),l.memory.textures--),i.remove(G[ee])}i.remove(U)}let j=0;function H(){j=0}function Y(){return j}function q(U){j=U}function te(){const U=j;return U>=r.maxTextures&&Ue("WebGLTextures: Trying to use "+U+" texture units while this GPU supports only "+r.maxTextures),j+=1,U}function J(U){const I=[];return I.push(U.wrapS),I.push(U.wrapT),I.push(U.wrapR||0),I.push(U.magFilter),I.push(U.minFilter),I.push(U.anisotropy),I.push(U.internalFormat),I.push(U.format),I.push(U.type),I.push(U.generateMipmaps),I.push(U.premultiplyAlpha),I.push(U.flipY),I.push(U.unpackAlignment),I.push(U.colorSpace),I.join()}function he(U,I){const G=i.get(U);if(U.isVideoTexture&&vt(U),U.isRenderTargetTexture===!1&&U.isExternalTexture!==!0&&U.version>0&&G.__version!==U.version){const ee=U.image;if(ee===null)Ue("WebGLRenderer: Texture marked for update but no image data found.");else if(ee.complete===!1)Ue("WebGLRenderer: Texture marked for update but image is incomplete");else{We(G,U,I);return}}else U.isExternalTexture&&(G.__webglTexture=U.sourceTexture?U.sourceTexture:null);n.bindTexture(e.TEXTURE_2D,G.__webglTexture,e.TEXTURE0+I)}function ue(U,I){const G=i.get(U);if(U.isRenderTargetTexture===!1&&U.version>0&&G.__version!==U.version){We(G,U,I);return}else U.isExternalTexture&&(G.__webglTexture=U.sourceTexture?U.sourceTexture:null);n.bindTexture(e.TEXTURE_2D_ARRAY,G.__webglTexture,e.TEXTURE0+I)}function ce(U,I){const G=i.get(U);if(U.isRenderTargetTexture===!1&&U.version>0&&G.__version!==U.version){We(G,U,I);return}n.bindTexture(e.TEXTURE_3D,G.__webglTexture,e.TEXTURE0+I)}function me(U,I){const G=i.get(U);if(U.isCubeDepthTexture!==!0&&U.version>0&&G.__version!==U.version){et(G,U,I);return}n.bindTexture(e.TEXTURE_CUBE_MAP,G.__webglTexture,e.TEXTURE0+I)}const _e={[Ic]:e.REPEAT,[bi]:e.CLAMP_TO_EDGE,[Pc]:e.MIRRORED_REPEAT},ht={[In]:e.NEAREST,[Wp]:e.NEAREST_MIPMAP_NEAREST,[jp]:e.NEAREST_MIPMAP_LINEAR,[mn]:e.LINEAR,[Xp]:e.LINEAR_MIPMAP_NEAREST,[Ll]:e.LINEAR_MIPMAP_LINEAR},tt={512:e.NEVER,519:e.ALWAYS,513:e.LESS,515:e.LEQUAL,514:e.EQUAL,518:e.GEQUAL,516:e.GREATER,517:e.NOTEQUAL};function re(U,I){if(I.type===1015&&t.has("OES_texture_float_linear")===!1&&(I.magFilter===1006||I.magFilter===1007||I.magFilter===1005||I.magFilter===1008||I.minFilter===1006||I.minFilter===1007||I.minFilter===1005||I.minFilter===1008)&&Ue("WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."),e.texParameteri(U,e.TEXTURE_WRAP_S,_e[I.wrapS]),e.texParameteri(U,e.TEXTURE_WRAP_T,_e[I.wrapT]),(U===e.TEXTURE_3D||U===e.TEXTURE_2D_ARRAY)&&e.texParameteri(U,e.TEXTURE_WRAP_R,_e[I.wrapR]),e.texParameteri(U,e.TEXTURE_MAG_FILTER,ht[I.magFilter]),e.texParameteri(U,e.TEXTURE_MIN_FILTER,ht[I.minFilter]),I.compareFunction&&(e.texParameteri(U,e.TEXTURE_COMPARE_MODE,e.COMPARE_REF_TO_TEXTURE),e.texParameteri(U,e.TEXTURE_COMPARE_FUNC,tt[I.compareFunction])),t.has("EXT_texture_filter_anisotropic")===!0){if(I.magFilter===1003||I.minFilter!==1005&&I.minFilter!==1008||I.type===1015&&t.has("OES_texture_float_linear")===!1)return;if(I.anisotropy>1||i.get(I).__currentAnisotropy){const G=t.get("EXT_texture_filter_anisotropic");e.texParameterf(U,G.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(I.anisotropy,r.getMaxAnisotropy())),i.get(I).__currentAnisotropy=I.anisotropy}}}function ge(U,I){let G=!1;U.__webglInit===void 0&&(U.__webglInit=!0,I.addEventListener("dispose",O));const ee=I.source;let fe=v.get(ee);fe===void 0&&(fe={},v.set(ee,fe));const we=J(I);if(we!==U.__cacheKey){fe[we]===void 0&&(fe[we]={texture:e.createTexture(),usedTimes:0},l.memory.textures++,G=!0),fe[we].usedTimes++;
vendor: 6,991 bytes, line 4092
4092const Ne=fe[U.__cacheKey];Ne!==void 0&&(fe[U.__cacheKey].usedTimes--,Ne.usedTimes===0&&B(I)),U.__cacheKey=we,U.__webglTexture=fe[we].texture}return G}function Ie(U,I,G){return Math.floor(Math.floor(U/G)/I)}function Ce(U,I,G,ee){const we=U.updateRanges;if(we.length===0)n.texSubImage2D(e.TEXTURE_2D,0,0,0,I.width,I.height,G,ee,I.data);else{we.sort((qe,xe)=>qe.start-xe.start);let Ne=0;for(let qe=1;qe<we.length;qe++){const xe=we[Ne],Ke=we[qe],nt=xe.start+xe.count,ft=Ie(Ke.start,I.width,4),Rt=Ie(xe.start,I.width,4);Ke.start<=nt+1&&ft===Rt&&Ie(Ke.start+Ke.count-1,I.width,4)===ft?xe.count=Math.max(xe.count,Ke.start+Ke.count-xe.start):(++Ne,we[Ne]=Ke)}we.length=Ne+1;const X=n.getParameter(e.UNPACK_ROW_LENGTH),Ee=n.getParameter(e.UNPACK_SKIP_PIXELS),ze=n.getParameter(e.UNPACK_SKIP_ROWS);n.pixelStorei(e.UNPACK_ROW_LENGTH,I.width);for(let qe=0,xe=we.length;qe<xe;qe++){const Ke=we[qe],nt=Math.floor(Ke.start/4),ft=Math.ceil(Ke.count/4),Rt=nt%I.width,W=Math.floor(nt/I.width),le=ft,ve=1;n.pixelStorei(e.UNPACK_SKIP_PIXELS,Rt),n.pixelStorei(e.UNPACK_SKIP_ROWS,W),n.texSubImage2D(e.TEXTURE_2D,0,Rt,W,le,ve,G,ee,I.data)}U.clearUpdateRanges(),n.pixelStorei(e.UNPACK_ROW_LENGTH,X),n.pixelStorei(e.UNPACK_SKIP_PIXELS,Ee),n.pixelStorei(e.UNPACK_SKIP_ROWS,ze)}}function We(U,I,G){let ee=e.TEXTURE_2D;(I.isDataArrayTexture||I.isCompressedArrayTexture)&&(ee=e.TEXTURE_2D_ARRAY),I.isData3DTexture&&(ee=e.TEXTURE_3D);const fe=ge(U,I),we=I.source;n.bindTexture(ee,U.__webglTexture,e.TEXTURE0+G);const Ne=i.get(we);if(we.version!==Ne.__version||fe===!0){if(n.activeTexture(e.TEXTURE0+G),!(typeof ImageBitmap<"u"&&I.image instanceof ImageBitmap)){const le=Nt.getPrimaries(Nt.workingColorSpace),ve=I.colorSpace===""?null:Nt.getPrimaries(I.colorSpace),Be=I.colorSpace===""||le===ve?e.NONE:e.BROWSER_DEFAULT_WEBGL;n.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,I.flipY),n.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,I.premultiplyAlpha),n.pixelStorei(e.UNPACK_COLORSPACE_CONVERSION_WEBGL,Be)}n.pixelStorei(e.UNPACK_ALIGNMENT,I.unpackAlignment);let X=S(I.image,!1,r.maxTextureSize);X=bt(I,X);const Ee=o.convert(I.format,I.colorSpace),ze=o.convert(I.type);let qe=E(I.internalFormat,Ee,ze,I.normalized,I.colorSpace,I.isVideoTexture);re(ee,I);let xe;const Ke=I.mipmaps,nt=I.isVideoTexture!==!0,ft=Ne.__version===void 0||fe===!0,Rt=we.dataReady,W=N(I,X);if(I.isDepthTexture)qe=P(I.format===Jp,I.type),ft&&(nt?n.texStorage2D(e.TEXTURE_2D,1,qe,X.width,X.height):n.texImage2D(e.TEXTURE_2D,0,qe,X.width,X.height,0,Ee,ze,null));else if(I.isDataTexture)if(Ke.length>0){nt&&ft&&n.texStorage2D(e.TEXTURE_2D,W,qe,Ke[0].width,Ke[0].height);for(let le=0,ve=Ke.length;le<ve;le++)xe=Ke[le],nt?Rt&&n.texSubImage2D(e.TEXTURE_2D,le,0,0,xe.width,xe.height,Ee,ze,xe.data):n.texImage2D(e.TEXTURE_2D,le,qe,xe.width,xe.height,0,Ee,ze,xe.data);I.generateMipmaps=!1}else nt?(ft&&n.texStorage2D(e.TEXTURE_2D,W,qe,X.width,X.height),Rt&&Ce(I,X,Ee,ze)):n.texImage2D(e.TEXTURE_2D,0,qe,X.width,X.height,0,Ee,ze,X.data);else if(I.isCompressedTexture)if(I.isCompressedArrayTexture){nt&&ft&&n.texStorage3D(e.TEXTURE_2D_ARRAY,W,qe,Ke[0].width,Ke[0].height,X.depth);for(let le=0,ve=Ke.length;le<ve;le++)if(xe=Ke[le],I.format!==1023)if(Ee!==null)if(nt){if(Rt)if(I.layerUpdates.size>0){const Be=Ip(xe.width,xe.height,I.format,I.type);for(const je of I.layerUpdates){const pe=xe.data.subarray(je*Be/xe.data.BYTES_PER_ELEMENT,(je+1)*Be/xe.data.BYTES_PER_ELEMENT);n.compressedTexSubImage3D(e.TEXTURE_2D_ARRAY,le,0,0,je,xe.width,xe.height,1,Ee,pe)}I.clearLayerUpdates()}else n.compressedTexSubImage3D(e.TEXTURE_2D_ARRAY,le,0,0,0,xe.width,xe.height,X.depth,Ee,xe.data)}else n.compressedTexImage3D(e.TEXTURE_2D_ARRAY,le,qe,xe.width,xe.height,X.depth,0,xe.data,0,0);else Ue("WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()");else nt?Rt&&n.texSubImage3D(e.TEXTURE_2D_ARRAY,le,0,0,0,xe.width,xe.height,X.depth,Ee,ze,xe.data):n.texImage3D(e.TEXTURE_2D_ARRAY,le,qe,xe.width,xe.height,X.depth,0,Ee,ze,xe.data)}else{nt&&ft&&n.texStorage2D(e.TEXTURE_2D,W,qe,Ke[0].width,Ke[0].height);for(let le=0,ve=Ke.length;le<ve;le++)xe=Ke[le],I.format!==1023?Ee!==null?nt?Rt&&n.compressedTexSubImage2D(e.TEXTURE_2D,le,0,0,xe.width,xe.height,Ee,xe.data):n.compressedTexImage2D(e.TEXTURE_2D,le,qe,xe.width,xe.height,0,xe.data):Ue("WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):nt?Rt&&n.texSubImage2D(e.TEXTURE_2D,le,0,0,xe.width,xe.height,Ee,ze,xe.data):n.texImage2D(e.TEXTURE_2D,le,qe,xe.width,xe.height,0,Ee,ze,xe.data)}else if(I.isDataArrayTexture)if(nt){if(ft&&n.texStorage3D(e.TEXTURE_2D_ARRAY,W,qe,X.width,X.height,X.depth),Rt)if(I.layerUpdates.size>0){const le=Ip(X.width,X.height,I.format,I.type);for(const ve of I.layerUpdates){const Be=X.data.subarray(ve*le/X.data.BYTES_PER_ELEMENT,(ve+1)*le/X.data.BYTES_PER_ELEMENT);n.texSubImage3D(e.TEXTURE_2D_ARRAY,0,0,0,ve,X.width,X.height,1,Ee,ze,Be)}I.clearLayerUpdates()}else n.texSubImage3D(e.TEXTURE_2D_ARRAY,0,0,0,0,X.width,X.height,X.depth,Ee,ze,X.data)}else n.texImage3D(e.TEXTURE_2D_ARRAY,0,qe,X.width,X.height,X.depth,0,Ee,ze,X.data);else if(I.isData3DTexture)nt?(ft&&n.texStorage3D(e.TEXTURE_3D,W,qe,X.width,X.height,X.depth),Rt&&n.texSubImage3D(e.TEXTURE_3D,0,0,0,0,X.width,X.height,X.depth,Ee,ze,X.data)):n.texImage3D(e.TEXTURE_3D,0,qe,X.width,X.height,X.depth,0,Ee,ze,X.data);else if(I.isFramebufferTexture){if(ft)if(nt)n.texStorage2D(e.TEXTURE_2D,W,qe,X.width,X.height);else{let le=X.width,ve=X.height;for(let Be=0;Be<W;Be++)n.texImage2D(e.TEXTURE_2D,Be,qe,le,ve,0,Ee,ze,null),le>>=1,ve>>=1}}else if(I.isHTMLTexture){if("texElementImage2D"in e){const le=e.canvas;if(le.hasAttribute("layoutsubtree")||le.setAttribute("layoutsubtree","true"),X.parentNode!==le){le.appendChild(X),g.add(I),le.onpaint=ve=>{const Be=ve.changedElements;for(const je of g)Be.includes(je.image)&&(je.needsUpdate=!0)},le.requestPaint();return}if(e.texElementImage2D.length===3)e.texElementImage2D(e.TEXTURE_2D,e.RGBA8,X);else{const Be=e.RGBA,je=e.RGBA,pe=e.UNSIGNED_BYTE;e.texElementImage2D(e.TEXTURE_2D,0,Be,je,pe,X)}e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE)}}else if(Ke.length>0){if(nt&&ft){const le=xt(Ke[0]);n.texStorage2D(e.TEXTURE_2D,W,qe,le.width,le.height)}for(let le=0,ve=Ke.length;le<ve;le++)xe=Ke[le],nt?Rt&&n.texSubImage2D(e.TEXTURE_2D,le,0,0,Ee,ze,xe):n.texImage2D(e.TEXTURE_2D,le,qe,Ee,ze,xe);I.generateMipmaps=!1}else if(nt){if(ft){const le=xt(X);n.texStorage2D(e.TEXTURE_2D,W,qe,le.width,le.height)}Rt&&n.texSubImage2D(e.TEXTURE_2D,0,0,0,Ee,ze,X)}else n.texImage2D(e.TEXTURE_2D,0,qe,Ee,ze,X);_(I)&&C(ee),Ne.__version=we.version,I.onUpdate&&I.onUpdate(I)}U.__version=I.version}function et(U,I,G){if(I.image.length!==6)return;const ee=ge(U,I),fe=I.source;n.bindTexture(e.TEXTURE_CUBE_MAP,U.__webglTexture,e.TEXTURE0+G);const we=i.get(fe);if(fe.version!==we.__version||ee===!0){n.activeTexture(e.TEXTURE0+G);
vendor: 12,824 bytes, line 4092
4092const Ne=Nt.getPrimaries(Nt.workingColorSpace),X=I.colorSpace===""?null:Nt.getPrimaries(I.colorSpace),Ee=I.colorSpace===""||Ne===X?e.NONE:e.BROWSER_DEFAULT_WEBGL;n.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,I.flipY),n.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,I.premultiplyAlpha),n.pixelStorei(e.UNPACK_ALIGNMENT,I.unpackAlignment),n.pixelStorei(e.UNPACK_COLORSPACE_CONVERSION_WEBGL,Ee);const ze=I.isCompressedTexture||I.image[0].isCompressedTexture,qe=I.image[0]&&I.image[0].isDataTexture,xe=[];for(let pe=0;pe<6;pe++)!ze&&!qe?xe[pe]=S(I.image[pe],!0,r.maxCubemapSize):xe[pe]=qe?I.image[pe].image:I.image[pe],xe[pe]=bt(I,xe[pe]);const Ke=xe[0],nt=o.convert(I.format,I.colorSpace),ft=o.convert(I.type),Rt=E(I.internalFormat,nt,ft,I.normalized,I.colorSpace),W=I.isVideoTexture!==!0,le=we.__version===void 0||ee===!0,ve=fe.dataReady;let Be=N(I,Ke);re(e.TEXTURE_CUBE_MAP,I);let je;if(ze){W&&le&&n.texStorage2D(e.TEXTURE_CUBE_MAP,Be,Rt,Ke.width,Ke.height);for(let pe=0;pe<6;pe++){je=xe[pe].mipmaps;for(let Oe=0;Oe<je.length;Oe++){const at=je[Oe];I.format!==1023?nt!==null?W?ve&&n.compressedTexSubImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+pe,Oe,0,0,at.width,at.height,nt,at.data):n.compressedTexImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+pe,Oe,Rt,at.width,at.height,0,at.data):Ue("WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):W?ve&&n.texSubImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+pe,Oe,0,0,at.width,at.height,nt,ft,at.data):n.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+pe,Oe,Rt,at.width,at.height,0,nt,ft,at.data)}}}else{if(je=I.mipmaps,W&&le){je.length>0&&Be++;const pe=xt(xe[0]);n.texStorage2D(e.TEXTURE_CUBE_MAP,Be,Rt,pe.width,pe.height)}for(let pe=0;pe<6;pe++)if(qe){W?ve&&n.texSubImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+pe,0,0,0,xe[pe].width,xe[pe].height,nt,ft,xe[pe].data):n.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+pe,0,Rt,xe[pe].width,xe[pe].height,0,nt,ft,xe[pe].data);for(let Oe=0;Oe<je.length;Oe++){const at=je[Oe].image[pe].image;W?ve&&n.texSubImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+pe,Oe+1,0,0,at.width,at.height,nt,ft,at.data):n.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+pe,Oe+1,Rt,at.width,at.height,0,nt,ft,at.data)}}else{W?ve&&n.texSubImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+pe,0,0,0,nt,ft,xe[pe]):n.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+pe,0,Rt,nt,ft,xe[pe]);for(let Oe=0;Oe<je.length;Oe++){const at=je[Oe];W?ve&&n.texSubImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+pe,Oe+1,0,0,nt,ft,at.image[pe]):n.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+pe,Oe+1,Rt,nt,ft,at.image[pe])}}}_(I)&&C(e.TEXTURE_CUBE_MAP),we.__version=fe.version,I.onUpdate&&I.onUpdate(I)}U.__version=I.version}function Ze(U,I,G,ee,fe,we){const Ne=o.convert(G.format,G.colorSpace),X=o.convert(G.type),Ee=E(G.internalFormat,Ne,X,G.normalized,G.colorSpace),ze=i.get(I),qe=i.get(G);if(qe.__renderTarget=I,!ze.__hasExternalTextures){const xe=Math.max(1,I.width>>we),Ke=Math.max(1,I.height>>we);fe===e.TEXTURE_3D||fe===e.TEXTURE_2D_ARRAY?n.texImage3D(fe,we,Ee,xe,Ke,I.depth,0,Ne,X,null):n.texImage2D(fe,we,Ee,xe,Ke,0,Ne,X,null)}n.bindFramebuffer(e.FRAMEBUFFER,U),z(I)?u.framebufferTexture2DMultisampleEXT(e.FRAMEBUFFER,ee,fe,qe.__webglTexture,0,ut(I)):(fe===e.TEXTURE_2D||fe>=e.TEXTURE_CUBE_MAP_POSITIVE_X&&fe<=e.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&e.framebufferTexture2D(e.FRAMEBUFFER,ee,fe,qe.__webglTexture,we),n.bindFramebuffer(e.FRAMEBUFFER,null)}function ct(U,I,G){if(e.bindRenderbuffer(e.RENDERBUFFER,U),I.depthBuffer){const ee=I.depthTexture,fe=ee&&ee.isDepthTexture?ee.type:null,we=P(I.stencilBuffer,fe),Ne=I.stencilBuffer?e.DEPTH_STENCIL_ATTACHMENT:e.DEPTH_ATTACHMENT;z(I)?u.renderbufferStorageMultisampleEXT(e.RENDERBUFFER,ut(I),we,I.width,I.height):G?e.renderbufferStorageMultisample(e.RENDERBUFFER,ut(I),we,I.width,I.height):e.renderbufferStorage(e.RENDERBUFFER,we,I.width,I.height),e.framebufferRenderbuffer(e.FRAMEBUFFER,Ne,e.RENDERBUFFER,U)}else{const ee=I.textures;for(let fe=0;fe<ee.length;fe++){const we=ee[fe],Ne=o.convert(we.format,we.colorSpace),X=o.convert(we.type),Ee=E(we.internalFormat,Ne,X,we.normalized,we.colorSpace);z(I)?u.renderbufferStorageMultisampleEXT(e.RENDERBUFFER,ut(I),Ee,I.width,I.height):G?e.renderbufferStorageMultisample(e.RENDERBUFFER,ut(I),Ee,I.width,I.height):e.renderbufferStorage(e.RENDERBUFFER,Ee,I.width,I.height)}}e.bindRenderbuffer(e.RENDERBUFFER,null)}function oe(U,I,G){const ee=I.isWebGLCubeRenderTarget===!0;if(n.bindFramebuffer(e.FRAMEBUFFER,U),!(I.depthTexture&&I.depthTexture.isDepthTexture))throw new Error("THREE.WebGLTextures: renderTarget.depthTexture must be an instance of THREE.DepthTexture.");const fe=i.get(I.depthTexture);if(fe.__renderTarget=I,(!fe.__webglTexture||I.depthTexture.image.width!==I.width||I.depthTexture.image.height!==I.height)&&(I.depthTexture.image.width=I.width,I.depthTexture.image.height=I.height,I.depthTexture.needsUpdate=!0),ee){if(fe.__webglInit===void 0&&(fe.__webglInit=!0,I.depthTexture.addEventListener("dispose",O)),fe.__webglTexture===void 0){fe.__webglTexture=e.createTexture(),n.bindTexture(e.TEXTURE_CUBE_MAP,fe.__webglTexture),re(e.TEXTURE_CUBE_MAP,I.depthTexture);const ze=o.convert(I.depthTexture.format),qe=o.convert(I.depthTexture.type);let xe;I.depthTexture.format===1026?xe=e.DEPTH_COMPONENT24:I.depthTexture.format===1027&&(xe=e.DEPTH24_STENCIL8);for(let Ke=0;Ke<6;Ke++)e.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+Ke,0,xe,I.width,I.height,0,ze,qe,null)}}else he(I.depthTexture,0);const we=fe.__webglTexture,Ne=ut(I),X=ee?e.TEXTURE_CUBE_MAP_POSITIVE_X+G:e.TEXTURE_2D,Ee=I.depthTexture.format===1027?e.DEPTH_STENCIL_ATTACHMENT:e.DEPTH_ATTACHMENT;if(I.depthTexture.format===1026)z(I)?u.framebufferTexture2DMultisampleEXT(e.FRAMEBUFFER,Ee,X,we,0,Ne):e.framebufferTexture2D(e.FRAMEBUFFER,Ee,X,we,0);else if(I.depthTexture.format===1027)z(I)?u.framebufferTexture2DMultisampleEXT(e.FRAMEBUFFER,Ee,X,we,0,Ne):e.framebufferTexture2D(e.FRAMEBUFFER,Ee,X,we,0);else throw new Error("THREE.WebGLTextures: Unknown depthTexture format.")}function Se(U){const I=i.get(U),G=U.isWebGLCubeRenderTarget===!0;if(I.__boundDepthTexture!==U.depthTexture){const ee=U.depthTexture;if(I.__depthDisposeCallback&&I.__depthDisposeCallback(),ee){const fe=()=>{delete I.__boundDepthTexture,delete I.__depthDisposeCallback,ee.removeEventListener("dispose",fe)};ee.addEventListener("dispose",fe),I.__depthDisposeCallback=fe}I.__boundDepthTexture=ee}if(U.depthTexture&&!I.__autoAllocateDepthBuffer)if(G)for(let ee=0;ee<6;ee++)oe(I.__webglFramebuffer[ee],U,ee);else{const ee=U.texture.mipmaps;ee&&ee.length>0?oe(I.__webglFramebuffer[0],U,0):oe(I.__webglFramebuffer,U,0)}else if(G){I.__webglDepthbuffer=[];for(let ee=0;ee<6;ee++)if(n.bindFramebuffer(e.FRAMEBUFFER,I.__webglFramebuffer[ee]),I.__webglDepthbuffer[ee]===void 0)I.__webglDepthbuffer[ee]=e.createRenderbuffer(),ct(I.__webglDepthbuffer[ee],U,!1);else{const fe=U.stencilBuffer?e.DEPTH_STENCIL_ATTACHMENT:e.DEPTH_ATTACHMENT,we=I.__webglDepthbuffer[ee];e.bindRenderbuffer(e.RENDERBUFFER,we),e.framebufferRenderbuffer(e.FRAMEBUFFER,fe,e.RENDERBUFFER,we)}}else{const ee=U.texture.mipmaps;if(ee&&ee.length>0?n.bindFramebuffer(e.FRAMEBUFFER,I.__webglFramebuffer[0]):n.bindFramebuffer(e.FRAMEBUFFER,I.__webglFramebuffer),I.__webglDepthbuffer===void 0)I.__webglDepthbuffer=e.createRenderbuffer(),ct(I.__webglDepthbuffer,U,!1);else{const fe=U.stencilBuffer?e.DEPTH_STENCIL_ATTACHMENT:e.DEPTH_ATTACHMENT,we=I.__webglDepthbuffer;e.bindRenderbuffer(e.RENDERBUFFER,we),e.framebufferRenderbuffer(e.FRAMEBUFFER,fe,e.RENDERBUFFER,we)}}n.bindFramebuffer(e.FRAMEBUFFER,null)}function Ae(U,I,G){const ee=i.get(U);I!==void 0&&Ze(ee.__webglFramebuffer,U,U.texture,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,0),G!==void 0&&Se(U)}function De(U){const I=U.texture,G=i.get(U),ee=i.get(I);U.addEventListener("dispose",T);const fe=U.textures,we=U.isWebGLCubeRenderTarget===!0,Ne=fe.length>1;if(Ne||(ee.__webglTexture===void 0&&(ee.__webglTexture=e.createTexture()),ee.__version=I.version,l.memory.textures++),we){G.__webglFramebuffer=[];for(let X=0;X<6;X++)if(I.mipmaps&&I.mipmaps.length>0){G.__webglFramebuffer[X]=[];for(let Ee=0;Ee<I.mipmaps.length;Ee++)G.__webglFramebuffer[X][Ee]=e.createFramebuffer()}else G.__webglFramebuffer[X]=e.createFramebuffer()}else{if(I.mipmaps&&I.mipmaps.length>0){G.__webglFramebuffer=[];for(let X=0;X<I.mipmaps.length;X++)G.__webglFramebuffer[X]=e.createFramebuffer()}else G.__webglFramebuffer=e.createFramebuffer();if(Ne)for(let X=0,Ee=fe.length;X<Ee;X++){const ze=i.get(fe[X]);ze.__webglTexture===void 0&&(ze.__webglTexture=e.createTexture(),l.memory.textures++)}if(U.samples>0&&z(U)===!1){G.__webglMultisampledFramebuffer=e.createFramebuffer(),G.__webglColorRenderbuffer=[],n.bindFramebuffer(e.FRAMEBUFFER,G.__webglMultisampledFramebuffer);for(let X=0;X<fe.length;X++){const Ee=fe[X];G.__webglColorRenderbuffer[X]=e.createRenderbuffer(),e.bindRenderbuffer(e.RENDERBUFFER,G.__webglColorRenderbuffer[X]);const ze=o.convert(Ee.format,Ee.colorSpace),qe=o.convert(Ee.type),xe=E(Ee.internalFormat,ze,qe,Ee.normalized,Ee.colorSpace,U.isXRRenderTarget===!0),Ke=ut(U);e.renderbufferStorageMultisample(e.RENDERBUFFER,Ke,xe,U.width,U.height),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0+X,e.RENDERBUFFER,G.__webglColorRenderbuffer[X])}e.bindRenderbuffer(e.RENDERBUFFER,null),U.depthBuffer&&(G.__webglDepthRenderbuffer=e.createRenderbuffer(),ct(G.__webglDepthRenderbuffer,U,!0)),n.bindFramebuffer(e.FRAMEBUFFER,null)}}if(we){n.bindTexture(e.TEXTURE_CUBE_MAP,ee.__webglTexture),re(e.TEXTURE_CUBE_MAP,I);for(let X=0;X<6;X++)if(I.mipmaps&&I.mipmaps.length>0)for(let Ee=0;Ee<I.mipmaps.length;Ee++)Ze(G.__webglFramebuffer[X][Ee],U,I,e.COLOR_ATTACHMENT0,e.TEXTURE_CUBE_MAP_POSITIVE_X+X,Ee);else Ze(G.__webglFramebuffer[X],U,I,e.COLOR_ATTACHMENT0,e.TEXTURE_CUBE_MAP_POSITIVE_X+X,0);_(I)&&C(e.TEXTURE_CUBE_MAP),n.unbindTexture()}else if(Ne){for(let X=0,Ee=fe.length;X<Ee;X++){const ze=fe[X],qe=i.get(ze);let xe=e.TEXTURE_2D;(U.isWebGL3DRenderTarget||U.isWebGLArrayRenderTarget)&&(xe=U.isWebGL3DRenderTarget?e.TEXTURE_3D:e.TEXTURE_2D_ARRAY),n.bindTexture(xe,qe.__webglTexture),re(xe,ze),Ze(G.__webglFramebuffer,U,ze,e.COLOR_ATTACHMENT0+X,xe,0),_(ze)&&C(xe)}n.unbindTexture()}else{let X=e.TEXTURE_2D;if((U.isWebGL3DRenderTarget||U.isWebGLArrayRenderTarget)&&(X=U.isWebGL3DRenderTarget?e.TEXTURE_3D:e.TEXTURE_2D_ARRAY),n.bindTexture(X,ee.__webglTexture),re(X,I),I.mipmaps&&I.mipmaps.length>0)for(let Ee=0;Ee<I.mipmaps.length;Ee++)Ze(G.__webglFramebuffer[Ee],U,I,e.COLOR_ATTACHMENT0,X,Ee);else Ze(G.__webglFramebuffer,U,I,e.COLOR_ATTACHMENT0,X,0);_(I)&&C(X),n.unbindTexture()}U.depthBuffer&&Se(U)}function Le(U){const I=U.textures;for(let G=0,ee=I.length;G<ee;G++){const fe=I[G];if(_(fe)){const we=A(U),Ne=i.get(fe).__webglTexture;n.bindTexture(we,Ne),C(we),n.unbindTexture()}}}const Ye=[],Je=[];function lt(U){if(U.samples>0){if(z(U)===!1){const I=U.textures,G=U.width,ee=U.height;let fe=e.COLOR_BUFFER_BIT;const we=U.stencilBuffer?e.DEPTH_STENCIL_ATTACHMENT:e.DEPTH_ATTACHMENT,Ne=i.get(U),X=I.length>1;if(X)for(let ze=0;ze<I.length;ze++)n.bindFramebuffer(e.FRAMEBUFFER,Ne.__webglMultisampledFramebuffer),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0+ze,e.RENDERBUFFER,null),n.bindFramebuffer(e.FRAMEBUFFER,Ne.__webglFramebuffer),e.framebufferTexture2D(e.DRAW_FRAMEBUFFER,e.COLOR_ATTACHMENT0+ze,e.TEXTURE_2D,null,0);n.bindFramebuffer(e.READ_FRAMEBUFFER,Ne.__webglMultisampledFramebuffer);const Ee=U.texture.mipmaps;Ee&&Ee.length>0?n.bindFramebuffer(e.DRAW_FRAMEBUFFER,Ne.__webglFramebuffer[0]):n.bindFramebuffer(e.DRAW_FRAMEBUFFER,Ne.__webglFramebuffer);for(let ze=0;ze<I.length;ze++){if(U.resolveDepthBuffer&&(U.depthBuffer&&(fe|=e.DEPTH_BUFFER_BIT),U.stencilBuffer&&U.resolveStencilBuffer&&(fe|=e.STENCIL_BUFFER_BIT)),X){e.framebufferRenderbuffer(e.READ_FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.RENDERBUFFER,Ne.__webglColorRenderbuffer[ze]);const qe=i.get(I[ze]).__webglTexture;e.framebufferTexture2D(e.DRAW_FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,qe,0)}e.blitFramebuffer(0,0,G,ee,0,0,G,ee,fe,e.NEAREST),h===!0&&(Ye.length=0,Je.length=0,Ye.push(e.COLOR_ATTACHMENT0+ze),U.depthBuffer&&U.resolveDepthBuffer===!1&&(Ye.push(we),Je.push(we),e.invalidateFramebuffer(e.DRAW_FRAMEBUFFER,Je)),e.invalidateFramebuffer(e.READ_FRAMEBUFFER,Ye))}if(n.bindFramebuffer(e.READ_FRAMEBUFFER,null),n.bindFramebuffer(e.DRAW_FRAMEBUFFER,null),X)for(let ze=0;ze<I.length;ze++){n.bindFramebuffer(e.FRAMEBUFFER,Ne.__webglMultisampledFramebuffer),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0+ze,e.RENDERBUFFER,Ne.__webglColorRenderbuffer[ze]);const qe=i.get(I[ze]).__webglTexture;n.bindFramebuffer(e.FRAMEBUFFER,Ne.__webglFramebuffer),e.framebufferTexture2D(e.DRAW_FRAMEBUFFER,e.COLOR_ATTACHMENT0+ze,e.TEXTURE_2D,qe,0)}n.bindFramebuffer(e.DRAW_FRAMEBUFFER,Ne.__webglMultisampledFramebuffer)}else if(U.depthBuffer&&U.resolveDepthBuffer===!1&&h){const I=U.stencilBuffer?e.DEPTH_STENCIL_ATTACHMENT:e.DEPTH_ATTACHMENT;
vendor: 5,829 bytes, line 4092
4092e.invalidateFramebuffer(e.DRAW_FRAMEBUFFER,[I])}}}function ut(U){return Math.min(r.maxSamples,U.samples)}function z(U){const I=i.get(U);return U.samples>0&&t.has("WEBGL_multisampled_render_to_texture")===!0&&I.__useRenderToTexture!==!1}function vt(U){const I=l.render.frame;p.get(U)!==I&&(p.set(U,I),U.update())}function bt(U,I){const G=U.colorSpace,ee=U.format,fe=U.type;return U.isCompressedTexture===!0||U.isVideoTexture===!0||G!=="srgb-linear"&&G!==""&&(Nt.getTransfer(G)==="srgb"?(ee!==1023||fe!==1009)&&Ue("WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):rt("WebGLTextures: Unsupported texture color space:",G)),I}function xt(U){return typeof HTMLImageElement<"u"&&U instanceof HTMLImageElement?(f.width=U.naturalWidth||U.width,f.height=U.naturalHeight||U.height):typeof VideoFrame<"u"&&U instanceof VideoFrame?(f.width=U.displayWidth,f.height=U.displayHeight):(f.width=U.width,f.height=U.height),f}this.allocateTextureUnit=te,this.resetTextureUnits=H,this.getTextureUnits=Y,this.setTextureUnits=q,this.setTexture2D=he,this.setTexture2DArray=ue,this.setTexture3D=ce,this.setTextureCube=me,this.rebindTextures=Ae,this.setupRenderTarget=De,this.updateRenderTargetMipmap=Le,this.updateMultisampleRenderTarget=lt,this.setupDepthRenderbuffer=Se,this.setupFrameBufferTexture=Ze,this.useMultisampledRTT=z,this.isReversedDepthBuffer=function(){return n.buffers.depth.getReversed()}}function Ux(e,t){function n(i,r=""){let o;const l=Nt.getTransfer(r);if(i===1009)return e.UNSIGNED_BYTE;if(i===1017)return e.UNSIGNED_SHORT_4_4_4_4;if(i===1018)return e.UNSIGNED_SHORT_5_5_5_1;if(i===35902)return e.UNSIGNED_INT_5_9_9_9_REV;if(i===35899)return e.UNSIGNED_INT_10F_11F_11F_REV;if(i===1010)return e.BYTE;if(i===1011)return e.SHORT;if(i===1012)return e.UNSIGNED_SHORT;if(i===1013)return e.INT;if(i===1014)return e.UNSIGNED_INT;if(i===1015)return e.FLOAT;if(i===1016)return e.HALF_FLOAT;if(i===1021)return e.ALPHA;if(i===1022)return e.RGB;if(i===1023)return e.RGBA;if(i===1026)return e.DEPTH_COMPONENT;if(i===1027)return e.DEPTH_STENCIL;if(i===1028)return e.RED;if(i===1029)return e.RED_INTEGER;if(i===1030)return e.RG;if(i===1031)return e.RG_INTEGER;if(i===1033)return e.RGBA_INTEGER;if(i===33776||i===33777||i===33778||i===33779)if(l==="srgb")if(o=t.get("WEBGL_compressed_texture_s3tc_srgb"),o!==null){if(i===33776)return o.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(i===33777)return o.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(i===33778)return o.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(i===33779)return o.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(o=t.get("WEBGL_compressed_texture_s3tc"),o!==null){if(i===33776)return o.COMPRESSED_RGB_S3TC_DXT1_EXT;if(i===33777)return o.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(i===33778)return o.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(i===33779)return o.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(i===35840||i===35841||i===35842||i===35843)if(o=t.get("WEBGL_compressed_texture_pvrtc"),o!==null){if(i===35840)return o.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(i===35841)return o.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(i===35842)return o.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(i===35843)return o.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(i===36196||i===37492||i===37496||i===37488||i===37489||i===37490||i===37491)if(o=t.get("WEBGL_compressed_texture_etc"),o!==null){if(i===36196||i===37492)return l==="srgb"?o.COMPRESSED_SRGB8_ETC2:o.COMPRESSED_RGB8_ETC2;if(i===37496)return l==="srgb"?o.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:o.COMPRESSED_RGBA8_ETC2_EAC;if(i===37488)return o.COMPRESSED_R11_EAC;if(i===37489)return o.COMPRESSED_SIGNED_R11_EAC;if(i===37490)return o.COMPRESSED_RG11_EAC;if(i===37491)return o.COMPRESSED_SIGNED_RG11_EAC}else return null;if(i===37808||i===37809||i===37810||i===37811||i===37812||i===37813||i===37814||i===37815||i===37816||i===37817||i===37818||i===37819||i===37820||i===37821)if(o=t.get("WEBGL_compressed_texture_astc"),o!==null){if(i===37808)return l==="srgb"?o.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:o.COMPRESSED_RGBA_ASTC_4x4_KHR;if(i===37809)return l==="srgb"?o.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:o.COMPRESSED_RGBA_ASTC_5x4_KHR;if(i===37810)return l==="srgb"?o.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:o.COMPRESSED_RGBA_ASTC_5x5_KHR;if(i===37811)return l==="srgb"?o.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:o.COMPRESSED_RGBA_ASTC_6x5_KHR;if(i===37812)return l==="srgb"?o.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:o.COMPRESSED_RGBA_ASTC_6x6_KHR;if(i===37813)return l==="srgb"?o.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:o.COMPRESSED_RGBA_ASTC_8x5_KHR;if(i===37814)return l==="srgb"?o.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:o.COMPRESSED_RGBA_ASTC_8x6_KHR;if(i===37815)return l==="srgb"?o.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:o.COMPRESSED_RGBA_ASTC_8x8_KHR;if(i===37816)return l==="srgb"?o.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:o.COMPRESSED_RGBA_ASTC_10x5_KHR;if(i===37817)return l==="srgb"?o.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:o.COMPRESSED_RGBA_ASTC_10x6_KHR;if(i===37818)return l==="srgb"?o.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:o.COMPRESSED_RGBA_ASTC_10x8_KHR;if(i===37819)return l==="srgb"?o.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:o.COMPRESSED_RGBA_ASTC_10x10_KHR;if(i===37820)return l==="srgb"?o.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:o.COMPRESSED_RGBA_ASTC_12x10_KHR;if(i===37821)return l==="srgb"?o.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:o.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(i===36492||i===36494||i===36495)if(o=t.get("EXT_texture_compression_bptc"),o!==null){if(i===36492)return l==="srgb"?o.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:o.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(i===36494)return o.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(i===36495)return o.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}else return null;if(i===36283||i===36284||i===36285||i===36286)if(o=t.get("EXT_texture_compression_rgtc"),o!==null){if(i===36283)return o.COMPRESSED_RED_RGT
vendor: 10,088 bytes, lines 4092-4116
4092C1_EXT;if(i===36284)return o.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(i===36285)return o.COMPRESSED_RED_GREEN_RGTC2_EXT;if(i===36286)return o.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return i===1020?e.UNSIGNED_INT_24_8:e[i]!==void 0?e[i]:null}return{convert:n}}var zE=`
4093void main() {
4094
4095	gl_Position = vec4( position, 1.0 );
4096
4097}`,VE=`
4098uniform sampler2DArray depthColor;
4099uniform float depthWidth;
4100uniform float depthHeight;
4101
4102void main() {
4103
4104	vec2 coord = vec2( gl_FragCoord.x / depthWidth, gl_FragCoord.y / depthHeight );
4105
4106	if ( coord.x >= 1.0 ) {
4107
4108		gl_FragDepth = texture( depthColor, vec3( coord.x - 1.0, coord.y, 1 ) ).r;
4109
4110	} else {
4111
4112		gl_FragDepth = texture( depthColor, vec3( coord.x, coord.y, 0 ) ).r;
4113
4114	}
4115
4116}`,GE=class{constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}init(e,t){if(this.texture===null){const n=new u0(e.texture);(e.depthNear!==t.depthNear||e.depthFar!==t.depthFar)&&(this.depthNear=e.depthNear,this.depthFar=e.depthFar),this.texture=n}}getMesh(e){if(this.texture!==null&&this.mesh===null){const t=e.cameras[0].viewport,n=new Si({vertexShader:zE,fragmentShader:VE,uniforms:{depthColor:{value:this.texture},depthWidth:{value:t.z},depthHeight:{value:t.w}}});this.mesh=new Cn(new Qh(20,20),n)}return this.mesh}reset(){this.texture=null,this.mesh=null}getDepthTexture(){return this.texture}},HE=class extends dr{constructor(e,t){super();const n=this;let i=null,r=1,o=null,l="local-floor",u=1,h=null,f=null,p=null,g=null,m=null,v=null;const b=typeof XRWebGLBinding<"u",w=new GE,S={},_=t.getContextAttributes();let C=null,A=null;const E=[],P=[],N=new ye;let O=null;const T=new kn;T.viewport=new tn;const R=new kn;R.viewport=new tn;const B=[T,R],F=new yx;let j=null,H=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(re){let ge=E[re];return ge===void 0&&(ge=new Lh,E[re]=ge),ge.getTargetRaySpace()},this.getControllerGrip=function(re){let ge=E[re];return ge===void 0&&(ge=new Lh,E[re]=ge),ge.getGripSpace()},this.getHand=function(re){let ge=E[re];return ge===void 0&&(ge=new Lh,E[re]=ge),ge.getHandSpace()};function Y(re){const ge=P.indexOf(re.inputSource);if(ge===-1)return;const Ie=E[ge];Ie!==void 0&&(Ie.update(re.inputSource,re.frame,h||o),Ie.dispatchEvent({type:re.type,data:re.inputSource}))}function q(){i.removeEventListener("select",Y),i.removeEventListener("selectstart",Y),i.removeEventListener("selectend",Y),i.removeEventListener("squeeze",Y),i.removeEventListener("squeezestart",Y),i.removeEventListener("squeezeend",Y),i.removeEventListener("end",q),i.removeEventListener("inputsourceschange",te);for(let re=0;re<E.length;re++){const ge=P[re];ge!==null&&(P[re]=null,E[re].disconnect(ge))}j=null,H=null,w.reset();for(const re in S)delete S[re];e.setRenderTarget(C),m=null,g=null,p=null,i=null,A=null,tt.stop(),n.isPresenting=!1,e.setPixelRatio(O),e.setSize(N.width,N.height,!1),n.dispatchEvent({type:"sessionend"})}this.setFramebufferScaleFactor=function(re){r=re,n.isPresenting===!0&&Ue("WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(re){l=re,n.isPresenting===!0&&Ue("WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return h||o},this.setReferenceSpace=function(re){h=re},this.getBaseLayer=function(){return g!==null?g:m},this.getBinding=function(){return p===null&&b&&(p=new XRWebGLBinding(i,t)),p},this.getFrame=function(){return v},this.getSession=function(){return i},this.setSession=async function(re){if(i=re,i!==null){if(C=e.getRenderTarget(),i.addEventListener("select",Y),i.addEventListener("selectstart",Y),i.addEventListener("selectend",Y),i.addEventListener("squeeze",Y),i.addEventListener("squeezestart",Y),i.addEventListener("squeezeend",Y),i.addEventListener("end",q),i.addEventListener("inputsourceschange",te),_.xrCompatible!==!0&&await t.makeXRCompatible(),O=e.getPixelRatio(),e.getSize(N),b&&"createProjectionLayer"in XRWebGLBinding.prototype){let ge=null,Ie=null,Ce=null;_.depth&&(Ce=_.stencil?t.DEPTH24_STENCIL8:t.DEPTH_COMPONENT24,ge=_.stencil?Jp:Tl,Ie=_.stencil?Zp:is);const We={colorFormat:t.RGBA8,depthFormat:Ce,scaleFactor:r};p=this.getBinding(),g=p.createProjectionLayer(We),i.updateRenderState({layers:[g]}),e.setPixelRatio(1),e.setSize(g.textureWidth,g.textureHeight,!1),A=new Fi(g.textureWidth,g.textureHeight,{format:ss,type:ts,depthTexture:new po(g.textureWidth,g.textureHeight,Ie,void 0,void 0,void 0,void 0,void 0,void 0,ge),stencilBuffer:_.stencil,colorSpace:e.outputColorSpace,samples:_.antialias?4:0,resolveDepthBuffer:g.ignoreDepthValues===!1,resolveStencilBuffer:g.ignoreDepthValues===!1})}else{const ge={antialias:_.antialias,alpha:!0,depth:_.depth,stencil:_.stencil,framebufferScaleFactor:r};m=new XRWebGLLayer(i,t,ge),i.updateRenderState({baseLayer:m}),e.setPixelRatio(1),e.setSize(m.framebufferWidth,m.framebufferHeight,!1),A=new Fi(m.framebufferWidth,m.framebufferHeight,{format:ss,type:ts,colorSpace:e.outputColorSpace,stencilBuffer:_.stencil,resolveDepthBuffer:m.ignoreDepthValues===!1,resolveStencilBuffer:m.ignoreDepthValues===!1})}A.isXRRenderTarget=!0,this.setFoveation(u),h=null,o=await i.requestReferenceSpace(l),tt.setContext(i),tt.start(),n.isPresenting=!0,n.dispatchEvent({type:"sessionstart"})}},this.getEnvironmentBlendMode=function(){if(i!==null)return i.environmentBlendMode},this.getDepthTexture=function(){return w.getDepthTexture()};function te(re){for(let ge=0;ge<re.removed.length;ge++){const Ie=re.removed[ge],Ce=P.indexOf(Ie);Ce>=0&&(P[Ce]=null,E[Ce].disconnect(Ie))}for(let ge=0;ge<re.added.length;ge++){const Ie=re.added[ge];let Ce=P.indexOf(Ie);if(Ce===-1){for(let et=0;et<E.length;et++)if(et>=P.length){P.push(Ie),Ce=et;break}else if(P[et]===null){P[et]=Ie,Ce=et;break}if(Ce===-1)break}const We=E[Ce];We&&We.connect(Ie)}}const J=new k,he=new k;function ue(re,ge,Ie){J.setFromMatrixPosition(ge.matrixWorld),he.setFromMatrixPosition(Ie.matrixWorld);const Ce=J.distanceTo(he),We=ge.projectionMatrix.elements,et=Ie.projectionMatrix.elements,Ze=We[14]/(We[10]-1),ct=We[14]/(We[10]+1),oe=(We[9]+1)/We[5],Se=(We[9]-1)/We[5],Ae=(We[8]-1)/We[0],De=(et[8]+1)/et[0],Le=Ze*Ae,Ye=Ze*De,Je=Ce/(-Ae+De),lt=Je*-Ae;if(ge.matrixWorld.decompose(re.position,re.quaternion,re.scale),re.translateX(lt),re.translateZ(Je),re.matrixWorld.compose(re.position,re.quaternion,re.scale),re.matrixWorldInverse.copy(re.matrixWorld).invert(),We[10]===-1)re.projectionMatrix.copy(ge.projectionMatrix),re.projectionMatrixInverse.copy(ge.projectionMatrixInverse);else{const ut=Ze+Je,z=ct+Je,vt=Le-lt,bt=Ye+(Ce-lt),xt=oe*ct/z*ut,U=Se*ct/z*ut;re.projectionMatrix.makePerspective(vt,bt,xt,U,ut,z),re.projectionMatrixInverse.copy(re.projectionMatrix).invert()}}function ce(re,ge){ge===null?re.matrixWorld.copy(re.matrix):re.matrixWorld.multiplyMatrices(ge.matrixWorld,re.matrix),re.matrixWorldInverse.copy(re.matrixWorld).invert()}this.updateCamera=function(re){if(i===null)return;let ge=re.near,Ie=re.far;w.texture!==null&&(w.depthNear>0&&(ge=w.depthNear),w.depthFar>0&&(Ie=w.depthFar)),F.near=R.near=T.near=ge,F.far=R.far=T.far=Ie,(j!==F.near||H!==F.far)&&(i.updateRenderState({depthNear:F.near,depthFar:F.far}),j=F.near,H=F.far),F.layers.mask=re.layers.mask|6,T.layers.mask=F.layers.mask&-5,R.layers.mask=F.layers.mask&-3;const Ce=re.parent,We=F.cameras;ce(F,Ce);for(let et=0;et<We.length;et++)ce(We[et],Ce);We.length===2?ue(F,T,R):F.projectionMatrix.copy(T.projectionMatrix),me(re,F,Ce)};function me(re,ge,Ie){Ie===null?re.matrix.copy(ge.matrixWorld):(re.matrix.copy(Ie.matrixWorld),re.matrix.invert(),re.matrix.multiply(ge.matrixWorld)),re.matrix.decompose(re.position,re.quaternion,re.scale),re.updateMatrixWorld(!0),re.projectionMatrix.copy(ge.projectionMatrix),re.projectionMatrixInverse.copy(ge.projectionMatrixInverse),re.isPerspectiveCamera&&(re.fov=Cl*2*Math.atan(1/re.projectionMatrix.elements[5]),re.zoom=1)}this.getCamera=function(){return F},this.getFoveation=function(){if(!(g===null&&m===null))return u},this.setFoveation=function(re){u=re,g!==null&&(g.fixedFoveation=re),m!==null&&m.fixedFoveation!==void 0&&(m.fixedFoveation=re)},this.hasDepthSensing=function(){return w.texture!==null},this.getDepthSensingMesh=function(){return w.getMesh(F)},this.getCameraTexture=function(re){return S[re]};let _e=null;function ht(re,ge){if(f=ge.getViewerPose(h||o),v=ge,f!==null){const Ie=f.views;m!==null&&(e.setRenderTargetFramebuffer(A,m.framebuffer),e.setRenderTarget(A));let Ce=!1;Ie.length!==F.cameras.length&&(F.cameras.length=0,Ce=!0);for(let et=0;et<Ie.length;et++){const Ze=Ie[et];let ct=null;if(m!==null)ct=m.getViewport(Ze);else{const Se=p.getViewSubImage(g,Ze);ct=Se.viewport,et===0&&(e.setRenderTargetTextures(A,Se.colorTexture,Se.depthStencilTexture),e.setRenderTarget(A))}let oe=B[et];oe===void 0&&(oe=new kn,oe.layers.enable(et),oe.viewport=new tn,B[et]=oe),oe.matrix.fromArray(Ze.transform.matrix),oe.matrix.decompose(oe.position,oe.quaternion,oe.scale),oe.projectionMatrix.fromArray(Ze.projectionMatrix),oe.projectionMatrixInverse.copy(oe.projectionMatrix).invert(),oe.viewport.set(ct.x,ct.y,ct.width,ct.height),et===0&&(F.matrix.copy(oe.matrix),F.matrix.decompose(F.position,F.quaternion,F.scale)),Ce===!0&&F.cameras.push(oe)}const We=i.enabledFeatures;if(We&&We.includes("depth-sensing")&&i.depthUsage=="gpu-optimized"&&b){p=n.getBinding();const et=p.getDepthInformation(Ie[0]);et&&et.isValid&&et.texture&&w.init(et,i.renderState)}if(We&&We.includes("camera-access")&&b){e.state.unbindTexture(),p=n.getBinding();for(let et=0;et<Ie.length;et++){const Ze=Ie[et].camera;if(Ze){let ct=S[Ze];ct||(ct=new u0,S[Ze]=ct);const oe=p.getCameraImage(Ze);ct.sourceTexture=oe}}}}for(let Ie=0;Ie<E.length;Ie++){const Ce=P[Ie],We=E[Ie];Ce!==null&&We!==void 0&&We.update(Ce,ge,h||o)}_e&&_e(re,ge),ge.detectedPlanes&&n.dispatchEvent({type:"planesdetected",data:ge}),v=null}const tt=new Rx;tt.setAnimationLoop(ht),this.setAnimationLoop=function(re){_e=re},this.dispose=function(){}}},WE=new _t,Ox=new Et;Ox.set(-1,0,0,0,1,0,0,0,1);function jE(e,t){function n(S,_){S.matrixAutoUpdate===!0&&S.updateMatrix(),_.value.copy(S.matrix
vendor: 2,392 bytes, line 4116
4116)}function i(S,_){_.color.getRGB(S.fogColor.value,W2(e)),_.isFog?(S.fogNear.value=_.near,S.fogFar.value=_.far):_.isFogExp2&&(S.fogDensity.value=_.density)}function r(S,_,C,A,E){_.isNodeMaterial?_.uniformsNeedUpdate=!1:_.isMeshBasicMaterial?o(S,_):_.isMeshLambertMaterial?(o(S,_),_.envMap&&(S.envMapIntensity.value=_.envMapIntensity)):_.isMeshToonMaterial?(o(S,_),g(S,_)):_.isMeshPhongMaterial?(o(S,_),p(S,_),_.envMap&&(S.envMapIntensity.value=_.envMapIntensity)):_.isMeshStandardMaterial?(o(S,_),m(S,_),_.isMeshPhysicalMaterial&&v(S,_,E)):_.isMeshMatcapMaterial?(o(S,_),b(S,_)):_.isMeshDepthMaterial?o(S,_):_.isMeshDistanceMaterial?(o(S,_),w(S,_)):_.isMeshNormalMaterial?o(S,_):_.isLineBasicMaterial?(l(S,_),_.isLineDashedMaterial&&u(S,_)):_.isPointsMaterial?h(S,_,C,A):_.isSpriteMaterial?f(S,_):_.isShadowMaterial?(S.color.value.copy(_.color),S.opacity.value=_.opacity):_.isShaderMaterial&&(_.uniformsNeedUpdate=!1)}function o(S,_){S.opacity.value=_.opacity,_.color&&S.diffuse.value.copy(_.color),_.emissive&&S.emissive.value.copy(_.emissive).multiplyScalar(_.emissiveIntensity),_.map&&(S.map.value=_.map,n(_.map,S.mapTransform)),_.alphaMap&&(S.alphaMap.value=_.alphaMap,n(_.alphaMap,S.alphaMapTransform)),_.bumpMap&&(S.bumpMap.value=_.bumpMap,n(_.bumpMap,S.bumpMapTransform),S.bumpScale.value=_.bumpScale,_.side===1&&(S.bumpScale.value*=-1)),_.normalMap&&(S.normalMap.value=_.normalMap,n(_.normalMap,S.normalMapTransform),S.normalScale.value.copy(_.normalScale),_.side===1&&S.normalScale.value.negate()),_.displacementMap&&(S.displacementMap.value=_.displacementMap,n(_.displacementMap,S.displacementMapTransform),S.displacementScale.value=_.displacementScale,S.displacementBias.value=_.displacementBias),_.emissiveMap&&(S.emissiveMap.value=_.emissiveMap,n(_.emissiveMap,S.emissiveMapTransform)),_.specularMap&&(S.specularMap.value=_.specularMap,n(_.specularMap,S.specularMapTransform)),_.alphaTest>0&&(S.alphaTest.value=_.alphaTest);const C=t.get(_),A=C.envMap,E=C.envMapRotation;A&&(S.envMap.value=A,S.envMapRotation.value.setFromMatrix4(WE.makeRotationFromEuler(E)).transpose(),A.isCubeTexture&&A.isRenderTargetTexture===!1&&S.envMapRotation.value.premultiply(Ox),S.reflectivity.value=_.reflectivity,S.ior.value=_.ior,S.refractionRatio.value=_.refractionRatio),_.lightMap&&(S.lightMap.value=_.lightMap,S.lightMapIntensity.value=_.lightMapIntensity,n(_.lightMap,S.lightMapTransform)),_.ao
4116Map&&(S.aoMap.value=_.aoMap,S.aoMapIntensity.value=_.aoMapIntensity,n(_.aoMap,S.aoMapTransform))}function l(S,_){S.diffuse.value.copy(_.color),S.opacity.value=_.opacity,_.map&&(S.map.value=_.map,n(_.map,S.mapTransform))}function u(S,_){S.dashSize.value=_.dashSize,S.totalSize.value=_.dashSize+_.gapSize,S.scale.value=_.scale}function h(S,_,C,A){S.diffuse.value.copy(_.color),S.opacity.value=_.opacity,S.size.value=_.size*C,S.scale.value=A*.5,_.map&&(S.map.value=_.map,n(_.map,S.uvTransform)),_.alphaMap&&(S.alphaMap.value=_.alphaMap,n(_.alphaMap,S.alphaMapTransform)),_.alphaTest>0&&(S.alphaTest.value=_.alphaTest)}function f(S,_){S.diffuse.value.copy(_.color),S.opacity.value=_.opacity,S.rotation.value=_.rotation,_.map&&(S.map.value=_.map,n(_.map,S.mapTransform)),_.alphaMap&&(S.alphaMap.value=_.alphaMap,n(_.alphaMap,S.alphaMapTransform)),_.alphaTest>0&&(S.alphaTest.value=_.alphaTest)}function p(S,_){S.specular.value.copy(_.specular),S.shininess.value=Math.max(_.shininess,1e-4)}function g(S,_){_.gradientMap&&(S.gradientMap.value=_.gradientMap)}function m(S,_){S.metalness.value=_.metalness,_.metalnessMap&&(S.metalnessMap.value=_.metalnessMap,n(_.metalnessMap,S.metalnessMapTransform)),S.roughness.value=_.roughness,_.roughnessMap&&(S.roughnessMap.value=_.roughnessMap,n(_.roughnessMap,S.roughnessMapTransform)),_.envMap&&(S.envMapIntensity.value=_.envMapIntensity)}function v(S,_,C){S.ior.value=_.ior,_.sheen>0&&(S.sheenColor.value.copy(_.sheenColor).multiplyScalar(_.sheen),S.sheenRoughness.value=_.sheenRoughness,_.sheenColorMap&&(S.sheenColorMap.value=_.sheenColorMap,n(_.sheenColorMap,S.sheenColorMapTransform)),_.sheenRoughnessMap&&(S.sheenRoughnessMap.value=_.sheenRoughnessMap,n(_.sheenRoughnessMap,S.sheenRoughnessMapTransform))),_.clearcoat>0&&(S.clearcoat.value=_.clearcoat,S.clearcoatRoughness.value=_.clearcoatRoughness,_.clearcoatMap&&(S.clearcoatMap.value=_.clearcoatMap,n(_.clearcoatMap,S.clearcoatMapTransform)),_.clearcoatRoughnessMap&&(S.clearcoatRoughnessMap.value=_.clearcoatRoughnessMap,n(_.clearcoatRoughnessMap,S.clearcoatRoughnessMapTransform)),_.clearcoatNormalMap&&(S.clearcoatNormalMap.value=_.clearcoatNormalMap,n(_.clearcoatNormalMap,S.clearcoatNormalMapTransform),S.clearcoatNormalScale.value.copy(_.clearcoatNormalScale),_.side===1&&S.clearcoatNormalScale.value.negate())),_.dispersion>0&&(S.dispersion.value=_.dispersion),_.iridescence>0&&(S.iridescence.value=_.iridescence,S.iridescenceIOR.value=_.iridescenceIOR,S.iridescenceThicknessMinimum.value=_.iridescenceThicknessRange[0],S.iridescenceThicknessMaximum.value=_.iridescenceThicknessRange[1],_.iridescenceMap&&(S.iridescenceMap.value=_.iridescenceMap,n(_.iridescenceMap,S.iridescenceMapTransform)),_.iridescenceThicknessMap&&(S.iridescenceThicknessMap.value=_.iridescenceThicknessMap,n(_.iridescenceThicknessMap,S.iridescenceThicknessMapTransform))),_.transmission>0&&(S.transmission.value=_.transmission,S.transmissionSamplerMap.value=C.texture,S.transmissionSamplerSize.value.set(C.width,C.height),_.transmissionMap&&(S.transmissionMap.value=_.transmissionMap,n(_.transmissionMap,S.transmissionMapTransform)),S.thickness.value=_.thickness,_.thicknessMap&&(S.thicknessMap.value=_.thicknessMap,n(_.thicknessMap,S.thicknessMapTransform)),S.attenuationDistance.value=_.attenuationDistance,S.attenuationColor.value.copy(_.attenuationColor)),_.anisotropy>0&&(S.anisotropyVector.value.set(_.anisotropy*Math.cos(_.anisotropyRotation),_.anisotropy*Math.sin(_.anisotropyRotation)),_.anisotropyMap&&(S.anisotropyMap.value=_.anisotropyMap,n(_.anisotropyMap,S.anisotropyMapTransform))),S.specularIntensity.value=_.specularIntensity,S.specularColor.value.copy(_.specularColor),_.specularColorMap&&(S.specularColorMap.value=_.specularColorMap,n(_.specularColorMap,S.specularColorMapTransform)),_.specularIntensityMap&&(S.specularIntensityMap.value=_.specularIntensityMap,n(_.specularIntensityMap,S.specularIntensityMapTransform))}function b(S,_){_.matcap&&(S.matcap.value=_.matcap)}function w(S,_){const C=t.get(_).light;S.referencePosition.value.setFromMatrixPosition(C.matrixWorld),S.nearDistance.value=C.shadow.camera.near,S.farDistance.value=C.shadow.camera.far}return{refreshFogUniforms:i,refreshMaterialUniforms:r}}function XE(e,t,n,i){let r={},o={},l=[];const u=e.getParameter(e.MAX_UNIFORM_BUFFER_BINDINGS);function h(E,P){const N=P.program;i.uniformBlockBinding(E,N)}function f(E,P){let N=r[E.id];N===void 0&&(S(E),N=p(E),r[E.id]=N,E.addEventListener("dispose",C));const O=P.program;i.updateUBOMapping(E,O);const T=t.render.frame;o[E.id]!==T&&(m(E),o[E.id]=T)}function p(E){const P=g();E.__bindingPointIndex=P;const N=e.createBuffer(),O=E.__size,T=E.usage;return e.bindBuffer(e.UNIFORM_BUFFER,N),e.bufferData(e.UNIFORM_BUFFER,O,T),e.bindBuffer(e.UNIFORM_BUFFER,null),e.bindBufferBase(e.UNIFORM_BUFFER,P,N),N}function g(){for(let E=0;E<u;E++)if(l.indexOf(E)===-1)return l.push(E),E;return rt("WebGLRenderer: Maximum number of simultaneously usable uniforms groups reached."),0}function m(E){const P=r[E.id],N=E.uniforms,O=E.__cache;e.bindBuffer(e.UNIFORM_BUFFER,P);for(let T=0,R=N.length;T<R;T++){const B=N[T];if(Array.isArray(B))for(let F=0,j=B.length;F<j;F++)v(B[F],T,F,O);else v(B,T,0,O)}e.bindBuffer(e.UNIFORM_BUFFER,null)}function v(E,P,N,O){if(w(E,P,N,O)===!0){const T=E.__offset,R=E.value;if(Array.isArray(R)){let B=0;for(let F=0;F<R.length;F++){const j=R[F],H=_(j);b(j,E.__data,B),typeof j!="number"&&typeof j!="boolean"&&!j.isMatrix3&&!ArrayBuffer.isView(j)&&(B+=H.storage/Float32Array.BYTES_PER_ELEMENT)}}else b(R,E.__data,0);e.bufferSubData(e.UNIFORM_BUFFER,T,E.__data)}}function b(E,P,N){typeof E=="number"||typeof E=="boolean"?P[0]=E:E.isMatrix3?(P[0]=E.elements[0],P[1]=E.elements[1],P[2]=E.elements[2],P[3]=0,P[4]=E.elements[3],P[5]=E.elements[4],P[6]=E.elements[5],P[7]=0,P[8]=E.elements[6],P[9]=E.elements[7],P[10]=E.elements[8],P[11]=0):ArrayBuffer.isView(E)?P.set(new E.constructor(E.buffer,E.byteOffset,P.length)):E.toArray(P,N)}function w(E,P,N,O){const T=E.value,R=P+"_"+N;if(O[R]===void 0)return typeof T=="number"||typeof T=="boolean"?O[R]=T:ArrayBuffer.isView(T)?O[R]=T.slice():O[R]=T.clone(),!0;{const B=O[R];if(typeof T=="number"||typeof T=="boolean"){if(B!==T)return O[R]=T,!0}else{if(ArrayBuffer.isView(T))return!0;
vendor: 7,164 bytes, line 4116
4116if(B.equals(T)===!1)return B.copy(T),!0}}return!1}function S(E){const P=E.uniforms;let N=0;const O=16;for(let R=0,B=P.length;R<B;R++){const F=Array.isArray(P[R])?P[R]:[P[R]];for(let j=0,H=F.length;j<H;j++){const Y=F[j],q=Array.isArray(Y.value)?Y.value:[Y.value];for(let te=0,J=q.length;te<J;te++){const he=q[te],ue=_(he),ce=N%O,me=ce%ue.boundary,_e=ce+me;N+=me,_e!==0&&O-_e<ue.storage&&(N+=O-_e),Y.__data=new Float32Array(ue.storage/Float32Array.BYTES_PER_ELEMENT),Y.__offset=N,N+=ue.storage}}}const T=N%O;return T>0&&(N+=O-T),E.__size=N,E.__cache={},this}function _(E){const P={boundary:0,storage:0};return typeof E=="number"||typeof E=="boolean"?(P.boundary=4,P.storage=4):E.isVector2?(P.boundary=8,P.storage=8):E.isVector3||E.isColor?(P.boundary=16,P.storage=12):E.isVector4?(P.boundary=16,P.storage=16):E.isMatrix3?(P.boundary=48,P.storage=48):E.isMatrix4?(P.boundary=64,P.storage=64):E.isTexture?Ue("WebGLRenderer: Texture samplers can not be part of an uniforms group."):ArrayBuffer.isView(E)?(P.boundary=16,P.storage=E.byteLength):Ue("WebGLRenderer: Unsupported uniform value type.",E),P}function C(E){const P=E.target;P.removeEventListener("dispose",C);const N=l.indexOf(P.__bindingPointIndex);l.splice(N,1),e.deleteBuffer(r[P.id]),delete r[P.id],delete o[P.id]}function A(){for(const E in r)e.deleteBuffer(r[E]);l=[],r={},o={}}return{bind:h,update:f,dispose:A}}var qE=new Uint16Array([12469,15057,12620,14925,13266,14620,13807,14376,14323,13990,14545,13625,14713,13328,14840,12882,14931,12528,14996,12233,15039,11829,15066,11525,15080,11295,15085,10976,15082,10705,15073,10495,13880,14564,13898,14542,13977,14430,14158,14124,14393,13732,14556,13410,14702,12996,14814,12596,14891,12291,14937,11834,14957,11489,14958,11194,14943,10803,14921,10506,14893,10278,14858,9960,14484,14039,14487,14025,14499,13941,14524,13740,14574,13468,14654,13106,14743,12678,14818,12344,14867,11893,14889,11509,14893,11180,14881,10751,14852,10428,14812,10128,14765,9754,14712,9466,14764,13480,14764,13475,14766,13440,14766,13347,14769,13070,14786,12713,14816,12387,14844,11957,14860,11549,14868,11215,14855,10751,14825,10403,14782,10044,14729,9651,14666,9352,14599,9029,14967,12835,14966,12831,14963,12804,14954,12723,14936,12564,14917,12347,14900,11958,14886,11569,14878,11247,14859,10765,14828,10401,14784,10011,14727,9600,14660,9289,14586,8893,14508,8533,15111,12234,15110,12234,15104,12216,15092,12156,15067,12010,15028,11776,14981,11500,14942,11205,14902,10752,14861,10393,14812,9991,14752,9570,14682,9252,14603,8808,14519,8445,14431,8145,15209,11449,15208,11451,15202,11451,15190,11438,15163,11384,15117,11274,15055,10979,14994,10648,14932,10343,14871,9936,14803,9532,14729,9218,14645,8742,14556,8381,14461,8020,14365,7603,15273,10603,15272,10607,15267,10619,15256,10631,15231,10614,15182,10535,15118,10389,15042,10167,14963,9787,14883,9447,14800,9115,14710,8665,14615,8318,14514,7911,14411,7507,14279,7198,15314,9675,15313,9683,15309,9712,15298,9759,15277,9797,15229,9773,15166,9668,15084,9487,14995,9274,14898,8910,14800,8539,14697,8234,14590,7790,14479,7409,14367,7067,14178,6621,15337,8619,15337,8631,15333,8677,15325,8769,15305,8871,15264,8940,15202,8909,15119,8775,15022,8565,14916,8328,14804,8009,14688,7614,14569,7287,14448,6888,14321,6483,14088,6171,15350,7402,15350,7419,15347,7480,15340,7613,15322,7804,15287,7973,15229,8057,15148,8012,15046,7846,14933,7611,14810,7357,14682,7069,14552,6656,14421,6316,14251,5948,14007,5528,15356,5942,15356,5977,15353,6119,15348,6294,15332,6551,15302,6824,15249,7044,15171,7122,15070,7050,14949,6861,14818,6611,14679,6349,14538,6067,14398,5651,14189,5311,13935,4958,15359,4123,15359,4153,15356,4296,15353,4646,15338,5160,15311,5508,15263,5829,15188,6042,15088,6094,14966,6001,14826,5796,14678,5543,14527,5287,14377,4985,14133,4586,13869,4257,15360,1563,15360,1642,15358,2076,15354,2636,15341,3350,15317,4019,15273,4429,15203,4732,15105,4911,14981,4932,14836,4818,14679,4621,14517,4386,14359,4156,14083,3795,13808,3437,15360,122,15360,137,15358,285,15355,636,15344,1274,15322,2177,15281,2765,15215,3223,15120,3451,14995,3569,14846,3567,14681,3466,14511,3305,14344,3121,14037,2800,13753,2467,15360,0,15360,1,15359,21,15355,89,15346,253,15325,479,15287,796,15225,1148,15133,1492,15008,1749,14856,1882,14685,1886,14506,1783,14324,1608,13996,1398,13702,1183]),Tr=null;function YE(){return Tr===null&&(Tr=new $i(qE,16,16,Nc,Hs),Tr.name="DFG_LUT",Tr.minFilter=mn,Tr.magFilter=mn,Tr.wrapS=bi,Tr.wrapT=bi,Tr.generateMipmaps=!1,Tr.needsUpdate=!0),Tr}var Fx=class{constructor(e={}){const{canvas:t=Ey(),context:n=null,depth:i=!0,stencil:r=!1,alpha:o=!1,antialias:l=!1,premultipliedAlpha:u=!0,preserveDrawingBuffer:h=!1,powerPreference:f="default",failIfMajorPerformanceCaveat:p=!1,reversedDepthBuffer:g=!1,outputBufferType:m=ts}=e;this.isWebGLRenderer=!0;let v;if(n!==null){if(typeof WebGLRenderingContext<"u"&&n instanceof WebGLRenderingContext)throw new Error("THREE.WebGLRenderer: WebGL 1 is not supported since r163.");v=n.getContextAttributes().alpha}else v=o;const b=m,w=new Set([e0,Qp,jh]),S=new Set([ts,is,qp,Zp,Yp,$p]),_=new Uint32Array(4),C=new Int32Array(4),A=new k;let E=null,P=null;const N=[],O=[];let T=null;this.domElement=t,this.debug={checkShaderErrors:!0,onShaderError:null},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.toneMapping=0,this.toneMappingExposure=1,this.transmissionResolutionScale=1;const R=this;let B=!1,F=null,j=null,H=null,Y=null;this._outputColorSpace=ci;let q=0,te=0,J=null,he=-1,ue=null;const ce=new tn,me=new tn;let _e=null;const ht=new Xe(0);let tt=0,re=t.width,ge=t.height,Ie=1,Ce=null,We=null;const et=new tn(0,0,re,ge),Ze=new tn(0,0,re,ge);let ct=!1;const oe=new fo;let Se=!1,Ae=!1;const De=new _t,Le=new k,Ye=new tn,Je={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};let lt=!1;function ut(){return J===null?Ie:1}let z=n;function vt(L,$){return t.getContext(L,$)}try{const L={alpha:!0,depth:i,stencil:r,antialias:l,premultipliedAlpha:u,preserveDrawingBuffer:h,powerPreference:f,failIfMajorPerformanceCaveat:p};if("setAttribute"in t&&t.setAttribute("data-engine","three.js r185"),t.addEventListener("webglcontextlost",at,!1),t.addEventListener("webglcontextrestored",sn,!1),t.addEventListener("webglcontextcreationerror",Lt,!1),z===null){const $="webgl2";if(z=vt($,L),z===null)throw vt($)?new Error("THREE.WebGLRenderer: Error creating WebGL context with your selected attributes."):new Error("THREE.WebGLRenderer: Error creating WebGL context.")}}catch(L){throw rt("WebGLRenderer: "+L.message),L}let bt,xt,U,I,G,ee,fe,we,Ne,X,Ee,ze,qe,xe,Ke,nt,ft,Rt,W,le,ve,Be,je;function pe(){bt=new $5(z),bt.init(),ve=new Ux(z,bt),xt=new V5(z,bt,e,ve),U=new kE(z,bt),xt.reversedDepthBuffer&&g&&U.buffers.depth.setReversed(!0),j=z.createFramebuffer(),H=z.createFramebuffer(),Y=z.createFramebuffer(),I=new K5(z),G=new wE,ee=new BE(z,bt,U,G,xt,ve,I),fe=new Y5(R),we=new O5(z),Be=new B5(z,we),Ne=new Z5(z,we,I,Be),X=new e6(z,Ne,we,Be,I),Rt=new Q5(z,xt,ee),Ke=new G5(G),Ee=new ME(R,fe,bt,xt,Be,Ke),ze=new jE(R,G),qe=new TE,xe=new NE(bt),ft=new k5(R,fe,U,X,v,u),nt=ne
vendor: 5,070 bytes, line 4116
4116w FE(R,X,xt),je=new XE(z,I,xt,U),W=new z5(z,bt,I),le=new J5(z,bt,I),I.programs=Ee.programs,R.capabilities=xt,R.extensions=bt,R.properties=G,R.renderLists=qe,R.shadowMap=nt,R.state=U,R.info=I}pe(),b!==1009&&(T=new n6(b,t.width,t.height,l,i,r));const Oe=new HE(R,z);this.xr=Oe,this.getContext=function(){return z},this.getContextAttributes=function(){return z.getContextAttributes()},this.forceContextLoss=function(){const L=bt.get("WEBGL_lose_context");L&&L.loseContext()},this.forceContextRestore=function(){const L=bt.get("WEBGL_lose_context");L&&L.restoreContext()},this.getPixelRatio=function(){return Ie},this.setPixelRatio=function(L){L!==void 0&&(Ie=L,this.setSize(re,ge,!1))},this.getSize=function(L){return L.set(re,ge)},this.setSize=function(L,$,ne=!0){if(Oe.isPresenting){Ue("WebGLRenderer: Can't change size while VR device is presenting.");return}re=L,ge=$,t.width=Math.floor(L*Ie),t.height=Math.floor($*Ie),ne===!0&&(t.style.width=L+"px",t.style.height=$+"px"),T!==null&&T.setSize(t.width,t.height),this.setViewport(0,0,L,$)},this.getDrawingBufferSize=function(L){return L.set(re*Ie,ge*Ie).floor()},this.setDrawingBufferSize=function(L,$,ne){re=L,ge=$,Ie=ne,t.width=Math.floor(L*ne),t.height=Math.floor($*ne),this.setViewport(0,0,L,$)},this.setEffects=function(L){if(b===1009){rt("WebGLRenderer: setEffects() requires outputBufferType set to HalfFloatType or FloatType.");return}if(L){for(let $=0;$<L.length;$++)if(L[$].isOutputPass===!0){Ue("WebGLRenderer: OutputPass is not needed in setEffects(). Tone mapping and color space conversion are applied automatically.");break}}T.setEffects(L||[])},this.getCurrentViewport=function(L){return L.copy(ce)},this.getViewport=function(L){return L.copy(et)},this.setViewport=function(L,$,ne,Q){L.isVector4?et.set(L.x,L.y,L.z,L.w):et.set(L,$,ne,Q),U.viewport(ce.copy(et).multiplyScalar(Ie).round())},this.getScissor=function(L){return L.copy(Ze)},this.setScissor=function(L,$,ne,Q){L.isVector4?Ze.set(L.x,L.y,L.z,L.w):Ze.set(L,$,ne,Q),U.scissor(me.copy(Ze).multiplyScalar(Ie).round())},this.getScissorTest=function(){return ct},this.setScissorTest=function(L){U.setScissorTest(ct=L)},this.setOpaqueSort=function(L){Ce=L},this.setTransparentSort=function(L){We=L},this.getClearColor=function(L){return L.copy(ft.getClearColor())},this.setClearColor=function(){ft.setClearColor(...arguments)},this.getClearAlpha=function(){return ft.getClearAlpha()},this.setClearAlpha=function(){ft.setClearAlpha(...arguments)},this.clear=function(L=!0,$=!0,ne=!0){let Q=0;if(L){let Z=!1;if(J!==null){const Te=J.texture.format;Z=w.has(Te)}if(Z){const Te=J.texture.type,Me=S.has(Te),Ve=ft.getClearColor(),Ge=ft.getClearAlpha(),ot=Ve.r,yt=Ve.g,St=Ve.b;Me?(_[0]=ot,_[1]=yt,_[2]=St,_[3]=Ge,z.clearBufferuiv(z.COLOR,0,_)):(C[0]=ot,C[1]=yt,C[2]=St,C[3]=Ge,z.clearBufferiv(z.COLOR,0,C))}else Q|=z.COLOR_BUFFER_BIT}$&&(Q|=z.DEPTH_BUFFER_BIT,this.state.buffers.depth.setMask(!0)),ne&&(Q|=z.STENCIL_BUFFER_BIT,this.state.buffers.stencil.setMask(4294967295)),Q!==0&&z.clear(Q)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.setNodesHandler=function(L){L.setRenderer(this),F=L},this.dispose=function(){t.removeEventListener("webglcontextlost",at,!1),t.removeEventListener("webglcontextrestored",sn,!1),t.removeEventListener("webglcontextcreationerror",Lt,!1),ft.dispose(),qe.dispose(),xe.dispose(),G.dispose(),fe.dispose(),X.dispose(),Be.dispose(),je.dispose(),Ee.dispose(),Oe.dispose(),Oe.removeEventListener("sessionstart",mr),Oe.removeEventListener("sessionend",zi),jn.stop()};function at(L){L.preventDefault(),Bc("WebGLRenderer: Context Lost."),B=!0}function sn(){Bc("WebGLRenderer: Context Restored."),B=!1;const L=I.autoReset,$=nt.enabled,ne=nt.autoUpdate,Q=nt.needsUpdate,Z=nt.type;pe(),I.autoReset=L,nt.enabled=$,nt.autoUpdate=ne,nt.needsUpdate=Q,nt.type=Z}function Lt(L){rt("WebGLRenderer: A WebGL context could not be created. Reason: ",L.statusMessage)}function xn(L){const $=L.target;$.removeEventListener("dispose",xn),Bn($)}function Bn(L){Ji(L),G.remove(L)}function Ji(L){const $=G.get(L).programs;$!==void 0&&($.forEach(function(ne){Ee.releaseProgram(ne)}),L.isShaderMaterial&&Ee.releaseShaderCache(L))}this.renderBufferDirect=function(L,$,ne,Q,Z,Te){$===null&&($=Je);const Me=Z.isMesh&&Z.matrixWorld.determinantAffine()<0,Ve=Ir(L,$,ne,Q,Z);U.setMaterial(Q,Me);let Ge=ne.index,ot=1;if(Q.wireframe===!0){if(Ge=Ne.getWireframeAttribute(ne),Ge===void 0)return;ot=2}const yt=ne.drawRange,St=ne.attributes.position;let it=yt.start*ot,Bt=(yt.start+yt.count)*ot;Te!==null&&(it=Math.max(it,Te.start*ot),Bt=Math.min(Bt,(Te.start+Te.count)*ot)),Ge!==null?(it=Math.max(it,0),Bt=Math.min(Bt,Ge.count)):St!=null&&(it=Math.max(it,0),Bt=Math.min(Bt,St.count));const jt=Bt-it;if(jt<0||jt===1/0)return;Be.setup(Z,Q,Ve,ne,Ge);let Mt,st=W;if(Ge!==null&&(Mt=we.get(Ge),st=le,st.setIndex(Mt)),Z.isMesh)Q.wireframe===!0?(U.setLineWidth(Q.wireframeLinewidth*ut()),st.setMode(z.LINES)):st.setMode(z.TRIANGLES);else if(Z.isLine){let nn=Q.linewidth;
vendor: 1,687 bytes, line 4116
4116nn===void 0&&(nn=1),U.setLineWidth(nn*ut()),Z.isLineSegments?st.setMode(z.LINES):Z.isLineLoop?st.setMode(z.LINE_LOOP):st.setMode(z.LINE_STRIP)}else Z.isPoints?st.setMode(z.POINTS):Z.isSprite&&st.setMode(z.TRIANGLES);if(Z.isBatchedMesh)if(bt.get("WEBGL_multi_draw"))st.renderMultiDraw(Z._multiDrawStarts,Z._multiDrawCounts,Z._multiDrawCount);else{const nn=Z._multiDrawStarts,He=Z._multiDrawCounts,gn=Z._multiDrawCount,Pt=Ge?we.get(Ge).bytesPerElement:1,Kt=G.get(Q).currentProgram.getUniforms();for(let _n=0;_n<gn;_n++)Kt.setValue(z,"_gl_DrawID",_n),st.render(nn[_n]/Pt,He[_n])}else if(Z.isInstancedMesh)st.renderInstances(it,jt,Z.count);else if(ne.isInstancedBufferGeometry){const nn=ne._maxInstanceCount!==void 0?ne._maxInstanceCount:1/0,He=Math.min(ne.instanceCount,nn);st.renderInstances(it,jt,He)}else st.render(it,jt)};function ki(L,$,ne){L.transparent===!0&&L.side===2&&L.forceSinglePass===!1?(L.side=1,L.needsUpdate=!0,ii(L,$,ne),L.side=0,L.needsUpdate=!0,ii(L,$,ne),L.side=2):ii(L,$,ne)}this.compile=function(L,$,ne=null){ne===null&&(ne=L),P=xe.get(ne),P.init($),O.push(P),ne.traverseVisible(function(Z){Z.isLight&&Z.layers.test($.layers)&&(P.pushLight(Z),Z.castShadow&&P.pushShadow(Z))}),L!==ne&&L.traverseVisible(function(Z){Z.isLight&&Z.layers.test($.layers)&&(P.pushLight(Z),Z.castShadow&&P.pushShadow(Z))}),P.setupLights();const Q=new Set;return L.traverse(function(Z){if(!(Z.isMesh||Z.isPoints||Z.isLine||Z.isSprite))return;const Te=Z.material;if(Te)if(Array.isArray(Te))for(let Me=0;Me<Te.length;Me++){const Ve=Te[Me];ki(Ve,ne,Z),Q.add(Ve)}else ki(Te,ne,Z),Q.add(Te)}),P=O.pop(),Q},this.compileAsync=function(L,$,ne=null){const Q=this.compile(L,$,ne);return new Promise(Z=>
vendor: 4,511 bytes, line 4116
4116{function Te(){if(Q.forEach(function(Me){G.get(Me).currentProgram.isReady()&&Q.delete(Me)}),Q.size===0){Z(L);return}setTimeout(Te,10)}bt.get("KHR_parallel_shader_compile")!==null?Te():setTimeout(Te,10)})};let Bi=null;function di(L){Bi&&Bi(L)}function mr(){jn.stop()}function zi(){jn.start()}const jn=new Rx;jn.setAnimationLoop(di),typeof self<"u"&&jn.setContext(self),this.setAnimationLoop=function(L){Bi=L,Oe.setAnimationLoop(L),L===null?jn.stop():jn.start()},Oe.addEventListener("sessionstart",mr),Oe.addEventListener("sessionend",zi),this.render=function(L,$){if($!==void 0&&$.isCamera!==!0){rt("WebGLRenderer.render: camera is not an instance of THREE.Camera.");return}if(B===!0)return;F!==null&&F.renderStart(L,$);const ne=Oe.enabled===!0&&Oe.isPresenting===!0,Q=T!==null&&(J===null||ne)&&T.begin(R,J);if(L.matrixWorldAutoUpdate===!0&&L.updateMatrixWorld(),$.parent===null&&$.matrixWorldAutoUpdate===!0&&$.updateMatrixWorld(),Oe.enabled===!0&&Oe.isPresenting===!0&&(T===null||T.isCompositing()===!1)&&(Oe.cameraAutoUpdate===!0&&Oe.updateCamera($),$=Oe.getCamera()),L.isScene===!0&&L.onBeforeRender(R,L,$,J),P=xe.get(L,O.length),P.init($),P.state.textureUnits=ee.getTextureUnits(),O.push(P),De.multiplyMatrices($.projectionMatrix,$.matrixWorldInverse),oe.setFromProjectionMatrix(De,Ws,$.reversedDepth),Ae=this.localClippingEnabled,Se=Ke.init(this.clippingPlanes,Ae),E=qe.get(L,N.length),E.init(),N.push(E),Oe.enabled===!0&&Oe.isPresenting===!0){const Te=R.xr.getDepthSensingMesh();Te!==null&&Vi(Te,$,-1/0,R.sortObjects)}Vi(L,$,0,R.sortObjects),E.finish(),R.sortObjects===!0&&E.sort(Ce,We,$.reversedDepth),lt=Oe.enabled===!1||Oe.isPresenting===!1||Oe.hasDepthSensing()===!1,lt&&ft.addToRenderList(E,L),this.info.render.frame++,this.info.autoReset===!0&&this.info.reset(),Se===!0&&Ke.beginShadows();const Z=P.state.shadowsArray;if(nt.render(Z,L,$),Se===!0&&Ke.endShadows(),(Q&&T.hasRenderPass())===!1){const Te=E.opaque,Me=E.transmissive;if(P.setupLights(),$.isArrayCamera){const Ve=$.cameras;if(Me.length>0)for(let Ge=0,ot=Ve.length;Ge<ot;Ge++){const yt=Ve[Ge];qn(Te,Me,L,yt)}lt&&ft.render(L);for(let Ge=0,ot=Ve.length;Ge<ot;Ge++){const yt=Ve[Ge];Xn(E,L,yt,yt.viewport)}}else Me.length>0&&qn(Te,Me,L,$),lt&&ft.render(L),Xn(E,L,$)}J!==null&&te===0&&(ee.updateMultisampleRenderTarget(J),ee.updateRenderTargetMipmap(J)),Q&&T.end(R),L.isScene===!0&&L.onAfterRender(R,L,$),Be.resetDefaultState(),he=-1,ue=null,O.pop(),O.length>0?(P=O[O.length-1],ee.setTextureUnits(P.state.textureUnits),Se===!0&&Ke.setGlobalState(R.clippingPlanes,P.state.camera)):P=null,N.pop(),N.length>0?E=N[N.length-1]:E=null,F!==null&&F.renderEnd()};function Vi(L,$,ne,Q){if(L.visible===!1)return;if(L.layers.test($.layers)){if(L.isGroup)ne=L.renderOrder;else if(L.isLOD)L.autoUpdate===!0&&L.update($);else if(L.isLightProbeGrid)P.pushLightProbeGrid(L);else if(L.isLight)P.pushLight(L),L.castShadow&&P.pushShadow(L);else if(L.isSprite){if(!L.frustumCulled||oe.intersectsSprite(L)){Q&&Ye.setFromMatrixPosition(L.matrixWorld).applyMatrix4(De);const Te=X.update(L),Me=L.material;Me.visible&&E.push(L,Te,Me,ne,Ye.z,null)}}else if((L.isMesh||L.isLine||L.isPoints)&&(!L.frustumCulled||oe.intersectsObject(L))){const Te=X.update(L),Me=L.material;if(Q&&(L.boundingSphere!==void 0?(L.boundingSphere===null&&L.computeBoundingSphere(),Ye.copy(L.boundingSphere.center)):(Te.boundingSphere===null&&Te.computeBoundingSphere(),Ye.copy(Te.boundingSphere.center)),Ye.applyMatrix4(L.matrixWorld).applyMatrix4(De)),Array.isArray(Me)){const Ve=Te.groups;for(let Ge=0,ot=Ve.length;Ge<ot;Ge++){const yt=Ve[Ge],St=Me[yt.materialIndex];St&&St.visible&&E.push(L,Te,St,ne,Ye.z,yt)}}else Me.visible&&E.push(L,Te,Me,ne,Ye.z,null)}}const Z=L.children;for(let Te=0,Me=Z.length;Te<Me;Te++)Vi(Z[Te],$,ne,Q)}function Xn(L,$,ne,Q){const{opaque:Z,transmissive:Te,transparent:Me}=L;P.setupLightsView(ne),Se===!0&&Ke.setGlobalState(R.clippingPlanes,ne),Q&&U.viewport(ce.copy(Q)),Z.length>0&&ni(Z,$,ne),Te.length>0&&ni(Te,$,ne),Me.length>0&&ni(Me,$,ne),U.buffers.depth.setTest(!0),U.buffers.depth.setMask(!0),U.buffers.color.setMask(!0),U.setPolygonOffset(!1)}function qn(L,$,ne,Q){if((ne.isScene===!0?ne.overrideMaterial:null)!==null)return;if(P.state.transmissionRenderTarget[Q.id]===void 0){const St=bt.has("EXT_color_buffer_half_float")||bt.has("EXT_color_buffer_float");P.state.transmissionRenderTarget[Q.id]=new Fi(1,1,{generateMipmaps:!0,type:St?Hs:ts,minFilter:Ll,samples:Math.max(4,xt.samples),stencilBuffer:r,resolveDepthBuffer:!1,resolveStencilBuffer:!1,colorSpace:Nt.
4116workingColorSpace})}const Z=P.state.transmissionRenderTarget[Q.id],Te=Q.viewport||ce;Z.setSize(Te.z*R.transmissionResolutionScale,Te.w*R.transmissionResolutionScale);const Me=R.getRenderTarget(),Ve=R.getActiveCubeFace(),Ge=R.getActiveMipmapLevel();R.setRenderTarget(Z),R.getClearColor(ht),tt=R.getClearAlpha(),tt<1&&R.setClearColor(16777215,.5),R.clear(),lt&&ft.render(ne);const ot=R.toneMapping;R.toneMapping=0;const yt=Q.viewport;if(Q.viewport!==void 0&&(Q.viewport=void 0),P.setupLightsView(Q),Se===!0&&Ke.setGlobalState(R.clippingPlanes,Q),ni(L,ne,Q),ee.updateMultisampleRenderTarget(Z),ee.updateRenderTargetMipmap(Z),bt.has("WEBGL_multisampled_render_to_texture")===!1){let St=!1;for(let it=0,Bt=$.length;it<Bt;it++){const{object:jt,geometry:Mt,material:st,group:nn}=$[it];if(st.side===2&&jt.layers.test(Q.layers)){const He=st.side;st.side=1,st.needsUpdate=!0,Ki(jt,ne,Q,Mt,st,nn),st.side=He,st.needsUpdate=!0,St=!0}}St===!0&&(ee.updateMultisampleRenderTarget(Z),ee.updateRenderTargetMipmap(Z))}R.setRenderTarget(Me,Ve,Ge),R.setClearColor(ht,tt),yt!==void 0&&(Q.viewport=yt),R.toneMapping=ot}function ni(L,$,ne){const Q=$.isScene===!0?$.overrideMaterial:null;for(let Z=0,Te=L.length;Z<Te;Z++){const Me=L[Z],{object:Ve,geometry:Ge,group:ot}=Me;let yt=Me.material;yt.allowOverride===!0&&Q!==null&&(yt=Q),Ve.layers.test(ne.layers)&&Ki(Ve,$,ne,Ge,yt,ot)}}function Ki(L,$,ne,Q,Z,Te){L.onBeforeRender(R,$,ne,Q,Z,Te),L.modelViewMatrix.multiplyMatrices(ne.matrixWorldInverse,L.matrixWorld),L.normalMatrix.getNormalMatrix(L.modelViewMatrix),Z.onBeforeRender(R,$,ne,Q,L,Te),Z.transparent===!0&&Z.side===2&&Z.forceSinglePass===!1?(Z.side=1,Z.needsUpdate=!0,R.renderBufferDirect(ne,$,Q,Z,L,Te),Z.side=0,Z.needsUpdate=!0,R.renderBufferDirect(ne,$,Q,Z,L,Te),Z.side=2):R.renderBufferDirect(ne,$,Q,Z,L,Te),L.onAfterRender(R,$,ne,Q,Z,Te)}function ii(L,$,ne){$.isScene!==!0&&($=Je);const Q=G.get(L),Z=P.state.lights,Te=P.state.shadowsArray,Me=Z.state.version,Ve=Ee.getParameters(L,Z.state,Te,$,ne,P.state.lightProbeGridArray),Ge=Ee.getProgramCacheKey(Ve);let ot=Q.programs;Q.environment=L.isMeshStandardMaterial||L.isMeshLambertMaterial||L.isMeshPhongMaterial?$.environment:null,Q.fog=$.fog;const yt=L.isMeshStandardMaterial||L.isMeshLambertMaterial&&!L.envMap||L.isMeshPhongMaterial&&!L.envMap;Q.envMap=fe.get(L.envMap||Q.environment,yt),Q.envMapRotation=Q.environment!==null&&L.envMap===null?$.environmentRotation:L.envMapRotation,ot===void 0&&(L.addEventListener("dispose",xn),ot=new Map,Q.programs=ot);let St=ot.get(Ge);if(St!==void 0){if(Q.currentProgram===St&&Q.lightsStateVersion===Me)return gr(L,Ve),St}else Ve.uniforms=Ee.getUniforms(L),F!==null&&L.isNodeMaterial&&F.build(L,ne,Ve),L.onBeforeCompile(Ve,R),St=Ee.acquireProgram(Ve,Ge),ot.set(Ge,St),Q.uniforms=Ve.uniforms;const it=Q.uniforms;return(!L.isShaderMaterial&&!L.isRawShaderMaterial||L.clipping===!0)&&(it.clippingPlanes=Ke.uniform),gr(L,Ve),Q.needsLights=yr(L),Q.lightsStateVersion=Me,Q.needsLights&&(it.ambientLightColor.value=Z.state.ambient,it.lightProbe.value=Z.state.probe,it.directionalLights.value=Z.state.directional,it.directionalLightShadows.value=Z.state.directionalShadow,it.spotLights.value=Z.state.spot,it.spotLightShadows.value=Z.state.spotShadow,it.rectAreaLights.value=Z.state.rectArea,it.ltc_1.value=Z.state.rectAreaLTC1,it.ltc_2.value=Z.state.rectAreaLTC2,it.pointLights.value=Z.state.point,it.pointLightShadows.value=Z.state.pointShadow,it.hemisphereLights.value=Z.state.hemi,it.directionalShadowMatrix.value=Z.state.directionalShadowMatrix,it.spotLightMatrix.value=Z.state.spotLightMatrix,it.spotLightMap.value=Z.state.spotLightMap,it.pointShadowMatrix.value=Z.state.pointShadowMatrix),Q.lightProbeGrid=P.state.lightProbeGridArray.length>0,Q.currentProgram=St,Q.uniformsList=null,St}function wi(L){if(L.uniformsList===null){const $=L.currentProgram.getUniforms();L.uniformsList=Dh.seqWithValue($.seq,L.uniforms)}return L.uniformsList}function gr(L,$){const ne=G.get(L);ne.outputColorSpace=$.outputColorSpace,ne.batching=$.batching,ne.batchingColor=$.batchingColor,ne.instancing=$.instancing,ne.instancingColor=$.instancingColor,ne.instancingMorph=$.
vendor: 9,838 bytes, line 4116
4116instancingMorph,ne.skinning=$.skinning,ne.morphTargets=$.morphTargets,ne.morphNormals=$.morphNormals,ne.morphColors=$.morphColors,ne.morphTargetsCount=$.morphTargetsCount,ne.numClippingPlanes=$.numClippingPlanes,ne.numIntersection=$.numClipIntersection,ne.vertexAlphas=$.vertexAlphas,ne.vertexTangents=$.vertexTangents,ne.toneMapping=$.toneMapping}function Rr(L,$){if(L.length===0)return null;if(L.length===1)return L[0].texture!==null?L[0]:null;A.setFromMatrixPosition($.matrixWorld);for(let ne=0,Q=L.length;ne<Q;ne++){const Z=L[ne];if(Z.texture!==null&&Z.boundingBox.containsPoint(A))return Z}return null}function Ir(L,$,ne,Q,Z){$.isScene!==!0&&($=Je),ee.resetTextureUnits();const Te=$.fog,Me=Q.isMeshStandardMaterial||Q.isMeshLambertMaterial||Q.isMeshPhongMaterial?$.environment:null,Ve=J===null?R.outputColorSpace:J.isXRRenderTarget===!0?J.texture.colorSpace:Nt.workingColorSpace,Ge=Q.isMeshStandardMaterial||Q.isMeshLambertMaterial&&!Q.envMap||Q.isMeshPhongMaterial&&!Q.envMap,ot=fe.get(Q.envMap||Me,Ge),yt=Q.vertexColors===!0&&!!ne.attributes.color&&ne.attributes.color.itemSize===4,St=!!ne.attributes.tangent&&(!!Q.normalMap||Q.anisotropy>0),it=!!ne.morphAttributes.position,Bt=!!ne.morphAttributes.normal,jt=!!ne.morphAttributes.color;let Mt=0;Q.toneMapped&&(J===null||J.isXRRenderTarget===!0)&&(Mt=R.toneMapping);const st=ne.morphAttributes.position||ne.morphAttributes.normal||ne.morphAttributes.color,nn=st!==void 0?st.length:0,He=G.get(Q),gn=P.state.lights;if(Se===!0&&(Ae===!0||L!==ue)){const Ft=L===ue&&Q.id===he;Ke.setState(Q,L,Ft)}let Pt=!1;Q.version===He.__version?(He.needsLights&&He.lightsStateVersion!==gn.state.version||He.outputColorSpace!==Ve||Z.isBatchedMesh&&He.batching===!1||!Z.isBatchedMesh&&He.batching===!0||Z.isBatchedMesh&&He.batchingColor===!0&&Z.colorTexture===null||Z.isBatchedMesh&&He.batchingColor===!1&&Z.colorTexture!==null||Z.isInstancedMesh&&He.instancing===!1||!Z.isInstancedMesh&&He.instancing===!0||Z.isSkinnedMesh&&He.skinning===!1||!Z.isSkinnedMesh&&He.skinning===!0||Z.isInstancedMesh&&He.instancingColor===!0&&Z.instanceColor===null||Z.isInstancedMesh&&He.instancingColor===!1&&Z.instanceColor!==null||Z.isInstancedMesh&&He.instancingMorph===!0&&Z.morphTexture===null||Z.isInstancedMesh&&He.instancingMorph===!1&&Z.morphTexture!==null||He.envMap!==ot||Q.fog===!0&&He.fog!==Te||He.numClippingPlanes!==void 0&&(He.numClippingPlanes!==Ke.numPlanes||He.numIntersection!==Ke.numIntersection)||He.vertexAlphas!==yt||He.vertexTangents!==St||He.morphTargets!==it||He.morphNormals!==Bt||He.morphColors!==jt||He.toneMapping!==Mt||He.morphTargetsCount!==nn||!!He.lightProbeGrid!=P.state.lightProbeGridArray.length>0)&&(Pt=!0):(Pt=!0,He.__version=Q.version);let Kt=He.currentProgram;Pt===!0&&(Kt=ii(Q,$,Z),F&&Q.isNodeMaterial&&F.onUpdateProgram(Q,Kt,He));let _n=!1,zn=!1,ri=!1;const zt=Kt.getUniforms(),Xt=He.uniforms;if(U.useProgram(Kt.program)&&(_n=!0,zn=!0,ri=!0),Q.id!==he&&(he=Q.id,zn=!0),He.needsLights){const Ft=Rr(P.state.lightProbeGridArray,Z);He.lightProbeGrid!==Ft&&(He.lightProbeGrid=Ft,zn=!0)}if(_n||ue!==L){U.buffers.depth.getReversed()&&L.reversedDepth!==!0&&(L._reversedDepth=!0,L.updateProjectionMatrix()),zt.setValue(z,"projectionMatrix",L.projectionMatrix),zt.setValue(z,"viewMatrix",L.matrixWorldInverse);const Ft=zt.map.cameraPosition;Ft!==void 0&&Ft.setValue(z,Le.setFromMatrixPosition(L.matrixWorld)),xt.logarithmicDepthBuffer&&zt.setValue(z,"logDepthBufFC",2/(Math.log(L.far+1)/Math.LN2)),(Q.isMeshPhongMaterial||Q.isMeshToonMaterial||Q.isMeshLambertMaterial||Q.isMeshBasicMaterial||Q.isMeshStandardMaterial||Q.isShaderMaterial)&&zt.setValue(z,"isOrthographic",L.isOrthographicCamera===!0),ue!==L&&(ue=L,zn=!0,ri=!0)}if(He.needsLights&&(gn.state.directionalShadowMap.length>0&&zt.setValue(z,"directionalShadowMap",gn.state.directionalShadowMap,ee),gn.state.spotShadowMap.length>0&&zt.setValue(z,"spotShadowMap",gn.state.spotShadowMap,ee),gn.state.pointShadowMap.length>0&&zt.setValue(z,"pointShadowMap",gn.state.pointShadowMap,ee)),Z.isSkinnedMesh){zt.setOptional(z,Z,"bindMatrix"),zt.setOptional(z,Z,"bindMatrixInverse");const Ft=Z.skeleton;Ft&&(Ft.boneTexture===null&&Ft.computeBoneTexture(),zt.setValue(z,"boneTexture",Ft.boneTexture,ee))}Z.isBatchedMesh&&(zt.setOptional(z,Z,"batchingTexture"),zt.setValue(z,"batchingTexture",Z._matricesTexture,ee),zt.setOptional(z,Z,"batchingIdTexture"),zt.setValue(z,"batchingIdTexture",Z._indirectTexture,ee),zt.setOptional(z,Z,"batchingColorTexture"),Z._colorsTexture!==null&&zt.setValue(z,"batchingColorTexture",Z._colorsTexture,ee));const Yn=ne.morphAttributes;if((Yn.position!==void 0||Yn.normal!==void 0||Yn.color!==void 0)&&Rt.update(Z,ne,Kt),(zn||He.receiveShadow!==Z.receiveShadow)&&(He.receiveShadow=Z.receiveShadow,zt.setValue(z,"receiveShadow",Z.receiveShadow)),(Q.isMeshStandardMaterial||Q.isMeshLambertMaterial||Q.isMeshPhongMaterial)&&Q.envMap===null&&$.environment!==null&&(Xt.envMapIntensity.value=$.environmentIntensity),Xt.dfgLUT!==void 0&&(Xt.dfgLUT.value=YE()),zn){if(zt.setValue(z,"toneMappingExposure",R.toneMappingExposure),He.needsLights&&vr(Xt,ri),Te&&Q.fog===!0&&ze.refreshFogUniforms(Xt,Te),ze.refreshMaterialUniforms(Xt,Q,Ie,ge,P.state.transmissionRenderTarget[L.id]),He.needsLights&&He.lightProbeGrid){const Ft=He.lightProbeGrid;Xt.probesSH.value=Ft.texture,Xt.probesMin.value.copy(Ft.boundingBox.min),Xt.probesMax.value.copy(Ft.boundingBox.max),Xt.probesResolution.value.copy(Ft.resolution)}Dh.upload(z,wi(He),Xt,ee)}if(Q.isShaderMaterial&&Q.uniformsNeedUpdate===!0&&(Dh.upload(z,wi(He),Xt,ee),Q.uniformsNeedUpdate=!1),Q.isSpriteMaterial&&zt.setValue(z,"center",Z.center),zt.setValue(z,"modelViewMatrix",Z.modelViewMatrix),zt.setValue(z,"normalMatrix",Z.normalMatrix),zt.setValue(z,"modelMatrix",Z.matrixWorld),Q.uniformsGroups!==void 0){const Ft=Q.uniformsGroups;for(let Ei=0,pi=Ft.length;Ei<pi;Ei++){const Qi=Ft[Ei];je.update(Qi,Kt),je.bind(Qi,Kt)}}return Kt}function vr(L,$){L.ambientLightColor.needsUpdate=$,L.lightProbe.needsUpdate=$,L.directionalLights.needsUpdate=$,L.directionalLightShadows.needsUpdate=$,L.pointLights.needsUpdate=$,L.pointLightShadows.needsUpdate=$,L.spotLights.needsUpdate=$,L.spotLightShadows.needsUpdate=$,L.rectAreaLights.needsUpdate=$,L.hemisphereLights.needsUpdate=$}function yr(L){return L.isMeshLambertMaterial||L.isMeshToonMaterial||L.isMeshPhongMaterial||L.isMeshStandardMaterial||L.isShadowMaterial||L.isShaderMaterial&&L.lights===!0}this.getActiveCubeFace=function(){return q},this.getActiveMipmapLevel=function(){return te},this.getRenderTarget=function(){return J},this.setRenderTargetTextures=function(L,$,ne){const Q=G.get(L);Q.__autoAllocateDepthBuffer=L.resolveDepthBuffer===!1,Q.__autoAllocateDepthBuffer===!1&&(Q.__useRenderToTexture=!1),G.get(L.texture).__webglTexture=$,G.get(L.depthTexture).__webglTexture=Q.__autoAllocateDepthBuffer?void 0:ne,Q.__hasExternalTextures=!0},this.setRenderTargetFramebuffer=function(L,$){const ne=G.get(L);ne.__webglFramebuffer=$,ne.__useDefaultFramebuffer=$===void 0},this.setRenderTarget=function(L,$=0,ne=0){J=L,q=$,te=ne;let Q=null,Z=!1,Te=!1;if(L){const Me=G.get(L);if(Me.__useDefaultFramebuffer!==void 0){U.bindFramebuffer(z.FRAMEBUFFER,Me.__webglFramebuffer),ce.copy(L.viewport),me.copy(L.scissor),_e=L.scissorTest,U.viewport(ce),U.scissor(me),U.setScissorTest(_e),he=-1;return}else if(Me.__webglFramebuffer===void 0)ee.setupRenderTarget(L);else if(Me.__hasExternalTextures)ee.rebindTextures(L,G.get(L.texture).__webglTexture,G.get(L.depthTexture).__webglTexture);else if(L.depthBuffer){const ot=L.depthTexture;if(Me.__boundDepthTexture!==ot){if(ot!==null&&G.has(ot)&&(L.width!==ot.image.width||L.height!==ot.image.height))throw new Error("THREE.WebGLRenderer: Attached DepthTexture is initialized to the incorrect size.");ee.setupDepthRenderbuffer(L)}}const Ve=L.texture;(Ve.isData3DTexture||Ve.isDataArrayTexture||Ve.isCompressedArrayTexture)&&(Te=!0);const Ge=G.get(L).__webglFramebuffer;L.isWebGLCubeRenderTarget?(Array.isArray(Ge[$])?Q=Ge[$][ne]:Q=Ge[$],Z=!0):L.samples>0&&ee.useMultisampledRTT(L)===!1?Q=G.get(L).__webglMultisampledFramebuffer:Array.isArray(Ge)?Q=Ge[ne]:Q=Ge,ce.copy(L.viewport),me.copy(L.scissor),_e=L.scissorTest}else ce.copy(et).multiplyScalar(Ie).floor(),me.copy(Ze).multiplyScalar(Ie).floor(),_e=ct;if(ne!==0&&(Q=j),U.bindFramebuffer(z.FRAMEBUFFER,Q)&&U.drawBuffers(L,Q),U.viewport(ce),U.scissor(me),U.setScissorTest(_e),Z){const Me=G.get(L.texture);z.framebufferTexture2D(z.FRAMEBUFFER,z.COLOR_ATTACHMENT0,z.TEXTURE_CUBE_MAP_POSITIVE_X+$,Me.__webglTexture,ne)}else if(Te){const Me=$;for(let Ve=0;Ve<L.textures.length;Ve++){const Ge=G.get(L.textures[Ve]);z.framebufferTextureLayer(z.FRAMEBUFFER,z.COLOR_ATTACHMENT0+Ve,Ge.__webglTexture,ne,Me)}}else if(L!==null&&ne!==0){const Me=G.get(L.texture);z.framebufferTexture2D(z.FRAMEBUFFER,z.COLOR_ATTACHMENT0,z.TEXTURE_2D,Me.__webglTexture,ne)}he=-1},this.readRenderTargetPixels=function(L,$,ne,Q,Z,Te,Me,Ve=0){if(!(L&&L.isWebGLRenderTarget)){rt("WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let Ge=G.get(L).__webglFramebuffer;if(L.isWebGLCubeRenderTarget&&Me!==void 0&&(Ge=Ge[Me]),Ge){U.bindFramebuffer(z.FRAMEBUFFER,Ge);try{const ot=L.textures[Ve],yt=ot.format,St=ot.type;if(L.textures.length>1&&z.readBuffer(z.COLOR_ATTACHMENT0+Ve),!xt.textureFormatReadable(yt)){rt("WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}if(!xt.textureTypeReadable(St)){rt("WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}$>=0&&$<=L.width-Q&&ne>=0&&ne<=L.height-Z&&z.readPixels($,ne,Q,Z,ve.convert(yt),ve.convert(St),Te)}finally{const ot=J!==null?G.get(J).__webglFramebuffer:null;U.bindFramebuffer(z.FRAMEBUFFER,ot)}}},this.readRenderTargetPixelsAsync=async function(L,$,ne,Q,Z,Te,Me,Ve=0){
vendor: 5,820 bytes, line 4116
4116if(!(L&&L.isWebGLRenderTarget))throw new Error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let Ge=G.get(L).__webglFramebuffer;if(L.isWebGLCubeRenderTarget&&Me!==void 0&&(Ge=Ge[Me]),Ge)if($>=0&&$<=L.width-Q&&ne>=0&&ne<=L.height-Z){U.bindFramebuffer(z.FRAMEBUFFER,Ge);const ot=L.textures[Ve],yt=ot.format,St=ot.type;if(L.textures.length>1&&z.readBuffer(z.COLOR_ATTACHMENT0+Ve),!xt.textureFormatReadable(yt))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in RGBA or implementation defined format.");if(!xt.textureTypeReadable(St))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in UnsignedByteType or implementation defined type.");const it=z.createBuffer();z.bindBuffer(z.PIXEL_PACK_BUFFER,it),z.bufferData(z.PIXEL_PACK_BUFFER,Te.byteLength,z.STREAM_READ),z.readPixels($,ne,Q,Z,ve.convert(yt),ve.convert(St),0);const Bt=J!==null?G.get(J).__webglFramebuffer:null;U.bindFramebuffer(z.FRAMEBUFFER,Bt);const jt=z.fenceSync(z.SYNC_GPU_COMMANDS_COMPLETE,0);return z.flush(),await PM(z,jt,4),z.bindBuffer(z.PIXEL_PACK_BUFFER,it),z.getBufferSubData(z.PIXEL_PACK_BUFFER,0,Te),z.deleteBuffer(it),z.deleteSync(jt),Te}else throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: requested read bounds are out of range.")},this.copyFramebufferToTexture=function(L,$=null,ne=0){const Q=Math.pow(2,-ne),Z=Math.floor(L.image.width*Q),Te=Math.floor(L.image.height*Q),Me=$!==null?$.x:0,Ve=$!==null?$.y:0;ee.setTexture2D(L,0),z.copyTexSubImage2D(z.TEXTURE_2D,ne,0,0,Me,Ve,Z,Te),U.unbindTexture()},this.copyTextureToTexture=function(L,$,ne=null,Q=null,Z=0,Te=0){let Me,Ve,Ge,ot,yt,St,it,Bt,jt;const Mt=L.isCompressedTexture?L.mipmaps[Te]:L.image;if(ne!==null)Me=ne.max.x-ne.min.x,Ve=ne.max.y-ne.min.y,Ge=ne.isBox3?ne.max.z-ne.min.z:1,ot=ne.min.x,yt=ne.min.y,St=ne.isBox3?ne.min.z:0;else{const Xt=Math.pow(2,-Z);Me=Math.floor(Mt.width*Xt),Ve=Math.floor(Mt.height*Xt),L.isDataArrayTexture?Ge=Mt.depth:L.isData3DTexture?Ge=Math.floor(Mt.depth*Xt):Ge=1,ot=0,yt=0,St=0}Q!==null?(it=Q.x,Bt=Q.y,jt=Q.z):(it=0,Bt=0,jt=0);const st=ve.convert($.format),nn=ve.convert($.type);let He;$.isData3DTexture?(ee.setTexture3D($,0),He=z.TEXTURE_3D):$.isDataArrayTexture||$.isCompressedArrayTexture?(ee.setTexture2DArray($,0),He=z.TEXTURE_2D_ARRAY):(ee.setTexture2D($,0),He=z.TEXTURE_2D),U.activeTexture(z.TEXTURE0),U.pixelStorei(z.UNPACK_FLIP_Y_WEBGL,$.flipY),U.pixelStorei(z.UNPACK_PREMULTIPLY_ALPHA_WEBGL,$.premultiplyAlpha),U.pixelStorei(z.UNPACK_ALIGNMENT,$.unpackAlignment);const gn=U.getParameter(z.UNPACK_ROW_LENGTH),Pt=U.getParameter(z.UNPACK_IMAGE_HEIGHT),Kt=U.getParameter(z.UNPACK_SKIP_PIXELS),_n=U.getParameter(z.UNPACK_SKIP_ROWS),zn=U.getParameter(z.UNPACK_SKIP_IMAGES);U.pixelStorei(z.UNPACK_ROW_LENGTH,Mt.width),U.pixelStorei(z.UNPACK_IMAGE_HEIGHT,Mt.height),U.pixelStorei(z.UNPACK_SKIP_PIXELS,ot),U.pixelStorei(z.UNPACK_SKIP_ROWS,yt),U.pixelStorei(z.UNPACK_SKIP_IMAGES,St);const ri=L.isDataArrayTexture||L.isData3DTexture,zt=$.isDataArrayTexture||$.isData3DTexture;if(L.isDepthTexture){const Xt=G.get(L),Yn=G.get($),Ft=G.get(Xt.__renderTarget),Ei=G.get(Yn.__renderTarget);U.bindFramebuffer(z.READ_FRAMEBUFFER,Ft.__webglFramebuffer),U.bindFramebuffer(z.DRAW_FRAMEBUFFER,Ei.__webglFramebuffer);for(let pi=0;pi<Ge;pi++)ri&&(z.framebufferTextureLayer(z.READ_FRAMEBUFFER,z.COLOR_ATTACHMENT0,G.get(L).__webglTexture,Z,St+pi),z.framebufferTextureLayer(z.DRAW_FRAMEBUFFER,z.COLOR_ATTACHMENT0,G.get($).__webglTexture,Te,jt+pi)),z.blitFramebuffer(ot,yt,Me,Ve,it,Bt,Me,Ve,z.DEPTH_BUFFER_BIT,z.NEAREST);U.bindFramebuffer(z.READ_FRAMEBUFFER,null),U.bindFramebuffer(z.DRAW_FRAMEBUFFER,null)}else if(Z!==0||L.isRenderTargetTexture||G.has(L)){const Xt=G.get(L),Yn=G.get($);U.bindFramebuffer(z.READ_FRAMEBUFFER,H),U.bindFramebuffer(z.DRAW_FRAMEBUFFER,Y);for(let Ft=0;Ft<Ge;Ft++)ri?z.framebufferTextureLayer(z.READ_FRAMEBUFFER,z.COLOR_ATTACHMENT0,Xt.__webglTexture,Z,St+Ft):z.framebufferTexture2D(z.READ_FRAMEBUFFER,z.COLOR_ATTACHMENT0,z.TEXTURE_2D,Xt.__webglTexture,Z),zt?z.framebufferTextureLayer(z.DRAW_FRAMEBUFFER,z.COLOR_ATTACHMENT0,Yn.__webglTexture,Te,jt+Ft):z.framebufferTexture2D(z.DRAW_FRAMEBUFFER,z.COLOR_ATTACHMENT0,z.TEXTURE_2D,Yn.__webglTexture,Te),Z!==0?z.blitFramebuffer(ot,yt,Me,Ve,it,Bt,Me,Ve,z.COLOR_BUFFER_BIT,z.NEAREST):zt?z.copyTexSubImage3D(He,Te,it,Bt,jt+Ft,ot,yt,Me,Ve):z.copyTexSubImage2D(He,Te,it,Bt,ot,yt,Me,Ve);U.bindFramebuffer(z.READ_FRAMEBUFFER,null),U.bindFramebuffer(z.DRAW_FRAMEBUFFER,null)}else zt?L.isDataTexture||L.isData3DTexture?z.texSubImage3D(He,Te,it,Bt,jt,Me,Ve,Ge,st,nn,Mt.data):$.isCompressedArrayTexture?z.compressedTexSubImage3D(He,Te,it,Bt,jt,Me,Ve,Ge,st,Mt.data):z.texSubImage3D(He,Te,it,Bt,jt,Me,Ve,Ge,st,nn,Mt):L.isDataTexture?z.texSubImage2D(z.TEXTURE_2D,Te,it,Bt,Me,Ve,st,nn,Mt.data):L.isCompressedTexture?z.compressedTexSubImage2D(z.TEXTURE_2D,Te,it,Bt,Mt.width,Mt.height,st,Mt.data):z.texSubImage2D(z.TEXTURE_2D,Te,it,Bt,Me,Ve,st,nn,Mt);U.pixelStorei(z.UNPACK_ROW_LENGTH,gn),U.pixelStorei(z.UNPACK_IMAGE_HEIGHT,Pt),U.pixelStorei(z.UNPACK_SKIP_PIXELS,Kt),U.pixelStorei(z.UNPACK_SKIP_ROWS,_n),U.pixelStorei(z.UNPACK_SKIP_IMAGES,zn),Te===0&&$.generateMipmaps&&z.generateMipmap(He),U.unbindTexture()},this.initRenderTarget=function(L){G.get(L).__webglFramebuffer===void 0&&ee.setupRenderTarget(L)},this.initTexture=function(L){L.isCubeTexture?ee.setTextureCube(L,0):L.isData3DTexture?ee.setTexture3D(L,0):L.isDataArrayTexture||L.isCompressedArrayTexture?ee.setTexture2DArray(L,0):ee.setTexture2D(L,0),U.unbindTexture()},this.resetState=function(){q=0,te=0,J=null,U.reset(),Be.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return Ws}get outputColorSpace(){return this._outputColorSpace}
4116set outputColorSpace(e){this._outputColorSpace=e;const t=this.getContext();t.drawingBufferColorSpace=Nt._getDrawingBufferColorSpace(e),t.unpackColorSpace=Nt._getUnpackColorSpace()}},$E=Wh(vb(),1),hv=e=>{let t;const n=new Set,i=(f,p)=>{const g=typeof f=="function"?f(t):f;if(!Object.is(g,t)){const m=t;t=p??(typeof g!="object"||g===null)?g:Object.assign({},t,g),n.forEach(v=>v(t,m))}},r=()=>t,u={setState:i,getState:r,getInitialState:()=>h,subscribe:f=>(n.add(f),()=>n.delete(f))},h=t=e(i,r,u);return u},ZE=(e=>e?hv(e):hv),{useSyncExternalStoreWithSelector:JE}=$E.default,KE=e=>e;function QE(e,t=KE,n){const i=JE(e.subscribe,e.getState,e.getInitialState,t,n);return de.useDebugValue(i),i}var fv=(e,t)=>{const n=ZE(e),i=(r,o=t)=>QE(n,r,o);return Object.assign(i,n),i},eT=((e,t)=>e?fv(e,t):fv),tT=e=>typeof e=="object"&&typeof e.then=="function",co=[];function kx(e,t,n=(i,r)=>i===r){if(e===t)return!0;if(!e||!t)return!1;const i=e.length;if(t.length!==i)return!1;for(let r=0;r<i;r++)if(!n(e[r],t[r]))return!1;return!0}function Bx(e,t=null,n=!1,i={}){t===null&&(t=[e]);for(const o of co)if(kx(t,o.keys,o.equal)){if(n)return;if(Object.prototype.hasOwnProperty.call(o,"error"))throw o.error;if(Object.prototype.hasOwnProperty.call(o,"response"))return i.lifespan&&i.lifespan>0&&(o.timeout&&clearTimeout(o.timeout),o.timeout=setTimeout(o.remove,i.lifespan)),o.response;if(!n)throw o.promise}const r={keys:t,equal:i.equal,remove:()=>{const o=co.indexOf(r);o!==-1&&co.splice(o,1)},promise:(tT(e)?e:e(...t)).then(o=>{r.response=o,i.lifespan&&i.lifespan>0&&(r.timeout=setTimeout(r.remove,i.lifespan))}).catch(o=>r.error=o)};if(co.push(r),!n)throw r.promise}var nT=(e,t,n)=>Bx(e,t,!1,n),iT=(e,t,n)=>{Bx(e,t,!0,n)},rT=e=>{if(e===void 0||e.length===0)co.splice(0,co.length);else{const t=co.find(n=>kx(e,n.keys,n.equal));t&&t.remove()}},Dp=Wh(Eb()),lA=(()=>{var e,t;return typeof window<"u"&&(((e=window.document)==null?void 0:e.createElement)||((t=window.navigator)==null?void 0:t.product)==="ReactNative")})()?de.useLayoutEffect:de.useEffect;function D0(e,t,n){if(!e)return;if(n(e)===!0)return e;let i=t?e.return:e.child;for(;i;){const r=D0(i,t,n);if(r)return r;i=t?null:i.sibling}}function zx(e){try{return Object.defineProperties(e,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return e}}var U0=zx(de.createContext(null)),Vx=class extends de.Component{render(){return de.createElement(U0.Provider,{value:this._reactInternals},this.props.children)}};function Gx(){const e=de.useContext(U0);if(e===null)throw new Error("its-fine: useFiber must be called within a <FiberProvider />!");const t=de.useId();return de.useMemo(()=>{for(const n of[e,e?.alternate]){if(!n)continue;const i=D0(n,!1,r=>{let o=r.memoizedState;for(;o;){if(o.memoizedState===t)return!0;o=o.next}});if(i)return i}},[e,t])}var sT=Symbol.for("react.context"),aT=e=>e!==null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===sT;function oT(){const e=Gx(),[t]=de.useState(()=>new Map);t.clear();let n=e;for(;n;){const i=n.type;aT(i)&&i!==U0&&!t.has(i)&&t.set(i,de.use(zx(i))),n=n.return}return t}function lT(){const e=oT();return de.useMemo(()=>Array.from(e.keys()).reduce((t,n)=>i=>de.createElement(t,null,de.createElement(n.Provider,{...i,value:e.get(n)})),t=>de.createElement(Vx,{...t})),[e])}function O0(e){let t=e.root;for(;t.getState().previousRoot;)t=t.getState().previousRoot;return t}var Hx=e=>e&&e.isOrthographicCamera,cT=e=>e&&e.hasOwnProperty("current"),uT=e=>e!=null&&(typeof e=="string"||typeof e=="number"||e.isColor),Kc=((e,t)=>typeof window<"u"&&(((e=window.document)==null?void 0:e.createElement)||((t=window.navigator)==null?void 0:t.product)==="ReactNative"))()?de.useLayoutEffect:de.useEffect;function Wx(e){const t=de.useRef(e);return Kc(()=>{t.current=e},[e]),t}function hT(){const e=Gx(),t=lT();return de.useMemo(()=>({children:n})=>(0,x.jsx)(D0(e,!0,i=>i.type===de.StrictMode)?de.StrictMode:de.Fragment,{children:(0,x.jsx)(t,{children:n})}),[e,t])}function fT({set:e}){return Kc(()=>(e(new Promise(()=>null)),()=>e(!1)),[e]),null}var dT=(e=>(e=class extends de.Component{constructor(...n){super(...n),this.state={error:!1}}componentDidCatch(n){this.props.set(n)}render(){return this.state.error?null:this.props.children}},e.getDerivedStateFromError=()=>({error:!0}),e))();function jx(e){var t;const n=typeof window<"u"?(t=window.devicePixelRatio)!=null?t:2:1;return Array.isArray(e)?Math.min(Math.max(e[0],n),e[1]):e}function vl(e){var t;return(t=e.__r3f)==null?void 0:t.root.getState()}var rn={obj:e=>e===Object(e)&&!rn.arr(e)&&typeof e!="function",fun:e=>typeof e=="function",str:e=>typeof e=="string",num:e=>typeof e=="number",boo:e=>typeof e=="boolean",und:e=>e===void 0,nul:e=>e===null,arr:e=>Array.isArray(e),equ(e,t,{arrays:n="shallow",objects:i="reference",strict:r=!0}={}){if(typeof e!=typeof t||!!e!=!!t)return!1;if(rn.str(e)||rn.num(e)||rn.boo(e))return e===t;const o=rn.obj(e);if(o&&i==="reference")return e===t;const l=rn.arr(e);if(l&&n==="reference")return e===t;if((l||o)&&e===t)return!0;let u;for(u in e)if(!(u in t))return!1;if(o&&n==="shallow"&&i==="shallow"){for(u in r?t:e)if(!rn.equ(e[u],t[u],{strict:r,objects:"reference"}))return!1}else for(u in r?t:e)if(e[u]!==t[u])return!1;if(rn.und(u)){if(l&&e.length===0&&t.length===0||o&&Object.keys(e).length===0&&Object.keys(t).length===0)return!0;
4116if(e!==t)return!1}return!0}};function pT(e){const t={nodes:{},materials:{},meshes:{}};return e&&e.traverse(n=>{n.name&&(t.nodes[n.name]=n),n.material&&!t.materials[n.material.name]&&(t.materials[n.material.name]=n.material),n.isMesh&&!t.meshes[n.name]&&(t.meshes[n.name]=n)}),t}function mT(e){e.type!=="Scene"&&(e.dispose==null||e.dispose());for(const t in e){const n=e[t];n?.type!=="Scene"&&(n==null||n.dispose==null||n.dispose())}}var Xx=["children","key","ref"];function gT(e){const t={};for(const n in e)Xx.includes(n)||(t[n]=e[n]);return t}function zh(e,t,n,i){const r=e;let o=r?.__r3f;return o||(o={root:t,type:n,parent:null,children:[],props:gT(i),object:r,eventCount:0,handlers:{},isHidden:!1},r&&(r.__r3f=o)),o}function qc(e,t){if(!t.includes("-"))return{root:e,key:t,target:e[t]};if(t in e)return{root:e,key:t,target:e[t]};let n=e;const i=t.split("-");for(const r of i){if(typeof n!="object"||n===null){if(n!==void 0){const o=i.slice(i.indexOf(r)).join("-");return{root:n,key:o,target:void 0}}return{root:e,key:t,target:void 0}}t=r,e=n,n=n[t]}return{root:e,key:t,target:n}}var dv=/-\d+$/;function Vh(e,t){if(rn.str(t.props.attach)){if(dv.test(t.props.attach)){const r=t.props.attach.replace(dv,""),{root:o,key:l}=qc(e.object,r);Array.isArray(o[l])||(o[l]=[])}const{root:n,key:i}=qc(e.object,t.props.attach);t.previousAttach=n[i],n[i]=t.object}else rn.fun(t.props.attach)&&(t.previousAttach=t.props.attach(e.object,t.object))}function Gh(e,t){if(rn.str(t.props.attach)){const{root:n,key:i}=qc(e.object,t.props.attach),r=t.previousAttach;r===void 0?delete n[i]:n[i]=r}else t.previousAttach==null||t.previousAttach(e.object,t.object);delete t.previousAttach}var Up=[...Xx,"args","dispose","attach","object","onUpdate","dispose"],pv=new Map;function vT(e){let t=pv.get(e.constructor);try{t||(t=new e.constructor,pv.set(e.constructor,t))}catch{}return t}function yT(e,t){const n={};for(const i in t)if(!Up.includes(i)&&!rn.equ(t[i],e.props[i])){n[i]=t[i];for(const r in t)r.startsWith(`${i}-`)&&(n[r]=t[r])}for(const i in e.props){if(Up.includes(i)||t.hasOwnProperty(i))continue;const{root:r,key:o}=qc(e.object,i);if(r.constructor&&r.constructor.length===0){const l=vT(r);rn.und(l)||(n[o]=l[o])}else n[o]=0}return n}var xT=["map","emissiveMap","sheenColorMap","specularColorMap","envMap"],_T=/^on(Pointer|Click|DoubleClick|ContextMenu|Wheel)/;function Bs(e,t){var n;const i=e.__r3f,r=i&&O0(i).getState(),o=i?.eventCount;for(const u in t){let h=t[u];if(Up.includes(u))continue;if(i&&_T.test(u)){typeof h=="function"?i.handlers[u]=h:delete i.handlers[u],i.eventCount=Object.keys(i.handlers).length;continue}if(h===void 0)continue;let{root:f,key:p,target:g}=qc(e,u);if(g===void 0&&(typeof f!="object"||f===null))throw Error(`R3F: Cannot set "${u}". Ensure it is an object before setting "${p}".`);if(g instanceof Al&&h instanceof Al)g.mask=h.mask;else if(g instanceof Xe&&uT(h))g.set(h);else if(g!==null&&typeof g=="object"&&typeof g.set=="function"&&typeof g.copy=="function"&&h!=null&&h.constructor&&g.constructor===h.constructor)g.copy(h);else if(g!==null&&typeof g=="object"&&typeof g.set=="function"&&Array.isArray(h))typeof g.fromArray=="function"?g.fromArray(h):g.set(...h);else if(g!==null&&typeof g=="object"&&typeof g.set=="function"&&typeof h=="number")typeof g.setScalar=="function"?g.setScalar(h):g.set(h);else if(f instanceof Si&&p==="uniforms"&&rn.obj(h)){rn.obj(f.uniforms)||(f.uniforms={});const m=f.uniforms,v=h;for(const b in v){const w=v[b],S=m[b];S?Object.assign(S,w):m[b]={...w}}}else{var l;f[p]=h,r&&!r.linear&&xT.includes(p)&&(l=f[p])!=null&&l.isTexture&&f[p].format===1023&&f[p].type===1009&&(f[p].colorSpace
4116=ci)}}if(i!=null&&i.parent&&r!=null&&r.internal&&(n=i.object)!=null&&n.isObject3D&&o!==i.eventCount){const u=i.object,h=r.internal.interaction.indexOf(u);h>-1&&r.internal.interaction.splice(h,1),i.eventCount&&u.raycast!==null&&r.internal.interaction.push(u)}return i&&i.props.attach===void 0&&(i.object.isBufferGeometry?i.props.attach="geometry":i.object.isMaterial&&(i.props.attach="material")),i&&Bl(i),e}function Bl(e){var t;if(!e.parent)return;e.props.onUpdate==null||e.props.onUpdate(e.object);const n=(t=e.root)==null||t.getState==null?void 0:t.getState();n&&n.internal.frames===0&&n.invalidate()}function bT(e,t){e.manual||(Hx(e)?(e.left=t.width/-2,e.right=t.width/2,e.top=t.height/2,e.bottom=t.height/-2):e.aspect=t.width/t.height,e.updateProjectionMatrix())}var li=e=>e?.isObject3D;function wc(e){return(e.eventObject||e.object).uuid+"/"+e.index+e.instanceId}function qx(e,t,n,i){const r=n.get(t);r&&(n.delete(t),n.size===0&&(e.delete(i),r.target.releasePointerCapture(i)))}function ST(e,t,n){const{internal:i}=e.getState();for(let r=0;r<i.interaction.length;r++)i.interaction[r]===t&&(i.interaction[r]=n);for(let r=0;r<i.initialHits.length;r++)i.initialHits[r]===t&&(i.initialHits[r]=n);i.hovered.forEach((r,o)=>{if(r.eventObject===t||r.object===t){i.hovered.delete(o);const l={...r,eventObject:r.eventObject===t?n:r.eventObject,object:r.object===t?n:r.object};i.hovered.set(wc(l),l)}}),i.capturedMap.forEach(r=>{const o=r.get(t);o&&(r.delete(t),r.set(n,o))})}function MT(e,t){const{internal:n}=e.getState();n.interaction=n.interaction.filter(i=>i!==t),n.initialHits=n.initialHits.filter(i=>i!==t),n.hovered.forEach((i,r)=>{(i.eventObject===t||i.object===t)&&n.hovered.delete(r)}),n.capturedMap.forEach((i,r)=>{qx(n.capturedMap,t,i,r)})}function wT(e){function t(h){const{internal:f}=e.getState(),p=h.offsetX-f.initialClick[0],g=h.offsetY-f.initialClick[1];return Math.round(Math.sqrt(p*p+g*g))}function n(h){return h.filter(f=>["Move","Over","Enter","Out","Leave"].some(p=>{var g;return(g=f.__r3f)==null?void 0:g.handlers["onPointer"+p]}))}function i(h,f){const p=e.getState(),g=new Set,m=[],v=f?f(p.internal.interaction):p.internal.interaction;for(let _=0;_<v.length;_++){const C=vl(v[_]);C&&(C.raycaster.camera=void 0)}p.previousRoot||p.events.compute==null||p.events.compute(h,p);function b(_){const C=vl(_);if(!C||!C.events.enabled||C.raycaster.camera===null)return[];if(C.raycaster.camera===void 0){var A;C.events.compute==null||C.events.compute(h,C,(A=C.previousRoot)==null?void 0:A.getState()),C.raycaster.camera===void 0&&(C.raycaster.camera=null)}return C.raycaster.camera?C.raycaster.intersectObject(_,!0):[]}let w=v.flatMap(b).sort((_,C)=>{const A=vl(_.object),E=vl(C.object);return!A||!E?_.distance-C.distance:E.events.priority-A.events.priority||_.distance-C.distance}).filter(_=>{const C=wc(_);return g.has(C)?!1:(g.add(C),!0)});p.events.filter&&(w=p.events.filter(w,p));for(const _ of w){let C=_.object;for(;C;){var S;(S=C.__r3f)!=null&&S.eventCount&&m.push({..._,eventObject:C}),C=C.parent}}if("pointerId"in h&&p.internal.capturedMap.has(h.pointerId))for(let _ of p.internal.capturedMap.get(h.pointerId).values())g.has(wc(_.intersection))||m.push(_.intersection);return m}function r(h,f,p,g){if(h.length){const m={stopped:!1};for(const v of h){let b=vl(v.object);if(b||v.object.traverseAncestors(w=>{const S=vl(w);if(S)return b=S,!1}),b){const{raycaster:w,pointer:S,camera:_,internal:C}=b,A=new k(S.x,S.y,0).unproject(_),E=R=>{var B,F;return(B=(F=C.capturedMap.get(R))==null?void 0:F.has(v.eventObject))!=null?B:!1},P=R=>{const B={intersection:v,target:f.target};C.capturedMap.has(R)?C.capturedMap.get(R).set(v.eventObject,B):C.capturedMap.set(R,new Map([[v.eventObject,B]])),f.target.setPointerCapture(R)},N=R=>{const B=C.capturedMap.get(R);B&&qx(C.capturedMap,v.eventObject,B,R)};let O={};for(let R in f){let B=f[R];typeof B!="function"&&(O[R]=B)}let T={...v,...O,pointer:S,intersections:h,stopped:m.stopped,delta:p,unprojectedPoint:A,ray:w.ray,camera:_,stopPropagation(){const R="pointerId"in f&&C.capturedMap.get(f.pointerId);(!R||R.has(v.eventObject))&&(T.stopped=m.stopped=!0,C.hovered.size&&Array.from(C.hovered.values()).find(B=>B.eventObject===v.eventObject)&&o([...h.slice(0,h.indexOf(v)),v]))},target:{hasPointerCapture:E,setPointerCapture:P,releasePointerCapture:N},currentTarget:{hasPointerCapture:E,setPointerCapture:P,releasePointerCapture:N},nativeEvent:f};if(g(T),m.stopped===!0)break}}}return h}function o(h){const{internal:f}=e.getState();for(const p of f.hovered.values())if(!h.length||!h.find(g=>g.object===p.object&&g.index===p.index&&g.instanceId===p.instanceId)){const g=p.eventObject.__r3f;if(f.hovered.delete(wc(p)),g!=null&&g.eventCount){const m=g.handlers,v={...p,intersections:h};m.onPointerOut==null||m.onPointerOut(v),m.onPointerLeave==null||m.onPointerLeave(v)}}}function l(h,f){for(let p=0;p<f.length;p++){const g=f[p].__r3f;g==null||g.handlers.onPointerMissed==null||g.handlers.onPointerMissed(h)}}function u(h){switch(h){case"onPointerLeave":case"onPointerCancel":return()=>o([]);case"onLostPointerCapture":return f=>{const{internal:p}=e.getState();"pointerId"in f&&p.capturedMap.has(f.pointerId)&&requestAnimationFrame(()=>{p.capturedMap.has(f.pointerId)&&(p.capturedMap.delete(f.pointerId),o([]))})}}return function(p){const{onPointerMissed:g,internal:m}=e.getState();m.lastEvent.current=p;const v=h==="onPointerMove",b=h==="onClick"||h==="onContextMenu"||h==="onDoubleClick",w=i(p,v?n:void 0),S=b?t(p):0;h==="onPointerDown"&&(m.initialClick=[p.offsetX,p.offsetY],m.initialHits=w.map(C=>C.eventObject)),b&&!w.length&&S<=2&&(l(p,m.interaction),g&&g(p)),v&&o(w);function _(C){const A=C.eventObject,E=A.__r3f;if(!(E!=null&&E.eventCount))return;const P=E.handlers;if(v){if(P.onPointerOver||P.onPointerEnter||P.onPointerOut||P.onPointerLeave){const N=wc(C),O=m.hovered.get(N);O?O.stopped&&C.stopPropagation():(m.hovered.set(N,C),P.onPointerOver==null||P.onPointerOver(C),P.onPointerEnter==null||P.onPointerEnter(C))}P.onPointerMove==null||P.onPointerMove(C)}else{const N=P[h];N?(!b||m.initialHits.includes(A))&&(l(p,m.interaction.filter(O=>!m.initialHits.includes(O))),N(C)):b&&m.initialHits.includes(A)&&l(p,m.interaction.filter(O=>!m.initialHits.includes(O)))}}r(w,p,S,_)}}return{handlePointer:u}}var mv=e=>!!(e!=null&&e.render),Yx=de.createContext(null),ET=(e,t)=>{const n=eT((u,h)=>{const f=new k,p=new k,g=new k;function m(S=h().camera,_=p,C=h().size){const{width:A,height:E,top:P,left:N}=C,O=A/E;_.isVector3?g.copy(_):g.set(..._);const T=S.getWorldPosition(f).distanceTo(g);if(Hx(S))return{width:A/S.zoom,height:E/S.zoom,top:P,left:N,factor:1,distance:T,aspect:O};
vendor: 4,097 bytes, line 4116
4116{const R=S.fov*Math.PI/180,B=2*Math.tan(R/2)*T,F=B*(A/E);return{width:F,height:B,top:P,left:N,factor:A/F,distance:T,aspect:O}}}let v;const b=S=>u(_=>({performance:{..._.performance,current:S}})),w=new ye;return{set:u,get:h,gl:null,camera:null,raycaster:null,events:{priority:1,enabled:!0,connected:!1},scene:null,xr:null,invalidate:(S=1)=>e(h(),S),advance:(S,_)=>t(S,_,h()),legacy:!1,linear:!1,flat:!1,controls:null,clock:new Ex,pointer:w,mouse:w,frameloop:"always",onPointerMissed:void 0,performance:{current:1,min:.5,max:1,debounce:200,regress:()=>{const S=h();v&&clearTimeout(v),S.performance.current!==S.performance.min&&b(S.performance.min),v=setTimeout(()=>b(h().performance.max),S.performance.debounce)}},size:{width:0,height:0,top:0,left:0},viewport:{initialDpr:0,dpr:0,width:0,height:0,top:0,left:0,aspect:0,distance:0,factor:0,getCurrentViewport:m},setEvents:S=>u(_=>({..._,events:{..._.events,...S}})),setSize:(S,_,C=0,A=0)=>{const E=h().camera,P={width:S,height:_,top:C,left:A};u(N=>({size:P,viewport:{...N.viewport,...m(E,p,P)}}))},setDpr:S=>u(_=>{const C=jx(S);return{viewport:{..._.viewport,dpr:C,initialDpr:_.viewport.initialDpr||C}}}),setFrameloop:(S="always")=>{const _=h().clock;_.stop(),_.elapsedTime=0,S!=="never"&&(_.start(),_.elapsedTime=0),u(()=>({frameloop:S}))},previousRoot:void 0,internal:{interaction:[],hovered:new Map,subscribers:[],initialClick:[0,0],initialHits:[],capturedMap:new Map,lastEvent:de.createRef(),active:!1,frames:0,priority:0,subscribe:(S,_,C)=>{const A=h().internal;return A.priority=A.priority+(_>0?1:0),A.subscribers.push({ref:S,priority:_,store:C}),A.subscribers=A.subscribers.sort((E,P)=>E.priority-P.priority),()=>{const E=h().internal;E!=null&&E.subscribers&&(E.priority=E.priority-(_>0?1:0),E.subscribers=E.subscribers.filter(P=>P.ref!==S))}}}}}),i=n.getState();let r=i.size,o=i.viewport.dpr,l=i.camera;return n.subscribe(()=>{const{camera:u,size:h,viewport:f,gl:p,set:g}=n.getState();if(h.width!==r.width||h.height!==r.height||f.dpr!==o){r=h,o=f.dpr,bT(u,h),f.dpr>0&&p.setPixelRatio(f.dpr);const m=typeof HTMLCanvasElement<"u"&&p.domElement instanceof HTMLCanvasElement;p.setSize(h.width,h.height,m)}u!==l&&(l=u,g(m=>({viewport:{...m.viewport,...m.viewport.getCurrentViewport(u)}})))}),n.subscribe(u=>e(u)),n};function $x(){const e=de.useContext(Yx);if(!e)throw new Error("R3F: Hooks can only be used within the Canvas component!");return e}function TT(e=n=>n,t){return $x()(e,t)}function CT(e,t=0){const n=$x(),i=n.getState().internal.subscribe,r=Wx(e);return Kc(()=>i(r,t,n),[t,i,n]),null}var gv=new WeakMap,AT=e=>{var t;return typeof e=="function"&&(e==null||(t=e.prototype)==null?void 0:t.constructor)===e};function Zx(e,t){return function(n,...i){let r;return AT(n)?(r=gv.get(n),r||(r=new n,gv.set(n,r))):r=n,e&&e(r),Promise.all(i.map(o=>new Promise((l,u)=>r.load(o,h=>{li(h?.scene)&&Object.assign(h,pT(h.scene)),l(h)},t,h=>u(new Error(`Could not load ${o}: ${h?.message}`))))))}}function Jx(e,t,n,i){const r=Array.isArray(t)?t:[t],o=nT(Zx(n,i),[e,...r],{equal:rn.equ});return Array.isArray(t)?o:o[0]}Jx.preload=function(e,t,n){const i=Array.isArray(t)?t:[t];return iT(Zx(n),[e,...i])};Jx.clear=function(e,t){return rT([e,...Array.isArray(t)?t:[t]])};var RT=1,IT=8,PT=32,NT=2,LT={name:"@react-three/fiber",version:"9.6.1",description:"A React renderer for Threejs",keywords:["react","renderer","fiber","three","threejs"],author:"Paul Henschel (https://github.com/drcmda)",license:"MIT",maintainers:["Josh Ellis (https://github.com/joshuaellis)","Cody Bennett (https://github.com/codyjasonbennett)","Kris Baumgarter (https://github.com/krispya)"],bugs:{url:"https://github.com/pmndrs/react-three-fiber/issues"},homepage:"https://github.com/pmndrs/react-three-fiber#readme",repository:{type:"git",url:"git+https://github.com/pmndrs/react-three-fiber.git"},collective:{type:"opencollective",url:"https://opencollective.com/react-three-fiber"},main:"dist/react-three-fiber.cjs.js",module:"dist/react-three-fiber.esm.js",types:"dist/react-three-fiber.cjs.d.ts","react-native":"native/dist/react-three-fiber-native.cjs.js",sideEffects:!1,prec
vendor: 17,974 bytes, lines 4116-4123
4116onstruct:{entrypoints:["index.tsx","native.tsx"]},scripts:{prebuild:"cp ../../readme.md readme.md"},devDependencies:{"@types/react-reconciler":"^0.32.3","react-reconciler":"^0.33.0"},dependencies:{"@babel/runtime":"^7.17.8","@types/webxr":"*","base64-js":"^1.5.1",buffer:"^6.0.3","its-fine":"^2.0.0","react-use-measure":"^2.1.7",scheduler:"^0.27.0","suspend-react":"^0.1.3","use-sync-external-store":"^1.4.0",zustand:"^5.0.3"},peerDependencies:{expo:">=43.0","expo-asset":">=8.4","expo-file-system":">=11.0","expo-gl":">=11.0",react:">=19 <19.3","react-dom":">=19 <19.3","react-native":">=0.78",three:">=0.156"},peerDependenciesMeta:{"react-dom":{optional:!0},"react-native":{optional:!0},expo:{optional:!0},"expo-asset":{optional:!0},"expo-file-system":{optional:!0},"expo-gl":{optional:!0}}};function DT(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var vv={exports:{}},Op={exports:{}};Op.exports;var yv;function UT(){return yv||(yv=1,(function(e){e.exports=function(t){function n(s,a,c,d){return new __(s,a,c,d)}function i(){}function r(s){var a="https://react.dev/errors/"+s;if(1<arguments.length){a+="?args[]="+encodeURIComponent(arguments[1]);for(var c=2;c<arguments.length;c++)a+="&args[]="+encodeURIComponent(arguments[c])}return"Minified React error #"+s+"; visit "+a+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(s){var a=s,c=s;if(s.alternate)for(;a.return;)a=a.return;else{s=a;do a=s,a.flags&4098&&(c=a.return),s=a.return;while(s)}return a.tag===3?c:null}function l(s){if(o(s)!==s)throw Error(r(188))}function u(s){var a=s.alternate;if(!a){if(a=o(s),a===null)throw Error(r(188));return a!==s?null:s}for(var c=s,d=a;;){var y=c.return;if(y===null)break;var M=y.alternate;if(M===null){if(d=y.return,d!==null){c=d;continue}break}if(y.child===M.child){for(M=y.child;M;){if(M===c)return l(y),s;if(M===d)return l(y),a;M=M.sibling}throw Error(r(188))}if(c.return!==d.return)c=y,d=M;else{for(var D=!1,V=y.child;V;){if(V===c){D=!0,c=y,d=M;break}if(V===d){D=!0,d=y,c=M;break}V=V.sibling}if(!D){for(V=M.child;V;){if(V===c){D=!0,c=M,d=y;break}if(V===d){D=!0,d=M,c=y;break}V=V.sibling}if(!D)throw Error(r(189))}}if(c.alternate!==d)throw Error(r(190))}if(c.tag!==3)throw Error(r(188));return c.stateNode.current===c?s:a}function h(s){var a=s.tag;if(a===5||a===26||a===27||a===6)return s;for(s=s.child;s!==null;){if(a=h(s),a!==null)return a;s=s.sibling}return null}function f(s){var a=s.tag;if(a===5||a===26||a===27||a===6)return s;for(s=s.child;s!==null;){if(s.tag!==4&&(a=f(s),a!==null))return a;s=s.sibling}return null}function p(s){return s===null||typeof s!="object"?null:(s=Gm&&s[Gm]||s["@@iterator"],typeof s=="function"?s:null)}function g(s){if(s==null)return null;if(typeof s=="function")return s.$$typeof===E_?null:s.displayName||s.name||null;if(typeof s=="string")return s;switch(s){case Io:return"Fragment";case Uf:return"Profiler";case zm:return"StrictMode";case Ff:return"Suspense";case kf:return"SuspenseList";case zf:return"Activity"}if(typeof s=="object")switch(s.$$typeof){case Ro:return"Portal";case xs:return s.displayName||"Context";case Vm:return(s._context.displayName||"Context")+".Consumer";case Of:var a=s.render;return s=s.displayName,s||(s=a.displayName||a.name||"",s=s!==""?"ForwardRef("+s+")":"ForwardRef"),s;case Bf:return a=s.displayName||null,a!==null?a:g(s.type)||"Memo";case _s:a=s._payload,s=s._init;try{return g(s(a))}catch{}}return null}function m(s){return{current:s}}function v(s){0>Lo||(s.current=Xf[Lo],Xf[Lo]=null,Lo--)}function b(s,a){Lo++,Xf[Lo]=s.current,s.current=a}function w(s){return s>>>=0,s===0?32:31-(Q3(s)/eb|0)|0}function S(s){var a=s&42;if(a!==0)return a;switch(s&-s){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return s&261888;case 262144:case 524288:case 1048576:case 2097152:return s&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return s&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return s}}function _(s,a,c){var d=s.pendingLanes;if(d===0)return 0;var y=0,M=s.suspendedLanes,D=s.pingedLanes;s=s.warmLanes;var V=d&134217727;return V!==0?(d=V&~M,d!==0?y=S(d):(D&=V,D!==0?y=S(D):c||(c=V&~s,c!==0&&(y=S(c))))):(V=d&~M,V!==0?y=S(V):D!==0?y=S(D):c||(c=d&~s,c!==0&&(y=S(c)))),y===0?0:a!==0&&a!==y&&(a&M)===0&&(M=y&-y,c=a&-a,M>=c||M===32&&(c&4194048)!==0)?a:y}function C(s,a){return(s.pendingLanes&~(s.suspendedLanes&~s.pingedLanes)&a)===0}function A(s,a){switch(s){case 1:case 2:case 4:case 8:case 64:return a+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return a+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function E(){var s=pu;return pu<<=1,!(pu&62914560)&&(pu=4194304),s}function P(s){for(var a=[],c=0;31>c;c++)a.push(s);return a}function N(s,a){s.pendingLanes|=a,a!==268435456&&(s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0)}function O(s,a,c,d,y,M){var D=s.pendingLanes;s.pendingLanes=c,s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0,s.expiredLanes&=c,s.entangledLanes&=c,s.errorRecoveryDisabledLanes&=c,s.shellSuspendCounter=0;var V=s.entanglements,ae=s.expirationTimes,be=s.hiddenUpdates;for(c=D&~c;0<c;){var Fe=31-Ai(c),Pe=1<<Fe;V[Fe]=0,ae[Fe]=-1;var $e=be[Fe];if($e!==null)for(be[Fe]=null,Fe=0;Fe<$e.length;Fe++){var wt=$e[Fe];wt!==null&&(wt.lane&=-536870913)}c&=~Pe}d!==0&&T(s,d,0),M!==0&&y===0&&s.tag!==0&&(s.suspendedLanes|=M&~(D&~a))}function T(s,a,c){s.pendingLanes|=a,s.suspendedLanes&=~a;var d=31-Ai(a);s.entangledLanes|=a,s.entanglements[d]=s.entanglements[d]|1073741824|c&261930}function R(s,a){var c=s.entangledLanes|=a;for(s=s.entanglements;c;){var d=31-Ai(c),y=1<<d;y&a|s[d]&a&&(s[d]|=a),c&=~y}}function B(s,a){var c=a&-a;return c=(c&42)!==0?1:F(c),(c&(s.suspendedLanes|a))!==0?0:c}function F(s){switch(s){case 2:s=1;break;case 8:s=4;break;case 32:s=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:s=128;break;case 268435456:s=134217728;break;default:s=0}return s}function j(s){return s&=-s,2<s?8<s?(s&134217727)!==0?32:268435456:8:2}function H(s){if(typeof sb=="function"&&ab(s),Ri&&typeof Ri.setStrictMode=="function")try{Ri.setStrictMode($l,s)}catch{}}function Y(s,a){return s===a&&(s!==0||1/s===1/a)||s!==s&&a!==a}function q(s){if($f===void 0)try{throw Error()}catch(c){var a=c.stack.trim().match(/\n( *(at )?)/);$f=a&&a[1]||"",p1=-1<c.stack.indexOf(`
4117    at`)?" (<anonymous>)":-1<c.stack.indexOf("@")?"@unknown:0:0":""}return`
4118`+$f+s+p1}function te(s,a){if(!s||Zf)return"";Zf=!0;var c=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var d={DetermineComponentFrameRoot:function(){try{if(a){var Pe=function(){throw Error()};if(Object.defineProperty(Pe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Pe,[])}catch(wt){var $e=wt}Reflect.construct(s,[],Pe)}else{try{Pe.call()}catch(wt){$e=wt}s.call(Pe.prototype)}}else{try{throw Error()}catch(wt){$e=wt}(Pe=s())&&typeof Pe.catch=="function"&&Pe.catch(function(){})}}catch(wt){if(wt&&$e&&typeof wt.stack=="string")return[wt.stack,$e.stack]}return[null,null]}};d.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var y=Object.getOwnPropertyDescriptor(d.DetermineComponentFrameRoot,"name");y&&y.configurable&&Object.defineProperty(d.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var M=d.DetermineComponentFrameRoot(),D=M[0],V=M[1];if(D&&V){var ae=D.split(`
4119`),be=V.split(`
4120`);for(y=d=0;d<ae.length&&!ae[d].includes("DetermineComponentFrameRoot");)d++;for(;y<be.length&&!be[y].includes("DetermineComponentFrameRoot");)y++;if(d===ae.length||y===be.length)for(d=ae.length-1,y=be.length-1;1<=d&&0<=y&&ae[d]!==be[y];)y--;for(;1<=d&&0<=y;d--,y--)if(ae[d]!==be[y]){if(d!==1||y!==1)do if(d--,y--,0>y||ae[d]!==be[y]){var Fe=`
4121`+ae[d].replace(" at new "," at ");return s.displayName&&Fe.includes("<anonymous>")&&(Fe=Fe.replace("<anonymous>",s.displayName)),Fe}while(1<=d&&0<=y);break}}}finally{Zf=!1,Error.prepareStackTrace=c}return(c=s?s.displayName||s.name:"")?q(c):""}function J(s,a){switch(s.tag){case 26:case 27:case 5:return q(s.type);case 16:return q("Lazy");case 13:return s.child!==a&&a!==null?q("Suspense Fallback"):q("Suspense");case 19:return q("SuspenseList");case 0:case 15:return te(s.type,!1);case 11:return te(s.type.render,!1);case 1:return te(s.type,!0);case 31:return q("Activity");default:return""}}function he(s){try{var a="",c=null;do a+=J(s,c),c=s,s=s.return;while(s);return a}catch(d){return`
4122Error generating stack: `+d.message+`
4123`+d.stack}}function ue(s,a){if(typeof s=="object"&&s!==null){var c=m1.get(s);return c!==void 0?c:(a={value:s,source:a,stack:he(a)},m1.set(s,a),a)}return{value:s,source:a,stack:he(a)}}function ce(s,a){Uo[Oo++]=Zl,Uo[Oo++]=gu,gu=s,Zl=a}function me(s,a,c){Hi[Wi++]=Mr,Hi[Wi++]=wr,Hi[Wi++]=bs,bs=s;var d=Mr;s=wr;var y=32-Ai(d)-1;d&=~(1<<y),c+=1;var M=32-Ai(a)+y;if(30<M){var D=y-y%5;M=(d&(1<<D)-1).toString(32),d>>=D,y-=D,Mr=1<<32-Ai(a)+y|c<<y|d,wr=M+s}else Mr=1<<M|c<<y|d,wr=s}function _e(s){s.return!==null&&(ce(s,1),me(s,1,0))}function ht(s){for(;s===gu;)gu=Uo[--Oo],Uo[Oo]=null,Zl=Uo[--Oo],Uo[Oo]=null;for(;s===bs;)bs=Hi[--Wi],Hi[Wi]=null,wr=Hi[--Wi],Hi[Wi]=null,Mr=Hi[--Wi],Hi[Wi]=null}function tt(s,a){Hi[Wi++]=Mr,Hi[Wi++]=wr,Hi[Wi++]=bs,Mr=a.id,wr=a.overflow,bs=s}function re(s,a){b(Ss,a),b(Jl,s),b(Vn,null),s=A_(a),v(Vn),b(Vn,s)}function ge(){v(Vn),v(Jl),v(Ss)}function Ie(s){s.memoizedState!==null&&b(vu,s);var a=Vn.current,c=R_(a,s.type);a!==c&&(b(Jl,s),b(Vn,c))}function Ce(s){Jl.current===s&&(v(Vn),v(Jl)),vu.current===s&&(v(vu),zr?Fa._currentValue=Po:Fa._currentValue2=Po)}function We(s){throw Ae(ue(Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML","")),s)),Jf}function et(s,a){if(!Jn)throw Error(r(175));R3(s.stateNode,s.type,s.memoizedProps,a,s)||We(s,!0)}function Ze(s){for(Gn=s.return;Gn;)switch(Gn.tag){case 5:case 31:case 13:ji=!1;return;case 27:case 3:ji=!0;return;default:Gn=Gn.return}}function ct(s){if(!Jn||s!==Gn)return!1;if(!Vt)return Ze(s),Vt=!0,!1;var a=s.tag;if(An?a!==3&&a!==27&&(a!==5||t1(s.type)&&!hu(s.type,s.memoizedProps))&&ln&&We(s):a!==3&&(a!==5||t1(s.type)&&!hu(s.type,s.memoizedProps))&&ln&&We(s),Ze(s),a===13){if(!Jn)throw Error(r(316));if(s=s.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(r(317));ln=D3(s)}else if(a===31){if(s=s.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(r(317));ln=L3(s)}else ln=An&&a===27?x3(s.type,ln):Gn?e1(s.stateNode):null;return!0}function oe(){Jn&&(ln=Gn=null,Vt=!1)}function Se(){var s=Ms;return s!==null&&(yi===null?yi=s:yi.push.apply(yi,s),Ms=null),s}function Ae(s){Ms===null?Ms=[s]:Ms.push(s)}function De(s,a,c){zr?(b(yu,a._currentValue),a._currentValue=c):(b(yu,a._currentValue2),a._currentValue2=c)}function Le(s){var a=yu.current;zr?s._currentValue=a:s._currentValue2=a,v(yu)}function Ye(s,a,c){for(;s!==null;){var d=s.alternate;if((s.childLanes&a)!==a?(s.childLanes|=a,d!==null&&(d.childLanes|=a)):d!==null&&(d.childLanes&a)!==a&&(d.childLanes|=a),s===c)break;s=s.return}}function Je(s,a,c,d){var y=s.child;for(y!==null&&(y.return=s);y!==null;){var M=y.dependencies;if(M!==null){var D=y.child;M=M.firstContext;e:for(;M!==null;){var V=M;M=y;for(var ae=0;ae<a.length;ae++)if(V.context===a[ae]){M.lanes|=c,V=M.alternate,V!==null&&(V.lanes|=c),Ye(M.return,c,s),d||(D=null);break e}M=V.next}}else if(y.tag===18){if(D=y.return,D===null)throw Error(r(341));D.lanes|=c,M=D.alternate,M!==null&&(M.lanes|=c),Ye(D,c,s),D=null}else D=y.child;if(D!==null)D.return=y;else for(D=y;D!==null;){if(D===s){D=null;break}if(y=D.sibling,y!==null){y.return=D.return,D=y;break}D=D.return}y=D}}function lt(s,a,c,d){s=null;for(var y=a,M=!1;y!==null;){if(!M){if((y.flags&524288)!==0)M=!0;else if((y.flags&262144)!==0)break}if(y.tag===10){var D=y.alternate;if(D===null)throw Error(r(387));if(D=D.memoizedProps,D!==null){var V=y.type;Ii(y.pendingProps.value,D.value)||(s!==null?s.push(V):s=[V])}}else if(y===vu.current){if(D=y.alternate,D===null)throw Error(r(387));D.memoizedState.memoizedState!==y.memoizedState.memoizedState&&(s!==null?s.push(Fa):s=[Fa])}y=y.return}s!==null&&Je(a,s,c,d),a.flags|=262144}function ut(s){for(s=s.firstContext;s!==null;){var a=s.context;if(!Ii(zr?a._currentValue:a._currentValue2,s.memoizedValue))return!0;s=s.next}return!1}function z(s){ka=s,Gr=null,s=s.dependencies,s!==null&&(s.firstContext=null)}function vt(s){return xt(ka,s)}function bt(s,a){return ka===null&&z(s),xt(s,a)}function xt(s,a){var c=zr?a._currentValue:a._currentValue2;if(a={context:a,memoizedValue:c,next:null},Gr===null){if(s===null)throw Error(r(308));Gr=a,s.dependencies={lanes:0,firstContext:a},s.flags|=524288}else Gr=Gr.next=a;return c}function U(){return{controller:new lb,data:new Map,refCount:0}}function I(s){s.refCount--,s.refCount===0&&cb(ub,function(){s.controller.abort()})}function G(){}function ee(s){s!==Fo&&s.next===null&&(Fo===null?xu=Fo=s:Fo=Fo.next=s),_u=!0,Kf||(Kf=!0,qe())}function fe(s,a){if(!Qf&&_u){Qf=!0;do for(var c=!1,d=xu;d!==null;){if(!a)if(s!==0){var y=d.pendingLanes;if(y===0)var M=0;else{var D=d.suspendedLanes,V=d.pingedLanes;M=(1<<31-Ai(42|s)+1)-1,M&=y&~(D&~V),M=M&201326741?M&201326741|1:M?M|2:0}M!==0&&(c=!0,ze(d,M))}else M=kt,M=_(d,d===Qt?M:0,d.cancelPendingCommit!==null||d.timeoutHandle!==Oa),!(M&3)||C(d,M)||(c=!0,ze(d,M));d=d.next}while(c);Qf=!1}}function we(){Ne()}function Ne(){_u=Kf=!1;var s=0;Ba!==0&&k_()&&(s=Ba);for(var a=gi(),c=null,d=xu;d!==null;){var y=d.next,M=X(d,a);M===0?(d.next=null,c===null?xu=y:c.next=y,y===null&&(Fo=c)):(c=d,(s!==0||M&3)&&(_u=!0)),d=y}Rn!==0&&Rn!==5||fe(s,!1),Ba!==0&&(Ba=0)}function X(s,a){for(var c=s.suspendedLanes,d=s.pingedLanes,y=s.expirationTimes,M=s.pendingLanes&-62914561;0<M;){var D=31-Ai(M),V=1<<D,ae=y[D];ae===-1?((V&c)===0||(V&d)!==0)&&(y[D]=A(V,a)):ae<=a&&(s.expiredLanes|=V),M&=~V}if(a=Qt,c=kt,c=_(s,s===a?c:0,s.cancelPendingCommit!==null||s.timeoutHandle!==Oa),d=s.callbackNode,c===0||s===a&&(qt===2||qt===9)||s.cancelPendingCommit!==null)return d!==null&&d!==null&&qf(d),s.callbackNode=null,s.callbackPriority=0;if((c&3)===0||C(s,c)){if(a=c&-c,a===s.callbackPriority)return a;switch(d!==null&&qf(d),j(c)){case 2:case 8:c=ib;break;case 32:c=Yf;break;case 268435456:c=rb;break;default:c=Yf}return d=Ee.bind(null,s),c=mu(c,d),s.callbackPriority=a,s.callbackNode=c,a}return d!==null&&d!==null&&qf(d),s.callbackPriority=2,s.callbackNode=null,2}function Ee(s,a){if(Rn!==0&&Rn!==5)return s.callbackNode=null,s.callbackPriority=0,null;var c=s.callbackNode;if(jl()&&s.callbackNode!==c)return null;var d=kt;return d=_(s,s===Qt?d:0,s.cancelPendingCommit!==null||s.timeoutHandle!==Oa),d===0?null:(mm(s,d,a),X(s,gi()),s.callbackNode!=null&&s.callbackNode===c?Ee.bind(null,s):null)}function ze(s,a){if(jl())return null;mm(s,a,!0)}function qe(){j_?X_(function(){(Ut&6)!==0?mu(f1,we):Ne()}):mu(f1,we)}function xe(){if(Ba===0){var s=ko;s===0&&(s=fu,fu<<=1,!(fu&261888)&&(fu=256)),Ba=s}return Ba}function Ke(s,a){if(Kl===null){var c=Kl=[];ed=0,ko=xe(),Bo={status:"pending",value:void 0,then:function(d){c.push(d)}}}return ed++,a.then(nt,nt),a}function nt(){if(--ed===0&&Kl!==null){Bo!==null&&(Bo.status="fulfilled");var s=Kl;Kl=null,ko=0,Bo=null;for(var a=0;a<s.length;a++)(0,s[a])()}}function ft(s,a){var c=[],d={status:"pending",value:null,reason:null,then:function(y){c.push(y)}};return s.then(function(){d.status="fulfilled",d.value=a;for(var y=0;y<c.length;y++)(0,c[y])(a)},function(y){for(d.status="rejected",d.reason=y,y=0;y<c.length;y++)(0,c[y])(void 0)}),d}function Rt(){var s=za.current;return s!==null?s:Qt.pooledCache}function W(s,a){a===null?b(za,za.current):b(za,a.pool)}function le(){var s=Rt();return s===null?null:{parent:zr?cn._currentValue:cn._currentValue2,pool:s}}function ve(s,a){if(Ii(s,a))return!0;if(typeof s!="object"||s===null||typeof a!="object"||a===null)return!1;var c=Object.keys(s),d=Object.keys(a);if(c.length!==d.length)return!1;for(d=0;d<c.length;d++){var y=c[d];if(!ob.call(a,y)||!Ii(s[y],a[y]))return!1}return!0}function Be(s){return s=s.status,s==="fulfilled"||s==="rejected"}function je(s,a,c){switch(c=s[c],c===void 0?s.push(a):c!==a&&(a.then(G,G),a=c),a.status){case"fulfilled":return a.value;case"rejected":throw s=a.reason,at(s),s;default:if(typeof a.status=="string")a.then(G,G);else{if(s=Qt,s!==null&&100<s.shellSuspendCounter)throw Error(r(482));s=a,s.status="pending",s.then(function(d){if(a.status==="pending"){var y=a;y.status="fulfilled",y.value=d}},function(d){if(a.status==="pending"){var y=a;y.status="rejected",y.reason=d}})}switch(a.status){case"fulfilled":return a.value;case"rejected":throw s=a.reason,at(s),s}throw Va=a,zo}}function pe(s){try{var a=s._init;return a(s._payload)}catch(c){throw c!==null&&typeof c=="object"&&typeof c.then=="function"?(Va=c,zo):c}}function Oe(){if(Va===null)throw Error(r(459));var s=Va;return Va=null,s}function at(s){if(s===zo||s===bu)throw Error(r(483))}function sn(s){var a=Ql;return Ql+=1,Vo===null&&(Vo=[]),je(Vo,s,a)}function Lt(s,a){a=a.props.ref,s.ref=a!==void 0?a:null}function xn(s,a){throw a.$$typeof===M_?Error(r(525)):(s=Object.prototype.toString.call(a),Error(r(31,s==="[object Object]"?"object with keys {"+Object.keys(a).join(", ")+"}":s)))}function Bn(s){function a(ie,K){if(s){var se=ie.deletions;se===null?(ie.deletions=[K],ie.flags|=16):se.push(K)}}function c(ie,K){if(!s)return null;for(;K!==null;
vendor: 9,926 bytes, line 4123
4123)a(ie,K),K=K.sibling;return null}function d(ie){for(var K=new Map;ie!==null;)ie.key!==null?K.set(ie.key,ie):K.set(ie.index,ie),ie=ie.sibling;return K}function y(ie,K){return ie=Br(ie,K),ie.index=0,ie.sibling=null,ie}function M(ie,K,se){return ie.index=se,s?(se=ie.alternate,se!==null?(se=se.index,se<K?(ie.flags|=67108866,K):se):(ie.flags|=67108866,K)):(ie.flags|=1048576,K)}function D(ie){return s&&ie.alternate===null&&(ie.flags|=67108866),ie}function V(ie,K,se,Re){return K===null||K.tag!==6?(K=Pf(se,ie.mode,Re),K.return=ie,K):(K=y(K,se),K.return=ie,K)}function ae(ie,K,se,Re){var pt=se.type;return pt===Io?Fe(ie,K,se.props.children,Re,se.key):K!==null&&(K.elementType===pt||typeof pt=="object"&&pt!==null&&pt.$$typeof===_s&&pe(pt)===K.type)?(K=y(K,se.props),Lt(K,se),K.return=ie,K):(K=lu(se.type,se.key,se.props,null,ie.mode,Re),Lt(K,se),K.return=ie,K)}function be(ie,K,se,Re){return K===null||K.tag!==4||K.stateNode.containerInfo!==se.containerInfo||K.stateNode.implementation!==se.implementation?(K=Nf(se,ie.mode,Re),K.return=ie,K):(K=y(K,se.children||[]),K.return=ie,K)}function Fe(ie,K,se,Re,pt){return K===null||K.tag!==7?(K=Ua(se,ie.mode,Re,pt),K.return=ie,K):(K=y(K,se),K.return=ie,K)}function Pe(ie,K,se){if(typeof K=="string"&&K!==""||typeof K=="number"||typeof K=="bigint")return K=Pf(""+K,ie.mode,se),K.return=ie,K;if(typeof K=="object"&&K!==null){switch(K.$$typeof){case cu:return se=lu(K.type,K.key,K.props,null,ie.mode,se),Lt(se,K),se.return=ie,se;case Ro:return K=Nf(K,ie.mode,se),K.return=ie,K;case _s:return K=pe(K),Pe(ie,K,se)}if(uu(K)||p(K))return K=Ua(K,ie.mode,se,null),K.return=ie,K;if(typeof K.then=="function")return Pe(ie,sn(K),se);if(K.$$typeof===xs)return Pe(ie,bt(ie,K),se);xn(ie,K)}return null}function $e(ie,K,se,Re){var pt=K!==null?K.key:null;if(typeof se=="string"&&se!==""||typeof se=="number"||typeof se=="bigint")return pt!==null?null:V(ie,K,""+se,Re);if(typeof se=="object"&&se!==null){switch(se.$$typeof){case cu:return se.key===pt?ae(ie,K,se,Re):null;case Ro:return se.key===pt?be(ie,K,se,Re):null;case _s:return se=pe(se),$e(ie,K,se,Re)}if(uu(se)||p(se))return pt!==null?null:Fe(ie,K,se,Re,null);if(typeof se.then=="function")return $e(ie,K,sn(se),Re);if(se.$$typeof===xs)return $e(ie,K,bt(ie,se),Re);xn(ie,se)}return null}function wt(ie,K,se,Re,pt){if(typeof Re=="string"&&Re!==""||typeof Re=="number"||typeof Re=="bigint")return ie=ie.get(se)||null,V(K,ie,""+Re,pt);if(typeof Re=="object"&&Re!==null){switch(Re.$$typeof){case cu:return ie=ie.get(Re.key===null?se:Re.key)||null,ae(K,ie,Re,pt);case Ro:return ie=ie.get(Re.key===null?se:Re.key)||null,be(K,ie,Re,pt);case _s:return Re=pe(Re),wt(ie,K,se,Re,pt)}if(uu(Re)||p(Re))return ie=ie.get(se)||null,Fe(K,ie,Re,pt,null);if(typeof Re.then=="function")return wt(ie,K,se,sn(Re),pt);if(Re.$$typeof===xs)return wt(ie,K,se,bt(K,Re),pt);xn(K,Re)}return null}function En(ie,K,se,Re){for(var pt=null,un=null,gt=K,Ht=K=0,On=null;gt!==null&&Ht<se.length;Ht++){gt.index>Ht?(On=gt,gt=null):On=gt.sibling;var Wt=$e(ie,gt,se[Ht],Re);if(Wt===null){gt===null&&(gt=On);break}s&&gt&&Wt.alternate===null&&a(ie,gt),K=M(Wt,K,Ht),un===null?pt=Wt:un.sibling=Wt,un=Wt,gt=On}if(Ht===se.length)return c(ie,gt),Vt&&ce(ie,Ht),pt;if(gt===null){for(;Ht<se.length;Ht++)gt=Pe(ie,se[Ht],Re),gt!==null&&(K=M(gt,K,Ht),un===null?pt=gt:un.sibling=gt,un=gt);return Vt&&ce(ie,Ht),pt}for(gt=d(gt);Ht<se.length;Ht++)On=wt(gt,ie,Ht,se[Ht],Re),On!==null&&(s&&On.alternate!==null&&gt.delete(On.key===null?Ht:On.key),K=M(On,K,Ht),un===null?pt=On:un.sibling=On,un=On);return s&&gt.forEach(function(Rs){return a(ie,Rs)}),Vt&&ce(ie,Ht),pt}function ac(ie,K,se,Re){if(se==null)throw Error(r(151));for(var pt=null,un=null,gt=K,Ht=K=0,On=null,Wt=se.next();gt!==null&&!Wt.done;Ht++,Wt=se.next()){gt.index>Ht?(On=gt,gt=null):On=gt.sibling;var Rs=$e(ie,gt,Wt.value,Re);if(Rs===null){gt===null&&(gt=On);break}s&&gt&&Rs.alternate===null&&a(ie,gt),K=M(Rs,K,Ht),un===null?pt=Rs:un.sibling=Rs,un=Rs,gt=On}if(Wt.done)return c(ie,gt),Vt&&ce(ie,Ht),pt;if(gt===null){for(;!Wt.done;Ht++,Wt=se.next())Wt=Pe(ie,Wt.value,Re),Wt!==null&&(K=M(Wt,K,Ht),un===null?pt=Wt:un.sibling=Wt,un=Wt);return Vt&&ce(ie,Ht),pt}for(gt=d(gt);!Wt.done;Ht++,Wt=se.next())Wt=wt(gt,ie,Ht,Wt.value,Re),Wt!==null&&(s&&Wt.alternate!==null&&gt.delete(Wt.key===null?Ht:Wt.key),K=M(Wt,K,Ht),un===null?pt=Wt:un.sibling=Wt,un=Wt);return s&&gt.forEach(function(pb){return a(ie,pb)}),Vt&&ce(ie,Ht),pt}function ja(ie,K,se,Re){if(typeof se=="object"&&se!==null&&se.type===Io&&se.key===null&&(se=se.props.children),typeof se=="object"&&se!==null){switch(se.$$typeof){case cu:e:{for(var pt=se.key;K!==null;){if(K.key===pt){if(pt=se.type,pt===Io){if(K.tag===7){c(ie,K.sibling),Re=y(K,se.props.children),Re.return=ie,ie=Re;break e}}else if(K.elementType===pt||typeof pt=="object"&&pt!==null&&pt.$$typeof===_s&&pe(pt)===K.type){c(ie,K.sibling),Re=y(K,se.props),Lt(Re,se),Re.return=ie,ie=Re;break e}c(ie,K);break}else a(ie,K);K=K.sibling}se.type===Io?(Re=Ua(se.props.children,ie.mode,Re,se.key),Re.return=ie,ie=Re):(Re=lu(se.type,se.key,se.props,null,ie.mode,Re),Lt(Re,se),Re.return=ie,ie=Re)}return D(ie);case Ro:e:{for(pt=se.key;K!==null;){if(K.key===pt)if(K.tag===4&&K.stateNode.containerInfo===se.containerInfo&&K.stateNode.implementation===se.implementation){c(ie,K.sibling),Re=y(K,se.children||[]),Re.return=ie,ie=Re;break e}else{c(ie,K);break}else a(ie,K);K=K.sibling}Re=Nf(se,ie.mode,Re),Re.return=ie,ie=Re}return D(ie);case _s:return se=pe(se),ja(ie,K,se,Re)}if(uu(se))return En(ie,K,se,Re);if(p(se)){if(pt=p(se),typeof pt!="function")throw Error(r(150));return se=pt.call(se),ac(ie,K,se,Re)}if(typeof se.then=="function")return ja(ie,K,sn(se),Re);if(se.$$typeof===xs)return ja(ie,K,bt(ie,se),Re);xn(ie,se)}return typeof se=="string"&&se!==""||typeof se=="number"||typeof se=="bigint"?(se=""+se,K!==null&&K.tag===6?(c(ie,K.sibling),Re=y(K,se),Re.return=ie,ie=Re):(c(ie,K),Re=Pf(se,ie.mode,Re),Re.return=ie,ie=Re),D(ie)):c(ie,K)}return function(ie,K,se,Re){try{Ql=0;var pt=ja(ie,K,se,Re);return Vo=null,pt}catch(gt){if(gt===zo||gt===bu)throw gt;var un=n(29,gt,null,ie.mode);return un.lanes=Re,un.return=ie,un}}}function Ji(){for(var s=Go,a=nd=Go=0;a<s;){var c=Xi[a];Xi[a++]=null;var d=Xi[a];Xi[a++]=null;var y=Xi[a];Xi[a++]=null;var M=Xi[a];if(Xi[a++]=null,d!==null&&y!==null){var D=d.pending;D===null?y.next=y:(y.next=D.next,D.next=y),d.pending=y}M!==0&&mr(c,y,M)}}function ki(s,a,c,d){Xi[Go++]=s,Xi[Go++]=a,Xi[Go++]=c,Xi[Go++]=d,nd|=d,s.lanes|=d,s=s.alternate,s!==null&&(s.lanes|=d)}function Bi(s,a,c,d){return ki(s,a,c,d),zi(s)}function di(s,a){return ki(s,null,null,a),zi(s)}function mr(s,a,c){s.lanes|=c;var d=s.alternate;d!==null&&(d.lanes|=c);for(var y=!1,M=s.return;M!==null;)M.childLanes|=c,d=M.alternate,d!==null&&(d.childLanes|=c),M.tag===22&&(s=M.stateNode,s===null||s._visibility&1||(y=!0)),s=M,M=M.return;return s.tag===3?(M=s.stateNode,y&&a!==null&&(y=31-Ai(c),s=M.hiddenUpdates,d=s[y],d===null?s[y]=[a]:d.push(a),a.lane=c|536870912),M):null}function zi(s){if(50<sc)throw sc=0,pd=null,Error(r(185));for(var a=s.return;a!==null;)s=a,a=s.return;return s.tag===3?s.stateNode:null}function jn(s){s.updateQueue={baseState:s.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Vi(s,a){s=s.updateQueue,a.updateQueue===s&&(a.updateQueue={baseState:s.baseState,firstBaseUpdate:s.firstBaseUpdate,lastBaseUpdate:s.lastBaseUpdate,shared:s.shared,callbacks:null})}function Xn(s){return{lane:s,tag:0,payload:null,callback:null,next:null}}function qn(s,a,c){var d=s.updateQueue;if(d===null)return null;if(d=d.shared,(Ut&2)!==0){var y=d.pending;return y===null?a.next=a:(a.next=y.next,y.next=a),d.pending=a,a=zi(s),mr(s,null,c),a}return ki(s,d,a,c),zi(s)}function ni(s,a,c){if(a=a.updateQueue,a!==null&&(a=a.shared,(c&4194048)!==0)){var d=a.lanes;d&=s.pendingLanes,c|=d,a.lanes=c,R(s,c)}}function Ki(s,a){var c=s.updateQueue,d=s.alternate;if(d!==null&&(d=d.updateQueue,c===d)){var y=null,M=null;if(c=c.firstBaseUpdate,c!==null){do{var D={lane:c.lane,tag:c.tag,payload:c.payload,callback:null,next:null};M===null?y=M=D:M=M.next=D,c=c.next}while(c!==null);M===null?y=M=a:M=M.next=a}else y=M=a;c={baseState:d.baseState,firstBaseUpdate:y,lastBaseUpdate:M,shared:d.shared,callbacks:d.callbacks},s.updateQueue=c;return}s=c.lastBaseUpdate,s===null?c.firstBaseUpdate=a:s.next=a,c.lastBaseUpdate=a}function ii(){if(id){var s=Bo;if(s!==null)throw s}}function wi(s,a,c,d){id=!1;var y=s.updateQueue;ws=!1;var M=y.firstBaseUpdate,D=y.lastBaseUpdate,V=y.shared.pending;if(V!==null){y.shared.pending=null;var ae=V,be=ae.next;ae.next=null,D===null?M=be:D.next=be,D=ae;var Fe=s.alternate;Fe!==null&&(Fe=Fe.updateQueue,V=Fe.lastBaseUpdate,V!==D&&(V===null?Fe.firstBaseUpdate=be:V.next=be,Fe.lastBaseUpdate=ae))}if(M!==null){var Pe=y.baseState;D=0,Fe=be=ae=null,V=M;do{var $e=V.lane&-536870913,wt=$e!==V.lane;if(wt?(kt&$e)===$e:(d&$e)===$e){$e!==0&&$e===ko&&(id=!0),Fe!==null&&(Fe=Fe.next={lane:0,tag:V.tag,payload:V.payload,callback:null,next:null});e:{var En=s,ac=V;$e=a;var ja=c;switch(ac.tag){case 1:if(En=ac.payload,typeof En=="function"){Pe=En.call(ja,Pe,$e);break e}Pe=En;break e;case 3:En.flags=En.flags&-65537|128;case 0:if(En=ac.payload,$e=typeof En=="function"?En.call(ja,Pe,$e):En,$e==null)break e;Pe=Df({},Pe,$e);break e;case 2:ws=!0}}$e=V.callback,$e!==null&&(s.flags|=64,wt&&(s.flags|=8192),wt=y.callbacks,wt===null?y.callbacks=[$e]:wt.push($e))}else wt={lane:$e,tag:V.tag,payload:V.payload,callback:V.callback,next:null},Fe===null?(be=Fe=wt,ae=Pe):Fe=Fe.next=wt,D|=$e;if(V=V.next,V===null){if(V=y.shared.pending,V===null)break;wt=V,V=wt.next,wt.next=null,y.lastBaseUpdate=wt,y.shared.pending=null}}while(!0);Fe===null&&(ae=Pe),y.baseState=ae,y.firstBaseUpdate=be,y.lastBaseUpdate=Fe,M===null&&(y.shared.lanes=0),Ts|=D,s.lanes=D,s.memoizedState=Pe}}function gr(s,a){if(typeof s!="function")throw Error(r(191,s));s.call(a)}function Rr(s,a){var c=s.callbacks;
vendor: 4,879 bytes, line 4123
4123if(c!==null)for(s.callbacks=null,s=0;s<c.length;s++)gr(c[s],a)}function Ir(s,a){s=jr,b(Mu,s),b(Ho,a),jr=s|a.baseLanes}function vr(){b(Mu,jr),b(Ho,Ho.current)}function yr(){jr=Mu.current,v(Ho),v(Mu)}function L(s){var a=s.alternate;b(vn,vn.current&1),b(Pi,s),sr===null&&(a===null||Ho.current!==null||a.memoizedState!==null)&&(sr=s)}function $(s){b(vn,vn.current),b(Pi,s),sr===null&&(sr=s)}function ne(s){s.tag===22?(b(vn,vn.current),b(Pi,s),sr===null&&(sr=s)):Q()}function Q(){b(vn,vn.current),b(Pi,Pi.current)}function Z(s){v(Pi),sr===s&&(sr=null),v(vn)}function Te(s){for(var a=s;a!==null;){if(a.tag===13){var c=a.memoizedState;if(c!==null&&(c=c.dehydrated,c===null||Hf(c)||Wf(c)))return a}else if(a.tag===19&&(a.memoizedProps.revealOrder==="forwards"||a.memoizedProps.revealOrder==="backwards"||a.memoizedProps.revealOrder==="unstable_legacy-backwards"||a.memoizedProps.revealOrder==="together")){if((a.flags&128)!==0)return a}else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===s)break;for(;a.sibling===null;){if(a.return===null||a.return===s)return null;a=a.return}a.sibling.return=a.return,a=a.sibling}return null}function Me(){throw Error(r(321))}function Ve(s,a){if(a===null)return!1;for(var c=0;c<a.length&&c<s.length;c++)if(!Ii(s[c],a[c]))return!1;return!0}function Ge(s,a,c,d,y,M){return Hr=M,Tt=a,a.memoizedState=null,a.updateQueue=null,a.lanes=0,dt.H=s===null||s.memoizedState===null?y1:rd,Ha=!1,M=c(d,y),Ha=!1,Wo&&(M=yt(a,c,d,y)),ot(s),M}function ot(s){dt.H=tc;var a=Zt!==null&&Zt.next!==null;if(Hr=0,bn=Zt=Tt=null,wu=!1,ec=0,jo=null,a)throw Error(r(300));s===null||Sn||(s=s.dependencies,s!==null&&ut(s)&&(Sn=!0))}function yt(s,a,c,d){Tt=s;var y=0;do{if(Wo&&(jo=null),ec=0,Wo=!1,25<=y)throw Error(r(301));if(y+=1,bn=Zt=null,s.updateQueue!=null){var M=s.updateQueue;M.lastEffect=null,M.events=null,M.stores=null,M.memoCache!=null&&(M.memoCache.index=0)}dt.H=x1,M=a(c,d)}while(Wo);return M}function St(){var s=dt.H,a=s.useState()[0];return a=typeof a.then=="function"?He(a):a,s=s.useState()[0],(Zt!==null?Zt.memoizedState:null)!==s&&(Tt.flags|=1024),a}function it(){var s=Eu!==0;return Eu=0,s}function Bt(s,a,c){a.updateQueue=s.updateQueue,a.flags&=-2053,s.lanes&=~c}function jt(s){if(wu){for(s=s.memoizedState;s!==null;){var a=s.queue;a!==null&&(a.pending=null),s=s.next}wu=!1}Hr=0,bn=Zt=Tt=null,Wo=!1,ec=Eu=0,jo=null}function Mt(){var s={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return bn===null?Tt.memoizedState=bn=s:bn=bn.next=s,bn}function st(){if(Zt===null){var s=Tt.alternate;s=s!==null?s.memoizedState:null}else s=Zt.next;var a=bn===null?Tt.memoizedState:bn.next;if(a!==null)bn=a,Zt=s;else{if(s===null)throw Tt.alternate===null?Error(r(467)):Error(r(310));Zt=s,s={memoizedState:Zt.memoizedState,baseState:Zt.baseState,baseQueue:Zt.baseQueue,queue:Zt.queue,next:null},bn===null?Tt.memoizedState=bn=s:bn=bn.next=s}return bn}function nn(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function He(s){var a=ec;return ec+=1,jo===null&&(jo=[]),s=je(jo,s,a),a=Tt,(bn===null?a.memoizedState:bn.next)===null&&(a=a.alternate,dt.H=a===null||a.memoizedState===null?y1:rd),s}function gn(s){if(s!==null&&typeof s=="object"){if(typeof s.then=="function")return He(s);if(s.$$typeof===xs)return vt(s)}throw Error(r(438,String(s)))}function Pt(s){var a=null,c=Tt.updateQueue;if(c!==null&&(a=c.memoCache),a==null){var d=Tt.alternate;d!==null&&(d=d.updateQueue,d!==null&&(d=d.memoCache,d!=null&&(a={data:d.data.map(function(y){return y.slice()}),index:0})))}if(a??={data:[],index:0},c===null&&(c=nn(),Tt.updateQueue=c),c.memoCache=a,c=a.data[a.index],c===void 0)for(c=a.data[a.index]=Array(s),d=0;d<s;d++)c[d]=w_;return a.index++,c}function Kt(s,a){return typeof a=="function"?a(s):a}function _n(s){return zn(st(),Zt,s)}function zn(s,a,c){var d=s.queue;if(d===null)throw Error(r(311));d.lastRenderedReducer=c;var y=s.baseQueue,M=d.pending;if(M!==null){if(y!==null){var D=y.next;y.next=M.next,M.next=D}a.baseQueue=y=M,d.pending=null}if(M=s.baseState,y===null)s.memoizedState=M;else{a=y.next;var V=D=null,ae=null,be=a,Fe=!1;do{var Pe=be.lane&-536870913;if(Pe!==be.lane?(kt&Pe)===Pe:(Hr&Pe)===Pe){var $e=be.revertLane;if($e===0)ae!==null&&(ae=ae.next={lane:0,revertLane:0,gesture:null,action:be.action,hasEagerState:be.hasEagerState,eagerState:be.eagerState,next:null}),Pe===ko&&(Fe=!0);else if((Hr&$e)===$e){be=be.next,$e===ko&&(Fe=!0);continue}else Pe={lane:0,revertLane:be.revertLane,gesture:null,action:be.action,hasEagerState:be.hasEagerState,eagerState:be.eagerState,next:null},ae===null?(V=ae=Pe,D=M):ae=ae.next=Pe,Tt.lanes|=$e,Ts|=$e;Pe=be.action,Ha&&c(M,Pe),M=be.hasEagerState?be.eagerState:c(M,Pe)}else $e={lane:Pe,revertLane:be.revertLane,gesture:be.gesture,action:be.action,hasEagerState:be.hasEagerState,eagerState:be.eagerState,next:null},ae===null?(V=ae=$e,D=M):ae=ae.next=$e,Tt.lanes|=Pe,Ts|=Pe;be=be.next}
vendor: 4,676 bytes, line 4123
4123while(be!==null&&be!==a);if(ae===null?D=M:ae.next=V,!Ii(M,s.memoizedState)&&(Sn=!0,Fe&&(c=Bo,c!==null)))throw c;s.memoizedState=M,s.baseState=D,s.baseQueue=ae,d.lastRenderedState=M}return y===null&&(d.lanes=0),[s.memoizedState,d.dispatch]}function ri(s){var a=st(),c=a.queue;if(c===null)throw Error(r(311));c.lastRenderedReducer=s;var d=c.dispatch,y=c.pending,M=a.memoizedState;if(y!==null){c.pending=null;var D=y=y.next;do M=s(M,D.action),D=D.next;while(D!==y);Ii(M,a.memoizedState)||(Sn=!0),a.memoizedState=M,a.baseQueue===null&&(a.baseState=M),c.lastRenderedState=M}return[M,d]}function zt(s,a,c){var d=Tt,y=st(),M=Vt;if(M){if(c===void 0)throw Error(r(407));c=c()}else c=a();var D=!Ii((Zt||y).memoizedState,c);if(D&&(y.memoizedState=c,Sn=!0),y=y.queue,us(Ft.bind(null,d,y,s),[s]),y.getSnapshot!==a||D||bn!==null&&bn.memoizedState.tag&1){if(d.flags|=2048,er(9,{destroy:void 0},Yn.bind(null,d,y,c,a),null),Qt===null)throw Error(r(349));M||Hr&127||Xt(d,a,c)}return c}function Xt(s,a,c){s.flags|=16384,s={getSnapshot:a,value:c},a=Tt.updateQueue,a===null?(a=nn(),Tt.updateQueue=a,a.stores=[s]):(c=a.stores,c===null?a.stores=[s]:c.push(s))}function Yn(s,a,c,d){a.value=c,a.getSnapshot=d,Ei(a)&&pi(s)}function Ft(s,a,c){return c(function(){Ei(a)&&pi(s)})}function Ei(s){var a=s.getSnapshot;s=s.value;try{var c=a();return!Ii(s,c)}catch{return!0}}function pi(s){var a=di(s,2);a!==null&&mi(a,s,2)}function Qi(s){var a=Mt();if(typeof s=="function"){var c=s;if(s=c(),Ha){H(!0);try{c()}finally{H(!1)}}}return a.memoizedState=a.baseState=s,a.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Kt,lastRenderedState:s},a}function $s(s,a,c,d){return s.baseState=c,zn(s,Zt,typeof d=="function"?d:Kt)}function xo(s,a,c,d,y){if(Lr(s))throw Error(r(485));if(s=a.action,s!==null){var M={payload:y,action:s,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(D){M.listeners.push(D)}};dt.T!==null?c(!0):M.isTransition=!1,d(M),c=a.pending,c===null?(M.next=a.pending=M,Zs(a,M)):(M.next=c.next,a.pending=c.next=M)}}function Zs(s,a){var c=a.action,d=a.payload,y=s.state;if(a.isTransition){var M=dt.T,D={};dt.T=D;try{var V=c(y,d),ae=dt.S;ae!==null&&ae(D,V),Js(s,a,V)}catch(be){cs(s,a,be)}finally{M!==null&&D.types!==null&&(M.types=D.types),dt.T=M}}else try{M=c(y,d),Js(s,a,M)}catch(be){cs(s,a,be)}}function Js(s,a,c){c!==null&&typeof c=="object"&&typeof c.then=="function"?c.then(function(d){Ks(s,a,d)},function(d){return cs(s,a,d)}):Ks(s,a,c)}function Ks(s,a,c){a.status="fulfilled",a.value=c,Qs(a),s.state=c,a=s.pending,a!==null&&(c=a.next,c===a?s.pending=null:(c=c.next,a.next=c,Zs(s,c)))}function cs(s,a,c){var d=s.pending;if(s.pending=null,d!==null){d=d.next;do a.status="rejected",a.reason=c,Qs(a),a=a.next;while(a!==d)}s.action=null}function Qs(s){s=s.listeners;for(var a=0;a<s.length;a++)(0,s[a])()}function ea(s,a){return a}function ta(s,a){if(Vt){var c=Qt.formState;if(c!==null){e:{var d=Tt;if(Vt){if(ln){var y=v3(ln,ji);if(y){ln=e1(y),d=y3(y);break e}}We(d)}d=!1}d&&(a=c[0])}}c=Mt(),c.memoizedState=c.baseState=a,d={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ea,lastRenderedState:a},c.queue=d,c=xa.bind(null,Tt,d),d.dispatch=c,d=Qi(!1);var M=ps.bind(null,Tt,!1,d.queue);return d=Mt(),y={state:a,dispatch:null,action:s,pending:null},d.queue=y,c=xo.bind(null,Tt,y,M,c),y.dispatch=c,d.memoizedState=s,[a,c,!1]}function na(s){return ia(st(),Zt,s)}function ia(s,a,c){if(a=zn(s,a,ea)[0],s=_n(Kt)[0],typeof a=="object"&&a!==null&&typeof a.then=="function")try{var d=He(a)}catch(D){throw D===zo?bu:D}else d=a;a=st();var y=a.queue,M=y.dispatch;return c!==a.memoizedState&&(Tt.flags|=2048,er(9,{destroy:void 0},_o.bind(null,y,c),null)),[d,M,s]}function _o(s,a){s.action=a}function ra(s){var a=st(),c=Zt;if(c!==null)return ia(a,c,s);st(),a=a.memoizedState,c=st();var d=c.queue.dispatch;return c.memoizedState=s,[a,d,!1]}function er(s,a,c,d){return s={tag:s,create:c,deps:d,inst:a,next:null},a=Tt.updateQueue,a===null&&(a=nn(),Tt.updateQueue=a),c=a.lastEffect,c===null?a.lastEffect=s.next=s:(d=c.next,c.next=s,s.next=d,a.lastEffect=s),s}function sa(){return st().memoizedState}function Pr(s,a,c,d){var y=Mt();Tt.flags|=s,y.memoizedState=er(1|a,{destroy:void 0},c,d===void 0?null:d)}function Nr(s,a,c,d){var y=st();d=d===void 0?null:d;var M=y.memoizedState.inst;Zt!==null&&d!==null&&Ve(d,Zt.memoizedState.deps)?y.memoizedState=er(a,M,c,d):(Tt.flags|=s,y.memoizedState=er(1|a,M,c,d))}function aa(s,a){Pr(8390656,8,s,a)}function us(s,a){Nr(2048,8,s,a)}function bo(s){Tt.flags|=4;var a=Tt.updateQueue;if(a===null)a=nn(),Tt.updateQueue=a,a.events=[s];else{var c=a.events;c===null?a.events=[s]:c.push(s)}}function oa(s){var a=st().memoizedState;
vendor: 16,457 bytes, line 4123
4123return bo({ref:a,nextImpl:s}),function(){if((Ut&2)!==0)throw Error(r(440));return a.impl.apply(void 0,arguments)}}function la(s,a){return Nr(4,2,s,a)}function ca(s,a){return Nr(4,4,s,a)}function ua(s,a){if(typeof a=="function"){s=s();var c=a(s);return function(){typeof c=="function"?c():a(null)}}if(a!=null)return s=s(),a.current=s,function(){a.current=null}}function ha(s,a,c){c=c!=null?c.concat([s]):null,Nr(4,4,ua.bind(null,a,s),c)}function hs(){}function fa(s,a){var c=st();a=a===void 0?null:a;var d=c.memoizedState;return a!==null&&Ve(a,d[1])?d[0]:(c.memoizedState=[s,a],s)}function da(s,a){var c=st();a=a===void 0?null:a;var d=c.memoizedState;if(a!==null&&Ve(a,d[1]))return d[0];if(d=s(),Ha){H(!0);try{s()}finally{H(!1)}}return c.memoizedState=[d,a],d}function fs(s,a,c){return c===void 0||(Hr&1073741824)!==0&&(kt&261930)===0?s.memoizedState=a:(s.memoizedState=c,s=pm(),Tt.lanes|=s,Ts|=s,c)}function pa(s,a,c,d){return Ii(c,a)?c:Ho.current!==null?(s=fs(s,c,d),Ii(s,a)||(Sn=!0),s):(Hr&42)===0||(Hr&1073741824)!==0&&(kt&261930)===0?(Sn=!0,s.memoizedState=c):(s=pm(),Tt.lanes|=s,Ts|=s,a)}function ma(s,a,c,d,y){var M=Vr();Dn(M!==0&&8>M?M:8);var D=dt.T,V={};dt.T=V,ps(s,!1,a,c);try{var ae=y(),be=dt.S;be!==null&&be(V,ae),ae!==null&&typeof ae=="object"&&typeof ae.then=="function"?xr(s,a,ft(ae,d),Ti(s)):xr(s,a,d,Ti(s))}catch(Fe){xr(s,a,{then:function(){},status:"rejected",reason:Fe},Ti())}finally{Dn(M),D!==null&&V.types!==null&&(D.types=V.types),dt.T=D}}function ga(s){var a=s.memoizedState;if(a!==null)return a;a={memoizedState:Po,baseState:Po,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Kt,lastRenderedState:Po},next:null};var c={};return a.next={memoizedState:c,baseState:c,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Kt,lastRenderedState:c},next:null},s.memoizedState=a,s=s.alternate,s!==null&&(s.memoizedState=a),a}function ds(){return vt(Fa)}function va(){return st().memoizedState}function ya(){return st().memoizedState}function So(s){for(var a=s.return;a!==null;){switch(a.tag){case 24:case 3:var c=Ti();s=Xn(c);var d=qn(a,s,c);d!==null&&(mi(d,a,c),ni(d,a,c)),a={cache:U()},s.payload=a;return}a=a.return}}function Mo(s,a,c){var d=Ti();c={lane:d,revertLane:0,gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null},Lr(s)?_a(a,c):(c=Bi(s,a,c,d),c!==null&&(mi(c,s,d),ba(c,a,d)))}function xa(s,a,c){xr(s,a,c,Ti())}function xr(s,a,c,d){var y={lane:d,revertLane:0,gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null};if(Lr(s))_a(a,y);else{var M=s.alternate;if(s.lanes===0&&(M===null||M.lanes===0)&&(M=a.lastRenderedReducer,M!==null))try{var D=a.lastRenderedState,V=M(D,c);if(y.hasEagerState=!0,y.eagerState=V,Ii(V,D))return ki(s,a,y,0),Qt===null&&Ji(),!1}catch{}if(c=Bi(s,a,y,d),c!==null)return mi(c,s,d),ba(c,a,d),!0}return!1}function ps(s,a,c,d){if(d={lane:2,revertLane:xe(),gesture:null,action:d,hasEagerState:!1,eagerState:null,next:null},Lr(s)){if(a)throw Error(r(479))}else a=Bi(s,c,d,2),a!==null&&mi(a,s,2)}function Lr(s){var a=s.alternate;return s===Tt||a!==null&&a===Tt}function _a(s,a){Wo=wu=!0;var c=s.pending;c===null?a.next=a:(a.next=c.next,c.next=a),s.pending=a}function ba(s,a,c){if((c&4194048)!==0){var d=a.lanes;d&=s.pendingLanes,c|=d,a.lanes=c,R(s,c)}}function ms(s,a,c,d){a=s.memoizedState,c=c(d,a),c=c==null?a:Df({},a,c),s.memoizedState=c,s.lanes===0&&(s.updateQueue.baseState=c)}function Sa(s,a,c,d,y,M,D){return s=s.stateNode,typeof s.shouldComponentUpdate=="function"?s.shouldComponentUpdate(d,M,D):a.prototype&&a.prototype.isPureReactComponent?!ve(c,d)||!ve(y,M):!0}function Ma(s,a,c,d){s=a.state,typeof a.componentWillReceiveProps=="function"&&a.componentWillReceiveProps(c,d),typeof a.UNSAFE_componentWillReceiveProps=="function"&&a.UNSAFE_componentWillReceiveProps(c,d),a.state!==s&&sd.enqueueReplaceState(a,a.state,null)}function Gi(s,a){var c=a;if("ref"in a){c={};for(var d in a)d!=="ref"&&(c[d]=a[d])}if(s=s.defaultProps){c===a&&(c=Df({},c));for(var y in s)c[y]===void 0&&(c[y]=s[y])}return c}function Dr(s,a){try{var c=s.onUncaughtError;c(a.value,{componentStack:a.stack})}catch(d){setTimeout(function(){throw d})}}function wa(s,a,c){try{var d=s.onCaughtError;d(c.value,{componentStack:c.stack,errorBoundary:a.tag===1?a.stateNode:null})}catch(y){setTimeout(function(){throw y})}}function gs(s,a,c){return c=Xn(c),c.tag=3,c.payload={element:null},c.callback=function(){Dr(s,a)},c}function Ea(s){return s=Xn(s),s.tag=3,s}function Ta(s,a,c,d){var y=c.type.getDerivedStateFromError;if(typeof y=="function"){var M=d.value;s.payload=function(){return y(M)},s.callback=function(){wa(a,c,d)}}var D=c.stateNode;D!==null&&typeof D.componentDidCatch=="function"&&(s.callback=function(){wa(a,c,d),typeof y!="function"&&(Cs===null?Cs=new Set([this]):Cs.add(this));var V=d.stack;this.componentDidCatch(d.value,{componentStack:V!==null?V:""})})}function wo(s,a,c,d,y){if(c.flags|=32768,d!==null&&typeof d=="object"&&typeof d.then=="function"){if(a=c.alternate,a!==null&&lt(a,c,y,!0),c=Pi.current,c!==null){switch(c.tag){case 31:case 13:return sr===null?au():c.alternate===null&&dn===0&&(dn=3),c.flags&=-257,c.flags|=65536,c.lanes=y,d===Su?c.flags|=16384:(a=c.updateQueue,a===null?c.updateQueue=new Set([d]):a.add(d),Rf(s,d,y)),!1;case 22:return c.flags|=65536,d===Su?c.flags|=16384:(a=c.updateQueue,a===null?(a={transitions:null,markerInstances:null,retryQueue:new Set([d])},c.updateQueue=a):(c=a.retryQueue,c===null?a.retryQueue=new Set([d]):c.add(d)),Rf(s,d,y)),!1}throw Error(r(435,c.tag))}return Rf(s,d,y),au(),!1}if(Vt)return a=Pi.current,a!==null?(!(a.flags&65536)&&(a.flags|=256),a.flags|=65536,a.lanes=y,d!==Jf&&(s=Error(r(422),{cause:d}),Ae(ue(s,c)))):(d!==Jf&&(a=Error(r(423),{cause:d}),Ae(ue(a,c))),s=s.current.alternate,s.flags|=65536,y&=-y,s.lanes|=y,d=ue(d,c),y=gs(s.stateNode,d,y),Ki(s,y),dn!==4&&(dn=2)),!1;var M=Error(r(520),{cause:d});if(M=ue(M,c),ic===null?ic=[M]:ic.push(M),dn!==4&&(dn=2),a===null)return!0;d=ue(d,c),c=a;do{switch(c.tag){case 3:return c.flags|=65536,s=y&-y,c.lanes|=s,s=gs(c.stateNode,d,s),Ki(c,s),!1;case 1:if(a=c.type,M=c.stateNode,(c.flags&128)===0&&(typeof a.getDerivedStateFromError=="function"||M!==null&&typeof M.componentDidCatch=="function"&&(Cs===null||!Cs.has(M))))return c.flags|=65536,y&=-y,c.lanes|=y,y=Ea(y),Ta(y,s,c,d),Ki(c,y),!1}c=c.return}while(c!==null);return!1}function fn(s,a,c,d){a.child=s===null?v1(a,null,c,d):Ga(a,s.child,c,d)}function Ca(s,a,c,d,y){c=c.render;var M=a.ref;if("ref"in d){var D={};for(var V in d)V!=="ref"&&(D[V]=d[V])}else D=d;return z(a),d=Ge(s,a,c,D,M,y),V=it(),s!==null&&!Sn?(Bt(s,a,y),Or(s,a,y)):(Vt&&V&&_e(a),a.flags|=1,fn(s,a,d,y),a.child)}function Aa(s,a,c,d,y){if(s===null){var M=c.type;return typeof M=="function"&&!If(M)&&M.defaultProps===void 0&&c.compare===null?(a.tag=15,a.type=M,Ra(s,a,M,d,y)):(s=lu(c.type,null,d,a,a.mode,y),s.ref=a.ref,s.return=a,a.child=s)}if(M=s.child,!df(s,y)){var D=M.memoizedProps;if(c=c.compare,c=c!==null?c:ve,c(D,d)&&s.ref===a.ref)return Or(s,a,y)}return a.flags|=1,s=Br(M,d),s.ref=a.ref,s.return=a,a.child=s}function Ra(s,a,c,d,y){if(s!==null){var M=s.memoizedProps;if(ve(M,d)&&s.ref===a.ref)if(Sn=!1,a.pendingProps=d=M,df(s,y))s.flags&131072&&(Sn=!0);else return a.lanes=s.lanes,Or(s,a,y)}return of(s,a,c,d,y)}function Ia(s,a,c,d){var y=d.children,M=s!==null?s.memoizedState:null;if(s===null&&a.stateNode===null&&(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),d.mode==="hidden"){if((a.flags&128)!==0){if(M=M!==null?M.baseLanes|c:c,s!==null){for(d=a.child=s.child,y=0;d!==null;)y=y|d.lanes|d.childLanes,d=d.sibling;d=y&~M}else d=0,a.child=null;return Pa(s,a,M,c,d)}if((c&536870912)!==0)a.memoizedState={baseLanes:0,cachePool:null},s!==null&&W(a,M!==null?M.cachePool:null),M!==null?Ir(a,M):vr(),ne(a);else return d=a.lanes=536870912,Pa(s,a,M!==null?M.baseLanes|c:c,c,d)}else M!==null?(W(a,M.cachePool),Ir(a,M),Q(),a.memoizedState=null):(s!==null&&W(a,null),vr(),Q());return fn(s,a,y,c),a.child}function _r(s,a){return s!==null&&s.tag===22||a.stateNode!==null||(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.sibling}function Pa(s,a,c,d,y){var M=Rt();return M=M===null?null:{parent:zr?cn._currentValue:cn._currentValue2,pool:M},a.memoizedState={baseLanes:c,cachePool:M},s!==null&&W(a,null),vr(),ne(a),s!==null&&lt(s,a,d,!0),a.childLanes=y,null}function Ur(s,a){return a=eu({mode:a.mode,children:a.children},s.mode),a.ref=s.ref,s.child=a,a.return=s,a}function Na(s,a,c){return Ga(a,s.child,null,c),s=Ur(a,a.pendingProps),s.flags|=2,Z(a),a.memoizedState=null,s}function Eo(s,a,c){var d=a.pendingProps,y=(a.flags&128)!==0;if(a.flags&=-129,s===null){if(Vt){if(d.mode==="hidden")return s=Ur(a,d),a.lanes=536870912,_r(null,s);if($(a),(s=ln)?(s=C3(s,ji),s!==null&&(a.memoizedState={dehydrated:s,treeContext:bs!==null?{id:Mr,overflow:wr}:null,retryLane:536870912,hydrationErrors:null},c=Dm(s),c.return=a,a.child=c,Gn=a,ln=null)):s=null,s===null)throw We(a);return a.lanes=536870912,null}return Ur(a,d)}var M=s.memoizedState;if(M!==null){var D=M.dehydrated;if($(a),y)if(a.flags&256)a.flags&=-257,a=Na(s,a,c);else if(a.memoizedState!==null)a.child=s.child,a.flags|=128,a=null;else throw Error(r(558));else if(Sn||lt(s,a,c,!1),y=(c&s.childLanes)!==0,Sn||y){if(d=Qt,d!==null&&(D=B(d,c),D!==0&&D!==M.retryLane))throw M.retryLane=D,di(s,D),mi(d,s,D),ad;au(),a=Na(s,a,c)}else s=M.treeContext,Jn&&(ln=S3(D),Gn=a,Vt=!0,Ms=null,ji=!1,s!==null&&tt(a,s)),a=Ur(a,d),a.flags|=4096;return a}return s=Br(s.child,{mode:d.mode,children:d.children}),s.ref=a.ref,a.child=s,s.return=a,s}function Qc(s,a){var c=a.ref;if(c===null)s!==null&&s.ref!==null&&(a.flags|=4194816);else{if(typeof c!="function"&&typeof c!="object")throw Error(r(284));(s===null||s.ref!==c)&&(a.flags|=4194816)}}function of(s,a,c,d,y){return z(a),c=Ge(s,a,c,d,void 0,y),d=it(),s!==null&&!Sn?(Bt(s,a,y),Or(s,a,y)):(Vt&&d&&_e(a),a.flags|=1,fn(s,a,c,y),a.child)}function k0(s,a,c,d,y,M){return z(a),a.updateQueue=null,c=yt(a,d,c,y),ot(s),d=it(),s!==null&&!Sn?(Bt(s,a,M),Or(s,a,M)):(Vt&&d&&_e(a),a.flags|=1,fn(s,a,c,M),a.child)}function B0(s,a,c,d,y){if(z(a),a.stateNode===null){var M=Do,D=c.contextType;typeof D=="object"&&D!==null&&(M=vt(D)),M=new c(d,M),a.memoizedState=M.state!==null&&M.state!==void 0?M.state:null,M.updater=sd,a.stateNode=M,M._reactInternals=a,M=a.stateNode,M.props=d,M.state=a.memoizedState,M.refs={},jn(a),D=c.contextType,M.context=typeof D=="object"&&D!==null?vt(D):Do,M.state=a.memoizedState,D=c.getDerivedStateFromProps,typeof D=="function"&&(ms(a,c,D,d),M.state=a.memoizedState),typeof c.getDerivedStateFromProps=="function"||typeof M.getSnapshotBeforeUpdate=="function"||typeof M.UNSAFE_componentWillMount!="function"&&typeof M.componentWillMount!="function"||(D=M.state,typeof M.componentWillMount=="function"&&M.componentWillMount(),typeof M.UNSAFE_componentWillMount=="function"&&M.UNSAFE_componentWillMount(),D!==M.state&&sd.enqueueReplaceState(M,M.state,null),wi(a,d,M,y),ii(),M.state=a.memoizedState),typeof M.componentDidMount=="function"&&(a.flags|=4194308),d=!0}else if(s===null){M=a.stateNode;var V=a.memoizedProps,ae=Gi(c,V);M.props=ae;var be=M.context,Fe=c.contextType;D=Do,typeof Fe=="object"&&Fe!==null&&(D=vt(Fe));var Pe=c.getDerivedStateFromProps;Fe=typeof Pe=="function"||typeof M.getSnapshotBeforeUpdate=="function",V=a.pendingProps!==V,Fe||typeof M.UNSAFE_componentWillReceiveProps!="function"&&typeof M.componentWillReceiveProps!="function"||(V||be!==D)&&Ma(a,M,d,D),ws=!1;var $e=a.memoizedState;M.state=$e,wi(a,d,M,y),ii(),be=a.memoizedState,V||$e!==be||ws?(typeof Pe=="function"&&(ms(a,c,Pe,d),be=a.memoizedState),(ae=ws||Sa(a,c,ae,d,$e,be,D))?(Fe||typeof M.UNSAFE_componentWillMount!="function"&&typeof M.componentWillMount!="function"||(typeof M.componentWillMount=="function"&&M.componentWillMount(),typeof M.UNSAFE_componentWillMount=="function"&&M.UNSAFE_componentWillMount()),typeof M.componentDidMount=="function"&&(a.flags|=4194308)):(typeof M.componentDidMount=="function"&&(a.flags|=4194308),a.memoizedProps=d,a.memoizedState=be),M.props=d,M.state=be,M.context=D,d=ae):(typeof M.componentDidMount=="function"&&(a.flags|=4194308),d=!1)}else{M=a.stateNode,Vi(s,a),D=a.memoizedProps,Fe=Gi(c,D),M.props=Fe,Pe=a.pendingProps,$e=M.context,be=c.contextType,ae=Do,typeof be=="object"&&be!==null&&(ae=vt(be)),V=c.getDerivedStateFromProps,(be=typeof V=="function"||typeof M.getSnapshotBeforeUpdate=="function")||typeof M.UNSAFE_componentWillReceiveProps!="function"&&typeof M.componentWillReceiveProps!="function"||(D!==Pe||$e!==ae)&&Ma(a,M,d,ae),ws=!1,$e=a.memoizedState,M.state=$e,wi(a,d,M,y),ii();var wt=a.memoizedState;D!==Pe||$e!==wt||ws||s!==null&&s.dependencies!==null&&ut(s.dependencies)?(typeof V=="function"&&(ms(a,c,V,d),wt=a.memoizedState),(Fe=ws||Sa(a,c,Fe,d,$e,wt,ae)||s!==null&&s.dependencies!==null&&ut(s.dependencies))?(be||typeof M.UNSAFE_componentWillUpdate!="function"&&typeof M.componentWillUpdate!="function"||(typeof M.componentWillUpdate=="function"&&M.componentWillUpdate(d,wt,ae),typeof M.UNSAFE_componentWillUpdate=="function"&&M.UNSAFE_componentWillUpdate(d,wt,ae)),typeof M.componentDidUpdate=="function"&&(a.flags|=4),typeof M.getSnapshotBeforeUpdate=="function"&&(a.flags|=1024)):(typeof M.componentDidUpdate!="function"||D===s.memoizedProps&&$e===s.memoizedState||(a.flags|=4),typeof M.getSnapshotBeforeUpdate!="function"||D===s.memoizedProps&&$e===s.memoizedState||(a.flags|=1024),a.memoizedProps=d,a.memoizedState=wt),M.props=d,M.state=wt,M.context=ae,d=Fe):(typeof M.componentDidUpdate!="function"||D===s.memoizedProps&&$e===s.memoizedState||(a.flags|=4),typeof M.getSnapshotBeforeUpdate!="function"||D===s.memoizedProps&&$e===s.memoizedState||(a.flags|=1024),d=!1)}return M=d,Qc(s,a),d=(a.flags&128)!==0,M||d?(M=a.stateNode,c=d&&typeof c.getDerivedStateFromError!="function"?null:M.render(),a.flags|=1,s!==null&&d?(a.child=Ga(a,s.child,null,y),a.child=Ga(a,null,c,y)):fn(s,a,c,y),a.memoizedState=M.state,s=a.child):s=Or(s,a,y),s}function z0(s,a,c,d){return oe(),a.flags|=256,fn(s,a,c,d),a.child}function lf(s){return{baseLanes:s,cachePool:le()}}function cf(s,a,c){return s=s!==null?s.childLanes&~c:0,a&&(s|=Li),s}function V0(s,a,c){var d=a.pendingProps,y=!1,M=(a.flags&128)!==0,D;if((D=M)||(D=s!==null&&s.memoizedState===null?!1:(vn.current&2)!==0),D&&(y=!0,a.flags&=-129),D=(a.flags&32)!==0,a.flags&=-33,s===null){if(Vt){if(y?L(a):Q(),(s=ln)?(s=A3(s,ji),s!==null&&(a.memoizedState={dehydrated:s,treeContext:bs!==null?{id:Mr,overflow:wr}:null,retryLane:536870912,hydrationErrors:null},c=Dm(s),c.return=a,a.child=c,Gn=a,ln=null)):s=null,s===null)throw We(a);return Wf(s)?a.lanes=32:a.lanes=536870912,null}var V=d.children;return d=d.fallback,y?(Q(),y=a.mode,V=eu({mode:"hidden",children:V},y),d=Ua(d,y,c,null),V.return=a,d.return=a,V.sibling=d,a.child=V,d=a.child,d.memoizedState=lf(c),d.childLanes=cf(s,D,c),a.memoizedState=od,_r(null,d)):(L(a),uf(a,V))}var ae=s.memoizedState;if(ae!==null&&(V=ae.dehydrated,V!==null)){if(M)a.flags&256?(L(a),a.flags&=-257,a=hf(s,a,c)):a.memoizedState!==null?(Q(),a.child=s.child,a.flags|=128,a=null):(Q(),V=d.fallback,y=a.mode,d=eu({mode:"visible",children:d.children},y),V=Ua(V,y,c,null),V.flags|=2,d.return=a,V.return=a,d.sibling=V,a.child=d,Ga(a,s.child,null,c),d=a.child,d.memoizedState=lf(c),d.childLanes=cf(s,D,c),a.memoizedState=od,a=_r(null,d));else if(L(a),Wf(V))D=m3(V).digest,d=Error(r(419)),d.stack="",d.digest=D,Ae({value:d,source:null,stack:null}),a=hf(s,a,c);else if(Sn||lt(s,a,c,!1),D=(c&s.childLanes)!==0,Sn||D){if(D=Qt,D!==null&&(d=B(D,c),d!==0&&d!==ae.retryLane))throw ae.retryLane=d,di(s,d),mi(D,s,d),ad;Hf(V)||au(),a=hf(s,a,c)}else Hf(V)?(a.flags|=192,a.child=s.child,a=null):(s=ae.treeContext,Jn&&(ln=M3(V),Gn=a,Vt=!0,Ms=null,ji=!1,s!==null&&tt(a,s)),a=uf(a,d.children),a.flags|=4096);return a}return y?(Q(),V=d.fallback,y=a.mode,ae=s.child,M=ae.sibling,d=Br(ae,{mode:"hidden",children:d.children}),d.subtreeFlags=ae.subtreeFlags&65011712,M!==null?V=Br(M,V):(V=Ua(V,y,c,null),V.flags|=2),V.return=a,d.return=a,d.sibling=V,a.child=d,_r(null,d),d=a.child,V=s.child.memoizedState,V===null?V=lf(c):(y=V.cachePool,y!==null?(ae=zr?cn._currentValue:cn._currentValue2,y=y.parent!==ae?{parent:ae,pool:ae}:y):y=le(),V={baseLanes:V.baseLanes|c,cachePool:y}),d.memoizedState=V,d.childLanes=cf(s,D,c),a.memoizedState=od,_r(s.child,d)):(L(a),c=s.child,s=c.sibling,c=Br(c,{mode:"visible",children:d.children}),c.return=a,c.sibling=null,s!==null&&(D=a.deletions,D===null?(a.deleti
vendor: 4,075 bytes, line 4123
4123ons=[s],a.flags|=16):D.push(s)),a.child=c,a.memoizedState=null,c)}function uf(s,a){return a=eu({mode:"visible",children:a},s.mode),a.return=s,s.child=a}function eu(s,a){return s=n(22,s,null,a),s.lanes=0,s}function hf(s,a,c){return Ga(a,s.child,null,c),s=uf(a,a.pendingProps.children),s.flags|=2,a.memoizedState=null,s}function G0(s,a,c){s.lanes|=a;var d=s.alternate;d!==null&&(d.lanes|=a),Ye(s.return,a,c)}function ff(s,a,c,d,y,M){var D=s.memoizedState;D===null?s.memoizedState={isBackwards:a,rendering:null,renderingStartTime:0,last:d,tail:c,tailMode:y,treeForkCount:M}:(D.isBackwards=a,D.rendering=null,D.renderingStartTime=0,D.last=d,D.tail=c,D.tailMode=y,D.treeForkCount=M)}function H0(s,a,c){var d=a.pendingProps,y=d.revealOrder,M=d.tail;d=d.children;var D=vn.current,V=(D&2)!==0;if(V?(D=D&1|2,a.flags|=128):D&=1,b(vn,D),fn(s,a,d,c),d=Vt?Zl:0,!V&&s!==null&&(s.flags&128)!==0)e:for(s=a.child;s!==null;){if(s.tag===13)s.memoizedState!==null&&G0(s,c,a);else if(s.tag===19)G0(s,c,a);else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===a)break e;for(;s.sibling===null;){if(s.return===null||s.return===a)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}switch(y){case"forwards":for(c=a.child,y=null;c!==null;)s=c.alternate,s!==null&&Te(s)===null&&(y=c),c=c.sibling;c=y,c===null?(y=a.child,a.child=null):(y=c.sibling,c.sibling=null),ff(a,!1,y,c,M,d);break;case"backwards":case"unstable_legacy-backwards":for(c=null,y=a.child,a.child=null;y!==null;){if(s=y.alternate,s!==null&&Te(s)===null){a.child=y;break}s=y.sibling,y.sibling=c,c=y,y=s}ff(a,!0,c,null,M,d);break;case"together":ff(a,!1,null,null,void 0,d);break;default:a.memoizedState=null}return a.child}function Or(s,a,c){if(s!==null&&(a.dependencies=s.dependencies),Ts|=a.lanes,(c&a.childLanes)===0)if(s!==null){if(lt(s,a,c,!1),(c&a.childLanes)===0)return null}else return null;if(s!==null&&a.child!==s.child)throw Error(r(153));if(a.child!==null){for(s=a.child,c=Br(s,s.pendingProps),a.child=c,c.return=a;s.sibling!==null;)s=s.sibling,c=c.sibling=Br(s,s.pendingProps),c.return=a;c.sibling=null}return a.child}function df(s,a){return(s.lanes&a)!==0?!0:(s=s.dependencies,!!(s!==null&&ut(s)))}function o_(s,a,c){switch(a.tag){case 3:re(a,a.stateNode.containerInfo),De(a,cn,s.memoizedState.cache),oe();break;case 27:case 5:Ie(a);break;case 4:re(a,a.stateNode.containerInfo);break;case 10:De(a,a.type,a.memoizedProps.value);break;case 31:if(a.memoizedState!==null)return a.flags|=128,$(a),null;break;case 13:var d=a.memoizedState;if(d!==null)return d.dehydrated!==null?(L(a),a.flags|=128,null):(c&a.child.childLanes)!==0?V0(s,a,c):(L(a),s=Or(s,a,c),s!==null?s.sibling:null);L(a);break;case 19:var y=(s.flags&128)!==0;if(d=(c&a.childLanes)!==0,d||(lt(s,a,c,!1),d=(c&a.childLanes)!==0),y){if(d)return H0(s,a,c);a.flags|=128}if(y=a.memoizedState,y!==null&&(y.rendering=null,y.tail=null,y.lastEffect=null),b(vn,vn.current),d)break;return null;case 22:return a.lanes=0,Ia(s,a,c,a.pendingProps);case 24:De(a,cn,s.memoizedState.cache)}return Or(s,a,c)}function W0(s,a,c){if(s!==null)if(s.memoizedProps!==a.pendingProps)Sn=!0;else{if(!df(s,c)&&(a.flags&128)===0)return Sn=!1,o_(s,a,c);Sn=(s.flags&131072)!==0}else Sn=!1,Vt&&a.flags&1048576&&me(a,Zl,a.index);switch(a.lanes=0,a.tag){case 16:e:{var d=a.pendingProps;if(s=pe(a.elementType),a.type=s,typeof s=="function")If(s)?(d=Gi(s,d),a.tag=1,a=B0(null,a,s,d,c)):(a.tag=0,a=of(null,a,s,d,c));else{if(s!=null){var y=s.$$typeof;if(y===Of){a.tag=11,a=Ca(null,a,s,d,c);break e}else if(y===Bf){a.tag=14,a=Aa(null,a,s,d,c);break e}}throw a=g(s)||s,Error(r(306,a,""))}}return a;case 0:return of(s,a,a.type,a.pendingProps,c);case 1:return d=a.type,y=Gi(d,a.pendingProps),B0(s,a,d,y,c);case 3:e:{if(re(a,a.stateNode.containerInfo),s===null)throw Error(r(387));var M=a.pendingProps;y=a.memoizedState,d=y.element,Vi(s,a),wi(a,M,null,c);var D=a.memoizedState;if(M=D.cache,De(a,cn,M),M!==y.cache&&Je(a,[cn],c,!0),ii(),M=D.element,Jn&&y.isDehydrated)if(y={element:M,isDehydrated:!1,cache:D.cache},a.updateQueue.baseState=y,a.memoizedState=y,a.flags&256){a=z0(s,a,M,c);break e}
vendor: 4,960 bytes, line 4123
4123else if(M!==d){d=ue(Error(r(424)),a),Ae(d),a=z0(s,a,M,c);break e}else for(Jn&&(ln=b3(a.stateNode.containerInfo),Gn=a,Vt=!0,Ms=null,ji=!0),c=v1(a,null,M,c),a.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling;else{if(oe(),M===d){a=Or(s,a,c);break e}fn(s,a,M,c)}a=a.child}return a;case 26:if(rr)return Qc(s,a),s===null?(c=i1(a.type,null,a.pendingProps,null))?a.memoizedState=c:Vt||(a.stateNode=Y3(a.type,a.pendingProps,Ss.current,a)):a.memoizedState=i1(a.type,s.memoizedProps,a.pendingProps,s.memoizedState),null;case 27:if(An)return Ie(a),s===null&&An&&Vt&&(d=a.stateNode=c1(a.type,a.pendingProps,Ss.current,Vn.current,!1),Gn=a,ji=!0,ln=w3(a.type,d,ln)),fn(s,a,a.pendingProps.children,c),Qc(s,a),s===null&&(a.flags|=4194304),a.child;case 5:return s===null&&Vt&&(j3(a.type,a.pendingProps,Vn.current),(y=d=ln)&&(d=E3(d,a.type,a.pendingProps,ji),d!==null?(a.stateNode=d,Gn=a,ln=_3(d),ji=!1,y=!0):y=!1),y||We(a)),Ie(a),y=a.type,M=a.pendingProps,D=s!==null?s.memoizedProps:null,d=M.children,hu(y,M)?d=null:D!==null&&hu(y,D)&&(a.flags|=32),a.memoizedState!==null&&(y=Ge(s,a,St,null,null,c),zr?Fa._currentValue=y:Fa._currentValue2=y),Qc(s,a),fn(s,a,d,c),a.child;case 6:return s===null&&Vt&&(X3(a.pendingProps,Vn.current),(s=c=ln)&&(c=T3(c,a.pendingProps,ji),c!==null?(a.stateNode=c,Gn=a,ln=null,s=!0):s=!1),s||We(a)),null;case 13:return V0(s,a,c);case 4:return re(a,a.stateNode.containerInfo),d=a.pendingProps,s===null?a.child=Ga(a,null,d,c):fn(s,a,d,c),a.child;case 11:return Ca(s,a,a.type,a.pendingProps,c);case 7:return fn(s,a,a.pendingProps,c),a.child;case 8:return fn(s,a,a.pendingProps.children,c),a.child;case 12:return fn(s,a,a.pendingProps.children,c),a.child;case 10:return d=a.pendingProps,De(a,a.type,d.value),fn(s,a,d.children,c),a.child;case 9:return y=a.type._context,d=a.pendingProps.children,z(a),y=vt(y),d=d(y),a.flags|=1,fn(s,a,d,c),a.child;case 14:return Aa(s,a,a.type,a.pendingProps,c);case 15:return Ra(s,a,a.type,a.pendingProps,c);case 19:return H0(s,a,c);case 31:return Eo(s,a,c);case 22:return Ia(s,a,c,a.pendingProps);case 24:return z(a),d=vt(cn),s===null?(y=Rt(),y===null&&(y=Qt,M=U(),y.pooledCache=M,M.refCount++,M!==null&&(y.pooledCacheLanes|=c),y=M),a.memoizedState={parent:d,cache:y},jn(a),De(a,cn,y)):((s.lanes&c)!==0&&(Vi(s,a),wi(a,null,null,c),ii()),y=s.memoizedState,M=a.memoizedState,y.parent!==d?(y={parent:d,cache:d},a.memoizedState=y,a.lanes===0&&(a.memoizedState=a.updateQueue.baseState=y),De(a,cn,d)):(d=M.cache,De(a,cn,d),d!==y.cache&&Je(a,[cn],c,!0))),fn(s,a,a.pendingProps.children,c),a.child;case 29:throw a.pendingProps}throw Error(r(156,a.tag))}function tr(s){s.flags|=4}function tu(s){Sr&&(s.flags|=8)}function j0(s,a){if(s!==null&&s.child===a.child)return!1;if((a.flags&16)!==0)return!0;for(s=a.child;s!==null;){if((s.flags&8218)!==0||(s.subtreeFlags&8218)!==0)return!0;s=s.sibling}return!1}function pf(s,a,c,d){if(Zn)for(c=a.child;c!==null;){if(c.tag===5||c.tag===6)Vf(s,c.stateNode);else if(!(c.tag===4||An&&c.tag===27)&&c.child!==null){c.child.return=c,c=c.child;continue}if(c===a)break;for(;c.sibling===null;){if(c.return===null||c.return===a)return;c=c.return}c.sibling.return=c.return,c=c.sibling}else if(Sr)for(var y=a.child;y!==null;){if(y.tag===5){var M=y.stateNode;c&&d&&(M=Km(M,y.type,y.memoizedProps)),Vf(s,M)}else if(y.tag===6)M=y.stateNode,c&&d&&(M=Qm(M,y.memoizedProps)),Vf(s,M);else if(y.tag!==4){if(y.tag===22&&y.memoizedState!==null)M=y.child,M!==null&&(M.return=y),pf(s,y,!0,!0);else if(y.child!==null){y.child.return=y,y=y.child;continue}}if(y===a)break;for(;y.sibling===null;){if(y.return===null||y.return===a)return;y=y.return}y.sibling.return=y.return,y=y.sibling}}function X0(s,a,c,d){var y=!1;if(Sr)for(var M=a.child;M!==null;){if(M.tag===5){var D=M.stateNode;c&&d&&(D=Km(D,M.type,M.memoizedProps)),Zm(s,D)}else if(M.tag===6)D=M.stateNode,c&&d&&(D=Qm(D,M.memoizedProps)),Zm(s,D);else if(M.tag!==4){if(M.tag===22&&M.memoizedState!==null)y=M.child,y!==null&&(y.return=M),X0(s,M,!0,!0),y=!0;else if(M.child!==null){M.child.return=M,M=M.child;continue}}if(M===a)break;for(;M.sibling===null;){if(M.return===null||M.return===a)return y;M=M.return}M.sibling.return=M.return,M=M.sibling}return y}function q0(s,a){if(Sr&&j0(s,a)){s=a.stateNode;var c=s.containerInfo,d=$m();X0(d,a,!1,!1),s.pendingChildren=d,tr(a),p3(c,d)}}function mf(s,a,c,d){if(Zn)s.memoizedProps!==d&&tr(a);else if(Sr){var y=s.stateNode,M=s.memoizedProps;if((s=j0(s,a))||M!==d){var D=Vn.current;M=d3(y,c,M,d,!s,null),M===y?a.stateNode=y:(tu(a),Wm(M,c,d,D)&&tr(a),a.stateNode=M,s&&pf(M,a,!1,!1))}else a.stateNode=y}}function gf(s,a,c,d,y){if((s.mode&32)!==0&&(c===null?z_(a,d):V_(a,c,d))){if(s.flags|=16777216,(y&335544128)===y||Gf(a,d))if(Xm(s.stateNode,a,d))s.flags|=8192;else if(xm())s.flags|=8192;else throw Va=Su,td}else s.flags&=-16777217}function Y0(s,a){if(Z3(a)){if(s.flags|=16777216,!l1(a))if(xm())s.flags|=8192;else throw Va=Su,td}else s.flags&=-16777217}function nu(s,a){a!==null&&(s.flags|=4),s.flags&16384&&(a=s.tag!==22?E():
vendor: 10,113 bytes, line 4123
4123536870912,s.lanes|=a,Yo|=a)}function zl(s,a){if(!Vt)switch(s.tailMode){case"hidden":a=s.tail;for(var c=null;a!==null;)a.alternate!==null&&(c=a),a=a.sibling;c===null?s.tail=null:c.sibling=null;break;case"collapsed":c=s.tail;for(var d=null;c!==null;)c.alternate!==null&&(d=c),c=c.sibling;d===null?a||s.tail===null?s.tail=null:s.tail.sibling=null:d.sibling=null}}function an(s){var a=s.alternate!==null&&s.alternate.child===s.child,c=0,d=0;if(a)for(var y=s.child;y!==null;)c|=y.lanes|y.childLanes,d|=y.subtreeFlags&65011712,d|=y.flags&65011712,y.return=s,y=y.sibling;else for(y=s.child;y!==null;)c|=y.lanes|y.childLanes,d|=y.subtreeFlags,d|=y.flags,y.return=s,y=y.sibling;return s.subtreeFlags|=d,s.childLanes=c,a}function l_(s,a,c){var d=a.pendingProps;switch(ht(a),a.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return an(a),null;case 1:return an(a),null;case 3:return c=a.stateNode,d=null,s!==null&&(d=s.memoizedState.cache),a.memoizedState.cache!==d&&(a.flags|=2048),Le(cn),ge(),c.pendingContext&&(c.context=c.pendingContext,c.pendingContext=null),(s===null||s.child===null)&&(ct(a)?tr(a):s===null||s.memoizedState.isDehydrated&&!(a.flags&256)||(a.flags|=1024,Se())),q0(s,a),an(a),null;case 26:if(rr){var y=a.type,M=a.memoizedState;return s===null?(tr(a),M!==null?(an(a),Y0(a,M)):(an(a),gf(a,y,null,d,c))):M?M!==s.memoizedState?(tr(a),an(a),Y0(a,M)):(an(a),a.flags&=-16777217):(M=s.memoizedProps,Zn?M!==d&&tr(a):mf(s,a,y,d),an(a),gf(a,y,M,d,c)),null}case 27:if(An){if(Ce(a),c=Ss.current,y=a.type,s!==null&&a.stateNode!=null)Zn?s.memoizedProps!==d&&tr(a):mf(s,a,y,d);else{if(!d){if(a.stateNode===null)throw Error(r(166));return an(a),null}s=Vn.current,ct(a)?et(a,s):(s=c1(y,d,c,s,!0),a.stateNode=s,tr(a))}return an(a),null}case 5:if(Ce(a),y=a.type,s!==null&&a.stateNode!=null)mf(s,a,y,d);else{if(!d){if(a.stateNode===null)throw Error(r(166));return an(a),null}if(M=Vn.current,ct(a))et(a,M),B3(a.stateNode,y,d,M)&&(a.flags|=64);else{var D=N_(y,d,Ss.current,M,a);tu(a),pf(D,a,!1,!1),a.stateNode=D,Wm(D,y,d,M)&&tr(a)}}return an(a),gf(a,a.type,s===null?null:s.memoizedProps,a.pendingProps,c),null;case 6:if(s&&a.stateNode!=null)c=s.memoizedProps,Zn?c!==d&&tr(a):Sr&&(c!==d?(s=Ss.current,c=Vn.current,tu(a),a.stateNode=jm(d,s,c,a)):a.stateNode=s.stateNode);else{if(typeof d!="string"&&a.stateNode===null)throw Error(r(166));if(s=Ss.current,c=Vn.current,ct(a)){if(!Jn)throw Error(r(176));if(s=a.stateNode,c=a.memoizedProps,d=null,y=Gn,y!==null)switch(y.tag){case 27:case 5:d=y.memoizedProps}I3(s,c,a,d)||We(a,!0)}else tu(a),a.stateNode=jm(d,s,c,a)}return an(a),null;case 31:if(c=a.memoizedState,s===null||s.memoizedState!==null){if(d=ct(a),c!==null){if(s===null){if(!d)throw Error(r(318));if(!Jn)throw Error(r(556));if(s=a.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(r(557));P3(s,a)}else oe(),!(a.flags&128)&&(a.memoizedState=null),a.flags|=4;an(a),s=!1}else c=Se(),s!==null&&s.memoizedState!==null&&(s.memoizedState.hydrationErrors=c),s=!0;if(!s)return a.flags&256?(Z(a),a):(Z(a),null);if((a.flags&128)!==0)throw Error(r(558))}return an(a),null;case 13:if(d=a.memoizedState,s===null||s.memoizedState!==null&&s.memoizedState.dehydrated!==null){if(y=ct(a),d!==null&&d.dehydrated!==null){if(s===null){if(!y)throw Error(r(318));if(!Jn)throw Error(r(344));if(y=a.memoizedState,y=y!==null?y.dehydrated:null,!y)throw Error(r(317));N3(y,a)}else oe(),!(a.flags&128)&&(a.memoizedState=null),a.flags|=4;an(a),y=!1}else y=Se(),s!==null&&s.memoizedState!==null&&(s.memoizedState.hydrationErrors=y),y=!0;if(!y)return a.flags&256?(Z(a),a):(Z(a),null)}return Z(a),(a.flags&128)!==0?(a.lanes=c,a):(c=d!==null,s=s!==null&&s.memoizedState!==null,c&&(d=a.child,y=null,d.alternate!==null&&d.alternate.memoizedState!==null&&d.alternate.memoizedState.cachePool!==null&&(y=d.alternate.memoizedState.cachePool.pool),M=null,d.memoizedState!==null&&d.memoizedState.cachePool!==null&&(M=d.memoizedState.cachePool.pool),M!==y&&(d.flags|=2048)),c!==s&&c&&(a.child.flags|=8192),nu(a,a.updateQueue),an(a),null);case 4:return ge(),q0(s,a),s===null&&O_(a.stateNode.containerInfo),an(a),null;case 10:return Le(a.type),an(a),null;case 19:if(v(vn),d=a.memoizedState,d===null)return an(a),null;if(y=(a.flags&128)!==0,M=d.rendering,M===null)if(y)zl(d,!1);else{if(dn!==0||s!==null&&(s.flags&128)!==0)for(s=a.child;s!==null;){if(M=Te(s),M!==null){for(a.flags|=128,zl(d,!1),s=M.updateQueue,a.updateQueue=s,nu(a,s),a.subtreeFlags=0,s=c,c=a.child;c!==null;)Lm(c,s),c=c.sibling;return b(vn,vn.current&1|2),Vt&&ce(a,d.treeForkCount),a.child}s=s.sibling}d.tail!==null&&gi()>rc&&(a.flags|=128,y=!0,zl(d,!1),a.lanes=4194304)}else{if(!y)if(s=Te(M),s!==null){if(a.flags|=128,y=!0,s=s.updateQueue,a.updateQueue=s,nu(a,s),zl(d,!0),d.tail===null&&d.tailMode==="hidden"&&!M.alternate&&!Vt)return an(a),null}else 2*gi()-d.renderingStartTime>rc&&c!==536870912&&(a.flags|=128,y=!0,zl(d,!1),a.lanes=4194304);d.isBackwards?(M.sibling=a.child,a.child=M):(s=d.last,s!==null?s.sibling=M:a.child=M,d.last=M)}return d.tail!==null?(s=d.tail,d.rendering=s,d.tail=s.sibling,d.renderingStartTime=gi(),s.sibling=null,c=vn.current,b(vn,y?c&1|2:c&1),Vt&&ce(a,d.treeForkCount),s):(an(a),null);case 22:case 23:return Z(a),yr(),d=a.memoizedState!==null,s!==null?s.memoizedState!==null!==d&&(a.flags|=8192):d&&(a.flags|=8192),d?c&536870912&&!(a.flags&128)&&(an(a),a.subtreeFlags&6&&(a.flags|=8192)):an(a),c=a.updateQueue,c!==null&&nu(a,c.retryQueue),c=null,s!==null&&s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(c=s.memoizedState.cachePool.pool),d=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(d=a.memoizedState.cachePool.pool),d!==c&&(a.flags|=2048),s!==null&&v(za),null;case 24:return c=null,s!==null&&(c=s.memoizedState.cache),a.memoizedState.cache!==c&&(a.flags|=2048),Le(cn),an(a),null;case 25:return null;case 30:return null}throw Error(r(156,a.tag))}function c_(s,a){switch(ht(a),a.tag){case 1:return s=a.flags,s&65536?(a.flags=s&-65537|128,a):null;case 3:return Le(cn),ge(),s=a.flags,(s&65536)!==0&&(s&128)===0?(a.flags=s&-65537|128,a):null;case 26:case 27:case 5:return Ce(a),null;case 31:if(a.memoizedState!==null){if(Z(a),a.alternate===null)throw Error(r(340));oe()}return s=a.flags,s&65536?(a.flags=s&-65537|128,a):null;case 13:if(Z(a),s=a.memoizedState,s!==null&&s.dehydrated!==null){if(a.alternate===null)throw Error(r(340));oe()}return s=a.flags,s&65536?(a.flags=s&-65537|128,a):null;case 19:return v(vn),null;case 4:return ge(),null;case 10:return Le(a.type),null;case 22:case 23:return Z(a),yr(),s!==null&&v(za),s=a.flags,s&65536?(a.flags=s&-65537|128,a):null;case 24:return Le(cn),null;case 25:return null;default:return null}}function $0(s,a){switch(ht(a),a.tag){case 3:Le(cn),ge();break;case 26:case 27:case 5:Ce(a);break;case 4:ge();break;case 31:a.memoizedState!==null&&Z(a);break;case 13:Z(a);break;case 19:v(vn);break;case 10:Le(a.type);break;case 22:case 23:Z(a),yr(),s!==null&&v(za);break;case 24:Le(cn)}}function Vl(s,a){try{var c=a.updateQueue,d=c!==null?c.lastEffect:null;if(d!==null){var y=d.next;c=y;do{if((c.tag&s)===s){d=void 0;var M=c.create,D=c.inst;d=M(),D.destroy=d}c=c.next}while(c!==y)}}catch(V){Gt(a,a.return,V)}}function vs(s,a,c){try{var d=a.updateQueue,y=d!==null?d.lastEffect:null;if(y!==null){var M=y.next;d=M;do{if((d.tag&s)===s){var D=d.inst,V=D.destroy;if(V!==void 0){D.destroy=void 0,y=a;var ae=c,be=V;try{be()}catch(Fe){Gt(y,ae,Fe)}}}d=d.next}while(d!==M)}}catch(Fe){Gt(a,a.return,Fe)}}function Z0(s){var a=s.updateQueue;if(a!==null){var c=s.stateNode;try{Rr(a,c)}catch(d){Gt(s,s.return,d)}}}function J0(s,a,c){c.props=Gi(s.type,s.memoizedProps),c.state=s.memoizedState;try{c.componentWillUnmount()}catch(d){Gt(s,a,d)}}function Gl(s,a){try{var c=s.ref;if(c!==null){switch(s.tag){case 26:case 27:case 5:var d=Xl(s.stateNode);break;case 30:d=s.stateNode;break;default:d=s.stateNode}typeof c=="function"?s.refCleanup=c(d):c.current=d}}catch(y){Gt(s,a,y)}}function br(s,a){var c=s.ref,d=s.refCleanup;if(c!==null)if(typeof d=="function")try{d()}catch(y){Gt(s,a,y)}finally{s.refCleanup=null,s=s.alternate,s!=null&&(s.refCleanup=null)}else if(typeof c=="function")try{c(null)}catch(y){Gt(s,a,y)}else c.current=null}function K0(s){var a=s.type,c=s.memoizedProps,d=s.stateNode;try{n3(d,a,c,s)}catch(y){Gt(s,s.return,y)}}function vf(s,a,c){try{i3(s.stateNode,s.type,c,a,s)}catch(d){Gt(s,s.return,d)}}function Q0(s){return s.tag===5||s.tag===3||(rr?s.tag===26:!1)||(An?s.tag===27&&No(s.type):!1)||s.tag===4}function yf(s){e:for(;;){for(;s.sibling===null;){if(s.return===null||Q0(s.return))return null;s=s.return}for(s.sibling.return=s.return,s=s.sibling;s.tag!==5&&s.tag!==6&&s.tag!==18;){if(An&&s.tag===27&&No(s.type)||s.flags&2||s.child===null||s.tag===4)continue e;s.child.return=s,s=s.child}if(!(s.flags&2))return s.stateNode}}function xf(s,a,c){var d=s.tag;if(d===5||d===6)s=s.stateNode,a?s3(c,s,a):e3(c,s);else if(d!==4&&(An&&d===27&&No(s.type)&&(c=s.stateNode,a=null),s=s.child,s!==null))for(xf(s,a,c),s=s.sibling;s!==null;)xf(s,a,c),s=s.sibling}function iu(s,a,c){var d=s.tag;if(d===5||d===6)s=s.stateNode,a?r3(c,s,a):Q_(c,s);else if(d!==4&&(An&&d===27&&No(s.type)&&(c=s.stateNode),s=s.child,s!==null))for(iu(s,a,c),s=s.sibling;s!==null;)iu(s,a,c),s=s.sibling}function em(s,a,c){s=s.containerInfo;try{Jm(s,c)}catch(d){Gt(a,a.return,d)}}function tm(s){var a=s.stateNode,c=s.memoizedProps;try{K3(s.type,c,a,s)}catch(d){Gt(s,s.return,d)}}function u_(s,a){for(I_(s.containerInfo),Un=a;Un!==null;)if(s=Un,a=s.child,(s.subtreeFlags&1028)!==0&&a!==null)a.return=s,Un=a;else for(;Un!==null;){s=Un;var c=s.alternate;switch(a=s.flags,s.tag){case 0:if((a&4)!==0&&(a=s.updateQueue,a=a!==null?a.events:null,a!==null))for(var d=0;d<a.length;d++){var y=a[d];y.ref.impl=y.nextImpl}break;case 11:case 15:break;case 1:if((a&1024)!==0&&c!==null){a=void 0,d=s,y=c.memoizedProps,c=c.memoizedState;var M=d.stateNode;try{var D=Gi(d.type,y);a=M.getSnapshotBeforeUpdate(D,c),M.__reactInternalSnapshotBeforeUpdate=a}catch(V){Gt(d,d.return,V)}}break;case 3:a&1024&&Zn&&f3(s.stateNode.containerInfo);break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((a&1024)!==0)throw Error(r(163))}
4123if(a=s.sibling,a!==null){a.return=s.return,Un=a;break}Un=s.return}}function nm(s,a,c){var d=c.flags;switch(c.tag){case 0:case 11:case 15:Fr(s,c),d&4&&Vl(5,c);break;case 1:if(Fr(s,c),d&4)if(s=c.stateNode,a===null)try{s.componentDidMount()}catch(D){Gt(c,c.return,D)}else{var y=Gi(c.type,a.memoizedProps);a=a.memoizedState;try{s.componentDidUpdate(y,a,s.__reactInternalSnapshotBeforeUpdate)}catch(D){Gt(c,c.return,D)}}d&64&&Z0(c),d&512&&Gl(c,c.return);break;case 3:if(Fr(s,c),d&64&&(d=c.updateQueue,d!==null)){if(s=null,c.child!==null)switch(c.child.tag){case 27:case 5:s=Xl(c.child.stateNode);break;case 1:s=c.child.stateNode}try{Rr(d,s)}catch(D){Gt(c,c.return,D)}}break;case 27:An&&a===null&&d&4&&tm(c);case 26:case 5:if(Fr(s,c),a===null){if(d&4)K0(c);else if(d&64){s=c.type,a=c.memoizedProps,y=c.stateNode;try{U3(y,s,a,c)}catch(D){Gt(c,c.return,D)}}}d&512&&Gl(c,c.return);break;case 12:Fr(s,c);break;case 31:Fr(s,c),d&4&&rm(s,c);break;case 13:Fr(s,c),d&4&&sm(s,c),d&64&&(d=c.memoizedState,d!==null&&(d=d.dehydrated,d!==null&&(c=v_.bind(null,c),g3(d,c))));break;case 22:if(d=c.memoizedState!==null||Wr,!d){a=a!==null&&a.memoizedState!==null||Mn,y=Wr;var M=Mn;Wr=d,(Mn=a)&&!M?kr(s,c,(c.subtreeFlags&8772)!==0):Fr(s,c),Wr=y,Mn=M}break;case 30:break;default:Fr(s,c)}}function im(s){var a=s.alternate;a!==null&&(s.alternate=null,im(a)),s.child=null,s.deletions=null,s.sibling=null,s.tag===5&&(a=s.stateNode,a!==null&&B_(a)),s.stateNode=null,s.return=null,s.dependencies=null,s.memoizedProps=null,s.memoizedState=null,s.pendingProps=null,s.stateNode=null,s.updateQueue=null}function nr(s,a,c){for(c=c.child;c!==null;)_f(s,a,c),c=c.sibling}function _f(s,a,c){if(Ri&&typeof Ri.onCommitFiberUnmount=="function")try{Ri.onCommitFiberUnmount($l,c)}catch{}switch(c.tag){case 26:if(rr){Mn||br(c,a),nr(s,a,c),c.memoizedState?s1(c.memoizedState):c.stateNode&&o1(c.stateNode);break}case 27:if(An){Mn||br(c,a);var d=wn,y=vi;No(c.type)&&(wn=c.stateNode,vi=!1),nr(s,a,c),u1(c.stateNode),wn=d,vi=y;break}case 5:Mn||br(c,a);case 6:if(Zn){if(d=wn,y=vi,wn=null,nr(s,a,c),wn=d,vi=y,wn!==null)if(vi)try{o3(wn,c.stateNode)}catch(M){Gt(c,a,M)}else try{a3(wn,c.stateNode)}catch(M){Gt(c,a,M)}}else nr(s,a,c);break;case 18:Zn&&wn!==null&&(vi?G3(wn,c.stateNode):V3(wn,c.stateNode));break;case 4:Zn?(d=wn,y=vi,wn=c.stateNode.containerInfo,vi=!0,nr(s,a,c),wn=d,vi=y):(Sr&&em(c.stateNode,c,$m()),nr(s,a,c));break;case 0:case 11:case 14:case 15:vs(2,c,a),Mn||vs(4,c,a),nr(s,a,c);break;case 1:Mn||(br(c,a),d=c.stateNode,typeof d.componentWillUnmount=="function"&&J0(c,a,d)),nr(s,a,c);break;case 21:nr(s,a,c);break;case 22:Mn=(d=Mn)||c.memoizedState!==null,nr(s,a,c),Mn=d;break;default:nr(s,a,c)}}function rm(s,a){if(Jn&&a.memoizedState===null&&(s=a.alternate,s!==null&&(s=s.memoizedState,s!==null))){s=s.dehydrated;try{F3(s)}catch(c){Gt(a,a.return,c)}}}function sm(s,a){if(Jn&&a.memoizedState===null&&(s=a.alternate,s!==null&&(s=s.memoizedState,s!==null&&(s=s.dehydrated,s!==null))))try{k3(s)}catch(c){Gt(a,a.return,c)}}function h_(s){switch(s.tag){case 31:case 13:case 19:var a=s.stateNode;return a===null&&(a=s.stateNode=new _1),a;case 22:return s=s.stateNode,a=s._retryCache,a===null&&(a=s._retryCache=new _1),a;default:throw Error(r(435,s.tag))}}function ru(s,a){var c=h_(s);a.forEach(function(d){if(!c.has(d)){c.add(d);var y=y_.bind(null,s,d);d.then(y,y)}})}function $n(s,a){var c=a.deletions;if(c!==null)for(var d=0;d<c.length;d++){var y=c[d],M=s,D=a;if(Zn){var V=D;e:for(;V!==null;){switch(V.tag){case 27:if(An){if(No(V.type)){wn=V.stateNode,vi=!1;break e}break}case 5:wn=V.stateNode,vi=!1;break e;case 3:case 4:wn=V.stateNode.containerInfo,vi=!0;break e}V=V.return}if(wn===null)throw Error(r(160));_f(M,D,y),wn=null,vi=!1}else _f(M,D,y);M=y.alternate,M!==null&&(M.return=null),y.return=null}if(a.subtreeFlags&13886)for(a=a.child;a!==null;)am(a,s),a=a.sibling}function am(s,a){var c=s.alternate,d=s.flags;switch(s.tag){case 0:case 11:case 14:case 15:$n(a,s),si(s),d&4&&(vs(3,s,s.return),Vl(3,s),vs(5,s,s.return));break;case 1:$n(a,s),si(s),d&512&&(Mn||c===null||br(c,c.return)),d&64&&Wr&&(s=s.updateQueue,s!==null&&(d=s.callbacks,d!==null&&(c=s.shared.hiddenCallbacks,s.shared.hiddenCallbacks=c===null?d:c.concat(d))));break;case 26:if(rr){var y=ar;if($n(a,s),si(s),d&512&&(Mn||c===null||br(c,c.return)),d&4){d=c!==null?c.memoizedState:null;var M=s.memoizedState;c===null?M===null?s.stateNode===null?s.stateNode=q3(y,s.type,s.memoizedProps,s):a1(y,s.type,s.stateNode):s.stateNode=r1(y,M,s.memoizedProps):d!==M?(d===null?c.stateNode!==null&&o1(c.stateNode):s1(d),M===null?a1(y,s.type,s.stateNode):r1(y,M,s.memoizedProps)):M===null&&s.stateNode!==null&&vf(s,s.memoizedProps,c.memoizedProps)}break}case 27:if(An){$n(a,s),si(s),d&512&&(Mn||c===null||br(c,c.return)),c!==null&&d&4&&vf(s,s.memoizedProps,c.memoizedProps);break}case 5:if($n(a,s),si(s),d&512&&(Mn||c===null||br(c,c.return)),Zn){if(s.flags&32){y=s.stateNode;try{Ym(y)}catch(Pe){Gt(s,s.return,Pe)}}d&4&&s.stateNode!=null&&(y=s.memoizedProps,vf(s,y,c!==null?c.memoizedProps:y)),d&1024&&(ld=!0)}else Sr&&s.alternate!==null&&(s.alternate.stateNode=s.stateNode);break;
4123case 6:if($n(a,s),si(s),d&4&&Zn){if(s.stateNode===null)throw Error(r(162));d=s.memoizedProps,c=c!==null?c.memoizedProps:d,y=s.stateNode;try{t3(y,c,d)}catch(Pe){Gt(s,s.return,Pe)}}break;case 3:if(rr?($3(),y=ar,ar=jf(a.containerInfo),$n(a,s),ar=y):$n(a,s),si(s),d&4){if(Zn&&Jn&&c!==null&&c.memoizedState.isDehydrated)try{O3(a.containerInfo)}catch(Pe){Gt(s,s.return,Pe)}if(Sr){d=a.containerInfo,c=a.pendingChildren;try{Jm(d,c)}catch(Pe){Gt(s,s.return,Pe)}}}ld&&(ld=!1,om(s));break;case 4:rr?(c=ar,ar=jf(s.stateNode.containerInfo),$n(a,s),si(s),ar=c):($n(a,s),si(s)),d&4&&Sr&&em(s.stateNode,s,s.stateNode.pendingChildren);break;case 12:$n(a,s),si(s);break;case 31:$n(a,s),si(s),d&4&&(d=s.updateQueue,d!==null&&(s.updateQueue=null,ru(s,d)));break;case 13:$n(a,s),si(s),s.child.flags&8192&&s.memoizedState!==null!=(c!==null&&c.memoizedState!==null)&&(Pu=gi()),d&4&&(d=s.updateQueue,d!==null&&(s.updateQueue=null,ru(s,d)));break;case 22:y=s.memoizedState!==null;var D=c!==null&&c.memoizedState!==null,V=Wr,ae=Mn;if(Wr=V||y,Mn=ae||D,$n(a,s),Mn=ae,Wr=V,si(s),d&8192&&(a=s.stateNode,a._visibility=y?a._visibility&-2:a._visibility|1,y&&(c===null||D||Wr||Mn||La(s)),Zn)){e:if(c=null,Zn)for(a=s;;){if(a.tag===5||rr&&a.tag===26){if(c===null){D=c=a;try{M=D.stateNode,y?l3(M):u3(D.stateNode,D.memoizedProps)}catch(Pe){Gt(D,D.return,Pe)}}}else if(a.tag===6){if(c===null){D=a;try{var be=D.stateNode;y?c3(be):h3(be,D.memoizedProps)}catch(Pe){Gt(D,D.return,Pe)}}}else if(a.tag===18){if(c===null){D=a;try{var Fe=D.stateNode;y?H3(Fe):W3(D.stateNode)}catch(Pe){Gt(D,D.return,Pe)}}}else if((a.tag!==22&&a.tag!==23||a.memoizedState===null||a===s)&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===s)break e;for(;a.sibling===null;){if(a.return===null||a.return===s)break e;c===a&&(c=null),a=a.return}c===a&&(c=null),a.sibling.return=a.return,a=a.sibling}}d&4&&(d=s.updateQueue,d!==null&&(c=d.retryQueue,c!==null&&(d.retryQueue=null,ru(s,c))));break;case 19:$n(a,s),si(s),d&4&&(d=s.updateQueue,d!==null&&(s.updateQueue=null,ru(s,d)));break;case 30:break;case 21:break;default:$n(a,s),si(s)}}function si(s){var a=s.flags;if(a&2){try{for(var c,d=s.return;d!==null;){if(Q0(d)){c=d;break}d=d.return}if(Zn){if(c==null)throw Error(r(160));switch(c.tag){case 27:if(An){var y=c.stateNode;iu(s,yf(s),y);break}case 5:var M=c.stateNode;c.flags&32&&(Ym(M),c.flags&=-33),iu(s,yf(s),M);break;case 3:case 4:var D=c.stateNode.containerInfo;xf(s,yf(s),D);break;default:throw Error(r(161))}}}catch(V){Gt(s,s.return,V)}s.flags&=-3}a&4096&&(s.flags&=-4097)}function om(s){if(s.subtreeFlags&1024)for(s=s.child;s!==null;){var a=s;om(a),a.tag===5&&a.flags&1024&&W_(a.stateNode),s=s.sibling}}function Fr(s,a){if(a.subtreeFlags&8772)for(a=a.child;a!==null;)nm(s,a.alternate,a),a=a.sibling}function La(s){for(s=s.child;s!==null;){var a=s;switch(a.tag){case 0:case 11:case 14:case 15:vs(4,a,a.return),La(a);break;case 1:br(a,a.return);var c=a.stateNode;typeof c.componentWillUnmount=="function"&&J0(a,a.return,c),La(a);break;case 27:An&&u1(a.stateNode);case 26:case 5:br(a,a.return),La(a);break;case 22:a.memoizedState===null&&La(a);break;case 30:La(a);break;default:La(a)}s=s.sibling}}function kr(s,a,c){for(c=c&&(a.subtreeFlags&8772)!==0,a=a.child;a!==null;){var d=a.alternate,y=s,M=a,D=M.flags;switch(M.tag){case 0:case 11:case 15:kr(y,M,c),Vl(4,M);break;case 1:if(kr(y,M,c),d=M,y=d.stateNode,typeof y.componentDidMount=="function")try{y.componentDidMount()}catch(be){Gt(d,d.return,be)}if(d=M,y=d.updateQueue,y!==null){var V=d.stateNode;try{var ae=y.shared.hiddenCallbacks;if(ae!==null)for(y.shared.hiddenCallbacks=null,y=0;y<ae.length;y++)gr(ae[y],V)}catch(be){Gt(d,d.return,be)}}c&&D&64&&Z0(M),Gl(M,M.return);break;case 27:An&&tm(M);case 26:case 5:kr(y,M,c),c&&d===null&&D&4&&K0(M),Gl(M,M.return);break;case 12:kr(y,M,c);break;case 31:kr(y,M,c),c&&D&4&&rm(y,M);break;case 13:kr(y,M,c),c&&D&4&&sm(y,M);break;case 22:M.memoizedState===null&&kr(y,M,c),Gl(M,M.return);break;case 30:break;default:kr(y,M,c)}a=a.sibling}}function bf(s,a){var c=null;s!==null&&s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(c=s.memoizedState.cachePool.pool),s=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(s=a.memoizedState.cachePool.pool),s!==c&&(s!=null&&s.refCount++,c!=null&&I(c))}function Sf(s,a){s=null,a.alternate!==null&&(s=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==s&&(a.refCount++,s!=null&&I(s))}function ir(s,a,c,d){if(a.subtreeFlags&10256)for(a=a.child;a!==null;)lm(s,a,c,d),a=a.sibling}function lm(s,a,c,d){var y=a.flags;
4123switch(a.tag){case 0:case 11:case 15:ir(s,a,c,d),y&2048&&Vl(9,a);break;case 1:ir(s,a,c,d);break;case 3:ir(s,a,c,d),y&2048&&(s=null,a.alternate!==null&&(s=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==s&&(a.refCount++,s!=null&&I(s)));break;case 12:if(y&2048){ir(s,a,c,d),s=a.stateNode;try{var M=a.memoizedProps,D=M.id,V=M.onPostCommit;typeof V=="function"&&V(D,a.alternate===null?"mount":"update",s.passiveEffectDuration,-0)}catch(ae){Gt(a,a.return,ae)}}else ir(s,a,c,d);break;case 31:ir(s,a,c,d);break;case 13:ir(s,a,c,d);break;case 23:break;case 22:M=a.stateNode,D=a.alternate,a.memoizedState!==null?M._visibility&2?ir(s,a,c,d):Hl(s,a):M._visibility&2?ir(s,a,c,d):(M._visibility|=2,To(s,a,c,d,(a.subtreeFlags&10256)!==0||!1)),y&2048&&bf(D,a);break;case 24:ir(s,a,c,d),y&2048&&Sf(a.alternate,a);break;default:ir(s,a,c,d)}}function To(s,a,c,d,y){for(y=y&&((a.subtreeFlags&10256)!==0||!1),a=a.child;a!==null;){var M=s,D=a,V=c,ae=d,be=D.flags;switch(D.tag){case 0:case 11:case 15:To(M,D,V,ae,y),Vl(8,D);break;case 23:break;case 22:var Fe=D.stateNode;D.memoizedState!==null?Fe._visibility&2?To(M,D,V,ae,y):Hl(M,D):(Fe._visibility|=2,To(M,D,V,ae,y)),y&&be&2048&&bf(D.alternate,D);break;case 24:To(M,D,V,ae,y),y&&be&2048&&Sf(D.alternate,D);break;default:To(M,D,V,ae,y)}a=a.sibling}}function Hl(s,a){if(a.subtreeFlags&10256)for(a=a.child;a!==null;){var c=s,d=a,y=d.flags;switch(d.tag){case 22:Hl(c,d),y&2048&&bf(d.alternate,d);break;case 24:Hl(c,d),y&2048&&Sf(d.alternate,d);break;default:Hl(c,d)}a=a.sibling}}function Da(s,a,c){if(s.subtreeFlags&Xo)for(s=s.child;s!==null;)cm(s,a,c),s=s.sibling}function cm(s,a,c){switch(s.tag){case 26:if(Da(s,a,c),s.flags&Xo)if(s.memoizedState!==null)J3(c,ar,s.memoizedState,s.memoizedProps);else{var d=s.stateNode,y=s.type;s=s.memoizedProps,((a&335544128)===a||Gf(y,s))&&qm(c,d,y,s)}break;case 5:Da(s,a,c),s.flags&Xo&&(d=s.stateNode,y=s.type,s=s.memoizedProps,((a&335544128)===a||Gf(y,s))&&qm(c,d,y,s));break;case 3:case 4:rr?(d=ar,ar=jf(s.stateNode.containerInfo),Da(s,a,c),ar=d):Da(s,a,c);break;case 22:s.memoizedState===null&&(d=s.alternate,d!==null&&d.memoizedState!==null?(d=Xo,Xo=16777216,Da(s,a,c),Xo=d):Da(s,a,c));break;default:Da(s,a,c)}}function um(s){var a=s.alternate;if(a!==null&&(s=a.child,s!==null)){a.child=null;do a=s.sibling,s.sibling=null,s=a;while(s!==null)}}function Wl(s){var a=s.deletions;if((s.flags&16)!==0){if(a!==null)for(var c=0;c<a.length;c++){var d=a[c];Un=d,fm(d,s)}um(s)}if(s.subtreeFlags&10256)for(s=s.child;s!==null;)hm(s),s=s.sibling}function hm(s){switch(s.tag){case 0:case 11:case 15:Wl(s),s.flags&2048&&vs(9,s,s.return);break;case 3:Wl(s);break;case 12:Wl(s);break;case 22:var a=s.stateNode;s.memoizedState!==null&&a._visibility&2&&(s.return===null||s.return.tag!==13)?(a._visibility&=-3,su(s)):Wl(s);break;default:Wl(s)}}function su(s){var a=s.deletions;if((s.flags&16)!==0){if(a!==null)for(var c=0;c<a.length;c++){var d=a[c];Un=d,fm(d,s)}um(s)}for(s=s.child;s!==null;){switch(a=s,a.tag){case 0:case 11:case 15:vs(8,a,a.return),su(a);break;case 22:c=a.stateNode,c._visibility&2&&(c._visibility&=-3,su(a));break;default:su(a)}s=s.sibling}}function fm(s,a){for(;Un!==null;){var c=Un;switch(c.tag){case 0:case 11:case 15:vs(8,c,a);break;case 23:case 22:if(c.memoizedState!==null&&c.memoizedState.cachePool!==null){var d=c.memoizedState.cachePool.pool;d!=null&&d.refCount++}break;case 24:I(c.memoizedState.cache)}if(d=c.child,d!==null)d.return=c,Un=d;else e:for(c=s;Un!==null;){d=Un;var y=d.sibling,M=d.return;if(im(d),d===c){Un=null;break e}if(y!==null){y.return=M,Un=y;break e}Un=M}}}function Mf(s){var a=U_(s);if(a!=null){if(typeof a.memoizedProps["data-testname"]!="string")throw Error(r(364));return a}if(s=q_(s),s===null)throw Error(r(362));return s.stateNode.current}function wf(s,a){var c=s.tag;switch(a.$$typeof){case Tu:if(s.type===a.value)return!0;break;case Cu:e:{for(a=a.value,s=[s,0],c=0;c<s.length;){var d=s[c++],y=d.tag,M=s[c++],D=a[M];if(y!==5&&y!==26&&y!==27||!Yl(d)){for(;D!=null&&wf(d,D);)M++,D=a[M];if(M===a.length){a=!0;break e}else for(d=d.child;d!==null;)s.push(d,M),d=d.sibling}}a=!1}return a;case Au:if((c===5||c===26||c===27)&&Z_(s.stateNode,a.value))return!0;break;
4123case Iu:if((c===5||c===6||c===26||c===27)&&(s=$_(s),s!==null&&0<=s.indexOf(a.value)))return!0;break;case Ru:if((c===5||c===26||c===27)&&(s=s.memoizedProps["data-testname"],typeof s=="string"&&s.toLowerCase()===a.value.toLowerCase()))return!0;break;default:throw Error(r(365))}return!1}function Ef(s){switch(s.$$typeof){case Tu:return"<"+(g(s.value)||"Unknown")+">";case Cu:return":has("+(Ef(s)||"")+")";case Au:return'[role="'+s.value+'"]';case Iu:return'"'+s.value+'"';case Ru:return'[data-testname="'+s.value+'"]';default:throw Error(r(365))}}function dm(s,a){var c=[];s=[s,0];for(var d=0;d<s.length;){var y=s[d++],M=y.tag,D=s[d++],V=a[D];if(M!==5&&M!==26&&M!==27||!Yl(y)){for(;V!=null&&wf(y,V);)D++,V=a[D];if(D===a.length)c.push(y);else for(y=y.child;y!==null;)s.push(y,D),y=y.sibling}}return c}function Tf(s,a){if(!ql)throw Error(r(363));s=Mf(s),s=dm(s,a),a=[],s=Array.from(s);for(var c=0;c<s.length;){var d=s[c++],y=d.tag;if(y===5||y===26||y===27)Yl(d)||a.push(d.stateNode);else for(d=d.child;d!==null;)s.push(d),d=d.sibling}return a}function Ti(){return(Ut&2)!==0&&kt!==0?kt&-kt:dt.T!==null?xe():F_()}function pm(){if(Li===0)if((kt&536870912)===0||Vt){var s=du;du<<=1,!(du&3932160)&&(du=262144),Li=s}else Li=536870912;return s=Pi.current,s!==null&&(s.flags|=32),Li}function mi(s,a,c){(s===Qt&&(qt===2||qt===9)||s.cancelPendingCommit!==null)&&(Co(s,0),ys(s,kt,Li,!1)),N(s,c),(!(Ut&2)||s!==Qt)&&(s===Qt&&(!(Ut&2)&&(Wa|=c),dn===4&&ys(s,kt,Li,!1)),ee(s))}function mm(s,a,c){if((Ut&6)!==0)throw Error(r(327));var d=!c&&(a&127)===0&&(a&s.expiredLanes)===0||C(s,a),y=d?p_(s,a):Af(s,a,!0),M=d;do{if(y===0){qo&&!d&&ys(s,a,0,!1);break}else{if(c=s.current.alternate,M&&!f_(c)){y=Af(s,a,!1),M=!1;continue}if(y===2){if(M=a,s.errorRecoveryDisabledLanes&M)var D=0;else D=s.pendingLanes&-536870913,D=D!==0?D:D&536870912?536870912:0;if(D!==0){a=D;e:{var V=s;y=ic;var ae=Jn&&V.current.memoizedState.isDehydrated;if(ae&&(Co(V,D).flags|=256),D=Af(V,D,!1),D!==2){if(cd&&!ae){V.errorRecoveryDisabledLanes|=M,Wa|=M,y=4;break e}M=yi,yi=y,M!==null&&(yi===null?yi=M:yi.push.apply(yi,M))}y=D}if(M=!1,y!==2)continue}}if(y===1){Co(s,0),ys(s,a,0,!0);break}e:{switch(d=s,M=y,M){case 0:case 1:throw Error(r(345));case 4:if((a&4194048)!==a)break;case 6:ys(d,a,Li,!Es);break e;case 2:yi=null;break;case 3:case 5:break;default:throw Error(r(329))}if((a&62914560)===a&&(y=Pu+300-gi(),10<y)){if(ys(d,a,Li,!Es),_(d,0,!0)!==0)break e;Xr=a,d.timeoutHandle=L_(gm.bind(null,d,c,yi,Nu,hd,a,Li,Wa,Yo,Es,M,"Throttled",-0,0),y);break e}gm(d,c,yi,Nu,hd,a,Li,Wa,Yo,Es,M,null,-0,0)}}break}while(!0);ee(s)}function gm(s,a,c,d,y,M,D,V,ae,be,Fe,Pe,$e,wt){if(s.timeoutHandle=Oa,Pe=a.subtreeFlags,Pe&8192||(Pe&16785408)===16785408){Pe=G_(),cm(a,M,Pe);var En=(M&62914560)===M?Pu-gi():(M&4194048)===M?b1-gi():0;if(En=H_(Pe,En),En!==null){Xr=M,s.cancelPendingCommit=En(Em.bind(null,s,a,M,c,d,y,D,V,ae,Fe,Pe,null,$e,wt)),ys(s,M,D,!be);return}}Em(s,a,M,c,d,y,D,V,ae)}function f_(s){for(var a=s;;){var c=a.tag;if((c===0||c===11||c===15)&&a.flags&16384&&(c=a.updateQueue,c!==null&&(c=c.stores,c!==null)))for(var d=0;d<c.length;d++){var y=c[d],M=y.getSnapshot;y=y.value;try{if(!Ii(M(),y))return!1}catch{return!1}}if(c=a.child,a.subtreeFlags&16384&&c!==null)c.return=a,a=c;else{if(a===s)break;for(;a.sibling===null;){if(a.return===null||a.return===s)return!0;a=a.return}a.sibling.return=a.return,a=a.sibling}}return!0}function ys(s,a,c,d){a&=~ud,a&=~Wa,s.suspendedLanes|=a,s.pingedLanes&=~a,d&&(s.warmLanes|=a),d=s.expirationTimes;for(var y=a;0<y;){var M=31-Ai(y),D=1<<M;d[M]=-1,y&=~D}c!==0&&T(s,c,a)}function vm(){return(Ut&6)===0?(fe(0,!1),!1):!0}function Cf(){if(Ot!==null){if(qt===0)var s=Ot.return;else s=Ot,Gr=ka=null,jt(s),Vo=null,Ql=0,s=Ot;for(;s!==null;)$0(s.alternate,s),s=s.return;Ot=null}}function Co(s,a){var c=s.timeoutHandle;c!==Oa&&(s.timeoutHandle=Oa,D_(c)),c=s.cancelPendingCommit,c!==null&&(s.cancelPendingCommit=null,c()),Xr=0,Cf(),Qt=s,Ot=c=Br(s.current,null),kt=a,qt=0,Ni=null,Es=!1,qo=C(s,a),cd=!1,Yo=Li=ud=Wa=Ts=dn=0,yi=ic=null,hd=!1,a&8&&(a|=a&32);var d=s.entangledLanes;if(d!==0)for(s=s.entanglements,d&=a;0<d;){var y=31-Ai(d),M=1<<y;a|=s[y],d&=~M}return jr=a,Ji(),c}function ym(s,a){Tt=null,dt.H=tc,a===zo||a===bu?(a=Oe(),qt=3):a===td?(a=Oe(),qt=4):qt=a===ad?8:a!==null&&typeof a=="object"&&typeof a.then=="function"?6:1,Ni=a,Ot===null&&(dn=1,Dr(s,ue(a,s.current)))}function xm(){var s=Pi.current;return s===null?!0:(kt&4194048)===kt?sr===null:(kt&62914560)===kt||(kt&536870912)!==0?s===sr:!1}function _m(){var s=dt.H;return dt.H=tc,s===null?tc:s}function bm(){var s=dt.A;return dt.A=fb,s}function au(){dn=4,Es||(kt&4194048)!==kt&&Pi.current!==null||(qo=!0),!(Ts&134217727)&&!(Wa&134217727)||Qt===null||ys(
vendor: 2,009 bytes, line 4123
4123Qt,kt,Li,!1)}function Af(s,a,c){var d=Ut;Ut|=2;var y=_m(),M=bm();(Qt!==s||kt!==a)&&(Nu=null,Co(s,a)),a=!1;var D=dn;e:do try{if(qt!==0&&Ot!==null){var V=Ot,ae=Ni;switch(qt){case 8:Cf(),D=6;break e;case 3:case 2:case 9:case 6:Pi.current===null&&(a=!0);var be=qt;if(qt=0,Ni=null,Ao(s,V,ae,be),c&&qo){D=0;break e}break;default:be=qt,qt=0,Ni=null,Ao(s,V,ae,be)}}d_(),D=dn;break}catch(Fe){ym(s,Fe)}while(!0);return a&&s.shellSuspendCounter++,Gr=ka=null,Ut=d,dt.H=y,dt.A=M,Ot===null&&(Qt=null,kt=0,Ji()),D}function d_(){for(;Ot!==null;)Sm(Ot)}function p_(s,a){var c=Ut;Ut|=2;var d=_m(),y=bm();Qt!==s||kt!==a?(Nu=null,rc=gi()+500,Co(s,a)):qo=C(s,a);e:do try{if(qt!==0&&Ot!==null){a=Ot;var M=Ni;t:switch(qt){case 1:qt=0,Ni=null,Ao(s,a,M,1);break;case 2:case 9:if(Be(M)){qt=0,Ni=null,Mm(a);break}a=function(){qt!==2&&qt!==9||Qt!==s||(qt=7),ee(s)},M.then(a,a);break e;case 3:qt=7;break e;case 4:qt=5;break e;case 7:Be(M)?(qt=0,Ni=null,Mm(a)):(qt=0,Ni=null,Ao(s,a,M,7));break;case 5:var D=null;switch(Ot.tag){case 26:D=Ot.memoizedState;case 5:case 27:var V=Ot,ae=V.type,be=V.pendingProps;if(D?l1(D):Xm(V.stateNode,ae,be)){qt=0,Ni=null;var Fe=V.sibling;if(Fe!==null)Ot=Fe;else{var Pe=V.return;Pe!==null?(Ot=Pe,ou(Pe)):Ot=null}break t}}qt=0,Ni=null,Ao(s,a,M,5);break;case 6:qt=0,Ni=null,Ao(s,a,M,6);break;case 8:Cf(),dn=6;break e;default:throw Error(r(462))}}m_();break}catch($e){ym(s,$e)}while(!0);return Gr=ka=null,dt.H=d,dt.A=y,Ut=c,Ot!==null?0:(Qt=null,kt=0,Ji(),dn)}function m_(){for(;Ot!==null&&!tb();)Sm(Ot)}function Sm(s){var a=W0(s.alternate,s,jr);s.memoizedProps=s.pendingProps,a===null?ou(s):Ot=a}function Mm(s){var a=s,c=a.alternate;switch(a.tag){case 15:case 0:a=k0(c,a,a.pendingProps,a.type,void 0,kt);break;case 11:a=k0(c,a,a.pendingProps,a.type.render,a.ref,kt);break;case 5:jt(a);default:$0(c,a),a=Ot=Lm(a,jr),a=W0(c,a,jr)}s.memoizedProps=s.pendingProps,a===null?ou(s):Ot=a}function Ao(s,a,c,d){Gr=ka=null,jt(a),Vo=null,Ql=0;var y=a.return;try{if(wo(s,y,a,c,kt)){dn=1,Dr(s,ue(c,s.current)),Ot=null;return}}
vendor: 4,230 bytes, line 4123
4123catch(M){if(y!==null)throw Ot=y,M;dn=1,Dr(s,ue(c,s.current)),Ot=null;return}a.flags&32768?(Vt||d===1?s=!0:qo||(kt&536870912)!==0?s=!1:(Es=s=!0,(d===2||d===9||d===3||d===6)&&(d=Pi.current,d!==null&&d.tag===13&&(d.flags|=16384))),wm(a,s)):ou(a)}function ou(s){var a=s;do{if((a.flags&32768)!==0){wm(a,Es);return}s=a.return;var c=l_(a.alternate,a,jr);if(c!==null){Ot=c;return}if(a=a.sibling,a!==null){Ot=a;return}Ot=a=s}while(a!==null);dn===0&&(dn=5)}function wm(s,a){do{var c=c_(s.alternate,s);if(c!==null){c.flags&=32767,Ot=c;return}if(c=s.return,c!==null&&(c.flags|=32768,c.subtreeFlags=0,c.deletions=null),!a&&(s=s.sibling,s!==null)){Ot=s;return}Ot=s=c}while(s!==null);dn=6,Ot=null}function Em(s,a,c,d,y,M,D,V,ae){s.cancelPendingCommit=null;do jl();while(Rn!==0);if((Ut&6)!==0)throw Error(r(327));if(a!==null){if(a===s.current)throw Error(r(177));if(M=a.lanes|a.childLanes,M|=nd,O(s,c,M,D,V,ae),s===Qt&&(Ot=Qt=null,kt=0),$o=a,As=s,Xr=c,fd=M,dd=y,S1=d,(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?(s.callbackNode=null,s.callbackPriority=0,x_(Yf,function(){return Im(),null})):(s.callbackNode=null,s.callbackPriority=0),d=(a.flags&13878)!==0,(a.subtreeFlags&13878)!==0||d){d=dt.T,dt.T=null,y=Vr(),Dn(2),D=Ut,Ut|=4;try{u_(s,a,c)}finally{Ut=D,Dn(y),dt.T=d}}Rn=1,Tm(),Cm(),Am()}}function Tm(){if(Rn===1){Rn=0;var s=As,a=$o,c=(a.flags&13878)!==0;if((a.subtreeFlags&13878)!==0||c){c=dt.T,dt.T=null;var d=Vr();Dn(2);var y=Ut;Ut|=4;try{am(a,s),P_(s.containerInfo)}finally{Ut=y,Dn(d),dt.T=c}}s.current=a,Rn=2}}function Cm(){if(Rn===2){Rn=0;var s=As,a=$o,c=(a.flags&8772)!==0;if((a.subtreeFlags&8772)!==0||c){c=dt.T,dt.T=null;var d=Vr();Dn(2);var y=Ut;Ut|=4;try{nm(s,a.alternate,a)}finally{Ut=y,Dn(d),dt.T=c}}Rn=3}}function Am(){if(Rn===4||Rn===3){Rn=0,nb();var s=As,a=$o,c=Xr,d=S1;(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?Rn=5:(Rn=0,$o=As=null,Rm(s,s.pendingLanes));var y=s.pendingLanes;if(y===0&&(Cs=null),j(c),a=a.stateNode,Ri&&typeof Ri.onCommitFiberRoot=="function")try{Ri.onCommitFiberRoot($l,a,void 0,(a.current.flags&128)===128)}catch{}if(d!==null){a=dt.T,y=Vr(),Dn(2),dt.T=null;try{for(var M=s.onRecoverableError,D=0;D<d.length;D++){var V=d[D];M(V.value,{componentStack:V.stack})}}finally{dt.T=a,Dn(y)}}Xr&3&&jl(),ee(s),y=s.pendingLanes,(c&261930)!==0&&(y&42)!==0?s===pd?sc++:(sc=0,pd=s):sc=0,Jn&&z3(),fe(0,!1)}}function Rm(s,a){(s.pooledCacheLanes&=a)===0&&(a=s.pooledCache,a!=null&&(s.pooledCache=null,I(a)))}function jl(){return Tm(),Cm(),Am(),Im()}function Im(){if(Rn!==5)return!1;var s=As,a=fd;fd=0;var c=j(Xr),d=32>c?32:c;c=dt.T;var y=Vr();try{Dn(d),dt.T=null,d=dd,dd=null;var M=As,D=Xr;if(Rn=0,$o=As=null,Xr=0,(Ut&6)!==0)throw Error(r(331));var V=Ut;if(Ut|=4,hm(M.current),lm(M,M.current,D,d),Ut=V,fe(0,!1),Ri&&typeof Ri.onPostCommitFiberRoot=="function")try{Ri.onPostCommitFiberRoot($l,M)}catch{}return!0}finally{Dn(y),dt.T=c,Rm(s,a)}}function Pm(s,a,c){a=ue(c,a),a=gs(s.stateNode,a,2),s=qn(s,a,2),s!==null&&(N(s,2),ee(s))}function Gt(s,a,c){if(s.tag===3)Pm(s,s,c);else for(;a!==null;){if(a.tag===3){Pm(a,s,c);break}else if(a.tag===1){var d=a.stateNode;if(typeof a.type.getDerivedStateFromError=="function"||typeof d.componentDidCatch=="function"&&(Cs===null||!Cs.has(d))){s=ue(c,s),c=Ea(2),d=qn(a,c,2),d!==null&&(Ta(c,d,a,s),N(d,2),ee(d));break}}a=a.return}}function Rf(s,a,c){var d=s.pingCache;if(d===null){d=s.pingCache=new db;var y=new Set;d.set(a,y)}else y=d.get(a),y===void 0&&(y=new Set,d.set(a,y));y.has(c)||(cd=!0,y.add(c),s=g_.bind(null,s,a,c),a.then(s,s))}function g_(s,a,c){var d=s.pingCache;d!==null&&d.delete(a),s.pingedLanes|=s.suspendedLanes&c,s.warmLanes&=~c,Qt===s&&(kt&c)===c&&(dn===4||dn===3&&(kt&62914560)===kt&&300>gi()-Pu?!(Ut&2)&&Co(s,0):ud|=c,Yo===kt&&(Yo=0)),ee(s)}function Nm(s,a){a===0&&(a=E()),s=di(s,a),s!==null&&(N(s,a),ee(s))}function v_(s){var a=s.memoizedState,c=0;a!==null&&(c=a.retryLane),Nm(s,c)}function y_(s,a){var c=0;switch(s.tag){case 31:case 13:var d=s.stateNode,y=s.memoizedState;y!==null&&(c=y.retryLane);break;case 19:d=s.stateNode;break;case 22:d=s.stateNode._retryCache;break;default:throw Error(r(314))}d!==null&&d.delete(a),Nm(s,c)}function x_(s,a){return mu(s,a)}function __(s,a,c,d){this.tag=s,this.key=c,this.sibling=this.child=this.return=this.stateNode=this.t
vendor: 5,458 bytes, line 4123
4123ype=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=a,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=d,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function If(s){return s=s.prototype,!(!s||!s.isReactComponent)}function Br(s,a){var c=s.alternate;return c===null?(c=n(s.tag,a,s.key,s.mode),c.elementType=s.elementType,c.type=s.type,c.stateNode=s.stateNode,c.alternate=s,s.alternate=c):(c.pendingProps=a,c.type=s.type,c.flags=0,c.subtreeFlags=0,c.deletions=null),c.flags=s.flags&65011712,c.childLanes=s.childLanes,c.lanes=s.lanes,c.child=s.child,c.memoizedProps=s.memoizedProps,c.memoizedState=s.memoizedState,c.updateQueue=s.updateQueue,a=s.dependencies,c.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext},c.sibling=s.sibling,c.index=s.index,c.ref=s.ref,c.refCleanup=s.refCleanup,c}function Lm(s,a){s.flags&=65011714;var c=s.alternate;return c===null?(s.childLanes=0,s.lanes=a,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=c.childLanes,s.lanes=c.lanes,s.child=c.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=c.memoizedProps,s.memoizedState=c.memoizedState,s.updateQueue=c.updateQueue,s.type=c.type,a=c.dependencies,s.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext}),s}function lu(s,a,c,d,y,M){var D=0;if(d=s,typeof s=="function")If(s)&&(D=1);else if(typeof s=="string")D=rr&&An?n1(s,c,Vn.current)?26:h1(s)?27:5:rr?n1(s,c,Vn.current)?26:5:An&&h1(s)?27:5;else e:switch(s){case zf:return s=n(31,c,a,y),s.elementType=zf,s.lanes=M,s;case Io:return Ua(c.children,y,M,a);case zm:D=8,y|=24;break;case Uf:return s=n(12,c,a,y|2),s.elementType=Uf,s.lanes=M,s;case Ff:return s=n(13,c,a,y),s.elementType=Ff,s.lanes=M,s;case kf:return s=n(19,c,a,y),s.elementType=kf,s.lanes=M,s;default:if(typeof s=="object"&&s!==null)switch(s.$$typeof){case xs:D=10;break e;case Vm:D=9;break e;case Of:D=11;break e;case Bf:D=14;break e;case _s:D=16,d=null;break e}D=29,c=Error(r(130,s===null?"null":typeof s,"")),d=null}return a=n(D,c,a,y),a.elementType=s,a.type=d,a.lanes=M,a}function Ua(s,a,c,d){return s=n(7,s,d,a),s.lanes=c,s}function Pf(s,a,c){return s=n(6,s,null,a),s.lanes=c,s}function Dm(s){var a=n(18,null,null,0);return a.stateNode=s,a}function Nf(s,a,c){return a=n(4,s.children!==null?s.children:[],s.key,a),a.lanes=c,a.stateNode={containerInfo:s.containerInfo,pendingChildren:null,implementation:s.implementation},a}function b_(s,a,c,d,y,M,D,V,ae){this.tag=1,this.containerInfo=s,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=Oa,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=P(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=P(0),this.hiddenUpdates=P(null),this.identifierPrefix=d,this.onUncaughtError=y,this.onCaughtError=M,this.onRecoverableError=D,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=ae,this.incompleteTransitions=new Map}function Um(s,a,c,d,y,M,D,V,ae,be,Fe,Pe){return s=new b_(s,a,c,D,ae,be,Fe,Pe,V),a=1,M===!0&&(a|=24),M=n(3,null,null,a),s.current=M,M.stateNode=s,a=U(),a.refCount++,s.pooledCache=a,a.refCount++,M.memoizedState={element:d,isDehydrated:c,cache:a},jn(M),s}function Om(s){return s?(s=Do,s):Do}function Fm(s){var a=s._reactInternals;if(a===void 0)throw typeof s.render=="function"?Error(r(188)):(s=Object.keys(s).join(","),Error(r(268,s)));return s=u(a),s=s!==null?h(s):null,s===null?null:Xl(s.stateNode)}function km(s,a,c,d,y,M){y=Om(y),d.context===null?d.context=y:d.pendingContext=y,d=Xn(a),d.payload={element:c},M=M===void 0?null:M,M!==null&&(d.callback=M),c=qn(s,d,a),c!==null&&(mi(c,s,a),ni(c,s,a))}function Bm(s,a){if(s=s.memoizedState,s!==null&&s.dehydrated!==null){var c=s.retryLane;s.retryLane=c!==0&&c<a?c:a}}function Lf(s,a){Bm(s,a),(s=s.alternate)&&Bm(s,a)}var Dt={},S_=de.default,Ci=Dp.default,Df=Object.assign,M_=Symbol.for("react.element"),cu=Symbol.for("react.transitional.element"),Ro=Symbol.for("react.portal"),Io=Symbol.for("react.fragment"),zm=Symbol.for("react.strict_mode"),Uf=Symbol.for("react.profiler"),Vm=Symbol.for("react.consumer"),xs=Symbol.for("react.context"),Of=Symbol.for("react.forward_ref"),Ff=Symbol.for("react.suspense"),kf=Symbol.for("react.suspense_list"),Bf=Symbol.for("react.memo"),_s=Symbol.for("react.lazy"),zf=Symbol.for("react.activity"),w_=Symbol.for("react.memo_cache_sentinel"),Gm=Symbol.iterator,E_=Symbol.for("react.client.reference"),uu=Array.isArray,dt=S_.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,T_=t.rendererVersion,C_=t.rendererPackageName,Hm=t.extraDevToolsConfig,Xl=t.getPublicInstance,A_=t.getRootHostContext,R_=t.getChildHostContext,I_=t.prepareForCommit,P_=t.resetAfterCommit,N_=t.createInstance;t.cloneMutableInstance;var Vf=t.appendInitialChild,Wm=t.finalizeInitialChildren,hu=t.shouldSetTextContent,jm=t.createTextInstance;t.cloneMutableTextInstance;var L_=t.scheduleTimeout,D_=t.cancelTimeout,Oa=t.noTimeout,zr=t.isPrimaryRenderer;t.warnsIfNotActing;var Zn=t.supportsMutation,Sr=t.supportsPersistence,Jn=t.supportsHydration,U_=t.getInstanceFromNode;t.beforeActiveInstanceBlur;var O_=t.preparePortalMount;
vendor: 5,092 bytes, line 4123
4123t.prepareScopeUpdate,t.getInstanceFromScope;var Dn=t.setCurrentUpdatePriority,Vr=t.getCurrentUpdatePriority,F_=t.resolveUpdatePriority;t.trackSchedulerEvent,t.resolveEventType,t.resolveEventTimeStamp;var k_=t.shouldAttemptEagerTransition,B_=t.detachDeletedInstance;t.requestPostPaintCallback;var z_=t.maySuspendCommit,V_=t.maySuspendCommitOnUpdate,Gf=t.maySuspendCommitInSyncRender,Xm=t.preloadInstance,G_=t.startSuspendingCommit,qm=t.suspendInstance;t.suspendOnActiveViewTransition;var H_=t.waitForCommitToBeReady;t.getSuspendedCommitReason;var Po=t.NotPendingTransition,Fa=t.HostTransitionContext,W_=t.resetFormInstance;t.bindToConsole;var j_=t.supportsMicrotasks,X_=t.scheduleMicrotask,ql=t.supportsTestSelectors,q_=t.findFiberRoot,Y_=t.getBoundingRect,$_=t.getTextContent,Yl=t.isHiddenSubtree,Z_=t.matchAccessibilityRole,J_=t.setFocusIfFocusable,K_=t.setupIntersectionObserver,Q_=t.appendChild,e3=t.appendChildToContainer,t3=t.commitTextUpdate,n3=t.commitMount,i3=t.commitUpdate,r3=t.insertBefore,s3=t.insertInContainerBefore,a3=t.removeChild,o3=t.removeChildFromContainer,Ym=t.resetTextContent,l3=t.hideInstance,c3=t.hideTextInstance,u3=t.unhideInstance,h3=t.unhideTextInstance;t.cancelViewTransitionName,t.cancelRootViewTransitionName,t.restoreRootViewTransitionName,t.cloneRootViewTransitionContainer,t.removeRootViewTransitionClone,t.measureClonedInstance,t.hasInstanceChanged,t.hasInstanceAffectedParent,t.startViewTransition,t.startGestureTransition,t.stopViewTransition,t.getCurrentGestureOffset,t.createViewTransitionInstance;var f3=t.clearContainer;t.createFragmentInstance,t.updateFragmentInstanceFiber,t.commitNewChildToFragmentInstance,t.deleteChildFromFragmentInstance;var d3=t.cloneInstance,$m=t.createContainerChildSet,Zm=t.appendChildToContainerChildSet,p3=t.finalizeContainerChildren,Jm=t.replaceContainerChildren,Km=t.cloneHiddenInstance,Qm=t.cloneHiddenTextInstance,Hf=t.isSuspenseInstancePending,Wf=t.isSuspenseInstanceFallback,m3=t.getSuspenseInstanceFallbackErrorDetails,g3=t.registerSuspenseInstanceRetry,v3=t.canHydrateFormStateMarker,y3=t.isFormStateMarkerMatching,e1=t.getNextHydratableSibling,x3=t.getNextHydratableSiblingAfterSingleton,_3=t.getFirstHydratableChild,b3=t.getFirstHydratableChildWithinContainer,S3=t.getFirstHydratableChildWithinActivityInstance,M3=t.getFirstHydratableChildWithinSuspenseInstance,w3=t.getFirstHydratableChildWithinSingleton,E3=t.canHydrateInstance,T3=t.canHydrateTextInstance,C3=t.canHydrateActivityInstance,A3=t.canHydrateSuspenseInstance,R3=t.hydrateInstance,I3=t.hydrateTextInstance,P3=t.hydrateActivityInstance,N3=t.hydrateSuspenseInstance,L3=t.getNextHydratableInstanceAfterActivityInstance,D3=t.getNextHydratableInstanceAfterSuspenseInstance,U3=t.commitHydratedInstance,O3=t.commitHydratedContainer,F3=t.commitHydratedActivityInstance,k3=t.commitHydratedSuspenseInstance,B3=t.finalizeHydratedChildren,z3=t.flushHydrationEvents;t.clearActivityBoundary;var V3=t.clearSuspenseBoundary;t.clearActivityBoundaryFromContainer;var G3=t.clearSuspenseBoundaryFromContainer,H3=t.hideDehydratedBoundary,W3=t.unhideDehydratedBoundary,t1=t.shouldDeleteUnhydratedTailInstances;t.diffHydratedPropsForDevWarnings,t.diffHydratedTextForDevWarnings,t.describeHydratableInstanceForDevWarnings;var j3=t.validateHydratableInstance,X3=t.validateHydratableTextInstance,rr=t.supportsResources,n1=t.isHostHoistableType,jf=t.getHoistableRoot,i1=t.getResource,r1=t.acquireResource,s1=t.releaseResource,q3=t.hydrateHoistable,a1=t.mountHoistable,o1=t.unmountHoistable,Y3=t.createHoistableInstance,$3=t.prepareToCommitHoistables,Z3=t.mayResourceSuspendCommit,l1=t.preloadResource,J3=t.suspendResource,An=t.supportsSingletons,c1=t.resolveSingletonInstance,K3=t.acquireSingletonInstance,u1=t.releaseSingletonInstance,h1=t.isHostSingletonType,No=t.isSingletonScope,Xf=[],Lo=-1,Do={},Ai=Math.clz32?Math.clz32:w,Q3=Math.log,eb=Math.LN2,fu=256,du=262144,pu=4194304,mu=Ci.unstable_scheduleCallback,qf=Ci.unstable_cancelCallback,tb=Ci.unstable_shouldYield,nb=Ci.unstable_requestPaint,gi=Ci.unstable_now,f1=Ci.unstable_ImmediatePriority,ib=Ci.unstable_UserBlockingPriority,Yf=Ci.unstable_NormalPriority,rb=Ci.unstable_IdlePriority,sb=Ci.log,ab=Ci.unstable_setDisableYieldValue,$l=null,Ri=null,Ii=typeof Object.is=="function"?Object.is:Y,d1=typeof reportError=="function"?reportError:function(s){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var a=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof s=="object"&&s!==null&&typeof s.message=="string"?String(s.message):String(s),error:s});if(!window.dispatchEvent(a))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",s);return}console.error(s)},ob=Object.prototype.hasOwnProperty,$f,p1,Zf=!1,m1=new WeakMap,Uo=[],Oo=0,gu=null,Zl=0,Hi=[],Wi=0,bs=null,Mr=1,wr="",Vn=m(null),Jl=m(null),Ss=m(null),vu=m(null),Gn=null,ln=null,Vt=!1,Ms=null,ji=!1,Jf=Error(r(519)),yu=m(null),ka=null,Gr=null,lb=typeof AbortController<"u"?AbortController:function(){var s=[],a=this.signal={aborted:!1,addEventListener:function(c,d){s.push(d)}};
vendor: 2,347 bytes, line 4123
4123this.abort=function(){a.aborted=!0,s.forEach(function(c){return c()})}},cb=Ci.unstable_scheduleCallback,ub=Ci.unstable_NormalPriority,cn={$$typeof:xs,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0},xu=null,Fo=null,Kf=!1,_u=!1,Qf=!1,Ba=0,Kl=null,ed=0,ko=0,Bo=null,g1=dt.S;dt.S=function(s,a){b1=gi(),typeof a=="object"&&a!==null&&typeof a.then=="function"&&Ke(s,a),g1!==null&&g1(s,a)};var za=m(null),zo=Error(r(460)),td=Error(r(474)),bu=Error(r(542)),Su={then:function(){}},Va=null,Vo=null,Ql=0,Ga=Bn(!0),v1=Bn(!1),Xi=[],Go=0,nd=0,ws=!1,id=!1,Ho=m(null),Mu=m(0),Pi=m(null),sr=null,vn=m(0),Hr=0,Tt=null,Zt=null,bn=null,wu=!1,Wo=!1,Ha=!1,Eu=0,ec=0,jo=null,hb=0,tc={readContext:vt,use:gn,useCallback:Me,useContext:Me,useEffect:Me,useImperativeHandle:Me,useLayoutEffect:Me,useInsertionEffect:Me,useMemo:Me,useReducer:Me,useRef:Me,useState:Me,useDebugValue:Me,useDeferredValue:Me,useTransition:Me,useSyncExternalStore:Me,useId:Me,useHostTransitionStatus:Me,useFormState:Me,useActionState:Me,useOptimistic:Me,useMemoCache:Me,useCacheRefresh:Me};tc.useEffectEvent=Me;var y1={readContext:vt,use:gn,useCallback:function(s,a){return Mt().memoizedState=[s,a===void 0?null:a],s},useContext:vt,useEffect:aa,useImperativeHandle:function(s,a,c){c=c!=null?c.concat([s]):null,Pr(4194308,4,ua.bind(null,a,s),c)},useLayoutEffect:function(s,a){return Pr(4194308,4,s,a)},useInsertionEffect:function(s,a){Pr(4,2,s,a)},useMemo:function(s,a){var c=Mt();a=a===void 0?null:a;var d=s();if(Ha){H(!0);try{s()}finally{H(!1)}}return c.memoizedState=[d,a],d},useReducer:function(s,a,c){var d=Mt();if(c!==void 0){var y=c(a);if(Ha){H(!0);try{c(a)}finally{H(!1)}}}else y=a;return d.memoizedState=d.baseState=y,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:s,lastRenderedState:y},d.queue=s,s=s.dispatch=Mo.bind(null,Tt,s),[d.memoizedState,s]},useRef:function(s){var a=Mt();return s={current:s},a.memoizedState=s},useState:function(s){s=Qi(s);var a=s.queue,c=xa.bind(null,Tt,a);return a.dispatch=c,[s.memoizedState,c]},useDebugValue:hs,useDeferredValue:function(s,a){return fs(Mt(),s,a)},useTransition:function(){var s=Qi(!1);return s=ma.bind(null,Tt,s.queue,!0,!1),Mt().memoizedState=s,[!1,s]},useSyncExternalStore:function(s,a,c){var d=Tt,y=Mt();if(Vt){if(c===void 0)throw Error(r(407));c=c()}else{if(c=a(),Qt===null)throw Error(r(349));
vendor: 1,701 bytes, line 4123
4123kt&127||Xt(d,a,c)}y.memoizedState=c;var M={value:c,getSnapshot:a};return y.queue=M,aa(Ft.bind(null,d,M,s),[s]),d.flags|=2048,er(9,{destroy:void 0},Yn.bind(null,d,M,c,a),null),c},useId:function(){var s=Mt(),a=Qt.identifierPrefix;if(Vt){var c=wr,d=Mr;c=(d&~(1<<32-Ai(d)-1)).toString(32)+c,a="_"+a+"R_"+c,c=Eu++,0<c&&(a+="H"+c.toString(32)),a+="_"}else c=hb++,a="_"+a+"r_"+c.toString(32)+"_";return s.memoizedState=a},useHostTransitionStatus:ds,useFormState:ta,useActionState:ta,useOptimistic:function(s){var a=Mt();a.memoizedState=a.baseState=s;var c={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return a.queue=c,a=ps.bind(null,Tt,!0,c),c.dispatch=a,[s,a]},useMemoCache:Pt,useCacheRefresh:function(){return Mt().memoizedState=So.bind(null,Tt)},useEffectEvent:function(s){var a=Mt(),c={impl:s};return a.memoizedState=c,function(){if((Ut&2)!==0)throw Error(r(440));return c.impl.apply(void 0,arguments)}}},rd={readContext:vt,use:gn,useCallback:fa,useContext:vt,useEffect:us,useImperativeHandle:ha,useInsertionEffect:la,useLayoutEffect:ca,useMemo:da,useReducer:_n,useRef:sa,useState:function(){return _n(Kt)},useDebugValue:hs,useDeferredValue:function(s,a){return pa(st(),Zt.memoizedState,s,a)},useTransition:function(){var s=_n(Kt)[0],a=st().memoizedState;return[typeof s=="boolean"?s:He(s),a]},useSyncExternalStore:zt,useId:va,useHostTransitionStatus:ds,useFormState:na,useActionState:na,useOptimistic:function(s,a){return $s(st(),Zt,s,a)},useMemoCache:Pt,useCacheRefresh:ya};rd.useEffectEvent=oa;var x1={readContext:vt,use:gn,useCallback:fa,useContext:vt,useEffect:us,useImperativeHandle:ha,useInsertionEffect:la,useLayoutEffect:ca,useMemo:da,useReducer:ri,useRef
4123:sa,useState:function(){return ri(Kt)},useDebugValue:hs,useDeferredValue:function(s,a){var c=st();return Zt===null?fs(c,s,a):pa(c,Zt.memoizedState,s,a)},useTransition:function(){var s=ri(Kt)[0],a=st().memoizedState;return[typeof s=="boolean"?s:He(s),a]},useSyncExternalStore:zt,useId:va,useHostTransitionStatus:ds,useFormState:ra,useActionState:ra,useOptimistic:function(s,a){var c=st();return Zt!==null?$s(c,Zt,s,a):(c.baseState=s,[s,c.queue.dispatch])},useMemoCache:Pt,useCacheRefresh:ya};x1.useEffectEvent=oa;var sd={enqueueSetState:function(s,a,c){s=s._reactInternals;var d=Ti(),y=Xn(d);y.payload=a,c!=null&&(y.callback=c),a=qn(s,y,d),a!==null&&(mi(a,s,d),ni(a,s,d))},enqueueReplaceState:function(s,a,c){s=s._reactInternals;var d=Ti(),y=Xn(d);y.tag=1,y.payload=a,c!=null&&(y.callback=c),a=qn(s,y,d),a!==null&&(mi(a,s,d),ni(a,s,d))},enqueueForceUpdate:function(s,a){s=s._reactInternals;var c=Ti(),d=Xn(c);d.tag=2,a!=null&&(d.callback=a),a=qn(s,d,c),a!==null&&(mi(a,s,c),ni(a,s,c))}},ad=Error(r(461)),Sn=!1,od={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null},Wr=!1,Mn=!1,ld=!1,_1=typeof WeakSet=="function"?WeakSet:Set,Un=null,wn=null,vi=!1,ar=null,Xo=8192,fb={getCacheForType:function(s){var a=vt(cn),c=a.data.get(s);return c===void 0&&(c=s(),a.data.set(s,c)),c},cacheSignal:function(){return vt(cn).controller.signal}},Tu=0,Cu=1,Au=2,Ru=3,Iu=4;if(typeof Symbol=="function"&&Symbol.for){var nc=Symbol.for;Tu=nc("selector.component"),Cu=nc("selector.has_pseudo_class"),Au=nc("selector.role"),Ru=nc("selector.test_id"),Iu=nc("selector.text")}var db=typeof WeakMap=="function"?WeakMap:Map,Ut=0,Qt=null,Ot=null,kt=0,qt=0,Ni=null,Es=!1,qo=!1,cd=!1,jr=0,dn=0,Ts=0,Wa=0,ud=0,Li=0,Yo=0,ic=null,yi=null,hd=!1,Pu=0,b1=0,rc=1/0,Nu=null,Cs=null,Rn=0,As=null,$o=null,Xr=0,fd=0,dd=null,S1=null,sc=0,pd=null;return Dt.attemptContinuousHydration=function(s){if(s.tag===13||s.tag===31){var a=di(s,67108864);a!==null&&mi(a,s,67108864),Lf(s,67108864)}},Dt.attemptHydrationAtCurrentPriority=function(s){if(s.tag===13||s.tag===31){var a=Ti();a=F(a);var c=di(s,a);c!==null&&mi(c,s,a),Lf(s,a)}},Dt.attemptSynchronousHydration=function(s){switch(s.tag){case 3:if(s=s.stateNode,s.current.memoizedState.isDehydrated){var a=S(s.pendingLanes);if(a!==0){for(s.pendingLanes|=2,s.entangledLanes|=2;a;){var c=1<<31-Ai(a);s.entanglements[1]|=c,a&=~c}ee(s),!(Ut&6)&&(rc=gi()+500,fe(0,!1))}}break;case 31:case 13:a=di(s,2),a!==null&&mi(a,s,2),vm(),Lf(s,2)}},Dt.batchedUpdates=function(s,a){return s(a)},Dt.createComponentSelector=function(s){return{$$typeof:Tu,value:s}},Dt.createContainer=function(s,a,c,d,y,M,D,V,ae,be){return Um(s,a,!1,null,c,d,M,null,D,V,ae,be)},Dt.createHasPseudoClassSelector=function(s){return{$$typeof:Cu,value:s}},Dt.createHydrationContainer=function(s,a,c,d,y,M,D,V,ae,be,Fe,Pe,$e,wt){var En;return s=Um(c,d,!0,s,y,M,V,wt,ae,be,Fe,Pe),s.context=Om(null),c=s.current,d=Ti(),d=F(d),y=Xn(d),y.callback=(En=a)!=null?En:null,qn(c,y,d),a=d,s.current.lanes=a,N(s,a),ee(s),s},Dt.createPortal=function(s,a,c){var d=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Ro,key:d==null?null:""+d,children:s,containerInfo:a,implementation:c}},Dt.createRoleSelector=function(s){return{$$typeof:Au,value:s}},Dt.createTestNameSelector=function(s){return{$$typeof:Ru,value:s}},Dt.createTextSelector=function(s){return{$$typeof:Iu,value:s}},Dt.defaultOnCaughtError=function(s){console.error(s)},Dt.defaultOnRecoverableError=function(s){d1(s)},Dt.defaultOnUncaughtError=function(s){d1(s)},Dt.deferredUpdates=function(s){var a=dt.T,c=Vr();try{return Dn(32),dt.T=null,s()}finally{Dn(c),dt.T=a}},Dt.discreteUpdates=function(s,a,c,d,y){var M=dt.T,D=Vr();try{return Dn(2),dt.T=null,s(a,c,d,y)}finally{Dn(D),dt.T=M,Ut===0&&(rc=gi()+500)}},Dt.findAllNodes=Tf,Dt.findBoundingRects=function(s,a){if(!ql)throw Error(r(363));a=Tf(s,a),s=[];for(var c=0;c<a.length;c++)s.push(Y_(a[c]));for(a=s.length-1;0<a;a--){c=s[a];for(var d=c.x,y=d+c.width,M=c.y,D=M+c.height,V=a-1;0<=V;V--)if(a!==V){var ae=s[V],be=ae.x,Fe=be+ae.width,Pe=ae.y,$e=Pe+ae.height;if(d>=be&&M>=Pe&&y<=Fe&&D<=$e){s.splice(a,1);break}else if(d!==be||c.width!==ae.width||$e<M||Pe>D){if(!(M!==Pe||c.height!==ae.height||Fe<d||be>y)){be>d&&(ae.width+=be-d,ae.x=d),Fe<y&&(ae.width=y-be),s.splice(a,1);break}}else{Pe>M&&(ae.height+=Pe-M,ae.y=M),$e<D&&(ae.height=D-Pe),s.splice(a,1);break}}}return s},Dt.findHostInstance=Fm,Dt.findHostInstanceWithNoPortals=function(s){return s=u(s),s=s!==null?f(s):null,s===null?null:Xl(s.stateNode)},Dt.findHostInstanceWithWarning=function(s){return Fm(s)},Dt.flushPassiveEffects=jl,Dt.flushSyncFromReconciler=function(s){var a=Ut;Ut|=1;var c=dt.T,d=Vr();try{if(Dn(2),dt.T=null,s)return s()}
4123finally{Dn(d),dt.T=c,Ut=a,!(Ut&6)&&fe(0,!1)}},Dt.flushSyncWork=vm,Dt.focusWithin=function(s,a){if(!ql)throw Error(r(363));for(s=Mf(s),a=dm(s,a),a=Array.from(a),s=0;s<a.length;){var c=a[s++],d=c.tag;if(!Yl(c)){if((d===5||d===26||d===27)&&J_(c.stateNode))return!0;for(c=c.child;c!==null;)a.push(c),c=c.sibling}}return!1},Dt.getFindAllNodesFailureDescription=function(s,a){if(!ql)throw Error(r(363));var c=0,d=[];s=[Mf(s),0];for(var y=0;y<s.length;){var M=s[y++],D=M.tag,V=s[y++],ae=a[V];if((D!==5&&D!==26&&D!==27||!Yl(M))&&(wf(M,ae)&&(d.push(Ef(ae)),V++,V>c&&(c=V)),V<a.length))for(M=M.child;M!==null;)s.push(M,V),M=M.sibling}if(c<a.length){for(s=[];c<a.length;c++)s.push(Ef(a[c]));return`findAllNodes was able to match part of the selector:
4124  `+(d.join(" > ")+`
4125
4126No matching component was found for:
4127  `)+s.join(" > ")}return null},Dt.getPublicRootInstance=function(s){if(s=s.current,!s.child)return null;switch(s.child.tag){case 27:case 5:return Xl(s.child.stateNode);default:return s.child.stateNode}},Dt.injectIntoDevTools=function(){var s={bundleType:0,version:T_,rendererPackageName:C_,currentDispatcherRef:dt,reconcilerVersion:"19.2.0"};if(Hm!==null&&(s.rendererConfig=Hm),typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")s=!1;else{var a=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(a.isDisabled||!a.supportsFiber)s=!0;else{try{$l=a.inject(s),Ri=a}catch{}s=!!a.checkDCE}}return s},Dt.isAlreadyRendering=function(){return(Ut&6)!==0},Dt.observeVisibleRects=function(s,a,c,d){if(!ql)throw Error(r(363));s=Tf(s,a);var y=K_(s,c,d).disconnect;return{disconnect:function(){y()}}},Dt.shouldError=function(){return null},Dt.shouldSuspend=function(){return!1},Dt.startHostTransition=function(s,a,c,d){if(s.tag!==5)throw Error(r(476));var y=ga(s).queue;ma(s,y,a,Po,c===null?i:function(){var M=ga(s);return M.next===null&&(M=s.alternate.memoizedState),xr(s,M.next.queue,{},Ti()),c(d)})},Dt.updateContainer=function(s,a,c,d){var y=a.current,M=Ti();return km(y,M,s,a,c,d),M},Dt.updateContainerSync=function(s,a,c,d){return km(a.current,2,s,a,c,d),2},Dt},e.exports.default=e.exports,Object.defineProperty(e.exports,"__esModule",{value:!0})})(Op)),Op.exports}var xv;function OT(){return xv||(xv=1,vv.exports=UT()),vv.exports}var FT=DT(OT());function kT(e){const t=FT(e);return t.injectIntoDevTools(),t}var Kx=0,Nl={},BT=/^three(?=[A-Z])/,af=e=>`${e[0].toUpperCase()}${e.slice(1)}`,zT=0,VT=e=>typeof e=="function";function GT(e){if(VT(e)){const t=`${zT++}`;return Nl[t]=e,t}else Object.assign(Nl,e)}function Qx(e,t){const n=af(e),i=Nl[n];if(e!=="primitive"&&!i)throw new Error(`R3F: ${n} is not part of the THREE namespace! Did you forget to extend? See: https://docs.pmnd.rs/react-three-fiber/api/objects#using-3rd-party-objects-declaratively`);if(e==="primitive"&&!t.object)throw new Error("R3F: Primitives without 'object' are invalid!");if(t.args!==void 0&&!Array.isArray(t.args))throw new Error("R3F: The args prop must be an array!")}function HT(e,t,n){var i;return e=af(e)in Nl?e:e.replace(BT,""),Qx(e,t),e==="primitive"&&(i=t.object)!=null&&i.__r3f&&delete t.object.__r3f,zh(t.object,n,e,t)}function WT(e){if(!e.isHidden){var t;e.props.attach&&(t=e.parent)!=null&&t.object?Gh(e.parent,e):li(e.object)&&(e.object.visible=!1),e.isHidden=!0,Bl(e)}}function e_(e){if(e.isHidden){var t;e.props.attach&&(t=e.parent)!=null&&t.object?Vh(e.parent,e):li(e.object)&&e.props.visible!==!1&&(e.object.visible=!0),e.isHidden=!1,Bl(e)}}function F0(e,t,n){const i=t.root.getState();if(!(!e.parent&&e.object!==i.scene)){if(!t.object){var r,o;const l=Nl[af(t.type)];
4127t.object=(r=t.props.object)!=null?r:new l(...(o=t.props.args)!=null?o:[]),t.object.__r3f=t}if(Bs(t.object,t.props),t.props.attach)Vh(e,t);else if(li(t.object)&&li(e.object)){const l=e.object.children.indexOf(n?.object);if(n&&l!==-1){const u=e.object.children.indexOf(t.object);if(u!==-1){e.object.children.splice(u,1);const h=u<l?l-1:l;e.object.children.splice(h,0,t.object)}else t.object.parent=e.object,e.object.children.splice(l,0,t.object),t.object.dispatchEvent({type:"added"}),e.object.dispatchEvent({type:"childadded",child:t.object})}else e.object.add(t.object)}for(const l of t.children)F0(t,l);Bl(t)}}function cp(e,t){t&&(t.parent=e,e.children.push(t),F0(e,t))}function _v(e,t,n){if(!t||!n)return;t.parent=e;const i=e.children.indexOf(n);i!==-1?e.children.splice(i,0,t):e.children.push(t),F0(e,t,n)}function t_(e){if(typeof e.dispose=="function"){const t=()=>{try{e.dispose()}catch{}};typeof IS_REACT_ACT_ENVIRONMENT<"u"?t():(0,Dp.unstable_scheduleCallback)(Dp.unstable_IdlePriority,t)}}function Fp(e,t,n){if(!t)return;t.parent=null;const i=e.children.indexOf(t);i!==-1&&e.children.splice(i,1),t.props.attach?Gh(e,t):li(t.object)&&li(e.object)&&(e.object.remove(t.object),MT(O0(t),t.object));const r=t.props.dispose!==null&&n!==!1;for(let o=t.children.length-1;o>=0;o--){const l=t.children[o];Fp(t,l,r)}t.children.length=0,delete t.object.__r3f,r&&t.type!=="primitive"&&t.object.type!=="Scene"&&t_(t.object),n===void 0&&Bl(t)}function jT(e,t){for(const n of[e,e.alternate])if(n!==null)if(typeof n.ref=="function"){n.refCleanup==null||n.refCleanup();const i=n.ref(t);typeof i=="function"&&(n.refCleanup=i)}else n.ref&&(n.ref.current=t)}var Uh=[];function XT(){for(const[n]of Uh){const i=n.parent;if(i){n.props.attach?Gh(i,n):li(n.object)&&li(i.object)&&i.object.remove(n.object);for(const r of n.children)r.props.attach?Gh(n,r):li(r.object)&&li(n.object)&&n.object.remove(r.object)}n.isHidden&&e_(n),n.object.__r3f&&delete n.object.__r3f,n.type!=="primitive"&&t_(n.object)}for(const[n,i,r]of Uh){n.props=i;const o=n.parent;if(o){var e,t;const l=Nl[af(n.type)],u=n.object;n.object=(e=n.props.object)!=null?e:new l(...(t=n.props.args)!=null?t:[]),n.object.__r3f=n,jT(r,n.object),ST(O0(n),u,n.object),Bs(n.object,n.props),n.props.attach?Vh(o,n):li(n.object)&&li(o.object)&&o.object.add(n.object);for(const h of n.children)h.props.attach?Vh(n,h):li(h.object)&&li(n.object)&&n.object.add(h.object);Bl(n)}}Uh.length=0}var up=()=>{},bv={},Th=Kx,qT=0,YT=4,kp=kT({isPrimaryRenderer:!1,warnsIfNotActing:!1,supportsMutation:!0,supportsPersistence:!1,supportsHydration:!1,createInstance:HT,removeChild:Fp,appendChild:cp,appendInitialChild:cp,insertBefore:_v,appendChildToContainer(e,t){const n=e.getState().scene.__r3f;!t||!n||cp(n,t)},removeChildFromContainer(e,t){const n=e.getState().scene.__r3f;!t||!n||Fp(n,t)},insertInContainerBefore(e,t,n){const i=e.getState().scene.__r3f;!t||!n||!i||_v(i,t,n)},getRootHostContext:()=>bv,getChildHostContext:()=>bv,commitUpdate(e,t,n,i,r){var o,l,u;Qx(t,i);let h=!1;if((e.type==="primitive"&&n.object!==i.object||((o=i.args)==null?void 0:o.length)!==((l=n.args)==null?void 0:l.length)||(u=i.args)!=null&&u.some((f,p)=>{var g;return f!==((g=n.args)==null?void 0:g[p])}))&&(h=!0),h)Uh.push([e,{...i},r]);else{const f=yT(e,i);Object.keys(f).length&&(Object.assign(e.props,f),Bs(e.object,f))}(r.sibling===null||(r.flags&YT)===qT)&&XT()},finalizeInitialChildren:()=>!1,commitMount(){},getPublicInstance:e=>e?.object,prepareForCommit:()=>null,preparePortalMount:e=>zh(e.getState().scene,e,"",{}),resetAfterCommit:()=>{},shouldSetTextContent:()=>!1,clearContainer:()=>!1,hideInstance:WT,unhideInstance:e_,createTextInstance:up,hideTextInstance:up,unhideTextInstance:up,scheduleTimeout:typeof setTimeout=="function"?setTimeout:void 0,cancelTimeout:typeof clearTimeout=="function"?clearTimeout:void 0,noTimeout:-1,getInstanceFromNode:()=>null,beforeActiveInstanceBlur(){},afterActiveInstanceBlur(){},detachDeletedInstance(){},prepareScopeUpdate(){},getInstanceFromScope:()=>null,shouldAttemptEagerTransition:()=>!1,trackSchedulerEvent:()=>{},resolveEventType:()=>null,resolveEventTimeStamp:()=>-1.1,requestPostPaintCallback(){},maySuspendCommit:()=>!1,preloadInstance:()=>!0,suspendInstance(){},waitForCommitToBeReady:()=>null,NotPendingTransition:null,HostTransitionContext:de.createContext(null),setCurrentUpdatePriority(e){Th=e},getCurrentUpdatePriority(){return Th},resolveUpdatePriority(){var e;if(Th!==Kx)return Th;switch(typeof window<"u"&&((e=window.event)==null?void 0:e.type)){case"click":case"contextmenu":case"dblclick":case"pointercancel":case"pointerdown":case"pointerup":return NT;case"pointermove":case"pointerout":case"pointerover":case"pointerenter":case"pointerleave":case"wheel":return IT;default:return PT}},resetFormInstance(){},rendererPackageName:"@react-three/fiber",rendererVersion:LT.version,applyViewTransitionName(e,t,n){},restoreViewTransitionName(e,t){},cancelViewTransitionName(e,t,n){},cancelRootViewTransitionName(e){},restoreRootViewTransitionName(e){},InstanceMeasurement:null,measureInstance:e=>null,wasInstanceInViewport:e=>!0,hasInstanceChanged:(e,t)=>!1,hasInstanceAffectedParent:(e,t)=>
4127!1,suspendOnActiveViewTransition(e,t){},startGestureTransition:()=>null,startViewTransition:()=>null,stopViewTransition(e){},createViewTransitionInstance:e=>null,getCurrentGestureOffset(e){throw new Error("startGestureTransition is not yet supported in react-three-fiber.")},cloneMutableInstance(e,t){return e},cloneMutableTextInstance(e){return e},cloneRootViewTransitionContainer(e){throw new Error("Not implemented.")},removeRootViewTransitionClone(e,t){throw new Error("Not implemented.")},createFragmentInstance:e=>null,updateFragmentInstanceFiber(e,t){},commitNewChildToFragmentInstance(e,t){},deleteChildFromFragmentInstance(e,t){},measureClonedInstance:e=>null,maySuspendCommitOnUpdate:(e,t,n)=>!1,maySuspendCommitInSyncRender:(e,t)=>!1,startSuspendingCommit:()=>null,getSuspendedCommitReason:(e,t)=>null}),go=new Map,yl={objects:"shallow",strict:!1};function $T(e,t){if(!t&&typeof HTMLCanvasElement<"u"&&e instanceof HTMLCanvasElement&&e.parentElement){const{width:n,height:i,top:r,left:o}=e.parentElement.getBoundingClientRect();return{width:n,height:i,top:r,left:o}}else if(!t&&typeof OffscreenCanvas<"u"&&e instanceof OffscreenCanvas)return{width:e.width,height:e.height,top:0,left:0};return{width:0,height:0,top:0,left:0,...t}}function ZT(e){const t=go.get(e),n=t?.fiber,i=t?.store;t&&console.warn("R3F.createRoot should only be called once!");const r=typeof reportError=="function"?reportError:console.error,o=i||ET(Vp,Mv),l=n||kp.createContainer(o,RT,null,!1,null,"",r,r,r,null);t||go.set(e,{fiber:l,store:o});let u,h,f=!1,p=null;return{async configure(g={}){let m;p=new Promise(me=>m=me);let{gl:v,size:b,scene:w,events:S,onCreated:_,shadows:C=!1,linear:A=!1,flat:E=!1,legacy:P=!1,orthographic:N=!1,frameloop:O="always",dpr:T=[1,2],performance:R,raycaster:B,camera:F,onPointerMissed:j}=g,H=o.getState(),Y=H.gl;if(!H.gl){const me={canvas:e,powerPreference:"high-performance",antialias:!0,alpha:!0},_e=typeof v=="function"?await v(me):v;mv(_e)?Y=_e:Y=new Fx({...me,...v}),H.set({gl:Y})}let q=H.raycaster;q||H.set({raycaster:q=new wx});const{params:te,...J}=B||{};if(rn.equ(J,q,yl)||Bs(q,{...J}),rn.equ(te,q.params,yl)||Bs(q,{params:{...q.params,...te}}),!H.camera||H.camera===h&&!rn.equ(h,F,yl)){h=F;const me=F?.isCamera,_e=me?F:N?new Fl(0,0,0,0,.1,1e3):new kn(75,0,.1,1e3);me||(_e.position.z=5,F&&(Bs(_e,F),_e.manual||("aspect"in F||"left"in F||"right"in F||"bottom"in F||"top"in F)&&(_e.manual=!0,_e.updateProjectionMatrix())),!H.camera&&!(F!=null&&F.rotation)&&_e.lookAt(0,0,0)),H.set({camera:_e}),q.camera=_e}if(!H.scene){let me;w!=null&&w.isScene?(me=w,zh(me,o,"",{})):(me=new r0,zh(me,o,"",{}),w&&Bs(me,w)),H.set({scene:me})}S&&!H.events.handlers&&H.set({events:S(o)});const he=$T(e,b);if(rn.equ(he,H.size,yl)||H.setSize(he.width,he.height,he.top,he.left),T&&H.viewport.dpr!==jx(T)&&H.setDpr(T),H.frameloop!==O&&H.setFrameloop(O),H.onPointerMissed||H.set({onPointerMissed:j}),R&&!rn.equ(R,H.performance,yl)&&H.set(me=>({performance:{...me.performance,...R}})),!H.xr){var ue;const me=(tt,re)=>{const ge=o.getState();ge.frameloop!=="never"&&Mv(tt,!0,ge,re)},_e=()=>{const tt=o.getState();tt.gl.xr.enabled=tt.gl.xr.isPresenting,tt.gl.xr.setAnimationLoop(tt.gl.xr.isPresenting?me:null),tt.gl.xr.isPresenting||Vp(tt)},ht={connect(){const tt=o.getState().gl;tt.xr.addEventListener("sessionstart",_e),tt.xr.addEventListener("sessionend",_e)},disconnect(){const tt=o.getState().gl;tt.xr.removeEventListener("sessionstart",_e),tt.xr.removeEventListener("sessionend",_e)}};typeof((ue=Y.xr)==null?void 0:ue.addEventListener)=="function"&&ht.connect(),H.set({xr:ht})}if(Y.shadowMap){const me=Y.shadowMap.enabled,_e=Y.shadowMap.type;if(Y.shadowMap.enabled=!!C,rn.boo(C))Y.shadowMap.type=2;else if(rn.str(C)){var ce;const ht={basic:0,percentage:1,soft:2,variance:3};Y.shadowMap.type=(ce=ht[C])!=null?ce:2}else rn.obj(C)&&Object.assign(Y.shadowMap,C);(me!==Y.shadowMap.enabled||_e!==Y.shadowMap.type)&&(Y.shadowMap.needsUpdate=!0)}return Nt.enabled=!P,f||(Y.outputColorSpace=A?Uc:ci,Y.toneMapping=E?0:4),H.legacy!==P&&H.set(()=>({legacy:P})),H.linear!==A&&H.set(()=>({linear:A})),H.flat!==E&&H.set(()=>({flat:E})),v&&!rn.fun(v)&&!mv(v)&&!rn.equ(v,Y,yl)&&Bs(Y,v),u=_,f=!0,m(),this},render(g){return!f&&!p&&this.configure(),p.then(()=>{kp.updateContainer((0,x.jsx)(JT,{store:o,children:g,onCreated:u,rootElement:e}),l,null,()=>{})}),o},unmount(){n_(e)}}}function JT({store:e,children:t,onCreated:n,rootElement:i}){return Kc(()=>{const r=e.getState();r.set(o=>({internal:{...o.internal,active:!0}})),n&&n(r),e.getState().events.connected||r.events.connect==null||r.events.connect(i)},[]),(0,x.jsx)(Yx.Provider,{value:e,children:t})}function n_(e,t){const n=go.get(e),i=n?.fiber;if(i){const r=n?.store.getState();r&&(r.internal.active=!1),kp.updateContainer(null,i,null,()=>{r&&setTimeout(()=>{try{var o,l,u,h;r.events.disconnect==null||r.events.disconnect(),(o=r.gl)==null||(l=o.renderLists)==null||l.dispose==null||l.dispose(),(u=r.gl)==null||u.forceContextLoss==null||u.forceContextLoss(),(h=r.gl)!=null&&h.xr&&r.xr.disconnect(),mT(r.scene),go.delete(e),t&&t(e)}catch{}},500)})}}var KT=new Set,QT=new Set,eC=new Set;function hp(e,t){if(e.size)for(const{callback:n}of e.values())n(t)}function Ac(e,t){switch(e){case"before":return hp(KT,t);case"after":return hp(QT,t);case"tail":return hp(eC,t)}}var fp,dp;function Bp(e,t,n){let i=t.clock.getDelta();t.frameloop==="never"&&typeof e=="number"&&(i=e-t.clock.elapsedTime,t.clock.oldTime=t.clock.elapsedTime,t.clock.elapsedTime=e),fp=t.internal.subscribers;for(let r=0;r<fp.length;r++)dp=fp[r],dp.ref.current(dp.store.getState(),i,n);return!t.internal.priority&&t.gl.render&&t.gl.render(t.scene,t.camera),t.internal.frames=Math.max(0,t.internal.frames-1),t.frameloop==="always"?1:t.internal.frames}var Hh=!1,zp=!1,pp,Sv,xl;function i_(e){Sv=requestAnimationFrame(i_),Hh=!0,pp=0,Ac("before",e),zp=!0;for(const n of go.values()){var t;xl=n.store.getState(),xl.internal.active&&(xl.frameloop==="always"||xl.internal.frames>0)&&!((t=xl.gl.xr)!=null&&t.isPresenting)&&(pp+=Bp(e,xl))}if(zp=!1,Ac("after",e),pp===0)return Ac("tail",e),Hh=!1,cancelAnimationFrame(Sv)}function Vp(e,t=1){var n;if(!e)return go.forEach(i=>
4127Vp(i.store.getState(),t));(n=e.gl.xr)!=null&&n.isPresenting||!e.internal.active||e.frameloop==="never"||(t>1?e.internal.frames=Math.min(60,e.internal.frames+t):zp?e.internal.frames=2:e.internal.frames=1,Hh||(Hh=!0,requestAnimationFrame(i_)))}function Mv(e,t=!0,n,i){if(t&&Ac("before",e),n)Bp(e,n,i);else for(const r of go.values())Bp(e,r.store.getState());t&&Ac("after",e)}var mp={onClick:["click",!1],onContextMenu:["contextmenu",!1],onDoubleClick:["dblclick",!1],onWheel:["wheel",!0],onPointerDown:["pointerdown",!0],onPointerUp:["pointerup",!0],onPointerLeave:["pointerleave",!0],onPointerMove:["pointermove",!0],onPointerCancel:["pointercancel",!0],onLostPointerCapture:["lostpointercapture",!0]};function tC(e){const{handlePointer:t}=wT(e);return{priority:1,enabled:!0,compute(n,i,r){i.pointer.set(n.offsetX/i.size.width*2-1,-(n.offsetY/i.size.height)*2+1),i.raycaster.setFromCamera(i.pointer,i.camera)},connected:void 0,handlers:Object.keys(mp).reduce((n,i)=>({...n,[i]:t(i)}),{}),update:()=>{var n;const{events:i,internal:r}=e.getState();(n=r.lastEvent)!=null&&n.current&&i.handlers&&i.handlers.onPointerMove(r.lastEvent.current)},connect:n=>{const{set:i,events:r}=e.getState();if(r.disconnect==null||r.disconnect(),i(o=>({events:{...o.events,connected:n}})),r.handlers)for(const o in r.handlers){const l=r.handlers[o],[u,h]=mp[o];n.addEventListener(u,l,{passive:h})}},disconnect:()=>{const{set:n,events:i}=e.getState();if(i.connected){if(i.handlers)for(const r in i.handlers){const o=i.handlers[r],[l]=mp[r];i.connected.removeEventListener(l,o)}n(r=>({events:{...r.events,connected:void 0}}))}}}}function wv(e,t){let n;return(...i)=>{window.clearTimeout(n),n=window.setTimeout(()=>e(...i),t)}}function nC({debounce:e,scroll:t,polyfill:n,offsetSize:i}={debounce:0,scroll:!1,offsetSize:!1}){const r=n||(typeof window>"u"?class{}:window.ResizeObserver);if(!r)throw new Error("This browser does not support ResizeObserver out of the box. See: https://github.com/react-spring/react-use-measure/#resize-observer-polyfills");const[o,l]=(0,de.useState)({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),u=(0,de.useRef)({element:null,scrollContainers:null,resizeObserver:null,lastBounds:o,orientationHandler:null}),h=e?typeof e=="number"?e:e.scroll:null,f=e?typeof e=="number"?e:e.resize:null,p=(0,de.useRef)(!1);(0,de.useEffect)(()=>(p.current=!0,()=>{p.current=!1}));const[g,m,v]=(0,de.useMemo)(()=>{const _=()=>{if(!u.current.element)return;const{left:C,top:A,width:E,height:P,bottom:N,right:O,x:T,y:R}=u.current.element.getBoundingClientRect(),B={left:C,top:A,width:E,height:P,bottom:N,right:O,x:T,y:R};u.current.element instanceof HTMLElement&&i&&(B.height=u.current.element.offsetHeight,B.width=u.current.element.offsetWidth),Object.freeze(B),p.current&&!aC(u.current.lastBounds,B)&&l(u.current.lastBounds=B)};return[_,f?wv(_,f):_,h?wv(_,h):_]},[l,i,h,f]);function b(){u.current.scrollContainers&&(u.current.scrollContainers.forEach(_=>_.removeEventListener("scroll",v,!0)),u.current.scrollContainers=null),u.current.resizeObserver&&(u.current.resizeObserver.disconnect(),u.current.resizeObserver=null),u.current.orientationHandler&&("orientation"in screen&&"removeEventListener"in screen.orientation?screen.orientation.removeEventListener("change",u.current.orientationHandler):"onorientationchange"in window&&window.removeEventListener("orientationchange",u.current.orientationHandler))}function w(){u.current.element&&(u.current.resizeObserver=new r(v),u.current.resizeObserver.observe(u.current.element),t&&u.current.scrollContainers&&u.current.scrollContainers.forEach(_=>_.addEventListener("scroll",v,{capture:!0,passive:!0})),u.current.orientationHandler=()=>{v()},"orientation"in screen&&"addEventListener"in screen.orientation?screen.orientation.addEventListener("change",u.current.orientationHandler):"onorientationchange"in window&&window.addEventListener("orientationchange",u.current.orientationHandler))}const S=_=>{!_||_===u.current.element||(b(),u.current.element=_,u.current.scrollContainers=r_(_),w())};return rC(v,!!t),iC(m),(0,de.useEffect)(()=>{b(),w()},[t,v,m]),(0,de.useEffect)(()=>b,[]),[S,o,g]}function iC(e){(0,de.useEffect)(()=>{const t=e;return window.addEventListener("resize",t),()=>{window.removeEventListener("resize",t)}},[e])}function rC(e,t){(0,de.useEffect)(()=>
4127{if(t){const n=e;return window.addEventListener("scroll",n,{capture:!0,passive:!0}),()=>{window.removeEventListener("scroll",n,!0)}}},[e,t])}function r_(e){const t=[];if(!e||e===document.body)return t;const{overflow:n,overflowX:i,overflowY:r}=window.getComputedStyle(e);return[n,i,r].some(o=>o==="auto"||o==="scroll")&&t.push(e),[...t,...r_(e.parentElement)]}var sC=["x","y","top","bottom","left","right","width","height"],aC=(e,t)=>sC.every(n=>e[n]===t[n]);function oC({ref:e,children:t,fallback:n,resize:i,style:r,gl:o,events:l=tC,eventSource:u,eventPrefix:h,shadows:f,linear:p,flat:g,legacy:m,orthographic:v,frameloop:b,dpr:w,performance:S,raycaster:_,camera:C,scene:A,onPointerMissed:E,onCreated:P,...N}){de.useMemo(()=>GT(U5),[]);const O=hT(),[T,R]=nC({scroll:!0,debounce:{scroll:50,resize:0},...i}),B=de.useRef(null),F=de.useRef(null);de.useImperativeHandle(e,()=>B.current);const j=Wx(E),[H,Y]=de.useState(!1),[q,te]=de.useState(!1);if(H)throw H;if(q)throw q;const J=de.useRef(null);return Kc(()=>{const he=B.current;if(R.width>0&&R.height>0&&he){J.current||(J.current=ZT(he));async function ue(){await J.current.configure({gl:o,scene:A,events:l,shadows:f,linear:p,flat:g,legacy:m,orthographic:v,frameloop:b,dpr:w,performance:S,raycaster:_,camera:C,size:R,onPointerMissed:(...ce)=>j.current==null?void 0:j.current(...ce),onCreated:ce=>{ce.events.connect==null||ce.events.connect(u?cT(u)?u.current:u:F.current),h&&ce.setEvents({compute:(me,_e)=>{const ht=me[h+"X"],tt=me[h+"Y"];_e.pointer.set(ht/_e.size.width*2-1,-(tt/_e.size.height)*2+1),_e.raycaster.setFromCamera(_e.pointer,_e.camera)}}),P?.(ce)}}),J.current.render((0,x.jsx)(O,{children:(0,x.jsx)(dT,{set:te,children:(0,x.jsx)(de.Suspense,{fallback:(0,x.jsx)(fT,{set:Y}),children:t??null})})}))}ue()}}),de.useEffect(()=>{const he=B.current;if(he)return()=>n_(he)},[]),(0,x.jsx)("div",{ref:F,style:{position:"relative",width:"100%",height:"100%",overflow:"hidden",pointerEvents:u?"none":"auto",...r},...N,children:(0,x.jsx)("div",{ref:T,style:{width:"100%",height:"100%"},children:(0,x.jsx)("canvas",{ref:B,style:{display:"block"},children:n})})})}function lC(e){return(0,x.jsx)(Vx,{children:(0,x.jsx)(oC,{...e})})}var cC=({center:e=["x","y"],colors:t=[[0,0,0]],dotSize:n=2,opacities:i=[.04,.04,.04,.04,.04,.08,.08,.08,.08,.14],shader:r="",totalSize:o=4})=>{const l=(0,de.useMemo)(()=>{let u=[t[0],t[0],t[0],t[0],t[0],t[0]];return t.length===2?u=[t[0],t[0],t[0],t[1],t[1],t[1]]:t.length===3&&(u=[t[0],t[0],t[1],t[1],t[2],t[2]]),{u_colors:{type:"uniform3fv",value:u.map(h=>[h[0]/255,h[1]/255,h[2]/255])},u_dot_size:{type:"uniform1f",value:n},u_opacities:{type:"uniform1fv",value:i},u_total_size:{type:"uniform1f",value:o}}},[t,i,o,n]);return(0,x.jsx)(hC,{maxFps:60,source:`
4128        precision mediump float;
4129        in vec2 fragCoord;
4130
4131        uniform float u_time;
4132        uniform float u_opacities[10];
4133        uniform vec3 u_colors[6];
4134        uniform float u_total_size;
4135        uniform float u_dot_size;
4136        uniform vec2 u_resolution;
4137        out vec4 fragColor;
4138        float PHI = 1.61803398874989484820459;
4139        float random(vec2 xy) {
4140            return fract(tan(distance(xy * PHI, xy) * 0.5) * xy.x);
4141        }
4142        float map(float value, float min1, float max1, float min2, float max2) {
4143            return min2 + (value - min1) * (max2 - min2) / (max1 - min1);
4144        }
4145        void main() {
4146            vec2 st = fragCoord.xy;
4147            ${e.includes("x")?"st.x -= abs(floor((mod(u_resolution.x, u_total_size) - u_dot_size) * 0.5));":""}
4148            ${e.includes("y")?"st.y -= abs(floor((mod(u_resolution.y, u_total_size) - u_dot_size) * 0.5));":""}
4149      float opacity = step(0.0, st.x);
4150      opacity *= step(0.0, st.y);
4151
4152      vec2 st2 = vec2(int(st.x / u_total_size), int(st.y / u_total_size));
4153
4154      float frequency = 5.0;
4155      float show_offset = random(st2);
4156      float rand = random(st2 * floor((u_time / frequency) + show_offset + frequency) + 1.0);
4157      opacity *= u_opacities[int(rand * 10.0)];
4158      opacity *= 1.0 - step(u_dot_size / u_total_size, fract(st.x / u_total_size));
4159      opacity *= 1.0 - step(u_dot_size / u_total_size, fract(st.y / u_total_size));
4160
4161      vec3 color = u_colors[int(show_offset * 6.0)];
4162
4163      ${r}
4164
4165      fragColor = vec4(color, opacity);
4166      fragColor.rgb *= fragColor.a;
4167        }`,uniforms:l})},uC=({maxFps:e=60,source:t,uniforms:n})=>{const{size:i}=TT(),r=(0,de.useRef)(null);let o=0;CT(({clock:h})=>{if(!r.current)return;const f=h.getElapsedTime();if(f-o<1/e)return;o=f;const{material:p}=r.current,g=p.uniforms.u_time;g.value=f});const l=()=>{const h={};for(const f in n){const p=n[f];switch(p.type){case"uniform1f":h[f]={type:"1f",value:p.value};break;case"uniform1fv":h[f]={type:"1fv",value:p.value};break;case"uniform2f":h[f]={type:"2f",value:new ye().fromArray(p.value)};break;case"uniform3f":h[f]={type:"3f",value:new k().fromArray(p.value)};break;case"uniform3fv":h[f]={type:"3fv",value:p.value.map(g=>new k().fromArray(g))};break;default:console.error(`Invalid uniform type for '${f}'.`);break}}return h.u_time={type:"1f",value:0},h.u_resolution={value:new ye(i.width*2,i.height*2)},h},u=(0,de.useMemo)(()=>new Si({blendDst:201,blending:5,blendSrc:204,fragmentShader:t,glslVersion:My,uniforms:l(),vertexShader:`
4168      precision mediump float;
4169      in vec2 coordinates;
4170      uniform vec2 u_resolution;
4171      out vec2 fragCoord;
4172      void main(){
4173        float x = position.x;
4174        float y = position.y;
4175        gl_Position = vec4(x, y, 0.0, 1.0);
4176        fragCoord = (position.xy + vec2(1.0)) * 0.5 * u_resolution;
4177        fragCoord.y = u_resolution.y - fragCoord.y;
4178      }
4179      `}),[i.width,i.height,t]);return(0,x.jsxs)("mesh",{ref:r,children:[(0,x.jsx)("planeGeometry",{args:[2,2]}),(0,x.jsx)("primitive",{attach:"material",object:u})]})},hC=({maxFps:e=60,source:t,uniforms:n})=>(0,x.jsx)(lC,{className:"absolute inset-0 h-full w-full",children:(0,x.jsx)(uC,{maxFps:e,source:t,uniforms:n})}),fC=({animationSpeed:e=.4,colors:t=[[0,255,255]],containerClassName:n,dotSize:i=2,opacities:r=[.3,.3,.3,.5,.5,.5,.8,.8,.8,1],showGradient:o=!0})=>(0,x.jsxs)("div",{className:fr("relative h-full w-full bg-white",n),children:[(0,x.jsx)("div",{className:"h-full w-full",children:(0,x.jsx)(cC,{center:["x","y"],colors:t,dotSize:i,opacities:r,shader:`
4180              float animation_speed_factor = ${e.toFixed(1)};
4181              float intro_offset = distance(u_resolution / 2.0 / u_total_size, st2) * 0.01 + (random(st2) * 0.15);
4182              opacity *= step(intro_offset, u_time * animation_speed_factor);
4183              opacity *= clamp((1.0 - step(intro_offset + 0.1, u_time * animation_speed_factor)) * 1.25, 1.0, 1.25);
4184            `})}),o&&(0,x.jsx)("div",{className:"absolute inset-0 bg-linear-to-t from-gray-950 to-84%"})]}),dC=e=>{const t=(0,$t.c)(5),{children:n,className:i}=e;let r;t[0]!==i?(r=fr("grid w-full grid-cols-4",i),t[0]=i,t[1]=r):r=t[1];let o;return t[2]!==n||t[3]!==r?(o=(0,x.jsx)("div",{className:r,children:n}),t[2]=n,t[3]=r,t[4]=o):o=t[4],o},pC=({className:e,color:t="#262626",description:n,Icon:i,name:r,radius:o=350,revealColors:l=[[59,130,246],[139,92,246]]})=>{const u=xp(0),h=xp(0);function f({clientX:w,clientY:S,currentTarget:_}){const{left:C,top:A}=_.getBoundingClientRect();u.set(w-C),h.set(S-A)}const p=nS`radial-gradient(${o}
4184px circle at ${u}px ${h}px, white, transparent 80%)`,[g,m]=(0,de.useState)(!1),v=()=>{m(!0)},b=()=>{m(!1)};return(0,x.jsxs)("div",{className:fr("group/spotlight group relative col-span-4 flex flex-col justify-between overflow-hidden","transform-gpu",e),onMouseEnter:v,onMouseLeave:b,onMouseMove:f,children:[(0,x.jsx)(on.div,{className:"pointer-events-none absolute -inset-px z-0 rounded-md opacity-0 transition duration-300 group-hover/spotlight:opacity-100",style:{backgroundColor:t,maskImage:p},children:g&&(0,x.jsx)(fC,{animationSpeed:5,colors:l,containerClassName:"bg-transparent absolute inset-0 pointer-events-none"})}),(0,x.jsxs)("div",{className:"pointer-events-none z-10 flex transform-gpu flex-col gap-2 p-6 transition-all duration-300",children:[(0,x.jsx)(i,{className:"my-5 h-6 w-6 origin-left transform-gpu text-white/60 transition-all duration-300 ease-in-out group-hover/spotlight:text-white group-hover/spotlight:scale-110"}),(0,x.jsx)("h3",{className:"text-lg font-bold tracking-tight text-white",children:r}),(0,x.jsx)("p",{className:"text-sm leading-relaxed text-white/40 transition-colors duration-300 group-hover/spotlight:text-white/55",children:n})]})]})},mC=[{className:"lg:row-start-2 lg:row-end-2 lg:col-start-1 lg:col-end-3 border-r border-t border-white/[0.06]",description:"Save time and reduce engineering overhead by leveraging Visulima's ready-to-use solutions. Our tools let you ship faster without sacrificing quality, ensuring your team stays ahead of deadlines and focused on innovation.",Icon:Yb,name:"Accelerate Delivery",revealColors:[[0,122,204],[56,189,248]]},{className:"lg:row-start-1 lg:row-end-2 lg:col-start-2 lg:col-end-3",description:"Built with enterprise-grade security, Visulima protects your applications and data with robust, proven technologies. With advanced safeguards in place, you can develop with peace of mind.",Icon:Vb,name:"Security at the Core",revealColors:[[0,122,204],[56,189,248]]},{className:"lg:col-start-1 lg:row-start-1 lg:col-end-1 lg:row-end-1",description:"Whether starting fresh or enhancing an existing stack, Visulima integrates effortlessly into your workflow. Adopt incrementally or go all-in — our tools are designed to fit your unique needs and evolve with your projects.",Icon:jb,name:"Flexible, Seamless Adoption",revealColors:[[204,50,50],[248,113,113]]},{className:"lg:col-start-3 lg:row-start-1 border-r border-b border-white/[0.06]",description:"Visulima tools have been rigorously tested in real-world scenarios to deliver consistent, dependable performance. You can trust them to handle even your most complex and demanding use cases with ease.",Icon:Mb,name:"Proven Reliability",revealColors:[[128,71,153],[168,85,247]]},{className:"lg:row-start-2 lg:row-end-2 lg:col-start-3 lg:col-end-3",description:"Our platform evolves rapidly, driven by a vibrant developer community and a commitment to innovation. With Visulima, you gain access to cutting-edge solutions that stay ahead of industry trends.",Icon:Lb,name:"Always Improving",revealColors:[[128,71,153],[168,85,247]]},{className:"lg:row-start-2 lg:col-start-4",description:"Designed for flexibility, Visulima's libraries work seamlessly with a wide range of systems. With clear documentation and intuitive interfaces, setup is quick, and implementation is smooth — no matter your environment.",Icon:Ub,name:"Effortless Integration",revealColors:[[0,122,204],[56,189,248]]}],gC=()=>{const e=(0,$t.c)(3);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={lineGrid:"border-dotted border-white/[0.06]",pattern:"inset-y-10"},e[0]=t):t=e[0];let n;e[1]===Symbol.for("react.memo_cache_sentinel")?(n=(0,x.jsx)("div",{className:"col-span-2 mb-16",children:(0,x.jsx)(El,{description:(0,x.jsxs)("span",{className:"flex flex-col gap-4",children:[(0,x.jsx)("span",{className:"text-white/55",children:"Visulima provides robust, developer-focused tools and libraries to streamline your workflow."}),(0,x.jsx)("span",{className:"text-white/35",children:"Let us handle the complexities so you can focus on building what truly matters."})]}),mode:"dark",prefix:"Why Visulima?",title:"Empower Your Development. Deliver Faster."})}),e[1]=n):n=e[1];let i;return e[2]===Symbol.for("react.memo_cache_sentinel")?(i=(0,x.jsxs)("div",{className:"bg-background relative",children:[(0,x.jsxs)(hr,{classes:t,mode:"dark",patternColor:"sky-sapphire",children:[n,(0,x.jsx)("div",{className:"col-span-4",children:(0,x.jsx)(dC,{className:"border-y border-white/[0.06]",children:mC.map(vC)})})]}),(0,x.jsx)(vp,{bgColor:"bg-background",fillColor:"fill-background",position:"bottom"})]}),e[2]=i):i=e[2],i};function vC(e){return(0,x.jsx)(pC,{...e,className:e.className},e.name)}var yC="#BC52EE",xC=de.forwardRef(function({title:t="Astro",color:n="currentColor",size:i=24,...r},o){return n==="default"&&(n=yC),(0,x.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:i,height:i,fill:n,viewBox:"0 0 24 24",ref:o,...r,children:[(0,x.jsx)("title",{children:t}),(0,x.jsx)("path",{d:"M8.358 20.162c-1.186-1.07-1.532-3.316-1.038-4.944.856 1.026 2.043 1.352 3.272 1.535 1.897.283 3.76.177 5.522-.678.202-.098.388-.229.608-.36.166.473.209.95.151 1.437-.14 1.185-.738 2.1-1.688 2.794-.38.277-.782.525-1.175.787-1.205.804-1.531 1.747-1.078 3.119l.044.148a3.158 3.158 0 0 1-1.407-1.188 3.31 3.31 0 0 1-.544-1.815c-.004-.32-.004-.642-.048-.958-.106-.769-.472-1.113-1.161-1.133-.707-.02-1.267.411-1.415 1.09-.012.053-.028.104-.045.165h.002zm-5.961-4.445s3.24-1.575 6.49-1.575l2.451-7.565c.092-.366.36-.614.662-.614.302 0 .57.248.662.614l2.45 7.565c3.85 0 6.491 1.575 6.491 1.575L16.088.727C15.93.285 15.663 0 15.303 0H8.697c-.36 0-.615.285-.784.727l-5.516 14.99z"})]})}),_C="#000000",bC=de.forwardRef(function({title:t="Bun",color:n="currentColor",size:i=24,...r},o){return n==="default"&&(n=_C),(0,x.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:i,height:i,fill:n,viewBox:"0 0 24 24",ref:o,...r,children:[(0,x.jsx)("title",{children:t}),(0,x.jsx)("path",{d:"M12 22.596c6.628 0 12-4.338 12-9.688 0-3.318-2.057-6.248-5.219-7.986-1.286-.715-2.297-1.357-3.139-1.89C14.058 2.025 13.08 1.404 12 1.404c-1.097 0-2.334.785-3.966 1.821a49.92 49.92 0 0 1-2.816 1.697C2.057 6.66 0 9.59 0 12.908c0 5.35 5.372 9.687 12 9.687v.001ZM10.599 4.715c.334-.759.503-1.58.498-2.409 0-.145.202-.187.23-.029.658 2.783-.902 4.162-2.057 4.624-.124.048-.199-.121-.103-.209a5.763 5.763 0 0 0 1.432-1.977Zm2.058-.102a5.82 5.82 0 0 0-.782-2.306v-.016c-.069-.123.086-.263.185-.172 1.962 2.111 1.307 4.067.556 5.051-.082.103-.23-.003-.189-.126a5.85 5.85 0 0 0 .23-2.431Zm1.776-.561a5.727 5.727 0 0 0-1.612-1.806v-.014c-.112-.085-.024-.274.114-.218 2.595 1.087 2.774 3.18 2.459 4.407a.116.116 0 0 1-.049.071.11.11 0 0 1-.153-.026.122.122 0 0 1-.022-.083 5.891 5.891 0 0 0-.737-2.331Zm-5.087.561c-.617.546-1.282.76-2.063 1-.117 0-.195-.078-.156-.181 1.752-.909 2.376-1.649 2.999-2.778 0 0 .155-.118.188.085 0 .304-.349 1.329-.968 1.874Zm4.945 11.237a2.957 2.957 0 0 1-.937 1.553c-.346.346-.8.565-1.286.62a2.178 2.178 0 0 1-1.327-.62 2.955 2.955 0 0 1-.925-1.553.244.244 0 0 1 .064-.198.234.234 0 0 1 .193-.069h3.965a.226.226 0 0 1 .19.07c.05.053.073.125.063.197Zm-5.458-2.176a1.862 1.862 0 0 1-2.384-.245 1.98 1.98 0 0 1-.233-2.447c.207-.319.503-.566.848-.713a1.84 1.84 0 0 1 1.092-.11c.366.075.703.261.967.531a1.98 1.98 0 0 1 .408 2.114 1.931 1.931 0 0 1-.698.869v.001Zm8.495.005a1.86 1.86 0 0 1-2.381-.253 1.964 1.964 0 0 1-.547-1.366c0-.384.11-.76.32-1.079.207-.319.503-.567.849-.713a1.844 1.844 0 0 1 1.093-.108c.367.076.704.262.968.534a1.98 1.98 0 0 1 .4 2.117 1.932 1.932 0 0 1-.702.868Z"})]})}),SC="#F38020",MC=de.forwardRef(function({title:t="Cloudflare",color:n="currentColor",size:i=24,...r},o){return n==="default"&&(n=SC),(0,x.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:i,height:i,fill:n,viewBox:"0 0 24 24",ref:o,...r,children:[(0,x.jsx)("title",{children:t}),(0,x.jsx)("path",{d:"M16.5088 16.8447c.1475-.5068.0908-.9707-.1553-1.3154-.2246-.3164-.6045-.499-1.0615-.5205l-8.6592-.1123a.1559.1559 0 0 1-.1333-.0713c-.0283-.042-.0351-.0986-.021-.1553.0278-.084.1123-.1484.2036-.1562l8.7359-.1123c1.0351-.0489 2.1601-.8868 2.5537-1.9136l.499-1.3013c.0215-.0561.0293-.1128.0147-.168-.5625-2.5463-2.835-4.4453-5.5499-4.4453-2.5039 0-4.6284 1.6177-5.3876 3.8614-.4927-.3658-1.1187-.5625-1.794-.499-1.2026.119-2.1665 1.083-2.2861 2.2856-.0283.31-.0069.6128.0635.894C1.5683 13.171 0 14.7754 0 16.752c0 .1748.0142.3515.0352.5273.0141.083.0844.1475.1689.1475h15.9814c.0909 0 .1758-.0645.2032-.1553l.12-.4268zm2.7568-5.5634c-.0771 0-.1611 0-.2383.0112-.0566 0-.1054.0415-.127.0976l-.3378 1.1744c-.1475.5068-.0918.9707.1543 1.3164.2256.3164.6055.498 1.0625.5195l1.8437.1133c.0557 0 .1055.0263.1329.0703.0283.043.0351.1074.0214.1562-.0283.084-.1132.1485-.204.1553l-1.921.1123c-1.041.0488-2.1582.8867-2.5527 1.914l-.1406.3585c-.0283.0713.0215.1416.0986.1416h6.5977c.0771 0 .1474-.0489.169-.126.1122-.4082.1757-.837.1757-1.2803 0-2.6025-2.125-4.727-4.7344-4.727"})]})}),wC="#000000",EC=de.forwardRef(function({title:t="Deno",color:n="currentColor",size:i=24,...r},o){return n==="default"&&(n=wC),(0,x.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:i,height:i,fill:n,viewBox:"0 0 24 24",ref:o,...r,children:[(0,x.jsx)("title",{children:t}),(0,x.jsx)("path",{d:"M1.105 18.02A11.9 11.9 0 0 1 0 12.985q0-.698.078-1.376a12 12 0 0 1 .231-1.34A12 12 0 0 1 4.025 4.02a12 12 0 0 1 5.46-2.771 12 12 0 0 1 3.428-.23c1.452.112 2.825.477 4.077 1.05a12 12 0 0 1 2.78 1.774 12.02 12.02 0 0 1 4.053 7.078A12 12 0 0 1 24 12.985q0 .454-.036.914a12 12 0 0 1-.728 3.305 12 12 0 0 1-2.38 3.875c-1.33 1.357-3.02 1.962-4.43 1.936a4.4 4.4 0 0 1-2.724-1.024c-.99-.853-1.391-1.83-1.53-2.919a5 5 0 0 1 .128-1.518c.105-.38.37-1.116.76-1.437-.455-.197-1.04-.624-1.226-.829-.045-.05-.04-.13 0-.183a.155.155 0 0 1 .177-.053c.392.134.869.267 1.372.35.66.111 1.484.25 2.317.292 2.03.1 4.153-.813 4.812-2.627s.403-3.609-1.96-4.685-3.454-2.356-5.363-3.128c-1.247-.505-2.636-.205-4.06.582-3.838 2.121-7.277 8.822-5.69 15.032a.191.191 0 0 1-.315.19 12 12 0 0 1-1.25-1.634 12 12 0 0 1-.769-1.404M11.57 6.087c.649-.051 1.214.501 1.31 1.236.13.979-.228 1.99-1.41 2.013-1.01.02-1.315-.997-1.248-1.614.066-.616.574-1.575 1.35-1.635"})]})}),TC="#000000",CC=de.forwardRef(function({title:t="Express",color:n="currentColor",size:i=24,...r},o){return n==="default"&&(n=TC),(0,x.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:i,height:i,fill:n,viewBox:"0 0 24 24",ref:o,...r,children:[(0,x.jsx)("title",{children:t}),(0,x.jsx)("path",{d:"M24 18.588a1.529 1.529 0 01-1.895-.72l-3.45-4.771-.5-.667-4.003 5.444a1.466 1.466 0 01-1.802.708l5.158-6.92-4.798-6.251a1.595 1.595 0 011.9.666l3.576 4.83 3.596-4.81a1.435 1.435 0 011.788-.668L21.708 7.9l-2.522 3.283a.666.
4184666 0 000 .994l4.804 6.412zM.002 11.576l.42-2.075c1.154-4.103 5.858-5.81 9.094-3.27 1.895 1.489 2.368 3.597 2.275 5.973H1.116C.943 16.447 4.005 19.009 7.92 17.7a4.078 4.078 0 002.582-2.876c.207-.666.548-.78 1.174-.588a5.417 5.417 0 01-2.589 3.957 6.272 6.272 0 01-7.306-.933 6.575 6.575 0 01-1.64-3.858c0-.235-.08-.455-.134-.666A88.33 88.33 0 010 11.577zm1.127-.286h9.654c-.06-3.076-2.001-5.258-4.59-5.278-2.882-.04-4.944 2.094-5.071 5.264z"})]})}),AC="#4285F4",RC=de.forwardRef(function({title:t="Google Cloud",color:n="currentColor",size:i=24,...r},o){return n==="default"&&(n=AC),(0,x.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:i,height:i,fill:n,viewBox:"0 0 24 24",ref:o,...r,children:[(0,x.jsx)("title",{children:t}),(0,x.jsx)("path",{d:"M12.19 2.38a9.344 9.344 0 0 0-9.234 6.893c.053-.02-.055.013 0 0-3.875 2.551-3.922 8.11-.247 10.941l.006-.007-.007.03a6.717 6.717 0 0 0 4.077 1.356h5.173l.03.03h5.192c6.687.053 9.376-8.605 3.835-12.35a9.365 9.365 0 0 0-2.821-4.552l-.043.043.006-.05A9.344 9.344 0 0 0 12.19 2.38zm-.358 4.146c1.244-.04 2.518.368 3.486 1.15a5.186 5.186 0 0 1 1.862 4.078v.518c3.53-.07 3.53 5.262 0 5.193h-5.193l-.008.009v-.04H6.785a2.59 2.59 0 0 1-1.067-.23h.001a2.597 2.597 0 1 1 3.437-3.437l3.013-3.012A6.747 6.747 0 0 0 8.11 8.24c.018-.01.04-.026.054-.023a5.186 5.186 0 0 1 3.67-1.69z"})]})}),IC="#E0234E",PC=de.forwardRef(function({title:t="NestJS",color:n="currentColor",size:i=24,...r},o){return n==="default"&&(n=IC),(0,x.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:i,height:i,fill:n,viewBox:"0 0 24 24",ref:o,...r,children:[(0,x.jsx)("title",{children:t}),(0,x.jsx)("path",{d:"M14.131.047c-.173 0-.334.037-.483.087.316.21.49.49.576.806.007.043.019.074.025.117a.681.681 0 0 1 .013.112c.024.545-.143.614-.26.936-.18.415-.13.861.086 1.22a.74.74 0 0 0 .074.137c-.235-1.568 1.073-1.803 1.314-2.293.019-.428-.334-.713-.613-.911a1.37 1.37 0 0 0-.732-.21zM16.102.4c-.024.143-.006.106-.012.18-.006.05-.006.112-.012.161-.013.05-.025.1-.044.149-.012.05-.03.1-.05.149l-.067.142c-.02.025-.031.05-.05.075l-.037.055a2.152 2.152 0 0 1-.093.124c-.037.038-.068.081-.112.112v.006c-.037.031-.074.068-.118.1-.13.099-.278.173-.415.266-.043.03-.087.056-.124.093a.906.906 0 0 0-.118.099c-.043.037-.074.074-.111.118-.031.037-.068.08-.093.124a1.582 1.582 0 0 0-.087.13c-.025.05-.043.093-.068.142-.019.05-.037.093-.05.143a2.007 2.007 0 0 0-.043.155c-.006.025-.006.056-.012.08-.007.025-.007.05-.013.075 0 .05-.006.105-.006.155 0 .037 0 .074.006.111 0 .05.006.1.019.155.006.05.018.1.03.15.02.049.032.098.05.148.013.03.031.062.044.087l-1.426-.552c-.241-.068-.477-.13-.719-.186l-.39-.093c-.372-.074-.75-.13-1.128-.167-.013 0-.019-.006-.031-.006A11.082 11.082 0 0 0 8.9 2.855c-.378.025-.756.074-1.134.136a12.45 12.45 0 0 0-.837.174l-.279.074c-.092.037-.18.08-.266.118l-.205.093c-.012.006-.024.006-.03.012-.063.031-.118.056-.174.087a2.738 2.738 0 0 0-.236.118c-.043.018-.086.043-.124.062a.559.559 0 0 1-.055.03c-.056.032-.112.063-.162.094a1.56 1.56 0 0 0-.148.093c-.044.03-.087.055-.124.086-.006.007-.013.007-.019.013-.037.025-.08.056-.118.087l-.012.012-.093.074c-.012.007-.025.019-.037.025-.031.025-.062.056-.093.08-.006.013-.019.02-.025.025-.037.038-.074.069-.111.106-.007 0-.007.006-.013.012a1.742 1.742 0 0 0-.111.106c-.007.006-.007.012-.013.012a1.454 1.454 0 0 0-.093.1c-.012.012-.03.024-.043.036a1.374 1.374 0 0 1-.106.112c-.006.012-.018.019-.024.03-.05.05-.093.1-.143.15l-.018.018c-.1.106-.205.211-.317.304-.111.1-.229.192-.347.273a3.777 3.777 0 0 1-.762.421c-.13.056-.267.106-.403.149-.26.056-.527.161-.756.18-.05 0-.105.012-.155.018l-.155.037-.149.056c-.05.019-.099.044-.148.068-.044.031-.093.056-.137.087a1.011 1.011 0 0 0-.124.106c-.043.03-.087.074-.124.111-.037.043-.074.08-.105.124-.031.05-.068.093-.093.143a1.092 1.092 0 0 0-.087.142c-.025.056-.05.106-.068.161-.019.05-.037.106-.056.161-.012.05-.025.1-.03.15 0 .005-.007.012-.007.018-.012.056-.012.13-.019.167C.006 7.95 0 7.986 0 8.03a.657.657 0 0 0 .074.31v.006c.019.037.044.075.069.112.024.037.05.074.08.111.031.031.068.069.106.1a.906.906 0 0 0 .117.099c.149.13.186.173.378.272.031.019.062.031.1.05.006 0 .012.006.018.006 0 .013 0 .019.006.031a1.272 1.272 0 0 0 .08.298c.02.037.032.074.05.111.007.013.013.025.02.031.024.05.049.093.073.137l.093.13c.031.037.069.08.106.118.037.037.074.068.118.105 0 0 .006.006.012.006.037.031.074.062.112.087a.986.986 0 0 0 .136.08c.043.025.093.05.142.069a.73.73 0 0 0 .124.043c.007.006.013.006.025.012.025.007.056.013.08.019-.018.335-.024.65.026.762.055.124.328-.254.6-.688-.036.428-.061.93 0 1.079.069.155.44-.329.763-.862 4.395-1.016 8.405 2.02 8.826 6.31-.08-.67-.905-1.041-1.283-.948-.186.458-.502 1.047-1.01 1.413.043-.41.025-.83-.062-1.24a4.009 4.009 0 0 1-.769 1.562c-.588.043-1.177-.242-1.487-.67-.025-.018-.031-.055-.05-.08-.018-.043-.037-.087-.05-.13a.515.515 0 0 1-.037-.13c-.006-.044-.006-.087-.006-.137v-.093a.992.992 
41840 0 1 .031-.13c.013-.043.025-.086.044-.13.024-.043.043-.087.074-.13.105-.298.105-.54-.087-.682a.706.706 0 0 0-.118-.062c-.024-.006-.055-.018-.08-.025l-.05-.018a.847.847 0 0 0-.13-.031.472.472 0 0 0-.13-.019 1.01 1.01 0 0 0-.136-.012c-.031 0-.062.006-.093.006a.484.484 0 0 0-.137.019c-.043.006-.086.012-.13.024a1.068 1.068 0 0 0-.13.044c-.043.018-.08.037-.124.056-.037.018-.074.043-.118.062-1.444.942-.582 3.148.403 3.787-.372.068-.75.148-.855.229l-.013.012c.267.161.546.298.837.416.397.13.818.247 1.004.297v.006a5.996 5.996 0 0 0 1.562.112c2.746-.192 4.996-2.281 5.405-5.033l.037.161c.019.112.043.23.056.347v.006c.012.056.018.112.025.162v.024c.006.056.012.112.012.162.006.068.012.136.012.204v.1c0 .03.007.067.007.098 0 .038-.007.075-.007.112v.087c0 .043-.006.08-.006.124 0 .025 0 .05-.006.08 0 .044-.006.087-.006.137-.006.018-.006.037-.006.055l-.02.143c0 .019 0 .037-.005.056-.007.062-.019.118-.025.18v.012l-.037.174v.018l-.037.167c0 .007-.007.02-.007.025a1.663 1.663 0 0 1-.043.168v.018c-.019.062-.037.118-.05.174-.006.006-.006.012-.006.012l-.056.186c-.024.062-.043.118-.068.18-.025.062-.043.124-.068.18-.025.062-.05.117-.074.18h-.007c-.024.055-.05.117-.08.173a.302.302 0 0 1-.019.043c-.006.006-.006.013-.012.019a5.867 5.867 0 0 1-1.742 2.082c-.05.031-.099.069-.149.106-.012.012-.03.018-.043.03a2.603 2.603 0 0 1-.136.094l.018.037h.007l.26-.037h.006c.161-.025.322-.056.483-.087.044-.006.093-.019.137-.031l.087-.019c.043-.006.086-.018.13-.024.037-.013.074-.02.111-.031.62-.15 1.221-.354 1.798-.595a9.926 9.926 0 0 1-3.85 3.142c.714-.05 1.426-.167 2.114-.366a9.903 9.903 0 0 0 5.857-4.68 9.893 9.893 0 0 1-1.667 3.986 9.758 9.758 0 0 0 1.655-1.376 9.824 9.824 0 0 0 2.61-5.268c.21.98.272 1.99.18 2.987 4.474-6.241.371-12.712-1.346-14.416-.006-.013-.012-.019-.012-.031-.006.006-.006.006-.006.012 0-.006 0-.006-.007-.012 0 .074-.006.148-.012.223a8.34 8.34 0 0 1-.062.415c-.03.136-.068.273-.105.41-.044.13-.093.266-.15.396a5.322 5.322 0 0 1-.185.378 4.735 4.735 0 0 1-.477.688c-.093.111-.192.21-.292.31a3.994 3.994 0 0 1-.18.155l-.142.124a3.459 3.459 0 0 1-.347.241 4.295 4.295 0 0 1-.366.211c-.13.062-.26.118-.39.174a4.364 4.364 0 0 1-.818.223c-.143.025-.285.037-.422.05a4.914 4.914 0 0 1-.297.012 4.66 4.66 0 0 1-.422-.025 3.137 3.137 0 0 1-.421-.062 3.136 3.136 0 0 1-.415-.105h-.007c.137-.013.273-.025.41-.05a4.493 4.493 0 0 0 .818-.223c.136-.05.266-.112.39-.174.13-.062.248-.13.372-.204.118-.08.235-.161.347-.248.112-.087.217-.18.316-.279.105-.093.198-.198.291-.304.093-.111.18-.223.26-.334.013-.019.026-.044.038-.062.062-.1.124-.199.18-.298a4.272 4.272 0 0 0 .334-.775c.044-.13.075-.266.106-.403.025-.142.05-.278.062-.415.012-.142.025-.285.025-.421 0-.1-.007-.199-.013-.298a6.726 6.726 0 0 0-.05-.415 4.493 4.493 0 0 0-.092-.415c-.044-.13-.087-.267-.137-.397-.05-.13-.111-.26-.173-.384-.069-.124-.137-.248-.211-.366a6.843 6.843 0 0 0-.248-.34c-.093-.106-.186-.212-.285-.317a3.878 3.878 0 0 0-.161-.155c-.28-.217-.57-.421-.862-.607a1.154 1.154 0 0 0-.124-.062 2.415 2.415 0 0 0-.589-.26Z"})]})}),NC="#00C7B7",LC=de.forwardRef(function({title:t="Netlify",color:n="currentColor",size:i=24,...r},o){return n==="default"&&(n=NC),(0,x.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:i,height:i,fill:n,viewBox:"0 0 24 24",ref:o,...r,children:[(0,x.jsx)("title",{children:t}),(0,x.jsx)("path",{d:"M6.49 19.04h-.23L5.13 17.9v-.23l1.73-1.71h1.2l.15.15v1.2L6.5 19.04ZM5.13 6.31V6.1l1.13-1.13h.23L8.2 6.68v1.2l-.15.15h-1.2L5.13 6.31Zm9.96 9.09h-1.65l-.14-.13v-3.83c0-.68-.27-1.2-1.1-1.23-.42 0-.9 0-1.43.02l-.07.08v4.96l-.14.14H8.9l-.13-.14V8.73l.13-.14h3.7a2.6 2.6 0 0 1 2.61 2.6v4.08l-.13.14Zm-8.37-2.44H.14L0 12.82v-1.64l.14-.14h6.58l.14.14v1.64l-.14.14Zm17.14 0h-6.58l-.14-.14v-1.64l.14-.14h6.58l.14.14v1.64l-.14.14ZM11.05 6.55V1.64l.14-.14h1.65l.14.14v4.9l-.14.14h-1.65l-.14-.13Zm0 15.81v-4.9l.14-.14h1.65l.14.13v4.91l-.14.14h-1.65l-.14-.14Z"})]})}),DC="#000000",UC=de.forwardRef(function({title:t="Next.js",color:n="currentColor",size:i=24,...r},o){return n==="default"&&(n=DC),(0,x.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:i,height:i,fill:n,viewBox:"0 0 24 24",ref:o,...r,children:[(0,x.jsx)("title",{children:t}),(0,x.jsx)("path",{d:"M18.665 21.978C16.758 23.255 14.465 24 12 24 5.377 24 0 18.623 0 12S5.377 0 12 0s12 5.377 12 12c0 3.583-1.574 6.801-4.067 9.001L9.219 7.2H7.2v9.596h1.615V9.251l9.85 12.727Zm-3.332-8.533 1.6 2.061V7.2h-1.6v6.245Z"})]})}),OC="#5FA04E",FC=de.forwardRef(function({title:t="Node.js",color:n="currentColor",size:i=24,...r},o){return n==="default"&&(n=OC),(0,x.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:i,height:i,fill:n,viewBox:"0 0 24 24",ref:o,...r,children:[(0,x.jsx)("title",{children:t}),(0,x.jsx)("path",{d:"M11.998,24c-0.321,0-0.641-0.084-0.922-0.247l-2.936-1.737c-0.438-0.245-0.224-0.332-0.08-0.383 c0.585-0.203,0.703-0.25,1.328-0.604c0.065-0.037,0.151-0.023,0.218,0.017l2.256,1.339c0.082,0.045,0.197,
41840.045,0.272,0l8.795-5.076 c0.082-0.047,0.134-0.141,0.134-0.238V6.921c0-0.099-0.053-0.192-0.137-0.242l-8.791-5.072c-0.081-0.047-0.189-0.047-0.271,0 L3.075,6.68C2.99,6.729,2.936,6.825,2.936,6.921v10.15c0,0.097,0.054,0.189,0.139,0.235l2.409,1.392 c1.307,0.654,2.108-0.116,2.108-0.89V7.787c0-0.142,0.114-0.253,0.256-0.253h1.115c0.139,0,0.255,0.112,0.255,0.253v10.021 c0,1.745-0.95,2.745-2.604,2.745c-0.508,0-0.909,0-2.026-0.551L2.28,18.675c-0.57-0.329-0.922-0.945-0.922-1.604V6.921 c0-0.659,0.353-1.275,0.922-1.603l8.795-5.082c0.557-0.315,1.296-0.315,1.848,0l8.794,5.082c0.57,0.329,0.924,0.944,0.924,1.603 v10.15c0,0.659-0.354,1.273-0.924,1.604l-8.794,5.078C12.643,23.916,12.324,24,11.998,24z M19.099,13.993 c0-1.9-1.284-2.406-3.987-2.763c-2.731-0.361-3.009-0.548-3.009-1.187c0-0.528,0.235-1.233,2.258-1.233 c1.807,0,2.473,0.389,2.747,1.607c0.024,0.115,0.129,0.199,0.247,0.199h1.141c0.071,0,0.138-0.031,0.186-0.081 c0.048-0.054,0.074-0.123,0.067-0.196c-0.177-2.098-1.571-3.076-4.388-3.076c-2.508,0-4.004,1.058-4.004,2.833 c0,1.925,1.488,2.457,3.895,2.695c2.88,0.282,3.103,0.703,3.103,1.269c0,0.983-0.789,1.402-2.642,1.402 c-2.327,0-2.839-0.584-3.011-1.742c-0.02-0.124-0.126-0.215-0.253-0.215h-1.137c-0.141,0-0.254,0.112-0.254,0.253 c0,1.482,0.806,3.248,4.655,3.248C17.501,17.007,19.099,15.91,19.099,13.993z"})]})}),kC="#61DAFB",BC=de.forwardRef(function({title:t="React",color:n="currentColor",size:i=24,...r},o){return n==="default"&&(n=kC),(0,x.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:i,height:i,fill:n,viewBox:"0 0 24 24",ref:o,...r,children:[(0,x.jsx)("title",{children:t}),(0,x.jsx)("path",{d:"M14.23 12.004a2.236 2.236 0 0 1-2.235 2.236 2.236 2.236 0 0 1-2.236-2.236 2.236 2.236 0 0 1 2.235-2.236 2.236 2.236 0 0 1 2.236 2.236zm2.648-10.69c-1.346 0-3.107.96-4.888 2.622-1.78-1.653-3.542-2.602-4.887-2.602-.41 0-.783.093-1.106.278-1.375.793-1.683 3.264-.973 6.365C1.98 8.917 0 10.42 0 12.004c0 1.59 1.99 3.097 5.043 4.03-.704 3.113-.39 5.588.988 6.38.32.187.69.275 1.102.275 1.345 0 3.107-.96 4.888-2.624 1.78 1.654 3.542 2.603 4.887 2.603.41 0 .783-.09 1.106-.275 1.374-.792 1.683-3.263.973-6.365C22.02 15.096 24 13.59 24 12.004c0-1.59-1.99-3.097-5.043-4.032.704-3.11.39-5.587-.988-6.38-.318-.184-.688-.277-1.092-.278zm-.005 1.09v.006c.225 0 .406.044.558.127.666.382.955 1.835.73 3.704-.054.46-.142.945-.25 1.44-.96-.236-2.006-.417-3.107-.534-.66-.905-1.345-1.727-2.035-2.447 1.592-1.48 3.087-2.292 4.105-2.295zm-9.77.02c1.012 0 2.514.808 4.11 2.28-.686.72-1.37 1.537-2.02 2.442-1.107.117-2.154.298-3.113.538-.112-.49-.195-.964-.254-1.42-.23-1.868.054-3.32.714-3.707.19-.09.4-.127.563-.132zm4.882 3.05c.455.468.91.992 1.36 1.564-.44-.02-.89-.034-1.345-.034-.46 0-.915.01-1.36.034.44-.572.895-1.096 1.345-1.565zM12 8.1c.74 0 1.477.034 2.202.093.406.582.802 1.203 1.183 1.86.372.64.71 1.29 1.018 1.946-.308.655-.646 1.31-1.013 1.95-.38.66-.773 1.288-1.18 1.87-.728.063-1.466.098-2.21.098-.74 0-1.477-.035-2.202-.093-.406-.582-.802-1.204-1.183-1.86-.372-.64-.71-1.29-1.018-1.946.303-.657.646-1.313 1.013-1.954.38-.66.773-1.286 1.18-1.868.728-.064 1.466-.098 2.21-.098zm-3.635.254c-.24.377-.48.763-.704 1.16-.225.39-.435.782-.635 1.174-.265-.656-.49-1.31-.676-1.947.64-.15 1.315-.283 2.015-.386zm7.26 0c.695.103 1.365.23 2.006.387-.18.632-.405 1.282-.66 1.933-.2-.39-.41-.783-.64-1.174-.225-.392-.465-.774-.705-1.146zm3.063.675c.484.15.944.317 1.375.498 1.732.74 2.852 1.708 2.852 2.476-.005.768-1.125 1.74-2.857 2.475-.42.18-.88.342-1.355.493-.28-.958-.646-1.956-1.1-2.98.45-1.017.81-2.01 1.085-2.964zm-13.395.004c.278.96.645 1.957 1.1 2.98-.45 1.017-.812 2.01-1.086 2.964-.484-.15-.944-.318-1.37-.5-1.732-.737-2.852-1.706-2.852-2.474 0-.768 1.12-1.742 2.852-2.476.42-.18.88-.342 1.356-.494zm11.678 4.28c.265.657.49 1.312.676 1.948-.64.157-1.316.29-2.016.39.24-.375.48-.762.705-1.158.225-.39.435-.788.636-1.18zm-9.945.02c.2.392.41.783.64 1.175.23.39.465.772.705 1.143-.695-.102-1.365-.23-2.006-.386.18-.63.406-1.282.66-1.933zM17.92 16.32c.112.493.2.968.254 1.423.23 1.868-.054 3.32-.714 3.708-.147.09-.338.128-.563.128-1.012 0-2.514-.807-4.11-2.28.686-.72 1.37-1.536 2.02-2.44 1.107-.118 2.154-.3 3.113-.54zm-11.83.01c.96.234 2.006.415 3.107.532.66.905 1.345 1.727 2.035 2.446-1.595 1.483-3.092 2.295-4.11 2.295-.22-.005-.406-.05-.553-.132-.666-.38-.955-1.834-.73-3.703.054-.46.142-.944.25-1.438zm4.56.64c.44.02.89.034 1.345.034.46 0 .915-.01 1.36-.034-.44.572-.895 1.095-1.345 1.565-.455-.47-.91-.993-1.36-1.565z"})]})}),zC="#000000",VC=de.forwardRef(function({title:t="Remix",color:n="currentColor",size:i=24,...r},o){return n==="default"&&(n=zC),(0,x.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:i,height:i,fill:n,viewBox:"0 0 24 24",ref:o,...r,children:[(0,x.jsx)("title",{children:t}),(0,x.jsx)("path",{d:"M21.511 18.508c.216 2.773.216 4.073.216 5.492H15.31c0-.309.006-.592.011-.878.018-.892.036-1.821-.109-3.698-.19-2.747-1.374-3.358-3.55-3.358H1.574v-5h10.396c2.748 0 4.122-.835 4.122-3.049 0-1.946-1.374-3.125-4.122-3.125H1.573V0h11.54
41841c6.221 0 9.313 2.938 9.313 7.632 0 3.511-2.176 5.8-5.114 6.182 2.48.497 3.93 1.909 4.198 4.694ZM1.573 24v-3.727h6.784c1.133 0 1.379.84 1.379 1.342V24Z"})]})}),GC="#3178C6",HC=de.forwardRef(function({title:t="TypeScript",color:n="currentColor",size:i=24,...r},o){return n==="default"&&(n=GC),(0,x.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:i,height:i,fill:n,viewBox:"0 0 24 24",ref:o,...r,children:[(0,x.jsx)("title",{children:t}),(0,x.jsx)("path",{d:"M1.125 0C.502 0 0 .502 0 1.125v21.75C0 23.498.502 24 1.125 24h21.75c.623 0 1.125-.502 1.125-1.125V1.125C24 .502 23.498 0 22.875 0zm17.363 9.75c.612 0 1.154.037 1.627.111a6.38 6.38 0 0 1 1.306.34v2.458a3.95 3.95 0 0 0-.643-.361 5.093 5.093 0 0 0-.717-.26 5.453 5.453 0 0 0-1.426-.2c-.3 0-.573.028-.819.086a2.1 2.1 0 0 0-.623.242c-.17.104-.3.229-.393.374a.888.888 0 0 0-.14.49c0 .196.053.373.156.529.104.156.252.304.443.444s.423.276.696.41c.273.135.582.274.926.416.47.197.892.407 1.266.628.374.222.695.473.963.753.268.279.472.598.614.957.142.359.214.776.214 1.253 0 .657-.125 1.21-.373 1.656a3.033 3.033 0 0 1-1.012 1.085 4.38 4.38 0 0 1-1.487.596c-.566.12-1.163.18-1.79.18a9.916 9.916 0 0 1-1.84-.164 5.544 5.544 0 0 1-1.512-.493v-2.63a5.033 5.033 0 0 0 3.237 1.2c.333 0 .624-.03.872-.09.249-.06.456-.144.623-.25.166-.108.29-.234.373-.38a1.023 1.023 0 0 0-.074-1.089 2.12 2.12 0 0 0-.537-.5 5.597 5.597 0 0 0-.807-.444 27.72 27.72 0 0 0-1.007-.436c-.918-.383-1.602-.852-2.053-1.405-.45-.553-.676-1.222-.676-2.005 0-.614.123-1.141.369-1.582.246-.441.58-.804 1.004-1.089a4.494 4.494 0 0 1 1.47-.629 7.536 7.536 0 0 1 1.77-.201zm-15.113.188h9.563v2.166H9.506v9.646H6.789v-9.646H3.375z"})]})}),WC="#000000",jC=de.forwardRef(function({title:t="Vercel",color:n="currentColor",size:i=24,...r},o){return n==="default"&&(n=WC),(0,x.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:i,height:i,fill:n,viewBox:"0 0 24 24",ref:o,...r,children:[(0,x.jsx)("title",{children:t}),(0,x.jsx)("path",{d:"m12 1.608 12 20.784H0Z"})]})}),XC="#9135FF",qC=de.forwardRef(function({title:t="Vite",color:n="currentColor",size:i=24,...r},o){return n==="default"&&(n=XC),(0,x.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:i,height:i,fill:n,viewBox:"0 0 24 24",ref:o,...r,children:[(0,x.jsx)("title",{children:t}),(0,x.jsx)("path",{d:"M13.056 23.238a.57.57 0 0 1-1.02-.355v-5.202c0-.63-.512-1.143-1.144-1.143H5.148a.57.57 0 0 1-.464-.903l3.777-5.29c.54-.753 0-1.804-.93-1.804H.57a.574.574 0 0 1-.543-.746.6.6 0 0 1 .08-.157L5.008.78a.57.57 0 0 1 .467-.24h14.589a.57.57 0 0 1 .466.903l-3.778 5.29c-.54.755 0 1.806.93 1.806h5.745c.238 0 .424.138.513.322a.56.56 0 0 1-.063.603z"})]})}),YC=e=>(0,x.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",height:24,width:24,...e,children:[(0,x.jsxs)("g",{clipPath:"url(#clip0_814_42624)",children:[(0,x.jsx)("path",{fill:"currentColor",d:"M16.3462 3.5956C16.4605 3.5956 16.5531 3.50297 16.5531 3.38871C16.5531 3.27444 16.4605 3.18181 16.3462 3.18181H15.0359C14.9216 3.18181 14.829 3.27444 14.829 3.38871C14.829 3.50297 14.9216 3.5956 15.0359 3.5956H16.3462Z"}),(0,x.jsx)("path",{fill:"currentColor",d:"M21.6552 8.55172C21.6552 8.43746 21.5625 8.34483 21.4483 8.34483C21.334 8.34483 21.2414 8.43746 21.2414 8.55172V9.86207C21.2414 9.97634 21.334 10.069 21.4483 10.069C21.5625 10.069 21.6552 9.97634 21.6552 9.86207V8.55172Z"}),(0,x.jsx)("path",{fill:"currentColor",d:"M19.9905 7.97325C20.0992 8.00856 20.1587 8.12528 20.1234 8.23395L19.7184 9.48017C19.6831 9.58884 19.5664 9.64831 19.4577 9.613C19.3491 9.57769 19.2896 9.46097 19.3249 9.3523L19.7298 8.10608C19.7651 7.99741 19.8819 7.93794 19.9905 7.97325Z"}),(0,x.jsx)("path",{fill:"currentColor",d:"M18.9027 7.73418C18.9698 7.64174 18.9493 7.51235 18.8569 7.44519C18.7645 7.37803 18.6351 7.39852 18.5679 7.49096L17.7977 8.55105C17.7305 8.6435 17.751 8.77288 17.8435 8.84005C17.9359 8.90721 18.0653 8.88672 18.1325 8.79427L18.9027 7.73418Z"}),(0,x.jsx)("path",{fill:"currentColor",d:"M17.8563 6.56753C17.9371 6.64833 17.9371 6.77933 17.8563 6.86013L16.9298 7.78668C16.849 7.86748 16.718 7.86748 16.6372 7.78668C16.5564 7.70588 16.5564 7.57488 16.6372 7.49409L17.5637 6.56753C17.6445 6.48673 17.7755 6.48673 17.8563 6.56753Z"}),(0,x.jsx)("path",{fill:"currentColor",d:"M16.9012 5.80672C16.9991 5.74787 17.0308 5.62076 16.972 5.52281C16.9131 5.42487 16.786 5.39318 16.6881 5.45203L15.5649 6.1269C15.4669 6.18576 15.4353 6.31286 15.4941 6.41081C15.553 6.50875 15.6801 6.54045 15.778 6.48159L16.9012 5.80672Z"}),(0,x.jsx)("path",{fill:"currentColor",d:"M16.663 4.51945C16.6925 4.62982 16.627 4.74327 16.5167 4.77285L15.251 5.11199C15.1406 5.14156 15.0271 5.07606 14.9976 4.96569C14.968 4.85532 15.0335 4.74187 15.1439 4.7123L16.4096 4.37315C16.5199 4.34358 16.6334 4.40908 16.663 4.51945Z"}),(0,x.jsx)("path",{fill:"currentColor",d:"M24 12C24 18.6274 18.6274 24 12 24C5.37258 24 0 18.6274 0 12C0 5.37258 5.37258 0 12 0C18.6274 0 24 5.37258 24 12ZM19.0924 20.2727C17.1863 21.9083 14.7086 22.8966 12 22.8966C9.34847 22.8966 6.91813 21.9495 5.02881 20.3752C5.5029 19.6631 6.2557 18.7783 7.25557 18.0126C8.52583 17.0399 10.1725 16.2759 12.1379 16.2759C15.7777 16.2759 18.1676 18.7525 19.0924 20.2727ZM20.4925 18.8279C20.6735 18.603 20.8458 18.3709 21.0088 18.1319C20.0268 18.0838 19.3324 18.2575 18.9119 18.4365C19.0805 18.6237 19.2353 18.8097 19.376 18.9912C19.4495 18.9543 19.5268 18.9247 19.6045 18.9021C19.8362 18.8345 20.1283 18.806 20.4925 18.8279ZM21.573 17.2094C21.6579 17.0537 21.7391 16.8956 21.8166 16.7354C20.0669 16.5134 18.5827 16.8868 17.6714 17.2721C17.8544 17.4169 
418418.0285 17.5652 18.1937 17.7152C18.8335 17.3493 19.9744 17.0324 21.573 17.2094ZM22.2096 15.8161C19.8002 15.438 17.7868 16.0865 16.765 16.6356C16.7053 16.5987 16.6448 16.5622 16.5837 16.5263L16.7492 15.2951L16.8199 15.305C17.1216 15.3473 17.4006 15.1371 17.4429 14.8353C17.4853 14.5336 17.275 14.2546 16.9732 14.2123L13.2156 13.6849L11.0674 11.6668C10.8453 11.4582 10.4962 11.4691 10.2875 11.6912C10.0789 11.9133 10.0898 12.2625 10.3119 12.4711L10.8298 12.9576L10.3529 15.5009C10.2829 15.516 10.2133 15.532 10.1442 15.5488L8.52414 9.23616C8.88282 9.50195 9.27811 9.74192 9.6735 9.95356C10.6245 10.4626 11.6283 10.8348 12.2668 11.0232L12.5956 11.1202L12.62 10.7783C12.6379 10.5279 12.5707 10.2473 12.4722 9.97637C12.3717 9.70025 12.2289 9.40862 12.0718 9.1275C11.891 8.80392 11.6869 8.48671 11.4967 8.2127L13.4483 8.44925V8.13793C13.4483 7.50897 13.0215 6.85524 12.5381 6.38071C12.2898 6.13703 12.0113 5.92505 11.7345 5.77242C11.4624 5.62242 11.1691 5.51724 10.8965 5.51724H9.78257L10.2653 4.27586H9.86206C9.02737 4.27586 8.38089 4.65139 7.9202 5.1052C7.59085 5.42963 7.34999 5.7997 7.19358 6.119C7.05369 6.02356 6.8886 5.92272 6.70948 5.83167C6.38233 5.66537 5.98035 5.51724 5.58621 5.51724C4.85138 5.51724 4.12804 5.8674 3.85189 6.04313L3.6252 6.18738L3.76345 6.41779C3.82457 6.51966 3.91762 6.6194 4.01124 6.70744C4.10819 6.7986 4.22077 6.891 4.33409 6.97771C4.3731 7.00756 4.41259 7.03703 4.45201 7.06585C3.78353 7.37912 3.37285 8.06465 3.1288 8.77405C2.8122 9.69437 2.73506 10.7579 2.75878 11.4576L2.77884 12.0495L4.76901 10.2583C4.77412 10.6478 4.8261 11.073 4.89537 11.476C5.01444 12.1687 5.19348 12.8429 5.32304 13.2551L5.43838 13.6221L5.74898 13.3951C6.54203 12.8156 7.04637 11.7467 7.36229 10.7041C7.54495 10.1013 7.67038 9.48761 7.75095 8.94445C7.88127 9.67377 7.96163 10.3969 8.0043 11.0947C8.11245 12.8628 7.9786 14.4677 7.80255 15.5952C7.73974 15.9975 7.67155 16.339 7.60707 16.6055C7.58316 16.6199 7.55934 16.6344 7.53563 16.649C6.48588 16.0776 4.35072 15.3879 1.80707 15.8605C1.35235 14.6605 1.10345 13.3593 1.10345 12C1.10345 5.982 5.982 1.10345 12 1.10345C13.9265 1.10345 15.7362 1.60338 17.3064 2.48057C17.2176 2.9736 17.175 3.61057 17.2687 4.26183C17.3909 5.11142 17.7546 6.03929 18.6117 6.66565C19.8452 7.56701 21.1375 7.70218 21.9766 7.61119C22.5681 8.95388 22.8966 10.4386 22.8966 12C22.8966 13.3426 22.6537 14.6284 22.2096 15.8161ZM21.5063 6.67015C20.6938 5.22399 19.5608 3.98203 18.2036 3.04053C18.1722 3.37012 18.17 3.74607 18.2244 4.12439C18.324 4.81733 18.604 5.46417 19.1814 5.8861C20.0213 6.49985 20.8826 6.66752 21.5063 6.67015ZM2.20132 16.7723C2.27875 16.931 2.35993 17.0875 2.44473 17.2418C4.18693 16.9978 5.41968 17.3329 6.09133 17.7205C6.26102 17.5711 6.43861 17.4239 6.62392 17.2804C5.67024 16.8734 4.07541 16.475 2.20132 16.7723ZM3.00337 18.1496C3.16824 18.3904 3.34253 18.6242 3.5257 18.8505C4.01278 18.7952 4.38739 18.8193 4.67133 18.9021C4.73878 18.9217 4.80593 18.9466 4.87051 18.977C5.01983 18.7972 5.18103 18.6148 5.35385 18.4322C4.89527 18.2391 4.11752 18.0542 3.00337 18.1496ZM7.57113 6.64165C7.67399 6.34336 7.91841 5.88141 8.30738 5.49825C8.60628 5.20381 8.98293 4.96257 9.44261 4.8692L9.0598 5.85357L7.47406 6.92317L7.57113 6.64165ZM9.33579 6.16654C9.37246 6.14181 9.39868 6.10738 9.41334 6.06897H10.8965C11.0378 6.06897 11.2359 6.12758 11.4681 6.25559C11.6956 6.38099 11.9343 6.56124 12.1516 6.77446C12.4888 7.10545 12.7408 7.48153 12.8445 7.82031L10.6587 7.55536C10.6526 7.49517 10.6204 7.43815 10.5657 7.40258C10.0428 7.06213 9.54661 6.88024 9.10757 6.79913C9.30807 6.77763 9.50968 6.77044 9.70817 6.77448C10.4068 6.78872 11.0441 6.94194 11.4109 7.0761C11.5182 7.11535 11.637 7.06018 11.6763 6.95286C11.7155 6.84555 11.6604 6.72674 11.553 6.68749C11.1468 6.53891 10.4645 6.37601 9.7166 6.36077C9.48281 6.35601 9.24038 6.36564 8.99651 6.39539L9.33579 6.16654ZM7.60189 7.33124L7.82606 7.72579C7.88575 7.83084 7.95738 7.93474 8.03948 8.0372L8.28685 8.31155C8.70968 8.73372 9.29623 9.12582 9.93387 9.46713C10.6642 9.85805 11.4298 10.1659 12.0182 10.3653C12.001 10.3029 11.9795 10.2361 11.9537 10.165C11.8668 9.92619 11.7389 9.66264 11.5902 9.39664C11.2929 8.86464 10.9256 8.3456 10.6796 8.0325L10.4819 7.78081C10.434 7.78761 10.3836 7.77778 10.3399 7.74934C9.56149 7.2425 8.87091 7.13355 8.38488 7.16413C8.3984 7.17119 8.41191 7.17835 8.42542 7.18558C8.70447 7.33505 9.01482 7.53827 9.32385 7.75983C9.94241 8.20332 10.572 8.73205 10.9636 9.08423C11.0486 9.16063 11.0555 9.29145 10.9791 9.37641C10.9027 9.46138 10.7719 9.46832 10.6869 9.39191C10.3033 9.04693 9.68576 8.52846 9.08274 8.09612C8.78097 7.87977 8.48689 7.68792 8.23004 7.55034C7.964 7.40784 7.76869 7.34086 7.65418 7.33888C7.63616 7.33856 7.61863 7.33593 7.60189 7.33124ZM12.8494 14.7477L16.3394 15.2376L16.1952 16.3103C15.2159 15.7966 14.0724 15.425 12.7708 15.3326L12.8494 14.7477ZM11.1877 13.2938L12.4659 14.4946L12.356 15.313C12.2837 15.3112 12.2111 15.3103 12.1379 15.3103C11.
41846715 15.3103 11.2218 15.3484 10.7894 15.4184L11.1877 13.2938ZM7.35702 6.95259L7.35279 7.03448H5.40567L5.24803 6.93747C5.10493 6.84941 4.87839 6.69948 4.66936 6.53954C4.58673 6.47631 4.50885 6.41305 4.44093 6.35273C4.73917 6.21528 5.17015 6.06897 5.58621 6.06897C5.85413 6.06897 6.16479 6.17371 6.45948 6.3235C6.75014 6.47125 6.99795 6.64876 7.13215 6.76231L7.35702 6.95259ZM5.37931 7.44828C5.35012 7.44828 5.32234 7.44223 5.29716 7.43133L5.1292 7.44707C4.41424 7.5141 3.94259 8.10453 3.65052 8.95353C3.4427 9.55763 3.346 10.2422 3.31663 10.8232L5.03716 9.27473C5.03104 9.23748 5.03504 9.19811 5.05084 9.16077C5.29396 8.58612 5.60366 8.15783 5.92229 7.84507C5.74403 7.93938 5.57285 8.04616 5.41054 8.16051C4.83928 8.56301 4.39665 9.04639 4.16757 9.36273C4.10055 9.45527 3.9712 9.47597 3.87865 9.40895C3.7861 9.34194 3.76541 9.21258 3.83242 9.12003C4.08611 8.7697 4.56072 8.25309 5.17221 7.82225C5.36337 7.68756 5.56974 7.55999 5.78856 7.44828H5.37931ZM5.46911 9.2366L5.37198 9.64939C5.27554 10.0593 5.32281 10.7059 5.43912 11.3826C5.51951 11.8503 5.62882 12.3106 5.7295 12.6791C6.21447 12.1714 6.57747 11.3916 6.83427 10.5441C7.13884 9.53902 7.27719 8.49603 7.31072 7.84782L7.32459 7.57972C7.24968 7.66777 7.16337 7.79995 7.06983 7.97718C6.93383 8.23487 6.7973 8.55836 6.66811 8.90648C6.40994 9.60211 6.18792 10.3772 6.06279 10.8778C6.03508 10.9886 5.92275 11.056 5.81189 11.0283C5.70104 11.0006 5.63364 10.8883 5.66135 10.7774C5.78909 10.2664 6.01535 9.47607 6.28017 8.7625C6.41247 8.40602 6.55612 8.064 6.70388 7.78404C6.71104 7.77048 6.71824 7.75699 6.72549 7.74358C6.31965 7.9817 5.82833 8.43458 5.46911 9.2366Z",clipRule:"evenodd",fillRule:"evenodd"})]}),(0,x.jsx)("defs",{children:(0,x.jsx)("clipPath",{id:"clip0_814_42624",children:(0,x.jsx)("rect",{fill:"white",height:24,width:24})})})]}),s_=[{icon:BC,label:"React"},{icon:qC,label:"Vite"},{icon:YC,label:"TanStack"},{icon:xC,label:"Astro"},{icon:VC,label:"Remix"},{icon:UC,label:"Next.js"},{icon:bC,label:"Bun"},{icon:CC,label:"Express"},{icon:HC,label:"TypeScript"},{icon:PC,label:"NestJS"},{icon:FC,label:"Node.js"}],$C=[{icon:jC,label:"Vercel"},{icon:LC,label:"Netlify"},{icon:MC,label:"Cloudflare"},{icon:EC,label:"Deno Deploy"},{icon:RC,label:"Google Cloud"}],a_=e=>{const t=(0,$t.c)(17),{icon:n,index:i,label:r}=e,[o,l]=(0,de.useState)(!1);let u;t[0]===Symbol.for("react.memo_cache_sentinel")?(u={opacity:1,y:0},t[0]=u):u=t[0];let h,f,p;t[1]===Symbol.for("react.memo_cache_sentinel")?(h={opacity:0,y:10},f=()=>{l(!0)},p=()=>{l(!1)},t[1]=h,t[2]=f,t[3]=p):(h=t[1],f=t[2],p=t[3]);const g=.8+i*.04;let m;t[4]!==g?(m={delay:g,duration:.4},t[4]=g,t[5]=m):m=t[5];let v;t[6]!==n?(v=(0,x.jsx)(n,{"aria-hidden":"true",className:"h-6 w-6 text-gray-400 transition-colors duration-300 group-hover:text-gray-800",size:24}),t[6]=n,t[7]=v):v=t[7];let b;t[8]!==r?(b=(0,x.jsx)("span",{className:"font-mono text-[10px] text-gray-400 transition-colors duration-300 group-hover:text-gray-600",children:r}),t[8]=r,t[9]=b):b=t[9];let w;t[10]!==o?(w=o&&(0,x.jsx)(on.div,{animate:{scaleX:1},className:"absolute -bottom-px left-0 right-0 h-px bg-sky-sapphire/50",initial:{scaleX:0},transition:{duration:.2}}),t[10]=o,t[11]=w):w=t[11];let S;return t[12]!==m||t[13]!==v||t[14]!==b||t[15]!==w?(S=(0,x.jsxs)(on.div,{animate:u,className:"group relative flex flex-col items-center gap-3 border border-gray-200 bg-gray-50 p-5 transition-all duration-300 hover:border-sky-sapphire/40 hover:bg-sky-sapphire/[0.04]",initial:h,onMouseEnter:f,onMouseLeave:p,transition:m,children:[v,b,w]}),t[12]=m,t[13]=v,t[14]=b,t[15]=w,t[16]=S):S=t[16],S},ZC=()=>{const e=(0,$t.c)(8);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,x.jsx)(El,{mode:"light",prefix:"Compatibility",title:"Works where you work."}),e[0]=t):t=e[0];let n;e[1]===Symbol.for("react.memo_cache_sentinel")?(n=(0,x.jsx)("h3",{className:"text-lg font-semibold text-gray-900",children:"Frameworks"}),e[1]=n):n=e[1];let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=(0,x.jsxs)("div",{className:"mb-6 flex items-center justify-between",children:[n,(0,x.jsxs)("span",{className:"border border-gray-200 bg-gray-50 px-3 py-1 font-mono text-xs text-gray-500",children:["$","{",(0,x.jsx)("span",{className:"text-sky-sapphire",children:"any"}),"}"]})]}),e[2]=i):i=e[2];let r;e[3]===Symbol.for("react.memo_cache_sentinel")?(r=(0,x.jsxs)("div",{className:"border-y border-gray-200 bg-white p-8 mr-0.5",children:[i,(0,x.jsxs)("div",{className:"grid grid-cols-4 gap-px sm:grid-cols-6",children:[s_.map(JC),(0,x.jsx)("div",{className:"flex items-center justify-center border border-gray-200 bg-gray-50 p-5 font-mono text-xs text-gray-300",children:"+more"})]})]}),e[3]=r):r=e[3];let o;e[4]===Symbol.for("react.memo_cache_sentinel")?(o=(0,x.jsx)("h3",{className:"text-lg font-semibold text-gray-900",children:"Deploy anywhere"}),e[4]=o):o=e[4];let l;e[5]===Symbol.for("react.memo_cache_sentinel")?(l=(0,x.jsxs)("div",{className:"mb-6 flex items-center justify-between",children:[o,(0,x.jsxs)("div",{className:"flex items-center gap-1.5 font-mono text-xs text-emerald-600",children:[(0,x.jsx)("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500"}),"web standards"]})]}),e[5]=l):l=e[5];let u;e[6]===Symbol.for("react.memo_cache_sentinel")?(u=(0,x.jsx)("div",{className:"grid grid-cols-3 gap-px sm:grid-cols-5",children:$C.map(KC)}),e[6]=u):u=e[6];let h;return e[7]===Symbol.for("react.memo_cache_sentinel")?(h=(0,x.jsx)("div",{className:"bg-white",children:(0,x.jsxs)(hr,{mode:"light",children:[t,(0,x.jsx)("div",{className:"col-span-4 mt-16",children:(0,x.jsxs)("div",{className:"grid gap-px lg:grid-cols-2",children:[r,(0,x.jsxs)("div",{className:"border-y border-gray-200 bg-white p-8",children:[l,u,(0,x.jsxs)("div",{className:"mt-6 flex items-center gap-2 border-t border-gray-100 pt-6",children:[(0,x.jsx)(Yc,{className:"h-3.5 w-3.5 text-gray-300"}),(0,x.jsx)("span",{className:"font-mono text-xs text-gray-400",children:"Our packages use web standards — they run on any platform that supports Node.js or WinterCG."})]})]})]})})]})}
4184),e[7]=h):h=e[7],h};function JC(e,t){return(0,x.jsx)(a_,{icon:e.icon,index:t,label:e.label},e.label)}function KC(e,t){return(0,x.jsx)(a_,{icon:e.icon,index:t+s_.length,label:e.label},e.label)}var QC=()=>{const e=(0,$t.c)(9);let t,n,i;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,x.jsx)(AS,{}),n=(0,x.jsx)(gC,{}),i=(0,x.jsx)(gS,{}),e[0]=t,e[1]=n,e[2]=i):(t=e[0],n=e[1],i=e[2]);let r;e[3]===Symbol.for("react.memo_cache_sentinel")?(r=(0,x.jsx)("div",{className:"content-auto",children:(0,x.jsx)(ZC,{})}),e[3]=r):r=e[3];let o;e[4]===Symbol.for("react.memo_cache_sentinel")?(o=(0,x.jsx)("div",{className:"content-auto",children:(0,x.jsx)(GS,{})}),e[4]=o):o=e[4];let l,u;e[5]===Symbol.for("react.memo_cache_sentinel")?(l=(0,x.jsx)("div",{className:"content-auto",children:(0,x.jsx)(DS,{})}),u=(0,x.jsx)(oS,{}),e[5]=l,e[6]=u):(l=e[5],u=e[6]);let h;e[7]===Symbol.for("react.memo_cache_sentinel")?(h=(0,x.jsx)("div",{className:"content-auto",children:(0,x.jsx)(bS,{})}),e[7]=h):h=e[7];let f;return e[8]===Symbol.for("react.memo_cache_sentinel")?(f=(0,x.jsxs)(x.Fragment,{children:[t,n,i,r,o,l,u,h,(0,x.jsx)("div",{className:"content-auto",children:(0,x.jsx)(bb,{})})]}),e[8]=f):f=e[8],f},uA=()=>{const e=(0,$t.c)(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,x.jsx)(QC,{}),e[0]=t):t=e[0],t};export{uA as component};

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.