diff --git a/assets/index-HJ2XngBo.css b/assets/index-ZdO8gcQl.css similarity index 81% rename from assets/index-HJ2XngBo.css rename to assets/index-ZdO8gcQl.css index 5f12faa..ff36179 100644 --- a/assets/index-HJ2XngBo.css +++ b/assets/index-ZdO8gcQl.css @@ -1 +1 @@ -:root{--toastify-color-light: #fff;--toastify-color-dark: #121212;--toastify-color-info: #3498db;--toastify-color-success: #07bc0c;--toastify-color-warning: #f1c40f;--toastify-color-error: #e74c3c;--toastify-color-transparent: rgba(255, 255, 255, .7);--toastify-icon-color-info: var(--toastify-color-info);--toastify-icon-color-success: var(--toastify-color-success);--toastify-icon-color-warning: var(--toastify-color-warning);--toastify-icon-color-error: var(--toastify-color-error);--toastify-toast-width: 320px;--toastify-toast-offset: 16px;--toastify-toast-top: max(var(--toastify-toast-offset), env(safe-area-inset-top));--toastify-toast-right: max(var(--toastify-toast-offset), env(safe-area-inset-right));--toastify-toast-left: max(var(--toastify-toast-offset), env(safe-area-inset-left));--toastify-toast-bottom: max(var(--toastify-toast-offset), env(safe-area-inset-bottom));--toastify-toast-background: #fff;--toastify-toast-min-height: 64px;--toastify-toast-max-height: 800px;--toastify-toast-bd-radius: 6px;--toastify-font-family: sans-serif;--toastify-z-index: 9999;--toastify-text-color-light: #757575;--toastify-text-color-dark: #fff;--toastify-text-color-info: #fff;--toastify-text-color-success: #fff;--toastify-text-color-warning: #fff;--toastify-text-color-error: #fff;--toastify-spinner-color: #616161;--toastify-spinner-color-empty-area: #e0e0e0;--toastify-color-progress-light: linear-gradient( to right, #4cd964, #5ac8fa, #007aff, #34aadc, #5856d6, #ff2d55 );--toastify-color-progress-dark: #bb86fc;--toastify-color-progress-info: var(--toastify-color-info);--toastify-color-progress-success: var(--toastify-color-success);--toastify-color-progress-warning: var(--toastify-color-warning);--toastify-color-progress-error: var(--toastify-color-error);--toastify-color-progress-bgo: .2}.Toastify__toast-container{z-index:var(--toastify-z-index);-webkit-transform:translate3d(0,0,var(--toastify-z-index));position:fixed;padding:4px;width:var(--toastify-toast-width);box-sizing:border-box;color:#fff}.Toastify__toast-container--top-left{top:var(--toastify-toast-top);left:var(--toastify-toast-left)}.Toastify__toast-container--top-center{top:var(--toastify-toast-top);left:50%;transform:translate(-50%)}.Toastify__toast-container--top-right{top:var(--toastify-toast-top);right:var(--toastify-toast-right)}.Toastify__toast-container--bottom-left{bottom:var(--toastify-toast-bottom);left:var(--toastify-toast-left)}.Toastify__toast-container--bottom-center{bottom:var(--toastify-toast-bottom);left:50%;transform:translate(-50%)}.Toastify__toast-container--bottom-right{bottom:var(--toastify-toast-bottom);right:var(--toastify-toast-right)}@media only screen and (max-width : 480px){.Toastify__toast-container{width:100vw;padding:0;left:env(safe-area-inset-left);margin:0}.Toastify__toast-container--top-left,.Toastify__toast-container--top-center,.Toastify__toast-container--top-right{top:env(safe-area-inset-top);transform:translate(0)}.Toastify__toast-container--bottom-left,.Toastify__toast-container--bottom-center,.Toastify__toast-container--bottom-right{bottom:env(safe-area-inset-bottom);transform:translate(0)}.Toastify__toast-container--rtl{right:env(safe-area-inset-right);left:initial}}.Toastify__toast{--y: 0;position:relative;touch-action:none;min-height:var(--toastify-toast-min-height);box-sizing:border-box;margin-bottom:1rem;padding:8px;border-radius:var(--toastify-toast-bd-radius);box-shadow:0 4px 12px #0000001a;display:flex;justify-content:space-between;max-height:var(--toastify-toast-max-height);font-family:var(--toastify-font-family);cursor:default;direction:ltr;z-index:0;overflow:hidden}.Toastify__toast--stacked{position:absolute;width:100%;transform:translate3d(0,var(--y),0) scale(var(--s));transition:transform .3s}.Toastify__toast--stacked[data-collapsed] .Toastify__toast-body,.Toastify__toast--stacked[data-collapsed] .Toastify__close-button{transition:opacity .1s}.Toastify__toast--stacked[data-collapsed=false]{overflow:visible}.Toastify__toast--stacked[data-collapsed=true]:not(:last-child)>*{opacity:0}.Toastify__toast--stacked:after{content:"";position:absolute;left:0;right:0;height:calc(var(--g) * 1px);bottom:100%}.Toastify__toast--stacked[data-pos=top]{top:0}.Toastify__toast--stacked[data-pos=bot]{bottom:0}.Toastify__toast--stacked[data-pos=bot].Toastify__toast--stacked:before{transform-origin:top}.Toastify__toast--stacked[data-pos=top].Toastify__toast--stacked:before{transform-origin:bottom}.Toastify__toast--stacked:before{content:"";position:absolute;left:0;right:0;bottom:0;height:100%;transform:scaleY(3);z-index:-1}.Toastify__toast--rtl{direction:rtl}.Toastify__toast--close-on-click{cursor:pointer}.Toastify__toast-body{margin:auto 0;flex:1 1 auto;padding:6px;display:flex;align-items:center}.Toastify__toast-body>div:last-child{word-break:break-word;flex:1}.Toastify__toast-icon{margin-inline-end:10px;width:20px;flex-shrink:0;display:flex}.Toastify--animate{animation-fill-mode:both;animation-duration:.5s}.Toastify--animate-icon{animation-fill-mode:both;animation-duration:.3s}@media only screen and (max-width : 480px){.Toastify__toast{margin-bottom:0;border-radius:0}}.Toastify__toast-theme--dark{background:var(--toastify-color-dark);color:var(--toastify-text-color-dark)}.Toastify__toast-theme--light,.Toastify__toast-theme--colored.Toastify__toast--default{background:var(--toastify-color-light);color:var(--toastify-text-color-light)}.Toastify__toast-theme--colored.Toastify__toast--info{color:var(--toastify-text-color-info);background:var(--toastify-color-info)}.Toastify__toast-theme--colored.Toastify__toast--success{color:var(--toastify-text-color-success);background:var(--toastify-color-success)}.Toastify__toast-theme--colored.Toastify__toast--warning{color:var(--toastify-text-color-warning);background:var(--toastify-color-warning)}.Toastify__toast-theme--colored.Toastify__toast--error{color:var(--toastify-text-color-error);background:var(--toastify-color-error)}.Toastify__progress-bar-theme--light{background:var(--toastify-color-progress-light)}.Toastify__progress-bar-theme--dark{background:var(--toastify-color-progress-dark)}.Toastify__progress-bar--info{background:var(--toastify-color-progress-info)}.Toastify__progress-bar--success{background:var(--toastify-color-progress-success)}.Toastify__progress-bar--warning{background:var(--toastify-color-progress-warning)}.Toastify__progress-bar--error{background:var(--toastify-color-progress-error)}.Toastify__progress-bar-theme--colored.Toastify__progress-bar--info,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--success,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--warning,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--error{background:var(--toastify-color-transparent)}.Toastify__close-button{color:#fff;background:transparent;outline:none;border:none;padding:0;cursor:pointer;opacity:.7;transition:.3s ease;align-self:flex-start;z-index:1}.Toastify__close-button--light{color:#000;opacity:.3}.Toastify__close-button>svg{fill:currentColor;height:16px;width:14px}.Toastify__close-button:hover,.Toastify__close-button:focus{opacity:1}@keyframes Toastify__trackProgress{0%{transform:scaleX(1)}to{transform:scaleX(0)}}.Toastify__progress-bar{position:absolute;bottom:0;left:0;width:100%;height:100%;z-index:var(--toastify-z-index);opacity:.7;transform-origin:left;border-bottom-left-radius:var(--toastify-toast-bd-radius)}.Toastify__progress-bar--animated{animation:Toastify__trackProgress linear 1 forwards}.Toastify__progress-bar--controlled{transition:transform .2s}.Toastify__progress-bar--rtl{right:0;left:initial;transform-origin:right;border-bottom-left-radius:initial;border-bottom-right-radius:var(--toastify-toast-bd-radius)}.Toastify__progress-bar--wrp{position:absolute;bottom:0;left:0;width:100%;height:5px;border-bottom-left-radius:var(--toastify-toast-bd-radius)}.Toastify__progress-bar--wrp[data-hidden=true]{opacity:0}.Toastify__progress-bar--bg{opacity:var(--toastify-color-progress-bgo);width:100%;height:100%}.Toastify__spinner{width:20px;height:20px;box-sizing:border-box;border:2px solid;border-radius:100%;border-color:var(--toastify-spinner-color-empty-area);border-right-color:var(--toastify-spinner-color);animation:Toastify__spin .65s linear infinite}@keyframes Toastify__bounceInRight{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(3000px,0,0)}60%{opacity:1;transform:translate3d(-25px,0,0)}75%{transform:translate3d(10px,0,0)}90%{transform:translate3d(-5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutRight{20%{opacity:1;transform:translate3d(-20px,var(--y),0)}to{opacity:0;transform:translate3d(2000px,var(--y),0)}}@keyframes Toastify__bounceInLeft{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(-3000px,0,0)}60%{opacity:1;transform:translate3d(25px,0,0)}75%{transform:translate3d(-10px,0,0)}90%{transform:translate3d(5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutLeft{20%{opacity:1;transform:translate3d(20px,var(--y),0)}to{opacity:0;transform:translate3d(-2000px,var(--y),0)}}@keyframes Toastify__bounceInUp{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,3000px,0)}60%{opacity:1;transform:translate3d(0,-20px,0)}75%{transform:translate3d(0,10px,0)}90%{transform:translate3d(0,-5px,0)}to{transform:translateZ(0)}}@keyframes Toastify__bounceOutUp{20%{transform:translate3d(0,calc(var(--y) - 10px),0)}40%,45%{opacity:1;transform:translate3d(0,calc(var(--y) + 20px),0)}to{opacity:0;transform:translate3d(0,-2000px,0)}}@keyframes Toastify__bounceInDown{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,-3000px,0)}60%{opacity:1;transform:translate3d(0,25px,0)}75%{transform:translate3d(0,-10px,0)}90%{transform:translate3d(0,5px,0)}to{transform:none}}@keyframes Toastify__bounceOutDown{20%{transform:translate3d(0,calc(var(--y) - 10px),0)}40%,45%{opacity:1;transform:translate3d(0,calc(var(--y) + 20px),0)}to{opacity:0;transform:translate3d(0,2000px,0)}}.Toastify__bounce-enter--top-left,.Toastify__bounce-enter--bottom-left{animation-name:Toastify__bounceInLeft}.Toastify__bounce-enter--top-right,.Toastify__bounce-enter--bottom-right{animation-name:Toastify__bounceInRight}.Toastify__bounce-enter--top-center{animation-name:Toastify__bounceInDown}.Toastify__bounce-enter--bottom-center{animation-name:Toastify__bounceInUp}.Toastify__bounce-exit--top-left,.Toastify__bounce-exit--bottom-left{animation-name:Toastify__bounceOutLeft}.Toastify__bounce-exit--top-right,.Toastify__bounce-exit--bottom-right{animation-name:Toastify__bounceOutRight}.Toastify__bounce-exit--top-center{animation-name:Toastify__bounceOutUp}.Toastify__bounce-exit--bottom-center{animation-name:Toastify__bounceOutDown}@keyframes Toastify__zoomIn{0%{opacity:0;transform:scale3d(.3,.3,.3)}50%{opacity:1}}@keyframes Toastify__zoomOut{0%{opacity:1}50%{opacity:0;transform:translate3d(0,var(--y),0) scale3d(.3,.3,.3)}to{opacity:0}}.Toastify__zoom-enter{animation-name:Toastify__zoomIn}.Toastify__zoom-exit{animation-name:Toastify__zoomOut}@keyframes Toastify__flipIn{0%{transform:perspective(400px) rotateX(90deg);animation-timing-function:ease-in;opacity:0}40%{transform:perspective(400px) rotateX(-20deg);animation-timing-function:ease-in}60%{transform:perspective(400px) rotateX(10deg);opacity:1}80%{transform:perspective(400px) rotateX(-5deg)}to{transform:perspective(400px)}}@keyframes Toastify__flipOut{0%{transform:translate3d(0,var(--y),0) perspective(400px)}30%{transform:translate3d(0,var(--y),0) perspective(400px) rotateX(-20deg);opacity:1}to{transform:translate3d(0,var(--y),0) perspective(400px) rotateX(90deg);opacity:0}}.Toastify__flip-enter{animation-name:Toastify__flipIn}.Toastify__flip-exit{animation-name:Toastify__flipOut}@keyframes Toastify__slideInRight{0%{transform:translate3d(110%,0,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInLeft{0%{transform:translate3d(-110%,0,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInUp{0%{transform:translate3d(0,110%,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInDown{0%{transform:translate3d(0,-110%,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideOutRight{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(110%,var(--y),0)}}@keyframes Toastify__slideOutLeft{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(-110%,var(--y),0)}}@keyframes Toastify__slideOutDown{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(0,500px,0)}}@keyframes Toastify__slideOutUp{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(0,-500px,0)}}.Toastify__slide-enter--top-left,.Toastify__slide-enter--bottom-left{animation-name:Toastify__slideInLeft}.Toastify__slide-enter--top-right,.Toastify__slide-enter--bottom-right{animation-name:Toastify__slideInRight}.Toastify__slide-enter--top-center{animation-name:Toastify__slideInDown}.Toastify__slide-enter--bottom-center{animation-name:Toastify__slideInUp}.Toastify__slide-exit--top-left,.Toastify__slide-exit--bottom-left{animation-name:Toastify__slideOutLeft;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--top-right,.Toastify__slide-exit--bottom-right{animation-name:Toastify__slideOutRight;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--top-center{animation-name:Toastify__slideOutUp;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--bottom-center{animation-name:Toastify__slideOutDown;animation-timing-function:ease-in;animation-duration:.3s}@keyframes Toastify__spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.m-2{margin:.5rem}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-5{margin-left:1.25rem;margin-right:1.25rem}.mx-auto{margin-left:auto;margin-right:auto}.my-10{margin-top:2.5rem;margin-bottom:2.5rem}.my-2{margin-top:.5rem;margin-bottom:.5rem}.my-3{margin-top:.75rem;margin-bottom:.75rem}.mb-2{margin-bottom:.5rem}.mb-4{margin-bottom:1rem}.mb-8{margin-bottom:2rem}.mt-2{margin-top:.5rem}.block{display:block}.flex{display:flex}.grid{display:grid}.h-auto{height:auto}.w-48{width:12rem}.w-full{width:100%}.max-w-4xl{max-width:56rem}.max-w-md{max-width:28rem}.flex-1{flex:1 1 0%}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-center{justify-content:center}.justify-around{justify-content:space-around}.gap-4{gap:1rem}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-md{border-radius:.375rem}.border{border-width:1px}.bg-blue-600{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity))}.bg-blue-950{--tw-bg-opacity: 1;background-color:rgb(23 37 84 / var(--tw-bg-opacity))}.bg-gray-950{--tw-bg-opacity: 1;background-color:rgb(3 7 18 / var(--tw-bg-opacity))}.bg-red-500{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.bg-yellow-500{--tw-bg-opacity: 1;background-color:rgb(234 179 8 / var(--tw-bg-opacity))}.bg-gradient-to-r{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.from-blue-950{--tw-gradient-from: #172554 var(--tw-gradient-from-position);--tw-gradient-to: rgb(23 37 84 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.via-blue-600{--tw-gradient-to: rgb(37 99 235 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #2563eb var(--tw-gradient-via-position), var(--tw-gradient-to)}.to-white{--tw-gradient-to: #fff var(--tw-gradient-to-position)}.object-cover{-o-object-fit:cover;object-fit:cover}.p-2{padding:.5rem}.p-4{padding:1rem}.p-8{padding:2rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.text-center{text-align:center}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-sm{font-size:.875rem;line-height:1.25rem}.font-bold{font-weight:700}.font-semibold{font-weight:600}.leading-tight{line-height:1.25}.text-black{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity))}.text-blue-400{--tw-text-opacity: 1;color:rgb(96 165 250 / var(--tw-text-opacity))}.text-gray-200{--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity))}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.text-gray-800{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity))}.text-gray-950{--tw-text-opacity: 1;color:rgb(3 7 18 / var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-white\/70{--tw-shadow-color: rgb(255 255 255 / .7);--tw-shadow: var(--tw-shadow-colored)}.hover\:bg-black:hover{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity))}.hover\:bg-blue-500:hover{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity))}.hover\:bg-blue-800:hover{--tw-bg-opacity: 1;background-color:rgb(30 64 175 / var(--tw-bg-opacity))}.hover\:bg-gray-800:hover{--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}.hover\:bg-red-700:hover{--tw-bg-opacity: 1;background-color:rgb(185 28 28 / var(--tw-bg-opacity))}.hover\:underline:hover{text-decoration-line:underline}.hover\:shadow-lg:hover{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\:shadow-white:hover{--tw-shadow-color: #fff;--tw-shadow: var(--tw-shadow-colored)}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}@media (min-width: 768px){.md\:mx-auto{margin-left:auto;margin-right:auto}.md\:mb-0{margin-bottom:0}.md\:mr-3{margin-right:.75rem}.md\:w-48{width:12rem}.md\:w-64{width:16rem}.md\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.md\:flex-row{flex-direction:row}.md\:items-center{align-items:center}.md\:text-lg{font-size:1.125rem;line-height:1.75rem}}@media (min-width: 1536px){.\32xl\:grid-cols-8{grid-template-columns:repeat(8,minmax(0,1fr))}} +:root{--toastify-color-light: #fff;--toastify-color-dark: #121212;--toastify-color-info: #3498db;--toastify-color-success: #07bc0c;--toastify-color-warning: #f1c40f;--toastify-color-error: #e74c3c;--toastify-color-transparent: rgba(255, 255, 255, .7);--toastify-icon-color-info: var(--toastify-color-info);--toastify-icon-color-success: var(--toastify-color-success);--toastify-icon-color-warning: var(--toastify-color-warning);--toastify-icon-color-error: var(--toastify-color-error);--toastify-toast-width: 320px;--toastify-toast-offset: 16px;--toastify-toast-top: max(var(--toastify-toast-offset), env(safe-area-inset-top));--toastify-toast-right: max(var(--toastify-toast-offset), env(safe-area-inset-right));--toastify-toast-left: max(var(--toastify-toast-offset), env(safe-area-inset-left));--toastify-toast-bottom: max(var(--toastify-toast-offset), env(safe-area-inset-bottom));--toastify-toast-background: #fff;--toastify-toast-min-height: 64px;--toastify-toast-max-height: 800px;--toastify-toast-bd-radius: 6px;--toastify-font-family: sans-serif;--toastify-z-index: 9999;--toastify-text-color-light: #757575;--toastify-text-color-dark: #fff;--toastify-text-color-info: #fff;--toastify-text-color-success: #fff;--toastify-text-color-warning: #fff;--toastify-text-color-error: #fff;--toastify-spinner-color: #616161;--toastify-spinner-color-empty-area: #e0e0e0;--toastify-color-progress-light: linear-gradient( to right, #4cd964, #5ac8fa, #007aff, #34aadc, #5856d6, #ff2d55 );--toastify-color-progress-dark: #bb86fc;--toastify-color-progress-info: var(--toastify-color-info);--toastify-color-progress-success: var(--toastify-color-success);--toastify-color-progress-warning: var(--toastify-color-warning);--toastify-color-progress-error: var(--toastify-color-error);--toastify-color-progress-bgo: .2}.Toastify__toast-container{z-index:var(--toastify-z-index);-webkit-transform:translate3d(0,0,var(--toastify-z-index));position:fixed;padding:4px;width:var(--toastify-toast-width);box-sizing:border-box;color:#fff}.Toastify__toast-container--top-left{top:var(--toastify-toast-top);left:var(--toastify-toast-left)}.Toastify__toast-container--top-center{top:var(--toastify-toast-top);left:50%;transform:translate(-50%)}.Toastify__toast-container--top-right{top:var(--toastify-toast-top);right:var(--toastify-toast-right)}.Toastify__toast-container--bottom-left{bottom:var(--toastify-toast-bottom);left:var(--toastify-toast-left)}.Toastify__toast-container--bottom-center{bottom:var(--toastify-toast-bottom);left:50%;transform:translate(-50%)}.Toastify__toast-container--bottom-right{bottom:var(--toastify-toast-bottom);right:var(--toastify-toast-right)}@media only screen and (max-width : 480px){.Toastify__toast-container{width:100vw;padding:0;left:env(safe-area-inset-left);margin:0}.Toastify__toast-container--top-left,.Toastify__toast-container--top-center,.Toastify__toast-container--top-right{top:env(safe-area-inset-top);transform:translate(0)}.Toastify__toast-container--bottom-left,.Toastify__toast-container--bottom-center,.Toastify__toast-container--bottom-right{bottom:env(safe-area-inset-bottom);transform:translate(0)}.Toastify__toast-container--rtl{right:env(safe-area-inset-right);left:initial}}.Toastify__toast{--y: 0;position:relative;touch-action:none;min-height:var(--toastify-toast-min-height);box-sizing:border-box;margin-bottom:1rem;padding:8px;border-radius:var(--toastify-toast-bd-radius);box-shadow:0 4px 12px #0000001a;display:flex;justify-content:space-between;max-height:var(--toastify-toast-max-height);font-family:var(--toastify-font-family);cursor:default;direction:ltr;z-index:0;overflow:hidden}.Toastify__toast--stacked{position:absolute;width:100%;transform:translate3d(0,var(--y),0) scale(var(--s));transition:transform .3s}.Toastify__toast--stacked[data-collapsed] .Toastify__toast-body,.Toastify__toast--stacked[data-collapsed] .Toastify__close-button{transition:opacity .1s}.Toastify__toast--stacked[data-collapsed=false]{overflow:visible}.Toastify__toast--stacked[data-collapsed=true]:not(:last-child)>*{opacity:0}.Toastify__toast--stacked:after{content:"";position:absolute;left:0;right:0;height:calc(var(--g) * 1px);bottom:100%}.Toastify__toast--stacked[data-pos=top]{top:0}.Toastify__toast--stacked[data-pos=bot]{bottom:0}.Toastify__toast--stacked[data-pos=bot].Toastify__toast--stacked:before{transform-origin:top}.Toastify__toast--stacked[data-pos=top].Toastify__toast--stacked:before{transform-origin:bottom}.Toastify__toast--stacked:before{content:"";position:absolute;left:0;right:0;bottom:0;height:100%;transform:scaleY(3);z-index:-1}.Toastify__toast--rtl{direction:rtl}.Toastify__toast--close-on-click{cursor:pointer}.Toastify__toast-body{margin:auto 0;flex:1 1 auto;padding:6px;display:flex;align-items:center}.Toastify__toast-body>div:last-child{word-break:break-word;flex:1}.Toastify__toast-icon{margin-inline-end:10px;width:20px;flex-shrink:0;display:flex}.Toastify--animate{animation-fill-mode:both;animation-duration:.5s}.Toastify--animate-icon{animation-fill-mode:both;animation-duration:.3s}@media only screen and (max-width : 480px){.Toastify__toast{margin-bottom:0;border-radius:0}}.Toastify__toast-theme--dark{background:var(--toastify-color-dark);color:var(--toastify-text-color-dark)}.Toastify__toast-theme--light,.Toastify__toast-theme--colored.Toastify__toast--default{background:var(--toastify-color-light);color:var(--toastify-text-color-light)}.Toastify__toast-theme--colored.Toastify__toast--info{color:var(--toastify-text-color-info);background:var(--toastify-color-info)}.Toastify__toast-theme--colored.Toastify__toast--success{color:var(--toastify-text-color-success);background:var(--toastify-color-success)}.Toastify__toast-theme--colored.Toastify__toast--warning{color:var(--toastify-text-color-warning);background:var(--toastify-color-warning)}.Toastify__toast-theme--colored.Toastify__toast--error{color:var(--toastify-text-color-error);background:var(--toastify-color-error)}.Toastify__progress-bar-theme--light{background:var(--toastify-color-progress-light)}.Toastify__progress-bar-theme--dark{background:var(--toastify-color-progress-dark)}.Toastify__progress-bar--info{background:var(--toastify-color-progress-info)}.Toastify__progress-bar--success{background:var(--toastify-color-progress-success)}.Toastify__progress-bar--warning{background:var(--toastify-color-progress-warning)}.Toastify__progress-bar--error{background:var(--toastify-color-progress-error)}.Toastify__progress-bar-theme--colored.Toastify__progress-bar--info,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--success,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--warning,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--error{background:var(--toastify-color-transparent)}.Toastify__close-button{color:#fff;background:transparent;outline:none;border:none;padding:0;cursor:pointer;opacity:.7;transition:.3s ease;align-self:flex-start;z-index:1}.Toastify__close-button--light{color:#000;opacity:.3}.Toastify__close-button>svg{fill:currentColor;height:16px;width:14px}.Toastify__close-button:hover,.Toastify__close-button:focus{opacity:1}@keyframes Toastify__trackProgress{0%{transform:scaleX(1)}to{transform:scaleX(0)}}.Toastify__progress-bar{position:absolute;bottom:0;left:0;width:100%;height:100%;z-index:var(--toastify-z-index);opacity:.7;transform-origin:left;border-bottom-left-radius:var(--toastify-toast-bd-radius)}.Toastify__progress-bar--animated{animation:Toastify__trackProgress linear 1 forwards}.Toastify__progress-bar--controlled{transition:transform .2s}.Toastify__progress-bar--rtl{right:0;left:initial;transform-origin:right;border-bottom-left-radius:initial;border-bottom-right-radius:var(--toastify-toast-bd-radius)}.Toastify__progress-bar--wrp{position:absolute;bottom:0;left:0;width:100%;height:5px;border-bottom-left-radius:var(--toastify-toast-bd-radius)}.Toastify__progress-bar--wrp[data-hidden=true]{opacity:0}.Toastify__progress-bar--bg{opacity:var(--toastify-color-progress-bgo);width:100%;height:100%}.Toastify__spinner{width:20px;height:20px;box-sizing:border-box;border:2px solid;border-radius:100%;border-color:var(--toastify-spinner-color-empty-area);border-right-color:var(--toastify-spinner-color);animation:Toastify__spin .65s linear infinite}@keyframes Toastify__bounceInRight{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(3000px,0,0)}60%{opacity:1;transform:translate3d(-25px,0,0)}75%{transform:translate3d(10px,0,0)}90%{transform:translate3d(-5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutRight{20%{opacity:1;transform:translate3d(-20px,var(--y),0)}to{opacity:0;transform:translate3d(2000px,var(--y),0)}}@keyframes Toastify__bounceInLeft{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(-3000px,0,0)}60%{opacity:1;transform:translate3d(25px,0,0)}75%{transform:translate3d(-10px,0,0)}90%{transform:translate3d(5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutLeft{20%{opacity:1;transform:translate3d(20px,var(--y),0)}to{opacity:0;transform:translate3d(-2000px,var(--y),0)}}@keyframes Toastify__bounceInUp{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,3000px,0)}60%{opacity:1;transform:translate3d(0,-20px,0)}75%{transform:translate3d(0,10px,0)}90%{transform:translate3d(0,-5px,0)}to{transform:translateZ(0)}}@keyframes Toastify__bounceOutUp{20%{transform:translate3d(0,calc(var(--y) - 10px),0)}40%,45%{opacity:1;transform:translate3d(0,calc(var(--y) + 20px),0)}to{opacity:0;transform:translate3d(0,-2000px,0)}}@keyframes Toastify__bounceInDown{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,-3000px,0)}60%{opacity:1;transform:translate3d(0,25px,0)}75%{transform:translate3d(0,-10px,0)}90%{transform:translate3d(0,5px,0)}to{transform:none}}@keyframes Toastify__bounceOutDown{20%{transform:translate3d(0,calc(var(--y) - 10px),0)}40%,45%{opacity:1;transform:translate3d(0,calc(var(--y) + 20px),0)}to{opacity:0;transform:translate3d(0,2000px,0)}}.Toastify__bounce-enter--top-left,.Toastify__bounce-enter--bottom-left{animation-name:Toastify__bounceInLeft}.Toastify__bounce-enter--top-right,.Toastify__bounce-enter--bottom-right{animation-name:Toastify__bounceInRight}.Toastify__bounce-enter--top-center{animation-name:Toastify__bounceInDown}.Toastify__bounce-enter--bottom-center{animation-name:Toastify__bounceInUp}.Toastify__bounce-exit--top-left,.Toastify__bounce-exit--bottom-left{animation-name:Toastify__bounceOutLeft}.Toastify__bounce-exit--top-right,.Toastify__bounce-exit--bottom-right{animation-name:Toastify__bounceOutRight}.Toastify__bounce-exit--top-center{animation-name:Toastify__bounceOutUp}.Toastify__bounce-exit--bottom-center{animation-name:Toastify__bounceOutDown}@keyframes Toastify__zoomIn{0%{opacity:0;transform:scale3d(.3,.3,.3)}50%{opacity:1}}@keyframes Toastify__zoomOut{0%{opacity:1}50%{opacity:0;transform:translate3d(0,var(--y),0) scale3d(.3,.3,.3)}to{opacity:0}}.Toastify__zoom-enter{animation-name:Toastify__zoomIn}.Toastify__zoom-exit{animation-name:Toastify__zoomOut}@keyframes Toastify__flipIn{0%{transform:perspective(400px) rotateX(90deg);animation-timing-function:ease-in;opacity:0}40%{transform:perspective(400px) rotateX(-20deg);animation-timing-function:ease-in}60%{transform:perspective(400px) rotateX(10deg);opacity:1}80%{transform:perspective(400px) rotateX(-5deg)}to{transform:perspective(400px)}}@keyframes Toastify__flipOut{0%{transform:translate3d(0,var(--y),0) perspective(400px)}30%{transform:translate3d(0,var(--y),0) perspective(400px) rotateX(-20deg);opacity:1}to{transform:translate3d(0,var(--y),0) perspective(400px) rotateX(90deg);opacity:0}}.Toastify__flip-enter{animation-name:Toastify__flipIn}.Toastify__flip-exit{animation-name:Toastify__flipOut}@keyframes Toastify__slideInRight{0%{transform:translate3d(110%,0,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInLeft{0%{transform:translate3d(-110%,0,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInUp{0%{transform:translate3d(0,110%,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInDown{0%{transform:translate3d(0,-110%,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideOutRight{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(110%,var(--y),0)}}@keyframes Toastify__slideOutLeft{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(-110%,var(--y),0)}}@keyframes Toastify__slideOutDown{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(0,500px,0)}}@keyframes Toastify__slideOutUp{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(0,-500px,0)}}.Toastify__slide-enter--top-left,.Toastify__slide-enter--bottom-left{animation-name:Toastify__slideInLeft}.Toastify__slide-enter--top-right,.Toastify__slide-enter--bottom-right{animation-name:Toastify__slideInRight}.Toastify__slide-enter--top-center{animation-name:Toastify__slideInDown}.Toastify__slide-enter--bottom-center{animation-name:Toastify__slideInUp}.Toastify__slide-exit--top-left,.Toastify__slide-exit--bottom-left{animation-name:Toastify__slideOutLeft;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--top-right,.Toastify__slide-exit--bottom-right{animation-name:Toastify__slideOutRight;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--top-center{animation-name:Toastify__slideOutUp;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--bottom-center{animation-name:Toastify__slideOutDown;animation-timing-function:ease-in;animation-duration:.3s}@keyframes Toastify__spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.m-2{margin:.5rem}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-5{margin-left:1.25rem;margin-right:1.25rem}.mx-auto{margin-left:auto;margin-right:auto}.my-10{margin-top:2.5rem;margin-bottom:2.5rem}.my-2{margin-top:.5rem;margin-bottom:.5rem}.my-3{margin-top:.75rem;margin-bottom:.75rem}.mb-2{margin-bottom:.5rem}.mb-4{margin-bottom:1rem}.mb-8{margin-bottom:2rem}.mt-2{margin-top:.5rem}.block{display:block}.flex{display:flex}.grid{display:grid}.h-auto{height:auto}.w-48{width:12rem}.w-full{width:100%}.max-w-4xl{max-width:56rem}.max-w-md{max-width:28rem}.flex-1{flex:1 1 0%}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-center{justify-content:center}.justify-around{justify-content:space-around}.gap-4{gap:1rem}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-md{border-radius:.375rem}.border{border-width:1px}.border-red-500{--tw-border-opacity: 1;border-color:rgb(239 68 68 / var(--tw-border-opacity))}.bg-blue-600{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity))}.bg-blue-950{--tw-bg-opacity: 1;background-color:rgb(23 37 84 / var(--tw-bg-opacity))}.bg-gray-950{--tw-bg-opacity: 1;background-color:rgb(3 7 18 / var(--tw-bg-opacity))}.bg-red-500{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.bg-yellow-500{--tw-bg-opacity: 1;background-color:rgb(234 179 8 / var(--tw-bg-opacity))}.bg-gradient-to-r{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.from-blue-950{--tw-gradient-from: #172554 var(--tw-gradient-from-position);--tw-gradient-to: rgb(23 37 84 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.via-blue-600{--tw-gradient-to: rgb(37 99 235 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #2563eb var(--tw-gradient-via-position), var(--tw-gradient-to)}.to-white{--tw-gradient-to: #fff var(--tw-gradient-to-position)}.object-cover{-o-object-fit:cover;object-fit:cover}.p-2{padding:.5rem}.p-4{padding:1rem}.p-8{padding:2rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.text-center{text-align:center}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-semibold{font-weight:600}.italic{font-style:italic}.leading-tight{line-height:1.25}.text-black{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity))}.text-blue-400{--tw-text-opacity: 1;color:rgb(96 165 250 / var(--tw-text-opacity))}.text-gray-200{--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity))}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.text-gray-800{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity))}.text-gray-950{--tw-text-opacity: 1;color:rgb(3 7 18 / var(--tw-text-opacity))}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-white\/70{--tw-shadow-color: rgb(255 255 255 / .7);--tw-shadow: var(--tw-shadow-colored)}.hover\:bg-black:hover{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity))}.hover\:bg-blue-500:hover{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity))}.hover\:bg-blue-800:hover{--tw-bg-opacity: 1;background-color:rgb(30 64 175 / var(--tw-bg-opacity))}.hover\:bg-gray-800:hover{--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}.hover\:bg-red-700:hover{--tw-bg-opacity: 1;background-color:rgb(185 28 28 / var(--tw-bg-opacity))}.hover\:underline:hover{text-decoration-line:underline}.hover\:shadow-lg:hover{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\:shadow-white:hover{--tw-shadow-color: #fff;--tw-shadow: var(--tw-shadow-colored)}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}@media (min-width: 768px){.md\:mx-auto{margin-left:auto;margin-right:auto}.md\:mb-0{margin-bottom:0}.md\:mr-3{margin-right:.75rem}.md\:w-48{width:12rem}.md\:w-64{width:16rem}.md\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.md\:flex-row{flex-direction:row}.md\:items-center{align-items:center}.md\:text-lg{font-size:1.125rem;line-height:1.75rem}}@media (min-width: 1536px){.\32xl\:grid-cols-8{grid-template-columns:repeat(8,minmax(0,1fr))}} diff --git a/assets/index-SqCC5jTt.js b/assets/index-wB1We1GE.js similarity index 95% rename from assets/index-SqCC5jTt.js rename to assets/index-wB1We1GE.js index fa32224..1080216 100644 --- a/assets/index-SqCC5jTt.js +++ b/assets/index-wB1We1GE.js @@ -31,21 +31,21 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var CM=ve,qi=RC;function Ae(n){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+n,t=1;t"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),t1=Object.prototype.hasOwnProperty,PC=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,l2={},c2={};function LC(n){return t1.call(c2,n)?!0:t1.call(l2,n)?!1:PC.test(n)?c2[n]=!0:(l2[n]=!0,!1)}function IC(n,e,t,i){if(t!==null&&t.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return i?!1:t!==null?!t.acceptsBooleans:(n=n.toLowerCase().slice(0,5),n!=="data-"&&n!=="aria-");default:return!1}}function NC(n,e,t,i){if(e===null||typeof e>"u"||IC(n,e,t,i))return!0;if(i)return!1;if(t!==null)switch(t.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function xi(n,e,t,i,r,s,o){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=i,this.attributeNamespace=r,this.mustUseProperty=t,this.propertyName=n,this.type=e,this.sanitizeURL=s,this.removeEmptyString=o}var jn={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(n){jn[n]=new xi(n,0,!1,n,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(n){var e=n[0];jn[e]=new xi(e,1,!1,n[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(n){jn[n]=new xi(n,2,!1,n.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(n){jn[n]=new xi(n,2,!1,n,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(n){jn[n]=new xi(n,3,!1,n.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(n){jn[n]=new xi(n,3,!0,n,null,!1,!1)});["capture","download"].forEach(function(n){jn[n]=new xi(n,4,!1,n,null,!1,!1)});["cols","rows","size","span"].forEach(function(n){jn[n]=new xi(n,6,!1,n,null,!1,!1)});["rowSpan","start"].forEach(function(n){jn[n]=new xi(n,5,!1,n.toLowerCase(),null,!1,!1)});var qv=/[\-:]([a-z])/g;function Zv(n){return n[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(n){var e=n.replace(qv,Zv);jn[e]=new xi(e,1,!1,n,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(n){var e=n.replace(qv,Zv);jn[e]=new xi(e,1,!1,n,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(n){var e=n.replace(qv,Zv);jn[e]=new xi(e,1,!1,n,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(n){jn[n]=new xi(n,1,!1,n.toLowerCase(),null,!1,!1)});jn.xlinkHref=new xi("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(n){jn[n]=new xi(n,1,!1,n.toLowerCase(),null,!0,!0)});function Kv(n,e,t,i){var r=jn.hasOwnProperty(e)?jn[e]:null;(r!==null?r.type!==0:i||!(2a||r[o]!==s[a]){var u=` -`+r[o].replace(" at new "," at ");return n.displayName&&u.includes("")&&(u=u.replace("",n.displayName)),u}while(1<=o&&0<=a);break}}}finally{z0=!1,Error.prepareStackTrace=t}return(n=n?n.displayName||n.name:"")?Qc(n):""}function DC(n){switch(n.tag){case 5:return Qc(n.type);case 16:return Qc("Lazy");case 13:return Qc("Suspense");case 19:return Qc("SuspenseList");case 0:case 2:case 15:return n=O0(n.type,!1),n;case 11:return n=O0(n.type.render,!1),n;case 1:return n=O0(n.type,!0),n;default:return""}}function s1(n){if(n==null)return null;if(typeof n=="function")return n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case xl:return"Fragment";case _l:return"Portal";case n1:return"Profiler";case Jv:return"StrictMode";case i1:return"Suspense";case r1:return"SuspenseList"}if(typeof n=="object")switch(n.$$typeof){case PM:return(n.displayName||"Context")+".Consumer";case RM:return(n._context.displayName||"Context")+".Provider";case Qv:var e=n.render;return n=n.displayName,n||(n=e.displayName||e.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case $v:return e=n.displayName||null,e!==null?e:s1(n.type)||"Memo";case Ks:e=n._payload,n=n._init;try{return s1(n(e))}catch{}}return null}function UC(n){var e=n.type;switch(n.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return n=e.render,n=n.displayName||n.name||"",e.displayName||(n!==""?"ForwardRef("+n+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return s1(e);case 8:return e===Jv?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function go(n){switch(typeof n){case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function IM(n){var e=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function zC(n){var e=IM(n)?"checked":"value",t=Object.getOwnPropertyDescriptor(n.constructor.prototype,e),i=""+n[e];if(!n.hasOwnProperty(e)&&typeof t<"u"&&typeof t.get=="function"&&typeof t.set=="function"){var r=t.get,s=t.set;return Object.defineProperty(n,e,{configurable:!0,get:function(){return r.call(this)},set:function(o){i=""+o,s.call(this,o)}}),Object.defineProperty(n,e,{enumerable:t.enumerable}),{getValue:function(){return i},setValue:function(o){i=""+o},stopTracking:function(){n._valueTracker=null,delete n[e]}}}}function Sh(n){n._valueTracker||(n._valueTracker=zC(n))}function NM(n){if(!n)return!1;var e=n._valueTracker;if(!e)return!0;var t=e.getValue(),i="";return n&&(i=IM(n)?n.checked?"true":"false":n.value),n=i,n!==t?(e.setValue(n),!0):!1}function $d(n){if(n=n||(typeof document<"u"?document:void 0),typeof n>"u")return null;try{return n.activeElement||n.body}catch{return n.body}}function o1(n,e){var t=e.checked;return ln({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:t??n._wrapperState.initialChecked})}function f2(n,e){var t=e.defaultValue==null?"":e.defaultValue,i=e.checked!=null?e.checked:e.defaultChecked;t=go(e.value!=null?e.value:t),n._wrapperState={initialChecked:i,initialValue:t,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function DM(n,e){e=e.checked,e!=null&&Kv(n,"checked",e,!1)}function a1(n,e){DM(n,e);var t=go(e.value),i=e.type;if(t!=null)i==="number"?(t===0&&n.value===""||n.value!=t)&&(n.value=""+t):n.value!==""+t&&(n.value=""+t);else if(i==="submit"||i==="reset"){n.removeAttribute("value");return}e.hasOwnProperty("value")?l1(n,e.type,t):e.hasOwnProperty("defaultValue")&&l1(n,e.type,go(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(n.defaultChecked=!!e.defaultChecked)}function h2(n,e,t){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var i=e.type;if(!(i!=="submit"&&i!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+n._wrapperState.initialValue,t||e===n.value||(n.value=e),n.defaultValue=e}t=n.name,t!==""&&(n.name=""),n.defaultChecked=!!n._wrapperState.initialChecked,t!==""&&(n.name=t)}function l1(n,e,t){(e!=="number"||$d(n.ownerDocument)!==n)&&(t==null?n.defaultValue=""+n._wrapperState.initialValue:n.defaultValue!==""+t&&(n.defaultValue=""+t))}var $c=Array.isArray;function Ol(n,e,t,i){if(n=n.options,e){e={};for(var r=0;r"+e.valueOf().toString()+"",e=Mh.firstChild;n.firstChild;)n.removeChild(n.firstChild);for(;e.firstChild;)n.appendChild(e.firstChild)}});function xu(n,e){if(e){var t=n.firstChild;if(t&&t===n.lastChild&&t.nodeType===3){t.nodeValue=e;return}}n.textContent=e}var iu={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},OC=["Webkit","ms","Moz","O"];Object.keys(iu).forEach(function(n){OC.forEach(function(e){e=e+n.charAt(0).toUpperCase()+n.substring(1),iu[e]=iu[n]})});function FM(n,e,t){return e==null||typeof e=="boolean"||e===""?"":t||typeof e!="number"||e===0||iu.hasOwnProperty(n)&&iu[n]?(""+e).trim():e+"px"}function kM(n,e){n=n.style;for(var t in e)if(e.hasOwnProperty(t)){var i=t.indexOf("--")===0,r=FM(t,e[t],i);t==="float"&&(t="cssFloat"),i?n.setProperty(t,r):n[t]=r}}var FC=ln({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function f1(n,e){if(e){if(FC[n]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(Ae(137,n));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(Ae(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(Ae(61))}if(e.style!=null&&typeof e.style!="object")throw Error(Ae(62))}}function h1(n,e){if(n.indexOf("-")===-1)return typeof e.is=="string";switch(n){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var d1=null;function ey(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var p1=null,Fl=null,kl=null;function m2(n){if(n=uf(n)){if(typeof p1!="function")throw Error(Ae(280));var e=n.stateNode;e&&(e=kp(e),p1(n.stateNode,n.type,e))}}function BM(n){Fl?kl?kl.push(n):kl=[n]:Fl=n}function HM(){if(Fl){var n=Fl,e=kl;if(kl=Fl=null,m2(n),e)for(n=0;n>>=0,n===0?32:31-(ZC(n)/KC|0)|0}var wh=64,Eh=4194304;function eu(n){switch(n&-n){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: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 n&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return n&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return n}}function ip(n,e){var t=n.pendingLanes;if(t===0)return 0;var i=0,r=n.suspendedLanes,s=n.pingedLanes,o=t&268435455;if(o!==0){var a=o&~r;a!==0?i=eu(a):(s&=o,s!==0&&(i=eu(s)))}else o=t&~r,o!==0?i=eu(o):s!==0&&(i=eu(s));if(i===0)return 0;if(e!==0&&e!==i&&!(e&r)&&(r=i&-i,s=e&-e,r>=s||r===16&&(s&4194240)!==0))return e;if(i&4&&(i|=t&16),e=n.entangledLanes,e!==0)for(n=n.entanglements,e&=i;0t;t++)e.push(n);return e}function lf(n,e,t){n.pendingLanes|=e,e!==536870912&&(n.suspendedLanes=0,n.pingedLanes=0),n=n.eventTimes,e=31-Rr(e),n[e]=t}function e5(n,e){var t=n.pendingLanes&~e;n.pendingLanes=e,n.suspendedLanes=0,n.pingedLanes=0,n.expiredLanes&=e,n.mutableReadLanes&=e,n.entangledLanes&=e,e=n.entanglements;var i=n.eventTimes;for(n=n.expirationTimes;0=su),E2=" ",T2=!1;function aw(n,e){switch(n){case"keyup":return b5.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function lw(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var Sl=!1;function P5(n,e){switch(n){case"compositionend":return lw(e);case"keypress":return e.which!==32?null:(T2=!0,E2);case"textInput":return n=e.data,n===E2&&T2?null:n;default:return null}}function L5(n,e){if(Sl)return n==="compositionend"||!ly&&aw(n,e)?(n=sw(),zd=sy=to=null,Sl=!1,n):null;switch(n){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1=e)return{node:t,offset:e-n};n=i}e:{for(;t;){if(t.nextSibling){t=t.nextSibling;break e}t=t.parentNode}t=void 0}t=R2(t)}}function hw(n,e){return n&&e?n===e?!0:n&&n.nodeType===3?!1:e&&e.nodeType===3?hw(n,e.parentNode):"contains"in n?n.contains(e):n.compareDocumentPosition?!!(n.compareDocumentPosition(e)&16):!1:!1}function dw(){for(var n=window,e=$d();e instanceof n.HTMLIFrameElement;){try{var t=typeof e.contentWindow.location.href=="string"}catch{t=!1}if(t)n=e.contentWindow;else break;e=$d(n.document)}return e}function cy(n){var e=n&&n.nodeName&&n.nodeName.toLowerCase();return e&&(e==="input"&&(n.type==="text"||n.type==="search"||n.type==="tel"||n.type==="url"||n.type==="password")||e==="textarea"||n.contentEditable==="true")}function B5(n){var e=dw(),t=n.focusedElem,i=n.selectionRange;if(e!==t&&t&&t.ownerDocument&&hw(t.ownerDocument.documentElement,t)){if(i!==null&&cy(t)){if(e=i.start,n=i.end,n===void 0&&(n=e),"selectionStart"in t)t.selectionStart=e,t.selectionEnd=Math.min(n,t.value.length);else if(n=(e=t.ownerDocument||document)&&e.defaultView||window,n.getSelection){n=n.getSelection();var r=t.textContent.length,s=Math.min(i.start,r);i=i.end===void 0?s:Math.min(i.end,r),!n.extend&&s>i&&(r=i,i=s,s=r),r=P2(t,s);var o=P2(t,i);r&&o&&(n.rangeCount!==1||n.anchorNode!==r.node||n.anchorOffset!==r.offset||n.focusNode!==o.node||n.focusOffset!==o.offset)&&(e=e.createRange(),e.setStart(r.node,r.offset),n.removeAllRanges(),s>i?(n.addRange(e),n.extend(o.node,o.offset)):(e.setEnd(o.node,o.offset),n.addRange(e)))}}for(e=[],n=t;n=n.parentNode;)n.nodeType===1&&e.push({element:n,left:n.scrollLeft,top:n.scrollTop});for(typeof t.focus=="function"&&t.focus(),t=0;t=document.documentMode,Ml=null,x1=null,au=null,S1=!1;function L2(n,e,t){var i=t.window===t?t.document:t.nodeType===9?t:t.ownerDocument;S1||Ml==null||Ml!==$d(i)||(i=Ml,"selectionStart"in i&&cy(i)?i={start:i.selectionStart,end:i.selectionEnd}:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection(),i={anchorNode:i.anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset}),au&&Au(au,i)||(au=i,i=op(x1,"onSelect"),0Tl||(n.current=C1[Tl],C1[Tl]=null,Tl--)}function Yt(n,e){Tl++,C1[Tl]=n.current,n.current=e}var vo={},li=Mo(vo),Pi=Mo(!1),ma=vo;function Xl(n,e){var t=n.type.contextTypes;if(!t)return vo;var i=n.stateNode;if(i&&i.__reactInternalMemoizedUnmaskedChildContext===e)return i.__reactInternalMemoizedMaskedChildContext;var r={},s;for(s in t)r[s]=e[s];return i&&(n=n.stateNode,n.__reactInternalMemoizedUnmaskedChildContext=e,n.__reactInternalMemoizedMaskedChildContext=r),r}function Li(n){return n=n.childContextTypes,n!=null}function lp(){Kt(Pi),Kt(li)}function F2(n,e,t){if(li.current!==vo)throw Error(Ae(168));Yt(li,e),Yt(Pi,t)}function Mw(n,e,t){var i=n.stateNode;if(e=e.childContextTypes,typeof i.getChildContext!="function")return t;i=i.getChildContext();for(var r in i)if(!(r in e))throw Error(Ae(108,UC(n)||"Unknown",r));return ln({},t,i)}function cp(n){return n=(n=n.stateNode)&&n.__reactInternalMemoizedMergedChildContext||vo,ma=li.current,Yt(li,n),Yt(Pi,Pi.current),!0}function k2(n,e,t){var i=n.stateNode;if(!i)throw Error(Ae(169));t?(n=Mw(n,e,ma),i.__reactInternalMemoizedMergedChildContext=n,Kt(Pi),Kt(li),Yt(li,n)):Kt(Pi),Yt(Pi,t)}var ms=null,Bp=!1,J0=!1;function ww(n){ms===null?ms=[n]:ms.push(n)}function Q5(n){Bp=!0,ww(n)}function wo(){if(!J0&&ms!==null){J0=!0;var n=0,e=Bt;try{var t=ms;for(Bt=1;n>=o,r-=o,ys=1<<32-Rr(e)+r|t<D?(b=L,L=null):b=L.sibling;var R=p(g,L,M[D],T);if(R===null){L===null&&(L=b);break}n&&L&&R.alternate===null&&e(g,L),x=s(R,x,D),C===null?P=R:C.sibling=R,C=R,L=b}if(D===M.length)return t(g,L),en&&Yo(g,D),P;if(L===null){for(;DD?(b=L,L=null):b=L.sibling;var k=p(g,L,R.value,T);if(k===null){L===null&&(L=b);break}n&&L&&k.alternate===null&&e(g,L),x=s(k,x,D),C===null?P=k:C.sibling=k,C=k,L=b}if(R.done)return t(g,L),en&&Yo(g,D),P;if(L===null){for(;!R.done;D++,R=M.next())R=d(g,R.value,T),R!==null&&(x=s(R,x,D),C===null?P=R:C.sibling=R,C=R);return en&&Yo(g,D),P}for(L=i(g,L);!R.done;D++,R=M.next())R=v(L,g,D,R.value,T),R!==null&&(n&&R.alternate!==null&&L.delete(R.key===null?D:R.key),x=s(R,x,D),C===null?P=R:C.sibling=R,C=R);return n&&L.forEach(function(q){return e(g,q)}),en&&Yo(g,D),P}function S(g,x,M,T){if(typeof M=="object"&&M!==null&&M.type===xl&&M.key===null&&(M=M.props.children),typeof M=="object"&&M!==null){switch(M.$$typeof){case xh:e:{for(var P=M.key,C=x;C!==null;){if(C.key===P){if(P=M.type,P===xl){if(C.tag===7){t(g,C.sibling),x=r(C,M.props.children),x.return=g,g=x;break e}}else if(C.elementType===P||typeof P=="object"&&P!==null&&P.$$typeof===Ks&&j2(P)===C.type){t(g,C.sibling),x=r(C,M.props),x.ref=zc(g,C,M),x.return=g,g=x;break e}t(g,C);break}else e(g,C);C=C.sibling}M.type===xl?(x=la(M.props.children,g.mode,T,M.key),x.return=g,g=x):(T=Wd(M.type,M.key,M.props,null,g.mode,T),T.ref=zc(g,x,M),T.return=g,g=T)}return o(g);case _l:e:{for(C=M.key;x!==null;){if(x.key===C)if(x.tag===4&&x.stateNode.containerInfo===M.containerInfo&&x.stateNode.implementation===M.implementation){t(g,x.sibling),x=r(x,M.children||[]),x.return=g,g=x;break e}else{t(g,x);break}else e(g,x);x=x.sibling}x=sg(M,g.mode,T),x.return=g,g=x}return o(g);case Ks:return C=M._init,S(g,x,C(M._payload),T)}if($c(M))return y(g,x,M,T);if(Lc(M))return w(g,x,M,T);Lh(g,M)}return typeof M=="string"&&M!==""||typeof M=="number"?(M=""+M,x!==null&&x.tag===6?(t(g,x.sibling),x=r(x,M),x.return=g,g=x):(t(g,x),x=rg(M,g.mode,T),x.return=g,g=x),o(g)):t(g,x)}return S}var Yl=Lw(!0),Iw=Lw(!1),ff={},qr=Mo(ff),Pu=Mo(ff),Lu=Mo(ff);function na(n){if(n===ff)throw Error(Ae(174));return n}function yy(n,e){switch(Yt(Lu,e),Yt(Pu,n),Yt(qr,ff),n=e.nodeType,n){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:u1(null,"");break;default:n=n===8?e.parentNode:e,e=n.namespaceURI||null,n=n.tagName,e=u1(e,n)}Kt(qr),Yt(qr,e)}function ql(){Kt(qr),Kt(Pu),Kt(Lu)}function Nw(n){na(Lu.current);var e=na(qr.current),t=u1(e,n.type);e!==t&&(Yt(Pu,n),Yt(qr,t))}function _y(n){Pu.current===n&&(Kt(qr),Kt(Pu))}var rn=Mo(0);function mp(n){for(var e=n;e!==null;){if(e.tag===13){var t=e.memoizedState;if(t!==null&&(t=t.dehydrated,t===null||t.data==="$?"||t.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&128)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===n)break;for(;e.sibling===null;){if(e.return===null||e.return===n)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var Q0=[];function xy(){for(var n=0;nt?t:4,n(!0);var i=$0.transition;$0.transition={};try{n(!1),e()}finally{Bt=t,$0.transition=i}}function Zw(){return mr().memoizedState}function nb(n,e,t){var i=uo(n);if(t={lane:i,action:t,hasEagerState:!1,eagerState:null,next:null},Kw(n))Jw(e,t);else if(t=Cw(n,e,t,i),t!==null){var r=gi();Pr(t,n,i,r),Qw(t,e,i)}}function ib(n,e,t){var i=uo(n),r={lane:i,action:t,hasEagerState:!1,eagerState:null,next:null};if(Kw(n))Jw(e,r);else{var s=n.alternate;if(n.lanes===0&&(s===null||s.lanes===0)&&(s=e.lastRenderedReducer,s!==null))try{var o=e.lastRenderedState,a=s(o,t);if(r.hasEagerState=!0,r.eagerState=a,Lr(a,o)){var u=e.interleaved;u===null?(r.next=r,gy(e)):(r.next=u.next,u.next=r),e.interleaved=r;return}}catch{}finally{}t=Cw(n,e,r,i),t!==null&&(r=gi(),Pr(t,n,i,r),Qw(t,e,i))}}function Kw(n){var e=n.alternate;return n===an||e!==null&&e===an}function Jw(n,e){lu=gp=!0;var t=n.pending;t===null?e.next=e:(e.next=t.next,t.next=e),n.pending=e}function Qw(n,e,t){if(t&4194240){var i=e.lanes;i&=n.pendingLanes,t|=i,e.lanes=t,ny(n,t)}}var vp={readContext:pr,useCallback:Qn,useContext:Qn,useEffect:Qn,useImperativeHandle:Qn,useInsertionEffect:Qn,useLayoutEffect:Qn,useMemo:Qn,useReducer:Qn,useRef:Qn,useState:Qn,useDebugValue:Qn,useDeferredValue:Qn,useTransition:Qn,useMutableSource:Qn,useSyncExternalStore:Qn,useId:Qn,unstable_isNewReconciler:!1},rb={readContext:pr,useCallback:function(n,e){return Wr().memoizedState=[n,e===void 0?null:e],n},useContext:pr,useEffect:q2,useImperativeHandle:function(n,e,t){return t=t!=null?t.concat([n]):null,Bd(4194308,4,Ww.bind(null,e,n),t)},useLayoutEffect:function(n,e){return Bd(4194308,4,n,e)},useInsertionEffect:function(n,e){return Bd(4,2,n,e)},useMemo:function(n,e){var t=Wr();return e=e===void 0?null:e,n=n(),t.memoizedState=[n,e],n},useReducer:function(n,e,t){var i=Wr();return e=t!==void 0?t(e):e,i.memoizedState=i.baseState=e,n={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:e},i.queue=n,n=n.dispatch=nb.bind(null,an,n),[i.memoizedState,n]},useRef:function(n){var e=Wr();return n={current:n},e.memoizedState=n},useState:Y2,useDebugValue:Ty,useDeferredValue:function(n){return Wr().memoizedState=n},useTransition:function(){var n=Y2(!1),e=n[0];return n=tb.bind(null,n[1]),Wr().memoizedState=n,[e,n]},useMutableSource:function(){},useSyncExternalStore:function(n,e,t){var i=an,r=Wr();if(en){if(t===void 0)throw Error(Ae(407));t=t()}else{if(t=e(),kn===null)throw Error(Ae(349));va&30||zw(i,e,t)}r.memoizedState=t;var s={value:t,getSnapshot:e};return r.queue=s,q2(Fw.bind(null,i,s,n),[n]),i.flags|=2048,Du(9,Ow.bind(null,i,s,t,e),void 0,null),t},useId:function(){var n=Wr(),e=kn.identifierPrefix;if(en){var t=_s,i=ys;t=(i&~(1<<32-Rr(i)-1)).toString(32)+t,e=":"+e+"R"+t,t=Iu++,0")&&(u=u.replace("",n.displayName)),u}while(1<=o&&0<=a);break}}}finally{O0=!1,Error.prepareStackTrace=t}return(n=n?n.displayName||n.name:"")?Qc(n):""}function DC(n){switch(n.tag){case 5:return Qc(n.type);case 16:return Qc("Lazy");case 13:return Qc("Suspense");case 19:return Qc("SuspenseList");case 0:case 2:case 15:return n=z0(n.type,!1),n;case 11:return n=z0(n.type.render,!1),n;case 1:return n=z0(n.type,!0),n;default:return""}}function s1(n){if(n==null)return null;if(typeof n=="function")return n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case xl:return"Fragment";case _l:return"Portal";case n1:return"Profiler";case Jv:return"StrictMode";case i1:return"Suspense";case r1:return"SuspenseList"}if(typeof n=="object")switch(n.$$typeof){case PM:return(n.displayName||"Context")+".Consumer";case RM:return(n._context.displayName||"Context")+".Provider";case Qv:var e=n.render;return n=n.displayName,n||(n=e.displayName||e.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case $v:return e=n.displayName||null,e!==null?e:s1(n.type)||"Memo";case Ks:e=n._payload,n=n._init;try{return s1(n(e))}catch{}}return null}function UC(n){var e=n.type;switch(n.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return n=e.render,n=n.displayName||n.name||"",e.displayName||(n!==""?"ForwardRef("+n+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return s1(e);case 8:return e===Jv?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function go(n){switch(typeof n){case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function IM(n){var e=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function OC(n){var e=IM(n)?"checked":"value",t=Object.getOwnPropertyDescriptor(n.constructor.prototype,e),i=""+n[e];if(!n.hasOwnProperty(e)&&typeof t<"u"&&typeof t.get=="function"&&typeof t.set=="function"){var r=t.get,s=t.set;return Object.defineProperty(n,e,{configurable:!0,get:function(){return r.call(this)},set:function(o){i=""+o,s.call(this,o)}}),Object.defineProperty(n,e,{enumerable:t.enumerable}),{getValue:function(){return i},setValue:function(o){i=""+o},stopTracking:function(){n._valueTracker=null,delete n[e]}}}}function Sh(n){n._valueTracker||(n._valueTracker=OC(n))}function NM(n){if(!n)return!1;var e=n._valueTracker;if(!e)return!0;var t=e.getValue(),i="";return n&&(i=IM(n)?n.checked?"true":"false":n.value),n=i,n!==t?(e.setValue(n),!0):!1}function $d(n){if(n=n||(typeof document<"u"?document:void 0),typeof n>"u")return null;try{return n.activeElement||n.body}catch{return n.body}}function o1(n,e){var t=e.checked;return ln({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:t??n._wrapperState.initialChecked})}function f2(n,e){var t=e.defaultValue==null?"":e.defaultValue,i=e.checked!=null?e.checked:e.defaultChecked;t=go(e.value!=null?e.value:t),n._wrapperState={initialChecked:i,initialValue:t,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function DM(n,e){e=e.checked,e!=null&&Kv(n,"checked",e,!1)}function a1(n,e){DM(n,e);var t=go(e.value),i=e.type;if(t!=null)i==="number"?(t===0&&n.value===""||n.value!=t)&&(n.value=""+t):n.value!==""+t&&(n.value=""+t);else if(i==="submit"||i==="reset"){n.removeAttribute("value");return}e.hasOwnProperty("value")?l1(n,e.type,t):e.hasOwnProperty("defaultValue")&&l1(n,e.type,go(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(n.defaultChecked=!!e.defaultChecked)}function h2(n,e,t){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var i=e.type;if(!(i!=="submit"&&i!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+n._wrapperState.initialValue,t||e===n.value||(n.value=e),n.defaultValue=e}t=n.name,t!==""&&(n.name=""),n.defaultChecked=!!n._wrapperState.initialChecked,t!==""&&(n.name=t)}function l1(n,e,t){(e!=="number"||$d(n.ownerDocument)!==n)&&(t==null?n.defaultValue=""+n._wrapperState.initialValue:n.defaultValue!==""+t&&(n.defaultValue=""+t))}var $c=Array.isArray;function zl(n,e,t,i){if(n=n.options,e){e={};for(var r=0;r"+e.valueOf().toString()+"",e=Mh.firstChild;n.firstChild;)n.removeChild(n.firstChild);for(;e.firstChild;)n.appendChild(e.firstChild)}});function xu(n,e){if(e){var t=n.firstChild;if(t&&t===n.lastChild&&t.nodeType===3){t.nodeValue=e;return}}n.textContent=e}var iu={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},zC=["Webkit","ms","Moz","O"];Object.keys(iu).forEach(function(n){zC.forEach(function(e){e=e+n.charAt(0).toUpperCase()+n.substring(1),iu[e]=iu[n]})});function FM(n,e,t){return e==null||typeof e=="boolean"||e===""?"":t||typeof e!="number"||e===0||iu.hasOwnProperty(n)&&iu[n]?(""+e).trim():e+"px"}function kM(n,e){n=n.style;for(var t in e)if(e.hasOwnProperty(t)){var i=t.indexOf("--")===0,r=FM(t,e[t],i);t==="float"&&(t="cssFloat"),i?n.setProperty(t,r):n[t]=r}}var FC=ln({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function f1(n,e){if(e){if(FC[n]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(Ae(137,n));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(Ae(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(Ae(61))}if(e.style!=null&&typeof e.style!="object")throw Error(Ae(62))}}function h1(n,e){if(n.indexOf("-")===-1)return typeof e.is=="string";switch(n){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var d1=null;function ey(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var p1=null,Fl=null,kl=null;function m2(n){if(n=uf(n)){if(typeof p1!="function")throw Error(Ae(280));var e=n.stateNode;e&&(e=kp(e),p1(n.stateNode,n.type,e))}}function BM(n){Fl?kl?kl.push(n):kl=[n]:Fl=n}function HM(){if(Fl){var n=Fl,e=kl;if(kl=Fl=null,m2(n),e)for(n=0;n>>=0,n===0?32:31-(ZC(n)/KC|0)|0}var wh=64,Eh=4194304;function eu(n){switch(n&-n){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: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 n&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return n&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return n}}function ip(n,e){var t=n.pendingLanes;if(t===0)return 0;var i=0,r=n.suspendedLanes,s=n.pingedLanes,o=t&268435455;if(o!==0){var a=o&~r;a!==0?i=eu(a):(s&=o,s!==0&&(i=eu(s)))}else o=t&~r,o!==0?i=eu(o):s!==0&&(i=eu(s));if(i===0)return 0;if(e!==0&&e!==i&&!(e&r)&&(r=i&-i,s=e&-e,r>=s||r===16&&(s&4194240)!==0))return e;if(i&4&&(i|=t&16),e=n.entangledLanes,e!==0)for(n=n.entanglements,e&=i;0t;t++)e.push(n);return e}function lf(n,e,t){n.pendingLanes|=e,e!==536870912&&(n.suspendedLanes=0,n.pingedLanes=0),n=n.eventTimes,e=31-Rr(e),n[e]=t}function e5(n,e){var t=n.pendingLanes&~e;n.pendingLanes=e,n.suspendedLanes=0,n.pingedLanes=0,n.expiredLanes&=e,n.mutableReadLanes&=e,n.entangledLanes&=e,e=n.entanglements;var i=n.eventTimes;for(n=n.expirationTimes;0=su),E2=" ",T2=!1;function aw(n,e){switch(n){case"keyup":return b5.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function lw(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var Sl=!1;function P5(n,e){switch(n){case"compositionend":return lw(e);case"keypress":return e.which!==32?null:(T2=!0,E2);case"textInput":return n=e.data,n===E2&&T2?null:n;default:return null}}function L5(n,e){if(Sl)return n==="compositionend"||!ly&&aw(n,e)?(n=sw(),Od=sy=to=null,Sl=!1,n):null;switch(n){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1=e)return{node:t,offset:e-n};n=i}e:{for(;t;){if(t.nextSibling){t=t.nextSibling;break e}t=t.parentNode}t=void 0}t=R2(t)}}function hw(n,e){return n&&e?n===e?!0:n&&n.nodeType===3?!1:e&&e.nodeType===3?hw(n,e.parentNode):"contains"in n?n.contains(e):n.compareDocumentPosition?!!(n.compareDocumentPosition(e)&16):!1:!1}function dw(){for(var n=window,e=$d();e instanceof n.HTMLIFrameElement;){try{var t=typeof e.contentWindow.location.href=="string"}catch{t=!1}if(t)n=e.contentWindow;else break;e=$d(n.document)}return e}function cy(n){var e=n&&n.nodeName&&n.nodeName.toLowerCase();return e&&(e==="input"&&(n.type==="text"||n.type==="search"||n.type==="tel"||n.type==="url"||n.type==="password")||e==="textarea"||n.contentEditable==="true")}function B5(n){var e=dw(),t=n.focusedElem,i=n.selectionRange;if(e!==t&&t&&t.ownerDocument&&hw(t.ownerDocument.documentElement,t)){if(i!==null&&cy(t)){if(e=i.start,n=i.end,n===void 0&&(n=e),"selectionStart"in t)t.selectionStart=e,t.selectionEnd=Math.min(n,t.value.length);else if(n=(e=t.ownerDocument||document)&&e.defaultView||window,n.getSelection){n=n.getSelection();var r=t.textContent.length,s=Math.min(i.start,r);i=i.end===void 0?s:Math.min(i.end,r),!n.extend&&s>i&&(r=i,i=s,s=r),r=P2(t,s);var o=P2(t,i);r&&o&&(n.rangeCount!==1||n.anchorNode!==r.node||n.anchorOffset!==r.offset||n.focusNode!==o.node||n.focusOffset!==o.offset)&&(e=e.createRange(),e.setStart(r.node,r.offset),n.removeAllRanges(),s>i?(n.addRange(e),n.extend(o.node,o.offset)):(e.setEnd(o.node,o.offset),n.addRange(e)))}}for(e=[],n=t;n=n.parentNode;)n.nodeType===1&&e.push({element:n,left:n.scrollLeft,top:n.scrollTop});for(typeof t.focus=="function"&&t.focus(),t=0;t=document.documentMode,Ml=null,x1=null,au=null,S1=!1;function L2(n,e,t){var i=t.window===t?t.document:t.nodeType===9?t:t.ownerDocument;S1||Ml==null||Ml!==$d(i)||(i=Ml,"selectionStart"in i&&cy(i)?i={start:i.selectionStart,end:i.selectionEnd}:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection(),i={anchorNode:i.anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset}),au&&Au(au,i)||(au=i,i=op(x1,"onSelect"),0Tl||(n.current=C1[Tl],C1[Tl]=null,Tl--)}function Yt(n,e){Tl++,C1[Tl]=n.current,n.current=e}var vo={},li=Mo(vo),Pi=Mo(!1),ma=vo;function Xl(n,e){var t=n.type.contextTypes;if(!t)return vo;var i=n.stateNode;if(i&&i.__reactInternalMemoizedUnmaskedChildContext===e)return i.__reactInternalMemoizedMaskedChildContext;var r={},s;for(s in t)r[s]=e[s];return i&&(n=n.stateNode,n.__reactInternalMemoizedUnmaskedChildContext=e,n.__reactInternalMemoizedMaskedChildContext=r),r}function Li(n){return n=n.childContextTypes,n!=null}function lp(){Kt(Pi),Kt(li)}function F2(n,e,t){if(li.current!==vo)throw Error(Ae(168));Yt(li,e),Yt(Pi,t)}function Mw(n,e,t){var i=n.stateNode;if(e=e.childContextTypes,typeof i.getChildContext!="function")return t;i=i.getChildContext();for(var r in i)if(!(r in e))throw Error(Ae(108,UC(n)||"Unknown",r));return ln({},t,i)}function cp(n){return n=(n=n.stateNode)&&n.__reactInternalMemoizedMergedChildContext||vo,ma=li.current,Yt(li,n),Yt(Pi,Pi.current),!0}function k2(n,e,t){var i=n.stateNode;if(!i)throw Error(Ae(169));t?(n=Mw(n,e,ma),i.__reactInternalMemoizedMergedChildContext=n,Kt(Pi),Kt(li),Yt(li,n)):Kt(Pi),Yt(Pi,t)}var ms=null,Bp=!1,J0=!1;function ww(n){ms===null?ms=[n]:ms.push(n)}function Q5(n){Bp=!0,ww(n)}function wo(){if(!J0&&ms!==null){J0=!0;var n=0,e=Bt;try{var t=ms;for(Bt=1;n>=o,r-=o,ys=1<<32-Rr(e)+r|t<D?(b=L,L=null):b=L.sibling;var R=p(g,L,M[D],T);if(R===null){L===null&&(L=b);break}n&&L&&R.alternate===null&&e(g,L),x=s(R,x,D),C===null?P=R:C.sibling=R,C=R,L=b}if(D===M.length)return t(g,L),en&&Yo(g,D),P;if(L===null){for(;DD?(b=L,L=null):b=L.sibling;var k=p(g,L,R.value,T);if(k===null){L===null&&(L=b);break}n&&L&&k.alternate===null&&e(g,L),x=s(k,x,D),C===null?P=k:C.sibling=k,C=k,L=b}if(R.done)return t(g,L),en&&Yo(g,D),P;if(L===null){for(;!R.done;D++,R=M.next())R=d(g,R.value,T),R!==null&&(x=s(R,x,D),C===null?P=R:C.sibling=R,C=R);return en&&Yo(g,D),P}for(L=i(g,L);!R.done;D++,R=M.next())R=v(L,g,D,R.value,T),R!==null&&(n&&R.alternate!==null&&L.delete(R.key===null?D:R.key),x=s(R,x,D),C===null?P=R:C.sibling=R,C=R);return n&&L.forEach(function(q){return e(g,q)}),en&&Yo(g,D),P}function S(g,x,M,T){if(typeof M=="object"&&M!==null&&M.type===xl&&M.key===null&&(M=M.props.children),typeof M=="object"&&M!==null){switch(M.$$typeof){case xh:e:{for(var P=M.key,C=x;C!==null;){if(C.key===P){if(P=M.type,P===xl){if(C.tag===7){t(g,C.sibling),x=r(C,M.props.children),x.return=g,g=x;break e}}else if(C.elementType===P||typeof P=="object"&&P!==null&&P.$$typeof===Ks&&j2(P)===C.type){t(g,C.sibling),x=r(C,M.props),x.ref=Oc(g,C,M),x.return=g,g=x;break e}t(g,C);break}else e(g,C);C=C.sibling}M.type===xl?(x=la(M.props.children,g.mode,T,M.key),x.return=g,g=x):(T=Wd(M.type,M.key,M.props,null,g.mode,T),T.ref=Oc(g,x,M),T.return=g,g=T)}return o(g);case _l:e:{for(C=M.key;x!==null;){if(x.key===C)if(x.tag===4&&x.stateNode.containerInfo===M.containerInfo&&x.stateNode.implementation===M.implementation){t(g,x.sibling),x=r(x,M.children||[]),x.return=g,g=x;break e}else{t(g,x);break}else e(g,x);x=x.sibling}x=sg(M,g.mode,T),x.return=g,g=x}return o(g);case Ks:return C=M._init,S(g,x,C(M._payload),T)}if($c(M))return y(g,x,M,T);if(Lc(M))return w(g,x,M,T);Lh(g,M)}return typeof M=="string"&&M!==""||typeof M=="number"?(M=""+M,x!==null&&x.tag===6?(t(g,x.sibling),x=r(x,M),x.return=g,g=x):(t(g,x),x=rg(M,g.mode,T),x.return=g,g=x),o(g)):t(g,x)}return S}var Yl=Lw(!0),Iw=Lw(!1),ff={},qr=Mo(ff),Pu=Mo(ff),Lu=Mo(ff);function na(n){if(n===ff)throw Error(Ae(174));return n}function yy(n,e){switch(Yt(Lu,e),Yt(Pu,n),Yt(qr,ff),n=e.nodeType,n){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:u1(null,"");break;default:n=n===8?e.parentNode:e,e=n.namespaceURI||null,n=n.tagName,e=u1(e,n)}Kt(qr),Yt(qr,e)}function ql(){Kt(qr),Kt(Pu),Kt(Lu)}function Nw(n){na(Lu.current);var e=na(qr.current),t=u1(e,n.type);e!==t&&(Yt(Pu,n),Yt(qr,t))}function _y(n){Pu.current===n&&(Kt(qr),Kt(Pu))}var rn=Mo(0);function mp(n){for(var e=n;e!==null;){if(e.tag===13){var t=e.memoizedState;if(t!==null&&(t=t.dehydrated,t===null||t.data==="$?"||t.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&128)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===n)break;for(;e.sibling===null;){if(e.return===null||e.return===n)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var Q0=[];function xy(){for(var n=0;nt?t:4,n(!0);var i=$0.transition;$0.transition={};try{n(!1),e()}finally{Bt=t,$0.transition=i}}function Zw(){return mr().memoizedState}function nb(n,e,t){var i=uo(n);if(t={lane:i,action:t,hasEagerState:!1,eagerState:null,next:null},Kw(n))Jw(e,t);else if(t=Cw(n,e,t,i),t!==null){var r=gi();Pr(t,n,i,r),Qw(t,e,i)}}function ib(n,e,t){var i=uo(n),r={lane:i,action:t,hasEagerState:!1,eagerState:null,next:null};if(Kw(n))Jw(e,r);else{var s=n.alternate;if(n.lanes===0&&(s===null||s.lanes===0)&&(s=e.lastRenderedReducer,s!==null))try{var o=e.lastRenderedState,a=s(o,t);if(r.hasEagerState=!0,r.eagerState=a,Lr(a,o)){var u=e.interleaved;u===null?(r.next=r,gy(e)):(r.next=u.next,u.next=r),e.interleaved=r;return}}catch{}finally{}t=Cw(n,e,r,i),t!==null&&(r=gi(),Pr(t,n,i,r),Qw(t,e,i))}}function Kw(n){var e=n.alternate;return n===an||e!==null&&e===an}function Jw(n,e){lu=gp=!0;var t=n.pending;t===null?e.next=e:(e.next=t.next,t.next=e),n.pending=e}function Qw(n,e,t){if(t&4194240){var i=e.lanes;i&=n.pendingLanes,t|=i,e.lanes=t,ny(n,t)}}var vp={readContext:pr,useCallback:Qn,useContext:Qn,useEffect:Qn,useImperativeHandle:Qn,useInsertionEffect:Qn,useLayoutEffect:Qn,useMemo:Qn,useReducer:Qn,useRef:Qn,useState:Qn,useDebugValue:Qn,useDeferredValue:Qn,useTransition:Qn,useMutableSource:Qn,useSyncExternalStore:Qn,useId:Qn,unstable_isNewReconciler:!1},rb={readContext:pr,useCallback:function(n,e){return Wr().memoizedState=[n,e===void 0?null:e],n},useContext:pr,useEffect:q2,useImperativeHandle:function(n,e,t){return t=t!=null?t.concat([n]):null,Bd(4194308,4,Ww.bind(null,e,n),t)},useLayoutEffect:function(n,e){return Bd(4194308,4,n,e)},useInsertionEffect:function(n,e){return Bd(4,2,n,e)},useMemo:function(n,e){var t=Wr();return e=e===void 0?null:e,n=n(),t.memoizedState=[n,e],n},useReducer:function(n,e,t){var i=Wr();return e=t!==void 0?t(e):e,i.memoizedState=i.baseState=e,n={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:e},i.queue=n,n=n.dispatch=nb.bind(null,an,n),[i.memoizedState,n]},useRef:function(n){var e=Wr();return n={current:n},e.memoizedState=n},useState:Y2,useDebugValue:Ty,useDeferredValue:function(n){return Wr().memoizedState=n},useTransition:function(){var n=Y2(!1),e=n[0];return n=tb.bind(null,n[1]),Wr().memoizedState=n,[e,n]},useMutableSource:function(){},useSyncExternalStore:function(n,e,t){var i=an,r=Wr();if(en){if(t===void 0)throw Error(Ae(407));t=t()}else{if(t=e(),kn===null)throw Error(Ae(349));va&30||Ow(i,e,t)}r.memoizedState=t;var s={value:t,getSnapshot:e};return r.queue=s,q2(Fw.bind(null,i,s,n),[n]),i.flags|=2048,Du(9,zw.bind(null,i,s,t,e),void 0,null),t},useId:function(){var n=Wr(),e=kn.identifierPrefix;if(en){var t=_s,i=ys;t=(i&~(1<<32-Rr(i)-1)).toString(32)+t,e=":"+e+"R"+t,t=Iu++,0<\/script>",n=n.removeChild(n.firstChild)):typeof i.is=="string"?n=o.createElement(t,{is:i.is}):(n=o.createElement(t),t==="select"&&(o=n,i.multiple?o.multiple=!0:i.size&&(o.size=i.size))):n=o.createElementNS(n,t),n[Xr]=e,n[Ru]=i,aE(n,e,!1,!1),e.stateNode=n;e:{switch(o=h1(t,i),t){case"dialog":Zt("cancel",n),Zt("close",n),r=i;break;case"iframe":case"object":case"embed":Zt("load",n),r=i;break;case"video":case"audio":for(r=0;rKl&&(e.flags|=128,i=!0,Oc(s,!1),e.lanes=4194304)}else{if(!i)if(n=mp(o),n!==null){if(e.flags|=128,i=!0,t=n.updateQueue,t!==null&&(e.updateQueue=t,e.flags|=4),Oc(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!en)return $n(e),null}else 2*xn()-s.renderingStartTime>Kl&&t!==1073741824&&(e.flags|=128,i=!0,Oc(s,!1),e.lanes=4194304);s.isBackwards?(o.sibling=e.child,e.child=o):(t=s.last,t!==null?t.sibling=o:e.child=o,s.last=o)}return s.tail!==null?(e=s.tail,s.rendering=e,s.tail=e.sibling,s.renderingStartTime=xn(),e.sibling=null,t=rn.current,Yt(rn,i?t&1|2:t&1),e):($n(e),null);case 22:case 23:return Ly(),i=e.memoizedState!==null,n!==null&&n.memoizedState!==null!==i&&(e.flags|=8192),i&&e.mode&1?Hi&1073741824&&($n(e),e.subtreeFlags&6&&(e.flags|=8192)):$n(e),null;case 24:return null;case 25:return null}throw Error(Ae(156,e.tag))}function hb(n,e){switch(fy(e),e.tag){case 1:return Li(e.type)&&lp(),n=e.flags,n&65536?(e.flags=n&-65537|128,e):null;case 3:return ql(),Kt(Pi),Kt(li),xy(),n=e.flags,n&65536&&!(n&128)?(e.flags=n&-65537|128,e):null;case 5:return _y(e),null;case 13:if(Kt(rn),n=e.memoizedState,n!==null&&n.dehydrated!==null){if(e.alternate===null)throw Error(Ae(340));jl()}return n=e.flags,n&65536?(e.flags=n&-65537|128,e):null;case 19:return Kt(rn),null;case 4:return ql(),null;case 10:return my(e.type._context),null;case 22:case 23:return Ly(),null;case 24:return null;default:return null}}var Nh=!1,ri=!1,db=typeof WeakSet=="function"?WeakSet:Set,Ve=null;function Rl(n,e){var t=n.ref;if(t!==null)if(typeof t=="function")try{t(null)}catch(i){hn(n,e,i)}else t.current=null}function k1(n,e,t){try{t()}catch(i){hn(n,e,i)}}var iS=!1;function pb(n,e){if(M1=rp,n=dw(),cy(n)){if("selectionStart"in n)var t={start:n.selectionStart,end:n.selectionEnd};else e:{t=(t=n.ownerDocument)&&t.defaultView||window;var i=t.getSelection&&t.getSelection();if(i&&i.rangeCount!==0){t=i.anchorNode;var r=i.anchorOffset,s=i.focusNode;i=i.focusOffset;try{t.nodeType,s.nodeType}catch{t=null;break e}var o=0,a=-1,u=-1,f=0,h=0,d=n,p=null;t:for(;;){for(var v;d!==t||r!==0&&d.nodeType!==3||(a=o+r),d!==s||i!==0&&d.nodeType!==3||(u=o+i),d.nodeType===3&&(o+=d.nodeValue.length),(v=d.firstChild)!==null;)p=d,d=v;for(;;){if(d===n)break t;if(p===t&&++f===r&&(a=o),p===s&&++h===i&&(u=o),(v=d.nextSibling)!==null)break;d=p,p=d.parentNode}d=v}t=a===-1||u===-1?null:{start:a,end:u}}else t=null}t=t||{start:0,end:0}}else t=null;for(w1={focusedElem:n,selectionRange:t},rp=!1,Ve=e;Ve!==null;)if(e=Ve,n=e.child,(e.subtreeFlags&1028)!==0&&n!==null)n.return=e,Ve=n;else for(;Ve!==null;){e=Ve;try{var y=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var w=y.memoizedProps,S=y.memoizedState,g=e.stateNode,x=g.getSnapshotBeforeUpdate(e.elementType===e.type?w:wr(e.type,w),S);g.__reactInternalSnapshotBeforeUpdate=x}break;case 3:var M=e.stateNode.containerInfo;M.nodeType===1?M.textContent="":M.nodeType===9&&M.documentElement&&M.removeChild(M.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Ae(163))}}catch(T){hn(e,e.return,T)}if(n=e.sibling,n!==null){n.return=e.return,Ve=n;break}Ve=e.return}return y=iS,iS=!1,y}function cu(n,e,t){var i=e.updateQueue;if(i=i!==null?i.lastEffect:null,i!==null){var r=i=i.next;do{if((r.tag&n)===n){var s=r.destroy;r.destroy=void 0,s!==void 0&&k1(e,t,s)}r=r.next}while(r!==i)}}function Gp(n,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var t=e=e.next;do{if((t.tag&n)===n){var i=t.create;t.destroy=i()}t=t.next}while(t!==e)}}function B1(n){var e=n.ref;if(e!==null){var t=n.stateNode;switch(n.tag){case 5:n=t;break;default:n=t}typeof e=="function"?e(n):e.current=n}}function uE(n){var e=n.alternate;e!==null&&(n.alternate=null,uE(e)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(e=n.stateNode,e!==null&&(delete e[Xr],delete e[Ru],delete e[A1],delete e[K5],delete e[J5])),n.stateNode=null,n.return=null,n.dependencies=null,n.memoizedProps=null,n.memoizedState=null,n.pendingProps=null,n.stateNode=null,n.updateQueue=null}function fE(n){return n.tag===5||n.tag===3||n.tag===4}function rS(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||fE(n.return))return null;n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==5&&n.tag!==6&&n.tag!==18;){if(n.flags&2||n.child===null||n.tag===4)continue e;n.child.return=n,n=n.child}if(!(n.flags&2))return n.stateNode}}function H1(n,e,t){var i=n.tag;if(i===5||i===6)n=n.stateNode,e?t.nodeType===8?t.parentNode.insertBefore(n,e):t.insertBefore(n,e):(t.nodeType===8?(e=t.parentNode,e.insertBefore(n,t)):(e=t,e.appendChild(n)),t=t._reactRootContainer,t!=null||e.onclick!==null||(e.onclick=ap));else if(i!==4&&(n=n.child,n!==null))for(H1(n,e,t),n=n.sibling;n!==null;)H1(n,e,t),n=n.sibling}function V1(n,e,t){var i=n.tag;if(i===5||i===6)n=n.stateNode,e?t.insertBefore(n,e):t.appendChild(n);else if(i!==4&&(n=n.child,n!==null))for(V1(n,e,t),n=n.sibling;n!==null;)V1(n,e,t),n=n.sibling}var Wn=null,Tr=!1;function Vs(n,e,t){for(t=t.child;t!==null;)hE(n,e,t),t=t.sibling}function hE(n,e,t){if(Yr&&typeof Yr.onCommitFiberUnmount=="function")try{Yr.onCommitFiberUnmount(Up,t)}catch{}switch(t.tag){case 5:ri||Rl(t,e);case 6:var i=Wn,r=Tr;Wn=null,Vs(n,e,t),Wn=i,Tr=r,Wn!==null&&(Tr?(n=Wn,t=t.stateNode,n.nodeType===8?n.parentNode.removeChild(t):n.removeChild(t)):Wn.removeChild(t.stateNode));break;case 18:Wn!==null&&(Tr?(n=Wn,t=t.stateNode,n.nodeType===8?K0(n.parentNode,t):n.nodeType===1&&K0(n,t),Eu(n)):K0(Wn,t.stateNode));break;case 4:i=Wn,r=Tr,Wn=t.stateNode.containerInfo,Tr=!0,Vs(n,e,t),Wn=i,Tr=r;break;case 0:case 11:case 14:case 15:if(!ri&&(i=t.updateQueue,i!==null&&(i=i.lastEffect,i!==null))){r=i=i.next;do{var s=r,o=s.destroy;s=s.tag,o!==void 0&&(s&2||s&4)&&k1(t,e,o),r=r.next}while(r!==i)}Vs(n,e,t);break;case 1:if(!ri&&(Rl(t,e),i=t.stateNode,typeof i.componentWillUnmount=="function"))try{i.props=t.memoizedProps,i.state=t.memoizedState,i.componentWillUnmount()}catch(a){hn(t,e,a)}Vs(n,e,t);break;case 21:Vs(n,e,t);break;case 22:t.mode&1?(ri=(i=ri)||t.memoizedState!==null,Vs(n,e,t),ri=i):Vs(n,e,t);break;default:Vs(n,e,t)}}function sS(n){var e=n.updateQueue;if(e!==null){n.updateQueue=null;var t=n.stateNode;t===null&&(t=n.stateNode=new db),e.forEach(function(i){var r=wb.bind(null,n,i);t.has(i)||(t.add(i),i.then(r,r))})}}function _r(n,e){var t=e.deletions;if(t!==null)for(var i=0;ir&&(r=o),i&=~s}if(i=r,i=xn()-i,i=(120>i?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*gb(i/1960))-i,10n?16:n,no===null)var i=!1;else{if(n=no,no=null,xp=0,Nt&6)throw Error(Ae(331));var r=Nt;for(Nt|=4,Ve=n.current;Ve!==null;){var s=Ve,o=s.child;if(Ve.flags&16){var a=s.deletions;if(a!==null){for(var u=0;uxn()-Ry?aa(n,0):by|=t),Ii(n,e)}function xE(n,e){e===0&&(n.mode&1?(e=Eh,Eh<<=1,!(Eh&130023424)&&(Eh=4194304)):e=1);var t=gi();n=Cs(n,e),n!==null&&(lf(n,e,t),Ii(n,t))}function Mb(n){var e=n.memoizedState,t=0;e!==null&&(t=e.retryLane),xE(n,t)}function wb(n,e){var t=0;switch(n.tag){case 13:var i=n.stateNode,r=n.memoizedState;r!==null&&(t=r.retryLane);break;case 19:i=n.stateNode;break;default:throw Error(Ae(314))}i!==null&&i.delete(e),xE(n,t)}var SE;SE=function(n,e,t){if(n!==null)if(n.memoizedProps!==e.pendingProps||Pi.current)Ri=!0;else{if(!(n.lanes&t)&&!(e.flags&128))return Ri=!1,ub(n,e,t);Ri=!!(n.flags&131072)}else Ri=!1,en&&e.flags&1048576&&Ew(e,fp,e.index);switch(e.lanes=0,e.tag){case 2:var i=e.type;Hd(n,e),n=e.pendingProps;var r=Xl(e,li.current);Hl(e,t),r=My(null,e,i,n,r,t);var s=wy();return e.flags|=1,typeof r=="object"&&r!==null&&typeof r.render=="function"&&r.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,Li(i)?(s=!0,cp(e)):s=!1,e.memoizedState=r.state!==null&&r.state!==void 0?r.state:null,vy(e),r.updater=Hp,e.stateNode=r,r._reactInternals=e,I1(e,i,n,t),e=U1(null,e,i,!0,s,t)):(e.tag=0,en&&s&&uy(e),di(null,e,r,t),e=e.child),e;case 16:i=e.elementType;e:{switch(Hd(n,e),n=e.pendingProps,r=i._init,i=r(i._payload),e.type=i,r=e.tag=Tb(i),n=wr(i,n),r){case 0:e=D1(null,e,i,n,t);break e;case 1:e=eS(null,e,i,n,t);break e;case 11:e=Q2(null,e,i,n,t);break e;case 14:e=$2(null,e,i,wr(i.type,n),t);break e}throw Error(Ae(306,i,""))}return e;case 0:return i=e.type,r=e.pendingProps,r=e.elementType===i?r:wr(i,r),D1(n,e,i,r,t);case 1:return i=e.type,r=e.pendingProps,r=e.elementType===i?r:wr(i,r),eS(n,e,i,r,t);case 3:e:{if(rE(e),n===null)throw Error(Ae(387));i=e.pendingProps,s=e.memoizedState,r=s.element,bw(n,e),pp(e,i,null,t);var o=e.memoizedState;if(i=o.element,s.isDehydrated)if(s={element:i,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},e.updateQueue.baseState=s,e.memoizedState=s,e.flags&256){r=Zl(Error(Ae(423)),e),e=tS(n,e,i,t,r);break e}else if(i!==r){r=Zl(Error(Ae(424)),e),e=tS(n,e,i,t,r);break e}else for(Wi=ao(e.stateNode.containerInfo.firstChild),ji=e,en=!0,Ar=null,t=Iw(e,null,i,t),e.child=t;t;)t.flags=t.flags&-3|4096,t=t.sibling;else{if(jl(),i===r){e=bs(n,e,t);break e}di(n,e,i,t)}e=e.child}return e;case 5:return Nw(e),n===null&&R1(e),i=e.type,r=e.pendingProps,s=n!==null?n.memoizedProps:null,o=r.children,E1(i,r)?o=null:s!==null&&E1(i,s)&&(e.flags|=32),iE(n,e),di(n,e,o,t),e.child;case 6:return n===null&&R1(e),null;case 13:return sE(n,e,t);case 4:return yy(e,e.stateNode.containerInfo),i=e.pendingProps,n===null?e.child=Yl(e,null,i,t):di(n,e,i,t),e.child;case 11:return i=e.type,r=e.pendingProps,r=e.elementType===i?r:wr(i,r),Q2(n,e,i,r,t);case 7:return di(n,e,e.pendingProps,t),e.child;case 8:return di(n,e,e.pendingProps.children,t),e.child;case 12:return di(n,e,e.pendingProps.children,t),e.child;case 10:e:{if(i=e.type._context,r=e.pendingProps,s=e.memoizedProps,o=r.value,Yt(hp,i._currentValue),i._currentValue=o,s!==null)if(Lr(s.value,o)){if(s.children===r.children&&!Pi.current){e=bs(n,e,t);break e}}else for(s=e.child,s!==null&&(s.return=e);s!==null;){var a=s.dependencies;if(a!==null){o=s.child;for(var u=a.firstContext;u!==null;){if(u.context===i){if(s.tag===1){u=ws(-1,t&-t),u.tag=2;var f=s.updateQueue;if(f!==null){f=f.shared;var h=f.pending;h===null?u.next=u:(u.next=h.next,h.next=u),f.pending=u}}s.lanes|=t,u=s.alternate,u!==null&&(u.lanes|=t),P1(s.return,t,e),a.lanes|=t;break}u=u.next}}else if(s.tag===10)o=s.type===e.type?null:s.child;else if(s.tag===18){if(o=s.return,o===null)throw Error(Ae(341));o.lanes|=t,a=o.alternate,a!==null&&(a.lanes|=t),P1(o,t,e),o=s.sibling}else o=s.child;if(o!==null)o.return=s;else for(o=s;o!==null;){if(o===e){o=null;break}if(s=o.sibling,s!==null){s.return=o.return,o=s;break}o=o.return}s=o}di(n,e,r.children,t),e=e.child}return e;case 9:return r=e.type,i=e.pendingProps.children,Hl(e,t),r=pr(r),i=i(r),e.flags|=1,di(n,e,i,t),e.child;case 14:return i=e.type,r=wr(i,e.pendingProps),r=wr(i.type,r),$2(n,e,i,r,t);case 15:return tE(n,e,e.type,e.pendingProps,t);case 17:return i=e.type,r=e.pendingProps,r=e.elementType===i?r:wr(i,r),Hd(n,e),e.tag=1,Li(i)?(n=!0,cp(e)):n=!1,Hl(e,t),Pw(e,i,r),I1(e,i,r,t),U1(null,e,i,!0,n,t);case 19:return oE(n,e,t);case 22:return nE(n,e,t)}throw Error(Ae(156,e.tag))};function ME(n,e){return qM(n,e)}function Eb(n,e,t,i){this.tag=n,this.key=t,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=i,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function fr(n,e,t,i){return new Eb(n,e,t,i)}function Ny(n){return n=n.prototype,!(!n||!n.isReactComponent)}function Tb(n){if(typeof n=="function")return Ny(n)?1:0;if(n!=null){if(n=n.$$typeof,n===Qv)return 11;if(n===$v)return 14}return 2}function fo(n,e){var t=n.alternate;return t===null?(t=fr(n.tag,e,n.key,n.mode),t.elementType=n.elementType,t.type=n.type,t.stateNode=n.stateNode,t.alternate=n,n.alternate=t):(t.pendingProps=e,t.type=n.type,t.flags=0,t.subtreeFlags=0,t.deletions=null),t.flags=n.flags&14680064,t.childLanes=n.childLanes,t.lanes=n.lanes,t.child=n.child,t.memoizedProps=n.memoizedProps,t.memoizedState=n.memoizedState,t.updateQueue=n.updateQueue,e=n.dependencies,t.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},t.sibling=n.sibling,t.index=n.index,t.ref=n.ref,t}function Wd(n,e,t,i,r,s){var o=2;if(i=n,typeof n=="function")Ny(n)&&(o=1);else if(typeof n=="string")o=5;else e:switch(n){case xl:return la(t.children,r,s,e);case Jv:o=8,r|=8;break;case n1:return n=fr(12,t,e,r|2),n.elementType=n1,n.lanes=s,n;case i1:return n=fr(13,t,e,r),n.elementType=i1,n.lanes=s,n;case r1:return n=fr(19,t,e,r),n.elementType=r1,n.lanes=s,n;case LM:return Xp(t,r,s,e);default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case RM:o=10;break e;case PM:o=9;break e;case Qv:o=11;break e;case $v:o=14;break e;case Ks:o=16,i=null;break e}throw Error(Ae(130,n==null?n:typeof n,""))}return e=fr(o,t,e,r),e.elementType=n,e.type=i,e.lanes=s,e}function la(n,e,t,i){return n=fr(7,n,i,e),n.lanes=t,n}function Xp(n,e,t,i){return n=fr(22,n,i,e),n.elementType=LM,n.lanes=t,n.stateNode={isHidden:!1},n}function rg(n,e,t){return n=fr(6,n,null,e),n.lanes=t,n}function sg(n,e,t){return e=fr(4,n.children!==null?n.children:[],n.key,e),e.lanes=t,e.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},e}function Ab(n,e,t,i,r){this.tag=e,this.containerInfo=n,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=k0(0),this.expirationTimes=k0(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=k0(0),this.identifierPrefix=i,this.onRecoverableError=r,this.mutableSourceEagerHydrationData=null}function Dy(n,e,t,i,r,s,o,a,u){return n=new Ab(n,e,t,a,u),e===1?(e=1,s===!0&&(e|=8)):e=0,s=fr(3,null,null,e),n.current=s,s.stateNode=n,s.memoizedState={element:i,isDehydrated:t,cache:null,transitions:null,pendingSuspenseBoundaries:null},vy(s),n}function Cb(n,e,t){var i=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(AE)}catch(n){console.error(n)}}AE(),EM.exports=Zi;var Ib=EM.exports,dS=Ib;e1.createRoot=dS.createRoot,e1.hydrateRoot=dS.hydrateRoot;var CE={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},pS=Pt.createContext&&Pt.createContext(CE),Nb=["attr","size","title"];function Db(n,e){if(n==null)return{};var t=Ub(n,e),i,r;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(n);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(n,i)&&(t[i]=n[i])}return t}function Ub(n,e){if(n==null)return{};var t={},i=Object.keys(n),r,s;for(s=0;s=0)&&(t[r]=n[r]);return t}function wp(){return wp=Object.assign?Object.assign.bind():function(n){for(var e=1;ePt.createElement(e.tag,Ep({key:t},e.attr),bE(e.child)))}function Vt(n){return e=>Pt.createElement(kb,wp({attr:Ep({},n.attr)},e),bE(n.child))}function kb(n){var e=t=>{var{attr:i,size:r,title:s}=n,o=Db(n,Nb),a=r||t.size||"1em",u;return t.className&&(u=t.className),n.className&&(u=(u?u+" ":"")+n.className),Pt.createElement("svg",wp({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},t.attr,i,o,{className:u,style:Ep(Ep({color:n.color||t.color},t.style),n.style),height:a,width:a,xmlns:"http://www.w3.org/2000/svg"}),s&&Pt.createElement("title",null,s),n.children)};return pS!==void 0?Pt.createElement(pS.Consumer,null,t=>e(t)):e(CE)}function Bb(n){return Vt({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M1 8a7 7 0 1 0 14 0A7 7 0 0 0 1 8Zm15 0A8 8 0 1 1 0 8a8 8 0 0 1 16 0ZM8.146 4.992c-1.212 0-1.927.92-1.927 2.502v1.06c0 1.571.703 2.462 1.927 2.462.979 0 1.641-.586 1.729-1.418h1.295v.093c-.1 1.448-1.354 2.467-3.03 2.467-2.091 0-3.269-1.336-3.269-3.603V7.482c0-2.261 1.201-3.638 3.27-3.638 1.681 0 2.935 1.054 3.029 2.572v.088H9.875c-.088-.879-.768-1.512-1.729-1.512Z"},child:[]}]})(n)}function Hb(n){return Vt({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.012 8.012 0 0 0 16 8c0-4.42-3.58-8-8-8z"},child:[]}]})(n)}function Vb(n){return Vt({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M0 1.146C0 .513.526 0 1.175 0h13.65C15.474 0 16 .513 16 1.146v13.708c0 .633-.526 1.146-1.175 1.146H1.175C.526 16 0 15.487 0 14.854V1.146zm4.943 12.248V6.169H2.542v7.225h2.401zm-1.2-8.212c.837 0 1.358-.554 1.358-1.248-.015-.709-.52-1.248-1.342-1.248-.822 0-1.359.54-1.359 1.248 0 .694.521 1.248 1.327 1.248h.016zm4.908 8.212V9.359c0-.216.016-.432.08-.586.173-.431.568-.878 1.232-.878.869 0 1.216.662 1.216 1.634v3.865h2.401V9.25c0-2.22-1.184-3.252-2.764-3.252-1.274 0-1.845.7-2.165 1.193v.025h-.016a5.54 5.54 0 0 1 .016-.025V6.169h-2.4c.03.678 0 7.225 0 7.225h2.4z"},child:[]}]})(n)}function Gb(n){return Vt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M71.92 34.77C50.2 47.67 7.4 96.84 7 109.73v21.34c0 27.06 25.29 50.84 48.25 50.84 27.57 0 50.54-22.85 50.54-50 0 27.12 22.18 50 49.76 50s49-22.85 49-50c0 27.12 23.59 50 51.16 50h.5c27.57 0 51.16-22.85 51.16-50 0 27.12 21.47 50 49 50s49.76-22.85 49.76-50c0 27.12 23 50 50.54 50 23 0 48.25-23.78 48.25-50.84v-21.34c-.4-12.9-43.2-62.07-64.92-75C372.56 32.4 325.76 32 256 32S91.14 33.1 71.92 34.77zm132.32 134.39c-22 38.4-77.9 38.71-99.85.25-13.17 23.14-43.17 32.07-56 27.66-3.87 40.15-13.67 237.13 17.73 269.15 80 18.67 302.08 18.12 379.76 0 31.65-32.27 21.32-232 17.75-269.15-12.92 4.44-42.88-4.6-56-27.66-22 38.52-77.85 38.1-99.85-.24-7.1 12.49-23.05 28.94-51.76 28.94a57.54 57.54 0 0 1-51.75-28.94zm-41.58 53.77c16.47 0 31.09 0 49.22 19.78a436.91 436.91 0 0 1 88.18 0C318.22 223 332.85 223 349.31 223c52.33 0 65.22 77.53 83.87 144.45 17.26 62.15-5.52 63.67-33.95 63.73-42.15-1.57-65.49-32.18-65.49-62.79-39.25 6.43-101.93 8.79-155.55 0 0 30.61-23.34 61.22-65.49 62.79-28.42-.06-51.2-1.58-33.94-63.73 18.67-67 31.56-144.45 83.88-144.45zM256 270.79s-44.38 40.77-52.35 55.21l29-1.17v25.32c0 1.55 21.34.16 23.33.16 11.65.54 23.31 1 23.31-.16v-25.28l29 1.17c-8-14.48-52.35-55.24-52.35-55.24z"},child:[]}]})(n)}function Wb(n){return Vt({tag:"svg",attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M277.74 312.9c9.8-6.7 23.4-12.5 23.4-12.5s-38.7 7-77.2 10.2c-47.1 3.9-97.7 4.7-123.1 1.3-60.1-8 33-30.1 33-30.1s-36.1-2.4-80.6 19c-52.5 25.4 130 37 224.5 12.1zm-85.4-32.1c-19-42.7-83.1-80.2 0-145.8C296 53.2 242.84 0 242.84 0c21.5 84.5-75.6 110.1-110.7 162.6-23.9 35.9 11.7 74.4 60.2 118.2zm114.6-176.2c.1 0-175.2 43.8-91.5 140.2 24.7 28.4-6.5 54-6.5 54s62.7-32.4 33.9-72.9c-26.9-37.8-47.5-56.6 64.1-121.3zm-6.1 270.5a12.19 12.19 0 0 1-2 2.6c128.3-33.7 81.1-118.9 19.8-97.3a17.33 17.33 0 0 0-8.2 6.3 70.45 70.45 0 0 1 11-3c31-6.5 75.5 41.5-20.6 91.4zM348 437.4s14.5 11.9-15.9 21.2c-57.9 17.5-240.8 22.8-291.6.7-18.3-7.9 16-19 26.8-21.3 11.2-2.4 17.7-2 17.7-2-20.3-14.3-131.3 28.1-56.4 40.2C232.84 509.4 401 461.3 348 437.4zM124.44 396c-78.7 22 47.9 67.4 148.1 24.5a185.89 185.89 0 0 1-28.2-13.8c-44.7 8.5-65.4 9.1-106 4.5-33.5-3.8-13.9-15.2-13.9-15.2zm179.8 97.2c-78.7 14.8-175.8 13.1-233.3 3.6 0-.1 11.8 9.7 72.4 13.6 92.2 5.9 233.8-3.3 237.1-46.9 0 0-6.4 16.5-76.2 29.7zM260.64 353c-59.2 11.4-93.5 11.1-136.8 6.6-33.5-3.5-11.6-19.7-11.6-19.7-86.8 28.8 48.2 61.4 169.5 25.9a60.37 60.37 0 0 1-21.1-12.8z"},child:[]}]})(n)}function Xb(n){return Vt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M224 508c-6.7 0-13.5-1.8-19.4-5.2l-61.7-36.5c-9.2-5.2-4.7-7-1.7-8 12.3-4.3 14.8-5.2 27.9-12.7 1.4-.8 3.2-.5 4.6.4l47.4 28.1c1.7 1 4.1 1 5.7 0l184.7-106.6c1.7-1 2.8-3 2.8-5V149.3c0-2.1-1.1-4-2.9-5.1L226.8 37.7c-1.7-1-4-1-5.7 0L36.6 144.3c-1.8 1-2.9 3-2.9 5.1v213.1c0 2 1.1 4 2.9 4.9l50.6 29.2c27.5 13.7 44.3-2.4 44.3-18.7V167.5c0-3 2.4-5.3 5.4-5.3h23.4c2.9 0 5.4 2.3 5.4 5.3V378c0 36.6-20 57.6-54.7 57.6-10.7 0-19.1 0-42.5-11.6l-48.4-27.9C8.1 389.2.7 376.3.7 362.4V149.3c0-13.8 7.4-26.8 19.4-33.7L204.6 9c11.7-6.6 27.2-6.6 38.8 0l184.7 106.7c12 6.9 19.4 19.8 19.4 33.7v213.1c0 13.8-7.4 26.7-19.4 33.7L243.4 502.8c-5.9 3.4-12.6 5.2-19.4 5.2zm149.1-210.1c0-39.9-27-50.5-83.7-58-57.4-7.6-63.2-11.5-63.2-24.9 0-11.1 4.9-25.9 47.4-25.9 37.9 0 51.9 8.2 57.7 33.8.5 2.4 2.7 4.2 5.2 4.2h24c1.5 0 2.9-.6 3.9-1.7s1.5-2.6 1.4-4.1c-3.7-44.1-33-64.6-92.2-64.6-52.7 0-84.1 22.2-84.1 59.5 0 40.4 31.3 51.6 81.8 56.6 60.5 5.9 65.2 14.8 65.2 26.7 0 20.6-16.6 29.4-55.5 29.4-48.9 0-59.6-12.3-63.2-36.6-.4-2.6-2.6-4.5-5.3-4.5h-23.9c-3 0-5.3 2.4-5.3 5.3 0 31.1 16.9 68.2 97.8 68.2 58.4-.1 92-23.2 92-63.4z"},child:[]}]})(n)}function jb(n){return Vt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M439.8 200.5c-7.7-30.9-22.3-54.2-53.4-54.2h-40.1v47.4c0 36.8-31.2 67.8-66.8 67.8H172.7c-29.2 0-53.4 25-53.4 54.3v101.8c0 29 25.2 46 53.4 54.3 33.8 9.9 66.3 11.7 106.8 0 26.9-7.8 53.4-23.5 53.4-54.3v-40.7H226.2v-13.6h160.2c31.1 0 42.6-21.7 53.4-54.2 11.2-33.5 10.7-65.7 0-108.6zM286.2 404c11.1 0 20.1 9.1 20.1 20.3 0 11.3-9 20.4-20.1 20.4-11 0-20.1-9.2-20.1-20.4.1-11.3 9.1-20.3 20.1-20.3zM167.8 248.1h106.8c29.7 0 53.4-24.5 53.4-54.3V91.9c0-29-24.4-50.7-53.4-55.6-35.8-5.9-74.7-5.6-106.8.1-45.2 8-53.4 24.7-53.4 55.6v40.7h106.9v13.6h-147c-31.1 0-58.3 18.7-66.8 54.2-9.8 40.7-10.2 66.1 0 108.6 7.6 31.6 25.7 54.2 56.8 54.2H101v-48.8c0-35.3 30.5-66.4 66.8-66.4zm-6.7-142.6c-11.1 0-20.1-9.1-20.1-20.3.1-11.3 9-20.4 20.1-20.4 11 0 20.1 9.2 20.1 20.4s-9 20.3-20.1 20.3z"},child:[]}]})(n)}function Yb(n){return Vt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M418.2 177.2c-5.4-1.8-10.8-3.5-16.2-5.1.9-3.7 1.7-7.4 2.5-11.1 12.3-59.6 4.2-107.5-23.1-123.3-26.3-15.1-69.2.6-112.6 38.4-4.3 3.7-8.5 7.6-12.5 11.5-2.7-2.6-5.5-5.2-8.3-7.7-45.5-40.4-91.1-57.4-118.4-41.5-26.2 15.2-34 60.3-23 116.7 1.1 5.6 2.3 11.1 3.7 16.7-6.4 1.8-12.7 3.8-18.6 5.9C38.3 196.2 0 225.4 0 255.6c0 31.2 40.8 62.5 96.3 81.5 4.5 1.5 9 3 13.6 4.3-1.5 6-2.8 11.9-4 18-10.5 55.5-2.3 99.5 23.9 114.6 27 15.6 72.4-.4 116.6-39.1 3.5-3.1 7-6.3 10.5-9.7 4.4 4.3 9 8.4 13.6 12.4 42.8 36.8 85.1 51.7 111.2 36.6 27-15.6 35.8-62.9 24.4-120.5-.9-4.4-1.9-8.9-3-13.5 3.2-.9 6.3-1.9 9.4-2.9 57.7-19.1 99.5-50 99.5-81.7 0-30.3-39.4-59.7-93.8-78.4zM282.9 92.3c37.2-32.4 71.9-45.1 87.7-36 16.9 9.7 23.4 48.9 12.8 100.4-.7 3.4-1.4 6.7-2.3 10-22.2-5-44.7-8.6-67.3-10.6-13-18.6-27.2-36.4-42.6-53.1 3.9-3.7 7.7-7.2 11.7-10.7zM167.2 307.5c5.1 8.7 10.3 17.4 15.8 25.9-15.6-1.7-31.1-4.2-46.4-7.5 4.4-14.4 9.9-29.3 16.3-44.5 4.6 8.8 9.3 17.5 14.3 26.1zm-30.3-120.3c14.4-3.2 29.7-5.8 45.6-7.8-5.3 8.3-10.5 16.8-15.4 25.4-4.9 8.5-9.7 17.2-14.2 26-6.3-14.9-11.6-29.5-16-43.6zm27.4 68.9c6.6-13.8 13.8-27.3 21.4-40.6s15.8-26.2 24.4-38.9c15-1.1 30.3-1.7 45.9-1.7s31 .6 45.9 1.7c8.5 12.6 16.6 25.5 24.3 38.7s14.9 26.7 21.7 40.4c-6.7 13.8-13.9 27.4-21.6 40.8-7.6 13.3-15.7 26.2-24.2 39-14.9 1.1-30.4 1.6-46.1 1.6s-30.9-.5-45.6-1.4c-8.7-12.7-16.9-25.7-24.6-39s-14.8-26.8-21.5-40.6zm180.6 51.2c5.1-8.8 9.9-17.7 14.6-26.7 6.4 14.5 12 29.2 16.9 44.3-15.5 3.5-31.2 6.2-47 8 5.4-8.4 10.5-17 15.5-25.6zm14.4-76.5c-4.7-8.8-9.5-17.6-14.5-26.2-4.9-8.5-10-16.9-15.3-25.2 16.1 2 31.5 4.7 45.9 8-4.6 14.8-10 29.2-16.1 43.4zM256.2 118.3c10.5 11.4 20.4 23.4 29.6 35.8-19.8-.9-39.7-.9-59.5 0 9.8-12.9 19.9-24.9 29.9-35.8zM140.2 57c16.8-9.8 54.1 4.2 93.4 39 2.5 2.2 5 4.6 7.6 7-15.5 16.7-29.8 34.5-42.9 53.1-22.6 2-45 5.5-67.2 10.4-1.3-5.1-2.4-10.3-3.5-15.5-9.4-48.4-3.2-84.9 12.6-94zm-24.5 263.6c-4.2-1.2-8.3-2.5-12.4-3.9-21.3-6.7-45.5-17.3-63-31.2-10.1-7-16.9-17.8-18.8-29.9 0-18.3 31.6-41.7 77.2-57.6 5.7-2 11.5-3.8 17.3-5.5 6.8 21.7 15 43 24.5 63.6-9.6 20.9-17.9 42.5-24.8 64.5zm116.6 98c-16.5 15.1-35.6 27.1-56.4 35.3-11.1 5.3-23.9 5.8-35.3 1.3-15.9-9.2-22.5-44.5-13.5-92 1.1-5.6 2.3-11.2 3.7-16.7 22.4 4.8 45 8.1 67.9 9.8 13.2 18.7 27.7 36.6 43.2 53.4-3.2 3.1-6.4 6.1-9.6 8.9zm24.5-24.3c-10.2-11-20.4-23.2-30.3-36.3 9.6.4 19.5.6 29.5.6 10.3 0 20.4-.2 30.4-.7-9.2 12.7-19.1 24.8-29.6 36.4zm130.7 30c-.9 12.2-6.9 23.6-16.5 31.3-15.9 9.2-49.8-2.8-86.4-34.2-4.2-3.6-8.4-7.5-12.7-11.5 15.3-16.9 29.4-34.8 42.2-53.6 22.9-1.9 45.7-5.4 68.2-10.5 1 4.1 1.9 8.2 2.7 12.2 4.9 21.6 5.7 44.1 2.5 66.3zm18.2-107.5c-2.8.9-5.6 1.8-8.5 2.6-7-21.8-15.6-43.1-25.5-63.8 9.6-20.4 17.7-41.4 24.5-62.9 5.2 1.5 10.2 3.1 15 4.7 46.6 16 79.3 39.8 79.3 58 0 19.6-34.9 44.9-84.8 61.4zm-149.7-15c25.3 0 45.8-20.5 45.8-45.8s-20.5-45.8-45.8-45.8c-25.3 0-45.8 20.5-45.8 45.8s20.5 45.8 45.8 45.8z"},child:[]}]})(n)}function qb(n){return Vt({tag:"svg",attr:{role:"img",viewBox:"0 0 24 24"},child:[{tag:"path",attr:{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.666 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"},child:[]}]})(n)}function Zb(n){return Vt({tag:"svg",attr:{role:"img",viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M13.483 0a1.374 1.374 0 0 0-.961.438L7.116 6.226l-3.854 4.126a5.266 5.266 0 0 0-1.209 2.104 5.35 5.35 0 0 0-.125.513 5.527 5.527 0 0 0 .062 2.362 5.83 5.83 0 0 0 .349 1.017 5.938 5.938 0 0 0 1.271 1.818l4.277 4.193.039.038c2.248 2.165 5.852 2.133 8.063-.074l2.396-2.392c.54-.54.54-1.414.003-1.955a1.378 1.378 0 0 0-1.951-.003l-2.396 2.392a3.021 3.021 0 0 1-4.205.038l-.02-.019-4.276-4.193c-.652-.64-.972-1.469-.948-2.263a2.68 2.68 0 0 1 .066-.523 2.545 2.545 0 0 1 .619-1.164L9.13 8.114c1.058-1.134 3.204-1.27 4.43-.278l3.501 2.831c.593.48 1.461.387 1.94-.207a1.384 1.384 0 0 0-.207-1.943l-3.5-2.831c-.8-.647-1.766-1.045-2.774-1.202l2.015-2.158A1.384 1.384 0 0 0 13.483 0zm-2.866 12.815a1.38 1.38 0 0 0-1.38 1.382 1.38 1.38 0 0 0 1.38 1.382H20.79a1.38 1.38 0 0 0 1.38-1.382 1.38 1.38 0 0 0-1.38-1.382z"},child:[]}]})(n)}function Kb(n){return Vt({tag:"svg",attr:{role:"img",viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M17.193 9.555c-1.264-5.58-4.252-7.414-4.573-8.115-.28-.394-.53-.954-.735-1.44-.036.495-.055.685-.523 1.184-.723.566-4.438 3.682-4.74 10.02-.282 5.912 4.27 9.435 4.888 9.884l.07.05A73.49 73.49 0 0111.91 24h.481c.114-1.032.284-2.056.51-3.07.417-.296.604-.463.85-.693a11.342 11.342 0 003.639-8.464c.01-.814-.103-1.662-.197-2.218zm-5.336 8.195s0-8.291.275-8.29c.213 0 .49 10.695.49 10.695-.381-.045-.765-1.76-.765-2.405z"},child:[]}]})(n)}function Jb(n){return Vt({tag:"svg",attr:{role:"img",viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M16.405 5.501c-.115 0-.193.014-.274.033v.013h.014c.054.104.146.18.214.273.054.107.1.214.154.32l.014-.015c.094-.066.14-.172.14-.333-.04-.047-.046-.094-.08-.14-.04-.067-.126-.1-.18-.153zM5.77 18.695h-.927a50.854 50.854 0 00-.27-4.41h-.008l-1.41 4.41H2.45l-1.4-4.41h-.01a72.892 72.892 0 00-.195 4.41H0c.055-1.966.192-3.81.41-5.53h1.15l1.335 4.064h.008l1.347-4.064h1.095c.242 2.015.384 3.86.428 5.53zm4.017-4.08c-.378 2.045-.876 3.533-1.492 4.46-.482.716-1.01 1.073-1.583 1.073-.153 0-.34-.046-.566-.138v-.494c.11.017.24.026.386.026.268 0 .483-.075.647-.222.197-.18.295-.382.295-.605 0-.155-.077-.47-.23-.944L6.23 14.615h.91l.727 2.36c.164.536.233.91.205 1.123.4-1.064.678-2.227.835-3.483zm12.325 4.08h-2.63v-5.53h.885v4.85h1.745zm-3.32.135l-1.016-.5c.09-.076.177-.158.255-.25.433-.506.648-1.258.648-2.253 0-1.83-.718-2.746-2.155-2.746-.704 0-1.254.232-1.65.697-.43.508-.646 1.256-.646 2.245 0 .972.19 1.686.574 2.14.35.41.877.615 1.583.615.264 0 .506-.033.725-.098l1.325.772.36-.622zM15.5 17.588c-.225-.36-.337-.94-.337-1.736 0-1.393.424-2.09 1.27-2.09.443 0 .77.167.977.5.224.362.336.936.336 1.723 0 1.404-.424 2.108-1.27 2.108-.445 0-.77-.167-.978-.5zm-1.658-.425c0 .47-.172.856-.516 1.156-.344.3-.803.45-1.384.45-.543 0-1.064-.172-1.573-.515l.237-.476c.438.22.833.328 1.19.328.332 0 .593-.073.783-.22a.754.754 0 00.3-.615c0-.33-.23-.61-.648-.845-.388-.213-1.163-.657-1.163-.657-.422-.307-.632-.636-.632-1.177 0-.45.157-.81.47-1.085.315-.278.72-.415 1.22-.415.512 0 .98.136 1.4.41l-.213.476a2.726 2.726 0 00-1.064-.23c-.283 0-.502.068-.654.206a.685.685 0 00-.248.524c0 .328.234.61.666.85.393.215 1.187.67 1.187.67.433.305.648.63.648 1.168zm9.382-5.852c-.535-.014-.95.04-1.297.188-.1.04-.26.04-.274.167.055.053.063.14.11.214.08.134.218.313.346.407.14.11.28.216.427.31.26.16.555.255.81.416.145.094.293.213.44.313.073.05.12.14.214.172v-.02c-.046-.06-.06-.147-.105-.214-.067-.067-.134-.127-.2-.193a3.223 3.223 0 00-.695-.675c-.214-.146-.682-.35-.77-.595l-.013-.014c.146-.013.32-.066.46-.106.227-.06.435-.047.67-.106.106-.027.213-.06.32-.094v-.06c-.12-.12-.21-.283-.334-.395a8.867 8.867 0 00-1.104-.823c-.21-.134-.476-.22-.697-.334-.08-.04-.214-.06-.26-.127-.12-.146-.19-.34-.275-.514a17.69 17.69 0 01-.547-1.163c-.12-.262-.193-.523-.34-.763-.69-1.137-1.437-1.826-2.586-2.5-.247-.14-.543-.2-.856-.274-.167-.008-.334-.02-.5-.027-.11-.047-.216-.174-.31-.235-.38-.24-1.364-.76-1.644-.072-.18.434.267.862.422 1.082.115.153.26.328.34.5.047.116.06.235.107.356.106.294.207.622.347.897.073.14.153.287.247.413.054.073.146.107.167.227-.094.136-.1.334-.154.5-.24.757-.146 1.693.194 2.25.107.166.362.534.703.393.3-.12.234-.5.32-.835.02-.08.007-.133.048-.187v.015c.094.188.188.367.274.555.206.328.566.668.867.895.16.12.287.328.487.402v-.02h-.015c-.043-.058-.1-.086-.154-.133a3.445 3.445 0 01-.35-.4 8.76 8.76 0 01-.747-1.218c-.11-.21-.202-.436-.29-.643-.04-.08-.04-.2-.107-.24-.1.146-.247.273-.32.453-.127.288-.14.642-.188 1.01-.027.007-.014 0-.027.014-.214-.052-.287-.274-.367-.46-.2-.475-.233-1.238-.06-1.785.047-.14.247-.582.167-.716-.042-.127-.174-.2-.247-.303a2.478 2.478 0 01-.24-.427c-.16-.374-.24-.788-.414-1.162-.08-.173-.22-.354-.334-.513-.127-.18-.267-.307-.368-.52-.033-.073-.08-.194-.027-.274.014-.054.042-.075.094-.09.088-.072.335.022.422.062.247.1.455.194.662.334.094.066.195.193.315.226h.14c.214.047.455.014.655.073.355.114.675.28.962.46a5.953 5.953 0 012.085 2.286c.08.154.115.295.188.455.14.33.313.663.455.982.14.315.275.636.476.897.1.14.502.213.682.286.133.06.34.115.46.188.23.14.454.3.67.454.11.076.443.243.463.378z"},child:[]}]})(n)}function Qb(n){return Vt({tag:"svg",attr:{role:"img",viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M4.409 6.608L7.981.255l3.572 6.353H4.409zM8.411 0l3.569 6.348L15.552 0H8.411zm4.036 17.392l3.572 6.354 3.575-6.354h-7.147zm-.608-10.284h-7.43l3.715 6.605 3.715-6.605zm.428-.25h7.428L15.982.255l-3.715 6.603zM15.589 24l-3.569-6.349L8.448 24h7.141zm-3.856-6.858H4.306l3.712 6.603 3.715-6.603zm.428-.25h7.433l-3.718-6.605-3.715 6.605z"},child:[]}]})(n)}function $b(n){return Vt({tag:"svg",attr:{role:"img",viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M12 0a12 12 0 1012 12A12 12 0 0012 0zm0 23.52A11.52 11.52 0 1123.52 12 11.52 11.52 0 0112 23.52zm7.13-9.791c-.206.997-1.126 3.557-4.06 4.942l-1.179-1.325-1.988 2a7.338 7.338 0 01-5.804-2.978 2.859 2.859 0 00.65.123c.326.006.678-.114.678-.66v-5.394a.89.89 0 00-1.116-.89c-.92.212-1.656 2.509-1.656 2.509a7.304 7.304 0 012.528-5.597 7.408 7.408 0 013.73-1.721c-1.006.573-1.57 1.507-1.57 2.29 0 1.262.76 1.109.984.923v7.28a1.157 1.157 0 00.148.256 1.075 1.075 0 00.88.445c.76 0 1.747-.868 1.747-.868V9.172c0-.6-.452-1.324-.905-1.572 0 0 .838-.149 1.484.346a5.537 5.537 0 01.387-.425c1.508-1.48 2.929-1.902 4.112-2.112 0 0-2.151 1.69-2.151 3.96 0 1.687.043 5.801.043 5.801.799.771 1.986-.342 3.059-1.441Z"},child:[]}]})(n)}function eR(){return fe.jsx("header",{className:"bg-gradient-to-r from-blue-950 via-blue-600 to-white p-4 text-white",children:fe.jsxs("div",{className:"flex flex-col md:flex-row md:items-center justify-around",children:[fe.jsx("span",{className:"text-4xl p-2 font-bold mb-2 md:mb-0",children:"My Portfolio"}),fe.jsxs("div",{className:"flex justify-around",children:[fe.jsx("a",{href:"https://github.com/Abhinav-Chdhary",target:"_blank",rel:"noopener noreferrer",children:fe.jsx("button",{className:"bg-gray-950 hover:bg-gray-800 text-white p-2 rounded-md m-2",children:fe.jsx(Hb,{size:32})})}),fe.jsx("a",{href:"https://www.linkedin.com/in/abhinavchdhary/",target:"_blank",rel:"noopener noreferrer",children:fe.jsx("button",{className:"bg-blue-600 hover:bg-blue-500 text-white p-2 rounded-md m-2",children:fe.jsx(Vb,{size:32})})}),fe.jsx("a",{href:"https://abhinav-choudhary.itch.io/",target:"_blank",rel:"noopener noreferrer",children:fe.jsx("button",{className:"bg-red-500 hover:bg-red-700 text-white p-2 rounded-md m-2",children:fe.jsx(Gb,{size:32})})}),fe.jsx("a",{href:"https://leetcode.com/Megh_nad/",target:"_blank",rel:"noopener noreferrer",children:fe.jsx("button",{className:"bg-yellow-500 hover:bg-black text-white p-2 rounded-md m-2",children:fe.jsx(Zb,{size:32})})})]})]})})}/** +`+s.stack}return{value:n,source:e,stack:r,digest:null}}function ng(n,e,t){return{value:n,source:null,stack:t??null,digest:e??null}}function N1(n,e){try{console.error(e.value)}catch(t){setTimeout(function(){throw t})}}var ab=typeof WeakMap=="function"?WeakMap:Map;function $w(n,e,t){t=ws(-1,t),t.tag=3,t.payload={element:null};var i=e.value;return t.callback=function(){_p||(_p=!0,G1=i),N1(n,e)},t}function eE(n,e,t){t=ws(-1,t),t.tag=3;var i=n.type.getDerivedStateFromError;if(typeof i=="function"){var r=e.value;t.payload=function(){return i(r)},t.callback=function(){N1(n,e)}}var s=n.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(t.callback=function(){N1(n,e),typeof i!="function"&&(co===null?co=new Set([this]):co.add(this));var o=e.stack;this.componentDidCatch(e.value,{componentStack:o!==null?o:""})}),t}function Z2(n,e,t){var i=n.pingCache;if(i===null){i=n.pingCache=new ab;var r=new Set;i.set(e,r)}else r=i.get(e),r===void 0&&(r=new Set,i.set(e,r));r.has(t)||(r.add(t),n=Sb.bind(null,n,e,t),e.then(n,n))}function K2(n){do{var e;if((e=n.tag===13)&&(e=n.memoizedState,e=e!==null?e.dehydrated!==null:!0),e)return n;n=n.return}while(n!==null);return null}function J2(n,e,t,i,r){return n.mode&1?(n.flags|=65536,n.lanes=r,n):(n===e?n.flags|=65536:(n.flags|=128,t.flags|=131072,t.flags&=-52805,t.tag===1&&(t.alternate===null?t.tag=17:(e=ws(-1,1),e.tag=2,lo(t,e,1))),t.lanes|=1),n)}var lb=Is.ReactCurrentOwner,Ri=!1;function di(n,e,t,i){e.child=n===null?Iw(e,null,t,i):Yl(e,n.child,t,i)}function Q2(n,e,t,i,r){t=t.render;var s=e.ref;return Hl(e,r),i=My(n,e,t,i,s,r),t=wy(),n!==null&&!Ri?(e.updateQueue=n.updateQueue,e.flags&=-2053,n.lanes&=~r,bs(n,e,r)):(en&&t&&uy(e),e.flags|=1,di(n,e,i,r),e.child)}function $2(n,e,t,i,r){if(n===null){var s=t.type;return typeof s=="function"&&!Ny(s)&&s.defaultProps===void 0&&t.compare===null&&t.defaultProps===void 0?(e.tag=15,e.type=s,tE(n,e,s,i,r)):(n=Wd(t.type,null,i,e,e.mode,r),n.ref=e.ref,n.return=e,e.child=n)}if(s=n.child,!(n.lanes&r)){var o=s.memoizedProps;if(t=t.compare,t=t!==null?t:Au,t(o,i)&&n.ref===e.ref)return bs(n,e,r)}return e.flags|=1,n=fo(s,i),n.ref=e.ref,n.return=e,e.child=n}function tE(n,e,t,i,r){if(n!==null){var s=n.memoizedProps;if(Au(s,i)&&n.ref===e.ref)if(Ri=!1,e.pendingProps=i=s,(n.lanes&r)!==0)n.flags&131072&&(Ri=!0);else return e.lanes=n.lanes,bs(n,e,r)}return D1(n,e,t,i,r)}function nE(n,e,t){var i=e.pendingProps,r=i.children,s=n!==null?n.memoizedState:null;if(i.mode==="hidden")if(!(e.mode&1))e.memoizedState={baseLanes:0,cachePool:null,transitions:null},Yt(Pl,Hi),Hi|=t;else{if(!(t&1073741824))return n=s!==null?s.baseLanes|t:t,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:n,cachePool:null,transitions:null},e.updateQueue=null,Yt(Pl,Hi),Hi|=n,null;e.memoizedState={baseLanes:0,cachePool:null,transitions:null},i=s!==null?s.baseLanes:t,Yt(Pl,Hi),Hi|=i}else s!==null?(i=s.baseLanes|t,e.memoizedState=null):i=t,Yt(Pl,Hi),Hi|=i;return di(n,e,r,t),e.child}function iE(n,e){var t=e.ref;(n===null&&t!==null||n!==null&&n.ref!==t)&&(e.flags|=512,e.flags|=2097152)}function D1(n,e,t,i,r){var s=Li(t)?ma:li.current;return s=Xl(e,s),Hl(e,r),t=My(n,e,t,i,s,r),i=wy(),n!==null&&!Ri?(e.updateQueue=n.updateQueue,e.flags&=-2053,n.lanes&=~r,bs(n,e,r)):(en&&i&&uy(e),e.flags|=1,di(n,e,t,r),e.child)}function eS(n,e,t,i,r){if(Li(t)){var s=!0;cp(e)}else s=!1;if(Hl(e,r),e.stateNode===null)Hd(n,e),Pw(e,t,i),I1(e,t,i,r),i=!0;else if(n===null){var o=e.stateNode,a=e.memoizedProps;o.props=a;var u=o.context,f=t.contextType;typeof f=="object"&&f!==null?f=pr(f):(f=Li(t)?ma:li.current,f=Xl(e,f));var h=t.getDerivedStateFromProps,d=typeof h=="function"||typeof o.getSnapshotBeforeUpdate=="function";d||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==i||u!==f)&&X2(e,o,i,f),Js=!1;var p=e.memoizedState;o.state=p,pp(e,i,o,r),u=e.memoizedState,a!==i||p!==u||Pi.current||Js?(typeof h=="function"&&(L1(e,t,h,i),u=e.memoizedState),(a=Js||W2(e,t,a,i,p,u,f))?(d||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(e.flags|=4194308)):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=i,e.memoizedState=u),o.props=i,o.state=u,o.context=f,i=a):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),i=!1)}else{o=e.stateNode,bw(n,e),a=e.memoizedProps,f=e.type===e.elementType?a:wr(e.type,a),o.props=f,d=e.pendingProps,p=o.context,u=t.contextType,typeof u=="object"&&u!==null?u=pr(u):(u=Li(t)?ma:li.current,u=Xl(e,u));var v=t.getDerivedStateFromProps;(h=typeof v=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==d||p!==u)&&X2(e,o,i,u),Js=!1,p=e.memoizedState,o.state=p,pp(e,i,o,r);var y=e.memoizedState;a!==d||p!==y||Pi.current||Js?(typeof v=="function"&&(L1(e,t,v,i),y=e.memoizedState),(f=Js||W2(e,t,f,i,p,y,u)||!1)?(h||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(i,y,u),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(i,y,u)),typeof o.componentDidUpdate=="function"&&(e.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===n.memoizedProps&&p===n.memoizedState||(e.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===n.memoizedProps&&p===n.memoizedState||(e.flags|=1024),e.memoizedProps=i,e.memoizedState=y),o.props=i,o.state=y,o.context=u,i=f):(typeof o.componentDidUpdate!="function"||a===n.memoizedProps&&p===n.memoizedState||(e.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===n.memoizedProps&&p===n.memoizedState||(e.flags|=1024),i=!1)}return U1(n,e,t,i,s,r)}function U1(n,e,t,i,r,s){iE(n,e);var o=(e.flags&128)!==0;if(!i&&!o)return r&&k2(e,t,!1),bs(n,e,s);i=e.stateNode,lb.current=e;var a=o&&typeof t.getDerivedStateFromError!="function"?null:i.render();return e.flags|=1,n!==null&&o?(e.child=Yl(e,n.child,null,s),e.child=Yl(e,null,a,s)):di(n,e,a,s),e.memoizedState=i.state,r&&k2(e,t,!0),e.child}function rE(n){var e=n.stateNode;e.pendingContext?F2(n,e.pendingContext,e.pendingContext!==e.context):e.context&&F2(n,e.context,!1),yy(n,e.containerInfo)}function tS(n,e,t,i,r){return jl(),hy(r),e.flags|=256,di(n,e,t,i),e.child}var O1={dehydrated:null,treeContext:null,retryLane:0};function z1(n){return{baseLanes:n,cachePool:null,transitions:null}}function sE(n,e,t){var i=e.pendingProps,r=rn.current,s=!1,o=(e.flags&128)!==0,a;if((a=o)||(a=n!==null&&n.memoizedState===null?!1:(r&2)!==0),a?(s=!0,e.flags&=-129):(n===null||n.memoizedState!==null)&&(r|=1),Yt(rn,r&1),n===null)return R1(e),n=e.memoizedState,n!==null&&(n=n.dehydrated,n!==null)?(e.mode&1?n.data==="$!"?e.lanes=8:e.lanes=1073741824:e.lanes=1,null):(o=i.children,n=i.fallback,s?(i=e.mode,s=e.child,o={mode:"hidden",children:o},!(i&1)&&s!==null?(s.childLanes=0,s.pendingProps=o):s=Xp(o,i,0,null),n=la(n,i,t,null),s.return=e,n.return=e,s.sibling=n,e.child=s,e.child.memoizedState=z1(t),e.memoizedState=O1,n):Ay(e,o));if(r=n.memoizedState,r!==null&&(a=r.dehydrated,a!==null))return cb(n,e,o,i,a,r,t);if(s){s=i.fallback,o=e.mode,r=n.child,a=r.sibling;var u={mode:"hidden",children:i.children};return!(o&1)&&e.child!==r?(i=e.child,i.childLanes=0,i.pendingProps=u,e.deletions=null):(i=fo(r,u),i.subtreeFlags=r.subtreeFlags&14680064),a!==null?s=fo(a,s):(s=la(s,o,t,null),s.flags|=2),s.return=e,i.return=e,i.sibling=s,e.child=i,i=s,s=e.child,o=n.child.memoizedState,o=o===null?z1(t):{baseLanes:o.baseLanes|t,cachePool:null,transitions:o.transitions},s.memoizedState=o,s.childLanes=n.childLanes&~t,e.memoizedState=O1,i}return s=n.child,n=s.sibling,i=fo(s,{mode:"visible",children:i.children}),!(e.mode&1)&&(i.lanes=t),i.return=e,i.sibling=null,n!==null&&(t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)),e.child=i,e.memoizedState=null,i}function Ay(n,e){return e=Xp({mode:"visible",children:e},n.mode,0,null),e.return=n,n.child=e}function Ih(n,e,t,i){return i!==null&&hy(i),Yl(e,n.child,null,t),n=Ay(e,e.pendingProps.children),n.flags|=2,e.memoizedState=null,n}function cb(n,e,t,i,r,s,o){if(t)return e.flags&256?(e.flags&=-257,i=ng(Error(Ae(422))),Ih(n,e,o,i)):e.memoizedState!==null?(e.child=n.child,e.flags|=128,null):(s=i.fallback,r=e.mode,i=Xp({mode:"visible",children:i.children},r,0,null),s=la(s,r,o,null),s.flags|=2,i.return=e,s.return=e,i.sibling=s,e.child=i,e.mode&1&&Yl(e,n.child,null,o),e.child.memoizedState=z1(o),e.memoizedState=O1,s);if(!(e.mode&1))return Ih(n,e,o,null);if(r.data==="$!"){if(i=r.nextSibling&&r.nextSibling.dataset,i)var a=i.dgst;return i=a,s=Error(Ae(419)),i=ng(s,i,void 0),Ih(n,e,o,i)}if(a=(o&n.childLanes)!==0,Ri||a){if(i=kn,i!==null){switch(o&-o){case 4:r=2;break;case 16:r=8;break;case 64: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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:r=32;break;case 536870912:r=268435456;break;default:r=0}r=r&(i.suspendedLanes|o)?0:r,r!==0&&r!==s.retryLane&&(s.retryLane=r,Cs(n,r),Pr(i,n,r,-1))}return Iy(),i=ng(Error(Ae(421))),Ih(n,e,o,i)}return r.data==="$?"?(e.flags|=128,e.child=n.child,e=Mb.bind(null,n),r._reactRetry=e,null):(n=s.treeContext,Wi=ao(r.nextSibling),ji=e,en=!0,Ar=null,n!==null&&(cr[ur++]=ys,cr[ur++]=_s,cr[ur++]=ga,ys=n.id,_s=n.overflow,ga=e),e=Ay(e,i.children),e.flags|=4096,e)}function nS(n,e,t){n.lanes|=e;var i=n.alternate;i!==null&&(i.lanes|=e),P1(n.return,e,t)}function ig(n,e,t,i,r){var s=n.memoizedState;s===null?n.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:i,tail:t,tailMode:r}:(s.isBackwards=e,s.rendering=null,s.renderingStartTime=0,s.last=i,s.tail=t,s.tailMode=r)}function oE(n,e,t){var i=e.pendingProps,r=i.revealOrder,s=i.tail;if(di(n,e,i.children,t),i=rn.current,i&2)i=i&1|2,e.flags|=128;else{if(n!==null&&n.flags&128)e:for(n=e.child;n!==null;){if(n.tag===13)n.memoizedState!==null&&nS(n,t,e);else if(n.tag===19)nS(n,t,e);else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break e;for(;n.sibling===null;){if(n.return===null||n.return===e)break e;n=n.return}n.sibling.return=n.return,n=n.sibling}i&=1}if(Yt(rn,i),!(e.mode&1))e.memoizedState=null;else switch(r){case"forwards":for(t=e.child,r=null;t!==null;)n=t.alternate,n!==null&&mp(n)===null&&(r=t),t=t.sibling;t=r,t===null?(r=e.child,e.child=null):(r=t.sibling,t.sibling=null),ig(e,!1,r,t,s);break;case"backwards":for(t=null,r=e.child,e.child=null;r!==null;){if(n=r.alternate,n!==null&&mp(n)===null){e.child=r;break}n=r.sibling,r.sibling=t,t=r,r=n}ig(e,!0,t,null,s);break;case"together":ig(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function Hd(n,e){!(e.mode&1)&&n!==null&&(n.alternate=null,e.alternate=null,e.flags|=2)}function bs(n,e,t){if(n!==null&&(e.dependencies=n.dependencies),ya|=e.lanes,!(t&e.childLanes))return null;if(n!==null&&e.child!==n.child)throw Error(Ae(153));if(e.child!==null){for(n=e.child,t=fo(n,n.pendingProps),e.child=t,t.return=e;n.sibling!==null;)n=n.sibling,t=t.sibling=fo(n,n.pendingProps),t.return=e;t.sibling=null}return e.child}function ub(n,e,t){switch(e.tag){case 3:rE(e),jl();break;case 5:Nw(e);break;case 1:Li(e.type)&&cp(e);break;case 4:yy(e,e.stateNode.containerInfo);break;case 10:var i=e.type._context,r=e.memoizedProps.value;Yt(hp,i._currentValue),i._currentValue=r;break;case 13:if(i=e.memoizedState,i!==null)return i.dehydrated!==null?(Yt(rn,rn.current&1),e.flags|=128,null):t&e.child.childLanes?sE(n,e,t):(Yt(rn,rn.current&1),n=bs(n,e,t),n!==null?n.sibling:null);Yt(rn,rn.current&1);break;case 19:if(i=(t&e.childLanes)!==0,n.flags&128){if(i)return oE(n,e,t);e.flags|=128}if(r=e.memoizedState,r!==null&&(r.rendering=null,r.tail=null,r.lastEffect=null),Yt(rn,rn.current),i)break;return null;case 22:case 23:return e.lanes=0,nE(n,e,t)}return bs(n,e,t)}var aE,F1,lE,cE;aE=function(n,e){for(var t=e.child;t!==null;){if(t.tag===5||t.tag===6)n.appendChild(t.stateNode);else if(t.tag!==4&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return;t=t.return}t.sibling.return=t.return,t=t.sibling}};F1=function(){};lE=function(n,e,t,i){var r=n.memoizedProps;if(r!==i){n=e.stateNode,na(qr.current);var s=null;switch(t){case"input":r=o1(n,r),i=o1(n,i),s=[];break;case"select":r=ln({},r,{value:void 0}),i=ln({},i,{value:void 0}),s=[];break;case"textarea":r=c1(n,r),i=c1(n,i),s=[];break;default:typeof r.onClick!="function"&&typeof i.onClick=="function"&&(n.onclick=ap)}f1(t,i);var o;t=null;for(f in r)if(!i.hasOwnProperty(f)&&r.hasOwnProperty(f)&&r[f]!=null)if(f==="style"){var a=r[f];for(o in a)a.hasOwnProperty(o)&&(t||(t={}),t[o]="")}else f!=="dangerouslySetInnerHTML"&&f!=="children"&&f!=="suppressContentEditableWarning"&&f!=="suppressHydrationWarning"&&f!=="autoFocus"&&(_u.hasOwnProperty(f)?s||(s=[]):(s=s||[]).push(f,null));for(f in i){var u=i[f];if(a=r!=null?r[f]:void 0,i.hasOwnProperty(f)&&u!==a&&(u!=null||a!=null))if(f==="style")if(a){for(o in a)!a.hasOwnProperty(o)||u&&u.hasOwnProperty(o)||(t||(t={}),t[o]="");for(o in u)u.hasOwnProperty(o)&&a[o]!==u[o]&&(t||(t={}),t[o]=u[o])}else t||(s||(s=[]),s.push(f,t)),t=u;else f==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,a=a?a.__html:void 0,u!=null&&a!==u&&(s=s||[]).push(f,u)):f==="children"?typeof u!="string"&&typeof u!="number"||(s=s||[]).push(f,""+u):f!=="suppressContentEditableWarning"&&f!=="suppressHydrationWarning"&&(_u.hasOwnProperty(f)?(u!=null&&f==="onScroll"&&Zt("scroll",n),s||a===u||(s=[])):(s=s||[]).push(f,u))}t&&(s=s||[]).push("style",t);var f=s;(e.updateQueue=f)&&(e.flags|=4)}};cE=function(n,e,t,i){t!==i&&(e.flags|=4)};function zc(n,e){if(!en)switch(n.tailMode){case"hidden":e=n.tail;for(var t=null;e!==null;)e.alternate!==null&&(t=e),e=e.sibling;t===null?n.tail=null:t.sibling=null;break;case"collapsed":t=n.tail;for(var i=null;t!==null;)t.alternate!==null&&(i=t),t=t.sibling;i===null?e||n.tail===null?n.tail=null:n.tail.sibling=null:i.sibling=null}}function $n(n){var e=n.alternate!==null&&n.alternate.child===n.child,t=0,i=0;if(e)for(var r=n.child;r!==null;)t|=r.lanes|r.childLanes,i|=r.subtreeFlags&14680064,i|=r.flags&14680064,r.return=n,r=r.sibling;else for(r=n.child;r!==null;)t|=r.lanes|r.childLanes,i|=r.subtreeFlags,i|=r.flags,r.return=n,r=r.sibling;return n.subtreeFlags|=i,n.childLanes=t,e}function fb(n,e,t){var i=e.pendingProps;switch(fy(e),e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return $n(e),null;case 1:return Li(e.type)&&lp(),$n(e),null;case 3:return i=e.stateNode,ql(),Kt(Pi),Kt(li),xy(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(n===null||n.child===null)&&(Ph(e)?e.flags|=4:n===null||n.memoizedState.isDehydrated&&!(e.flags&256)||(e.flags|=1024,Ar!==null&&(j1(Ar),Ar=null))),F1(n,e),$n(e),null;case 5:_y(e);var r=na(Lu.current);if(t=e.type,n!==null&&e.stateNode!=null)lE(n,e,t,i,r),n.ref!==e.ref&&(e.flags|=512,e.flags|=2097152);else{if(!i){if(e.stateNode===null)throw Error(Ae(166));return $n(e),null}if(n=na(qr.current),Ph(e)){i=e.stateNode,t=e.type;var s=e.memoizedProps;switch(i[Xr]=e,i[Ru]=s,n=(e.mode&1)!==0,t){case"dialog":Zt("cancel",i),Zt("close",i);break;case"iframe":case"object":case"embed":Zt("load",i);break;case"video":case"audio":for(r=0;r<\/script>",n=n.removeChild(n.firstChild)):typeof i.is=="string"?n=o.createElement(t,{is:i.is}):(n=o.createElement(t),t==="select"&&(o=n,i.multiple?o.multiple=!0:i.size&&(o.size=i.size))):n=o.createElementNS(n,t),n[Xr]=e,n[Ru]=i,aE(n,e,!1,!1),e.stateNode=n;e:{switch(o=h1(t,i),t){case"dialog":Zt("cancel",n),Zt("close",n),r=i;break;case"iframe":case"object":case"embed":Zt("load",n),r=i;break;case"video":case"audio":for(r=0;rKl&&(e.flags|=128,i=!0,zc(s,!1),e.lanes=4194304)}else{if(!i)if(n=mp(o),n!==null){if(e.flags|=128,i=!0,t=n.updateQueue,t!==null&&(e.updateQueue=t,e.flags|=4),zc(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!en)return $n(e),null}else 2*xn()-s.renderingStartTime>Kl&&t!==1073741824&&(e.flags|=128,i=!0,zc(s,!1),e.lanes=4194304);s.isBackwards?(o.sibling=e.child,e.child=o):(t=s.last,t!==null?t.sibling=o:e.child=o,s.last=o)}return s.tail!==null?(e=s.tail,s.rendering=e,s.tail=e.sibling,s.renderingStartTime=xn(),e.sibling=null,t=rn.current,Yt(rn,i?t&1|2:t&1),e):($n(e),null);case 22:case 23:return Ly(),i=e.memoizedState!==null,n!==null&&n.memoizedState!==null!==i&&(e.flags|=8192),i&&e.mode&1?Hi&1073741824&&($n(e),e.subtreeFlags&6&&(e.flags|=8192)):$n(e),null;case 24:return null;case 25:return null}throw Error(Ae(156,e.tag))}function hb(n,e){switch(fy(e),e.tag){case 1:return Li(e.type)&&lp(),n=e.flags,n&65536?(e.flags=n&-65537|128,e):null;case 3:return ql(),Kt(Pi),Kt(li),xy(),n=e.flags,n&65536&&!(n&128)?(e.flags=n&-65537|128,e):null;case 5:return _y(e),null;case 13:if(Kt(rn),n=e.memoizedState,n!==null&&n.dehydrated!==null){if(e.alternate===null)throw Error(Ae(340));jl()}return n=e.flags,n&65536?(e.flags=n&-65537|128,e):null;case 19:return Kt(rn),null;case 4:return ql(),null;case 10:return my(e.type._context),null;case 22:case 23:return Ly(),null;case 24:return null;default:return null}}var Nh=!1,ri=!1,db=typeof WeakSet=="function"?WeakSet:Set,Ve=null;function Rl(n,e){var t=n.ref;if(t!==null)if(typeof t=="function")try{t(null)}catch(i){hn(n,e,i)}else t.current=null}function k1(n,e,t){try{t()}catch(i){hn(n,e,i)}}var iS=!1;function pb(n,e){if(M1=rp,n=dw(),cy(n)){if("selectionStart"in n)var t={start:n.selectionStart,end:n.selectionEnd};else e:{t=(t=n.ownerDocument)&&t.defaultView||window;var i=t.getSelection&&t.getSelection();if(i&&i.rangeCount!==0){t=i.anchorNode;var r=i.anchorOffset,s=i.focusNode;i=i.focusOffset;try{t.nodeType,s.nodeType}catch{t=null;break e}var o=0,a=-1,u=-1,f=0,h=0,d=n,p=null;t:for(;;){for(var v;d!==t||r!==0&&d.nodeType!==3||(a=o+r),d!==s||i!==0&&d.nodeType!==3||(u=o+i),d.nodeType===3&&(o+=d.nodeValue.length),(v=d.firstChild)!==null;)p=d,d=v;for(;;){if(d===n)break t;if(p===t&&++f===r&&(a=o),p===s&&++h===i&&(u=o),(v=d.nextSibling)!==null)break;d=p,p=d.parentNode}d=v}t=a===-1||u===-1?null:{start:a,end:u}}else t=null}t=t||{start:0,end:0}}else t=null;for(w1={focusedElem:n,selectionRange:t},rp=!1,Ve=e;Ve!==null;)if(e=Ve,n=e.child,(e.subtreeFlags&1028)!==0&&n!==null)n.return=e,Ve=n;else for(;Ve!==null;){e=Ve;try{var y=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var w=y.memoizedProps,S=y.memoizedState,g=e.stateNode,x=g.getSnapshotBeforeUpdate(e.elementType===e.type?w:wr(e.type,w),S);g.__reactInternalSnapshotBeforeUpdate=x}break;case 3:var M=e.stateNode.containerInfo;M.nodeType===1?M.textContent="":M.nodeType===9&&M.documentElement&&M.removeChild(M.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Ae(163))}}catch(T){hn(e,e.return,T)}if(n=e.sibling,n!==null){n.return=e.return,Ve=n;break}Ve=e.return}return y=iS,iS=!1,y}function cu(n,e,t){var i=e.updateQueue;if(i=i!==null?i.lastEffect:null,i!==null){var r=i=i.next;do{if((r.tag&n)===n){var s=r.destroy;r.destroy=void 0,s!==void 0&&k1(e,t,s)}r=r.next}while(r!==i)}}function Gp(n,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var t=e=e.next;do{if((t.tag&n)===n){var i=t.create;t.destroy=i()}t=t.next}while(t!==e)}}function B1(n){var e=n.ref;if(e!==null){var t=n.stateNode;switch(n.tag){case 5:n=t;break;default:n=t}typeof e=="function"?e(n):e.current=n}}function uE(n){var e=n.alternate;e!==null&&(n.alternate=null,uE(e)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(e=n.stateNode,e!==null&&(delete e[Xr],delete e[Ru],delete e[A1],delete e[K5],delete e[J5])),n.stateNode=null,n.return=null,n.dependencies=null,n.memoizedProps=null,n.memoizedState=null,n.pendingProps=null,n.stateNode=null,n.updateQueue=null}function fE(n){return n.tag===5||n.tag===3||n.tag===4}function rS(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||fE(n.return))return null;n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==5&&n.tag!==6&&n.tag!==18;){if(n.flags&2||n.child===null||n.tag===4)continue e;n.child.return=n,n=n.child}if(!(n.flags&2))return n.stateNode}}function H1(n,e,t){var i=n.tag;if(i===5||i===6)n=n.stateNode,e?t.nodeType===8?t.parentNode.insertBefore(n,e):t.insertBefore(n,e):(t.nodeType===8?(e=t.parentNode,e.insertBefore(n,t)):(e=t,e.appendChild(n)),t=t._reactRootContainer,t!=null||e.onclick!==null||(e.onclick=ap));else if(i!==4&&(n=n.child,n!==null))for(H1(n,e,t),n=n.sibling;n!==null;)H1(n,e,t),n=n.sibling}function V1(n,e,t){var i=n.tag;if(i===5||i===6)n=n.stateNode,e?t.insertBefore(n,e):t.appendChild(n);else if(i!==4&&(n=n.child,n!==null))for(V1(n,e,t),n=n.sibling;n!==null;)V1(n,e,t),n=n.sibling}var Wn=null,Tr=!1;function Vs(n,e,t){for(t=t.child;t!==null;)hE(n,e,t),t=t.sibling}function hE(n,e,t){if(Yr&&typeof Yr.onCommitFiberUnmount=="function")try{Yr.onCommitFiberUnmount(Up,t)}catch{}switch(t.tag){case 5:ri||Rl(t,e);case 6:var i=Wn,r=Tr;Wn=null,Vs(n,e,t),Wn=i,Tr=r,Wn!==null&&(Tr?(n=Wn,t=t.stateNode,n.nodeType===8?n.parentNode.removeChild(t):n.removeChild(t)):Wn.removeChild(t.stateNode));break;case 18:Wn!==null&&(Tr?(n=Wn,t=t.stateNode,n.nodeType===8?K0(n.parentNode,t):n.nodeType===1&&K0(n,t),Eu(n)):K0(Wn,t.stateNode));break;case 4:i=Wn,r=Tr,Wn=t.stateNode.containerInfo,Tr=!0,Vs(n,e,t),Wn=i,Tr=r;break;case 0:case 11:case 14:case 15:if(!ri&&(i=t.updateQueue,i!==null&&(i=i.lastEffect,i!==null))){r=i=i.next;do{var s=r,o=s.destroy;s=s.tag,o!==void 0&&(s&2||s&4)&&k1(t,e,o),r=r.next}while(r!==i)}Vs(n,e,t);break;case 1:if(!ri&&(Rl(t,e),i=t.stateNode,typeof i.componentWillUnmount=="function"))try{i.props=t.memoizedProps,i.state=t.memoizedState,i.componentWillUnmount()}catch(a){hn(t,e,a)}Vs(n,e,t);break;case 21:Vs(n,e,t);break;case 22:t.mode&1?(ri=(i=ri)||t.memoizedState!==null,Vs(n,e,t),ri=i):Vs(n,e,t);break;default:Vs(n,e,t)}}function sS(n){var e=n.updateQueue;if(e!==null){n.updateQueue=null;var t=n.stateNode;t===null&&(t=n.stateNode=new db),e.forEach(function(i){var r=wb.bind(null,n,i);t.has(i)||(t.add(i),i.then(r,r))})}}function _r(n,e){var t=e.deletions;if(t!==null)for(var i=0;ir&&(r=o),i&=~s}if(i=r,i=xn()-i,i=(120>i?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*gb(i/1960))-i,10n?16:n,no===null)var i=!1;else{if(n=no,no=null,xp=0,Nt&6)throw Error(Ae(331));var r=Nt;for(Nt|=4,Ve=n.current;Ve!==null;){var s=Ve,o=s.child;if(Ve.flags&16){var a=s.deletions;if(a!==null){for(var u=0;uxn()-Ry?aa(n,0):by|=t),Ii(n,e)}function xE(n,e){e===0&&(n.mode&1?(e=Eh,Eh<<=1,!(Eh&130023424)&&(Eh=4194304)):e=1);var t=gi();n=Cs(n,e),n!==null&&(lf(n,e,t),Ii(n,t))}function Mb(n){var e=n.memoizedState,t=0;e!==null&&(t=e.retryLane),xE(n,t)}function wb(n,e){var t=0;switch(n.tag){case 13:var i=n.stateNode,r=n.memoizedState;r!==null&&(t=r.retryLane);break;case 19:i=n.stateNode;break;default:throw Error(Ae(314))}i!==null&&i.delete(e),xE(n,t)}var SE;SE=function(n,e,t){if(n!==null)if(n.memoizedProps!==e.pendingProps||Pi.current)Ri=!0;else{if(!(n.lanes&t)&&!(e.flags&128))return Ri=!1,ub(n,e,t);Ri=!!(n.flags&131072)}else Ri=!1,en&&e.flags&1048576&&Ew(e,fp,e.index);switch(e.lanes=0,e.tag){case 2:var i=e.type;Hd(n,e),n=e.pendingProps;var r=Xl(e,li.current);Hl(e,t),r=My(null,e,i,n,r,t);var s=wy();return e.flags|=1,typeof r=="object"&&r!==null&&typeof r.render=="function"&&r.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,Li(i)?(s=!0,cp(e)):s=!1,e.memoizedState=r.state!==null&&r.state!==void 0?r.state:null,vy(e),r.updater=Hp,e.stateNode=r,r._reactInternals=e,I1(e,i,n,t),e=U1(null,e,i,!0,s,t)):(e.tag=0,en&&s&&uy(e),di(null,e,r,t),e=e.child),e;case 16:i=e.elementType;e:{switch(Hd(n,e),n=e.pendingProps,r=i._init,i=r(i._payload),e.type=i,r=e.tag=Tb(i),n=wr(i,n),r){case 0:e=D1(null,e,i,n,t);break e;case 1:e=eS(null,e,i,n,t);break e;case 11:e=Q2(null,e,i,n,t);break e;case 14:e=$2(null,e,i,wr(i.type,n),t);break e}throw Error(Ae(306,i,""))}return e;case 0:return i=e.type,r=e.pendingProps,r=e.elementType===i?r:wr(i,r),D1(n,e,i,r,t);case 1:return i=e.type,r=e.pendingProps,r=e.elementType===i?r:wr(i,r),eS(n,e,i,r,t);case 3:e:{if(rE(e),n===null)throw Error(Ae(387));i=e.pendingProps,s=e.memoizedState,r=s.element,bw(n,e),pp(e,i,null,t);var o=e.memoizedState;if(i=o.element,s.isDehydrated)if(s={element:i,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},e.updateQueue.baseState=s,e.memoizedState=s,e.flags&256){r=Zl(Error(Ae(423)),e),e=tS(n,e,i,t,r);break e}else if(i!==r){r=Zl(Error(Ae(424)),e),e=tS(n,e,i,t,r);break e}else for(Wi=ao(e.stateNode.containerInfo.firstChild),ji=e,en=!0,Ar=null,t=Iw(e,null,i,t),e.child=t;t;)t.flags=t.flags&-3|4096,t=t.sibling;else{if(jl(),i===r){e=bs(n,e,t);break e}di(n,e,i,t)}e=e.child}return e;case 5:return Nw(e),n===null&&R1(e),i=e.type,r=e.pendingProps,s=n!==null?n.memoizedProps:null,o=r.children,E1(i,r)?o=null:s!==null&&E1(i,s)&&(e.flags|=32),iE(n,e),di(n,e,o,t),e.child;case 6:return n===null&&R1(e),null;case 13:return sE(n,e,t);case 4:return yy(e,e.stateNode.containerInfo),i=e.pendingProps,n===null?e.child=Yl(e,null,i,t):di(n,e,i,t),e.child;case 11:return i=e.type,r=e.pendingProps,r=e.elementType===i?r:wr(i,r),Q2(n,e,i,r,t);case 7:return di(n,e,e.pendingProps,t),e.child;case 8:return di(n,e,e.pendingProps.children,t),e.child;case 12:return di(n,e,e.pendingProps.children,t),e.child;case 10:e:{if(i=e.type._context,r=e.pendingProps,s=e.memoizedProps,o=r.value,Yt(hp,i._currentValue),i._currentValue=o,s!==null)if(Lr(s.value,o)){if(s.children===r.children&&!Pi.current){e=bs(n,e,t);break e}}else for(s=e.child,s!==null&&(s.return=e);s!==null;){var a=s.dependencies;if(a!==null){o=s.child;for(var u=a.firstContext;u!==null;){if(u.context===i){if(s.tag===1){u=ws(-1,t&-t),u.tag=2;var f=s.updateQueue;if(f!==null){f=f.shared;var h=f.pending;h===null?u.next=u:(u.next=h.next,h.next=u),f.pending=u}}s.lanes|=t,u=s.alternate,u!==null&&(u.lanes|=t),P1(s.return,t,e),a.lanes|=t;break}u=u.next}}else if(s.tag===10)o=s.type===e.type?null:s.child;else if(s.tag===18){if(o=s.return,o===null)throw Error(Ae(341));o.lanes|=t,a=o.alternate,a!==null&&(a.lanes|=t),P1(o,t,e),o=s.sibling}else o=s.child;if(o!==null)o.return=s;else for(o=s;o!==null;){if(o===e){o=null;break}if(s=o.sibling,s!==null){s.return=o.return,o=s;break}o=o.return}s=o}di(n,e,r.children,t),e=e.child}return e;case 9:return r=e.type,i=e.pendingProps.children,Hl(e,t),r=pr(r),i=i(r),e.flags|=1,di(n,e,i,t),e.child;case 14:return i=e.type,r=wr(i,e.pendingProps),r=wr(i.type,r),$2(n,e,i,r,t);case 15:return tE(n,e,e.type,e.pendingProps,t);case 17:return i=e.type,r=e.pendingProps,r=e.elementType===i?r:wr(i,r),Hd(n,e),e.tag=1,Li(i)?(n=!0,cp(e)):n=!1,Hl(e,t),Pw(e,i,r),I1(e,i,r,t),U1(null,e,i,!0,n,t);case 19:return oE(n,e,t);case 22:return nE(n,e,t)}throw Error(Ae(156,e.tag))};function ME(n,e){return qM(n,e)}function Eb(n,e,t,i){this.tag=n,this.key=t,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=i,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function fr(n,e,t,i){return new Eb(n,e,t,i)}function Ny(n){return n=n.prototype,!(!n||!n.isReactComponent)}function Tb(n){if(typeof n=="function")return Ny(n)?1:0;if(n!=null){if(n=n.$$typeof,n===Qv)return 11;if(n===$v)return 14}return 2}function fo(n,e){var t=n.alternate;return t===null?(t=fr(n.tag,e,n.key,n.mode),t.elementType=n.elementType,t.type=n.type,t.stateNode=n.stateNode,t.alternate=n,n.alternate=t):(t.pendingProps=e,t.type=n.type,t.flags=0,t.subtreeFlags=0,t.deletions=null),t.flags=n.flags&14680064,t.childLanes=n.childLanes,t.lanes=n.lanes,t.child=n.child,t.memoizedProps=n.memoizedProps,t.memoizedState=n.memoizedState,t.updateQueue=n.updateQueue,e=n.dependencies,t.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},t.sibling=n.sibling,t.index=n.index,t.ref=n.ref,t}function Wd(n,e,t,i,r,s){var o=2;if(i=n,typeof n=="function")Ny(n)&&(o=1);else if(typeof n=="string")o=5;else e:switch(n){case xl:return la(t.children,r,s,e);case Jv:o=8,r|=8;break;case n1:return n=fr(12,t,e,r|2),n.elementType=n1,n.lanes=s,n;case i1:return n=fr(13,t,e,r),n.elementType=i1,n.lanes=s,n;case r1:return n=fr(19,t,e,r),n.elementType=r1,n.lanes=s,n;case LM:return Xp(t,r,s,e);default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case RM:o=10;break e;case PM:o=9;break e;case Qv:o=11;break e;case $v:o=14;break e;case Ks:o=16,i=null;break e}throw Error(Ae(130,n==null?n:typeof n,""))}return e=fr(o,t,e,r),e.elementType=n,e.type=i,e.lanes=s,e}function la(n,e,t,i){return n=fr(7,n,i,e),n.lanes=t,n}function Xp(n,e,t,i){return n=fr(22,n,i,e),n.elementType=LM,n.lanes=t,n.stateNode={isHidden:!1},n}function rg(n,e,t){return n=fr(6,n,null,e),n.lanes=t,n}function sg(n,e,t){return e=fr(4,n.children!==null?n.children:[],n.key,e),e.lanes=t,e.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},e}function Ab(n,e,t,i,r){this.tag=e,this.containerInfo=n,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=k0(0),this.expirationTimes=k0(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=k0(0),this.identifierPrefix=i,this.onRecoverableError=r,this.mutableSourceEagerHydrationData=null}function Dy(n,e,t,i,r,s,o,a,u){return n=new Ab(n,e,t,a,u),e===1?(e=1,s===!0&&(e|=8)):e=0,s=fr(3,null,null,e),n.current=s,s.stateNode=n,s.memoizedState={element:i,isDehydrated:t,cache:null,transitions:null,pendingSuspenseBoundaries:null},vy(s),n}function Cb(n,e,t){var i=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(AE)}catch(n){console.error(n)}}AE(),EM.exports=Zi;var Ib=EM.exports,dS=Ib;e1.createRoot=dS.createRoot,e1.hydrateRoot=dS.hydrateRoot;var CE={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},pS=Pt.createContext&&Pt.createContext(CE),Nb=["attr","size","title"];function Db(n,e){if(n==null)return{};var t=Ub(n,e),i,r;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(n);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(n,i)&&(t[i]=n[i])}return t}function Ub(n,e){if(n==null)return{};var t={},i=Object.keys(n),r,s;for(s=0;s=0)&&(t[r]=n[r]);return t}function wp(){return wp=Object.assign?Object.assign.bind():function(n){for(var e=1;ePt.createElement(e.tag,Ep({key:t},e.attr),bE(e.child)))}function Vt(n){return e=>Pt.createElement(kb,wp({attr:Ep({},n.attr)},e),bE(n.child))}function kb(n){var e=t=>{var{attr:i,size:r,title:s}=n,o=Db(n,Nb),a=r||t.size||"1em",u;return t.className&&(u=t.className),n.className&&(u=(u?u+" ":"")+n.className),Pt.createElement("svg",wp({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},t.attr,i,o,{className:u,style:Ep(Ep({color:n.color||t.color},t.style),n.style),height:a,width:a,xmlns:"http://www.w3.org/2000/svg"}),s&&Pt.createElement("title",null,s),n.children)};return pS!==void 0?Pt.createElement(pS.Consumer,null,t=>e(t)):e(CE)}function Bb(n){return Vt({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M1 8a7 7 0 1 0 14 0A7 7 0 0 0 1 8Zm15 0A8 8 0 1 1 0 8a8 8 0 0 1 16 0ZM8.146 4.992c-1.212 0-1.927.92-1.927 2.502v1.06c0 1.571.703 2.462 1.927 2.462.979 0 1.641-.586 1.729-1.418h1.295v.093c-.1 1.448-1.354 2.467-3.03 2.467-2.091 0-3.269-1.336-3.269-3.603V7.482c0-2.261 1.201-3.638 3.27-3.638 1.681 0 2.935 1.054 3.029 2.572v.088H9.875c-.088-.879-.768-1.512-1.729-1.512Z"},child:[]}]})(n)}function Hb(n){return Vt({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.012 8.012 0 0 0 16 8c0-4.42-3.58-8-8-8z"},child:[]}]})(n)}function Vb(n){return Vt({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M0 1.146C0 .513.526 0 1.175 0h13.65C15.474 0 16 .513 16 1.146v13.708c0 .633-.526 1.146-1.175 1.146H1.175C.526 16 0 15.487 0 14.854V1.146zm4.943 12.248V6.169H2.542v7.225h2.401zm-1.2-8.212c.837 0 1.358-.554 1.358-1.248-.015-.709-.52-1.248-1.342-1.248-.822 0-1.359.54-1.359 1.248 0 .694.521 1.248 1.327 1.248h.016zm4.908 8.212V9.359c0-.216.016-.432.08-.586.173-.431.568-.878 1.232-.878.869 0 1.216.662 1.216 1.634v3.865h2.401V9.25c0-2.22-1.184-3.252-2.764-3.252-1.274 0-1.845.7-2.165 1.193v.025h-.016a5.54 5.54 0 0 1 .016-.025V6.169h-2.4c.03.678 0 7.225 0 7.225h2.4z"},child:[]}]})(n)}function Gb(n){return Vt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M71.92 34.77C50.2 47.67 7.4 96.84 7 109.73v21.34c0 27.06 25.29 50.84 48.25 50.84 27.57 0 50.54-22.85 50.54-50 0 27.12 22.18 50 49.76 50s49-22.85 49-50c0 27.12 23.59 50 51.16 50h.5c27.57 0 51.16-22.85 51.16-50 0 27.12 21.47 50 49 50s49.76-22.85 49.76-50c0 27.12 23 50 50.54 50 23 0 48.25-23.78 48.25-50.84v-21.34c-.4-12.9-43.2-62.07-64.92-75C372.56 32.4 325.76 32 256 32S91.14 33.1 71.92 34.77zm132.32 134.39c-22 38.4-77.9 38.71-99.85.25-13.17 23.14-43.17 32.07-56 27.66-3.87 40.15-13.67 237.13 17.73 269.15 80 18.67 302.08 18.12 379.76 0 31.65-32.27 21.32-232 17.75-269.15-12.92 4.44-42.88-4.6-56-27.66-22 38.52-77.85 38.1-99.85-.24-7.1 12.49-23.05 28.94-51.76 28.94a57.54 57.54 0 0 1-51.75-28.94zm-41.58 53.77c16.47 0 31.09 0 49.22 19.78a436.91 436.91 0 0 1 88.18 0C318.22 223 332.85 223 349.31 223c52.33 0 65.22 77.53 83.87 144.45 17.26 62.15-5.52 63.67-33.95 63.73-42.15-1.57-65.49-32.18-65.49-62.79-39.25 6.43-101.93 8.79-155.55 0 0 30.61-23.34 61.22-65.49 62.79-28.42-.06-51.2-1.58-33.94-63.73 18.67-67 31.56-144.45 83.88-144.45zM256 270.79s-44.38 40.77-52.35 55.21l29-1.17v25.32c0 1.55 21.34.16 23.33.16 11.65.54 23.31 1 23.31-.16v-25.28l29 1.17c-8-14.48-52.35-55.24-52.35-55.24z"},child:[]}]})(n)}function Wb(n){return Vt({tag:"svg",attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M277.74 312.9c9.8-6.7 23.4-12.5 23.4-12.5s-38.7 7-77.2 10.2c-47.1 3.9-97.7 4.7-123.1 1.3-60.1-8 33-30.1 33-30.1s-36.1-2.4-80.6 19c-52.5 25.4 130 37 224.5 12.1zm-85.4-32.1c-19-42.7-83.1-80.2 0-145.8C296 53.2 242.84 0 242.84 0c21.5 84.5-75.6 110.1-110.7 162.6-23.9 35.9 11.7 74.4 60.2 118.2zm114.6-176.2c.1 0-175.2 43.8-91.5 140.2 24.7 28.4-6.5 54-6.5 54s62.7-32.4 33.9-72.9c-26.9-37.8-47.5-56.6 64.1-121.3zm-6.1 270.5a12.19 12.19 0 0 1-2 2.6c128.3-33.7 81.1-118.9 19.8-97.3a17.33 17.33 0 0 0-8.2 6.3 70.45 70.45 0 0 1 11-3c31-6.5 75.5 41.5-20.6 91.4zM348 437.4s14.5 11.9-15.9 21.2c-57.9 17.5-240.8 22.8-291.6.7-18.3-7.9 16-19 26.8-21.3 11.2-2.4 17.7-2 17.7-2-20.3-14.3-131.3 28.1-56.4 40.2C232.84 509.4 401 461.3 348 437.4zM124.44 396c-78.7 22 47.9 67.4 148.1 24.5a185.89 185.89 0 0 1-28.2-13.8c-44.7 8.5-65.4 9.1-106 4.5-33.5-3.8-13.9-15.2-13.9-15.2zm179.8 97.2c-78.7 14.8-175.8 13.1-233.3 3.6 0-.1 11.8 9.7 72.4 13.6 92.2 5.9 233.8-3.3 237.1-46.9 0 0-6.4 16.5-76.2 29.7zM260.64 353c-59.2 11.4-93.5 11.1-136.8 6.6-33.5-3.5-11.6-19.7-11.6-19.7-86.8 28.8 48.2 61.4 169.5 25.9a60.37 60.37 0 0 1-21.1-12.8z"},child:[]}]})(n)}function Xb(n){return Vt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M224 508c-6.7 0-13.5-1.8-19.4-5.2l-61.7-36.5c-9.2-5.2-4.7-7-1.7-8 12.3-4.3 14.8-5.2 27.9-12.7 1.4-.8 3.2-.5 4.6.4l47.4 28.1c1.7 1 4.1 1 5.7 0l184.7-106.6c1.7-1 2.8-3 2.8-5V149.3c0-2.1-1.1-4-2.9-5.1L226.8 37.7c-1.7-1-4-1-5.7 0L36.6 144.3c-1.8 1-2.9 3-2.9 5.1v213.1c0 2 1.1 4 2.9 4.9l50.6 29.2c27.5 13.7 44.3-2.4 44.3-18.7V167.5c0-3 2.4-5.3 5.4-5.3h23.4c2.9 0 5.4 2.3 5.4 5.3V378c0 36.6-20 57.6-54.7 57.6-10.7 0-19.1 0-42.5-11.6l-48.4-27.9C8.1 389.2.7 376.3.7 362.4V149.3c0-13.8 7.4-26.8 19.4-33.7L204.6 9c11.7-6.6 27.2-6.6 38.8 0l184.7 106.7c12 6.9 19.4 19.8 19.4 33.7v213.1c0 13.8-7.4 26.7-19.4 33.7L243.4 502.8c-5.9 3.4-12.6 5.2-19.4 5.2zm149.1-210.1c0-39.9-27-50.5-83.7-58-57.4-7.6-63.2-11.5-63.2-24.9 0-11.1 4.9-25.9 47.4-25.9 37.9 0 51.9 8.2 57.7 33.8.5 2.4 2.7 4.2 5.2 4.2h24c1.5 0 2.9-.6 3.9-1.7s1.5-2.6 1.4-4.1c-3.7-44.1-33-64.6-92.2-64.6-52.7 0-84.1 22.2-84.1 59.5 0 40.4 31.3 51.6 81.8 56.6 60.5 5.9 65.2 14.8 65.2 26.7 0 20.6-16.6 29.4-55.5 29.4-48.9 0-59.6-12.3-63.2-36.6-.4-2.6-2.6-4.5-5.3-4.5h-23.9c-3 0-5.3 2.4-5.3 5.3 0 31.1 16.9 68.2 97.8 68.2 58.4-.1 92-23.2 92-63.4z"},child:[]}]})(n)}function jb(n){return Vt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M439.8 200.5c-7.7-30.9-22.3-54.2-53.4-54.2h-40.1v47.4c0 36.8-31.2 67.8-66.8 67.8H172.7c-29.2 0-53.4 25-53.4 54.3v101.8c0 29 25.2 46 53.4 54.3 33.8 9.9 66.3 11.7 106.8 0 26.9-7.8 53.4-23.5 53.4-54.3v-40.7H226.2v-13.6h160.2c31.1 0 42.6-21.7 53.4-54.2 11.2-33.5 10.7-65.7 0-108.6zM286.2 404c11.1 0 20.1 9.1 20.1 20.3 0 11.3-9 20.4-20.1 20.4-11 0-20.1-9.2-20.1-20.4.1-11.3 9.1-20.3 20.1-20.3zM167.8 248.1h106.8c29.7 0 53.4-24.5 53.4-54.3V91.9c0-29-24.4-50.7-53.4-55.6-35.8-5.9-74.7-5.6-106.8.1-45.2 8-53.4 24.7-53.4 55.6v40.7h106.9v13.6h-147c-31.1 0-58.3 18.7-66.8 54.2-9.8 40.7-10.2 66.1 0 108.6 7.6 31.6 25.7 54.2 56.8 54.2H101v-48.8c0-35.3 30.5-66.4 66.8-66.4zm-6.7-142.6c-11.1 0-20.1-9.1-20.1-20.3.1-11.3 9-20.4 20.1-20.4 11 0 20.1 9.2 20.1 20.4s-9 20.3-20.1 20.3z"},child:[]}]})(n)}function Yb(n){return Vt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M418.2 177.2c-5.4-1.8-10.8-3.5-16.2-5.1.9-3.7 1.7-7.4 2.5-11.1 12.3-59.6 4.2-107.5-23.1-123.3-26.3-15.1-69.2.6-112.6 38.4-4.3 3.7-8.5 7.6-12.5 11.5-2.7-2.6-5.5-5.2-8.3-7.7-45.5-40.4-91.1-57.4-118.4-41.5-26.2 15.2-34 60.3-23 116.7 1.1 5.6 2.3 11.1 3.7 16.7-6.4 1.8-12.7 3.8-18.6 5.9C38.3 196.2 0 225.4 0 255.6c0 31.2 40.8 62.5 96.3 81.5 4.5 1.5 9 3 13.6 4.3-1.5 6-2.8 11.9-4 18-10.5 55.5-2.3 99.5 23.9 114.6 27 15.6 72.4-.4 116.6-39.1 3.5-3.1 7-6.3 10.5-9.7 4.4 4.3 9 8.4 13.6 12.4 42.8 36.8 85.1 51.7 111.2 36.6 27-15.6 35.8-62.9 24.4-120.5-.9-4.4-1.9-8.9-3-13.5 3.2-.9 6.3-1.9 9.4-2.9 57.7-19.1 99.5-50 99.5-81.7 0-30.3-39.4-59.7-93.8-78.4zM282.9 92.3c37.2-32.4 71.9-45.1 87.7-36 16.9 9.7 23.4 48.9 12.8 100.4-.7 3.4-1.4 6.7-2.3 10-22.2-5-44.7-8.6-67.3-10.6-13-18.6-27.2-36.4-42.6-53.1 3.9-3.7 7.7-7.2 11.7-10.7zM167.2 307.5c5.1 8.7 10.3 17.4 15.8 25.9-15.6-1.7-31.1-4.2-46.4-7.5 4.4-14.4 9.9-29.3 16.3-44.5 4.6 8.8 9.3 17.5 14.3 26.1zm-30.3-120.3c14.4-3.2 29.7-5.8 45.6-7.8-5.3 8.3-10.5 16.8-15.4 25.4-4.9 8.5-9.7 17.2-14.2 26-6.3-14.9-11.6-29.5-16-43.6zm27.4 68.9c6.6-13.8 13.8-27.3 21.4-40.6s15.8-26.2 24.4-38.9c15-1.1 30.3-1.7 45.9-1.7s31 .6 45.9 1.7c8.5 12.6 16.6 25.5 24.3 38.7s14.9 26.7 21.7 40.4c-6.7 13.8-13.9 27.4-21.6 40.8-7.6 13.3-15.7 26.2-24.2 39-14.9 1.1-30.4 1.6-46.1 1.6s-30.9-.5-45.6-1.4c-8.7-12.7-16.9-25.7-24.6-39s-14.8-26.8-21.5-40.6zm180.6 51.2c5.1-8.8 9.9-17.7 14.6-26.7 6.4 14.5 12 29.2 16.9 44.3-15.5 3.5-31.2 6.2-47 8 5.4-8.4 10.5-17 15.5-25.6zm14.4-76.5c-4.7-8.8-9.5-17.6-14.5-26.2-4.9-8.5-10-16.9-15.3-25.2 16.1 2 31.5 4.7 45.9 8-4.6 14.8-10 29.2-16.1 43.4zM256.2 118.3c10.5 11.4 20.4 23.4 29.6 35.8-19.8-.9-39.7-.9-59.5 0 9.8-12.9 19.9-24.9 29.9-35.8zM140.2 57c16.8-9.8 54.1 4.2 93.4 39 2.5 2.2 5 4.6 7.6 7-15.5 16.7-29.8 34.5-42.9 53.1-22.6 2-45 5.5-67.2 10.4-1.3-5.1-2.4-10.3-3.5-15.5-9.4-48.4-3.2-84.9 12.6-94zm-24.5 263.6c-4.2-1.2-8.3-2.5-12.4-3.9-21.3-6.7-45.5-17.3-63-31.2-10.1-7-16.9-17.8-18.8-29.9 0-18.3 31.6-41.7 77.2-57.6 5.7-2 11.5-3.8 17.3-5.5 6.8 21.7 15 43 24.5 63.6-9.6 20.9-17.9 42.5-24.8 64.5zm116.6 98c-16.5 15.1-35.6 27.1-56.4 35.3-11.1 5.3-23.9 5.8-35.3 1.3-15.9-9.2-22.5-44.5-13.5-92 1.1-5.6 2.3-11.2 3.7-16.7 22.4 4.8 45 8.1 67.9 9.8 13.2 18.7 27.7 36.6 43.2 53.4-3.2 3.1-6.4 6.1-9.6 8.9zm24.5-24.3c-10.2-11-20.4-23.2-30.3-36.3 9.6.4 19.5.6 29.5.6 10.3 0 20.4-.2 30.4-.7-9.2 12.7-19.1 24.8-29.6 36.4zm130.7 30c-.9 12.2-6.9 23.6-16.5 31.3-15.9 9.2-49.8-2.8-86.4-34.2-4.2-3.6-8.4-7.5-12.7-11.5 15.3-16.9 29.4-34.8 42.2-53.6 22.9-1.9 45.7-5.4 68.2-10.5 1 4.1 1.9 8.2 2.7 12.2 4.9 21.6 5.7 44.1 2.5 66.3zm18.2-107.5c-2.8.9-5.6 1.8-8.5 2.6-7-21.8-15.6-43.1-25.5-63.8 9.6-20.4 17.7-41.4 24.5-62.9 5.2 1.5 10.2 3.1 15 4.7 46.6 16 79.3 39.8 79.3 58 0 19.6-34.9 44.9-84.8 61.4zm-149.7-15c25.3 0 45.8-20.5 45.8-45.8s-20.5-45.8-45.8-45.8c-25.3 0-45.8 20.5-45.8 45.8s20.5 45.8 45.8 45.8z"},child:[]}]})(n)}function qb(n){return Vt({tag:"svg",attr:{role:"img",viewBox:"0 0 24 24"},child:[{tag:"path",attr:{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.666 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"},child:[]}]})(n)}function Zb(n){return Vt({tag:"svg",attr:{role:"img",viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M13.483 0a1.374 1.374 0 0 0-.961.438L7.116 6.226l-3.854 4.126a5.266 5.266 0 0 0-1.209 2.104 5.35 5.35 0 0 0-.125.513 5.527 5.527 0 0 0 .062 2.362 5.83 5.83 0 0 0 .349 1.017 5.938 5.938 0 0 0 1.271 1.818l4.277 4.193.039.038c2.248 2.165 5.852 2.133 8.063-.074l2.396-2.392c.54-.54.54-1.414.003-1.955a1.378 1.378 0 0 0-1.951-.003l-2.396 2.392a3.021 3.021 0 0 1-4.205.038l-.02-.019-4.276-4.193c-.652-.64-.972-1.469-.948-2.263a2.68 2.68 0 0 1 .066-.523 2.545 2.545 0 0 1 .619-1.164L9.13 8.114c1.058-1.134 3.204-1.27 4.43-.278l3.501 2.831c.593.48 1.461.387 1.94-.207a1.384 1.384 0 0 0-.207-1.943l-3.5-2.831c-.8-.647-1.766-1.045-2.774-1.202l2.015-2.158A1.384 1.384 0 0 0 13.483 0zm-2.866 12.815a1.38 1.38 0 0 0-1.38 1.382 1.38 1.38 0 0 0 1.38 1.382H20.79a1.38 1.38 0 0 0 1.38-1.382 1.38 1.38 0 0 0-1.38-1.382z"},child:[]}]})(n)}function Kb(n){return Vt({tag:"svg",attr:{role:"img",viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M17.193 9.555c-1.264-5.58-4.252-7.414-4.573-8.115-.28-.394-.53-.954-.735-1.44-.036.495-.055.685-.523 1.184-.723.566-4.438 3.682-4.74 10.02-.282 5.912 4.27 9.435 4.888 9.884l.07.05A73.49 73.49 0 0111.91 24h.481c.114-1.032.284-2.056.51-3.07.417-.296.604-.463.85-.693a11.342 11.342 0 003.639-8.464c.01-.814-.103-1.662-.197-2.218zm-5.336 8.195s0-8.291.275-8.29c.213 0 .49 10.695.49 10.695-.381-.045-.765-1.76-.765-2.405z"},child:[]}]})(n)}function Jb(n){return Vt({tag:"svg",attr:{role:"img",viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M16.405 5.501c-.115 0-.193.014-.274.033v.013h.014c.054.104.146.18.214.273.054.107.1.214.154.32l.014-.015c.094-.066.14-.172.14-.333-.04-.047-.046-.094-.08-.14-.04-.067-.126-.1-.18-.153zM5.77 18.695h-.927a50.854 50.854 0 00-.27-4.41h-.008l-1.41 4.41H2.45l-1.4-4.41h-.01a72.892 72.892 0 00-.195 4.41H0c.055-1.966.192-3.81.41-5.53h1.15l1.335 4.064h.008l1.347-4.064h1.095c.242 2.015.384 3.86.428 5.53zm4.017-4.08c-.378 2.045-.876 3.533-1.492 4.46-.482.716-1.01 1.073-1.583 1.073-.153 0-.34-.046-.566-.138v-.494c.11.017.24.026.386.026.268 0 .483-.075.647-.222.197-.18.295-.382.295-.605 0-.155-.077-.47-.23-.944L6.23 14.615h.91l.727 2.36c.164.536.233.91.205 1.123.4-1.064.678-2.227.835-3.483zm12.325 4.08h-2.63v-5.53h.885v4.85h1.745zm-3.32.135l-1.016-.5c.09-.076.177-.158.255-.25.433-.506.648-1.258.648-2.253 0-1.83-.718-2.746-2.155-2.746-.704 0-1.254.232-1.65.697-.43.508-.646 1.256-.646 2.245 0 .972.19 1.686.574 2.14.35.41.877.615 1.583.615.264 0 .506-.033.725-.098l1.325.772.36-.622zM15.5 17.588c-.225-.36-.337-.94-.337-1.736 0-1.393.424-2.09 1.27-2.09.443 0 .77.167.977.5.224.362.336.936.336 1.723 0 1.404-.424 2.108-1.27 2.108-.445 0-.77-.167-.978-.5zm-1.658-.425c0 .47-.172.856-.516 1.156-.344.3-.803.45-1.384.45-.543 0-1.064-.172-1.573-.515l.237-.476c.438.22.833.328 1.19.328.332 0 .593-.073.783-.22a.754.754 0 00.3-.615c0-.33-.23-.61-.648-.845-.388-.213-1.163-.657-1.163-.657-.422-.307-.632-.636-.632-1.177 0-.45.157-.81.47-1.085.315-.278.72-.415 1.22-.415.512 0 .98.136 1.4.41l-.213.476a2.726 2.726 0 00-1.064-.23c-.283 0-.502.068-.654.206a.685.685 0 00-.248.524c0 .328.234.61.666.85.393.215 1.187.67 1.187.67.433.305.648.63.648 1.168zm9.382-5.852c-.535-.014-.95.04-1.297.188-.1.04-.26.04-.274.167.055.053.063.14.11.214.08.134.218.313.346.407.14.11.28.216.427.31.26.16.555.255.81.416.145.094.293.213.44.313.073.05.12.14.214.172v-.02c-.046-.06-.06-.147-.105-.214-.067-.067-.134-.127-.2-.193a3.223 3.223 0 00-.695-.675c-.214-.146-.682-.35-.77-.595l-.013-.014c.146-.013.32-.066.46-.106.227-.06.435-.047.67-.106.106-.027.213-.06.32-.094v-.06c-.12-.12-.21-.283-.334-.395a8.867 8.867 0 00-1.104-.823c-.21-.134-.476-.22-.697-.334-.08-.04-.214-.06-.26-.127-.12-.146-.19-.34-.275-.514a17.69 17.69 0 01-.547-1.163c-.12-.262-.193-.523-.34-.763-.69-1.137-1.437-1.826-2.586-2.5-.247-.14-.543-.2-.856-.274-.167-.008-.334-.02-.5-.027-.11-.047-.216-.174-.31-.235-.38-.24-1.364-.76-1.644-.072-.18.434.267.862.422 1.082.115.153.26.328.34.5.047.116.06.235.107.356.106.294.207.622.347.897.073.14.153.287.247.413.054.073.146.107.167.227-.094.136-.1.334-.154.5-.24.757-.146 1.693.194 2.25.107.166.362.534.703.393.3-.12.234-.5.32-.835.02-.08.007-.133.048-.187v.015c.094.188.188.367.274.555.206.328.566.668.867.895.16.12.287.328.487.402v-.02h-.015c-.043-.058-.1-.086-.154-.133a3.445 3.445 0 01-.35-.4 8.76 8.76 0 01-.747-1.218c-.11-.21-.202-.436-.29-.643-.04-.08-.04-.2-.107-.24-.1.146-.247.273-.32.453-.127.288-.14.642-.188 1.01-.027.007-.014 0-.027.014-.214-.052-.287-.274-.367-.46-.2-.475-.233-1.238-.06-1.785.047-.14.247-.582.167-.716-.042-.127-.174-.2-.247-.303a2.478 2.478 0 01-.24-.427c-.16-.374-.24-.788-.414-1.162-.08-.173-.22-.354-.334-.513-.127-.18-.267-.307-.368-.52-.033-.073-.08-.194-.027-.274.014-.054.042-.075.094-.09.088-.072.335.022.422.062.247.1.455.194.662.334.094.066.195.193.315.226h.14c.214.047.455.014.655.073.355.114.675.28.962.46a5.953 5.953 0 012.085 2.286c.08.154.115.295.188.455.14.33.313.663.455.982.14.315.275.636.476.897.1.14.502.213.682.286.133.06.34.115.46.188.23.14.454.3.67.454.11.076.443.243.463.378z"},child:[]}]})(n)}function Qb(n){return Vt({tag:"svg",attr:{role:"img",viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M4.409 6.608L7.981.255l3.572 6.353H4.409zM8.411 0l3.569 6.348L15.552 0H8.411zm4.036 17.392l3.572 6.354 3.575-6.354h-7.147zm-.608-10.284h-7.43l3.715 6.605 3.715-6.605zm.428-.25h7.428L15.982.255l-3.715 6.603zM15.589 24l-3.569-6.349L8.448 24h7.141zm-3.856-6.858H4.306l3.712 6.603 3.715-6.603zm.428-.25h7.433l-3.718-6.605-3.715 6.605z"},child:[]}]})(n)}function $b(n){return Vt({tag:"svg",attr:{role:"img",viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M12 0a12 12 0 1012 12A12 12 0 0012 0zm0 23.52A11.52 11.52 0 1123.52 12 11.52 11.52 0 0112 23.52zm7.13-9.791c-.206.997-1.126 3.557-4.06 4.942l-1.179-1.325-1.988 2a7.338 7.338 0 01-5.804-2.978 2.859 2.859 0 00.65.123c.326.006.678-.114.678-.66v-5.394a.89.89 0 00-1.116-.89c-.92.212-1.656 2.509-1.656 2.509a7.304 7.304 0 012.528-5.597 7.408 7.408 0 013.73-1.721c-1.006.573-1.57 1.507-1.57 2.29 0 1.262.76 1.109.984.923v7.28a1.157 1.157 0 00.148.256 1.075 1.075 0 00.88.445c.76 0 1.747-.868 1.747-.868V9.172c0-.6-.452-1.324-.905-1.572 0 0 .838-.149 1.484.346a5.537 5.537 0 01.387-.425c1.508-1.48 2.929-1.902 4.112-2.112 0 0-2.151 1.69-2.151 3.96 0 1.687.043 5.801.043 5.801.799.771 1.986-.342 3.059-1.441Z"},child:[]}]})(n)}function eR(){return fe.jsx("header",{className:"bg-gradient-to-r from-blue-950 via-blue-600 to-white p-4 text-white",children:fe.jsxs("div",{className:"flex flex-col md:flex-row md:items-center justify-around",children:[fe.jsx("span",{className:"text-4xl p-2 font-bold mb-2 md:mb-0",children:"My Portfolio"}),fe.jsxs("div",{className:"flex justify-around",children:[fe.jsx("a",{href:"https://github.com/Abhinav-Chdhary",target:"_blank",rel:"noopener noreferrer",children:fe.jsx("button",{className:"bg-gray-950 hover:bg-gray-800 text-white p-2 rounded-md m-2",children:fe.jsx(Hb,{size:32})})}),fe.jsx("a",{href:"https://www.linkedin.com/in/abhinavchdhary/",target:"_blank",rel:"noopener noreferrer",children:fe.jsx("button",{className:"bg-blue-600 hover:bg-blue-500 text-white p-2 rounded-md m-2",children:fe.jsx(Vb,{size:32})})}),fe.jsx("a",{href:"https://abhinav-choudhary.itch.io/",target:"_blank",rel:"noopener noreferrer",children:fe.jsx("button",{className:"bg-red-500 hover:bg-red-700 text-white p-2 rounded-md m-2",children:fe.jsx(Gb,{size:32})})}),fe.jsx("a",{href:"https://leetcode.com/Megh_nad/",target:"_blank",rel:"noopener noreferrer",children:fe.jsx("button",{className:"bg-yellow-500 hover:bg-black text-white p-2 rounded-md m-2",children:fe.jsx(Zb,{size:32})})})]})]})})}/** * @license * Copyright 2010-2023 Three.js Authors * SPDX-License-Identifier: MIT - */const Kp="160",Zo={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},Ko={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},RE=0,Y1=1,PE=2,tR=3,LE=0,Jp=1,hu=2,Er=3,Rs=0,vi=1,jr=2,nR=2,Es=0,ca=1,q1=2,Z1=3,K1=4,IE=5,eo=100,NE=101,DE=102,J1=103,Q1=104,UE=200,zE=201,OE=202,FE=203,Tp=204,Ap=205,kE=206,BE=207,HE=208,VE=209,GE=210,WE=211,XE=212,jE=213,YE=214,qE=0,ZE=1,KE=2,zu=3,JE=4,QE=5,$E=6,eT=7,hf=0,tT=1,nT=2,Zr=0,iT=1,rT=2,sT=3,Fy=4,oT=5,aT=6,$1="attached",lT="detached",Qp=300,Ps=301,yo=302,Ou=303,Fu=304,oc=306,ku=1e3,si=1001,Bu=1002,_n=1003,Cp=1004,iR=1004,du=1005,rR=1005,sn=1006,ky=1007,sR=1007,_o=1008,oR=1008,Kr=1009,cT=1010,uT=1011,$p=1012,By=1013,xs=1014,hr=1015,xa=1016,Hy=1017,Vy=1018,ho=1020,fT=1021,pi=1023,hT=1024,dT=1025,po=1026,Sa=1027,pT=1028,Gy=1029,mT=1030,Wy=1031,Xy=1033,Xd=33776,jd=33777,Yd=33778,qd=33779,ev=35840,tv=35841,nv=35842,iv=35843,jy=36196,rv=37492,sv=37496,ov=37808,av=37809,lv=37810,cv=37811,uv=37812,fv=37813,hv=37814,dv=37815,pv=37816,mv=37817,gv=37818,vv=37819,yv=37820,_v=37821,Zd=36492,xv=36494,Sv=36495,gT=36283,Mv=36284,wv=36285,Ev=36286,vT=2200,yT=2201,_T=2202,Hu=2300,Vu=2301,Kd=2302,ia=2400,ra=2401,Gu=2402,em=2500,Yy=2501,aR=0,lR=1,cR=2,qy=3e3,mo=3001,xT=3200,ST=3201,Eo=0,MT=1,Gi="",Cn="srgb",Qr="srgb-linear",tm="display-p3",df="display-p3-linear",Wu="linear",jt="srgb",Xu="rec709",ju="p3",uR=0,Jo=7680,fR=7681,hR=7682,dR=7683,pR=34055,mR=34056,gR=5386,vR=512,yR=513,_R=514,xR=515,SR=516,MR=517,wR=518,Tv=519,wT=512,ET=513,TT=514,Zy=515,AT=516,CT=517,bT=518,RT=519,Yu=35044,ER=35048,TR=35040,AR=35045,CR=35049,bR=35041,RR=35046,PR=35050,LR=35042,IR="100",Av="300 es",bp=1035,br=2e3,Jl=2001;class es{addEventListener(e,t){this._listeners===void 0&&(this._listeners={});const i=this._listeners;i[e]===void 0&&(i[e]=[]),i[e].indexOf(t)===-1&&i[e].push(t)}hasEventListener(e,t){if(this._listeners===void 0)return!1;const i=this._listeners;return i[e]!==void 0&&i[e].indexOf(t)!==-1}removeEventListener(e,t){if(this._listeners===void 0)return;const r=this._listeners[e];if(r!==void 0){const s=r.indexOf(t);s!==-1&&r.splice(s,1)}}dispatchEvent(e){if(this._listeners===void 0)return;const i=this._listeners[e.type];if(i!==void 0){e.target=this;const r=i.slice(0);for(let s=0,o=r.length;s>8&255]+ei[n>>16&255]+ei[n>>24&255]+"-"+ei[e&255]+ei[e>>8&255]+"-"+ei[e>>16&15|64]+ei[e>>24&255]+"-"+ei[t&63|128]+ei[t>>8&255]+"-"+ei[t>>16&255]+ei[t>>24&255]+ei[i&255]+ei[i>>8&255]+ei[i>>16&255]+ei[i>>24&255]).toLowerCase()}function dn(n,e,t){return Math.max(e,Math.min(t,n))}function Ky(n,e){return(n%e+e)%e}function NR(n,e,t,i,r){return i+(n-e)*(r-i)/(t-e)}function DR(n,e,t){return n!==e?(t-n)/(e-n):0}function pu(n,e,t){return(1-t)*n+t*e}function UR(n,e,t,i){return pu(n,e,1-Math.exp(-t*i))}function zR(n,e=1){return e-Math.abs(Ky(n,e*2)-e)}function OR(n,e,t){return n<=e?0:n>=t?1:(n=(n-e)/(t-e),n*n*(3-2*n))}function FR(n,e,t){return n<=e?0:n>=t?1:(n=(n-e)/(t-e),n*n*n*(n*(n*6-15)+10))}function kR(n,e){return n+Math.floor(Math.random()*(e-n+1))}function BR(n,e){return n+Math.random()*(e-n)}function HR(n){return n*(.5-Math.random())}function VR(n){n!==void 0&&(gS=n);let e=gS+=1831565813;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}function GR(n){return n*ua}function WR(n){return n*Ql}function Cv(n){return(n&n-1)===0&&n!==0}function XR(n){return Math.pow(2,Math.ceil(Math.log(n)/Math.LN2))}function Rp(n){return Math.pow(2,Math.floor(Math.log(n)/Math.LN2))}function jR(n,e,t,i,r){const s=Math.cos,o=Math.sin,a=s(t/2),u=o(t/2),f=s((e+i)/2),h=o((e+i)/2),d=s((e-i)/2),p=o((e-i)/2),v=s((i-e)/2),y=o((i-e)/2);switch(r){case"XYX":n.set(a*h,u*d,u*p,a*f);break;case"YZY":n.set(u*p,a*h,u*d,a*f);break;case"ZXZ":n.set(u*d,u*p,a*h,a*f);break;case"XZX":n.set(a*h,u*y,u*v,a*f);break;case"YXY":n.set(u*v,a*h,u*y,a*f);break;case"ZYZ":n.set(u*y,u*v,a*h,a*f);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+r)}}function bi(n,e){switch(e.constructor){case Float32Array:return n;case Uint32Array:return n/4294967295;case Uint16Array:return n/65535;case Uint8Array:return n/255;case Int32Array:return Math.max(n/2147483647,-1);case Int16Array:return Math.max(n/32767,-1);case Int8Array:return Math.max(n/127,-1);default:throw new Error("Invalid component type.")}}function xt(n,e){switch(e.constructor){case Float32Array:return n;case Uint32Array:return Math.round(n*4294967295);case Uint16Array:return Math.round(n*65535);case Uint8Array:return Math.round(n*255);case Int32Array:return Math.round(n*2147483647);case Int16Array:return Math.round(n*32767);case Int8Array:return Math.round(n*127);default:throw new Error("Invalid component type.")}}const YR={DEG2RAD:ua,RAD2DEG:Ql,generateUUID:Yi,clamp:dn,euclideanModulo:Ky,mapLinear:NR,inverseLerp:DR,lerp:pu,damp:UR,pingpong:zR,smoothstep:OR,smootherstep:FR,randInt:kR,randFloat:BR,randFloatSpread:HR,seededRandom:VR,degToRad:GR,radToDeg:WR,isPowerOfTwo:Cv,ceilPowerOfTwo:XR,floorPowerOfTwo:Rp,setQuaternionFromProperEuler:jR,normalize:xt,denormalize:bi};class de{constructor(e=0,t=0){de.prototype.isVector2=!0,this.x=e,this.y=t}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,t){return this.x=e,this.y=t,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e){return this.x+=e.x,this.y+=e.y,this}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){const t=this.x,i=this.y,r=e.elements;return this.x=r[0]*t+r[3]*i+r[6],this.y=r[1]*t+r[4]*i+r[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this}clampLength(e,t){const i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(e,Math.min(t,i)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;const i=this.dot(e)/t;return Math.acos(dn(i,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,i=this.y-e.y;return t*t+i*i}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this}lerpVectors(e,t,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this}rotateAround(e,t){const i=Math.cos(t),r=Math.sin(t),s=this.x-e.x,o=this.y-e.y;return this.x=s*i-o*r+e.x,this.y=s*r+o*i+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class wt{constructor(e,t,i,r,s,o,a,u,f){wt.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],e!==void 0&&this.set(e,t,i,r,s,o,a,u,f)}set(e,t,i,r,s,o,a,u,f){const h=this.elements;return h[0]=e,h[1]=r,h[2]=a,h[3]=t,h[4]=s,h[5]=u,h[6]=i,h[7]=o,h[8]=f,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){const t=this.elements,i=e.elements;return t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=i[3],t[4]=i[4],t[5]=i[5],t[6]=i[6],t[7]=i[7],t[8]=i[8],this}extractBasis(e,t,i){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),i.setFromMatrix3Column(this,2),this}setFromMatrix4(e){const t=e.elements;return this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const i=e.elements,r=t.elements,s=this.elements,o=i[0],a=i[3],u=i[6],f=i[1],h=i[4],d=i[7],p=i[2],v=i[5],y=i[8],w=r[0],S=r[3],g=r[6],x=r[1],M=r[4],T=r[7],P=r[2],C=r[5],L=r[8];return s[0]=o*w+a*x+u*P,s[3]=o*S+a*M+u*C,s[6]=o*g+a*T+u*L,s[1]=f*w+h*x+d*P,s[4]=f*S+h*M+d*C,s[7]=f*g+h*T+d*L,s[2]=p*w+v*x+y*P,s[5]=p*S+v*M+y*C,s[8]=p*g+v*T+y*L,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[3]*=e,t[6]*=e,t[1]*=e,t[4]*=e,t[7]*=e,t[2]*=e,t[5]*=e,t[8]*=e,this}determinant(){const e=this.elements,t=e[0],i=e[1],r=e[2],s=e[3],o=e[4],a=e[5],u=e[6],f=e[7],h=e[8];return t*o*h-t*a*f-i*s*h+i*a*u+r*s*f-r*o*u}invert(){const e=this.elements,t=e[0],i=e[1],r=e[2],s=e[3],o=e[4],a=e[5],u=e[6],f=e[7],h=e[8],d=h*o-a*f,p=a*u-h*s,v=f*s-o*u,y=t*d+i*p+r*v;if(y===0)return this.set(0,0,0,0,0,0,0,0,0);const w=1/y;return e[0]=d*w,e[1]=(r*f-h*i)*w,e[2]=(a*i-r*o)*w,e[3]=p*w,e[4]=(h*t-r*u)*w,e[5]=(r*s-a*t)*w,e[6]=v*w,e[7]=(i*u-f*t)*w,e[8]=(o*t-i*s)*w,this}transpose(){let e;const t=this.elements;return e=t[1],t[1]=t[3],t[3]=e,e=t[2],t[2]=t[6],t[6]=e,e=t[5],t[5]=t[7],t[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){const t=this.elements;return e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],this}setUvTransform(e,t,i,r,s,o,a){const u=Math.cos(s),f=Math.sin(s);return this.set(i*u,i*f,-i*(u*o+f*a)+o+e,-r*f,r*u,-r*(-f*o+u*a)+a+t,0,0,1),this}scale(e,t){return this.premultiply(og.makeScale(e,t)),this}rotate(e){return this.premultiply(og.makeRotation(-e)),this}translate(e,t){return this.premultiply(og.makeTranslation(e,t)),this}makeTranslation(e,t){return e.isVector2?this.set(1,0,e.x,0,1,e.y,0,0,1):this.set(1,0,e,0,1,t,0,0,1),this}makeRotation(e){const t=Math.cos(e),i=Math.sin(e);return this.set(t,-i,0,i,t,0,0,0,1),this}makeScale(e,t){return this.set(e,0,0,0,t,0,0,0,1),this}equals(e){const t=this.elements,i=e.elements;for(let r=0;r<9;r++)if(t[r]!==i[r])return!1;return!0}fromArray(e,t=0){for(let i=0;i<9;i++)this.elements[i]=e[i+t];return this}toArray(e=[],t=0){const i=this.elements;return e[t]=i[0],e[t+1]=i[1],e[t+2]=i[2],e[t+3]=i[3],e[t+4]=i[4],e[t+5]=i[5],e[t+6]=i[6],e[t+7]=i[7],e[t+8]=i[8],e}clone(){return new this.constructor().fromArray(this.elements)}}const og=new wt;function PT(n){for(let e=n.length-1;e>=0;--e)if(n[e]>=65535)return!0;return!1}const qR={Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array};function Ll(n,e){return new qR[n](e)}function qu(n){return document.createElementNS("http://www.w3.org/1999/xhtml",n)}function LT(){const n=qu("canvas");return n.style.display="block",n}const vS={};function mu(n){n in vS||(vS[n]=!0,console.warn(n))}const yS=new wt().set(.8224621,.177538,0,.0331941,.9668058,0,.0170827,.0723974,.9105199),_S=new wt().set(1.2249401,-.2249404,0,-.0420569,1.0420571,0,-.0196376,-.0786361,1.0982735),zh={[Qr]:{transfer:Wu,primaries:Xu,toReference:n=>n,fromReference:n=>n},[Cn]:{transfer:jt,primaries:Xu,toReference:n=>n.convertSRGBToLinear(),fromReference:n=>n.convertLinearToSRGB()},[df]:{transfer:Wu,primaries:ju,toReference:n=>n.applyMatrix3(_S),fromReference:n=>n.applyMatrix3(yS)},[tm]:{transfer:jt,primaries:ju,toReference:n=>n.convertSRGBToLinear().applyMatrix3(_S),fromReference:n=>n.applyMatrix3(yS).convertLinearToSRGB()}},ZR=new Set([Qr,df]),Ft={enabled:!0,_workingColorSpace:Qr,get workingColorSpace(){return this._workingColorSpace},set workingColorSpace(n){if(!ZR.has(n))throw new Error(`Unsupported working color space, "${n}".`);this._workingColorSpace=n},convert:function(n,e,t){if(this.enabled===!1||e===t||!e||!t)return n;const i=zh[e].toReference,r=zh[t].fromReference;return r(i(n))},fromWorkingColorSpace:function(n,e){return this.convert(n,this._workingColorSpace,e)},toWorkingColorSpace:function(n,e){return this.convert(n,e,this._workingColorSpace)},getPrimaries:function(n){return zh[n].primaries},getTransfer:function(n){return n===Gi?Wu:zh[n].transfer}};function Gl(n){return n<.04045?n*.0773993808:Math.pow(n*.9478672986+.0521327014,2.4)}function ag(n){return n<.0031308?n*12.92:1.055*Math.pow(n,.41666)-.055}let qa;class Jy{static getDataURL(e){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement>"u")return e.src;let t;if(e instanceof HTMLCanvasElement)t=e;else{qa===void 0&&(qa=qu("canvas")),qa.width=e.width,qa.height=e.height;const i=qa.getContext("2d");e instanceof ImageData?i.putImageData(e,0,0):i.drawImage(e,0,0,e.width,e.height),t=qa}return t.width>2048||t.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",e),t.toDataURL("image/jpeg",.6)):t.toDataURL("image/png")}static sRGBToLinear(e){if(typeof HTMLImageElement<"u"&&e instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&e instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&e instanceof ImageBitmap){const t=qu("canvas");t.width=e.width,t.height=e.height;const i=t.getContext("2d");i.drawImage(e,0,0,e.width,e.height);const r=i.getImageData(0,0,e.width,e.height),s=r.data;for(let o=0;o0&&(i.userData=this.userData),t||(e.textures[this.uuid]=i),i}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(this.mapping!==Qp)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case ku:e.x=e.x-Math.floor(e.x);break;case si:e.x=e.x<0?0:1;break;case Bu:Math.abs(Math.floor(e.x)%2)===1?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x);break}if(e.y<0||e.y>1)switch(this.wrapT){case ku:e.y=e.y-Math.floor(e.y);break;case si:e.y=e.y<0?0:1;break;case Bu:Math.abs(Math.floor(e.y)%2)===1?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y);break}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){e===!0&&(this.version++,this.source.needsUpdate=!0)}get encoding(){return mu("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace===Cn?mo:qy}set encoding(e){mu("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace=e===mo?Cn:Gi}}mn.DEFAULT_IMAGE=null;mn.DEFAULT_MAPPING=Qp;mn.DEFAULT_ANISOTROPY=1;class kt{constructor(e=0,t=0,i=0,r=1){kt.prototype.isVector4=!0,this.x=e,this.y=t,this.z=i,this.w=r}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,t,i,r){return this.x=e,this.y=t,this.z=i,this.w=r,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;case 3:this.w=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=e.w!==void 0?e.w:1,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this.w=e.w+t.w,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this.w+=e.w*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this.w=e.w-t.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){const t=this.x,i=this.y,r=this.z,s=this.w,o=e.elements;return this.x=o[0]*t+o[4]*i+o[8]*r+o[12]*s,this.y=o[1]*t+o[5]*i+o[9]*r+o[13]*s,this.z=o[2]*t+o[6]*i+o[10]*r+o[14]*s,this.w=o[3]*t+o[7]*i+o[11]*r+o[15]*s,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);const t=Math.sqrt(1-e.w*e.w);return t<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/t,this.y=e.y/t,this.z=e.z/t),this}setAxisAngleFromRotationMatrix(e){let t,i,r,s;const u=e.elements,f=u[0],h=u[4],d=u[8],p=u[1],v=u[5],y=u[9],w=u[2],S=u[6],g=u[10];if(Math.abs(h-p)<.01&&Math.abs(d-w)<.01&&Math.abs(y-S)<.01){if(Math.abs(h+p)<.1&&Math.abs(d+w)<.1&&Math.abs(y+S)<.1&&Math.abs(f+v+g-3)<.1)return this.set(1,0,0,0),this;t=Math.PI;const M=(f+1)/2,T=(v+1)/2,P=(g+1)/2,C=(h+p)/4,L=(d+w)/4,D=(y+S)/4;return M>T&&M>P?M<.01?(i=0,r=.707106781,s=.707106781):(i=Math.sqrt(M),r=C/i,s=L/i):T>P?T<.01?(i=.707106781,r=0,s=.707106781):(r=Math.sqrt(T),i=C/r,s=D/r):P<.01?(i=.707106781,r=.707106781,s=0):(s=Math.sqrt(P),i=L/s,r=D/s),this.set(i,r,s,t),this}let x=Math.sqrt((S-y)*(S-y)+(d-w)*(d-w)+(p-h)*(p-h));return Math.abs(x)<.001&&(x=1),this.x=(S-y)/x,this.y=(d-w)/x,this.z=(p-h)/x,this.w=Math.acos((f+v+g-1)/2),this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this.w=Math.max(e.w,Math.min(t.w,this.w)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this.w=Math.max(e,Math.min(t,this.w)),this}clampLength(e,t){const i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(e,Math.min(t,i)))}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(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this.w+=(e.w-this.w)*t,this}lerpVectors(e,t,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this.z=e.z+(t.z-e.z)*i,this.w=e.w+(t.w-e.w)*i,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this.w=e[t+3],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e[t+3]=this.w,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this.w=e.getW(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}}class IT extends es{constructor(e=1,t=1,i={}){super(),this.isRenderTarget=!0,this.width=e,this.height=t,this.depth=1,this.scissor=new kt(0,0,e,t),this.scissorTest=!1,this.viewport=new kt(0,0,e,t);const r={width:e,height:t,depth:1};i.encoding!==void 0&&(mu("THREE.WebGLRenderTarget: option.encoding has been replaced by option.colorSpace."),i.colorSpace=i.encoding===mo?Cn:Gi),i=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:sn,depthBuffer:!0,stencilBuffer:!1,depthTexture:null,samples:0},i),this.texture=new mn(r,i.mapping,i.wrapS,i.wrapT,i.magFilter,i.minFilter,i.format,i.type,i.anisotropy,i.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.flipY=!1,this.texture.generateMipmaps=i.generateMipmaps,this.texture.internalFormat=i.internalFormat,this.depthBuffer=i.depthBuffer,this.stencilBuffer=i.stencilBuffer,this.depthTexture=i.depthTexture,this.samples=i.samples}setSize(e,t,i=1){(this.width!==e||this.height!==t||this.depth!==i)&&(this.width=e,this.height=t,this.depth=i,this.texture.image.width=e,this.texture.image.height=t,this.texture.image.depth=i,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.texture=e.texture.clone(),this.texture.isRenderTargetTexture=!0;const t=Object.assign({},e.texture.image);return this.texture.source=new sa(t),this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,e.depthTexture!==null&&(this.depthTexture=e.depthTexture.clone()),this.samples=e.samples,this}dispose(){this.dispatchEvent({type:"dispose"})}}class gr extends IT{constructor(e=1,t=1,i={}){super(e,t,i),this.isWebGLRenderTarget=!0}}class nm extends mn{constructor(e=null,t=1,i=1,r=1){super(null),this.isDataArrayTexture=!0,this.image={data:e,width:t,height:i,depth:r},this.magFilter=_n,this.minFilter=_n,this.wrapR=si,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class QR extends gr{constructor(e=1,t=1,i=1,r={}){super(e,t,r),this.isWebGLArrayRenderTarget=!0,this.depth=i,this.texture=new nm(null,e,t,i),this.texture.isRenderTargetTexture=!0}}class Qy extends mn{constructor(e=null,t=1,i=1,r=1){super(null),this.isData3DTexture=!0,this.image={data:e,width:t,height:i,depth:r},this.magFilter=_n,this.minFilter=_n,this.wrapR=si,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class $R extends gr{constructor(e=1,t=1,i=1,r={}){super(e,t,r),this.isWebGL3DRenderTarget=!0,this.depth=i,this.texture=new Qy(null,e,t,i),this.texture.isRenderTargetTexture=!0}}class eP extends gr{constructor(e=1,t=1,i=1,r={}){super(e,t,r),this.isWebGLMultipleRenderTargets=!0;const s=this.texture;this.texture=[];for(let o=0;o=0?1:-1,M=1-g*g;if(M>Number.EPSILON){const P=Math.sqrt(M),C=Math.atan2(P,g*x);S=Math.sin(S*C)/P,a=Math.sin(a*C)/P}const T=a*x;if(u=u*S+p*T,f=f*S+v*T,h=h*S+y*T,d=d*S+w*T,S===1-a){const P=1/Math.sqrt(u*u+f*f+h*h+d*d);u*=P,f*=P,h*=P,d*=P}}e[t]=u,e[t+1]=f,e[t+2]=h,e[t+3]=d}static multiplyQuaternionsFlat(e,t,i,r,s,o){const a=i[r],u=i[r+1],f=i[r+2],h=i[r+3],d=s[o],p=s[o+1],v=s[o+2],y=s[o+3];return e[t]=a*y+h*d+u*v-f*p,e[t+1]=u*y+h*p+f*d-a*v,e[t+2]=f*y+h*v+a*p-u*d,e[t+3]=h*y-a*d-u*p-f*v,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,i,r){return this._x=e,this._y=t,this._z=i,this._w=r,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,t=!0){const i=e._x,r=e._y,s=e._z,o=e._order,a=Math.cos,u=Math.sin,f=a(i/2),h=a(r/2),d=a(s/2),p=u(i/2),v=u(r/2),y=u(s/2);switch(o){case"XYZ":this._x=p*h*d+f*v*y,this._y=f*v*d-p*h*y,this._z=f*h*y+p*v*d,this._w=f*h*d-p*v*y;break;case"YXZ":this._x=p*h*d+f*v*y,this._y=f*v*d-p*h*y,this._z=f*h*y-p*v*d,this._w=f*h*d+p*v*y;break;case"ZXY":this._x=p*h*d-f*v*y,this._y=f*v*d+p*h*y,this._z=f*h*y+p*v*d,this._w=f*h*d-p*v*y;break;case"ZYX":this._x=p*h*d-f*v*y,this._y=f*v*d+p*h*y,this._z=f*h*y-p*v*d,this._w=f*h*d+p*v*y;break;case"YZX":this._x=p*h*d+f*v*y,this._y=f*v*d+p*h*y,this._z=f*h*y-p*v*d,this._w=f*h*d-p*v*y;break;case"XZY":this._x=p*h*d-f*v*y,this._y=f*v*d-p*h*y,this._z=f*h*y+p*v*d,this._w=f*h*d+p*v*y;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+o)}return t===!0&&this._onChangeCallback(),this}setFromAxisAngle(e,t){const i=t/2,r=Math.sin(i);return this._x=e.x*r,this._y=e.y*r,this._z=e.z*r,this._w=Math.cos(i),this._onChangeCallback(),this}setFromRotationMatrix(e){const t=e.elements,i=t[0],r=t[4],s=t[8],o=t[1],a=t[5],u=t[9],f=t[2],h=t[6],d=t[10],p=i+a+d;if(p>0){const v=.5/Math.sqrt(p+1);this._w=.25/v,this._x=(h-u)*v,this._y=(s-f)*v,this._z=(o-r)*v}else if(i>a&&i>d){const v=2*Math.sqrt(1+i-a-d);this._w=(h-u)/v,this._x=.25*v,this._y=(r+o)/v,this._z=(s+f)/v}else if(a>d){const v=2*Math.sqrt(1+a-i-d);this._w=(s-f)/v,this._x=(r+o)/v,this._y=.25*v,this._z=(u+h)/v}else{const v=2*Math.sqrt(1+d-i-a);this._w=(o-r)/v,this._x=(s+f)/v,this._y=(u+h)/v,this._z=.25*v}return this._onChangeCallback(),this}setFromUnitVectors(e,t){let i=e.dot(t)+1;return iMath.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=i):(this._x=0,this._y=-e.z,this._z=e.y,this._w=i)):(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=i),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(dn(this.dot(e),-1,1)))}rotateTowards(e,t){const i=this.angleTo(e);if(i===0)return this;const r=Math.min(1,t/i);return this.slerp(e,r),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return 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 i=e._x,r=e._y,s=e._z,o=e._w,a=t._x,u=t._y,f=t._z,h=t._w;return this._x=i*h+o*a+r*f-s*u,this._y=r*h+o*u+s*a-i*f,this._z=s*h+o*f+i*u-r*a,this._w=o*h-i*a-r*u-s*f,this._onChangeCallback(),this}slerp(e,t){if(t===0)return this;if(t===1)return this.copy(e);const i=this._x,r=this._y,s=this._z,o=this._w;let a=o*e._w+i*e._x+r*e._y+s*e._z;if(a<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,a=-a):this.copy(e),a>=1)return this._w=o,this._x=i,this._y=r,this._z=s,this;const u=1-a*a;if(u<=Number.EPSILON){const v=1-t;return this._w=v*o+t*this._w,this._x=v*i+t*this._x,this._y=v*r+t*this._y,this._z=v*s+t*this._z,this.normalize(),this}const f=Math.sqrt(u),h=Math.atan2(f,a),d=Math.sin((1-t)*h)/f,p=Math.sin(t*h)/f;return this._w=o*d+this._w*p,this._x=i*d+this._x*p,this._y=r*d+this._y*p,this._z=s*d+this._z*p,this._onChangeCallback(),this}slerpQuaternions(e,t,i){return this.copy(e).slerp(t,i)}random(){const e=Math.random(),t=Math.sqrt(1-e),i=Math.sqrt(e),r=2*Math.PI*Math.random(),s=2*Math.PI*Math.random();return this.set(t*Math.cos(r),i*Math.sin(s),i*Math.cos(s),t*Math.sin(r))}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}}class O{constructor(e=0,t=0,i=0){O.prototype.isVector3=!0,this.x=e,this.y=t,this.z=i}set(e,t,i){return i===void 0&&(i=this.z),this.x=e,this.y=t,this.z=i,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this}applyEuler(e){return this.applyQuaternion(xS.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(xS.setFromAxisAngle(e,t))}applyMatrix3(e){const t=this.x,i=this.y,r=this.z,s=e.elements;return this.x=s[0]*t+s[3]*i+s[6]*r,this.y=s[1]*t+s[4]*i+s[7]*r,this.z=s[2]*t+s[5]*i+s[8]*r,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const t=this.x,i=this.y,r=this.z,s=e.elements,o=1/(s[3]*t+s[7]*i+s[11]*r+s[15]);return this.x=(s[0]*t+s[4]*i+s[8]*r+s[12])*o,this.y=(s[1]*t+s[5]*i+s[9]*r+s[13])*o,this.z=(s[2]*t+s[6]*i+s[10]*r+s[14])*o,this}applyQuaternion(e){const t=this.x,i=this.y,r=this.z,s=e.x,o=e.y,a=e.z,u=e.w,f=2*(o*r-a*i),h=2*(a*t-s*r),d=2*(s*i-o*t);return this.x=t+u*f+o*d-a*h,this.y=i+u*h+a*f-s*d,this.z=r+u*d+s*h-o*f,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){const t=this.x,i=this.y,r=this.z,s=e.elements;return this.x=s[0]*t+s[4]*i+s[8]*r,this.y=s[1]*t+s[5]*i+s[9]*r,this.z=s[2]*t+s[6]*i+s[10]*r,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this}clampLength(e,t){const i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(e,Math.min(t,i)))}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(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this}lerpVectors(e,t,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this.z=e.z+(t.z-e.z)*i,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,t){const i=e.x,r=e.y,s=e.z,o=t.x,a=t.y,u=t.z;return this.x=r*u-s*a,this.y=s*o-i*u,this.z=i*a-r*o,this}projectOnVector(e){const t=e.lengthSq();if(t===0)return this.set(0,0,0);const i=e.dot(this)/t;return this.copy(e).multiplyScalar(i)}projectOnPlane(e){return cg.copy(this).projectOnVector(e),this.sub(cg)}reflect(e){return this.sub(cg.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;const i=this.dot(e)/t;return Math.acos(dn(i,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,i=this.y-e.y,r=this.z-e.z;return t*t+i*i+r*r}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,t,i){const r=Math.sin(t)*e;return this.x=r*Math.sin(i),this.y=Math.cos(t)*e,this.z=r*Math.cos(i),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,t,i){return this.x=e*Math.sin(t),this.y=i,this.z=e*Math.cos(t),this}setFromMatrixPosition(e){const t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this}setFromMatrixScale(e){const t=this.setFromMatrixColumn(e,0).length(),i=this.setFromMatrixColumn(e,1).length(),r=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=i,this.z=r,this}setFromMatrixColumn(e,t){return this.fromArray(e.elements,t*4)}setFromMatrix3Column(e,t){return this.fromArray(e.elements,t*3)}setFromEuler(e){return this.x=e._x,this.y=e._y,this.z=e._z,this}setFromColor(e){return this.x=e.r,this.y=e.g,this.z=e.b,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const e=(Math.random()-.5)*2,t=Math.random()*Math.PI*2,i=Math.sqrt(1-e**2);return this.x=i*Math.cos(t),this.y=i*Math.sin(t),this.z=e,this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const cg=new O,xS=new oi;class yi{constructor(e=new O(1/0,1/0,1/0),t=new O(-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,i=e.length;tthis.max.x||e.ythis.max.y||e.zthis.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.xthis.max.x||e.max.ythis.max.y||e.max.zthis.max.z)}intersectsSphere(e){return this.clampPoint(e.center,xr),xr.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let t,i;return e.normal.x>0?(t=e.normal.x*this.min.x,i=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,i=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,i+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,i+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,i+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,i+=e.normal.z*this.min.z),t<=-e.constant&&i>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(kc),Fh.subVectors(this.max,kc),Za.subVectors(e.a,kc),Ka.subVectors(e.b,kc),Ja.subVectors(e.c,kc),Gs.subVectors(Ka,Za),Ws.subVectors(Ja,Ka),Oo.subVectors(Za,Ja);let t=[0,-Gs.z,Gs.y,0,-Ws.z,Ws.y,0,-Oo.z,Oo.y,Gs.z,0,-Gs.x,Ws.z,0,-Ws.x,Oo.z,0,-Oo.x,-Gs.y,Gs.x,0,-Ws.y,Ws.x,0,-Oo.y,Oo.x,0];return!ug(t,Za,Ka,Ja,Fh)||(t=[1,0,0,0,1,0,0,0,1],!ug(t,Za,Ka,Ja,Fh))?!1:(kh.crossVectors(Gs,Ws),t=[kh.x,kh.y,kh.z],ug(t,Za,Ka,Ja,Fh))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,xr).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(xr).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:(ls[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),ls[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),ls[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),ls[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),ls[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),ls[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),ls[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),ls[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(ls),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)}}const ls=[new O,new O,new O,new O,new O,new O,new O,new O],xr=new O,Oh=new yi,Za=new O,Ka=new O,Ja=new O,Gs=new O,Ws=new O,Oo=new O,kc=new O,Fh=new O,kh=new O,Fo=new O;function ug(n,e,t,i,r){for(let s=0,o=n.length-3;s<=o;s+=3){Fo.fromArray(n,s);const a=r.x*Math.abs(Fo.x)+r.y*Math.abs(Fo.y)+r.z*Math.abs(Fo.z),u=e.dot(Fo),f=t.dot(Fo),h=i.dot(Fo);if(Math.max(-Math.max(u,f,h),Math.min(u,f,h))>a)return!1}return!0}const tP=new yi,Bc=new O,fg=new O;class ai{constructor(e=new O,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 i=this.center;t!==void 0?i.copy(t):tP.setFromPoints(e).getCenter(i);let r=0;for(let s=0,o=e.length;sthis.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t}getBoundingBox(e){return this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}applyMatrix4(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this}translate(e){return this.center.add(e),this}expandByPoint(e){if(this.isEmpty())return this.center.copy(e),this.radius=0,this;Bc.subVectors(e,this.center);const t=Bc.lengthSq();if(t>this.radius*this.radius){const i=Math.sqrt(t),r=(i-this.radius)*.5;this.center.addScaledVector(Bc,r/i),this.radius+=r}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):(fg.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(Bc.copy(e.center).add(fg)),this.expandByPoint(Bc.copy(e.center).sub(fg))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}}const cs=new O,hg=new O,Bh=new O,Xs=new O,dg=new O,Hh=new O,pg=new O;class Aa{constructor(e=new O,t=new O(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,cs)),this}closestPointToPoint(e,t){t.subVectors(e,this.origin);const i=t.dot(this.direction);return i<0?t.copy(this.origin):t.copy(this.origin).addScaledVector(this.direction,i)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){const t=cs.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(cs.copy(this.origin).addScaledVector(this.direction,t),cs.distanceToSquared(e))}distanceSqToSegment(e,t,i,r){hg.copy(e).add(t).multiplyScalar(.5),Bh.copy(t).sub(e).normalize(),Xs.copy(this.origin).sub(hg);const s=e.distanceTo(t)*.5,o=-this.direction.dot(Bh),a=Xs.dot(this.direction),u=-Xs.dot(Bh),f=Xs.lengthSq(),h=Math.abs(1-o*o);let d,p,v,y;if(h>0)if(d=o*u-a,p=o*a-u,y=s*h,d>=0)if(p>=-y)if(p<=y){const w=1/h;d*=w,p*=w,v=d*(d+o*p+2*a)+p*(o*d+p+2*u)+f}else p=s,d=Math.max(0,-(o*p+a)),v=-d*d+p*(p+2*u)+f;else p=-s,d=Math.max(0,-(o*p+a)),v=-d*d+p*(p+2*u)+f;else p<=-y?(d=Math.max(0,-(-o*s+a)),p=d>0?-s:Math.min(Math.max(-s,-u),s),v=-d*d+p*(p+2*u)+f):p<=y?(d=0,p=Math.min(Math.max(-s,-u),s),v=p*(p+2*u)+f):(d=Math.max(0,-(o*s+a)),p=d>0?s:Math.min(Math.max(-s,-u),s),v=-d*d+p*(p+2*u)+f);else p=o>0?-s:s,d=Math.max(0,-(o*p+a)),v=-d*d+p*(p+2*u)+f;return i&&i.copy(this.origin).addScaledVector(this.direction,d),r&&r.copy(hg).addScaledVector(Bh,p),v}intersectSphere(e,t){cs.subVectors(e.center,this.origin);const i=cs.dot(this.direction),r=cs.dot(cs)-i*i,s=e.radius*e.radius;if(r>s)return null;const o=Math.sqrt(s-r),a=i-o,u=i+o;return u<0?null:a<0?this.at(u,t):this.at(a,t)}intersectsSphere(e){return this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){const t=e.normal.dot(this.direction);if(t===0)return e.distanceToPoint(this.origin)===0?0:null;const i=-(this.origin.dot(e.normal)+e.constant)/t;return i>=0?i:null}intersectPlane(e,t){const i=this.distanceToPlane(e);return i===null?null:this.at(i,t)}intersectsPlane(e){const t=e.distanceToPoint(this.origin);return t===0||e.normal.dot(this.direction)*t<0}intersectBox(e,t){let i,r,s,o,a,u;const f=1/this.direction.x,h=1/this.direction.y,d=1/this.direction.z,p=this.origin;return f>=0?(i=(e.min.x-p.x)*f,r=(e.max.x-p.x)*f):(i=(e.max.x-p.x)*f,r=(e.min.x-p.x)*f),h>=0?(s=(e.min.y-p.y)*h,o=(e.max.y-p.y)*h):(s=(e.max.y-p.y)*h,o=(e.min.y-p.y)*h),i>o||s>r||((s>i||isNaN(i))&&(i=s),(o=0?(a=(e.min.z-p.z)*d,u=(e.max.z-p.z)*d):(a=(e.max.z-p.z)*d,u=(e.min.z-p.z)*d),i>u||a>r)||((a>i||i!==i)&&(i=a),(u=0?i:r,t)}intersectsBox(e){return this.intersectBox(e,cs)!==null}intersectTriangle(e,t,i,r,s){dg.subVectors(t,e),Hh.subVectors(i,e),pg.crossVectors(dg,Hh);let o=this.direction.dot(pg),a;if(o>0){if(r)return null;a=1}else if(o<0)a=-1,o=-o;else return null;Xs.subVectors(this.origin,e);const u=a*this.direction.dot(Hh.crossVectors(Xs,Hh));if(u<0)return null;const f=a*this.direction.dot(dg.cross(Xs));if(f<0||u+f>o)return null;const h=-a*Xs.dot(pg);return h<0?null:this.at(h/o,s)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}}class ft{constructor(e,t,i,r,s,o,a,u,f,h,d,p,v,y,w,S){ft.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],e!==void 0&&this.set(e,t,i,r,s,o,a,u,f,h,d,p,v,y,w,S)}set(e,t,i,r,s,o,a,u,f,h,d,p,v,y,w,S){const g=this.elements;return g[0]=e,g[4]=t,g[8]=i,g[12]=r,g[1]=s,g[5]=o,g[9]=a,g[13]=u,g[2]=f,g[6]=h,g[10]=d,g[14]=p,g[3]=v,g[7]=y,g[11]=w,g[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 ft().fromArray(this.elements)}copy(e){const t=this.elements,i=e.elements;return t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=i[3],t[4]=i[4],t[5]=i[5],t[6]=i[6],t[7]=i[7],t[8]=i[8],t[9]=i[9],t[10]=i[10],t[11]=i[11],t[12]=i[12],t[13]=i[13],t[14]=i[14],t[15]=i[15],this}copyPosition(e){const t=this.elements,i=e.elements;return t[12]=i[12],t[13]=i[13],t[14]=i[14],this}setFromMatrix3(e){const t=e.elements;return this.set(t[0],t[3],t[6],0,t[1],t[4],t[7],0,t[2],t[5],t[8],0,0,0,0,1),this}extractBasis(e,t,i){return e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),i.setFromMatrixColumn(this,2),this}makeBasis(e,t,i){return this.set(e.x,t.x,i.x,0,e.y,t.y,i.y,0,e.z,t.z,i.z,0,0,0,0,1),this}extractRotation(e){const t=this.elements,i=e.elements,r=1/Qa.setFromMatrixColumn(e,0).length(),s=1/Qa.setFromMatrixColumn(e,1).length(),o=1/Qa.setFromMatrixColumn(e,2).length();return t[0]=i[0]*r,t[1]=i[1]*r,t[2]=i[2]*r,t[3]=0,t[4]=i[4]*s,t[5]=i[5]*s,t[6]=i[6]*s,t[7]=0,t[8]=i[8]*o,t[9]=i[9]*o,t[10]=i[10]*o,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromEuler(e){const t=this.elements,i=e.x,r=e.y,s=e.z,o=Math.cos(i),a=Math.sin(i),u=Math.cos(r),f=Math.sin(r),h=Math.cos(s),d=Math.sin(s);if(e.order==="XYZ"){const p=o*h,v=o*d,y=a*h,w=a*d;t[0]=u*h,t[4]=-u*d,t[8]=f,t[1]=v+y*f,t[5]=p-w*f,t[9]=-a*u,t[2]=w-p*f,t[6]=y+v*f,t[10]=o*u}else if(e.order==="YXZ"){const p=u*h,v=u*d,y=f*h,w=f*d;t[0]=p+w*a,t[4]=y*a-v,t[8]=o*f,t[1]=o*d,t[5]=o*h,t[9]=-a,t[2]=v*a-y,t[6]=w+p*a,t[10]=o*u}else if(e.order==="ZXY"){const p=u*h,v=u*d,y=f*h,w=f*d;t[0]=p-w*a,t[4]=-o*d,t[8]=y+v*a,t[1]=v+y*a,t[5]=o*h,t[9]=w-p*a,t[2]=-o*f,t[6]=a,t[10]=o*u}else if(e.order==="ZYX"){const p=o*h,v=o*d,y=a*h,w=a*d;t[0]=u*h,t[4]=y*f-v,t[8]=p*f+w,t[1]=u*d,t[5]=w*f+p,t[9]=v*f-y,t[2]=-f,t[6]=a*u,t[10]=o*u}else if(e.order==="YZX"){const p=o*u,v=o*f,y=a*u,w=a*f;t[0]=u*h,t[4]=w-p*d,t[8]=y*d+v,t[1]=d,t[5]=o*h,t[9]=-a*h,t[2]=-f*h,t[6]=v*d+y,t[10]=p-w*d}else if(e.order==="XZY"){const p=o*u,v=o*f,y=a*u,w=a*f;t[0]=u*h,t[4]=-d,t[8]=f*h,t[1]=p*d+w,t[5]=o*h,t[9]=v*d-y,t[2]=y*d-v,t[6]=a*h,t[10]=w*d+p}return t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromQuaternion(e){return this.compose(nP,e,iP)}lookAt(e,t,i){const r=this.elements;return ki.subVectors(e,t),ki.lengthSq()===0&&(ki.z=1),ki.normalize(),js.crossVectors(i,ki),js.lengthSq()===0&&(Math.abs(i.z)===1?ki.x+=1e-4:ki.z+=1e-4,ki.normalize(),js.crossVectors(i,ki)),js.normalize(),Vh.crossVectors(ki,js),r[0]=js.x,r[4]=Vh.x,r[8]=ki.x,r[1]=js.y,r[5]=Vh.y,r[9]=ki.y,r[2]=js.z,r[6]=Vh.z,r[10]=ki.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const i=e.elements,r=t.elements,s=this.elements,o=i[0],a=i[4],u=i[8],f=i[12],h=i[1],d=i[5],p=i[9],v=i[13],y=i[2],w=i[6],S=i[10],g=i[14],x=i[3],M=i[7],T=i[11],P=i[15],C=r[0],L=r[4],D=r[8],b=r[12],R=r[1],k=r[5],q=r[9],oe=r[13],V=r[2],Q=r[6],te=r[10],ae=r[14],N=r[3],B=r[7],H=r[11],Y=r[15];return s[0]=o*C+a*R+u*V+f*N,s[4]=o*L+a*k+u*Q+f*B,s[8]=o*D+a*q+u*te+f*H,s[12]=o*b+a*oe+u*ae+f*Y,s[1]=h*C+d*R+p*V+v*N,s[5]=h*L+d*k+p*Q+v*B,s[9]=h*D+d*q+p*te+v*H,s[13]=h*b+d*oe+p*ae+v*Y,s[2]=y*C+w*R+S*V+g*N,s[6]=y*L+w*k+S*Q+g*B,s[10]=y*D+w*q+S*te+g*H,s[14]=y*b+w*oe+S*ae+g*Y,s[3]=x*C+M*R+T*V+P*N,s[7]=x*L+M*k+T*Q+P*B,s[11]=x*D+M*q+T*te+P*H,s[15]=x*b+M*oe+T*ae+P*Y,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[4]*=e,t[8]*=e,t[12]*=e,t[1]*=e,t[5]*=e,t[9]*=e,t[13]*=e,t[2]*=e,t[6]*=e,t[10]*=e,t[14]*=e,t[3]*=e,t[7]*=e,t[11]*=e,t[15]*=e,this}determinant(){const e=this.elements,t=e[0],i=e[4],r=e[8],s=e[12],o=e[1],a=e[5],u=e[9],f=e[13],h=e[2],d=e[6],p=e[10],v=e[14],y=e[3],w=e[7],S=e[11],g=e[15];return y*(+s*u*d-r*f*d-s*a*p+i*f*p+r*a*v-i*u*v)+w*(+t*u*v-t*f*p+s*o*p-r*o*v+r*f*h-s*u*h)+S*(+t*f*d-t*a*v-s*o*d+i*o*v+s*a*h-i*f*h)+g*(-r*a*h-t*u*d+t*a*p+r*o*d-i*o*p+i*u*h)}transpose(){const e=this.elements;let t;return t=e[1],e[1]=e[4],e[4]=t,t=e[2],e[2]=e[8],e[8]=t,t=e[6],e[6]=e[9],e[9]=t,t=e[3],e[3]=e[12],e[12]=t,t=e[7],e[7]=e[13],e[13]=t,t=e[11],e[11]=e[14],e[14]=t,this}setPosition(e,t,i){const r=this.elements;return e.isVector3?(r[12]=e.x,r[13]=e.y,r[14]=e.z):(r[12]=e,r[13]=t,r[14]=i),this}invert(){const e=this.elements,t=e[0],i=e[1],r=e[2],s=e[3],o=e[4],a=e[5],u=e[6],f=e[7],h=e[8],d=e[9],p=e[10],v=e[11],y=e[12],w=e[13],S=e[14],g=e[15],x=d*S*f-w*p*f+w*u*v-a*S*v-d*u*g+a*p*g,M=y*p*f-h*S*f-y*u*v+o*S*v+h*u*g-o*p*g,T=h*w*f-y*d*f+y*a*v-o*w*v-h*a*g+o*d*g,P=y*d*u-h*w*u-y*a*p+o*w*p+h*a*S-o*d*S,C=t*x+i*M+r*T+s*P;if(C===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const L=1/C;return e[0]=x*L,e[1]=(w*p*s-d*S*s-w*r*v+i*S*v+d*r*g-i*p*g)*L,e[2]=(a*S*s-w*u*s+w*r*f-i*S*f-a*r*g+i*u*g)*L,e[3]=(d*u*s-a*p*s-d*r*f+i*p*f+a*r*v-i*u*v)*L,e[4]=M*L,e[5]=(h*S*s-y*p*s+y*r*v-t*S*v-h*r*g+t*p*g)*L,e[6]=(y*u*s-o*S*s-y*r*f+t*S*f+o*r*g-t*u*g)*L,e[7]=(o*p*s-h*u*s+h*r*f-t*p*f-o*r*v+t*u*v)*L,e[8]=T*L,e[9]=(y*d*s-h*w*s-y*i*v+t*w*v+h*i*g-t*d*g)*L,e[10]=(o*w*s-y*a*s+y*i*f-t*w*f-o*i*g+t*a*g)*L,e[11]=(h*a*s-o*d*s-h*i*f+t*d*f+o*i*v-t*a*v)*L,e[12]=P*L,e[13]=(h*w*r-y*d*r+y*i*p-t*w*p-h*i*S+t*d*S)*L,e[14]=(y*a*r-o*w*r-y*i*u+t*w*u+o*i*S-t*a*S)*L,e[15]=(o*d*r-h*a*r+h*i*u-t*d*u-o*i*p+t*a*p)*L,this}scale(e){const t=this.elements,i=e.x,r=e.y,s=e.z;return t[0]*=i,t[4]*=r,t[8]*=s,t[1]*=i,t[5]*=r,t[9]*=s,t[2]*=i,t[6]*=r,t[10]*=s,t[3]*=i,t[7]*=r,t[11]*=s,this}getMaxScaleOnAxis(){const e=this.elements,t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],i=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],r=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,i,r))}makeTranslation(e,t,i){return e.isVector3?this.set(1,0,0,e.x,0,1,0,e.y,0,0,1,e.z,0,0,0,1):this.set(1,0,0,e,0,1,0,t,0,0,1,i,0,0,0,1),this}makeRotationX(e){const t=Math.cos(e),i=Math.sin(e);return this.set(1,0,0,0,0,t,-i,0,0,i,t,0,0,0,0,1),this}makeRotationY(e){const t=Math.cos(e),i=Math.sin(e);return this.set(t,0,i,0,0,1,0,0,-i,0,t,0,0,0,0,1),this}makeRotationZ(e){const t=Math.cos(e),i=Math.sin(e);return this.set(t,-i,0,0,i,t,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,t){const i=Math.cos(t),r=Math.sin(t),s=1-i,o=e.x,a=e.y,u=e.z,f=s*o,h=s*a;return this.set(f*o+i,f*a-r*u,f*u+r*a,0,f*a+r*u,h*a+i,h*u-r*o,0,f*u-r*a,h*u+r*o,s*u*u+i,0,0,0,0,1),this}makeScale(e,t,i){return this.set(e,0,0,0,0,t,0,0,0,0,i,0,0,0,0,1),this}makeShear(e,t,i,r,s,o){return this.set(1,i,s,0,e,1,o,0,t,r,1,0,0,0,0,1),this}compose(e,t,i){const r=this.elements,s=t._x,o=t._y,a=t._z,u=t._w,f=s+s,h=o+o,d=a+a,p=s*f,v=s*h,y=s*d,w=o*h,S=o*d,g=a*d,x=u*f,M=u*h,T=u*d,P=i.x,C=i.y,L=i.z;return r[0]=(1-(w+g))*P,r[1]=(v+T)*P,r[2]=(y-M)*P,r[3]=0,r[4]=(v-T)*C,r[5]=(1-(p+g))*C,r[6]=(S+x)*C,r[7]=0,r[8]=(y+M)*L,r[9]=(S-x)*L,r[10]=(1-(p+w))*L,r[11]=0,r[12]=e.x,r[13]=e.y,r[14]=e.z,r[15]=1,this}decompose(e,t,i){const r=this.elements;let s=Qa.set(r[0],r[1],r[2]).length();const o=Qa.set(r[4],r[5],r[6]).length(),a=Qa.set(r[8],r[9],r[10]).length();this.determinant()<0&&(s=-s),e.x=r[12],e.y=r[13],e.z=r[14],Sr.copy(this);const f=1/s,h=1/o,d=1/a;return Sr.elements[0]*=f,Sr.elements[1]*=f,Sr.elements[2]*=f,Sr.elements[4]*=h,Sr.elements[5]*=h,Sr.elements[6]*=h,Sr.elements[8]*=d,Sr.elements[9]*=d,Sr.elements[10]*=d,t.setFromRotationMatrix(Sr),i.x=s,i.y=o,i.z=a,this}makePerspective(e,t,i,r,s,o,a=br){const u=this.elements,f=2*s/(t-e),h=2*s/(i-r),d=(t+e)/(t-e),p=(i+r)/(i-r);let v,y;if(a===br)v=-(o+s)/(o-s),y=-2*o*s/(o-s);else if(a===Jl)v=-o/(o-s),y=-o*s/(o-s);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+a);return u[0]=f,u[4]=0,u[8]=d,u[12]=0,u[1]=0,u[5]=h,u[9]=p,u[13]=0,u[2]=0,u[6]=0,u[10]=v,u[14]=y,u[3]=0,u[7]=0,u[11]=-1,u[15]=0,this}makeOrthographic(e,t,i,r,s,o,a=br){const u=this.elements,f=1/(t-e),h=1/(i-r),d=1/(o-s),p=(t+e)*f,v=(i+r)*h;let y,w;if(a===br)y=(o+s)*d,w=-2*d;else if(a===Jl)y=s*d,w=-1*d;else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+a);return u[0]=2*f,u[4]=0,u[8]=0,u[12]=-p,u[1]=0,u[5]=2*h,u[9]=0,u[13]=-v,u[2]=0,u[6]=0,u[10]=w,u[14]=-y,u[3]=0,u[7]=0,u[11]=0,u[15]=1,this}equals(e){const t=this.elements,i=e.elements;for(let r=0;r<16;r++)if(t[r]!==i[r])return!1;return!0}fromArray(e,t=0){for(let i=0;i<16;i++)this.elements[i]=e[i+t];return this}toArray(e=[],t=0){const i=this.elements;return e[t]=i[0],e[t+1]=i[1],e[t+2]=i[2],e[t+3]=i[3],e[t+4]=i[4],e[t+5]=i[5],e[t+6]=i[6],e[t+7]=i[7],e[t+8]=i[8],e[t+9]=i[9],e[t+10]=i[10],e[t+11]=i[11],e[t+12]=i[12],e[t+13]=i[13],e[t+14]=i[14],e[t+15]=i[15],e}}const Qa=new O,Sr=new ft,nP=new O(0,0,0),iP=new O(1,1,1),js=new O,Vh=new O,ki=new O,SS=new ft,MS=new oi;class pf{constructor(e=0,t=0,i=0,r=pf.DEFAULT_ORDER){this.isEuler=!0,this._x=e,this._y=t,this._z=i,this._order=r}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get order(){return this._order}set order(e){this._order=e,this._onChangeCallback()}set(e,t,i,r=this._order){return this._x=e,this._y=t,this._z=i,this._order=r,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this}setFromRotationMatrix(e,t=this._order,i=!0){const r=e.elements,s=r[0],o=r[4],a=r[8],u=r[1],f=r[5],h=r[9],d=r[2],p=r[6],v=r[10];switch(t){case"XYZ":this._y=Math.asin(dn(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(-h,v),this._z=Math.atan2(-o,s)):(this._x=Math.atan2(p,f),this._z=0);break;case"YXZ":this._x=Math.asin(-dn(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(a,v),this._z=Math.atan2(u,f)):(this._y=Math.atan2(-d,s),this._z=0);break;case"ZXY":this._x=Math.asin(dn(p,-1,1)),Math.abs(p)<.9999999?(this._y=Math.atan2(-d,v),this._z=Math.atan2(-o,f)):(this._y=0,this._z=Math.atan2(u,s));break;case"ZYX":this._y=Math.asin(-dn(d,-1,1)),Math.abs(d)<.9999999?(this._x=Math.atan2(p,v),this._z=Math.atan2(u,s)):(this._x=0,this._z=Math.atan2(-o,f));break;case"YZX":this._z=Math.asin(dn(u,-1,1)),Math.abs(u)<.9999999?(this._x=Math.atan2(-h,f),this._y=Math.atan2(-d,s)):(this._x=0,this._y=Math.atan2(a,v));break;case"XZY":this._z=Math.asin(-dn(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(p,f),this._y=Math.atan2(a,s)):(this._x=Math.atan2(-h,v),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+t)}return this._order=t,i===!0&&this._onChangeCallback(),this}setFromQuaternion(e,t,i){return SS.makeRotationFromQuaternion(e),this.setFromRotationMatrix(SS,t,i)}setFromVector3(e,t=this._order){return this.set(e.x,e.y,e.z,t)}reorder(e){return MS.setFromEuler(this),this.setFromQuaternion(MS,e)}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order}fromArray(e){return this._x=e[0],this._y=e[1],this._z=e[2],e[3]!==void 0&&(this._order=e[3]),this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._order,e}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}pf.DEFAULT_ORDER="XYZ";class fa{constructor(){this.mask=1}set(e){this.mask=(1<>>0}enable(e){this.mask|=1<1){for(let t=0;t1){for(let i=0;i0&&(r.userData=this.userData),r.layers=this.layers.mask,r.matrix=this.matrix.toArray(),r.up=this.up.toArray(),this.matrixAutoUpdate===!1&&(r.matrixAutoUpdate=!1),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.visibility=this._visibility,r.active=this._active,r.bounds=this._bounds.map(a=>({boxInitialized:a.boxInitialized,boxMin:a.box.min.toArray(),boxMax:a.box.max.toArray(),sphereInitialized:a.sphereInitialized,sphereRadius:a.sphere.radius,sphereCenter:a.sphere.center.toArray()})),r.maxGeometryCount=this._maxGeometryCount,r.maxVertexCount=this._maxVertexCount,r.maxIndexCount=this._maxIndexCount,r.geometryInitialized=this._geometryInitialized,r.geometryCount=this._geometryCount,r.matricesTexture=this._matricesTexture.toJSON(e),this.boundingSphere!==null&&(r.boundingSphere={center:r.boundingSphere.center.toArray(),radius:r.boundingSphere.radius}),this.boundingBox!==null&&(r.boundingBox={min:r.boundingBox.min.toArray(),max:r.boundingBox.max.toArray()}));function s(a,u){return a[u.uuid]===void 0&&(a[u.uuid]=u.toJSON(e)),u.uuid}if(this.isScene)this.background&&(this.background.isColor?r.background=this.background.toJSON():this.background.isTexture&&(r.background=this.background.toJSON(e).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(r.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){r.geometry=s(e.geometries,this.geometry);const a=this.geometry.parameters;if(a!==void 0&&a.shapes!==void 0){const u=a.shapes;if(Array.isArray(u))for(let f=0,h=u.length;f0){r.children=[];for(let a=0;a0){r.animations=[];for(let a=0;a0&&(i.geometries=a),u.length>0&&(i.materials=u),f.length>0&&(i.textures=f),h.length>0&&(i.images=h),d.length>0&&(i.shapes=d),p.length>0&&(i.skeletons=p),v.length>0&&(i.animations=v),y.length>0&&(i.nodes=y)}return i.object=r,i;function o(a){const u=[];for(const f in a){const h=a[f];delete h.metadata,u.push(h)}return u}}clone(e){return new this.constructor().copy(this,e)}copy(e,t=!0){if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldAutoUpdate=e.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.animations=e.animations.slice(),this.userData=JSON.parse(JSON.stringify(e.userData)),t===!0)for(let i=0;i0?r.multiplyScalar(1/Math.sqrt(s)):r.set(0,0,0)}static getBarycoord(e,t,i,r,s){Mr.subVectors(r,t),fs.subVectors(i,t),mg.subVectors(e,t);const o=Mr.dot(Mr),a=Mr.dot(fs),u=Mr.dot(mg),f=fs.dot(fs),h=fs.dot(mg),d=o*f-a*a;if(d===0)return s.set(0,0,0),null;const p=1/d,v=(f*u-a*h)*p,y=(o*h-a*u)*p;return s.set(1-v-y,y,v)}static containsPoint(e,t,i,r){return this.getBarycoord(e,t,i,r,hs)===null?!1:hs.x>=0&&hs.y>=0&&hs.x+hs.y<=1}static getUV(e,t,i,r,s,o,a,u){return Wh===!1&&(console.warn("THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."),Wh=!0),this.getInterpolation(e,t,i,r,s,o,a,u)}static getInterpolation(e,t,i,r,s,o,a,u){return this.getBarycoord(e,t,i,r,hs)===null?(u.x=0,u.y=0,"z"in u&&(u.z=0),"w"in u&&(u.w=0),null):(u.setScalar(0),u.addScaledVector(s,hs.x),u.addScaledVector(o,hs.y),u.addScaledVector(a,hs.z),u)}static isFrontFacing(e,t,i,r){return Mr.subVectors(i,t),fs.subVectors(e,t),Mr.cross(fs).dot(r)<0}set(e,t,i){return this.a.copy(e),this.b.copy(t),this.c.copy(i),this}setFromPointsAndIndices(e,t,i,r){return this.a.copy(e[t]),this.b.copy(e[i]),this.c.copy(e[r]),this}setFromAttributeAndIndices(e,t,i,r){return this.a.fromBufferAttribute(e,t),this.b.fromBufferAttribute(e,i),this.c.fromBufferAttribute(e,r),this}clone(){return new this.constructor().copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return Mr.subVectors(this.c,this.b),fs.subVectors(this.a,this.b),Mr.cross(fs).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return Ci.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return Ci.getBarycoord(e,this.a,this.b,this.c,t)}getUV(e,t,i,r,s){return Wh===!1&&(console.warn("THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."),Wh=!0),Ci.getInterpolation(e,this.a,this.b,this.c,t,i,r,s)}getInterpolation(e,t,i,r,s){return Ci.getInterpolation(e,this.a,this.b,this.c,t,i,r,s)}containsPoint(e){return Ci.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return Ci.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,t){const i=this.a,r=this.b,s=this.c;let o,a;el.subVectors(r,i),tl.subVectors(s,i),gg.subVectors(e,i);const u=el.dot(gg),f=tl.dot(gg);if(u<=0&&f<=0)return t.copy(i);vg.subVectors(e,r);const h=el.dot(vg),d=tl.dot(vg);if(h>=0&&d<=h)return t.copy(r);const p=u*d-h*f;if(p<=0&&u>=0&&h<=0)return o=u/(u-h),t.copy(i).addScaledVector(el,o);yg.subVectors(e,s);const v=el.dot(yg),y=tl.dot(yg);if(y>=0&&v<=y)return t.copy(s);const w=v*f-u*y;if(w<=0&&f>=0&&y<=0)return a=f/(f-y),t.copy(i).addScaledVector(tl,a);const S=h*y-v*d;if(S<=0&&d-h>=0&&v-y>=0)return CS.subVectors(s,r),a=(d-h)/(d-h+(v-y)),t.copy(r).addScaledVector(CS,a);const g=1/(S+w+p);return o=w*g,a=p*g,t.copy(i).addScaledVector(el,o).addScaledVector(tl,a)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}const NT={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},Ys={h:0,s:0,l:0},Xh={h:0,s:0,l:0};function _g(n,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?n+(e-n)*6*t:t<1/2?e:t<2/3?n+(e-n)*6*(2/3-t):n}class Be{constructor(e,t,i){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(e,t,i)}set(e,t,i){if(t===void 0&&i===void 0){const r=e;r&&r.isColor?this.copy(r):typeof r=="number"?this.setHex(r):typeof r=="string"&&this.setStyle(r)}else this.setRGB(e,t,i);return this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,t=Cn){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,Ft.toWorkingColorSpace(this,t),this}setRGB(e,t,i,r=Ft.workingColorSpace){return this.r=e,this.g=t,this.b=i,Ft.toWorkingColorSpace(this,r),this}setHSL(e,t,i,r=Ft.workingColorSpace){if(e=Ky(e,1),t=dn(t,0,1),i=dn(i,0,1),t===0)this.r=this.g=this.b=i;else{const s=i<=.5?i*(1+t):i+t-i*t,o=2*i-s;this.r=_g(o,s,e+1/3),this.g=_g(o,s,e),this.b=_g(o,s,e-1/3)}return Ft.toWorkingColorSpace(this,r),this}setStyle(e,t=Cn){function i(s){s!==void 0&&parseFloat(s)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}let r;if(r=/^(\w+)\(([^\)]*)\)/.exec(e)){let s;const o=r[1],a=r[2];switch(o){case"rgb":case"rgba":if(s=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return i(s[4]),this.setRGB(Math.min(255,parseInt(s[1],10))/255,Math.min(255,parseInt(s[2],10))/255,Math.min(255,parseInt(s[3],10))/255,t);if(s=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return i(s[4]),this.setRGB(Math.min(100,parseInt(s[1],10))/100,Math.min(100,parseInt(s[2],10))/100,Math.min(100,parseInt(s[3],10))/100,t);break;case"hsl":case"hsla":if(s=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return i(s[4]),this.setHSL(parseFloat(s[1])/360,parseFloat(s[2])/100,parseFloat(s[3])/100,t);break;default:console.warn("THREE.Color: Unknown color model "+e)}}else if(r=/^\#([A-Fa-f\d]+)$/.exec(e)){const s=r[1],o=s.length;if(o===3)return this.setRGB(parseInt(s.charAt(0),16)/15,parseInt(s.charAt(1),16)/15,parseInt(s.charAt(2),16)/15,t);if(o===6)return this.setHex(parseInt(s,16),t);console.warn("THREE.Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,t);return this}setColorName(e,t=Cn){const i=NT[e.toLowerCase()];return i!==void 0?this.setHex(i,t):console.warn("THREE.Color: Unknown color "+e),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copySRGBToLinear(e){return this.r=Gl(e.r),this.g=Gl(e.g),this.b=Gl(e.b),this}copyLinearToSRGB(e){return this.r=ag(e.r),this.g=ag(e.g),this.b=ag(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=Cn){return Ft.fromWorkingColorSpace(ti.copy(this),e),Math.round(dn(ti.r*255,0,255))*65536+Math.round(dn(ti.g*255,0,255))*256+Math.round(dn(ti.b*255,0,255))}getHexString(e=Cn){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t=Ft.workingColorSpace){Ft.fromWorkingColorSpace(ti.copy(this),t);const i=ti.r,r=ti.g,s=ti.b,o=Math.max(i,r,s),a=Math.min(i,r,s);let u,f;const h=(a+o)/2;if(a===o)u=0,f=0;else{const d=o-a;switch(f=h<=.5?d/(o+a):d/(2-o-a),o){case i:u=(r-s)/d+(r0!=e>0&&this.version++,this._alphaTest=e}onBuild(){}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(e!==void 0)for(const t in e){const i=e[t];if(i===void 0){console.warn(`THREE.Material: parameter '${t}' has value of undefined.`);continue}const r=this[t];if(r===void 0){console.warn(`THREE.Material: '${t}' is not a property of THREE.${this.type}.`);continue}r&&r.isColor?r.set(i):r&&r.isVector3&&i&&i.isVector3?r.copy(i):this[t]=i}}toJSON(e){const t=e===void 0||typeof e=="string";t&&(e={textures:{},images:{}});const i={metadata:{version:4.6,type:"Material",generator:"Material.toJSON"}};i.uuid=this.uuid,i.type=this.type,this.name!==""&&(i.name=this.name),this.color&&this.color.isColor&&(i.color=this.color.getHex()),this.roughness!==void 0&&(i.roughness=this.roughness),this.metalness!==void 0&&(i.metalness=this.metalness),this.sheen!==void 0&&(i.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(i.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(i.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(i.emissive=this.emissive.getHex()),this.emissiveIntensity&&this.emissiveIntensity!==1&&(i.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(i.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(i.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(i.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(i.shininess=this.shininess),this.clearcoat!==void 0&&(i.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(i.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(i.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(i.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(i.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,i.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.iridescence!==void 0&&(i.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(i.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(i.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(i.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(i.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),this.anisotropy!==void 0&&(i.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(i.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(i.anisotropyMap=this.anisotropyMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(i.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(i.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(i.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(i.lightMap=this.lightMap.toJSON(e).uuid,i.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(i.aoMap=this.aoMap.toJSON(e).uuid,i.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(i.bumpMap=this.bumpMap.toJSON(e).uuid,i.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(i.normalMap=this.normalMap.toJSON(e).uuid,i.normalMapType=this.normalMapType,i.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(i.displacementMap=this.displacementMap.toJSON(e).uuid,i.displacementScale=this.displacementScale,i.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(i.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(i.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(i.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(i.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(i.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(i.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(i.envMap=this.envMap.toJSON(e).uuid,this.combine!==void 0&&(i.combine=this.combine)),this.envMapIntensity!==void 0&&(i.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(i.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(i.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(i.gradientMap=this.gradientMap.toJSON(e).uuid),this.transmission!==void 0&&(i.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(i.transmissionMap=this.transmissionMap.toJSON(e).uuid),this.thickness!==void 0&&(i.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(i.thicknessMap=this.thicknessMap.toJSON(e).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(i.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(i.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(i.size=this.size),this.shadowSide!==null&&(i.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(i.sizeAttenuation=this.sizeAttenuation),this.blending!==ca&&(i.blending=this.blending),this.side!==Rs&&(i.side=this.side),this.vertexColors===!0&&(i.vertexColors=!0),this.opacity<1&&(i.opacity=this.opacity),this.transparent===!0&&(i.transparent=!0),this.blendSrc!==Tp&&(i.blendSrc=this.blendSrc),this.blendDst!==Ap&&(i.blendDst=this.blendDst),this.blendEquation!==eo&&(i.blendEquation=this.blendEquation),this.blendSrcAlpha!==null&&(i.blendSrcAlpha=this.blendSrcAlpha),this.blendDstAlpha!==null&&(i.blendDstAlpha=this.blendDstAlpha),this.blendEquationAlpha!==null&&(i.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(i.blendColor=this.blendColor.getHex()),this.blendAlpha!==0&&(i.blendAlpha=this.blendAlpha),this.depthFunc!==zu&&(i.depthFunc=this.depthFunc),this.depthTest===!1&&(i.depthTest=this.depthTest),this.depthWrite===!1&&(i.depthWrite=this.depthWrite),this.colorWrite===!1&&(i.colorWrite=this.colorWrite),this.stencilWriteMask!==255&&(i.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==Tv&&(i.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(i.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(i.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==Jo&&(i.stencilFail=this.stencilFail),this.stencilZFail!==Jo&&(i.stencilZFail=this.stencilZFail),this.stencilZPass!==Jo&&(i.stencilZPass=this.stencilZPass),this.stencilWrite===!0&&(i.stencilWrite=this.stencilWrite),this.rotation!==void 0&&this.rotation!==0&&(i.rotation=this.rotation),this.polygonOffset===!0&&(i.polygonOffset=!0),this.polygonOffsetFactor!==0&&(i.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(i.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(i.linewidth=this.linewidth),this.dashSize!==void 0&&(i.dashSize=this.dashSize),this.gapSize!==void 0&&(i.gapSize=this.gapSize),this.scale!==void 0&&(i.scale=this.scale),this.dithering===!0&&(i.dithering=!0),this.alphaTest>0&&(i.alphaTest=this.alphaTest),this.alphaHash===!0&&(i.alphaHash=!0),this.alphaToCoverage===!0&&(i.alphaToCoverage=!0),this.premultipliedAlpha===!0&&(i.premultipliedAlpha=!0),this.forceSinglePass===!0&&(i.forceSinglePass=!0),this.wireframe===!0&&(i.wireframe=!0),this.wireframeLinewidth>1&&(i.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(i.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(i.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(i.flatShading=!0),this.visible===!1&&(i.visible=!1),this.toneMapped===!1&&(i.toneMapped=!1),this.fog===!1&&(i.fog=!1),Object.keys(this.userData).length>0&&(i.userData=this.userData);function r(s){const o=[];for(const a in s){const u=s[a];delete u.metadata,o.push(u)}return o}if(t){const s=r(e.textures),o=r(e.images);s.length>0&&(i.textures=s),o.length>0&&(i.images=o)}return i}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 i=null;if(t!==null){const r=t.length;i=new Array(r);for(let s=0;s!==r;++s)i[s]=t[s].clone()}return this.clippingPlanes=i,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaHash=e.alphaHash,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.forceSinglePass=e.forceSinglePass,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++}}class To extends Yn{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new Be(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=hf,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.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}}const vs=uP();function uP(){const n=new ArrayBuffer(4),e=new Float32Array(n),t=new Uint32Array(n),i=new Uint32Array(512),r=new Uint32Array(512);for(let u=0;u<256;++u){const f=u-127;f<-27?(i[u]=0,i[u|256]=32768,r[u]=24,r[u|256]=24):f<-14?(i[u]=1024>>-f-14,i[u|256]=1024>>-f-14|32768,r[u]=-f-1,r[u|256]=-f-1):f<=15?(i[u]=f+15<<10,i[u|256]=f+15<<10|32768,r[u]=13,r[u|256]=13):f<128?(i[u]=31744,i[u|256]=64512,r[u]=24,r[u|256]=24):(i[u]=31744,i[u|256]=64512,r[u]=13,r[u|256]=13)}const s=new Uint32Array(2048),o=new Uint32Array(64),a=new Uint32Array(64);for(let u=1;u<1024;++u){let f=u<<13,h=0;for(;!(f&8388608);)f<<=1,h-=8388608;f&=-8388609,h+=947912704,s[u]=f|h}for(let u=1024;u<2048;++u)s[u]=939524096+(u-1024<<13);for(let u=1;u<31;++u)o[u]=u<<23;o[31]=1199570944,o[32]=2147483648;for(let u=33;u<63;++u)o[u]=2147483648+(u-32<<23);o[63]=3347054592;for(let u=1;u<64;++u)u!==32&&(a[u]=1024);return{floatView:e,uint32View:t,baseTable:i,shiftTable:r,mantissaTable:s,exponentTable:o,offsetTable:a}}function Ti(n){Math.abs(n)>65504&&console.warn("THREE.DataUtils.toHalfFloat(): Value out of range."),n=dn(n,-65504,65504),vs.floatView[0]=n;const e=vs.uint32View[0],t=e>>23&511;return vs.baseTable[t]+((e&8388607)>>vs.shiftTable[t])}function nu(n){const e=n>>10;return vs.uint32View[0]=vs.mantissaTable[vs.offsetTable[e]+(n&1023)]+vs.exponentTable[e],vs.floatView[0]}const fP={toHalfFloat:Ti,fromHalfFloat:nu},wn=new O,jh=new de;class Ht{constructor(e,t,i=!1){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,this.name="",this.array=e,this.itemSize=t,this.count=e!==void 0?e.length/t:0,this.normalized=i,this.usage=Yu,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.gpuType=hr,this.version=0}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}get updateRange(){return console.warn("THREE.BufferAttribute: updateRange() is deprecated and will be removed in r169. Use addUpdateRange() instead."),this._updateRange}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,i){e*=this.itemSize,i*=t.itemSize;for(let r=0,s=this.itemSize;r0&&(e.userData=this.userData),this.parameters!==void 0){const u=this.parameters;for(const f in u)u[f]!==void 0&&(e[f]=u[f]);return e}e.data={attributes:{}};const t=this.index;t!==null&&(e.data.index={type:t.array.constructor.name,array:Array.prototype.slice.call(t.array)});const i=this.attributes;for(const u in i){const f=i[u];e.data.attributes[u]=f.toJSON(e.data)}const r={};let s=!1;for(const u in this.morphAttributes){const f=this.morphAttributes[u],h=[];for(let d=0,p=f.length;d0&&(r[u]=h,s=!0)}s&&(e.data.morphAttributes=r,e.data.morphTargetsRelative=this.morphTargetsRelative);const o=this.groups;o.length>0&&(e.data.groups=JSON.parse(JSON.stringify(o)));const a=this.boundingSphere;return a!==null&&(e.data.boundingSphere={center:a.center.toArray(),radius:a.radius}),e}clone(){return new this.constructor().copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const t={};this.name=e.name;const i=e.index;i!==null&&this.setIndex(i.clone(t));const r=e.attributes;for(const f in r){const h=r[f];this.setAttribute(f,h.clone(t))}const s=e.morphAttributes;for(const f in s){const h=[],d=s[f];for(let p=0,v=d.length;p0){const r=t[i[0]];if(r!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,o=r.length;s(e.far-e.near)**2))&&(bS.copy(s).invert(),ko.copy(e.ray).applyMatrix4(bS),!(i.boundingBox!==null&&ko.intersectsBox(i.boundingBox)===!1)&&this._computeIntersections(e,t,ko)))}_computeIntersections(e,t,i){let r;const s=this.geometry,o=this.material,a=s.index,u=s.attributes.position,f=s.attributes.uv,h=s.attributes.uv1,d=s.attributes.normal,p=s.groups,v=s.drawRange;if(a!==null)if(Array.isArray(o))for(let y=0,w=p.length;yt.far?null:{distance:f,point:$h.clone(),object:n}}function ed(n,e,t,i,r,s,o,a,u,f){n.getVertexPosition(a,il),n.getVertexPosition(u,rl),n.getVertexPosition(f,sl);const h=xP(n,e,t,i,il,rl,sl,Qh);if(h){r&&(Zh.fromBufferAttribute(r,a),Kh.fromBufferAttribute(r,u),Jh.fromBufferAttribute(r,f),h.uv=Ci.getInterpolation(Qh,il,rl,sl,Zh,Kh,Jh,new de)),s&&(Zh.fromBufferAttribute(s,a),Kh.fromBufferAttribute(s,u),Jh.fromBufferAttribute(s,f),h.uv1=Ci.getInterpolation(Qh,il,rl,sl,Zh,Kh,Jh,new de),h.uv2=h.uv1),o&&(PS.fromBufferAttribute(o,a),LS.fromBufferAttribute(o,u),IS.fromBufferAttribute(o,f),h.normal=Ci.getInterpolation(Qh,il,rl,sl,PS,LS,IS,new O),h.normal.dot(i.direction)>0&&h.normal.multiplyScalar(-1));const d={a,b:u,c:f,normal:new O,materialIndex:0};Ci.getNormal(il,rl,sl,d.normal),h.face=d}return h}class Ca extends St{constructor(e=1,t=1,i=1,r=1,s=1,o=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:t,depth:i,widthSegments:r,heightSegments:s,depthSegments:o};const a=this;r=Math.floor(r),s=Math.floor(s),o=Math.floor(o);const u=[],f=[],h=[],d=[];let p=0,v=0;y("z","y","x",-1,-1,i,t,e,o,s,0),y("z","y","x",1,-1,i,t,-e,o,s,1),y("x","z","y",1,1,e,i,t,r,o,2),y("x","z","y",1,-1,e,i,-t,r,o,3),y("x","y","z",1,-1,e,t,i,r,s,4),y("x","y","z",-1,-1,e,t,-i,r,s,5),this.setIndex(u),this.setAttribute("position",new qe(f,3)),this.setAttribute("normal",new qe(h,3)),this.setAttribute("uv",new qe(d,2));function y(w,S,g,x,M,T,P,C,L,D,b){const R=T/L,k=P/D,q=T/2,oe=P/2,V=C/2,Q=L+1,te=D+1;let ae=0,N=0;const B=new O;for(let H=0;H0?1:-1,h.push(B.x,B.y,B.z),d.push(J/L),d.push(1-H/D),ae+=1}}for(let H=0;H>8&255]+ei[n>>16&255]+ei[n>>24&255]+"-"+ei[e&255]+ei[e>>8&255]+"-"+ei[e>>16&15|64]+ei[e>>24&255]+"-"+ei[t&63|128]+ei[t>>8&255]+"-"+ei[t>>16&255]+ei[t>>24&255]+ei[i&255]+ei[i>>8&255]+ei[i>>16&255]+ei[i>>24&255]).toLowerCase()}function dn(n,e,t){return Math.max(e,Math.min(t,n))}function Ky(n,e){return(n%e+e)%e}function NR(n,e,t,i,r){return i+(n-e)*(r-i)/(t-e)}function DR(n,e,t){return n!==e?(t-n)/(e-n):0}function pu(n,e,t){return(1-t)*n+t*e}function UR(n,e,t,i){return pu(n,e,1-Math.exp(-t*i))}function OR(n,e=1){return e-Math.abs(Ky(n,e*2)-e)}function zR(n,e,t){return n<=e?0:n>=t?1:(n=(n-e)/(t-e),n*n*(3-2*n))}function FR(n,e,t){return n<=e?0:n>=t?1:(n=(n-e)/(t-e),n*n*n*(n*(n*6-15)+10))}function kR(n,e){return n+Math.floor(Math.random()*(e-n+1))}function BR(n,e){return n+Math.random()*(e-n)}function HR(n){return n*(.5-Math.random())}function VR(n){n!==void 0&&(gS=n);let e=gS+=1831565813;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}function GR(n){return n*ua}function WR(n){return n*Ql}function Cv(n){return(n&n-1)===0&&n!==0}function XR(n){return Math.pow(2,Math.ceil(Math.log(n)/Math.LN2))}function Rp(n){return Math.pow(2,Math.floor(Math.log(n)/Math.LN2))}function jR(n,e,t,i,r){const s=Math.cos,o=Math.sin,a=s(t/2),u=o(t/2),f=s((e+i)/2),h=o((e+i)/2),d=s((e-i)/2),p=o((e-i)/2),v=s((i-e)/2),y=o((i-e)/2);switch(r){case"XYX":n.set(a*h,u*d,u*p,a*f);break;case"YZY":n.set(u*p,a*h,u*d,a*f);break;case"ZXZ":n.set(u*d,u*p,a*h,a*f);break;case"XZX":n.set(a*h,u*y,u*v,a*f);break;case"YXY":n.set(u*v,a*h,u*y,a*f);break;case"ZYZ":n.set(u*y,u*v,a*h,a*f);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+r)}}function bi(n,e){switch(e.constructor){case Float32Array:return n;case Uint32Array:return n/4294967295;case Uint16Array:return n/65535;case Uint8Array:return n/255;case Int32Array:return Math.max(n/2147483647,-1);case Int16Array:return Math.max(n/32767,-1);case Int8Array:return Math.max(n/127,-1);default:throw new Error("Invalid component type.")}}function xt(n,e){switch(e.constructor){case Float32Array:return n;case Uint32Array:return Math.round(n*4294967295);case Uint16Array:return Math.round(n*65535);case Uint8Array:return Math.round(n*255);case Int32Array:return Math.round(n*2147483647);case Int16Array:return Math.round(n*32767);case Int8Array:return Math.round(n*127);default:throw new Error("Invalid component type.")}}const YR={DEG2RAD:ua,RAD2DEG:Ql,generateUUID:Yi,clamp:dn,euclideanModulo:Ky,mapLinear:NR,inverseLerp:DR,lerp:pu,damp:UR,pingpong:OR,smoothstep:zR,smootherstep:FR,randInt:kR,randFloat:BR,randFloatSpread:HR,seededRandom:VR,degToRad:GR,radToDeg:WR,isPowerOfTwo:Cv,ceilPowerOfTwo:XR,floorPowerOfTwo:Rp,setQuaternionFromProperEuler:jR,normalize:xt,denormalize:bi};class de{constructor(e=0,t=0){de.prototype.isVector2=!0,this.x=e,this.y=t}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,t){return this.x=e,this.y=t,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e){return this.x+=e.x,this.y+=e.y,this}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){const t=this.x,i=this.y,r=e.elements;return this.x=r[0]*t+r[3]*i+r[6],this.y=r[1]*t+r[4]*i+r[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this}clampLength(e,t){const i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(e,Math.min(t,i)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;const i=this.dot(e)/t;return Math.acos(dn(i,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,i=this.y-e.y;return t*t+i*i}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this}lerpVectors(e,t,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this}rotateAround(e,t){const i=Math.cos(t),r=Math.sin(t),s=this.x-e.x,o=this.y-e.y;return this.x=s*i-o*r+e.x,this.y=s*r+o*i+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class wt{constructor(e,t,i,r,s,o,a,u,f){wt.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],e!==void 0&&this.set(e,t,i,r,s,o,a,u,f)}set(e,t,i,r,s,o,a,u,f){const h=this.elements;return h[0]=e,h[1]=r,h[2]=a,h[3]=t,h[4]=s,h[5]=u,h[6]=i,h[7]=o,h[8]=f,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){const t=this.elements,i=e.elements;return t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=i[3],t[4]=i[4],t[5]=i[5],t[6]=i[6],t[7]=i[7],t[8]=i[8],this}extractBasis(e,t,i){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),i.setFromMatrix3Column(this,2),this}setFromMatrix4(e){const t=e.elements;return this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const i=e.elements,r=t.elements,s=this.elements,o=i[0],a=i[3],u=i[6],f=i[1],h=i[4],d=i[7],p=i[2],v=i[5],y=i[8],w=r[0],S=r[3],g=r[6],x=r[1],M=r[4],T=r[7],P=r[2],C=r[5],L=r[8];return s[0]=o*w+a*x+u*P,s[3]=o*S+a*M+u*C,s[6]=o*g+a*T+u*L,s[1]=f*w+h*x+d*P,s[4]=f*S+h*M+d*C,s[7]=f*g+h*T+d*L,s[2]=p*w+v*x+y*P,s[5]=p*S+v*M+y*C,s[8]=p*g+v*T+y*L,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[3]*=e,t[6]*=e,t[1]*=e,t[4]*=e,t[7]*=e,t[2]*=e,t[5]*=e,t[8]*=e,this}determinant(){const e=this.elements,t=e[0],i=e[1],r=e[2],s=e[3],o=e[4],a=e[5],u=e[6],f=e[7],h=e[8];return t*o*h-t*a*f-i*s*h+i*a*u+r*s*f-r*o*u}invert(){const e=this.elements,t=e[0],i=e[1],r=e[2],s=e[3],o=e[4],a=e[5],u=e[6],f=e[7],h=e[8],d=h*o-a*f,p=a*u-h*s,v=f*s-o*u,y=t*d+i*p+r*v;if(y===0)return this.set(0,0,0,0,0,0,0,0,0);const w=1/y;return e[0]=d*w,e[1]=(r*f-h*i)*w,e[2]=(a*i-r*o)*w,e[3]=p*w,e[4]=(h*t-r*u)*w,e[5]=(r*s-a*t)*w,e[6]=v*w,e[7]=(i*u-f*t)*w,e[8]=(o*t-i*s)*w,this}transpose(){let e;const t=this.elements;return e=t[1],t[1]=t[3],t[3]=e,e=t[2],t[2]=t[6],t[6]=e,e=t[5],t[5]=t[7],t[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){const t=this.elements;return e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],this}setUvTransform(e,t,i,r,s,o,a){const u=Math.cos(s),f=Math.sin(s);return this.set(i*u,i*f,-i*(u*o+f*a)+o+e,-r*f,r*u,-r*(-f*o+u*a)+a+t,0,0,1),this}scale(e,t){return this.premultiply(og.makeScale(e,t)),this}rotate(e){return this.premultiply(og.makeRotation(-e)),this}translate(e,t){return this.premultiply(og.makeTranslation(e,t)),this}makeTranslation(e,t){return e.isVector2?this.set(1,0,e.x,0,1,e.y,0,0,1):this.set(1,0,e,0,1,t,0,0,1),this}makeRotation(e){const t=Math.cos(e),i=Math.sin(e);return this.set(t,-i,0,i,t,0,0,0,1),this}makeScale(e,t){return this.set(e,0,0,0,t,0,0,0,1),this}equals(e){const t=this.elements,i=e.elements;for(let r=0;r<9;r++)if(t[r]!==i[r])return!1;return!0}fromArray(e,t=0){for(let i=0;i<9;i++)this.elements[i]=e[i+t];return this}toArray(e=[],t=0){const i=this.elements;return e[t]=i[0],e[t+1]=i[1],e[t+2]=i[2],e[t+3]=i[3],e[t+4]=i[4],e[t+5]=i[5],e[t+6]=i[6],e[t+7]=i[7],e[t+8]=i[8],e}clone(){return new this.constructor().fromArray(this.elements)}}const og=new wt;function PT(n){for(let e=n.length-1;e>=0;--e)if(n[e]>=65535)return!0;return!1}const qR={Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array};function Ll(n,e){return new qR[n](e)}function qu(n){return document.createElementNS("http://www.w3.org/1999/xhtml",n)}function LT(){const n=qu("canvas");return n.style.display="block",n}const vS={};function mu(n){n in vS||(vS[n]=!0,console.warn(n))}const yS=new wt().set(.8224621,.177538,0,.0331941,.9668058,0,.0170827,.0723974,.9105199),_S=new wt().set(1.2249401,-.2249404,0,-.0420569,1.0420571,0,-.0196376,-.0786361,1.0982735),Oh={[Qr]:{transfer:Wu,primaries:Xu,toReference:n=>n,fromReference:n=>n},[Cn]:{transfer:jt,primaries:Xu,toReference:n=>n.convertSRGBToLinear(),fromReference:n=>n.convertLinearToSRGB()},[df]:{transfer:Wu,primaries:ju,toReference:n=>n.applyMatrix3(_S),fromReference:n=>n.applyMatrix3(yS)},[tm]:{transfer:jt,primaries:ju,toReference:n=>n.convertSRGBToLinear().applyMatrix3(_S),fromReference:n=>n.applyMatrix3(yS).convertLinearToSRGB()}},ZR=new Set([Qr,df]),Ft={enabled:!0,_workingColorSpace:Qr,get workingColorSpace(){return this._workingColorSpace},set workingColorSpace(n){if(!ZR.has(n))throw new Error(`Unsupported working color space, "${n}".`);this._workingColorSpace=n},convert:function(n,e,t){if(this.enabled===!1||e===t||!e||!t)return n;const i=Oh[e].toReference,r=Oh[t].fromReference;return r(i(n))},fromWorkingColorSpace:function(n,e){return this.convert(n,this._workingColorSpace,e)},toWorkingColorSpace:function(n,e){return this.convert(n,e,this._workingColorSpace)},getPrimaries:function(n){return Oh[n].primaries},getTransfer:function(n){return n===Gi?Wu:Oh[n].transfer}};function Gl(n){return n<.04045?n*.0773993808:Math.pow(n*.9478672986+.0521327014,2.4)}function ag(n){return n<.0031308?n*12.92:1.055*Math.pow(n,.41666)-.055}let qa;class Jy{static getDataURL(e){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement>"u")return e.src;let t;if(e instanceof HTMLCanvasElement)t=e;else{qa===void 0&&(qa=qu("canvas")),qa.width=e.width,qa.height=e.height;const i=qa.getContext("2d");e instanceof ImageData?i.putImageData(e,0,0):i.drawImage(e,0,0,e.width,e.height),t=qa}return t.width>2048||t.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",e),t.toDataURL("image/jpeg",.6)):t.toDataURL("image/png")}static sRGBToLinear(e){if(typeof HTMLImageElement<"u"&&e instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&e instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&e instanceof ImageBitmap){const t=qu("canvas");t.width=e.width,t.height=e.height;const i=t.getContext("2d");i.drawImage(e,0,0,e.width,e.height);const r=i.getImageData(0,0,e.width,e.height),s=r.data;for(let o=0;o0&&(i.userData=this.userData),t||(e.textures[this.uuid]=i),i}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(this.mapping!==Qp)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case ku:e.x=e.x-Math.floor(e.x);break;case si:e.x=e.x<0?0:1;break;case Bu:Math.abs(Math.floor(e.x)%2)===1?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x);break}if(e.y<0||e.y>1)switch(this.wrapT){case ku:e.y=e.y-Math.floor(e.y);break;case si:e.y=e.y<0?0:1;break;case Bu:Math.abs(Math.floor(e.y)%2)===1?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y);break}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){e===!0&&(this.version++,this.source.needsUpdate=!0)}get encoding(){return mu("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace===Cn?mo:qy}set encoding(e){mu("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace=e===mo?Cn:Gi}}mn.DEFAULT_IMAGE=null;mn.DEFAULT_MAPPING=Qp;mn.DEFAULT_ANISOTROPY=1;class kt{constructor(e=0,t=0,i=0,r=1){kt.prototype.isVector4=!0,this.x=e,this.y=t,this.z=i,this.w=r}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,t,i,r){return this.x=e,this.y=t,this.z=i,this.w=r,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;case 3:this.w=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=e.w!==void 0?e.w:1,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this.w=e.w+t.w,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this.w+=e.w*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this.w=e.w-t.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){const t=this.x,i=this.y,r=this.z,s=this.w,o=e.elements;return this.x=o[0]*t+o[4]*i+o[8]*r+o[12]*s,this.y=o[1]*t+o[5]*i+o[9]*r+o[13]*s,this.z=o[2]*t+o[6]*i+o[10]*r+o[14]*s,this.w=o[3]*t+o[7]*i+o[11]*r+o[15]*s,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);const t=Math.sqrt(1-e.w*e.w);return t<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/t,this.y=e.y/t,this.z=e.z/t),this}setAxisAngleFromRotationMatrix(e){let t,i,r,s;const u=e.elements,f=u[0],h=u[4],d=u[8],p=u[1],v=u[5],y=u[9],w=u[2],S=u[6],g=u[10];if(Math.abs(h-p)<.01&&Math.abs(d-w)<.01&&Math.abs(y-S)<.01){if(Math.abs(h+p)<.1&&Math.abs(d+w)<.1&&Math.abs(y+S)<.1&&Math.abs(f+v+g-3)<.1)return this.set(1,0,0,0),this;t=Math.PI;const M=(f+1)/2,T=(v+1)/2,P=(g+1)/2,C=(h+p)/4,L=(d+w)/4,D=(y+S)/4;return M>T&&M>P?M<.01?(i=0,r=.707106781,s=.707106781):(i=Math.sqrt(M),r=C/i,s=L/i):T>P?T<.01?(i=.707106781,r=0,s=.707106781):(r=Math.sqrt(T),i=C/r,s=D/r):P<.01?(i=.707106781,r=.707106781,s=0):(s=Math.sqrt(P),i=L/s,r=D/s),this.set(i,r,s,t),this}let x=Math.sqrt((S-y)*(S-y)+(d-w)*(d-w)+(p-h)*(p-h));return Math.abs(x)<.001&&(x=1),this.x=(S-y)/x,this.y=(d-w)/x,this.z=(p-h)/x,this.w=Math.acos((f+v+g-1)/2),this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this.w=Math.max(e.w,Math.min(t.w,this.w)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this.w=Math.max(e,Math.min(t,this.w)),this}clampLength(e,t){const i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(e,Math.min(t,i)))}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(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this.w+=(e.w-this.w)*t,this}lerpVectors(e,t,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this.z=e.z+(t.z-e.z)*i,this.w=e.w+(t.w-e.w)*i,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this.w=e[t+3],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e[t+3]=this.w,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this.w=e.getW(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}}class IT extends es{constructor(e=1,t=1,i={}){super(),this.isRenderTarget=!0,this.width=e,this.height=t,this.depth=1,this.scissor=new kt(0,0,e,t),this.scissorTest=!1,this.viewport=new kt(0,0,e,t);const r={width:e,height:t,depth:1};i.encoding!==void 0&&(mu("THREE.WebGLRenderTarget: option.encoding has been replaced by option.colorSpace."),i.colorSpace=i.encoding===mo?Cn:Gi),i=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:sn,depthBuffer:!0,stencilBuffer:!1,depthTexture:null,samples:0},i),this.texture=new mn(r,i.mapping,i.wrapS,i.wrapT,i.magFilter,i.minFilter,i.format,i.type,i.anisotropy,i.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.flipY=!1,this.texture.generateMipmaps=i.generateMipmaps,this.texture.internalFormat=i.internalFormat,this.depthBuffer=i.depthBuffer,this.stencilBuffer=i.stencilBuffer,this.depthTexture=i.depthTexture,this.samples=i.samples}setSize(e,t,i=1){(this.width!==e||this.height!==t||this.depth!==i)&&(this.width=e,this.height=t,this.depth=i,this.texture.image.width=e,this.texture.image.height=t,this.texture.image.depth=i,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.texture=e.texture.clone(),this.texture.isRenderTargetTexture=!0;const t=Object.assign({},e.texture.image);return this.texture.source=new sa(t),this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,e.depthTexture!==null&&(this.depthTexture=e.depthTexture.clone()),this.samples=e.samples,this}dispose(){this.dispatchEvent({type:"dispose"})}}class gr extends IT{constructor(e=1,t=1,i={}){super(e,t,i),this.isWebGLRenderTarget=!0}}class nm extends mn{constructor(e=null,t=1,i=1,r=1){super(null),this.isDataArrayTexture=!0,this.image={data:e,width:t,height:i,depth:r},this.magFilter=_n,this.minFilter=_n,this.wrapR=si,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class QR extends gr{constructor(e=1,t=1,i=1,r={}){super(e,t,r),this.isWebGLArrayRenderTarget=!0,this.depth=i,this.texture=new nm(null,e,t,i),this.texture.isRenderTargetTexture=!0}}class Qy extends mn{constructor(e=null,t=1,i=1,r=1){super(null),this.isData3DTexture=!0,this.image={data:e,width:t,height:i,depth:r},this.magFilter=_n,this.minFilter=_n,this.wrapR=si,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class $R extends gr{constructor(e=1,t=1,i=1,r={}){super(e,t,r),this.isWebGL3DRenderTarget=!0,this.depth=i,this.texture=new Qy(null,e,t,i),this.texture.isRenderTargetTexture=!0}}class eP extends gr{constructor(e=1,t=1,i=1,r={}){super(e,t,r),this.isWebGLMultipleRenderTargets=!0;const s=this.texture;this.texture=[];for(let o=0;o=0?1:-1,M=1-g*g;if(M>Number.EPSILON){const P=Math.sqrt(M),C=Math.atan2(P,g*x);S=Math.sin(S*C)/P,a=Math.sin(a*C)/P}const T=a*x;if(u=u*S+p*T,f=f*S+v*T,h=h*S+y*T,d=d*S+w*T,S===1-a){const P=1/Math.sqrt(u*u+f*f+h*h+d*d);u*=P,f*=P,h*=P,d*=P}}e[t]=u,e[t+1]=f,e[t+2]=h,e[t+3]=d}static multiplyQuaternionsFlat(e,t,i,r,s,o){const a=i[r],u=i[r+1],f=i[r+2],h=i[r+3],d=s[o],p=s[o+1],v=s[o+2],y=s[o+3];return e[t]=a*y+h*d+u*v-f*p,e[t+1]=u*y+h*p+f*d-a*v,e[t+2]=f*y+h*v+a*p-u*d,e[t+3]=h*y-a*d-u*p-f*v,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,i,r){return this._x=e,this._y=t,this._z=i,this._w=r,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,t=!0){const i=e._x,r=e._y,s=e._z,o=e._order,a=Math.cos,u=Math.sin,f=a(i/2),h=a(r/2),d=a(s/2),p=u(i/2),v=u(r/2),y=u(s/2);switch(o){case"XYZ":this._x=p*h*d+f*v*y,this._y=f*v*d-p*h*y,this._z=f*h*y+p*v*d,this._w=f*h*d-p*v*y;break;case"YXZ":this._x=p*h*d+f*v*y,this._y=f*v*d-p*h*y,this._z=f*h*y-p*v*d,this._w=f*h*d+p*v*y;break;case"ZXY":this._x=p*h*d-f*v*y,this._y=f*v*d+p*h*y,this._z=f*h*y+p*v*d,this._w=f*h*d-p*v*y;break;case"ZYX":this._x=p*h*d-f*v*y,this._y=f*v*d+p*h*y,this._z=f*h*y-p*v*d,this._w=f*h*d+p*v*y;break;case"YZX":this._x=p*h*d+f*v*y,this._y=f*v*d+p*h*y,this._z=f*h*y-p*v*d,this._w=f*h*d-p*v*y;break;case"XZY":this._x=p*h*d-f*v*y,this._y=f*v*d-p*h*y,this._z=f*h*y+p*v*d,this._w=f*h*d+p*v*y;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+o)}return t===!0&&this._onChangeCallback(),this}setFromAxisAngle(e,t){const i=t/2,r=Math.sin(i);return this._x=e.x*r,this._y=e.y*r,this._z=e.z*r,this._w=Math.cos(i),this._onChangeCallback(),this}setFromRotationMatrix(e){const t=e.elements,i=t[0],r=t[4],s=t[8],o=t[1],a=t[5],u=t[9],f=t[2],h=t[6],d=t[10],p=i+a+d;if(p>0){const v=.5/Math.sqrt(p+1);this._w=.25/v,this._x=(h-u)*v,this._y=(s-f)*v,this._z=(o-r)*v}else if(i>a&&i>d){const v=2*Math.sqrt(1+i-a-d);this._w=(h-u)/v,this._x=.25*v,this._y=(r+o)/v,this._z=(s+f)/v}else if(a>d){const v=2*Math.sqrt(1+a-i-d);this._w=(s-f)/v,this._x=(r+o)/v,this._y=.25*v,this._z=(u+h)/v}else{const v=2*Math.sqrt(1+d-i-a);this._w=(o-r)/v,this._x=(s+f)/v,this._y=(u+h)/v,this._z=.25*v}return this._onChangeCallback(),this}setFromUnitVectors(e,t){let i=e.dot(t)+1;return iMath.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=i):(this._x=0,this._y=-e.z,this._z=e.y,this._w=i)):(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=i),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(dn(this.dot(e),-1,1)))}rotateTowards(e,t){const i=this.angleTo(e);if(i===0)return this;const r=Math.min(1,t/i);return this.slerp(e,r),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return 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 i=e._x,r=e._y,s=e._z,o=e._w,a=t._x,u=t._y,f=t._z,h=t._w;return this._x=i*h+o*a+r*f-s*u,this._y=r*h+o*u+s*a-i*f,this._z=s*h+o*f+i*u-r*a,this._w=o*h-i*a-r*u-s*f,this._onChangeCallback(),this}slerp(e,t){if(t===0)return this;if(t===1)return this.copy(e);const i=this._x,r=this._y,s=this._z,o=this._w;let a=o*e._w+i*e._x+r*e._y+s*e._z;if(a<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,a=-a):this.copy(e),a>=1)return this._w=o,this._x=i,this._y=r,this._z=s,this;const u=1-a*a;if(u<=Number.EPSILON){const v=1-t;return this._w=v*o+t*this._w,this._x=v*i+t*this._x,this._y=v*r+t*this._y,this._z=v*s+t*this._z,this.normalize(),this}const f=Math.sqrt(u),h=Math.atan2(f,a),d=Math.sin((1-t)*h)/f,p=Math.sin(t*h)/f;return this._w=o*d+this._w*p,this._x=i*d+this._x*p,this._y=r*d+this._y*p,this._z=s*d+this._z*p,this._onChangeCallback(),this}slerpQuaternions(e,t,i){return this.copy(e).slerp(t,i)}random(){const e=Math.random(),t=Math.sqrt(1-e),i=Math.sqrt(e),r=2*Math.PI*Math.random(),s=2*Math.PI*Math.random();return this.set(t*Math.cos(r),i*Math.sin(s),i*Math.cos(s),t*Math.sin(r))}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}}class z{constructor(e=0,t=0,i=0){z.prototype.isVector3=!0,this.x=e,this.y=t,this.z=i}set(e,t,i){return i===void 0&&(i=this.z),this.x=e,this.y=t,this.z=i,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this}applyEuler(e){return this.applyQuaternion(xS.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(xS.setFromAxisAngle(e,t))}applyMatrix3(e){const t=this.x,i=this.y,r=this.z,s=e.elements;return this.x=s[0]*t+s[3]*i+s[6]*r,this.y=s[1]*t+s[4]*i+s[7]*r,this.z=s[2]*t+s[5]*i+s[8]*r,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const t=this.x,i=this.y,r=this.z,s=e.elements,o=1/(s[3]*t+s[7]*i+s[11]*r+s[15]);return this.x=(s[0]*t+s[4]*i+s[8]*r+s[12])*o,this.y=(s[1]*t+s[5]*i+s[9]*r+s[13])*o,this.z=(s[2]*t+s[6]*i+s[10]*r+s[14])*o,this}applyQuaternion(e){const t=this.x,i=this.y,r=this.z,s=e.x,o=e.y,a=e.z,u=e.w,f=2*(o*r-a*i),h=2*(a*t-s*r),d=2*(s*i-o*t);return this.x=t+u*f+o*d-a*h,this.y=i+u*h+a*f-s*d,this.z=r+u*d+s*h-o*f,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){const t=this.x,i=this.y,r=this.z,s=e.elements;return this.x=s[0]*t+s[4]*i+s[8]*r,this.y=s[1]*t+s[5]*i+s[9]*r,this.z=s[2]*t+s[6]*i+s[10]*r,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this}clampLength(e,t){const i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(e,Math.min(t,i)))}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(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this}lerpVectors(e,t,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this.z=e.z+(t.z-e.z)*i,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,t){const i=e.x,r=e.y,s=e.z,o=t.x,a=t.y,u=t.z;return this.x=r*u-s*a,this.y=s*o-i*u,this.z=i*a-r*o,this}projectOnVector(e){const t=e.lengthSq();if(t===0)return this.set(0,0,0);const i=e.dot(this)/t;return this.copy(e).multiplyScalar(i)}projectOnPlane(e){return cg.copy(this).projectOnVector(e),this.sub(cg)}reflect(e){return this.sub(cg.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;const i=this.dot(e)/t;return Math.acos(dn(i,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,i=this.y-e.y,r=this.z-e.z;return t*t+i*i+r*r}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,t,i){const r=Math.sin(t)*e;return this.x=r*Math.sin(i),this.y=Math.cos(t)*e,this.z=r*Math.cos(i),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,t,i){return this.x=e*Math.sin(t),this.y=i,this.z=e*Math.cos(t),this}setFromMatrixPosition(e){const t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this}setFromMatrixScale(e){const t=this.setFromMatrixColumn(e,0).length(),i=this.setFromMatrixColumn(e,1).length(),r=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=i,this.z=r,this}setFromMatrixColumn(e,t){return this.fromArray(e.elements,t*4)}setFromMatrix3Column(e,t){return this.fromArray(e.elements,t*3)}setFromEuler(e){return this.x=e._x,this.y=e._y,this.z=e._z,this}setFromColor(e){return this.x=e.r,this.y=e.g,this.z=e.b,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const e=(Math.random()-.5)*2,t=Math.random()*Math.PI*2,i=Math.sqrt(1-e**2);return this.x=i*Math.cos(t),this.y=i*Math.sin(t),this.z=e,this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const cg=new z,xS=new oi;class yi{constructor(e=new z(1/0,1/0,1/0),t=new z(-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,i=e.length;tthis.max.x||e.ythis.max.y||e.zthis.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.xthis.max.x||e.max.ythis.max.y||e.max.zthis.max.z)}intersectsSphere(e){return this.clampPoint(e.center,xr),xr.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let t,i;return e.normal.x>0?(t=e.normal.x*this.min.x,i=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,i=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,i+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,i+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,i+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,i+=e.normal.z*this.min.z),t<=-e.constant&&i>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(kc),Fh.subVectors(this.max,kc),Za.subVectors(e.a,kc),Ka.subVectors(e.b,kc),Ja.subVectors(e.c,kc),Gs.subVectors(Ka,Za),Ws.subVectors(Ja,Ka),zo.subVectors(Za,Ja);let t=[0,-Gs.z,Gs.y,0,-Ws.z,Ws.y,0,-zo.z,zo.y,Gs.z,0,-Gs.x,Ws.z,0,-Ws.x,zo.z,0,-zo.x,-Gs.y,Gs.x,0,-Ws.y,Ws.x,0,-zo.y,zo.x,0];return!ug(t,Za,Ka,Ja,Fh)||(t=[1,0,0,0,1,0,0,0,1],!ug(t,Za,Ka,Ja,Fh))?!1:(kh.crossVectors(Gs,Ws),t=[kh.x,kh.y,kh.z],ug(t,Za,Ka,Ja,Fh))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,xr).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(xr).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:(ls[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),ls[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),ls[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),ls[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),ls[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),ls[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),ls[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),ls[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(ls),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)}}const ls=[new z,new z,new z,new z,new z,new z,new z,new z],xr=new z,zh=new yi,Za=new z,Ka=new z,Ja=new z,Gs=new z,Ws=new z,zo=new z,kc=new z,Fh=new z,kh=new z,Fo=new z;function ug(n,e,t,i,r){for(let s=0,o=n.length-3;s<=o;s+=3){Fo.fromArray(n,s);const a=r.x*Math.abs(Fo.x)+r.y*Math.abs(Fo.y)+r.z*Math.abs(Fo.z),u=e.dot(Fo),f=t.dot(Fo),h=i.dot(Fo);if(Math.max(-Math.max(u,f,h),Math.min(u,f,h))>a)return!1}return!0}const tP=new yi,Bc=new z,fg=new z;class ai{constructor(e=new z,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 i=this.center;t!==void 0?i.copy(t):tP.setFromPoints(e).getCenter(i);let r=0;for(let s=0,o=e.length;sthis.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t}getBoundingBox(e){return this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}applyMatrix4(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this}translate(e){return this.center.add(e),this}expandByPoint(e){if(this.isEmpty())return this.center.copy(e),this.radius=0,this;Bc.subVectors(e,this.center);const t=Bc.lengthSq();if(t>this.radius*this.radius){const i=Math.sqrt(t),r=(i-this.radius)*.5;this.center.addScaledVector(Bc,r/i),this.radius+=r}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):(fg.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(Bc.copy(e.center).add(fg)),this.expandByPoint(Bc.copy(e.center).sub(fg))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}}const cs=new z,hg=new z,Bh=new z,Xs=new z,dg=new z,Hh=new z,pg=new z;class Aa{constructor(e=new z,t=new z(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,cs)),this}closestPointToPoint(e,t){t.subVectors(e,this.origin);const i=t.dot(this.direction);return i<0?t.copy(this.origin):t.copy(this.origin).addScaledVector(this.direction,i)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){const t=cs.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(cs.copy(this.origin).addScaledVector(this.direction,t),cs.distanceToSquared(e))}distanceSqToSegment(e,t,i,r){hg.copy(e).add(t).multiplyScalar(.5),Bh.copy(t).sub(e).normalize(),Xs.copy(this.origin).sub(hg);const s=e.distanceTo(t)*.5,o=-this.direction.dot(Bh),a=Xs.dot(this.direction),u=-Xs.dot(Bh),f=Xs.lengthSq(),h=Math.abs(1-o*o);let d,p,v,y;if(h>0)if(d=o*u-a,p=o*a-u,y=s*h,d>=0)if(p>=-y)if(p<=y){const w=1/h;d*=w,p*=w,v=d*(d+o*p+2*a)+p*(o*d+p+2*u)+f}else p=s,d=Math.max(0,-(o*p+a)),v=-d*d+p*(p+2*u)+f;else p=-s,d=Math.max(0,-(o*p+a)),v=-d*d+p*(p+2*u)+f;else p<=-y?(d=Math.max(0,-(-o*s+a)),p=d>0?-s:Math.min(Math.max(-s,-u),s),v=-d*d+p*(p+2*u)+f):p<=y?(d=0,p=Math.min(Math.max(-s,-u),s),v=p*(p+2*u)+f):(d=Math.max(0,-(o*s+a)),p=d>0?s:Math.min(Math.max(-s,-u),s),v=-d*d+p*(p+2*u)+f);else p=o>0?-s:s,d=Math.max(0,-(o*p+a)),v=-d*d+p*(p+2*u)+f;return i&&i.copy(this.origin).addScaledVector(this.direction,d),r&&r.copy(hg).addScaledVector(Bh,p),v}intersectSphere(e,t){cs.subVectors(e.center,this.origin);const i=cs.dot(this.direction),r=cs.dot(cs)-i*i,s=e.radius*e.radius;if(r>s)return null;const o=Math.sqrt(s-r),a=i-o,u=i+o;return u<0?null:a<0?this.at(u,t):this.at(a,t)}intersectsSphere(e){return this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){const t=e.normal.dot(this.direction);if(t===0)return e.distanceToPoint(this.origin)===0?0:null;const i=-(this.origin.dot(e.normal)+e.constant)/t;return i>=0?i:null}intersectPlane(e,t){const i=this.distanceToPlane(e);return i===null?null:this.at(i,t)}intersectsPlane(e){const t=e.distanceToPoint(this.origin);return t===0||e.normal.dot(this.direction)*t<0}intersectBox(e,t){let i,r,s,o,a,u;const f=1/this.direction.x,h=1/this.direction.y,d=1/this.direction.z,p=this.origin;return f>=0?(i=(e.min.x-p.x)*f,r=(e.max.x-p.x)*f):(i=(e.max.x-p.x)*f,r=(e.min.x-p.x)*f),h>=0?(s=(e.min.y-p.y)*h,o=(e.max.y-p.y)*h):(s=(e.max.y-p.y)*h,o=(e.min.y-p.y)*h),i>o||s>r||((s>i||isNaN(i))&&(i=s),(o=0?(a=(e.min.z-p.z)*d,u=(e.max.z-p.z)*d):(a=(e.max.z-p.z)*d,u=(e.min.z-p.z)*d),i>u||a>r)||((a>i||i!==i)&&(i=a),(u=0?i:r,t)}intersectsBox(e){return this.intersectBox(e,cs)!==null}intersectTriangle(e,t,i,r,s){dg.subVectors(t,e),Hh.subVectors(i,e),pg.crossVectors(dg,Hh);let o=this.direction.dot(pg),a;if(o>0){if(r)return null;a=1}else if(o<0)a=-1,o=-o;else return null;Xs.subVectors(this.origin,e);const u=a*this.direction.dot(Hh.crossVectors(Xs,Hh));if(u<0)return null;const f=a*this.direction.dot(dg.cross(Xs));if(f<0||u+f>o)return null;const h=-a*Xs.dot(pg);return h<0?null:this.at(h/o,s)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}}class ft{constructor(e,t,i,r,s,o,a,u,f,h,d,p,v,y,w,S){ft.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],e!==void 0&&this.set(e,t,i,r,s,o,a,u,f,h,d,p,v,y,w,S)}set(e,t,i,r,s,o,a,u,f,h,d,p,v,y,w,S){const g=this.elements;return g[0]=e,g[4]=t,g[8]=i,g[12]=r,g[1]=s,g[5]=o,g[9]=a,g[13]=u,g[2]=f,g[6]=h,g[10]=d,g[14]=p,g[3]=v,g[7]=y,g[11]=w,g[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 ft().fromArray(this.elements)}copy(e){const t=this.elements,i=e.elements;return t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=i[3],t[4]=i[4],t[5]=i[5],t[6]=i[6],t[7]=i[7],t[8]=i[8],t[9]=i[9],t[10]=i[10],t[11]=i[11],t[12]=i[12],t[13]=i[13],t[14]=i[14],t[15]=i[15],this}copyPosition(e){const t=this.elements,i=e.elements;return t[12]=i[12],t[13]=i[13],t[14]=i[14],this}setFromMatrix3(e){const t=e.elements;return this.set(t[0],t[3],t[6],0,t[1],t[4],t[7],0,t[2],t[5],t[8],0,0,0,0,1),this}extractBasis(e,t,i){return e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),i.setFromMatrixColumn(this,2),this}makeBasis(e,t,i){return this.set(e.x,t.x,i.x,0,e.y,t.y,i.y,0,e.z,t.z,i.z,0,0,0,0,1),this}extractRotation(e){const t=this.elements,i=e.elements,r=1/Qa.setFromMatrixColumn(e,0).length(),s=1/Qa.setFromMatrixColumn(e,1).length(),o=1/Qa.setFromMatrixColumn(e,2).length();return t[0]=i[0]*r,t[1]=i[1]*r,t[2]=i[2]*r,t[3]=0,t[4]=i[4]*s,t[5]=i[5]*s,t[6]=i[6]*s,t[7]=0,t[8]=i[8]*o,t[9]=i[9]*o,t[10]=i[10]*o,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromEuler(e){const t=this.elements,i=e.x,r=e.y,s=e.z,o=Math.cos(i),a=Math.sin(i),u=Math.cos(r),f=Math.sin(r),h=Math.cos(s),d=Math.sin(s);if(e.order==="XYZ"){const p=o*h,v=o*d,y=a*h,w=a*d;t[0]=u*h,t[4]=-u*d,t[8]=f,t[1]=v+y*f,t[5]=p-w*f,t[9]=-a*u,t[2]=w-p*f,t[6]=y+v*f,t[10]=o*u}else if(e.order==="YXZ"){const p=u*h,v=u*d,y=f*h,w=f*d;t[0]=p+w*a,t[4]=y*a-v,t[8]=o*f,t[1]=o*d,t[5]=o*h,t[9]=-a,t[2]=v*a-y,t[6]=w+p*a,t[10]=o*u}else if(e.order==="ZXY"){const p=u*h,v=u*d,y=f*h,w=f*d;t[0]=p-w*a,t[4]=-o*d,t[8]=y+v*a,t[1]=v+y*a,t[5]=o*h,t[9]=w-p*a,t[2]=-o*f,t[6]=a,t[10]=o*u}else if(e.order==="ZYX"){const p=o*h,v=o*d,y=a*h,w=a*d;t[0]=u*h,t[4]=y*f-v,t[8]=p*f+w,t[1]=u*d,t[5]=w*f+p,t[9]=v*f-y,t[2]=-f,t[6]=a*u,t[10]=o*u}else if(e.order==="YZX"){const p=o*u,v=o*f,y=a*u,w=a*f;t[0]=u*h,t[4]=w-p*d,t[8]=y*d+v,t[1]=d,t[5]=o*h,t[9]=-a*h,t[2]=-f*h,t[6]=v*d+y,t[10]=p-w*d}else if(e.order==="XZY"){const p=o*u,v=o*f,y=a*u,w=a*f;t[0]=u*h,t[4]=-d,t[8]=f*h,t[1]=p*d+w,t[5]=o*h,t[9]=v*d-y,t[2]=y*d-v,t[6]=a*h,t[10]=w*d+p}return t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromQuaternion(e){return this.compose(nP,e,iP)}lookAt(e,t,i){const r=this.elements;return ki.subVectors(e,t),ki.lengthSq()===0&&(ki.z=1),ki.normalize(),js.crossVectors(i,ki),js.lengthSq()===0&&(Math.abs(i.z)===1?ki.x+=1e-4:ki.z+=1e-4,ki.normalize(),js.crossVectors(i,ki)),js.normalize(),Vh.crossVectors(ki,js),r[0]=js.x,r[4]=Vh.x,r[8]=ki.x,r[1]=js.y,r[5]=Vh.y,r[9]=ki.y,r[2]=js.z,r[6]=Vh.z,r[10]=ki.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const i=e.elements,r=t.elements,s=this.elements,o=i[0],a=i[4],u=i[8],f=i[12],h=i[1],d=i[5],p=i[9],v=i[13],y=i[2],w=i[6],S=i[10],g=i[14],x=i[3],M=i[7],T=i[11],P=i[15],C=r[0],L=r[4],D=r[8],b=r[12],R=r[1],k=r[5],q=r[9],oe=r[13],V=r[2],Q=r[6],te=r[10],ae=r[14],N=r[3],B=r[7],H=r[11],Y=r[15];return s[0]=o*C+a*R+u*V+f*N,s[4]=o*L+a*k+u*Q+f*B,s[8]=o*D+a*q+u*te+f*H,s[12]=o*b+a*oe+u*ae+f*Y,s[1]=h*C+d*R+p*V+v*N,s[5]=h*L+d*k+p*Q+v*B,s[9]=h*D+d*q+p*te+v*H,s[13]=h*b+d*oe+p*ae+v*Y,s[2]=y*C+w*R+S*V+g*N,s[6]=y*L+w*k+S*Q+g*B,s[10]=y*D+w*q+S*te+g*H,s[14]=y*b+w*oe+S*ae+g*Y,s[3]=x*C+M*R+T*V+P*N,s[7]=x*L+M*k+T*Q+P*B,s[11]=x*D+M*q+T*te+P*H,s[15]=x*b+M*oe+T*ae+P*Y,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[4]*=e,t[8]*=e,t[12]*=e,t[1]*=e,t[5]*=e,t[9]*=e,t[13]*=e,t[2]*=e,t[6]*=e,t[10]*=e,t[14]*=e,t[3]*=e,t[7]*=e,t[11]*=e,t[15]*=e,this}determinant(){const e=this.elements,t=e[0],i=e[4],r=e[8],s=e[12],o=e[1],a=e[5],u=e[9],f=e[13],h=e[2],d=e[6],p=e[10],v=e[14],y=e[3],w=e[7],S=e[11],g=e[15];return y*(+s*u*d-r*f*d-s*a*p+i*f*p+r*a*v-i*u*v)+w*(+t*u*v-t*f*p+s*o*p-r*o*v+r*f*h-s*u*h)+S*(+t*f*d-t*a*v-s*o*d+i*o*v+s*a*h-i*f*h)+g*(-r*a*h-t*u*d+t*a*p+r*o*d-i*o*p+i*u*h)}transpose(){const e=this.elements;let t;return t=e[1],e[1]=e[4],e[4]=t,t=e[2],e[2]=e[8],e[8]=t,t=e[6],e[6]=e[9],e[9]=t,t=e[3],e[3]=e[12],e[12]=t,t=e[7],e[7]=e[13],e[13]=t,t=e[11],e[11]=e[14],e[14]=t,this}setPosition(e,t,i){const r=this.elements;return e.isVector3?(r[12]=e.x,r[13]=e.y,r[14]=e.z):(r[12]=e,r[13]=t,r[14]=i),this}invert(){const e=this.elements,t=e[0],i=e[1],r=e[2],s=e[3],o=e[4],a=e[5],u=e[6],f=e[7],h=e[8],d=e[9],p=e[10],v=e[11],y=e[12],w=e[13],S=e[14],g=e[15],x=d*S*f-w*p*f+w*u*v-a*S*v-d*u*g+a*p*g,M=y*p*f-h*S*f-y*u*v+o*S*v+h*u*g-o*p*g,T=h*w*f-y*d*f+y*a*v-o*w*v-h*a*g+o*d*g,P=y*d*u-h*w*u-y*a*p+o*w*p+h*a*S-o*d*S,C=t*x+i*M+r*T+s*P;if(C===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const L=1/C;return e[0]=x*L,e[1]=(w*p*s-d*S*s-w*r*v+i*S*v+d*r*g-i*p*g)*L,e[2]=(a*S*s-w*u*s+w*r*f-i*S*f-a*r*g+i*u*g)*L,e[3]=(d*u*s-a*p*s-d*r*f+i*p*f+a*r*v-i*u*v)*L,e[4]=M*L,e[5]=(h*S*s-y*p*s+y*r*v-t*S*v-h*r*g+t*p*g)*L,e[6]=(y*u*s-o*S*s-y*r*f+t*S*f+o*r*g-t*u*g)*L,e[7]=(o*p*s-h*u*s+h*r*f-t*p*f-o*r*v+t*u*v)*L,e[8]=T*L,e[9]=(y*d*s-h*w*s-y*i*v+t*w*v+h*i*g-t*d*g)*L,e[10]=(o*w*s-y*a*s+y*i*f-t*w*f-o*i*g+t*a*g)*L,e[11]=(h*a*s-o*d*s-h*i*f+t*d*f+o*i*v-t*a*v)*L,e[12]=P*L,e[13]=(h*w*r-y*d*r+y*i*p-t*w*p-h*i*S+t*d*S)*L,e[14]=(y*a*r-o*w*r-y*i*u+t*w*u+o*i*S-t*a*S)*L,e[15]=(o*d*r-h*a*r+h*i*u-t*d*u-o*i*p+t*a*p)*L,this}scale(e){const t=this.elements,i=e.x,r=e.y,s=e.z;return t[0]*=i,t[4]*=r,t[8]*=s,t[1]*=i,t[5]*=r,t[9]*=s,t[2]*=i,t[6]*=r,t[10]*=s,t[3]*=i,t[7]*=r,t[11]*=s,this}getMaxScaleOnAxis(){const e=this.elements,t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],i=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],r=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,i,r))}makeTranslation(e,t,i){return e.isVector3?this.set(1,0,0,e.x,0,1,0,e.y,0,0,1,e.z,0,0,0,1):this.set(1,0,0,e,0,1,0,t,0,0,1,i,0,0,0,1),this}makeRotationX(e){const t=Math.cos(e),i=Math.sin(e);return this.set(1,0,0,0,0,t,-i,0,0,i,t,0,0,0,0,1),this}makeRotationY(e){const t=Math.cos(e),i=Math.sin(e);return this.set(t,0,i,0,0,1,0,0,-i,0,t,0,0,0,0,1),this}makeRotationZ(e){const t=Math.cos(e),i=Math.sin(e);return this.set(t,-i,0,0,i,t,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,t){const i=Math.cos(t),r=Math.sin(t),s=1-i,o=e.x,a=e.y,u=e.z,f=s*o,h=s*a;return this.set(f*o+i,f*a-r*u,f*u+r*a,0,f*a+r*u,h*a+i,h*u-r*o,0,f*u-r*a,h*u+r*o,s*u*u+i,0,0,0,0,1),this}makeScale(e,t,i){return this.set(e,0,0,0,0,t,0,0,0,0,i,0,0,0,0,1),this}makeShear(e,t,i,r,s,o){return this.set(1,i,s,0,e,1,o,0,t,r,1,0,0,0,0,1),this}compose(e,t,i){const r=this.elements,s=t._x,o=t._y,a=t._z,u=t._w,f=s+s,h=o+o,d=a+a,p=s*f,v=s*h,y=s*d,w=o*h,S=o*d,g=a*d,x=u*f,M=u*h,T=u*d,P=i.x,C=i.y,L=i.z;return r[0]=(1-(w+g))*P,r[1]=(v+T)*P,r[2]=(y-M)*P,r[3]=0,r[4]=(v-T)*C,r[5]=(1-(p+g))*C,r[6]=(S+x)*C,r[7]=0,r[8]=(y+M)*L,r[9]=(S-x)*L,r[10]=(1-(p+w))*L,r[11]=0,r[12]=e.x,r[13]=e.y,r[14]=e.z,r[15]=1,this}decompose(e,t,i){const r=this.elements;let s=Qa.set(r[0],r[1],r[2]).length();const o=Qa.set(r[4],r[5],r[6]).length(),a=Qa.set(r[8],r[9],r[10]).length();this.determinant()<0&&(s=-s),e.x=r[12],e.y=r[13],e.z=r[14],Sr.copy(this);const f=1/s,h=1/o,d=1/a;return Sr.elements[0]*=f,Sr.elements[1]*=f,Sr.elements[2]*=f,Sr.elements[4]*=h,Sr.elements[5]*=h,Sr.elements[6]*=h,Sr.elements[8]*=d,Sr.elements[9]*=d,Sr.elements[10]*=d,t.setFromRotationMatrix(Sr),i.x=s,i.y=o,i.z=a,this}makePerspective(e,t,i,r,s,o,a=br){const u=this.elements,f=2*s/(t-e),h=2*s/(i-r),d=(t+e)/(t-e),p=(i+r)/(i-r);let v,y;if(a===br)v=-(o+s)/(o-s),y=-2*o*s/(o-s);else if(a===Jl)v=-o/(o-s),y=-o*s/(o-s);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+a);return u[0]=f,u[4]=0,u[8]=d,u[12]=0,u[1]=0,u[5]=h,u[9]=p,u[13]=0,u[2]=0,u[6]=0,u[10]=v,u[14]=y,u[3]=0,u[7]=0,u[11]=-1,u[15]=0,this}makeOrthographic(e,t,i,r,s,o,a=br){const u=this.elements,f=1/(t-e),h=1/(i-r),d=1/(o-s),p=(t+e)*f,v=(i+r)*h;let y,w;if(a===br)y=(o+s)*d,w=-2*d;else if(a===Jl)y=s*d,w=-1*d;else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+a);return u[0]=2*f,u[4]=0,u[8]=0,u[12]=-p,u[1]=0,u[5]=2*h,u[9]=0,u[13]=-v,u[2]=0,u[6]=0,u[10]=w,u[14]=-y,u[3]=0,u[7]=0,u[11]=0,u[15]=1,this}equals(e){const t=this.elements,i=e.elements;for(let r=0;r<16;r++)if(t[r]!==i[r])return!1;return!0}fromArray(e,t=0){for(let i=0;i<16;i++)this.elements[i]=e[i+t];return this}toArray(e=[],t=0){const i=this.elements;return e[t]=i[0],e[t+1]=i[1],e[t+2]=i[2],e[t+3]=i[3],e[t+4]=i[4],e[t+5]=i[5],e[t+6]=i[6],e[t+7]=i[7],e[t+8]=i[8],e[t+9]=i[9],e[t+10]=i[10],e[t+11]=i[11],e[t+12]=i[12],e[t+13]=i[13],e[t+14]=i[14],e[t+15]=i[15],e}}const Qa=new z,Sr=new ft,nP=new z(0,0,0),iP=new z(1,1,1),js=new z,Vh=new z,ki=new z,SS=new ft,MS=new oi;class pf{constructor(e=0,t=0,i=0,r=pf.DEFAULT_ORDER){this.isEuler=!0,this._x=e,this._y=t,this._z=i,this._order=r}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get order(){return this._order}set order(e){this._order=e,this._onChangeCallback()}set(e,t,i,r=this._order){return this._x=e,this._y=t,this._z=i,this._order=r,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this}setFromRotationMatrix(e,t=this._order,i=!0){const r=e.elements,s=r[0],o=r[4],a=r[8],u=r[1],f=r[5],h=r[9],d=r[2],p=r[6],v=r[10];switch(t){case"XYZ":this._y=Math.asin(dn(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(-h,v),this._z=Math.atan2(-o,s)):(this._x=Math.atan2(p,f),this._z=0);break;case"YXZ":this._x=Math.asin(-dn(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(a,v),this._z=Math.atan2(u,f)):(this._y=Math.atan2(-d,s),this._z=0);break;case"ZXY":this._x=Math.asin(dn(p,-1,1)),Math.abs(p)<.9999999?(this._y=Math.atan2(-d,v),this._z=Math.atan2(-o,f)):(this._y=0,this._z=Math.atan2(u,s));break;case"ZYX":this._y=Math.asin(-dn(d,-1,1)),Math.abs(d)<.9999999?(this._x=Math.atan2(p,v),this._z=Math.atan2(u,s)):(this._x=0,this._z=Math.atan2(-o,f));break;case"YZX":this._z=Math.asin(dn(u,-1,1)),Math.abs(u)<.9999999?(this._x=Math.atan2(-h,f),this._y=Math.atan2(-d,s)):(this._x=0,this._y=Math.atan2(a,v));break;case"XZY":this._z=Math.asin(-dn(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(p,f),this._y=Math.atan2(a,s)):(this._x=Math.atan2(-h,v),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+t)}return this._order=t,i===!0&&this._onChangeCallback(),this}setFromQuaternion(e,t,i){return SS.makeRotationFromQuaternion(e),this.setFromRotationMatrix(SS,t,i)}setFromVector3(e,t=this._order){return this.set(e.x,e.y,e.z,t)}reorder(e){return MS.setFromEuler(this),this.setFromQuaternion(MS,e)}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order}fromArray(e){return this._x=e[0],this._y=e[1],this._z=e[2],e[3]!==void 0&&(this._order=e[3]),this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._order,e}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}pf.DEFAULT_ORDER="XYZ";class fa{constructor(){this.mask=1}set(e){this.mask=(1<>>0}enable(e){this.mask|=1<1){for(let t=0;t1){for(let i=0;i0&&(r.userData=this.userData),r.layers=this.layers.mask,r.matrix=this.matrix.toArray(),r.up=this.up.toArray(),this.matrixAutoUpdate===!1&&(r.matrixAutoUpdate=!1),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.visibility=this._visibility,r.active=this._active,r.bounds=this._bounds.map(a=>({boxInitialized:a.boxInitialized,boxMin:a.box.min.toArray(),boxMax:a.box.max.toArray(),sphereInitialized:a.sphereInitialized,sphereRadius:a.sphere.radius,sphereCenter:a.sphere.center.toArray()})),r.maxGeometryCount=this._maxGeometryCount,r.maxVertexCount=this._maxVertexCount,r.maxIndexCount=this._maxIndexCount,r.geometryInitialized=this._geometryInitialized,r.geometryCount=this._geometryCount,r.matricesTexture=this._matricesTexture.toJSON(e),this.boundingSphere!==null&&(r.boundingSphere={center:r.boundingSphere.center.toArray(),radius:r.boundingSphere.radius}),this.boundingBox!==null&&(r.boundingBox={min:r.boundingBox.min.toArray(),max:r.boundingBox.max.toArray()}));function s(a,u){return a[u.uuid]===void 0&&(a[u.uuid]=u.toJSON(e)),u.uuid}if(this.isScene)this.background&&(this.background.isColor?r.background=this.background.toJSON():this.background.isTexture&&(r.background=this.background.toJSON(e).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(r.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){r.geometry=s(e.geometries,this.geometry);const a=this.geometry.parameters;if(a!==void 0&&a.shapes!==void 0){const u=a.shapes;if(Array.isArray(u))for(let f=0,h=u.length;f0){r.children=[];for(let a=0;a0){r.animations=[];for(let a=0;a0&&(i.geometries=a),u.length>0&&(i.materials=u),f.length>0&&(i.textures=f),h.length>0&&(i.images=h),d.length>0&&(i.shapes=d),p.length>0&&(i.skeletons=p),v.length>0&&(i.animations=v),y.length>0&&(i.nodes=y)}return i.object=r,i;function o(a){const u=[];for(const f in a){const h=a[f];delete h.metadata,u.push(h)}return u}}clone(e){return new this.constructor().copy(this,e)}copy(e,t=!0){if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldAutoUpdate=e.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.animations=e.animations.slice(),this.userData=JSON.parse(JSON.stringify(e.userData)),t===!0)for(let i=0;i0?r.multiplyScalar(1/Math.sqrt(s)):r.set(0,0,0)}static getBarycoord(e,t,i,r,s){Mr.subVectors(r,t),fs.subVectors(i,t),mg.subVectors(e,t);const o=Mr.dot(Mr),a=Mr.dot(fs),u=Mr.dot(mg),f=fs.dot(fs),h=fs.dot(mg),d=o*f-a*a;if(d===0)return s.set(0,0,0),null;const p=1/d,v=(f*u-a*h)*p,y=(o*h-a*u)*p;return s.set(1-v-y,y,v)}static containsPoint(e,t,i,r){return this.getBarycoord(e,t,i,r,hs)===null?!1:hs.x>=0&&hs.y>=0&&hs.x+hs.y<=1}static getUV(e,t,i,r,s,o,a,u){return Wh===!1&&(console.warn("THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."),Wh=!0),this.getInterpolation(e,t,i,r,s,o,a,u)}static getInterpolation(e,t,i,r,s,o,a,u){return this.getBarycoord(e,t,i,r,hs)===null?(u.x=0,u.y=0,"z"in u&&(u.z=0),"w"in u&&(u.w=0),null):(u.setScalar(0),u.addScaledVector(s,hs.x),u.addScaledVector(o,hs.y),u.addScaledVector(a,hs.z),u)}static isFrontFacing(e,t,i,r){return Mr.subVectors(i,t),fs.subVectors(e,t),Mr.cross(fs).dot(r)<0}set(e,t,i){return this.a.copy(e),this.b.copy(t),this.c.copy(i),this}setFromPointsAndIndices(e,t,i,r){return this.a.copy(e[t]),this.b.copy(e[i]),this.c.copy(e[r]),this}setFromAttributeAndIndices(e,t,i,r){return this.a.fromBufferAttribute(e,t),this.b.fromBufferAttribute(e,i),this.c.fromBufferAttribute(e,r),this}clone(){return new this.constructor().copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return Mr.subVectors(this.c,this.b),fs.subVectors(this.a,this.b),Mr.cross(fs).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return Ci.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return Ci.getBarycoord(e,this.a,this.b,this.c,t)}getUV(e,t,i,r,s){return Wh===!1&&(console.warn("THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."),Wh=!0),Ci.getInterpolation(e,this.a,this.b,this.c,t,i,r,s)}getInterpolation(e,t,i,r,s){return Ci.getInterpolation(e,this.a,this.b,this.c,t,i,r,s)}containsPoint(e){return Ci.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return Ci.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,t){const i=this.a,r=this.b,s=this.c;let o,a;el.subVectors(r,i),tl.subVectors(s,i),gg.subVectors(e,i);const u=el.dot(gg),f=tl.dot(gg);if(u<=0&&f<=0)return t.copy(i);vg.subVectors(e,r);const h=el.dot(vg),d=tl.dot(vg);if(h>=0&&d<=h)return t.copy(r);const p=u*d-h*f;if(p<=0&&u>=0&&h<=0)return o=u/(u-h),t.copy(i).addScaledVector(el,o);yg.subVectors(e,s);const v=el.dot(yg),y=tl.dot(yg);if(y>=0&&v<=y)return t.copy(s);const w=v*f-u*y;if(w<=0&&f>=0&&y<=0)return a=f/(f-y),t.copy(i).addScaledVector(tl,a);const S=h*y-v*d;if(S<=0&&d-h>=0&&v-y>=0)return CS.subVectors(s,r),a=(d-h)/(d-h+(v-y)),t.copy(r).addScaledVector(CS,a);const g=1/(S+w+p);return o=w*g,a=p*g,t.copy(i).addScaledVector(el,o).addScaledVector(tl,a)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}const NT={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},Ys={h:0,s:0,l:0},Xh={h:0,s:0,l:0};function _g(n,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?n+(e-n)*6*t:t<1/2?e:t<2/3?n+(e-n)*6*(2/3-t):n}class Be{constructor(e,t,i){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(e,t,i)}set(e,t,i){if(t===void 0&&i===void 0){const r=e;r&&r.isColor?this.copy(r):typeof r=="number"?this.setHex(r):typeof r=="string"&&this.setStyle(r)}else this.setRGB(e,t,i);return this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,t=Cn){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,Ft.toWorkingColorSpace(this,t),this}setRGB(e,t,i,r=Ft.workingColorSpace){return this.r=e,this.g=t,this.b=i,Ft.toWorkingColorSpace(this,r),this}setHSL(e,t,i,r=Ft.workingColorSpace){if(e=Ky(e,1),t=dn(t,0,1),i=dn(i,0,1),t===0)this.r=this.g=this.b=i;else{const s=i<=.5?i*(1+t):i+t-i*t,o=2*i-s;this.r=_g(o,s,e+1/3),this.g=_g(o,s,e),this.b=_g(o,s,e-1/3)}return Ft.toWorkingColorSpace(this,r),this}setStyle(e,t=Cn){function i(s){s!==void 0&&parseFloat(s)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}let r;if(r=/^(\w+)\(([^\)]*)\)/.exec(e)){let s;const o=r[1],a=r[2];switch(o){case"rgb":case"rgba":if(s=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return i(s[4]),this.setRGB(Math.min(255,parseInt(s[1],10))/255,Math.min(255,parseInt(s[2],10))/255,Math.min(255,parseInt(s[3],10))/255,t);if(s=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return i(s[4]),this.setRGB(Math.min(100,parseInt(s[1],10))/100,Math.min(100,parseInt(s[2],10))/100,Math.min(100,parseInt(s[3],10))/100,t);break;case"hsl":case"hsla":if(s=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return i(s[4]),this.setHSL(parseFloat(s[1])/360,parseFloat(s[2])/100,parseFloat(s[3])/100,t);break;default:console.warn("THREE.Color: Unknown color model "+e)}}else if(r=/^\#([A-Fa-f\d]+)$/.exec(e)){const s=r[1],o=s.length;if(o===3)return this.setRGB(parseInt(s.charAt(0),16)/15,parseInt(s.charAt(1),16)/15,parseInt(s.charAt(2),16)/15,t);if(o===6)return this.setHex(parseInt(s,16),t);console.warn("THREE.Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,t);return this}setColorName(e,t=Cn){const i=NT[e.toLowerCase()];return i!==void 0?this.setHex(i,t):console.warn("THREE.Color: Unknown color "+e),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copySRGBToLinear(e){return this.r=Gl(e.r),this.g=Gl(e.g),this.b=Gl(e.b),this}copyLinearToSRGB(e){return this.r=ag(e.r),this.g=ag(e.g),this.b=ag(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=Cn){return Ft.fromWorkingColorSpace(ti.copy(this),e),Math.round(dn(ti.r*255,0,255))*65536+Math.round(dn(ti.g*255,0,255))*256+Math.round(dn(ti.b*255,0,255))}getHexString(e=Cn){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t=Ft.workingColorSpace){Ft.fromWorkingColorSpace(ti.copy(this),t);const i=ti.r,r=ti.g,s=ti.b,o=Math.max(i,r,s),a=Math.min(i,r,s);let u,f;const h=(a+o)/2;if(a===o)u=0,f=0;else{const d=o-a;switch(f=h<=.5?d/(o+a):d/(2-o-a),o){case i:u=(r-s)/d+(r0!=e>0&&this.version++,this._alphaTest=e}onBuild(){}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(e!==void 0)for(const t in e){const i=e[t];if(i===void 0){console.warn(`THREE.Material: parameter '${t}' has value of undefined.`);continue}const r=this[t];if(r===void 0){console.warn(`THREE.Material: '${t}' is not a property of THREE.${this.type}.`);continue}r&&r.isColor?r.set(i):r&&r.isVector3&&i&&i.isVector3?r.copy(i):this[t]=i}}toJSON(e){const t=e===void 0||typeof e=="string";t&&(e={textures:{},images:{}});const i={metadata:{version:4.6,type:"Material",generator:"Material.toJSON"}};i.uuid=this.uuid,i.type=this.type,this.name!==""&&(i.name=this.name),this.color&&this.color.isColor&&(i.color=this.color.getHex()),this.roughness!==void 0&&(i.roughness=this.roughness),this.metalness!==void 0&&(i.metalness=this.metalness),this.sheen!==void 0&&(i.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(i.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(i.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(i.emissive=this.emissive.getHex()),this.emissiveIntensity&&this.emissiveIntensity!==1&&(i.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(i.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(i.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(i.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(i.shininess=this.shininess),this.clearcoat!==void 0&&(i.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(i.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(i.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(i.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(i.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,i.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.iridescence!==void 0&&(i.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(i.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(i.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(i.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(i.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),this.anisotropy!==void 0&&(i.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(i.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(i.anisotropyMap=this.anisotropyMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(i.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(i.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(i.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(i.lightMap=this.lightMap.toJSON(e).uuid,i.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(i.aoMap=this.aoMap.toJSON(e).uuid,i.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(i.bumpMap=this.bumpMap.toJSON(e).uuid,i.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(i.normalMap=this.normalMap.toJSON(e).uuid,i.normalMapType=this.normalMapType,i.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(i.displacementMap=this.displacementMap.toJSON(e).uuid,i.displacementScale=this.displacementScale,i.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(i.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(i.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(i.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(i.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(i.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(i.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(i.envMap=this.envMap.toJSON(e).uuid,this.combine!==void 0&&(i.combine=this.combine)),this.envMapIntensity!==void 0&&(i.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(i.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(i.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(i.gradientMap=this.gradientMap.toJSON(e).uuid),this.transmission!==void 0&&(i.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(i.transmissionMap=this.transmissionMap.toJSON(e).uuid),this.thickness!==void 0&&(i.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(i.thicknessMap=this.thicknessMap.toJSON(e).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(i.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(i.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(i.size=this.size),this.shadowSide!==null&&(i.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(i.sizeAttenuation=this.sizeAttenuation),this.blending!==ca&&(i.blending=this.blending),this.side!==Rs&&(i.side=this.side),this.vertexColors===!0&&(i.vertexColors=!0),this.opacity<1&&(i.opacity=this.opacity),this.transparent===!0&&(i.transparent=!0),this.blendSrc!==Tp&&(i.blendSrc=this.blendSrc),this.blendDst!==Ap&&(i.blendDst=this.blendDst),this.blendEquation!==eo&&(i.blendEquation=this.blendEquation),this.blendSrcAlpha!==null&&(i.blendSrcAlpha=this.blendSrcAlpha),this.blendDstAlpha!==null&&(i.blendDstAlpha=this.blendDstAlpha),this.blendEquationAlpha!==null&&(i.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(i.blendColor=this.blendColor.getHex()),this.blendAlpha!==0&&(i.blendAlpha=this.blendAlpha),this.depthFunc!==Ou&&(i.depthFunc=this.depthFunc),this.depthTest===!1&&(i.depthTest=this.depthTest),this.depthWrite===!1&&(i.depthWrite=this.depthWrite),this.colorWrite===!1&&(i.colorWrite=this.colorWrite),this.stencilWriteMask!==255&&(i.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==Tv&&(i.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(i.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(i.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==Jo&&(i.stencilFail=this.stencilFail),this.stencilZFail!==Jo&&(i.stencilZFail=this.stencilZFail),this.stencilZPass!==Jo&&(i.stencilZPass=this.stencilZPass),this.stencilWrite===!0&&(i.stencilWrite=this.stencilWrite),this.rotation!==void 0&&this.rotation!==0&&(i.rotation=this.rotation),this.polygonOffset===!0&&(i.polygonOffset=!0),this.polygonOffsetFactor!==0&&(i.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(i.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(i.linewidth=this.linewidth),this.dashSize!==void 0&&(i.dashSize=this.dashSize),this.gapSize!==void 0&&(i.gapSize=this.gapSize),this.scale!==void 0&&(i.scale=this.scale),this.dithering===!0&&(i.dithering=!0),this.alphaTest>0&&(i.alphaTest=this.alphaTest),this.alphaHash===!0&&(i.alphaHash=!0),this.alphaToCoverage===!0&&(i.alphaToCoverage=!0),this.premultipliedAlpha===!0&&(i.premultipliedAlpha=!0),this.forceSinglePass===!0&&(i.forceSinglePass=!0),this.wireframe===!0&&(i.wireframe=!0),this.wireframeLinewidth>1&&(i.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(i.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(i.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(i.flatShading=!0),this.visible===!1&&(i.visible=!1),this.toneMapped===!1&&(i.toneMapped=!1),this.fog===!1&&(i.fog=!1),Object.keys(this.userData).length>0&&(i.userData=this.userData);function r(s){const o=[];for(const a in s){const u=s[a];delete u.metadata,o.push(u)}return o}if(t){const s=r(e.textures),o=r(e.images);s.length>0&&(i.textures=s),o.length>0&&(i.images=o)}return i}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 i=null;if(t!==null){const r=t.length;i=new Array(r);for(let s=0;s!==r;++s)i[s]=t[s].clone()}return this.clippingPlanes=i,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaHash=e.alphaHash,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.forceSinglePass=e.forceSinglePass,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++}}class To extends Yn{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new Be(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=hf,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.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}}const vs=uP();function uP(){const n=new ArrayBuffer(4),e=new Float32Array(n),t=new Uint32Array(n),i=new Uint32Array(512),r=new Uint32Array(512);for(let u=0;u<256;++u){const f=u-127;f<-27?(i[u]=0,i[u|256]=32768,r[u]=24,r[u|256]=24):f<-14?(i[u]=1024>>-f-14,i[u|256]=1024>>-f-14|32768,r[u]=-f-1,r[u|256]=-f-1):f<=15?(i[u]=f+15<<10,i[u|256]=f+15<<10|32768,r[u]=13,r[u|256]=13):f<128?(i[u]=31744,i[u|256]=64512,r[u]=24,r[u|256]=24):(i[u]=31744,i[u|256]=64512,r[u]=13,r[u|256]=13)}const s=new Uint32Array(2048),o=new Uint32Array(64),a=new Uint32Array(64);for(let u=1;u<1024;++u){let f=u<<13,h=0;for(;!(f&8388608);)f<<=1,h-=8388608;f&=-8388609,h+=947912704,s[u]=f|h}for(let u=1024;u<2048;++u)s[u]=939524096+(u-1024<<13);for(let u=1;u<31;++u)o[u]=u<<23;o[31]=1199570944,o[32]=2147483648;for(let u=33;u<63;++u)o[u]=2147483648+(u-32<<23);o[63]=3347054592;for(let u=1;u<64;++u)u!==32&&(a[u]=1024);return{floatView:e,uint32View:t,baseTable:i,shiftTable:r,mantissaTable:s,exponentTable:o,offsetTable:a}}function Ti(n){Math.abs(n)>65504&&console.warn("THREE.DataUtils.toHalfFloat(): Value out of range."),n=dn(n,-65504,65504),vs.floatView[0]=n;const e=vs.uint32View[0],t=e>>23&511;return vs.baseTable[t]+((e&8388607)>>vs.shiftTable[t])}function nu(n){const e=n>>10;return vs.uint32View[0]=vs.mantissaTable[vs.offsetTable[e]+(n&1023)]+vs.exponentTable[e],vs.floatView[0]}const fP={toHalfFloat:Ti,fromHalfFloat:nu},wn=new z,jh=new de;class Ht{constructor(e,t,i=!1){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,this.name="",this.array=e,this.itemSize=t,this.count=e!==void 0?e.length/t:0,this.normalized=i,this.usage=Yu,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.gpuType=hr,this.version=0}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}get updateRange(){return console.warn("THREE.BufferAttribute: updateRange() is deprecated and will be removed in r169. Use addUpdateRange() instead."),this._updateRange}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,i){e*=this.itemSize,i*=t.itemSize;for(let r=0,s=this.itemSize;r0&&(e.userData=this.userData),this.parameters!==void 0){const u=this.parameters;for(const f in u)u[f]!==void 0&&(e[f]=u[f]);return e}e.data={attributes:{}};const t=this.index;t!==null&&(e.data.index={type:t.array.constructor.name,array:Array.prototype.slice.call(t.array)});const i=this.attributes;for(const u in i){const f=i[u];e.data.attributes[u]=f.toJSON(e.data)}const r={};let s=!1;for(const u in this.morphAttributes){const f=this.morphAttributes[u],h=[];for(let d=0,p=f.length;d0&&(r[u]=h,s=!0)}s&&(e.data.morphAttributes=r,e.data.morphTargetsRelative=this.morphTargetsRelative);const o=this.groups;o.length>0&&(e.data.groups=JSON.parse(JSON.stringify(o)));const a=this.boundingSphere;return a!==null&&(e.data.boundingSphere={center:a.center.toArray(),radius:a.radius}),e}clone(){return new this.constructor().copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const t={};this.name=e.name;const i=e.index;i!==null&&this.setIndex(i.clone(t));const r=e.attributes;for(const f in r){const h=r[f];this.setAttribute(f,h.clone(t))}const s=e.morphAttributes;for(const f in s){const h=[],d=s[f];for(let p=0,v=d.length;p0){const r=t[i[0]];if(r!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,o=r.length;s(e.far-e.near)**2))&&(bS.copy(s).invert(),ko.copy(e.ray).applyMatrix4(bS),!(i.boundingBox!==null&&ko.intersectsBox(i.boundingBox)===!1)&&this._computeIntersections(e,t,ko)))}_computeIntersections(e,t,i){let r;const s=this.geometry,o=this.material,a=s.index,u=s.attributes.position,f=s.attributes.uv,h=s.attributes.uv1,d=s.attributes.normal,p=s.groups,v=s.drawRange;if(a!==null)if(Array.isArray(o))for(let y=0,w=p.length;yt.far?null:{distance:f,point:$h.clone(),object:n}}function ed(n,e,t,i,r,s,o,a,u,f){n.getVertexPosition(a,il),n.getVertexPosition(u,rl),n.getVertexPosition(f,sl);const h=xP(n,e,t,i,il,rl,sl,Qh);if(h){r&&(Zh.fromBufferAttribute(r,a),Kh.fromBufferAttribute(r,u),Jh.fromBufferAttribute(r,f),h.uv=Ci.getInterpolation(Qh,il,rl,sl,Zh,Kh,Jh,new de)),s&&(Zh.fromBufferAttribute(s,a),Kh.fromBufferAttribute(s,u),Jh.fromBufferAttribute(s,f),h.uv1=Ci.getInterpolation(Qh,il,rl,sl,Zh,Kh,Jh,new de),h.uv2=h.uv1),o&&(PS.fromBufferAttribute(o,a),LS.fromBufferAttribute(o,u),IS.fromBufferAttribute(o,f),h.normal=Ci.getInterpolation(Qh,il,rl,sl,PS,LS,IS,new z),h.normal.dot(i.direction)>0&&h.normal.multiplyScalar(-1));const d={a,b:u,c:f,normal:new z,materialIndex:0};Ci.getNormal(il,rl,sl,d.normal),h.face=d}return h}class Ca extends St{constructor(e=1,t=1,i=1,r=1,s=1,o=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:t,depth:i,widthSegments:r,heightSegments:s,depthSegments:o};const a=this;r=Math.floor(r),s=Math.floor(s),o=Math.floor(o);const u=[],f=[],h=[],d=[];let p=0,v=0;y("z","y","x",-1,-1,i,t,e,o,s,0),y("z","y","x",1,-1,i,t,-e,o,s,1),y("x","z","y",1,1,e,i,t,r,o,2),y("x","z","y",1,-1,e,i,-t,r,o,3),y("x","y","z",1,-1,e,t,i,r,s,4),y("x","y","z",-1,-1,e,t,-i,r,s,5),this.setIndex(u),this.setAttribute("position",new qe(f,3)),this.setAttribute("normal",new qe(h,3)),this.setAttribute("uv",new qe(d,2));function y(w,S,g,x,M,T,P,C,L,D,b){const R=T/L,k=P/D,q=T/2,oe=P/2,V=C/2,Q=L+1,te=D+1;let ae=0,N=0;const B=new z;for(let H=0;H0?1:-1,h.push(B.x,B.y,B.z),d.push(J/L),d.push(1-H/D),ae+=1}}for(let H=0;H0&&(t.defines=this.defines),t.vertexShader=this.vertexShader,t.fragmentShader=this.fragmentShader,t.lights=this.lights,t.clipping=this.clipping;const i={};for(const r in this.extensions)this.extensions[r]===!0&&(i[r]=!0);return Object.keys(i).length>0&&(t.extensions=i),t}}class mf extends Ot{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new ft,this.projectionMatrix=new ft,this.projectionMatrixInverse=new ft,this.coordinateSystem=br}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.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(e,t){super.updateWorldMatrix(e,t),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return new this.constructor().copy(this)}}let pn=class extends mf{constructor(e=50,t=1,i=.1,r=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=e,this.zoom=1,this.near=i,this.far=r,this.focus=10,this.aspect=t,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.fov=e.fov,this.zoom=e.zoom,this.near=e.near,this.far=e.far,this.focus=e.focus,this.aspect=e.aspect,this.view=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=Ql*2*Math.atan(t),this.updateProjectionMatrix()}getFocalLength(){const e=Math.tan(ua*.5*this.fov);return .5*this.getFilmHeight()/e}getEffectiveFOV(){return Ql*2*Math.atan(Math.tan(ua*.5*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}setViewOffset(e,t,i,r,s,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=i,this.view.offsetY=r,this.view.width=s,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(ua*.5*this.fov)/this.zoom,i=2*t,r=this.aspect*i,s=-.5*r;const o=this.view;if(this.view!==null&&this.view.enabled){const u=o.fullWidth,f=o.fullHeight;s+=o.offsetX*r/u,t-=o.offsetY*i/f,r*=o.width/u,i*=o.height/f}const a=this.filmOffset;a!==0&&(s+=e*a/this.getFilmWidth()),this.projectionMatrix.makePerspective(s,s+r,t,t-i,e,this.far,this.coordinateSystem),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}};const ol=-90,al=1;class zT extends Ot{constructor(e,t,i){super(),this.type="CubeCamera",this.renderTarget=i,this.coordinateSystem=null,this.activeMipmapLevel=0;const r=new pn(ol,al,e,t);r.layers=this.layers,this.add(r);const s=new pn(ol,al,e,t);s.layers=this.layers,this.add(s);const o=new pn(ol,al,e,t);o.layers=this.layers,this.add(o);const a=new pn(ol,al,e,t);a.layers=this.layers,this.add(a);const u=new pn(ol,al,e,t);u.layers=this.layers,this.add(u);const f=new pn(ol,al,e,t);f.layers=this.layers,this.add(f)}updateCoordinateSystem(){const e=this.coordinateSystem,t=this.children.concat(),[i,r,s,o,a,u]=t;for(const f of t)this.remove(f);if(e===br)i.up.set(0,1,0),i.lookAt(1,0,0),r.up.set(0,1,0),r.lookAt(-1,0,0),s.up.set(0,0,-1),s.lookAt(0,1,0),o.up.set(0,0,1),o.lookAt(0,-1,0),a.up.set(0,1,0),a.lookAt(0,0,1),u.up.set(0,1,0),u.lookAt(0,0,-1);else if(e===Jl)i.up.set(0,-1,0),i.lookAt(-1,0,0),r.up.set(0,-1,0),r.lookAt(1,0,0),s.up.set(0,0,1),s.lookAt(0,1,0),o.up.set(0,0,-1),o.lookAt(0,-1,0),a.up.set(0,-1,0),a.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 f of t)this.add(f),f.updateMatrixWorld()}update(e,t){this.parent===null&&this.updateMatrixWorld();const{renderTarget:i,activeMipmapLevel:r}=this;this.coordinateSystem!==e.coordinateSystem&&(this.coordinateSystem=e.coordinateSystem,this.updateCoordinateSystem());const[s,o,a,u,f,h]=this.children,d=e.getRenderTarget(),p=e.getActiveCubeFace(),v=e.getActiveMipmapLevel(),y=e.xr.enabled;e.xr.enabled=!1;const w=i.texture.generateMipmaps;i.texture.generateMipmaps=!1,e.setRenderTarget(i,0,r),e.render(t,s),e.setRenderTarget(i,1,r),e.render(t,o),e.setRenderTarget(i,2,r),e.render(t,a),e.setRenderTarget(i,3,r),e.render(t,u),e.setRenderTarget(i,4,r),e.render(t,f),i.texture.generateMipmaps=w,e.setRenderTarget(i,5,r),e.render(t,h),e.setRenderTarget(d,p,v),e.xr.enabled=y,i.texture.needsPMREMUpdate=!0}}class gf extends mn{constructor(e,t,i,r,s,o,a,u,f,h){e=e!==void 0?e:[],t=t!==void 0?t:Ps,super(e,t,i,r,s,o,a,u,f,h),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(e){this.image=e}}class OT extends gr{constructor(e=1,t={}){super(e,e,t),this.isWebGLCubeRenderTarget=!0;const i={width:e,height:e,depth:1},r=[i,i,i,i,i,i];t.encoding!==void 0&&(mu("THREE.WebGLCubeRenderTarget: option.encoding has been replaced by option.colorSpace."),t.colorSpace=t.encoding===mo?Cn:Gi),this.texture=new gf(r,t.mapping,t.wrapS,t.wrapT,t.magFilter,t.minFilter,t.format,t.type,t.anisotropy,t.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=t.generateMipmaps!==void 0?t.generateMipmaps:!1,this.texture.minFilter=t.minFilter!==void 0?t.minFilter:sn}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 i={uniforms:{tEquirect:{value:null}},vertexShader:` +}`;class $r extends Yn{constructor(e){super(),this.isShaderMaterial=!0,this.type="ShaderMaterial",this.defines={},this.uniforms={},this.uniformsGroups=[],this.vertexShader=MP,this.fragmentShader=wP,this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!1,this.forceSinglePass=!0,this.extensions={derivatives:!1,fragDepth:!1,drawBuffers:!1,shaderTextureLOD:!1,clipCullDistance:!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=$l(e.uniforms),this.uniformsGroups=SP(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}toJSON(e){const t=super.toJSON(e);t.glslVersion=this.glslVersion,t.uniforms={};for(const r in this.uniforms){const o=this.uniforms[r].value;o&&o.isTexture?t.uniforms[r]={type:"t",value:o.toJSON(e).uuid}:o&&o.isColor?t.uniforms[r]={type:"c",value:o.getHex()}:o&&o.isVector2?t.uniforms[r]={type:"v2",value:o.toArray()}:o&&o.isVector3?t.uniforms[r]={type:"v3",value:o.toArray()}:o&&o.isVector4?t.uniforms[r]={type:"v4",value:o.toArray()}:o&&o.isMatrix3?t.uniforms[r]={type:"m3",value:o.toArray()}:o&&o.isMatrix4?t.uniforms[r]={type:"m4",value:o.toArray()}:t.uniforms[r]={value:o}}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 i={};for(const r in this.extensions)this.extensions[r]===!0&&(i[r]=!0);return Object.keys(i).length>0&&(t.extensions=i),t}}class mf extends zt{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new ft,this.projectionMatrix=new ft,this.projectionMatrixInverse=new ft,this.coordinateSystem=br}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.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(e,t){super.updateWorldMatrix(e,t),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return new this.constructor().copy(this)}}let pn=class extends mf{constructor(e=50,t=1,i=.1,r=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=e,this.zoom=1,this.near=i,this.far=r,this.focus=10,this.aspect=t,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.fov=e.fov,this.zoom=e.zoom,this.near=e.near,this.far=e.far,this.focus=e.focus,this.aspect=e.aspect,this.view=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=Ql*2*Math.atan(t),this.updateProjectionMatrix()}getFocalLength(){const e=Math.tan(ua*.5*this.fov);return .5*this.getFilmHeight()/e}getEffectiveFOV(){return Ql*2*Math.atan(Math.tan(ua*.5*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}setViewOffset(e,t,i,r,s,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=i,this.view.offsetY=r,this.view.width=s,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(ua*.5*this.fov)/this.zoom,i=2*t,r=this.aspect*i,s=-.5*r;const o=this.view;if(this.view!==null&&this.view.enabled){const u=o.fullWidth,f=o.fullHeight;s+=o.offsetX*r/u,t-=o.offsetY*i/f,r*=o.width/u,i*=o.height/f}const a=this.filmOffset;a!==0&&(s+=e*a/this.getFilmWidth()),this.projectionMatrix.makePerspective(s,s+r,t,t-i,e,this.far,this.coordinateSystem),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}};const ol=-90,al=1;class OT extends zt{constructor(e,t,i){super(),this.type="CubeCamera",this.renderTarget=i,this.coordinateSystem=null,this.activeMipmapLevel=0;const r=new pn(ol,al,e,t);r.layers=this.layers,this.add(r);const s=new pn(ol,al,e,t);s.layers=this.layers,this.add(s);const o=new pn(ol,al,e,t);o.layers=this.layers,this.add(o);const a=new pn(ol,al,e,t);a.layers=this.layers,this.add(a);const u=new pn(ol,al,e,t);u.layers=this.layers,this.add(u);const f=new pn(ol,al,e,t);f.layers=this.layers,this.add(f)}updateCoordinateSystem(){const e=this.coordinateSystem,t=this.children.concat(),[i,r,s,o,a,u]=t;for(const f of t)this.remove(f);if(e===br)i.up.set(0,1,0),i.lookAt(1,0,0),r.up.set(0,1,0),r.lookAt(-1,0,0),s.up.set(0,0,-1),s.lookAt(0,1,0),o.up.set(0,0,1),o.lookAt(0,-1,0),a.up.set(0,1,0),a.lookAt(0,0,1),u.up.set(0,1,0),u.lookAt(0,0,-1);else if(e===Jl)i.up.set(0,-1,0),i.lookAt(-1,0,0),r.up.set(0,-1,0),r.lookAt(1,0,0),s.up.set(0,0,1),s.lookAt(0,1,0),o.up.set(0,0,-1),o.lookAt(0,-1,0),a.up.set(0,-1,0),a.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 f of t)this.add(f),f.updateMatrixWorld()}update(e,t){this.parent===null&&this.updateMatrixWorld();const{renderTarget:i,activeMipmapLevel:r}=this;this.coordinateSystem!==e.coordinateSystem&&(this.coordinateSystem=e.coordinateSystem,this.updateCoordinateSystem());const[s,o,a,u,f,h]=this.children,d=e.getRenderTarget(),p=e.getActiveCubeFace(),v=e.getActiveMipmapLevel(),y=e.xr.enabled;e.xr.enabled=!1;const w=i.texture.generateMipmaps;i.texture.generateMipmaps=!1,e.setRenderTarget(i,0,r),e.render(t,s),e.setRenderTarget(i,1,r),e.render(t,o),e.setRenderTarget(i,2,r),e.render(t,a),e.setRenderTarget(i,3,r),e.render(t,u),e.setRenderTarget(i,4,r),e.render(t,f),i.texture.generateMipmaps=w,e.setRenderTarget(i,5,r),e.render(t,h),e.setRenderTarget(d,p,v),e.xr.enabled=y,i.texture.needsPMREMUpdate=!0}}class gf extends mn{constructor(e,t,i,r,s,o,a,u,f,h){e=e!==void 0?e:[],t=t!==void 0?t:Ps,super(e,t,i,r,s,o,a,u,f,h),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(e){this.image=e}}class zT extends gr{constructor(e=1,t={}){super(e,e,t),this.isWebGLCubeRenderTarget=!0;const i={width:e,height:e,depth:1},r=[i,i,i,i,i,i];t.encoding!==void 0&&(mu("THREE.WebGLCubeRenderTarget: option.encoding has been replaced by option.colorSpace."),t.colorSpace=t.encoding===mo?Cn:Gi),this.texture=new gf(r,t.mapping,t.wrapS,t.wrapT,t.magFilter,t.minFilter,t.format,t.type,t.anisotropy,t.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=t.generateMipmaps!==void 0?t.generateMipmaps:!1,this.texture.minFilter=t.minFilter!==void 0?t.minFilter:sn}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 i={uniforms:{tEquirect:{value:null}},vertexShader:` varying vec3 vWorldDirection; @@ -80,7 +80,7 @@ Error generating stack: `+s.message+` gl_FragColor = texture2D( tEquirect, sampleUV ); } - `},r=new Ca(5,5,5),s=new $r({name:"CubemapFromEquirect",uniforms:$l(i.uniforms),vertexShader:i.vertexShader,fragmentShader:i.fragmentShader,side:vi,blending:Es});s.uniforms.tEquirect.value=t;const o=new Rn(r,s),a=t.minFilter;return t.minFilter===_o&&(t.minFilter=sn),new zT(1,10,this).update(e,o),t.minFilter=a,o.geometry.dispose(),o.material.dispose(),this}clear(e,t,i,r){const s=e.getRenderTarget();for(let o=0;o<6;o++)e.setRenderTarget(this,o),e.clear(t,i,r);e.setRenderTarget(s)}}const Mg=new O,EP=new O,TP=new wt;class gs{constructor(e=new O(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,i,r){return this.normal.set(e,t,i),this.constant=r,this}setFromNormalAndCoplanarPoint(e,t){return this.normal.copy(e),this.constant=-t.dot(this.normal),this}setFromCoplanarPoints(e,t,i){const r=Mg.subVectors(i,t).cross(EP.subVectors(e,t)).normalize();return this.setFromNormalAndCoplanarPoint(r,e),this}copy(e){return this.normal.copy(e.normal),this.constant=e.constant,this}normalize(){const e=1/this.normal.length();return this.normal.multiplyScalar(e),this.constant*=e,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(e){return this.normal.dot(e)+this.constant}distanceToSphere(e){return this.distanceToPoint(e.center)-e.radius}projectPoint(e,t){return t.copy(e).addScaledVector(this.normal,-this.distanceToPoint(e))}intersectLine(e,t){const i=e.delta(Mg),r=this.normal.dot(i);if(r===0)return this.distanceToPoint(e.start)===0?t.copy(e.start):null;const s=-(e.start.dot(this.normal)+this.constant)/r;return s<0||s>1?null:t.copy(e.start).addScaledVector(i,s)}intersectsLine(e){const t=this.distanceToPoint(e.start),i=this.distanceToPoint(e.end);return t<0&&i>0||i<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 i=t||TP.getNormalMatrix(e),r=this.coplanarPoint(Mg).applyMatrix4(e),s=this.normal.applyMatrix3(i).normalize();return this.constant=-r.dot(s),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)}}const Bo=new ai,td=new O;class vf{constructor(e=new gs,t=new gs,i=new gs,r=new gs,s=new gs,o=new gs){this.planes=[e,t,i,r,s,o]}set(e,t,i,r,s,o){const a=this.planes;return a[0].copy(e),a[1].copy(t),a[2].copy(i),a[3].copy(r),a[4].copy(s),a[5].copy(o),this}copy(e){const t=this.planes;for(let i=0;i<6;i++)t[i].copy(e.planes[i]);return this}setFromProjectionMatrix(e,t=br){const i=this.planes,r=e.elements,s=r[0],o=r[1],a=r[2],u=r[3],f=r[4],h=r[5],d=r[6],p=r[7],v=r[8],y=r[9],w=r[10],S=r[11],g=r[12],x=r[13],M=r[14],T=r[15];if(i[0].setComponents(u-s,p-f,S-v,T-g).normalize(),i[1].setComponents(u+s,p+f,S+v,T+g).normalize(),i[2].setComponents(u+o,p+h,S+y,T+x).normalize(),i[3].setComponents(u-o,p-h,S-y,T-x).normalize(),i[4].setComponents(u-a,p-d,S-w,T-M).normalize(),t===br)i[5].setComponents(u+a,p+d,S+w,T+M).normalize();else if(t===Jl)i[5].setComponents(a,d,w,M).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(),Bo.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{const t=e.geometry;t.boundingSphere===null&&t.computeBoundingSphere(),Bo.copy(t.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(Bo)}intersectsSprite(e){return Bo.center.set(0,0,0),Bo.radius=.7071067811865476,Bo.applyMatrix4(e.matrixWorld),this.intersectsSphere(Bo)}intersectsSphere(e){const t=this.planes,i=e.center,r=-e.radius;for(let s=0;s<6;s++)if(t[s].distanceToPoint(i)0?e.max.x:e.min.x,td.y=r.normal.y>0?e.max.y:e.min.y,td.z=r.normal.z>0?e.max.z:e.min.z,r.distanceToPoint(td)<0)return!1}return!0}containsPoint(e){const t=this.planes;for(let i=0;i<6;i++)if(t[i].distanceToPoint(e)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}}function FT(){let n=null,e=!1,t=null,i=null;function r(s,o){t(s,o),i=n.requestAnimationFrame(r)}return{start:function(){e!==!0&&t!==null&&(i=n.requestAnimationFrame(r),e=!0)},stop:function(){n.cancelAnimationFrame(i),e=!1},setAnimationLoop:function(s){t=s},setContext:function(s){n=s}}}function AP(n,e){const t=e.isWebGL2,i=new WeakMap;function r(f,h){const d=f.array,p=f.usage,v=d.byteLength,y=n.createBuffer();n.bindBuffer(h,y),n.bufferData(h,d,p),f.onUploadCallback();let w;if(d instanceof Float32Array)w=n.FLOAT;else if(d instanceof Uint16Array)if(f.isFloat16BufferAttribute)if(t)w=n.HALF_FLOAT;else throw new Error("THREE.WebGLAttributes: Usage of Float16BufferAttribute requires WebGL2.");else w=n.UNSIGNED_SHORT;else if(d instanceof Int16Array)w=n.SHORT;else if(d instanceof Uint32Array)w=n.UNSIGNED_INT;else if(d instanceof Int32Array)w=n.INT;else if(d instanceof Int8Array)w=n.BYTE;else if(d instanceof Uint8Array)w=n.UNSIGNED_BYTE;else if(d instanceof Uint8ClampedArray)w=n.UNSIGNED_BYTE;else throw new Error("THREE.WebGLAttributes: Unsupported buffer data format: "+d);return{buffer:y,type:w,bytesPerElement:d.BYTES_PER_ELEMENT,version:f.version,size:v}}function s(f,h,d){const p=h.array,v=h._updateRange,y=h.updateRanges;if(n.bindBuffer(d,f),v.count===-1&&y.length===0&&n.bufferSubData(d,0,p),y.length!==0){for(let w=0,S=y.length;w1?null:t.copy(e.start).addScaledVector(i,s)}intersectsLine(e){const t=this.distanceToPoint(e.start),i=this.distanceToPoint(e.end);return t<0&&i>0||i<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 i=t||TP.getNormalMatrix(e),r=this.coplanarPoint(Mg).applyMatrix4(e),s=this.normal.applyMatrix3(i).normalize();return this.constant=-r.dot(s),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)}}const Bo=new ai,td=new z;class vf{constructor(e=new gs,t=new gs,i=new gs,r=new gs,s=new gs,o=new gs){this.planes=[e,t,i,r,s,o]}set(e,t,i,r,s,o){const a=this.planes;return a[0].copy(e),a[1].copy(t),a[2].copy(i),a[3].copy(r),a[4].copy(s),a[5].copy(o),this}copy(e){const t=this.planes;for(let i=0;i<6;i++)t[i].copy(e.planes[i]);return this}setFromProjectionMatrix(e,t=br){const i=this.planes,r=e.elements,s=r[0],o=r[1],a=r[2],u=r[3],f=r[4],h=r[5],d=r[6],p=r[7],v=r[8],y=r[9],w=r[10],S=r[11],g=r[12],x=r[13],M=r[14],T=r[15];if(i[0].setComponents(u-s,p-f,S-v,T-g).normalize(),i[1].setComponents(u+s,p+f,S+v,T+g).normalize(),i[2].setComponents(u+o,p+h,S+y,T+x).normalize(),i[3].setComponents(u-o,p-h,S-y,T-x).normalize(),i[4].setComponents(u-a,p-d,S-w,T-M).normalize(),t===br)i[5].setComponents(u+a,p+d,S+w,T+M).normalize();else if(t===Jl)i[5].setComponents(a,d,w,M).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(),Bo.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{const t=e.geometry;t.boundingSphere===null&&t.computeBoundingSphere(),Bo.copy(t.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(Bo)}intersectsSprite(e){return Bo.center.set(0,0,0),Bo.radius=.7071067811865476,Bo.applyMatrix4(e.matrixWorld),this.intersectsSphere(Bo)}intersectsSphere(e){const t=this.planes,i=e.center,r=-e.radius;for(let s=0;s<6;s++)if(t[s].distanceToPoint(i)0?e.max.x:e.min.x,td.y=r.normal.y>0?e.max.y:e.min.y,td.z=r.normal.z>0?e.max.z:e.min.z,r.distanceToPoint(td)<0)return!1}return!0}containsPoint(e){const t=this.planes;for(let i=0;i<6;i++)if(t[i].distanceToPoint(e)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}}function FT(){let n=null,e=!1,t=null,i=null;function r(s,o){t(s,o),i=n.requestAnimationFrame(r)}return{start:function(){e!==!0&&t!==null&&(i=n.requestAnimationFrame(r),e=!0)},stop:function(){n.cancelAnimationFrame(i),e=!1},setAnimationLoop:function(s){t=s},setContext:function(s){n=s}}}function AP(n,e){const t=e.isWebGL2,i=new WeakMap;function r(f,h){const d=f.array,p=f.usage,v=d.byteLength,y=n.createBuffer();n.bindBuffer(h,y),n.bufferData(h,d,p),f.onUploadCallback();let w;if(d instanceof Float32Array)w=n.FLOAT;else if(d instanceof Uint16Array)if(f.isFloat16BufferAttribute)if(t)w=n.HALF_FLOAT;else throw new Error("THREE.WebGLAttributes: Usage of Float16BufferAttribute requires WebGL2.");else w=n.UNSIGNED_SHORT;else if(d instanceof Int16Array)w=n.SHORT;else if(d instanceof Uint32Array)w=n.UNSIGNED_INT;else if(d instanceof Int32Array)w=n.INT;else if(d instanceof Int8Array)w=n.BYTE;else if(d instanceof Uint8Array)w=n.UNSIGNED_BYTE;else if(d instanceof Uint8ClampedArray)w=n.UNSIGNED_BYTE;else throw new Error("THREE.WebGLAttributes: Unsupported buffer data format: "+d);return{buffer:y,type:w,bytesPerElement:d.BYTES_PER_ELEMENT,version:f.version,size:v}}function s(f,h,d){const p=h.array,v=h._updateRange,y=h.updateRanges;if(n.bindBuffer(d,f),v.count===-1&&y.length===0&&n.bufferSubData(d,0,p),y.length!==0){for(let w=0,S=y.length;w void main() { vWorldDirection = transformDirection( position, modelMatrix ); #include #include -}`,O6=`uniform sampler2D tEquirect; +}`,z6=`uniform sampler2D tEquirect; varying vec3 vWorldDirection; #include void main() { @@ -3513,7 +3513,7 @@ void main() { #include #include #include -}`,_t={alphahash_fragment:CP,alphahash_pars_fragment:bP,alphamap_fragment:RP,alphamap_pars_fragment:PP,alphatest_fragment:LP,alphatest_pars_fragment:IP,aomap_fragment:NP,aomap_pars_fragment:DP,batching_pars_vertex:UP,batching_vertex:zP,begin_vertex:OP,beginnormal_vertex:FP,bsdfs:kP,iridescence_fragment:BP,bumpmap_pars_fragment:HP,clipping_planes_fragment:VP,clipping_planes_pars_fragment:GP,clipping_planes_pars_vertex:WP,clipping_planes_vertex:XP,color_fragment:jP,color_pars_fragment:YP,color_pars_vertex:qP,color_vertex:ZP,common:KP,cube_uv_reflection_fragment:JP,defaultnormal_vertex:QP,displacementmap_pars_vertex:$P,displacementmap_vertex:eL,emissivemap_fragment:tL,emissivemap_pars_fragment:nL,colorspace_fragment:iL,colorspace_pars_fragment:rL,envmap_fragment:sL,envmap_common_pars_fragment:oL,envmap_pars_fragment:aL,envmap_pars_vertex:lL,envmap_physical_pars_fragment:xL,envmap_vertex:cL,fog_vertex:uL,fog_pars_vertex:fL,fog_fragment:hL,fog_pars_fragment:dL,gradientmap_pars_fragment:pL,lightmap_fragment:mL,lightmap_pars_fragment:gL,lights_lambert_fragment:vL,lights_lambert_pars_fragment:yL,lights_pars_begin:_L,lights_toon_fragment:SL,lights_toon_pars_fragment:ML,lights_phong_fragment:wL,lights_phong_pars_fragment:EL,lights_physical_fragment:TL,lights_physical_pars_fragment:AL,lights_fragment_begin:CL,lights_fragment_maps:bL,lights_fragment_end:RL,logdepthbuf_fragment:PL,logdepthbuf_pars_fragment:LL,logdepthbuf_pars_vertex:IL,logdepthbuf_vertex:NL,map_fragment:DL,map_pars_fragment:UL,map_particle_fragment:zL,map_particle_pars_fragment:OL,metalnessmap_fragment:FL,metalnessmap_pars_fragment:kL,morphcolor_vertex:BL,morphnormal_vertex:HL,morphtarget_pars_vertex:VL,morphtarget_vertex:GL,normal_fragment_begin:WL,normal_fragment_maps:XL,normal_pars_fragment:jL,normal_pars_vertex:YL,normal_vertex:qL,normalmap_pars_fragment:ZL,clearcoat_normal_fragment_begin:KL,clearcoat_normal_fragment_maps:JL,clearcoat_pars_fragment:QL,iridescence_pars_fragment:$L,opaque_fragment:e6,packing:t6,premultiplied_alpha_fragment:n6,project_vertex:i6,dithering_fragment:r6,dithering_pars_fragment:s6,roughnessmap_fragment:o6,roughnessmap_pars_fragment:a6,shadowmap_pars_fragment:l6,shadowmap_pars_vertex:c6,shadowmap_vertex:u6,shadowmask_pars_fragment:f6,skinbase_vertex:h6,skinning_pars_vertex:d6,skinning_vertex:p6,skinnormal_vertex:m6,specularmap_fragment:g6,specularmap_pars_fragment:v6,tonemapping_fragment:y6,tonemapping_pars_fragment:_6,transmission_fragment:x6,transmission_pars_fragment:S6,uv_pars_fragment:M6,uv_pars_vertex:w6,uv_vertex:E6,worldpos_vertex:T6,background_vert:A6,background_frag:C6,backgroundCube_vert:b6,backgroundCube_frag:R6,cube_vert:P6,cube_frag:L6,depth_vert:I6,depth_frag:N6,distanceRGBA_vert:D6,distanceRGBA_frag:U6,equirect_vert:z6,equirect_frag:O6,linedashed_vert:F6,linedashed_frag:k6,meshbasic_vert:B6,meshbasic_frag:H6,meshlambert_vert:V6,meshlambert_frag:G6,meshmatcap_vert:W6,meshmatcap_frag:X6,meshnormal_vert:j6,meshnormal_frag:Y6,meshphong_vert:q6,meshphong_frag:Z6,meshphysical_vert:K6,meshphysical_frag:J6,meshtoon_vert:Q6,meshtoon_frag:$6,points_vert:eI,points_frag:tI,shadow_vert:nI,shadow_frag:iI,sprite_vert:rI,sprite_frag:sI},Pe={common:{diffuse:{value:new Be(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new wt},alphaMap:{value:null},alphaMapTransform:{value:new wt},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new wt}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new wt}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new wt}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new wt},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new wt},normalScale:{value:new de(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new wt},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new wt}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new wt}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new wt}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new Be(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new Be(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new wt},alphaTest:{value:0},uvTransform:{value:new wt}},sprite:{diffuse:{value:new Be(16777215)},opacity:{value:1},center:{value:new de(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new wt},alphaMap:{value:null},alphaMapTransform:{value:new wt},alphaTest:{value:0}}},Cr={basic:{uniforms:hi([Pe.common,Pe.specularmap,Pe.envmap,Pe.aomap,Pe.lightmap,Pe.fog]),vertexShader:_t.meshbasic_vert,fragmentShader:_t.meshbasic_frag},lambert:{uniforms:hi([Pe.common,Pe.specularmap,Pe.envmap,Pe.aomap,Pe.lightmap,Pe.emissivemap,Pe.bumpmap,Pe.normalmap,Pe.displacementmap,Pe.fog,Pe.lights,{emissive:{value:new Be(0)}}]),vertexShader:_t.meshlambert_vert,fragmentShader:_t.meshlambert_frag},phong:{uniforms:hi([Pe.common,Pe.specularmap,Pe.envmap,Pe.aomap,Pe.lightmap,Pe.emissivemap,Pe.bumpmap,Pe.normalmap,Pe.displacementmap,Pe.fog,Pe.lights,{emissive:{value:new Be(0)},specular:{value:new Be(1118481)},shininess:{value:30}}]),vertexShader:_t.meshphong_vert,fragmentShader:_t.meshphong_frag},standard:{uniforms:hi([Pe.common,Pe.envmap,Pe.aomap,Pe.lightmap,Pe.emissivemap,Pe.bumpmap,Pe.normalmap,Pe.displacementmap,Pe.roughnessmap,Pe.metalnessmap,Pe.fog,Pe.lights,{emissive:{value:new Be(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:_t.meshphysical_vert,fragmentShader:_t.meshphysical_frag},toon:{uniforms:hi([Pe.common,Pe.aomap,Pe.lightmap,Pe.emissivemap,Pe.bumpmap,Pe.normalmap,Pe.displacementmap,Pe.gradientmap,Pe.fog,Pe.lights,{emissive:{value:new Be(0)}}]),vertexShader:_t.meshtoon_vert,fragmentShader:_t.meshtoon_frag},matcap:{uniforms:hi([Pe.common,Pe.bumpmap,Pe.normalmap,Pe.displacementmap,Pe.fog,{matcap:{value:null}}]),vertexShader:_t.meshmatcap_vert,fragmentShader:_t.meshmatcap_frag},points:{uniforms:hi([Pe.points,Pe.fog]),vertexShader:_t.points_vert,fragmentShader:_t.points_frag},dashed:{uniforms:hi([Pe.common,Pe.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:_t.linedashed_vert,fragmentShader:_t.linedashed_frag},depth:{uniforms:hi([Pe.common,Pe.displacementmap]),vertexShader:_t.depth_vert,fragmentShader:_t.depth_frag},normal:{uniforms:hi([Pe.common,Pe.bumpmap,Pe.normalmap,Pe.displacementmap,{opacity:{value:1}}]),vertexShader:_t.meshnormal_vert,fragmentShader:_t.meshnormal_frag},sprite:{uniforms:hi([Pe.sprite,Pe.fog]),vertexShader:_t.sprite_vert,fragmentShader:_t.sprite_frag},background:{uniforms:{uvTransform:{value:new wt},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:_t.background_vert,fragmentShader:_t.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1}},vertexShader:_t.backgroundCube_vert,fragmentShader:_t.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:_t.cube_vert,fragmentShader:_t.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:_t.equirect_vert,fragmentShader:_t.equirect_frag},distanceRGBA:{uniforms:hi([Pe.common,Pe.displacementmap,{referencePosition:{value:new O},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:_t.distanceRGBA_vert,fragmentShader:_t.distanceRGBA_frag},shadow:{uniforms:hi([Pe.lights,Pe.fog,{color:{value:new Be(0)},opacity:{value:1}}]),vertexShader:_t.shadow_vert,fragmentShader:_t.shadow_frag}};Cr.physical={uniforms:hi([Cr.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new wt},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new wt},clearcoatNormalScale:{value:new de(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new wt},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new wt},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new wt},sheen:{value:0},sheenColor:{value:new Be(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new wt},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new wt},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new wt},transmissionSamplerSize:{value:new de},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new wt},attenuationDistance:{value:0},attenuationColor:{value:new Be(0)},specularColor:{value:new Be(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new wt},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new wt},anisotropyVector:{value:new de},anisotropyMap:{value:null},anisotropyMapTransform:{value:new wt}}]),vertexShader:_t.meshphysical_vert,fragmentShader:_t.meshphysical_frag};const nd={r:0,b:0,g:0};function oI(n,e,t,i,r,s,o){const a=new Be(0);let u=s===!0?0:1,f,h,d=null,p=0,v=null;function y(S,g){let x=!1,M=g.isScene===!0?g.background:null;M&&M.isTexture&&(M=(g.backgroundBlurriness>0?t:e).get(M)),M===null?w(a,u):M&&M.isColor&&(w(M,1),x=!0);const T=n.xr.getEnvironmentBlendMode();T==="additive"?i.buffers.color.setClear(0,0,0,1,o):T==="alpha-blend"&&i.buffers.color.setClear(0,0,0,0,o),(n.autoClear||x)&&n.clear(n.autoClearColor,n.autoClearDepth,n.autoClearStencil),M&&(M.isCubeTexture||M.mapping===oc)?(h===void 0&&(h=new Rn(new Ca(1,1,1),new $r({name:"BackgroundCubeMaterial",uniforms:$l(Cr.backgroundCube.uniforms),vertexShader:Cr.backgroundCube.vertexShader,fragmentShader:Cr.backgroundCube.fragmentShader,side:vi,depthTest:!1,depthWrite:!1,fog:!1})),h.geometry.deleteAttribute("normal"),h.geometry.deleteAttribute("uv"),h.onBeforeRender=function(P,C,L){this.matrixWorld.copyPosition(L.matrixWorld)},Object.defineProperty(h.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),r.update(h)),h.material.uniforms.envMap.value=M,h.material.uniforms.flipEnvMap.value=M.isCubeTexture&&M.isRenderTargetTexture===!1?-1:1,h.material.uniforms.backgroundBlurriness.value=g.backgroundBlurriness,h.material.uniforms.backgroundIntensity.value=g.backgroundIntensity,h.material.toneMapped=Ft.getTransfer(M.colorSpace)!==jt,(d!==M||p!==M.version||v!==n.toneMapping)&&(h.material.needsUpdate=!0,d=M,p=M.version,v=n.toneMapping),h.layers.enableAll(),S.unshift(h,h.geometry,h.material,0,0,null)):M&&M.isTexture&&(f===void 0&&(f=new Rn(new yf(2,2),new $r({name:"BackgroundMaterial",uniforms:$l(Cr.background.uniforms),vertexShader:Cr.background.vertexShader,fragmentShader:Cr.background.fragmentShader,side:Rs,depthTest:!1,depthWrite:!1,fog:!1})),f.geometry.deleteAttribute("normal"),Object.defineProperty(f.material,"map",{get:function(){return this.uniforms.t2D.value}}),r.update(f)),f.material.uniforms.t2D.value=M,f.material.uniforms.backgroundIntensity.value=g.backgroundIntensity,f.material.toneMapped=Ft.getTransfer(M.colorSpace)!==jt,M.matrixAutoUpdate===!0&&M.updateMatrix(),f.material.uniforms.uvTransform.value.copy(M.matrix),(d!==M||p!==M.version||v!==n.toneMapping)&&(f.material.needsUpdate=!0,d=M,p=M.version,v=n.toneMapping),f.layers.enableAll(),S.unshift(f,f.geometry,f.material,0,0,null))}function w(S,g){S.getRGB(nd,DT(n)),i.buffers.color.setClear(nd.r,nd.g,nd.b,g,o)}return{getClearColor:function(){return a},setClearColor:function(S,g=1){a.set(S),u=g,w(a,u)},getClearAlpha:function(){return u},setClearAlpha:function(S){u=S,w(a,u)},render:y}}function aI(n,e,t,i){const r=n.getParameter(n.MAX_VERTEX_ATTRIBS),s=i.isWebGL2?null:e.get("OES_vertex_array_object"),o=i.isWebGL2||s!==null,a={},u=S(null);let f=u,h=!1;function d(V,Q,te,ae,N){let B=!1;if(o){const H=w(ae,te,Q);f!==H&&(f=H,v(f.object)),B=g(V,ae,te,N),B&&x(V,ae,te,N)}else{const H=Q.wireframe===!0;(f.geometry!==ae.id||f.program!==te.id||f.wireframe!==H)&&(f.geometry=ae.id,f.program=te.id,f.wireframe=H,B=!0)}N!==null&&t.update(N,n.ELEMENT_ARRAY_BUFFER),(B||h)&&(h=!1,D(V,Q,te,ae),N!==null&&n.bindBuffer(n.ELEMENT_ARRAY_BUFFER,t.get(N).buffer))}function p(){return i.isWebGL2?n.createVertexArray():s.createVertexArrayOES()}function v(V){return i.isWebGL2?n.bindVertexArray(V):s.bindVertexArrayOES(V)}function y(V){return i.isWebGL2?n.deleteVertexArray(V):s.deleteVertexArrayOES(V)}function w(V,Q,te){const ae=te.wireframe===!0;let N=a[V.id];N===void 0&&(N={},a[V.id]=N);let B=N[Q.id];B===void 0&&(B={},N[Q.id]=B);let H=B[ae];return H===void 0&&(H=S(p()),B[ae]=H),H}function S(V){const Q=[],te=[],ae=[];for(let N=0;N=0){const ie=N[J];let pe=B[J];if(pe===void 0&&(J==="instanceMatrix"&&V.instanceMatrix&&(pe=V.instanceMatrix),J==="instanceColor"&&V.instanceColor&&(pe=V.instanceColor)),ie===void 0||ie.attribute!==pe||pe&&ie.data!==pe.data)return!0;H++}return f.attributesNum!==H||f.index!==ae}function x(V,Q,te,ae){const N={},B=Q.attributes;let H=0;const Y=te.getAttributes();for(const J in Y)if(Y[J].location>=0){let ie=B[J];ie===void 0&&(J==="instanceMatrix"&&V.instanceMatrix&&(ie=V.instanceMatrix),J==="instanceColor"&&V.instanceColor&&(ie=V.instanceColor));const pe={};pe.attribute=ie,ie&&ie.data&&(pe.data=ie.data),N[J]=pe,H++}f.attributes=N,f.attributesNum=H,f.index=ae}function M(){const V=f.newAttributes;for(let Q=0,te=V.length;Q=0){let Z=N[Y];if(Z===void 0&&(Y==="instanceMatrix"&&V.instanceMatrix&&(Z=V.instanceMatrix),Y==="instanceColor"&&V.instanceColor&&(Z=V.instanceColor)),Z!==void 0){const ie=Z.normalized,pe=Z.itemSize,Ee=t.get(Z);if(Ee===void 0)continue;const Te=Ee.buffer,nt=Ee.type,lt=Ee.bytesPerElement,Xe=i.isWebGL2===!0&&(nt===n.INT||nt===n.UNSIGNED_INT||Z.gpuType===By);if(Z.isInterleavedBufferAttribute){const Ke=Z.data,G=Ke.stride,we=Z.offset;if(Ke.isInstancedInterleavedBuffer){for(let me=0;me0&&n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.HIGH_FLOAT).precision>0)return"highp";L="mediump"}return L==="mediump"&&n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.MEDIUM_FLOAT).precision>0&&n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}const o=typeof WebGL2RenderingContext<"u"&&n.constructor.name==="WebGL2RenderingContext";let a=t.precision!==void 0?t.precision:"highp";const u=s(a);u!==a&&(console.warn("THREE.WebGLRenderer:",a,"not supported, using",u,"instead."),a=u);const f=o||e.has("WEBGL_draw_buffers"),h=t.logarithmicDepthBuffer===!0,d=n.getParameter(n.MAX_TEXTURE_IMAGE_UNITS),p=n.getParameter(n.MAX_VERTEX_TEXTURE_IMAGE_UNITS),v=n.getParameter(n.MAX_TEXTURE_SIZE),y=n.getParameter(n.MAX_CUBE_MAP_TEXTURE_SIZE),w=n.getParameter(n.MAX_VERTEX_ATTRIBS),S=n.getParameter(n.MAX_VERTEX_UNIFORM_VECTORS),g=n.getParameter(n.MAX_VARYING_VECTORS),x=n.getParameter(n.MAX_FRAGMENT_UNIFORM_VECTORS),M=p>0,T=o||e.has("OES_texture_float"),P=M&&T,C=o?n.getParameter(n.MAX_SAMPLES):0;return{isWebGL2:o,drawBuffers:f,getMaxAnisotropy:r,getMaxPrecision:s,precision:a,logarithmicDepthBuffer:h,maxTextures:d,maxVertexTextures:p,maxTextureSize:v,maxCubemapSize:y,maxAttributes:w,maxVertexUniforms:S,maxVaryings:g,maxFragmentUniforms:x,vertexTextures:M,floatFragmentTextures:T,floatVertexTextures:P,maxSamples:C}}function uI(n){const e=this;let t=null,i=0,r=!1,s=!1;const o=new gs,a=new wt,u={value:null,needsUpdate:!1};this.uniform=u,this.numPlanes=0,this.numIntersection=0,this.init=function(d,p){const v=d.length!==0||p||i!==0||r;return r=p,i=d.length,v},this.beginShadows=function(){s=!0,h(null)},this.endShadows=function(){s=!1},this.setGlobalState=function(d,p){t=h(d,p,0)},this.setState=function(d,p,v){const y=d.clippingPlanes,w=d.clipIntersection,S=d.clipShadows,g=n.get(d);if(!r||y===null||y.length===0||s&&!S)s?h(null):f();else{const x=s?0:i,M=x*4;let T=g.clippingState||null;u.value=T,T=h(y,p,M,v);for(let P=0;P!==M;++P)T[P]=t[P];g.clippingState=T,this.numIntersection=w?this.numPlanes:0,this.numPlanes+=x}};function f(){u.value!==t&&(u.value=t,u.needsUpdate=i>0),e.numPlanes=i,e.numIntersection=0}function h(d,p,v,y){const w=d!==null?d.length:0;let S=null;if(w!==0){if(S=u.value,y!==!0||S===null){const g=v+w*4,x=p.matrixWorldInverse;a.getNormalMatrix(x),(S===null||S.length0){const f=new OT(u.height/2);return f.fromEquirectangularTexture(n,o),e.set(o,f),o.addEventListener("dispose",r),t(f.texture,o.mapping)}else return null}}return o}function r(o){const a=o.target;a.removeEventListener("dispose",r);const u=e.get(a);u!==void 0&&(e.delete(a),u.dispose())}function s(){e=new WeakMap}return{get:i,dispose:s}}class Ss extends mf{constructor(e=-1,t=1,i=1,r=-1,s=.1,o=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=e,this.right=t,this.top=i,this.bottom=r,this.near=s,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,i,r,s,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=i,this.view.offsetY=r,this.view.width=s,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),i=(this.right+this.left)/2,r=(this.top+this.bottom)/2;let s=i-e,o=i+e,a=r+t,u=r-t;if(this.view!==null&&this.view.enabled){const f=(this.right-this.left)/this.view.fullWidth/this.zoom,h=(this.top-this.bottom)/this.view.fullHeight/this.zoom;s+=f*this.view.offsetX,o=s+f*this.view.width,a-=h*this.view.offsetY,u=a-h*this.view.height}this.projectionMatrix.makeOrthographic(s,o,a,u,this.near,this.far,this.coordinateSystem),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}}const Il=4,NS=[.125,.215,.35,.446,.526,.582],$o=20,wg=new Ss,DS=new Be;let Eg=null,Tg=0,Ag=0;const Qo=(1+Math.sqrt(5))/2,ll=1/Qo,US=[new O(1,1,1),new O(-1,1,1),new O(1,1,-1),new O(-1,1,-1),new O(0,Qo,ll),new O(0,Qo,-ll),new O(ll,0,Qo),new O(-ll,0,Qo),new O(Qo,ll,0),new O(-Qo,ll,0)];class bv{constructor(e){this._renderer=e,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._lodPlanes=[],this._sizeLods=[],this._sigmas=[],this._blurMaterial=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._compileMaterial(this._blurMaterial)}fromScene(e,t=0,i=.1,r=100){Eg=this._renderer.getRenderTarget(),Tg=this._renderer.getActiveCubeFace(),Ag=this._renderer.getActiveMipmapLevel(),this._setSize(256);const s=this._allocateTargets();return s.depthBuffer=!0,this._sceneToCubeUV(e,i,r,s),t>0&&this._blur(s,0,0,t),this._applyPMREM(s),this._cleanup(s),s}fromEquirectangular(e,t=null){return this._fromTexture(e,t)}fromCubemap(e,t=null){return this._fromTexture(e,t)}compileCubemapShader(){this._cubemapMaterial===null&&(this._cubemapMaterial=FS(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=OS(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),this._cubemapMaterial!==null&&this._cubemapMaterial.dispose(),this._equirectMaterial!==null&&this._equirectMaterial.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._pingPongRenderTarget!==null&&this._pingPongRenderTarget.dispose();for(let e=0;e2?M:0,M,M),h.setRenderTarget(r),w&&h.render(y,a),h.render(e,a)}y.geometry.dispose(),y.material.dispose(),h.toneMapping=p,h.autoClear=d,e.background=S}_textureToCubeUV(e,t){const i=this._renderer,r=e.mapping===Ps||e.mapping===yo;r?(this._cubemapMaterial===null&&(this._cubemapMaterial=FS()),this._cubemapMaterial.uniforms.flipEnvMap.value=e.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=OS());const s=r?this._cubemapMaterial:this._equirectMaterial,o=new Rn(this._lodPlanes[0],s),a=s.uniforms;a.envMap.value=e;const u=this._cubeSize;id(t,0,0,3*u,2*u),i.setRenderTarget(t),i.render(o,wg)}_applyPMREM(e){const t=this._renderer,i=t.autoClear;t.autoClear=!1;for(let r=1;r$o&&console.warn(`sigmaRadians, ${s}, is too large and will clip, as it requested ${S} samples when the maximum is set to ${$o}`);const g=[];let x=0;for(let L=0;L<$o;++L){const D=L/w,b=Math.exp(-D*D/2);g.push(b),L===0?x+=b:LM-Il?r-M+Il:0),C=4*(this._cubeSize-T);id(t,P,C,3*T,2*T),u.setRenderTarget(t),u.render(d,wg)}}function hI(n){const e=[],t=[],i=[];let r=n;const s=n-Il+1+NS.length;for(let o=0;on-Il?u=NS[o-n+Il-1]:o===0&&(u=0),i.push(u);const f=1/(a-2),h=-f,d=1+f,p=[h,h,d,h,d,d,h,h,d,d,h,d],v=6,y=6,w=3,S=2,g=1,x=new Float32Array(w*y*v),M=new Float32Array(S*y*v),T=new Float32Array(g*y*v);for(let C=0;C2?0:-1,b=[L,D,0,L+2/3,D,0,L+2/3,D+1,0,L,D,0,L+2/3,D+1,0,L,D+1,0];x.set(b,w*y*C),M.set(p,S*y*C);const R=[C,C,C,C,C,C];T.set(R,g*y*C)}const P=new St;P.setAttribute("position",new Ht(x,w)),P.setAttribute("uv",new Ht(M,S)),P.setAttribute("faceIndex",new Ht(T,g)),e.push(P),r>Il&&r--}return{lodPlanes:e,sizeLods:t,sigmas:i}}function zS(n,e,t){const i=new gr(n,e,t);return i.texture.mapping=oc,i.texture.name="PMREM.cubeUv",i.scissorTest=!0,i}function id(n,e,t,i,r){n.viewport.set(e,t,i,r),n.scissor.set(e,t,i,r)}function dI(n,e,t){const i=new Float32Array($o),r=new O(0,1,0);return new $r({name:"SphericalGaussianBlur",defines:{n:$o,CUBEUV_TEXEL_WIDTH:1/e,CUBEUV_TEXEL_HEIGHT:1/t,CUBEUV_MAX_MIP:`${n}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:i},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:r}},vertexShader:t_(),fragmentShader:` +}`,_t={alphahash_fragment:CP,alphahash_pars_fragment:bP,alphamap_fragment:RP,alphamap_pars_fragment:PP,alphatest_fragment:LP,alphatest_pars_fragment:IP,aomap_fragment:NP,aomap_pars_fragment:DP,batching_pars_vertex:UP,batching_vertex:OP,begin_vertex:zP,beginnormal_vertex:FP,bsdfs:kP,iridescence_fragment:BP,bumpmap_pars_fragment:HP,clipping_planes_fragment:VP,clipping_planes_pars_fragment:GP,clipping_planes_pars_vertex:WP,clipping_planes_vertex:XP,color_fragment:jP,color_pars_fragment:YP,color_pars_vertex:qP,color_vertex:ZP,common:KP,cube_uv_reflection_fragment:JP,defaultnormal_vertex:QP,displacementmap_pars_vertex:$P,displacementmap_vertex:eL,emissivemap_fragment:tL,emissivemap_pars_fragment:nL,colorspace_fragment:iL,colorspace_pars_fragment:rL,envmap_fragment:sL,envmap_common_pars_fragment:oL,envmap_pars_fragment:aL,envmap_pars_vertex:lL,envmap_physical_pars_fragment:xL,envmap_vertex:cL,fog_vertex:uL,fog_pars_vertex:fL,fog_fragment:hL,fog_pars_fragment:dL,gradientmap_pars_fragment:pL,lightmap_fragment:mL,lightmap_pars_fragment:gL,lights_lambert_fragment:vL,lights_lambert_pars_fragment:yL,lights_pars_begin:_L,lights_toon_fragment:SL,lights_toon_pars_fragment:ML,lights_phong_fragment:wL,lights_phong_pars_fragment:EL,lights_physical_fragment:TL,lights_physical_pars_fragment:AL,lights_fragment_begin:CL,lights_fragment_maps:bL,lights_fragment_end:RL,logdepthbuf_fragment:PL,logdepthbuf_pars_fragment:LL,logdepthbuf_pars_vertex:IL,logdepthbuf_vertex:NL,map_fragment:DL,map_pars_fragment:UL,map_particle_fragment:OL,map_particle_pars_fragment:zL,metalnessmap_fragment:FL,metalnessmap_pars_fragment:kL,morphcolor_vertex:BL,morphnormal_vertex:HL,morphtarget_pars_vertex:VL,morphtarget_vertex:GL,normal_fragment_begin:WL,normal_fragment_maps:XL,normal_pars_fragment:jL,normal_pars_vertex:YL,normal_vertex:qL,normalmap_pars_fragment:ZL,clearcoat_normal_fragment_begin:KL,clearcoat_normal_fragment_maps:JL,clearcoat_pars_fragment:QL,iridescence_pars_fragment:$L,opaque_fragment:e6,packing:t6,premultiplied_alpha_fragment:n6,project_vertex:i6,dithering_fragment:r6,dithering_pars_fragment:s6,roughnessmap_fragment:o6,roughnessmap_pars_fragment:a6,shadowmap_pars_fragment:l6,shadowmap_pars_vertex:c6,shadowmap_vertex:u6,shadowmask_pars_fragment:f6,skinbase_vertex:h6,skinning_pars_vertex:d6,skinning_vertex:p6,skinnormal_vertex:m6,specularmap_fragment:g6,specularmap_pars_fragment:v6,tonemapping_fragment:y6,tonemapping_pars_fragment:_6,transmission_fragment:x6,transmission_pars_fragment:S6,uv_pars_fragment:M6,uv_pars_vertex:w6,uv_vertex:E6,worldpos_vertex:T6,background_vert:A6,background_frag:C6,backgroundCube_vert:b6,backgroundCube_frag:R6,cube_vert:P6,cube_frag:L6,depth_vert:I6,depth_frag:N6,distanceRGBA_vert:D6,distanceRGBA_frag:U6,equirect_vert:O6,equirect_frag:z6,linedashed_vert:F6,linedashed_frag:k6,meshbasic_vert:B6,meshbasic_frag:H6,meshlambert_vert:V6,meshlambert_frag:G6,meshmatcap_vert:W6,meshmatcap_frag:X6,meshnormal_vert:j6,meshnormal_frag:Y6,meshphong_vert:q6,meshphong_frag:Z6,meshphysical_vert:K6,meshphysical_frag:J6,meshtoon_vert:Q6,meshtoon_frag:$6,points_vert:eI,points_frag:tI,shadow_vert:nI,shadow_frag:iI,sprite_vert:rI,sprite_frag:sI},Pe={common:{diffuse:{value:new Be(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new wt},alphaMap:{value:null},alphaMapTransform:{value:new wt},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new wt}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new wt}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new wt}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new wt},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new wt},normalScale:{value:new de(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new wt},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new wt}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new wt}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new wt}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new Be(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new Be(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new wt},alphaTest:{value:0},uvTransform:{value:new wt}},sprite:{diffuse:{value:new Be(16777215)},opacity:{value:1},center:{value:new de(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new wt},alphaMap:{value:null},alphaMapTransform:{value:new wt},alphaTest:{value:0}}},Cr={basic:{uniforms:hi([Pe.common,Pe.specularmap,Pe.envmap,Pe.aomap,Pe.lightmap,Pe.fog]),vertexShader:_t.meshbasic_vert,fragmentShader:_t.meshbasic_frag},lambert:{uniforms:hi([Pe.common,Pe.specularmap,Pe.envmap,Pe.aomap,Pe.lightmap,Pe.emissivemap,Pe.bumpmap,Pe.normalmap,Pe.displacementmap,Pe.fog,Pe.lights,{emissive:{value:new Be(0)}}]),vertexShader:_t.meshlambert_vert,fragmentShader:_t.meshlambert_frag},phong:{uniforms:hi([Pe.common,Pe.specularmap,Pe.envmap,Pe.aomap,Pe.lightmap,Pe.emissivemap,Pe.bumpmap,Pe.normalmap,Pe.displacementmap,Pe.fog,Pe.lights,{emissive:{value:new Be(0)},specular:{value:new Be(1118481)},shininess:{value:30}}]),vertexShader:_t.meshphong_vert,fragmentShader:_t.meshphong_frag},standard:{uniforms:hi([Pe.common,Pe.envmap,Pe.aomap,Pe.lightmap,Pe.emissivemap,Pe.bumpmap,Pe.normalmap,Pe.displacementmap,Pe.roughnessmap,Pe.metalnessmap,Pe.fog,Pe.lights,{emissive:{value:new Be(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:_t.meshphysical_vert,fragmentShader:_t.meshphysical_frag},toon:{uniforms:hi([Pe.common,Pe.aomap,Pe.lightmap,Pe.emissivemap,Pe.bumpmap,Pe.normalmap,Pe.displacementmap,Pe.gradientmap,Pe.fog,Pe.lights,{emissive:{value:new Be(0)}}]),vertexShader:_t.meshtoon_vert,fragmentShader:_t.meshtoon_frag},matcap:{uniforms:hi([Pe.common,Pe.bumpmap,Pe.normalmap,Pe.displacementmap,Pe.fog,{matcap:{value:null}}]),vertexShader:_t.meshmatcap_vert,fragmentShader:_t.meshmatcap_frag},points:{uniforms:hi([Pe.points,Pe.fog]),vertexShader:_t.points_vert,fragmentShader:_t.points_frag},dashed:{uniforms:hi([Pe.common,Pe.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:_t.linedashed_vert,fragmentShader:_t.linedashed_frag},depth:{uniforms:hi([Pe.common,Pe.displacementmap]),vertexShader:_t.depth_vert,fragmentShader:_t.depth_frag},normal:{uniforms:hi([Pe.common,Pe.bumpmap,Pe.normalmap,Pe.displacementmap,{opacity:{value:1}}]),vertexShader:_t.meshnormal_vert,fragmentShader:_t.meshnormal_frag},sprite:{uniforms:hi([Pe.sprite,Pe.fog]),vertexShader:_t.sprite_vert,fragmentShader:_t.sprite_frag},background:{uniforms:{uvTransform:{value:new wt},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:_t.background_vert,fragmentShader:_t.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1}},vertexShader:_t.backgroundCube_vert,fragmentShader:_t.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:_t.cube_vert,fragmentShader:_t.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:_t.equirect_vert,fragmentShader:_t.equirect_frag},distanceRGBA:{uniforms:hi([Pe.common,Pe.displacementmap,{referencePosition:{value:new z},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:_t.distanceRGBA_vert,fragmentShader:_t.distanceRGBA_frag},shadow:{uniforms:hi([Pe.lights,Pe.fog,{color:{value:new Be(0)},opacity:{value:1}}]),vertexShader:_t.shadow_vert,fragmentShader:_t.shadow_frag}};Cr.physical={uniforms:hi([Cr.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new wt},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new wt},clearcoatNormalScale:{value:new de(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new wt},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new wt},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new wt},sheen:{value:0},sheenColor:{value:new Be(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new wt},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new wt},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new wt},transmissionSamplerSize:{value:new de},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new wt},attenuationDistance:{value:0},attenuationColor:{value:new Be(0)},specularColor:{value:new Be(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new wt},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new wt},anisotropyVector:{value:new de},anisotropyMap:{value:null},anisotropyMapTransform:{value:new wt}}]),vertexShader:_t.meshphysical_vert,fragmentShader:_t.meshphysical_frag};const nd={r:0,b:0,g:0};function oI(n,e,t,i,r,s,o){const a=new Be(0);let u=s===!0?0:1,f,h,d=null,p=0,v=null;function y(S,g){let x=!1,M=g.isScene===!0?g.background:null;M&&M.isTexture&&(M=(g.backgroundBlurriness>0?t:e).get(M)),M===null?w(a,u):M&&M.isColor&&(w(M,1),x=!0);const T=n.xr.getEnvironmentBlendMode();T==="additive"?i.buffers.color.setClear(0,0,0,1,o):T==="alpha-blend"&&i.buffers.color.setClear(0,0,0,0,o),(n.autoClear||x)&&n.clear(n.autoClearColor,n.autoClearDepth,n.autoClearStencil),M&&(M.isCubeTexture||M.mapping===oc)?(h===void 0&&(h=new Rn(new Ca(1,1,1),new $r({name:"BackgroundCubeMaterial",uniforms:$l(Cr.backgroundCube.uniforms),vertexShader:Cr.backgroundCube.vertexShader,fragmentShader:Cr.backgroundCube.fragmentShader,side:vi,depthTest:!1,depthWrite:!1,fog:!1})),h.geometry.deleteAttribute("normal"),h.geometry.deleteAttribute("uv"),h.onBeforeRender=function(P,C,L){this.matrixWorld.copyPosition(L.matrixWorld)},Object.defineProperty(h.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),r.update(h)),h.material.uniforms.envMap.value=M,h.material.uniforms.flipEnvMap.value=M.isCubeTexture&&M.isRenderTargetTexture===!1?-1:1,h.material.uniforms.backgroundBlurriness.value=g.backgroundBlurriness,h.material.uniforms.backgroundIntensity.value=g.backgroundIntensity,h.material.toneMapped=Ft.getTransfer(M.colorSpace)!==jt,(d!==M||p!==M.version||v!==n.toneMapping)&&(h.material.needsUpdate=!0,d=M,p=M.version,v=n.toneMapping),h.layers.enableAll(),S.unshift(h,h.geometry,h.material,0,0,null)):M&&M.isTexture&&(f===void 0&&(f=new Rn(new yf(2,2),new $r({name:"BackgroundMaterial",uniforms:$l(Cr.background.uniforms),vertexShader:Cr.background.vertexShader,fragmentShader:Cr.background.fragmentShader,side:Rs,depthTest:!1,depthWrite:!1,fog:!1})),f.geometry.deleteAttribute("normal"),Object.defineProperty(f.material,"map",{get:function(){return this.uniforms.t2D.value}}),r.update(f)),f.material.uniforms.t2D.value=M,f.material.uniforms.backgroundIntensity.value=g.backgroundIntensity,f.material.toneMapped=Ft.getTransfer(M.colorSpace)!==jt,M.matrixAutoUpdate===!0&&M.updateMatrix(),f.material.uniforms.uvTransform.value.copy(M.matrix),(d!==M||p!==M.version||v!==n.toneMapping)&&(f.material.needsUpdate=!0,d=M,p=M.version,v=n.toneMapping),f.layers.enableAll(),S.unshift(f,f.geometry,f.material,0,0,null))}function w(S,g){S.getRGB(nd,DT(n)),i.buffers.color.setClear(nd.r,nd.g,nd.b,g,o)}return{getClearColor:function(){return a},setClearColor:function(S,g=1){a.set(S),u=g,w(a,u)},getClearAlpha:function(){return u},setClearAlpha:function(S){u=S,w(a,u)},render:y}}function aI(n,e,t,i){const r=n.getParameter(n.MAX_VERTEX_ATTRIBS),s=i.isWebGL2?null:e.get("OES_vertex_array_object"),o=i.isWebGL2||s!==null,a={},u=S(null);let f=u,h=!1;function d(V,Q,te,ae,N){let B=!1;if(o){const H=w(ae,te,Q);f!==H&&(f=H,v(f.object)),B=g(V,ae,te,N),B&&x(V,ae,te,N)}else{const H=Q.wireframe===!0;(f.geometry!==ae.id||f.program!==te.id||f.wireframe!==H)&&(f.geometry=ae.id,f.program=te.id,f.wireframe=H,B=!0)}N!==null&&t.update(N,n.ELEMENT_ARRAY_BUFFER),(B||h)&&(h=!1,D(V,Q,te,ae),N!==null&&n.bindBuffer(n.ELEMENT_ARRAY_BUFFER,t.get(N).buffer))}function p(){return i.isWebGL2?n.createVertexArray():s.createVertexArrayOES()}function v(V){return i.isWebGL2?n.bindVertexArray(V):s.bindVertexArrayOES(V)}function y(V){return i.isWebGL2?n.deleteVertexArray(V):s.deleteVertexArrayOES(V)}function w(V,Q,te){const ae=te.wireframe===!0;let N=a[V.id];N===void 0&&(N={},a[V.id]=N);let B=N[Q.id];B===void 0&&(B={},N[Q.id]=B);let H=B[ae];return H===void 0&&(H=S(p()),B[ae]=H),H}function S(V){const Q=[],te=[],ae=[];for(let N=0;N=0){const ie=N[J];let pe=B[J];if(pe===void 0&&(J==="instanceMatrix"&&V.instanceMatrix&&(pe=V.instanceMatrix),J==="instanceColor"&&V.instanceColor&&(pe=V.instanceColor)),ie===void 0||ie.attribute!==pe||pe&&ie.data!==pe.data)return!0;H++}return f.attributesNum!==H||f.index!==ae}function x(V,Q,te,ae){const N={},B=Q.attributes;let H=0;const Y=te.getAttributes();for(const J in Y)if(Y[J].location>=0){let ie=B[J];ie===void 0&&(J==="instanceMatrix"&&V.instanceMatrix&&(ie=V.instanceMatrix),J==="instanceColor"&&V.instanceColor&&(ie=V.instanceColor));const pe={};pe.attribute=ie,ie&&ie.data&&(pe.data=ie.data),N[J]=pe,H++}f.attributes=N,f.attributesNum=H,f.index=ae}function M(){const V=f.newAttributes;for(let Q=0,te=V.length;Q=0){let Z=N[Y];if(Z===void 0&&(Y==="instanceMatrix"&&V.instanceMatrix&&(Z=V.instanceMatrix),Y==="instanceColor"&&V.instanceColor&&(Z=V.instanceColor)),Z!==void 0){const ie=Z.normalized,pe=Z.itemSize,Ee=t.get(Z);if(Ee===void 0)continue;const Te=Ee.buffer,nt=Ee.type,lt=Ee.bytesPerElement,Xe=i.isWebGL2===!0&&(nt===n.INT||nt===n.UNSIGNED_INT||Z.gpuType===By);if(Z.isInterleavedBufferAttribute){const Ke=Z.data,G=Ke.stride,we=Z.offset;if(Ke.isInstancedInterleavedBuffer){for(let me=0;me0&&n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.HIGH_FLOAT).precision>0)return"highp";L="mediump"}return L==="mediump"&&n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.MEDIUM_FLOAT).precision>0&&n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}const o=typeof WebGL2RenderingContext<"u"&&n.constructor.name==="WebGL2RenderingContext";let a=t.precision!==void 0?t.precision:"highp";const u=s(a);u!==a&&(console.warn("THREE.WebGLRenderer:",a,"not supported, using",u,"instead."),a=u);const f=o||e.has("WEBGL_draw_buffers"),h=t.logarithmicDepthBuffer===!0,d=n.getParameter(n.MAX_TEXTURE_IMAGE_UNITS),p=n.getParameter(n.MAX_VERTEX_TEXTURE_IMAGE_UNITS),v=n.getParameter(n.MAX_TEXTURE_SIZE),y=n.getParameter(n.MAX_CUBE_MAP_TEXTURE_SIZE),w=n.getParameter(n.MAX_VERTEX_ATTRIBS),S=n.getParameter(n.MAX_VERTEX_UNIFORM_VECTORS),g=n.getParameter(n.MAX_VARYING_VECTORS),x=n.getParameter(n.MAX_FRAGMENT_UNIFORM_VECTORS),M=p>0,T=o||e.has("OES_texture_float"),P=M&&T,C=o?n.getParameter(n.MAX_SAMPLES):0;return{isWebGL2:o,drawBuffers:f,getMaxAnisotropy:r,getMaxPrecision:s,precision:a,logarithmicDepthBuffer:h,maxTextures:d,maxVertexTextures:p,maxTextureSize:v,maxCubemapSize:y,maxAttributes:w,maxVertexUniforms:S,maxVaryings:g,maxFragmentUniforms:x,vertexTextures:M,floatFragmentTextures:T,floatVertexTextures:P,maxSamples:C}}function uI(n){const e=this;let t=null,i=0,r=!1,s=!1;const o=new gs,a=new wt,u={value:null,needsUpdate:!1};this.uniform=u,this.numPlanes=0,this.numIntersection=0,this.init=function(d,p){const v=d.length!==0||p||i!==0||r;return r=p,i=d.length,v},this.beginShadows=function(){s=!0,h(null)},this.endShadows=function(){s=!1},this.setGlobalState=function(d,p){t=h(d,p,0)},this.setState=function(d,p,v){const y=d.clippingPlanes,w=d.clipIntersection,S=d.clipShadows,g=n.get(d);if(!r||y===null||y.length===0||s&&!S)s?h(null):f();else{const x=s?0:i,M=x*4;let T=g.clippingState||null;u.value=T,T=h(y,p,M,v);for(let P=0;P!==M;++P)T[P]=t[P];g.clippingState=T,this.numIntersection=w?this.numPlanes:0,this.numPlanes+=x}};function f(){u.value!==t&&(u.value=t,u.needsUpdate=i>0),e.numPlanes=i,e.numIntersection=0}function h(d,p,v,y){const w=d!==null?d.length:0;let S=null;if(w!==0){if(S=u.value,y!==!0||S===null){const g=v+w*4,x=p.matrixWorldInverse;a.getNormalMatrix(x),(S===null||S.length0){const f=new zT(u.height/2);return f.fromEquirectangularTexture(n,o),e.set(o,f),o.addEventListener("dispose",r),t(f.texture,o.mapping)}else return null}}return o}function r(o){const a=o.target;a.removeEventListener("dispose",r);const u=e.get(a);u!==void 0&&(e.delete(a),u.dispose())}function s(){e=new WeakMap}return{get:i,dispose:s}}class Ss extends mf{constructor(e=-1,t=1,i=1,r=-1,s=.1,o=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=e,this.right=t,this.top=i,this.bottom=r,this.near=s,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,i,r,s,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=i,this.view.offsetY=r,this.view.width=s,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),i=(this.right+this.left)/2,r=(this.top+this.bottom)/2;let s=i-e,o=i+e,a=r+t,u=r-t;if(this.view!==null&&this.view.enabled){const f=(this.right-this.left)/this.view.fullWidth/this.zoom,h=(this.top-this.bottom)/this.view.fullHeight/this.zoom;s+=f*this.view.offsetX,o=s+f*this.view.width,a-=h*this.view.offsetY,u=a-h*this.view.height}this.projectionMatrix.makeOrthographic(s,o,a,u,this.near,this.far,this.coordinateSystem),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}}const Il=4,NS=[.125,.215,.35,.446,.526,.582],$o=20,wg=new Ss,DS=new Be;let Eg=null,Tg=0,Ag=0;const Qo=(1+Math.sqrt(5))/2,ll=1/Qo,US=[new z(1,1,1),new z(-1,1,1),new z(1,1,-1),new z(-1,1,-1),new z(0,Qo,ll),new z(0,Qo,-ll),new z(ll,0,Qo),new z(-ll,0,Qo),new z(Qo,ll,0),new z(-Qo,ll,0)];class bv{constructor(e){this._renderer=e,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._lodPlanes=[],this._sizeLods=[],this._sigmas=[],this._blurMaterial=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._compileMaterial(this._blurMaterial)}fromScene(e,t=0,i=.1,r=100){Eg=this._renderer.getRenderTarget(),Tg=this._renderer.getActiveCubeFace(),Ag=this._renderer.getActiveMipmapLevel(),this._setSize(256);const s=this._allocateTargets();return s.depthBuffer=!0,this._sceneToCubeUV(e,i,r,s),t>0&&this._blur(s,0,0,t),this._applyPMREM(s),this._cleanup(s),s}fromEquirectangular(e,t=null){return this._fromTexture(e,t)}fromCubemap(e,t=null){return this._fromTexture(e,t)}compileCubemapShader(){this._cubemapMaterial===null&&(this._cubemapMaterial=FS(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=zS(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),this._cubemapMaterial!==null&&this._cubemapMaterial.dispose(),this._equirectMaterial!==null&&this._equirectMaterial.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._pingPongRenderTarget!==null&&this._pingPongRenderTarget.dispose();for(let e=0;e2?M:0,M,M),h.setRenderTarget(r),w&&h.render(y,a),h.render(e,a)}y.geometry.dispose(),y.material.dispose(),h.toneMapping=p,h.autoClear=d,e.background=S}_textureToCubeUV(e,t){const i=this._renderer,r=e.mapping===Ps||e.mapping===yo;r?(this._cubemapMaterial===null&&(this._cubemapMaterial=FS()),this._cubemapMaterial.uniforms.flipEnvMap.value=e.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=zS());const s=r?this._cubemapMaterial:this._equirectMaterial,o=new Rn(this._lodPlanes[0],s),a=s.uniforms;a.envMap.value=e;const u=this._cubeSize;id(t,0,0,3*u,2*u),i.setRenderTarget(t),i.render(o,wg)}_applyPMREM(e){const t=this._renderer,i=t.autoClear;t.autoClear=!1;for(let r=1;r$o&&console.warn(`sigmaRadians, ${s}, is too large and will clip, as it requested ${S} samples when the maximum is set to ${$o}`);const g=[];let x=0;for(let L=0;L<$o;++L){const D=L/w,b=Math.exp(-D*D/2);g.push(b),L===0?x+=b:LM-Il?r-M+Il:0),C=4*(this._cubeSize-T);id(t,P,C,3*T,2*T),u.setRenderTarget(t),u.render(d,wg)}}function hI(n){const e=[],t=[],i=[];let r=n;const s=n-Il+1+NS.length;for(let o=0;on-Il?u=NS[o-n+Il-1]:o===0&&(u=0),i.push(u);const f=1/(a-2),h=-f,d=1+f,p=[h,h,d,h,d,d,h,h,d,d,h,d],v=6,y=6,w=3,S=2,g=1,x=new Float32Array(w*y*v),M=new Float32Array(S*y*v),T=new Float32Array(g*y*v);for(let C=0;C2?0:-1,b=[L,D,0,L+2/3,D,0,L+2/3,D+1,0,L,D,0,L+2/3,D+1,0,L,D+1,0];x.set(b,w*y*C),M.set(p,S*y*C);const R=[C,C,C,C,C,C];T.set(R,g*y*C)}const P=new St;P.setAttribute("position",new Ht(x,w)),P.setAttribute("uv",new Ht(M,S)),P.setAttribute("faceIndex",new Ht(T,g)),e.push(P),r>Il&&r--}return{lodPlanes:e,sizeLods:t,sigmas:i}}function OS(n,e,t){const i=new gr(n,e,t);return i.texture.mapping=oc,i.texture.name="PMREM.cubeUv",i.scissorTest=!0,i}function id(n,e,t,i,r){n.viewport.set(e,t,i,r),n.scissor.set(e,t,i,r)}function dI(n,e,t){const i=new Float32Array($o),r=new z(0,1,0);return new $r({name:"SphericalGaussianBlur",defines:{n:$o,CUBEUV_TEXEL_WIDTH:1/e,CUBEUV_TEXEL_HEIGHT:1/t,CUBEUV_MAX_MIP:`${n}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:i},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:r}},vertexShader:t_(),fragmentShader:` precision mediump float; precision mediump int; @@ -3573,7 +3573,7 @@ void main() { } } - `,blending:Es,depthTest:!1,depthWrite:!1})}function OS(){return new $r({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:t_(),fragmentShader:` + `,blending:Es,depthTest:!1,depthWrite:!1})}function zS(){return new $r({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:t_(),fragmentShader:` precision mediump float; precision mediump int; @@ -3663,7 +3663,7 @@ void main() { gl_Position = vec4( position, 1.0 ); } - `}function pI(n){let e=new WeakMap,t=null;function i(a){if(a&&a.isTexture){const u=a.mapping,f=u===Ou||u===Fu,h=u===Ps||u===yo;if(f||h)if(a.isRenderTargetTexture&&a.needsPMREMUpdate===!0){a.needsPMREMUpdate=!1;let d=e.get(a);return t===null&&(t=new bv(n)),d=f?t.fromEquirectangular(a,d):t.fromCubemap(a,d),e.set(a,d),d.texture}else{if(e.has(a))return e.get(a).texture;{const d=a.image;if(f&&d&&d.height>0||h&&d&&r(d)){t===null&&(t=new bv(n));const p=f?t.fromEquirectangular(a):t.fromCubemap(a);return e.set(a,p),a.addEventListener("dispose",s),p.texture}else return null}}}return a}function r(a){let u=0;const f=6;for(let h=0;he.maxTextureSize&&(k=Math.ceil(R/e.maxTextureSize),R=e.maxTextureSize);const q=new Float32Array(R*k*4*w),oe=new nm(q,R,k,w);oe.type=hr,oe.needsUpdate=!0;const V=b*4;for(let te=0;te0)return n;const r=e*t;let s=kS[r];if(s===void 0&&(s=new Float32Array(r),kS[r]=s),e!==0){i.toArray(s,0);for(let o=1,a=0;o!==e;++o)a+=t,n[o].toArray(s,a)}return s}function Pn(n,e){if(n.length!==e.length)return!1;for(let t=0,i=n.length;t0||h&&d&&r(d)){t===null&&(t=new bv(n));const p=f?t.fromEquirectangular(a):t.fromCubemap(a);return e.set(a,p),a.addEventListener("dispose",s),p.texture}else return null}}}return a}function r(a){let u=0;const f=6;for(let h=0;he.maxTextureSize&&(k=Math.ceil(R/e.maxTextureSize),R=e.maxTextureSize);const q=new Float32Array(R*k*4*w),oe=new nm(q,R,k,w);oe.type=hr,oe.needsUpdate=!0;const V=b*4;for(let te=0;te0)return n;const r=e*t;let s=kS[r];if(s===void 0&&(s=new Float32Array(r),kS[r]=s),e!==0){i.toArray(s,0);for(let o=1,a=0;o!==e;++o)a+=t,n[o].toArray(s,a)}return s}function Pn(n,e){if(n.length!==e.length)return!1;for(let t=0,i=n.length;t":" "} ${a}: ${t[o]}`)}return i.join(` `)}function g8(n){const e=Ft.getPrimaries(Ft.workingColorSpace),t=Ft.getPrimaries(n);let i;switch(e===t?i="":e===ju&&t===Xu?i="LinearDisplayP3ToLinearSRGB":e===Xu&&t===ju&&(i="LinearSRGBToLinearDisplayP3"),n){case Qr:case df:return[i,"LinearTransferOETF"];case Cn:case tm:return[i,"sRGBTransferOETF"];default:return console.warn("THREE.WebGLProgram: Unsupported color space:",n),[i,"LinearTransferOETF"]}}function jS(n,e,t){const i=n.getShaderParameter(e,n.COMPILE_STATUS),r=n.getShaderInfoLog(e).trim();if(i&&r==="")return"";const s=/ERROR: 0:(\d+)/.exec(r);if(s){const o=parseInt(s[1]);return t.toUpperCase()+` @@ -3694,7 +3694,7 @@ precision `+n.precision+" int;";return n.precision==="highp"?e+=` Program Info Log: `+oe+` `+N+` -`+B)}else oe!==""?console.warn("THREE.WebGLProgram: Program Info Log:",oe):(V===""||Q==="")&&(ae=!1);ae&&(q.diagnostics={runnable:te,programLog:oe,vertexShader:{log:V,prefix:g},fragmentShader:{log:Q,prefix:x}})}r.deleteShader(C),r.deleteShader(L),b=new Jd(r,S),R=M8(r,S)}let b;this.getUniforms=function(){return b===void 0&&D(this),b};let R;this.getAttributes=function(){return R===void 0&&D(this),R};let k=t.rendererExtensionParallelShaderCompile===!1;return this.isReady=function(){return k===!1&&(k=r.getProgramParameter(S,d8)),k},this.destroy=function(){i.releaseStatesOfProgram(this),r.deleteProgram(S),this.program=void 0},this.type=t.shaderType,this.name=t.shaderName,this.id=p8++,this.cacheKey=e,this.usedTimes=1,this.program=S,this.vertexShader=C,this.fragmentShader=L,this}let D8=0;class U8{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(e){const t=e.vertexShader,i=e.fragmentShader,r=this._getShaderStage(t),s=this._getShaderStage(i),o=this._getShaderCacheForMaterial(e);return o.has(r)===!1&&(o.add(r),r.usedTimes++),o.has(s)===!1&&(o.add(s),s.usedTimes++),this}remove(e){const t=this.materialCache.get(e);for(const i of t)i.usedTimes--,i.usedTimes===0&&this.shaderCache.delete(i.code);return this.materialCache.delete(e),this}getVertexShaderID(e){return this._getShaderStage(e.vertexShader).id}getFragmentShaderID(e){return this._getShaderStage(e.fragmentShader).id}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(e){const t=this.materialCache;let i=t.get(e);return i===void 0&&(i=new Set,t.set(e,i)),i}_getShaderStage(e){const t=this.shaderCache;let i=t.get(e);return i===void 0&&(i=new z8(e),t.set(e,i)),i}}class z8{constructor(e){this.id=D8++,this.code=e,this.usedTimes=0}}function O8(n,e,t,i,r,s,o){const a=new fa,u=new U8,f=[],h=r.isWebGL2,d=r.logarithmicDepthBuffer,p=r.vertexTextures;let v=r.precision;const y={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"};function w(b){return b===0?"uv":`uv${b}`}function S(b,R,k,q,oe){const V=q.fog,Q=oe.geometry,te=b.isMeshStandardMaterial?q.environment:null,ae=(b.isMeshStandardMaterial?t:e).get(b.envMap||te),N=ae&&ae.mapping===oc?ae.image.height:null,B=y[b.type];b.precision!==null&&(v=r.getMaxPrecision(b.precision),v!==b.precision&&console.warn("THREE.WebGLProgram.getParameters:",b.precision,"not supported, using",v,"instead."));const H=Q.morphAttributes.position||Q.morphAttributes.normal||Q.morphAttributes.color,Y=H!==void 0?H.length:0;let J=0;Q.morphAttributes.position!==void 0&&(J=1),Q.morphAttributes.normal!==void 0&&(J=2),Q.morphAttributes.color!==void 0&&(J=3);let Z,ie,pe,Ee;if(B){const Jt=Cr[B];Z=Jt.vertexShader,ie=Jt.fragmentShader}else Z=b.vertexShader,ie=b.fragmentShader,u.update(b),pe=u.getVertexShaderID(b),Ee=u.getFragmentShaderID(b);const Te=n.getRenderTarget(),nt=oe.isInstancedMesh===!0,lt=oe.isBatchedMesh===!0,Xe=!!b.map,Ke=!!b.matcap,G=!!ae,we=!!b.aoMap,me=!!b.lightMap,Ce=!!b.bumpMap,he=!!b.normalMap,Ze=!!b.displacementMap,Ne=!!b.emissiveMap,U=!!b.metalnessMap,I=!!b.roughnessMap,ee=b.anisotropy>0,xe=b.clearcoat>0,_e=b.iridescence>0,ye=b.sheen>0,je=b.transmission>0,Le=ee&&!!b.anisotropyMap,Fe=xe&&!!b.clearcoatMap,tt=xe&&!!b.clearcoatNormalMap,dt=xe&&!!b.clearcoatRoughnessMap,Se=_e&&!!b.iridescenceMap,Ct=_e&&!!b.iridescenceThicknessMap,yt=ye&&!!b.sheenColorMap,ct=ye&&!!b.sheenRoughnessMap,et=!!b.specularMap,He=!!b.specularColorMap,X=!!b.specularIntensityMap,ge=je&&!!b.transmissionMap,Oe=je&&!!b.thicknessMap,Ue=!!b.gradientMap,Me=!!b.alphaMap,W=b.alphaTest>0,Re=!!b.alphaHash,Ie=!!b.extensions,it=!!Q.attributes.uv1,Ye=!!Q.attributes.uv2,At=!!Q.attributes.uv3;let Rt=Zr;return b.toneMapped&&(Te===null||Te.isXRRenderTarget===!0)&&(Rt=n.toneMapping),{isWebGL2:h,shaderID:B,shaderType:b.type,shaderName:b.name,vertexShader:Z,fragmentShader:ie,defines:b.defines,customVertexShaderID:pe,customFragmentShaderID:Ee,isRawShaderMaterial:b.isRawShaderMaterial===!0,glslVersion:b.glslVersion,precision:v,batching:lt,instancing:nt,instancingColor:nt&&oe.instanceColor!==null,supportsVertexTextures:p,outputColorSpace:Te===null?n.outputColorSpace:Te.isXRRenderTarget===!0?Te.texture.colorSpace:Qr,map:Xe,matcap:Ke,envMap:G,envMapMode:G&&ae.mapping,envMapCubeUVHeight:N,aoMap:we,lightMap:me,bumpMap:Ce,normalMap:he,displacementMap:p&&Ze,emissiveMap:Ne,normalMapObjectSpace:he&&b.normalMapType===MT,normalMapTangentSpace:he&&b.normalMapType===Eo,metalnessMap:U,roughnessMap:I,anisotropy:ee,anisotropyMap:Le,clearcoat:xe,clearcoatMap:Fe,clearcoatNormalMap:tt,clearcoatRoughnessMap:dt,iridescence:_e,iridescenceMap:Se,iridescenceThicknessMap:Ct,sheen:ye,sheenColorMap:yt,sheenRoughnessMap:ct,specularMap:et,specularColorMap:He,specularIntensityMap:X,transmission:je,transmissionMap:ge,thicknessMap:Oe,gradientMap:Ue,opaque:b.transparent===!1&&b.blending===ca,alphaMap:Me,alphaTest:W,alphaHash:Re,combine:b.combine,mapUv:Xe&&w(b.map.channel),aoMapUv:we&&w(b.aoMap.channel),lightMapUv:me&&w(b.lightMap.channel),bumpMapUv:Ce&&w(b.bumpMap.channel),normalMapUv:he&&w(b.normalMap.channel),displacementMapUv:Ze&&w(b.displacementMap.channel),emissiveMapUv:Ne&&w(b.emissiveMap.channel),metalnessMapUv:U&&w(b.metalnessMap.channel),roughnessMapUv:I&&w(b.roughnessMap.channel),anisotropyMapUv:Le&&w(b.anisotropyMap.channel),clearcoatMapUv:Fe&&w(b.clearcoatMap.channel),clearcoatNormalMapUv:tt&&w(b.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:dt&&w(b.clearcoatRoughnessMap.channel),iridescenceMapUv:Se&&w(b.iridescenceMap.channel),iridescenceThicknessMapUv:Ct&&w(b.iridescenceThicknessMap.channel),sheenColorMapUv:yt&&w(b.sheenColorMap.channel),sheenRoughnessMapUv:ct&&w(b.sheenRoughnessMap.channel),specularMapUv:et&&w(b.specularMap.channel),specularColorMapUv:He&&w(b.specularColorMap.channel),specularIntensityMapUv:X&&w(b.specularIntensityMap.channel),transmissionMapUv:ge&&w(b.transmissionMap.channel),thicknessMapUv:Oe&&w(b.thicknessMap.channel),alphaMapUv:Me&&w(b.alphaMap.channel),vertexTangents:!!Q.attributes.tangent&&(he||ee),vertexColors:b.vertexColors,vertexAlphas:b.vertexColors===!0&&!!Q.attributes.color&&Q.attributes.color.itemSize===4,vertexUv1s:it,vertexUv2s:Ye,vertexUv3s:At,pointsUvs:oe.isPoints===!0&&!!Q.attributes.uv&&(Xe||Me),fog:!!V,useFog:b.fog===!0,fogExp2:V&&V.isFogExp2,flatShading:b.flatShading===!0,sizeAttenuation:b.sizeAttenuation===!0,logarithmicDepthBuffer:d,skinning:oe.isSkinnedMesh===!0,morphTargets:Q.morphAttributes.position!==void 0,morphNormals:Q.morphAttributes.normal!==void 0,morphColors:Q.morphAttributes.color!==void 0,morphTargetsCount:Y,morphTextureStride:J,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,numClippingPlanes:o.numPlanes,numClipIntersection:o.numIntersection,dithering:b.dithering,shadowMapEnabled:n.shadowMap.enabled&&k.length>0,shadowMapType:n.shadowMap.type,toneMapping:Rt,useLegacyLights:n._useLegacyLights,decodeVideoTexture:Xe&&b.map.isVideoTexture===!0&&Ft.getTransfer(b.map.colorSpace)===jt,premultipliedAlpha:b.premultipliedAlpha,doubleSided:b.side===jr,flipSided:b.side===vi,useDepthPacking:b.depthPacking>=0,depthPacking:b.depthPacking||0,index0AttributeName:b.index0AttributeName,extensionDerivatives:Ie&&b.extensions.derivatives===!0,extensionFragDepth:Ie&&b.extensions.fragDepth===!0,extensionDrawBuffers:Ie&&b.extensions.drawBuffers===!0,extensionShaderTextureLOD:Ie&&b.extensions.shaderTextureLOD===!0,extensionClipCullDistance:Ie&&b.extensions.clipCullDistance&&i.has("WEBGL_clip_cull_distance"),rendererExtensionFragDepth:h||i.has("EXT_frag_depth"),rendererExtensionDrawBuffers:h||i.has("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:h||i.has("EXT_shader_texture_lod"),rendererExtensionParallelShaderCompile:i.has("KHR_parallel_shader_compile"),customProgramCacheKey:b.customProgramCacheKey()}}function g(b){const R=[];if(b.shaderID?R.push(b.shaderID):(R.push(b.customVertexShaderID),R.push(b.customFragmentShaderID)),b.defines!==void 0)for(const k in b.defines)R.push(k),R.push(b.defines[k]);return b.isRawShaderMaterial===!1&&(x(R,b),M(R,b),R.push(n.outputColorSpace)),R.push(b.customProgramCacheKey),R.join()}function x(b,R){b.push(R.precision),b.push(R.outputColorSpace),b.push(R.envMapMode),b.push(R.envMapCubeUVHeight),b.push(R.mapUv),b.push(R.alphaMapUv),b.push(R.lightMapUv),b.push(R.aoMapUv),b.push(R.bumpMapUv),b.push(R.normalMapUv),b.push(R.displacementMapUv),b.push(R.emissiveMapUv),b.push(R.metalnessMapUv),b.push(R.roughnessMapUv),b.push(R.anisotropyMapUv),b.push(R.clearcoatMapUv),b.push(R.clearcoatNormalMapUv),b.push(R.clearcoatRoughnessMapUv),b.push(R.iridescenceMapUv),b.push(R.iridescenceThicknessMapUv),b.push(R.sheenColorMapUv),b.push(R.sheenRoughnessMapUv),b.push(R.specularMapUv),b.push(R.specularColorMapUv),b.push(R.specularIntensityMapUv),b.push(R.transmissionMapUv),b.push(R.thicknessMapUv),b.push(R.combine),b.push(R.fogExp2),b.push(R.sizeAttenuation),b.push(R.morphTargetsCount),b.push(R.morphAttributeCount),b.push(R.numDirLights),b.push(R.numPointLights),b.push(R.numSpotLights),b.push(R.numSpotLightMaps),b.push(R.numHemiLights),b.push(R.numRectAreaLights),b.push(R.numDirLightShadows),b.push(R.numPointLightShadows),b.push(R.numSpotLightShadows),b.push(R.numSpotLightShadowsWithMaps),b.push(R.numLightProbes),b.push(R.shadowMapType),b.push(R.toneMapping),b.push(R.numClippingPlanes),b.push(R.numClipIntersection),b.push(R.depthPacking)}function M(b,R){a.disableAll(),R.isWebGL2&&a.enable(0),R.supportsVertexTextures&&a.enable(1),R.instancing&&a.enable(2),R.instancingColor&&a.enable(3),R.matcap&&a.enable(4),R.envMap&&a.enable(5),R.normalMapObjectSpace&&a.enable(6),R.normalMapTangentSpace&&a.enable(7),R.clearcoat&&a.enable(8),R.iridescence&&a.enable(9),R.alphaTest&&a.enable(10),R.vertexColors&&a.enable(11),R.vertexAlphas&&a.enable(12),R.vertexUv1s&&a.enable(13),R.vertexUv2s&&a.enable(14),R.vertexUv3s&&a.enable(15),R.vertexTangents&&a.enable(16),R.anisotropy&&a.enable(17),R.alphaHash&&a.enable(18),R.batching&&a.enable(19),b.push(a.mask),a.disableAll(),R.fog&&a.enable(0),R.useFog&&a.enable(1),R.flatShading&&a.enable(2),R.logarithmicDepthBuffer&&a.enable(3),R.skinning&&a.enable(4),R.morphTargets&&a.enable(5),R.morphNormals&&a.enable(6),R.morphColors&&a.enable(7),R.premultipliedAlpha&&a.enable(8),R.shadowMapEnabled&&a.enable(9),R.useLegacyLights&&a.enable(10),R.doubleSided&&a.enable(11),R.flipSided&&a.enable(12),R.useDepthPacking&&a.enable(13),R.dithering&&a.enable(14),R.transmission&&a.enable(15),R.sheen&&a.enable(16),R.opaque&&a.enable(17),R.pointsUvs&&a.enable(18),R.decodeVideoTexture&&a.enable(19),b.push(a.mask)}function T(b){const R=y[b.type];let k;if(R){const q=Cr[R];k=UT.clone(q.uniforms)}else k=b.uniforms;return k}function P(b,R){let k;for(let q=0,oe=f.length;q0?i.push(g):v.transparent===!0?r.push(g):t.push(g)}function u(d,p,v,y,w,S){const g=o(d,p,v,y,w,S);v.transmission>0?i.unshift(g):v.transparent===!0?r.unshift(g):t.unshift(g)}function f(d,p){t.length>1&&t.sort(d||k8),i.length>1&&i.sort(p||JS),r.length>1&&r.sort(p||JS)}function h(){for(let d=e,p=n.length;d=s.length?(o=new QS,s.push(o)):o=s[r],o}function t(){n=new WeakMap}return{get:e,dispose:t}}function H8(){const n={};return{get:function(e){if(n[e.id]!==void 0)return n[e.id];let t;switch(e.type){case"DirectionalLight":t={direction:new O,color:new Be};break;case"SpotLight":t={position:new O,direction:new O,color:new Be,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":t={position:new O,color:new Be,distance:0,decay:0};break;case"HemisphereLight":t={direction:new O,skyColor:new Be,groundColor:new Be};break;case"RectAreaLight":t={color:new Be,position:new O,halfWidth:new O,halfHeight:new O};break}return n[e.id]=t,t}}}function V8(){const n={};return{get:function(e){if(n[e.id]!==void 0)return n[e.id];let t;switch(e.type){case"DirectionalLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new de};break;case"SpotLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new de};break;case"PointLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new de,shadowCameraNear:1,shadowCameraFar:1e3};break}return n[e.id]=t,t}}}let G8=0;function W8(n,e){return(e.castShadow?2:0)-(n.castShadow?2:0)+(e.map?1:0)-(n.map?1:0)}function X8(n,e){const t=new H8,i=V8(),r={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 h=0;h<9;h++)r.probe.push(new O);const s=new O,o=new ft,a=new ft;function u(h,d){let p=0,v=0,y=0;for(let q=0;q<9;q++)r.probe[q].set(0,0,0);let w=0,S=0,g=0,x=0,M=0,T=0,P=0,C=0,L=0,D=0,b=0;h.sort(W8);const R=d===!0?Math.PI:1;for(let q=0,oe=h.length;q0&&(e.isWebGL2?n.has("OES_texture_float_linear")===!0?(r.rectAreaLTC1=Pe.LTC_FLOAT_1,r.rectAreaLTC2=Pe.LTC_FLOAT_2):(r.rectAreaLTC1=Pe.LTC_HALF_1,r.rectAreaLTC2=Pe.LTC_HALF_2):n.has("OES_texture_float_linear")===!0?(r.rectAreaLTC1=Pe.LTC_FLOAT_1,r.rectAreaLTC2=Pe.LTC_FLOAT_2):n.has("OES_texture_half_float_linear")===!0?(r.rectAreaLTC1=Pe.LTC_HALF_1,r.rectAreaLTC2=Pe.LTC_HALF_2):console.error("THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.")),r.ambient[0]=p,r.ambient[1]=v,r.ambient[2]=y;const k=r.hash;(k.directionalLength!==w||k.pointLength!==S||k.spotLength!==g||k.rectAreaLength!==x||k.hemiLength!==M||k.numDirectionalShadows!==T||k.numPointShadows!==P||k.numSpotShadows!==C||k.numSpotMaps!==L||k.numLightProbes!==b)&&(r.directional.length=w,r.spot.length=g,r.rectArea.length=x,r.point.length=S,r.hemi.length=M,r.directionalShadow.length=T,r.directionalShadowMap.length=T,r.pointShadow.length=P,r.pointShadowMap.length=P,r.spotShadow.length=C,r.spotShadowMap.length=C,r.directionalShadowMatrix.length=T,r.pointShadowMatrix.length=P,r.spotLightMatrix.length=C+L-D,r.spotLightMap.length=L,r.numSpotLightShadowsWithMaps=D,r.numLightProbes=b,k.directionalLength=w,k.pointLength=S,k.spotLength=g,k.rectAreaLength=x,k.hemiLength=M,k.numDirectionalShadows=T,k.numPointShadows=P,k.numSpotShadows=C,k.numSpotMaps=L,k.numLightProbes=b,r.version=G8++)}function f(h,d){let p=0,v=0,y=0,w=0,S=0;const g=d.matrixWorldInverse;for(let x=0,M=h.length;x=a.length?(u=new $S(n,e),a.push(u)):u=a[o],u}function r(){t=new WeakMap}return{get:i,dispose:r}}class n_ extends Yn{constructor(e){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=xT,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}}class i_ extends Yn{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}}const Y8=`void main() { +`+B)}else oe!==""?console.warn("THREE.WebGLProgram: Program Info Log:",oe):(V===""||Q==="")&&(ae=!1);ae&&(q.diagnostics={runnable:te,programLog:oe,vertexShader:{log:V,prefix:g},fragmentShader:{log:Q,prefix:x}})}r.deleteShader(C),r.deleteShader(L),b=new Jd(r,S),R=M8(r,S)}let b;this.getUniforms=function(){return b===void 0&&D(this),b};let R;this.getAttributes=function(){return R===void 0&&D(this),R};let k=t.rendererExtensionParallelShaderCompile===!1;return this.isReady=function(){return k===!1&&(k=r.getProgramParameter(S,d8)),k},this.destroy=function(){i.releaseStatesOfProgram(this),r.deleteProgram(S),this.program=void 0},this.type=t.shaderType,this.name=t.shaderName,this.id=p8++,this.cacheKey=e,this.usedTimes=1,this.program=S,this.vertexShader=C,this.fragmentShader=L,this}let D8=0;class U8{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(e){const t=e.vertexShader,i=e.fragmentShader,r=this._getShaderStage(t),s=this._getShaderStage(i),o=this._getShaderCacheForMaterial(e);return o.has(r)===!1&&(o.add(r),r.usedTimes++),o.has(s)===!1&&(o.add(s),s.usedTimes++),this}remove(e){const t=this.materialCache.get(e);for(const i of t)i.usedTimes--,i.usedTimes===0&&this.shaderCache.delete(i.code);return this.materialCache.delete(e),this}getVertexShaderID(e){return this._getShaderStage(e.vertexShader).id}getFragmentShaderID(e){return this._getShaderStage(e.fragmentShader).id}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(e){const t=this.materialCache;let i=t.get(e);return i===void 0&&(i=new Set,t.set(e,i)),i}_getShaderStage(e){const t=this.shaderCache;let i=t.get(e);return i===void 0&&(i=new O8(e),t.set(e,i)),i}}class O8{constructor(e){this.id=D8++,this.code=e,this.usedTimes=0}}function z8(n,e,t,i,r,s,o){const a=new fa,u=new U8,f=[],h=r.isWebGL2,d=r.logarithmicDepthBuffer,p=r.vertexTextures;let v=r.precision;const y={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"};function w(b){return b===0?"uv":`uv${b}`}function S(b,R,k,q,oe){const V=q.fog,Q=oe.geometry,te=b.isMeshStandardMaterial?q.environment:null,ae=(b.isMeshStandardMaterial?t:e).get(b.envMap||te),N=ae&&ae.mapping===oc?ae.image.height:null,B=y[b.type];b.precision!==null&&(v=r.getMaxPrecision(b.precision),v!==b.precision&&console.warn("THREE.WebGLProgram.getParameters:",b.precision,"not supported, using",v,"instead."));const H=Q.morphAttributes.position||Q.morphAttributes.normal||Q.morphAttributes.color,Y=H!==void 0?H.length:0;let J=0;Q.morphAttributes.position!==void 0&&(J=1),Q.morphAttributes.normal!==void 0&&(J=2),Q.morphAttributes.color!==void 0&&(J=3);let Z,ie,pe,Ee;if(B){const Jt=Cr[B];Z=Jt.vertexShader,ie=Jt.fragmentShader}else Z=b.vertexShader,ie=b.fragmentShader,u.update(b),pe=u.getVertexShaderID(b),Ee=u.getFragmentShaderID(b);const Te=n.getRenderTarget(),nt=oe.isInstancedMesh===!0,lt=oe.isBatchedMesh===!0,Xe=!!b.map,Ke=!!b.matcap,G=!!ae,we=!!b.aoMap,me=!!b.lightMap,Ce=!!b.bumpMap,he=!!b.normalMap,Ze=!!b.displacementMap,Ne=!!b.emissiveMap,U=!!b.metalnessMap,I=!!b.roughnessMap,ee=b.anisotropy>0,xe=b.clearcoat>0,_e=b.iridescence>0,ye=b.sheen>0,je=b.transmission>0,Le=ee&&!!b.anisotropyMap,Fe=xe&&!!b.clearcoatMap,tt=xe&&!!b.clearcoatNormalMap,dt=xe&&!!b.clearcoatRoughnessMap,Se=_e&&!!b.iridescenceMap,Ct=_e&&!!b.iridescenceThicknessMap,yt=ye&&!!b.sheenColorMap,ct=ye&&!!b.sheenRoughnessMap,et=!!b.specularMap,He=!!b.specularColorMap,X=!!b.specularIntensityMap,ge=je&&!!b.transmissionMap,ze=je&&!!b.thicknessMap,Ue=!!b.gradientMap,Me=!!b.alphaMap,W=b.alphaTest>0,Re=!!b.alphaHash,Ie=!!b.extensions,it=!!Q.attributes.uv1,Ye=!!Q.attributes.uv2,At=!!Q.attributes.uv3;let Rt=Zr;return b.toneMapped&&(Te===null||Te.isXRRenderTarget===!0)&&(Rt=n.toneMapping),{isWebGL2:h,shaderID:B,shaderType:b.type,shaderName:b.name,vertexShader:Z,fragmentShader:ie,defines:b.defines,customVertexShaderID:pe,customFragmentShaderID:Ee,isRawShaderMaterial:b.isRawShaderMaterial===!0,glslVersion:b.glslVersion,precision:v,batching:lt,instancing:nt,instancingColor:nt&&oe.instanceColor!==null,supportsVertexTextures:p,outputColorSpace:Te===null?n.outputColorSpace:Te.isXRRenderTarget===!0?Te.texture.colorSpace:Qr,map:Xe,matcap:Ke,envMap:G,envMapMode:G&&ae.mapping,envMapCubeUVHeight:N,aoMap:we,lightMap:me,bumpMap:Ce,normalMap:he,displacementMap:p&&Ze,emissiveMap:Ne,normalMapObjectSpace:he&&b.normalMapType===MT,normalMapTangentSpace:he&&b.normalMapType===Eo,metalnessMap:U,roughnessMap:I,anisotropy:ee,anisotropyMap:Le,clearcoat:xe,clearcoatMap:Fe,clearcoatNormalMap:tt,clearcoatRoughnessMap:dt,iridescence:_e,iridescenceMap:Se,iridescenceThicknessMap:Ct,sheen:ye,sheenColorMap:yt,sheenRoughnessMap:ct,specularMap:et,specularColorMap:He,specularIntensityMap:X,transmission:je,transmissionMap:ge,thicknessMap:ze,gradientMap:Ue,opaque:b.transparent===!1&&b.blending===ca,alphaMap:Me,alphaTest:W,alphaHash:Re,combine:b.combine,mapUv:Xe&&w(b.map.channel),aoMapUv:we&&w(b.aoMap.channel),lightMapUv:me&&w(b.lightMap.channel),bumpMapUv:Ce&&w(b.bumpMap.channel),normalMapUv:he&&w(b.normalMap.channel),displacementMapUv:Ze&&w(b.displacementMap.channel),emissiveMapUv:Ne&&w(b.emissiveMap.channel),metalnessMapUv:U&&w(b.metalnessMap.channel),roughnessMapUv:I&&w(b.roughnessMap.channel),anisotropyMapUv:Le&&w(b.anisotropyMap.channel),clearcoatMapUv:Fe&&w(b.clearcoatMap.channel),clearcoatNormalMapUv:tt&&w(b.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:dt&&w(b.clearcoatRoughnessMap.channel),iridescenceMapUv:Se&&w(b.iridescenceMap.channel),iridescenceThicknessMapUv:Ct&&w(b.iridescenceThicknessMap.channel),sheenColorMapUv:yt&&w(b.sheenColorMap.channel),sheenRoughnessMapUv:ct&&w(b.sheenRoughnessMap.channel),specularMapUv:et&&w(b.specularMap.channel),specularColorMapUv:He&&w(b.specularColorMap.channel),specularIntensityMapUv:X&&w(b.specularIntensityMap.channel),transmissionMapUv:ge&&w(b.transmissionMap.channel),thicknessMapUv:ze&&w(b.thicknessMap.channel),alphaMapUv:Me&&w(b.alphaMap.channel),vertexTangents:!!Q.attributes.tangent&&(he||ee),vertexColors:b.vertexColors,vertexAlphas:b.vertexColors===!0&&!!Q.attributes.color&&Q.attributes.color.itemSize===4,vertexUv1s:it,vertexUv2s:Ye,vertexUv3s:At,pointsUvs:oe.isPoints===!0&&!!Q.attributes.uv&&(Xe||Me),fog:!!V,useFog:b.fog===!0,fogExp2:V&&V.isFogExp2,flatShading:b.flatShading===!0,sizeAttenuation:b.sizeAttenuation===!0,logarithmicDepthBuffer:d,skinning:oe.isSkinnedMesh===!0,morphTargets:Q.morphAttributes.position!==void 0,morphNormals:Q.morphAttributes.normal!==void 0,morphColors:Q.morphAttributes.color!==void 0,morphTargetsCount:Y,morphTextureStride:J,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,numClippingPlanes:o.numPlanes,numClipIntersection:o.numIntersection,dithering:b.dithering,shadowMapEnabled:n.shadowMap.enabled&&k.length>0,shadowMapType:n.shadowMap.type,toneMapping:Rt,useLegacyLights:n._useLegacyLights,decodeVideoTexture:Xe&&b.map.isVideoTexture===!0&&Ft.getTransfer(b.map.colorSpace)===jt,premultipliedAlpha:b.premultipliedAlpha,doubleSided:b.side===jr,flipSided:b.side===vi,useDepthPacking:b.depthPacking>=0,depthPacking:b.depthPacking||0,index0AttributeName:b.index0AttributeName,extensionDerivatives:Ie&&b.extensions.derivatives===!0,extensionFragDepth:Ie&&b.extensions.fragDepth===!0,extensionDrawBuffers:Ie&&b.extensions.drawBuffers===!0,extensionShaderTextureLOD:Ie&&b.extensions.shaderTextureLOD===!0,extensionClipCullDistance:Ie&&b.extensions.clipCullDistance&&i.has("WEBGL_clip_cull_distance"),rendererExtensionFragDepth:h||i.has("EXT_frag_depth"),rendererExtensionDrawBuffers:h||i.has("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:h||i.has("EXT_shader_texture_lod"),rendererExtensionParallelShaderCompile:i.has("KHR_parallel_shader_compile"),customProgramCacheKey:b.customProgramCacheKey()}}function g(b){const R=[];if(b.shaderID?R.push(b.shaderID):(R.push(b.customVertexShaderID),R.push(b.customFragmentShaderID)),b.defines!==void 0)for(const k in b.defines)R.push(k),R.push(b.defines[k]);return b.isRawShaderMaterial===!1&&(x(R,b),M(R,b),R.push(n.outputColorSpace)),R.push(b.customProgramCacheKey),R.join()}function x(b,R){b.push(R.precision),b.push(R.outputColorSpace),b.push(R.envMapMode),b.push(R.envMapCubeUVHeight),b.push(R.mapUv),b.push(R.alphaMapUv),b.push(R.lightMapUv),b.push(R.aoMapUv),b.push(R.bumpMapUv),b.push(R.normalMapUv),b.push(R.displacementMapUv),b.push(R.emissiveMapUv),b.push(R.metalnessMapUv),b.push(R.roughnessMapUv),b.push(R.anisotropyMapUv),b.push(R.clearcoatMapUv),b.push(R.clearcoatNormalMapUv),b.push(R.clearcoatRoughnessMapUv),b.push(R.iridescenceMapUv),b.push(R.iridescenceThicknessMapUv),b.push(R.sheenColorMapUv),b.push(R.sheenRoughnessMapUv),b.push(R.specularMapUv),b.push(R.specularColorMapUv),b.push(R.specularIntensityMapUv),b.push(R.transmissionMapUv),b.push(R.thicknessMapUv),b.push(R.combine),b.push(R.fogExp2),b.push(R.sizeAttenuation),b.push(R.morphTargetsCount),b.push(R.morphAttributeCount),b.push(R.numDirLights),b.push(R.numPointLights),b.push(R.numSpotLights),b.push(R.numSpotLightMaps),b.push(R.numHemiLights),b.push(R.numRectAreaLights),b.push(R.numDirLightShadows),b.push(R.numPointLightShadows),b.push(R.numSpotLightShadows),b.push(R.numSpotLightShadowsWithMaps),b.push(R.numLightProbes),b.push(R.shadowMapType),b.push(R.toneMapping),b.push(R.numClippingPlanes),b.push(R.numClipIntersection),b.push(R.depthPacking)}function M(b,R){a.disableAll(),R.isWebGL2&&a.enable(0),R.supportsVertexTextures&&a.enable(1),R.instancing&&a.enable(2),R.instancingColor&&a.enable(3),R.matcap&&a.enable(4),R.envMap&&a.enable(5),R.normalMapObjectSpace&&a.enable(6),R.normalMapTangentSpace&&a.enable(7),R.clearcoat&&a.enable(8),R.iridescence&&a.enable(9),R.alphaTest&&a.enable(10),R.vertexColors&&a.enable(11),R.vertexAlphas&&a.enable(12),R.vertexUv1s&&a.enable(13),R.vertexUv2s&&a.enable(14),R.vertexUv3s&&a.enable(15),R.vertexTangents&&a.enable(16),R.anisotropy&&a.enable(17),R.alphaHash&&a.enable(18),R.batching&&a.enable(19),b.push(a.mask),a.disableAll(),R.fog&&a.enable(0),R.useFog&&a.enable(1),R.flatShading&&a.enable(2),R.logarithmicDepthBuffer&&a.enable(3),R.skinning&&a.enable(4),R.morphTargets&&a.enable(5),R.morphNormals&&a.enable(6),R.morphColors&&a.enable(7),R.premultipliedAlpha&&a.enable(8),R.shadowMapEnabled&&a.enable(9),R.useLegacyLights&&a.enable(10),R.doubleSided&&a.enable(11),R.flipSided&&a.enable(12),R.useDepthPacking&&a.enable(13),R.dithering&&a.enable(14),R.transmission&&a.enable(15),R.sheen&&a.enable(16),R.opaque&&a.enable(17),R.pointsUvs&&a.enable(18),R.decodeVideoTexture&&a.enable(19),b.push(a.mask)}function T(b){const R=y[b.type];let k;if(R){const q=Cr[R];k=UT.clone(q.uniforms)}else k=b.uniforms;return k}function P(b,R){let k;for(let q=0,oe=f.length;q0?i.push(g):v.transparent===!0?r.push(g):t.push(g)}function u(d,p,v,y,w,S){const g=o(d,p,v,y,w,S);v.transmission>0?i.unshift(g):v.transparent===!0?r.unshift(g):t.unshift(g)}function f(d,p){t.length>1&&t.sort(d||k8),i.length>1&&i.sort(p||JS),r.length>1&&r.sort(p||JS)}function h(){for(let d=e,p=n.length;d=s.length?(o=new QS,s.push(o)):o=s[r],o}function t(){n=new WeakMap}return{get:e,dispose:t}}function H8(){const n={};return{get:function(e){if(n[e.id]!==void 0)return n[e.id];let t;switch(e.type){case"DirectionalLight":t={direction:new z,color:new Be};break;case"SpotLight":t={position:new z,direction:new z,color:new Be,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":t={position:new z,color:new Be,distance:0,decay:0};break;case"HemisphereLight":t={direction:new z,skyColor:new Be,groundColor:new Be};break;case"RectAreaLight":t={color:new Be,position:new z,halfWidth:new z,halfHeight:new z};break}return n[e.id]=t,t}}}function V8(){const n={};return{get:function(e){if(n[e.id]!==void 0)return n[e.id];let t;switch(e.type){case"DirectionalLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new de};break;case"SpotLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new de};break;case"PointLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new de,shadowCameraNear:1,shadowCameraFar:1e3};break}return n[e.id]=t,t}}}let G8=0;function W8(n,e){return(e.castShadow?2:0)-(n.castShadow?2:0)+(e.map?1:0)-(n.map?1:0)}function X8(n,e){const t=new H8,i=V8(),r={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 h=0;h<9;h++)r.probe.push(new z);const s=new z,o=new ft,a=new ft;function u(h,d){let p=0,v=0,y=0;for(let q=0;q<9;q++)r.probe[q].set(0,0,0);let w=0,S=0,g=0,x=0,M=0,T=0,P=0,C=0,L=0,D=0,b=0;h.sort(W8);const R=d===!0?Math.PI:1;for(let q=0,oe=h.length;q0&&(e.isWebGL2?n.has("OES_texture_float_linear")===!0?(r.rectAreaLTC1=Pe.LTC_FLOAT_1,r.rectAreaLTC2=Pe.LTC_FLOAT_2):(r.rectAreaLTC1=Pe.LTC_HALF_1,r.rectAreaLTC2=Pe.LTC_HALF_2):n.has("OES_texture_float_linear")===!0?(r.rectAreaLTC1=Pe.LTC_FLOAT_1,r.rectAreaLTC2=Pe.LTC_FLOAT_2):n.has("OES_texture_half_float_linear")===!0?(r.rectAreaLTC1=Pe.LTC_HALF_1,r.rectAreaLTC2=Pe.LTC_HALF_2):console.error("THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.")),r.ambient[0]=p,r.ambient[1]=v,r.ambient[2]=y;const k=r.hash;(k.directionalLength!==w||k.pointLength!==S||k.spotLength!==g||k.rectAreaLength!==x||k.hemiLength!==M||k.numDirectionalShadows!==T||k.numPointShadows!==P||k.numSpotShadows!==C||k.numSpotMaps!==L||k.numLightProbes!==b)&&(r.directional.length=w,r.spot.length=g,r.rectArea.length=x,r.point.length=S,r.hemi.length=M,r.directionalShadow.length=T,r.directionalShadowMap.length=T,r.pointShadow.length=P,r.pointShadowMap.length=P,r.spotShadow.length=C,r.spotShadowMap.length=C,r.directionalShadowMatrix.length=T,r.pointShadowMatrix.length=P,r.spotLightMatrix.length=C+L-D,r.spotLightMap.length=L,r.numSpotLightShadowsWithMaps=D,r.numLightProbes=b,k.directionalLength=w,k.pointLength=S,k.spotLength=g,k.rectAreaLength=x,k.hemiLength=M,k.numDirectionalShadows=T,k.numPointShadows=P,k.numSpotShadows=C,k.numSpotMaps=L,k.numLightProbes=b,r.version=G8++)}function f(h,d){let p=0,v=0,y=0,w=0,S=0;const g=d.matrixWorldInverse;for(let x=0,M=h.length;x=a.length?(u=new $S(n,e),a.push(u)):u=a[o],u}function r(){t=new WeakMap}return{get:i,dispose:r}}class n_ extends Yn{constructor(e){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=xT,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}}class i_ extends Yn{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}}const Y8=`void main() { gl_Position = vec4( position, 1.0 ); }`,q8=`uniform sampler2D shadow_pass; uniform vec2 resolution; @@ -3722,7 +3722,7 @@ void main() { squared_mean = squared_mean / samples; float std_dev = sqrt( squared_mean - mean * mean ); gl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) ); -}`;function Z8(n,e,t){let i=new vf;const r=new de,s=new de,o=new kt,a=new n_({depthPacking:ST}),u=new i_,f={},h=t.maxTextureSize,d={[Rs]:vi,[vi]:Rs,[jr]:jr},p=new $r({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new de},radius:{value:4}},vertexShader:Y8,fragmentShader:q8}),v=p.clone();v.defines.HORIZONTAL_PASS=1;const y=new St;y.setAttribute("position",new Ht(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const w=new Rn(y,p),S=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=Jp;let g=this.type;this.render=function(C,L,D){if(S.enabled===!1||S.autoUpdate===!1&&S.needsUpdate===!1||C.length===0)return;const b=n.getRenderTarget(),R=n.getActiveCubeFace(),k=n.getActiveMipmapLevel(),q=n.state;q.setBlending(Es),q.buffers.color.setClear(1,1,1,1),q.buffers.depth.setTest(!0),q.setScissorTest(!1);const oe=g!==Er&&this.type===Er,V=g===Er&&this.type!==Er;for(let Q=0,te=C.length;Qh||r.y>h)&&(r.x>h&&(s.x=Math.floor(h/B.x),r.x=s.x*B.x,N.mapSize.x=s.x),r.y>h&&(s.y=Math.floor(h/B.y),r.y=s.y*B.y,N.mapSize.y=s.y)),N.map===null||oe===!0||V===!0){const Y=this.type!==Er?{minFilter:_n,magFilter:_n}:{};N.map!==null&&N.map.dispose(),N.map=new gr(r.x,r.y,Y),N.map.texture.name=ae.name+".shadowMap",N.camera.updateProjectionMatrix()}n.setRenderTarget(N.map),n.clear();const H=N.getViewportCount();for(let Y=0;Y0||L.map&&L.alphaTest>0){const q=R.uuid,oe=L.uuid;let V=f[q];V===void 0&&(V={},f[q]=V);let Q=V[oe];Q===void 0&&(Q=R.clone(),V[oe]=Q,L.addEventListener("dispose",P)),R=Q}if(R.visible=L.visible,R.wireframe=L.wireframe,b===Er?R.side=L.shadowSide!==null?L.shadowSide:L.side:R.side=L.shadowSide!==null?L.shadowSide:d[L.side],R.alphaMap=L.alphaMap,R.alphaTest=L.alphaTest,R.map=L.map,R.clipShadows=L.clipShadows,R.clippingPlanes=L.clippingPlanes,R.clipIntersection=L.clipIntersection,R.displacementMap=L.displacementMap,R.displacementScale=L.displacementScale,R.displacementBias=L.displacementBias,R.wireframeLinewidth=L.wireframeLinewidth,R.linewidth=L.linewidth,D.isPointLight===!0&&R.isMeshDistanceMaterial===!0){const q=n.properties.get(R);q.light=D}return R}function T(C,L,D,b,R){if(C.visible===!1)return;if(C.layers.test(L.layers)&&(C.isMesh||C.isLine||C.isPoints)&&(C.castShadow||C.receiveShadow&&R===Er)&&(!C.frustumCulled||i.intersectsObject(C))){C.modelViewMatrix.multiplyMatrices(D.matrixWorldInverse,C.matrixWorld);const oe=e.update(C),V=C.material;if(Array.isArray(V)){const Q=oe.groups;for(let te=0,ae=Q.length;te=1):H.indexOf("OpenGL ES")!==-1&&(B=parseFloat(/^OpenGL ES (\d)/.exec(H)[1]),N=B>=2);let Y=null,J={};const Z=n.getParameter(n.SCISSOR_BOX),ie=n.getParameter(n.VIEWPORT),pe=new kt().fromArray(Z),Ee=new kt().fromArray(ie);function Te(W,Re,Ie,it){const Ye=new Uint8Array(4),At=n.createTexture();n.bindTexture(W,At),n.texParameteri(W,n.TEXTURE_MIN_FILTER,n.NEAREST),n.texParameteri(W,n.TEXTURE_MAG_FILTER,n.NEAREST);for(let Rt=0;Rt"u"?!1:/OculusBrowser/g.test(navigator.userAgent),h=new WeakMap;let d;const p=new WeakMap;let v=!1;try{v=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")!==null}catch{}function y(U,I){return v?new OffscreenCanvas(U,I):qu("canvas")}function w(U,I,ee,xe){let _e=1;if((U.width>xe||U.height>xe)&&(_e=xe/Math.max(U.width,U.height)),_e<1||I===!0)if(typeof HTMLImageElement<"u"&&U instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&U instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&U instanceof ImageBitmap){const ye=I?Rp:Math.floor,je=ye(_e*U.width),Le=ye(_e*U.height);d===void 0&&(d=y(je,Le));const Fe=ee?y(je,Le):d;return Fe.width=je,Fe.height=Le,Fe.getContext("2d").drawImage(U,0,0,je,Le),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+U.width+"x"+U.height+") to ("+je+"x"+Le+")."),Fe}else return"data"in U&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+U.width+"x"+U.height+")."),U;return U}function S(U){return Cv(U.width)&&Cv(U.height)}function g(U){return a?!1:U.wrapS!==si||U.wrapT!==si||U.minFilter!==_n&&U.minFilter!==sn}function x(U,I){return U.generateMipmaps&&I&&U.minFilter!==_n&&U.minFilter!==sn}function M(U){n.generateMipmap(U)}function T(U,I,ee,xe,_e=!1){if(a===!1)return I;if(U!==null){if(n[U]!==void 0)return n[U];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+U+"'")}let ye=I;if(I===n.RED&&(ee===n.FLOAT&&(ye=n.R32F),ee===n.HALF_FLOAT&&(ye=n.R16F),ee===n.UNSIGNED_BYTE&&(ye=n.R8)),I===n.RED_INTEGER&&(ee===n.UNSIGNED_BYTE&&(ye=n.R8UI),ee===n.UNSIGNED_SHORT&&(ye=n.R16UI),ee===n.UNSIGNED_INT&&(ye=n.R32UI),ee===n.BYTE&&(ye=n.R8I),ee===n.SHORT&&(ye=n.R16I),ee===n.INT&&(ye=n.R32I)),I===n.RG&&(ee===n.FLOAT&&(ye=n.RG32F),ee===n.HALF_FLOAT&&(ye=n.RG16F),ee===n.UNSIGNED_BYTE&&(ye=n.RG8)),I===n.RGBA){const je=_e?Wu:Ft.getTransfer(xe);ee===n.FLOAT&&(ye=n.RGBA32F),ee===n.HALF_FLOAT&&(ye=n.RGBA16F),ee===n.UNSIGNED_BYTE&&(ye=je===jt?n.SRGB8_ALPHA8:n.RGBA8),ee===n.UNSIGNED_SHORT_4_4_4_4&&(ye=n.RGBA4),ee===n.UNSIGNED_SHORT_5_5_5_1&&(ye=n.RGB5_A1)}return(ye===n.R16F||ye===n.R32F||ye===n.RG16F||ye===n.RG32F||ye===n.RGBA16F||ye===n.RGBA32F)&&e.get("EXT_color_buffer_float"),ye}function P(U,I,ee){return x(U,ee)===!0||U.isFramebufferTexture&&U.minFilter!==_n&&U.minFilter!==sn?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 C(U){return U===_n||U===Cp||U===du?n.NEAREST:n.LINEAR}function L(U){const I=U.target;I.removeEventListener("dispose",L),b(I),I.isVideoTexture&&h.delete(I)}function D(U){const I=U.target;I.removeEventListener("dispose",D),k(I)}function b(U){const I=i.get(U);if(I.__webglInit===void 0)return;const ee=U.source,xe=p.get(ee);if(xe){const _e=xe[I.__cacheKey];_e.usedTimes--,_e.usedTimes===0&&R(U),Object.keys(xe).length===0&&p.delete(ee)}i.remove(U)}function R(U){const I=i.get(U);n.deleteTexture(I.__webglTexture);const ee=U.source,xe=p.get(ee);delete xe[I.__cacheKey],o.memory.textures--}function k(U){const I=U.texture,ee=i.get(U),xe=i.get(I);if(xe.__webglTexture!==void 0&&(n.deleteTexture(xe.__webglTexture),o.memory.textures--),U.depthTexture&&U.depthTexture.dispose(),U.isWebGLCubeRenderTarget)for(let _e=0;_e<6;_e++){if(Array.isArray(ee.__webglFramebuffer[_e]))for(let ye=0;ye=r.maxTextures&&console.warn("THREE.WebGLTextures: Trying to use "+U+" texture units while this GPU supports only "+r.maxTextures),q+=1,U}function Q(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 te(U,I){const ee=i.get(U);if(U.isVideoTexture&&Ze(U),U.isRenderTargetTexture===!1&&U.version>0&&ee.__version!==U.version){const xe=U.image;if(xe===null)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else if(xe.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{pe(ee,U,I);return}}t.bindTexture(n.TEXTURE_2D,ee.__webglTexture,n.TEXTURE0+I)}function ae(U,I){const ee=i.get(U);if(U.version>0&&ee.__version!==U.version){pe(ee,U,I);return}t.bindTexture(n.TEXTURE_2D_ARRAY,ee.__webglTexture,n.TEXTURE0+I)}function N(U,I){const ee=i.get(U);if(U.version>0&&ee.__version!==U.version){pe(ee,U,I);return}t.bindTexture(n.TEXTURE_3D,ee.__webglTexture,n.TEXTURE0+I)}function B(U,I){const ee=i.get(U);if(U.version>0&&ee.__version!==U.version){Ee(ee,U,I);return}t.bindTexture(n.TEXTURE_CUBE_MAP,ee.__webglTexture,n.TEXTURE0+I)}const H={[ku]:n.REPEAT,[si]:n.CLAMP_TO_EDGE,[Bu]:n.MIRRORED_REPEAT},Y={[_n]:n.NEAREST,[Cp]:n.NEAREST_MIPMAP_NEAREST,[du]:n.NEAREST_MIPMAP_LINEAR,[sn]:n.LINEAR,[ky]:n.LINEAR_MIPMAP_NEAREST,[_o]:n.LINEAR_MIPMAP_LINEAR},J={[wT]:n.NEVER,[RT]:n.ALWAYS,[ET]:n.LESS,[Zy]:n.LEQUAL,[TT]:n.EQUAL,[bT]:n.GEQUAL,[AT]:n.GREATER,[CT]:n.NOTEQUAL};function Z(U,I,ee){if(ee?(n.texParameteri(U,n.TEXTURE_WRAP_S,H[I.wrapS]),n.texParameteri(U,n.TEXTURE_WRAP_T,H[I.wrapT]),(U===n.TEXTURE_3D||U===n.TEXTURE_2D_ARRAY)&&n.texParameteri(U,n.TEXTURE_WRAP_R,H[I.wrapR]),n.texParameteri(U,n.TEXTURE_MAG_FILTER,Y[I.magFilter]),n.texParameteri(U,n.TEXTURE_MIN_FILTER,Y[I.minFilter])):(n.texParameteri(U,n.TEXTURE_WRAP_S,n.CLAMP_TO_EDGE),n.texParameteri(U,n.TEXTURE_WRAP_T,n.CLAMP_TO_EDGE),(U===n.TEXTURE_3D||U===n.TEXTURE_2D_ARRAY)&&n.texParameteri(U,n.TEXTURE_WRAP_R,n.CLAMP_TO_EDGE),(I.wrapS!==si||I.wrapT!==si)&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),n.texParameteri(U,n.TEXTURE_MAG_FILTER,C(I.magFilter)),n.texParameteri(U,n.TEXTURE_MIN_FILTER,C(I.minFilter)),I.minFilter!==_n&&I.minFilter!==sn&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),I.compareFunction&&(n.texParameteri(U,n.TEXTURE_COMPARE_MODE,n.COMPARE_REF_TO_TEXTURE),n.texParameteri(U,n.TEXTURE_COMPARE_FUNC,J[I.compareFunction])),e.has("EXT_texture_filter_anisotropic")===!0){const xe=e.get("EXT_texture_filter_anisotropic");if(I.magFilter===_n||I.minFilter!==du&&I.minFilter!==_o||I.type===hr&&e.has("OES_texture_float_linear")===!1||a===!1&&I.type===xa&&e.has("OES_texture_half_float_linear")===!1)return;(I.anisotropy>1||i.get(I).__currentAnisotropy)&&(n.texParameterf(U,xe.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(I.anisotropy,r.getMaxAnisotropy())),i.get(I).__currentAnisotropy=I.anisotropy)}}function ie(U,I){let ee=!1;U.__webglInit===void 0&&(U.__webglInit=!0,I.addEventListener("dispose",L));const xe=I.source;let _e=p.get(xe);_e===void 0&&(_e={},p.set(xe,_e));const ye=Q(I);if(ye!==U.__cacheKey){_e[ye]===void 0&&(_e[ye]={texture:n.createTexture(),usedTimes:0},o.memory.textures++,ee=!0),_e[ye].usedTimes++;const je=_e[U.__cacheKey];je!==void 0&&(_e[U.__cacheKey].usedTimes--,je.usedTimes===0&&R(I)),U.__cacheKey=ye,U.__webglTexture=_e[ye].texture}return ee}function pe(U,I,ee){let xe=n.TEXTURE_2D;(I.isDataArrayTexture||I.isCompressedArrayTexture)&&(xe=n.TEXTURE_2D_ARRAY),I.isData3DTexture&&(xe=n.TEXTURE_3D);const _e=ie(U,I),ye=I.source;t.bindTexture(xe,U.__webglTexture,n.TEXTURE0+ee);const je=i.get(ye);if(ye.version!==je.__version||_e===!0){t.activeTexture(n.TEXTURE0+ee);const Le=Ft.getPrimaries(Ft.workingColorSpace),Fe=I.colorSpace===Gi?null:Ft.getPrimaries(I.colorSpace),tt=I.colorSpace===Gi||Le===Fe?n.NONE:n.BROWSER_DEFAULT_WEBGL;n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,I.flipY),n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,I.premultiplyAlpha),n.pixelStorei(n.UNPACK_ALIGNMENT,I.unpackAlignment),n.pixelStorei(n.UNPACK_COLORSPACE_CONVERSION_WEBGL,tt);const dt=g(I)&&S(I.image)===!1;let Se=w(I.image,dt,!1,r.maxTextureSize);Se=Ne(I,Se);const Ct=S(Se)||a,yt=s.convert(I.format,I.colorSpace);let ct=s.convert(I.type),et=T(I.internalFormat,yt,ct,I.colorSpace,I.isVideoTexture);Z(xe,I,Ct);let He;const X=I.mipmaps,ge=a&&I.isVideoTexture!==!0&&et!==jy,Oe=je.__version===void 0||_e===!0,Ue=P(I,Se,Ct);if(I.isDepthTexture)et=n.DEPTH_COMPONENT,a?I.type===hr?et=n.DEPTH_COMPONENT32F:I.type===xs?et=n.DEPTH_COMPONENT24:I.type===ho?et=n.DEPTH24_STENCIL8:et=n.DEPTH_COMPONENT16:I.type===hr&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),I.format===po&&et===n.DEPTH_COMPONENT&&I.type!==$p&&I.type!==xs&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),I.type=xs,ct=s.convert(I.type)),I.format===Sa&&et===n.DEPTH_COMPONENT&&(et=n.DEPTH_STENCIL,I.type!==ho&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),I.type=ho,ct=s.convert(I.type))),Oe&&(ge?t.texStorage2D(n.TEXTURE_2D,1,et,Se.width,Se.height):t.texImage2D(n.TEXTURE_2D,0,et,Se.width,Se.height,0,yt,ct,null));else if(I.isDataTexture)if(X.length>0&&Ct){ge&&Oe&&t.texStorage2D(n.TEXTURE_2D,Ue,et,X[0].width,X[0].height);for(let Me=0,W=X.length;Me>=1,W>>=1}}else if(X.length>0&&Ct){ge&&Oe&&t.texStorage2D(n.TEXTURE_2D,Ue,et,X[0].width,X[0].height);for(let Me=0,W=X.length;Me0&&Oe++,t.texStorage2D(n.TEXTURE_CUBE_MAP,Oe,He,Se[0].width,Se[0].height));for(let Me=0;Me<6;Me++)if(dt){X?t.texSubImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+Me,0,0,0,Se[Me].width,Se[Me].height,ct,et,Se[Me].data):t.texImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+Me,0,He,Se[Me].width,Se[Me].height,0,ct,et,Se[Me].data);for(let W=0;W>ye),Se=Math.max(1,I.height>>ye);_e===n.TEXTURE_3D||_e===n.TEXTURE_2D_ARRAY?t.texImage3D(_e,ye,Fe,dt,Se,I.depth,0,je,Le,null):t.texImage2D(_e,ye,Fe,dt,Se,0,je,Le,null)}t.bindFramebuffer(n.FRAMEBUFFER,U),he(I)?u.framebufferTexture2DMultisampleEXT(n.FRAMEBUFFER,xe,_e,i.get(ee).__webglTexture,0,Ce(I)):(_e===n.TEXTURE_2D||_e>=n.TEXTURE_CUBE_MAP_POSITIVE_X&&_e<=n.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&n.framebufferTexture2D(n.FRAMEBUFFER,xe,_e,i.get(ee).__webglTexture,ye),t.bindFramebuffer(n.FRAMEBUFFER,null)}function nt(U,I,ee){if(n.bindRenderbuffer(n.RENDERBUFFER,U),I.depthBuffer&&!I.stencilBuffer){let xe=a===!0?n.DEPTH_COMPONENT24:n.DEPTH_COMPONENT16;if(ee||he(I)){const _e=I.depthTexture;_e&&_e.isDepthTexture&&(_e.type===hr?xe=n.DEPTH_COMPONENT32F:_e.type===xs&&(xe=n.DEPTH_COMPONENT24));const ye=Ce(I);he(I)?u.renderbufferStorageMultisampleEXT(n.RENDERBUFFER,ye,xe,I.width,I.height):n.renderbufferStorageMultisample(n.RENDERBUFFER,ye,xe,I.width,I.height)}else n.renderbufferStorage(n.RENDERBUFFER,xe,I.width,I.height);n.framebufferRenderbuffer(n.FRAMEBUFFER,n.DEPTH_ATTACHMENT,n.RENDERBUFFER,U)}else if(I.depthBuffer&&I.stencilBuffer){const xe=Ce(I);ee&&he(I)===!1?n.renderbufferStorageMultisample(n.RENDERBUFFER,xe,n.DEPTH24_STENCIL8,I.width,I.height):he(I)?u.renderbufferStorageMultisampleEXT(n.RENDERBUFFER,xe,n.DEPTH24_STENCIL8,I.width,I.height):n.renderbufferStorage(n.RENDERBUFFER,n.DEPTH_STENCIL,I.width,I.height),n.framebufferRenderbuffer(n.FRAMEBUFFER,n.DEPTH_STENCIL_ATTACHMENT,n.RENDERBUFFER,U)}else{const xe=I.isWebGLMultipleRenderTargets===!0?I.texture:[I.texture];for(let _e=0;_e0){ee.__webglFramebuffer[Le]=[];for(let Fe=0;Fe0){ee.__webglFramebuffer=[];for(let Le=0;Le0&&he(U)===!1){const Le=ye?I:[I];ee.__webglMultisampledFramebuffer=n.createFramebuffer(),ee.__webglColorRenderbuffer=[],t.bindFramebuffer(n.FRAMEBUFFER,ee.__webglMultisampledFramebuffer);for(let Fe=0;Fe0)for(let Fe=0;Fe0)for(let Fe=0;Fe0&&he(U)===!1){const I=U.isWebGLMultipleRenderTargets?U.texture:[U.texture],ee=U.width,xe=U.height;let _e=n.COLOR_BUFFER_BIT;const ye=[],je=U.stencilBuffer?n.DEPTH_STENCIL_ATTACHMENT:n.DEPTH_ATTACHMENT,Le=i.get(U),Fe=U.isWebGLMultipleRenderTargets===!0;if(Fe)for(let tt=0;tt0&&e.has("WEBGL_multisampled_render_to_texture")===!0&&I.__useRenderToTexture!==!1}function Ze(U){const I=o.render.frame;h.get(U)!==I&&(h.set(U,I),U.update())}function Ne(U,I){const ee=U.colorSpace,xe=U.format,_e=U.type;return U.isCompressedTexture===!0||U.isVideoTexture===!0||U.format===bp||ee!==Qr&&ee!==Gi&&(Ft.getTransfer(ee)===jt?a===!1?e.has("EXT_sRGB")===!0&&xe===pi?(U.format=bp,U.minFilter=sn,U.generateMipmaps=!1):I=Jy.sRGBToLinear(I):(xe!==pi||_e!==Kr)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",ee)),I}this.allocateTextureUnit=V,this.resetTextureUnits=oe,this.setTexture2D=te,this.setTexture2DArray=ae,this.setTexture3D=N,this.setTextureCube=B,this.rebindTextures=Ke,this.setupRenderTarget=G,this.updateRenderTargetMipmap=we,this.updateMultisampleRenderTarget=me,this.setupDepthRenderbuffer=Xe,this.setupFrameBufferTexture=Te,this.useMultisampledRTT=he}function WT(n,e,t){const i=t.isWebGL2;function r(s,o=Gi){let a;const u=Ft.getTransfer(o);if(s===Kr)return n.UNSIGNED_BYTE;if(s===Hy)return n.UNSIGNED_SHORT_4_4_4_4;if(s===Vy)return n.UNSIGNED_SHORT_5_5_5_1;if(s===cT)return n.BYTE;if(s===uT)return n.SHORT;if(s===$p)return n.UNSIGNED_SHORT;if(s===By)return n.INT;if(s===xs)return n.UNSIGNED_INT;if(s===hr)return n.FLOAT;if(s===xa)return i?n.HALF_FLOAT:(a=e.get("OES_texture_half_float"),a!==null?a.HALF_FLOAT_OES:null);if(s===fT)return n.ALPHA;if(s===pi)return n.RGBA;if(s===hT)return n.LUMINANCE;if(s===dT)return n.LUMINANCE_ALPHA;if(s===po)return n.DEPTH_COMPONENT;if(s===Sa)return n.DEPTH_STENCIL;if(s===bp)return a=e.get("EXT_sRGB"),a!==null?a.SRGB_ALPHA_EXT:null;if(s===pT)return n.RED;if(s===Gy)return n.RED_INTEGER;if(s===mT)return n.RG;if(s===Wy)return n.RG_INTEGER;if(s===Xy)return n.RGBA_INTEGER;if(s===Xd||s===jd||s===Yd||s===qd)if(u===jt)if(a=e.get("WEBGL_compressed_texture_s3tc_srgb"),a!==null){if(s===Xd)return a.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(s===jd)return a.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(s===Yd)return a.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(s===qd)return a.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(a=e.get("WEBGL_compressed_texture_s3tc"),a!==null){if(s===Xd)return a.COMPRESSED_RGB_S3TC_DXT1_EXT;if(s===jd)return a.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(s===Yd)return a.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(s===qd)return a.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(s===ev||s===tv||s===nv||s===iv)if(a=e.get("WEBGL_compressed_texture_pvrtc"),a!==null){if(s===ev)return a.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(s===tv)return a.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(s===nv)return a.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(s===iv)return a.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(s===jy)return a=e.get("WEBGL_compressed_texture_etc1"),a!==null?a.COMPRESSED_RGB_ETC1_WEBGL:null;if(s===rv||s===sv)if(a=e.get("WEBGL_compressed_texture_etc"),a!==null){if(s===rv)return u===jt?a.COMPRESSED_SRGB8_ETC2:a.COMPRESSED_RGB8_ETC2;if(s===sv)return u===jt?a.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:a.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(s===ov||s===av||s===lv||s===cv||s===uv||s===fv||s===hv||s===dv||s===pv||s===mv||s===gv||s===vv||s===yv||s===_v)if(a=e.get("WEBGL_compressed_texture_astc"),a!==null){if(s===ov)return u===jt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:a.COMPRESSED_RGBA_ASTC_4x4_KHR;if(s===av)return u===jt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:a.COMPRESSED_RGBA_ASTC_5x4_KHR;if(s===lv)return u===jt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:a.COMPRESSED_RGBA_ASTC_5x5_KHR;if(s===cv)return u===jt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:a.COMPRESSED_RGBA_ASTC_6x5_KHR;if(s===uv)return u===jt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:a.COMPRESSED_RGBA_ASTC_6x6_KHR;if(s===fv)return u===jt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:a.COMPRESSED_RGBA_ASTC_8x5_KHR;if(s===hv)return u===jt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:a.COMPRESSED_RGBA_ASTC_8x6_KHR;if(s===dv)return u===jt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:a.COMPRESSED_RGBA_ASTC_8x8_KHR;if(s===pv)return u===jt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:a.COMPRESSED_RGBA_ASTC_10x5_KHR;if(s===mv)return u===jt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:a.COMPRESSED_RGBA_ASTC_10x6_KHR;if(s===gv)return u===jt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:a.COMPRESSED_RGBA_ASTC_10x8_KHR;if(s===vv)return u===jt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:a.COMPRESSED_RGBA_ASTC_10x10_KHR;if(s===yv)return u===jt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:a.COMPRESSED_RGBA_ASTC_12x10_KHR;if(s===_v)return u===jt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:a.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(s===Zd||s===xv||s===Sv)if(a=e.get("EXT_texture_compression_bptc"),a!==null){if(s===Zd)return u===jt?a.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:a.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(s===xv)return a.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(s===Sv)return a.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}else return null;if(s===gT||s===Mv||s===wv||s===Ev)if(a=e.get("EXT_texture_compression_rgtc"),a!==null){if(s===Zd)return a.COMPRESSED_RED_RGTC1_EXT;if(s===Mv)return a.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(s===wv)return a.COMPRESSED_RED_GREEN_RGTC2_EXT;if(s===Ev)return a.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return s===ho?i?n.UNSIGNED_INT_24_8:(a=e.get("WEBGL_depth_texture"),a!==null?a.UNSIGNED_INT_24_8_WEBGL:null):n[s]!==void 0?n[s]:null}return{convert:r}}class XT extends pn{constructor(e=[]){super(),this.isArrayCamera=!0,this.cameras=e}}class Dl extends Ot{constructor(){super(),this.isGroup=!0,this.type="Group"}}const Q8={type:"move"};class bg{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new Dl,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 Dl,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new O,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new O),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new Dl,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new O,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new O),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 i of e.hand.values())this._getHandJoint(t,i)}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,i){let r=null,s=null,o=null;const a=this._targetRay,u=this._grip,f=this._hand;if(e&&t.session.visibilityState!=="visible-blurred"){if(f&&e.hand){o=!0;for(const w of e.hand.values()){const S=t.getJointPose(w,i),g=this._getHandJoint(f,w);S!==null&&(g.matrix.fromArray(S.transform.matrix),g.matrix.decompose(g.position,g.rotation,g.scale),g.matrixWorldNeedsUpdate=!0,g.jointRadius=S.radius),g.visible=S!==null}const h=f.joints["index-finger-tip"],d=f.joints["thumb-tip"],p=h.position.distanceTo(d.position),v=.02,y=.005;f.inputState.pinching&&p>v+y?(f.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!f.inputState.pinching&&p<=v-y&&(f.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else u!==null&&e.gripSpace&&(s=t.getPose(e.gripSpace,i),s!==null&&(u.matrix.fromArray(s.transform.matrix),u.matrix.decompose(u.position,u.rotation,u.scale),u.matrixWorldNeedsUpdate=!0,s.linearVelocity?(u.hasLinearVelocity=!0,u.linearVelocity.copy(s.linearVelocity)):u.hasLinearVelocity=!1,s.angularVelocity?(u.hasAngularVelocity=!0,u.angularVelocity.copy(s.angularVelocity)):u.hasAngularVelocity=!1));a!==null&&(r=t.getPose(e.targetRaySpace,i),r===null&&s!==null&&(r=s),r!==null&&(a.matrix.fromArray(r.transform.matrix),a.matrix.decompose(a.position,a.rotation,a.scale),a.matrixWorldNeedsUpdate=!0,r.linearVelocity?(a.hasLinearVelocity=!0,a.linearVelocity.copy(r.linearVelocity)):a.hasLinearVelocity=!1,r.angularVelocity?(a.hasAngularVelocity=!0,a.angularVelocity.copy(r.angularVelocity)):a.hasAngularVelocity=!1,this.dispatchEvent(Q8)))}return a!==null&&(a.visible=r!==null),u!==null&&(u.visible=s!==null),f!==null&&(f.visible=o!==null),this}_getHandJoint(e,t){if(e.joints[t.jointName]===void 0){const i=new Dl;i.matrixAutoUpdate=!1,i.visible=!1,e.joints[t.jointName]=i,e.add(i)}return e.joints[t.jointName]}}class $8 extends es{constructor(e,t){super();const i=this;let r=null,s=1,o=null,a="local-floor",u=1,f=null,h=null,d=null,p=null,v=null,y=null;const w=t.getContextAttributes();let S=null,g=null;const x=[],M=[],T=new de;let P=null;const C=new pn;C.layers.enable(1),C.viewport=new kt;const L=new pn;L.layers.enable(2),L.viewport=new kt;const D=[C,L],b=new XT;b.layers.enable(1),b.layers.enable(2);let R=null,k=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(Z){let ie=x[Z];return ie===void 0&&(ie=new bg,x[Z]=ie),ie.getTargetRaySpace()},this.getControllerGrip=function(Z){let ie=x[Z];return ie===void 0&&(ie=new bg,x[Z]=ie),ie.getGripSpace()},this.getHand=function(Z){let ie=x[Z];return ie===void 0&&(ie=new bg,x[Z]=ie),ie.getHandSpace()};function q(Z){const ie=M.indexOf(Z.inputSource);if(ie===-1)return;const pe=x[ie];pe!==void 0&&(pe.update(Z.inputSource,Z.frame,f||o),pe.dispatchEvent({type:Z.type,data:Z.inputSource}))}function oe(){r.removeEventListener("select",q),r.removeEventListener("selectstart",q),r.removeEventListener("selectend",q),r.removeEventListener("squeeze",q),r.removeEventListener("squeezestart",q),r.removeEventListener("squeezeend",q),r.removeEventListener("end",oe),r.removeEventListener("inputsourceschange",V);for(let Z=0;Z=0&&(M[Ee]=null,x[Ee].disconnect(pe))}for(let ie=0;ie=M.length){M.push(pe),Ee=nt;break}else if(M[nt]===null){M[nt]=pe,Ee=nt;break}if(Ee===-1)break}const Te=x[Ee];Te&&Te.connect(pe)}}const Q=new O,te=new O;function ae(Z,ie,pe){Q.setFromMatrixPosition(ie.matrixWorld),te.setFromMatrixPosition(pe.matrixWorld);const Ee=Q.distanceTo(te),Te=ie.projectionMatrix.elements,nt=pe.projectionMatrix.elements,lt=Te[14]/(Te[10]-1),Xe=Te[14]/(Te[10]+1),Ke=(Te[9]+1)/Te[5],G=(Te[9]-1)/Te[5],we=(Te[8]-1)/Te[0],me=(nt[8]+1)/nt[0],Ce=lt*we,he=lt*me,Ze=Ee/(-we+me),Ne=Ze*-we;ie.matrixWorld.decompose(Z.position,Z.quaternion,Z.scale),Z.translateX(Ne),Z.translateZ(Ze),Z.matrixWorld.compose(Z.position,Z.quaternion,Z.scale),Z.matrixWorldInverse.copy(Z.matrixWorld).invert();const U=lt+Ze,I=Xe+Ze,ee=Ce-Ne,xe=he+(Ee-Ne),_e=Ke*Xe/I*U,ye=G*Xe/I*U;Z.projectionMatrix.makePerspective(ee,xe,_e,ye,U,I),Z.projectionMatrixInverse.copy(Z.projectionMatrix).invert()}function N(Z,ie){ie===null?Z.matrixWorld.copy(Z.matrix):Z.matrixWorld.multiplyMatrices(ie.matrixWorld,Z.matrix),Z.matrixWorldInverse.copy(Z.matrixWorld).invert()}this.updateCamera=function(Z){if(r===null)return;b.near=L.near=C.near=Z.near,b.far=L.far=C.far=Z.far,(R!==b.near||k!==b.far)&&(r.updateRenderState({depthNear:b.near,depthFar:b.far}),R=b.near,k=b.far);const ie=Z.parent,pe=b.cameras;N(b,ie);for(let Ee=0;Ee0&&(S.alphaTest.value=g.alphaTest);const x=e.get(g).envMap;if(x&&(S.envMap.value=x,S.flipEnvMap.value=x.isCubeTexture&&x.isRenderTargetTexture===!1?-1:1,S.reflectivity.value=g.reflectivity,S.ior.value=g.ior,S.refractionRatio.value=g.refractionRatio),g.lightMap){S.lightMap.value=g.lightMap;const M=n._useLegacyLights===!0?Math.PI:1;S.lightMapIntensity.value=g.lightMapIntensity*M,t(g.lightMap,S.lightMapTransform)}g.aoMap&&(S.aoMap.value=g.aoMap,S.aoMapIntensity.value=g.aoMapIntensity,t(g.aoMap,S.aoMapTransform))}function o(S,g){S.diffuse.value.copy(g.color),S.opacity.value=g.opacity,g.map&&(S.map.value=g.map,t(g.map,S.mapTransform))}function a(S,g){S.dashSize.value=g.dashSize,S.totalSize.value=g.dashSize+g.gapSize,S.scale.value=g.scale}function u(S,g,x,M){S.diffuse.value.copy(g.color),S.opacity.value=g.opacity,S.size.value=g.size*x,S.scale.value=M*.5,g.map&&(S.map.value=g.map,t(g.map,S.uvTransform)),g.alphaMap&&(S.alphaMap.value=g.alphaMap,t(g.alphaMap,S.alphaMapTransform)),g.alphaTest>0&&(S.alphaTest.value=g.alphaTest)}function f(S,g){S.diffuse.value.copy(g.color),S.opacity.value=g.opacity,S.rotation.value=g.rotation,g.map&&(S.map.value=g.map,t(g.map,S.mapTransform)),g.alphaMap&&(S.alphaMap.value=g.alphaMap,t(g.alphaMap,S.alphaMapTransform)),g.alphaTest>0&&(S.alphaTest.value=g.alphaTest)}function h(S,g){S.specular.value.copy(g.specular),S.shininess.value=Math.max(g.shininess,1e-4)}function d(S,g){g.gradientMap&&(S.gradientMap.value=g.gradientMap)}function p(S,g){S.metalness.value=g.metalness,g.metalnessMap&&(S.metalnessMap.value=g.metalnessMap,t(g.metalnessMap,S.metalnessMapTransform)),S.roughness.value=g.roughness,g.roughnessMap&&(S.roughnessMap.value=g.roughnessMap,t(g.roughnessMap,S.roughnessMapTransform)),e.get(g).envMap&&(S.envMapIntensity.value=g.envMapIntensity)}function v(S,g,x){S.ior.value=g.ior,g.sheen>0&&(S.sheenColor.value.copy(g.sheenColor).multiplyScalar(g.sheen),S.sheenRoughness.value=g.sheenRoughness,g.sheenColorMap&&(S.sheenColorMap.value=g.sheenColorMap,t(g.sheenColorMap,S.sheenColorMapTransform)),g.sheenRoughnessMap&&(S.sheenRoughnessMap.value=g.sheenRoughnessMap,t(g.sheenRoughnessMap,S.sheenRoughnessMapTransform))),g.clearcoat>0&&(S.clearcoat.value=g.clearcoat,S.clearcoatRoughness.value=g.clearcoatRoughness,g.clearcoatMap&&(S.clearcoatMap.value=g.clearcoatMap,t(g.clearcoatMap,S.clearcoatMapTransform)),g.clearcoatRoughnessMap&&(S.clearcoatRoughnessMap.value=g.clearcoatRoughnessMap,t(g.clearcoatRoughnessMap,S.clearcoatRoughnessMapTransform)),g.clearcoatNormalMap&&(S.clearcoatNormalMap.value=g.clearcoatNormalMap,t(g.clearcoatNormalMap,S.clearcoatNormalMapTransform),S.clearcoatNormalScale.value.copy(g.clearcoatNormalScale),g.side===vi&&S.clearcoatNormalScale.value.negate())),g.iridescence>0&&(S.iridescence.value=g.iridescence,S.iridescenceIOR.value=g.iridescenceIOR,S.iridescenceThicknessMinimum.value=g.iridescenceThicknessRange[0],S.iridescenceThicknessMaximum.value=g.iridescenceThicknessRange[1],g.iridescenceMap&&(S.iridescenceMap.value=g.iridescenceMap,t(g.iridescenceMap,S.iridescenceMapTransform)),g.iridescenceThicknessMap&&(S.iridescenceThicknessMap.value=g.iridescenceThicknessMap,t(g.iridescenceThicknessMap,S.iridescenceThicknessMapTransform))),g.transmission>0&&(S.transmission.value=g.transmission,S.transmissionSamplerMap.value=x.texture,S.transmissionSamplerSize.value.set(x.width,x.height),g.transmissionMap&&(S.transmissionMap.value=g.transmissionMap,t(g.transmissionMap,S.transmissionMapTransform)),S.thickness.value=g.thickness,g.thicknessMap&&(S.thicknessMap.value=g.thicknessMap,t(g.thicknessMap,S.thicknessMapTransform)),S.attenuationDistance.value=g.attenuationDistance,S.attenuationColor.value.copy(g.attenuationColor)),g.anisotropy>0&&(S.anisotropyVector.value.set(g.anisotropy*Math.cos(g.anisotropyRotation),g.anisotropy*Math.sin(g.anisotropyRotation)),g.anisotropyMap&&(S.anisotropyMap.value=g.anisotropyMap,t(g.anisotropyMap,S.anisotropyMapTransform))),S.specularIntensity.value=g.specularIntensity,S.specularColor.value.copy(g.specularColor),g.specularColorMap&&(S.specularColorMap.value=g.specularColorMap,t(g.specularColorMap,S.specularColorMapTransform)),g.specularIntensityMap&&(S.specularIntensityMap.value=g.specularIntensityMap,t(g.specularIntensityMap,S.specularIntensityMapTransform))}function y(S,g){g.matcap&&(S.matcap.value=g.matcap)}function w(S,g){const x=e.get(g).light;S.referencePosition.value.setFromMatrixPosition(x.matrixWorld),S.nearDistance.value=x.shadow.camera.near,S.farDistance.value=x.shadow.camera.far}return{refreshFogUniforms:i,refreshMaterialUniforms:r}}function tN(n,e,t,i){let r={},s={},o=[];const a=t.isWebGL2?n.getParameter(n.MAX_UNIFORM_BUFFER_BINDINGS):0;function u(x,M){const T=M.program;i.uniformBlockBinding(x,T)}function f(x,M){let T=r[x.id];T===void 0&&(y(x),T=h(x),r[x.id]=T,x.addEventListener("dispose",S));const P=M.program;i.updateUBOMapping(x,P);const C=e.render.frame;s[x.id]!==C&&(p(x),s[x.id]=C)}function h(x){const M=d();x.__bindingPointIndex=M;const T=n.createBuffer(),P=x.__size,C=x.usage;return n.bindBuffer(n.UNIFORM_BUFFER,T),n.bufferData(n.UNIFORM_BUFFER,P,C),n.bindBuffer(n.UNIFORM_BUFFER,null),n.bindBufferBase(n.UNIFORM_BUFFER,M,T),T}function d(){for(let x=0;x0&&(T+=P-C),x.__size=T,x.__cache={},this}function w(x){const M={boundary:0,storage:0};return typeof x=="number"||typeof x=="boolean"?(M.boundary=4,M.storage=4):x.isVector2?(M.boundary=8,M.storage=8):x.isVector3||x.isColor?(M.boundary=16,M.storage=12):x.isVector4?(M.boundary=16,M.storage=16):x.isMatrix3?(M.boundary=48,M.storage=48):x.isMatrix4?(M.boundary=64,M.storage=64):x.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",x),M}function S(x){const M=x.target;M.removeEventListener("dispose",S);const T=o.indexOf(M.__bindingPointIndex);o.splice(T,1),n.deleteBuffer(r[M.id]),delete r[M.id],delete s[M.id]}function g(){for(const x in r)n.deleteBuffer(r[x]);o=[],r={},s={}}return{bind:u,update:f,dispose:g}}class r_{constructor(e={}){const{canvas:t=LT(),context:i=null,depth:r=!0,stencil:s=!0,alpha:o=!1,antialias:a=!1,premultipliedAlpha:u=!0,preserveDrawingBuffer:f=!1,powerPreference:h="default",failIfMajorPerformanceCaveat:d=!1}=e;this.isWebGLRenderer=!0;let p;i!==null?p=i.getContextAttributes().alpha:p=o;const v=new Uint32Array(4),y=new Int32Array(4);let w=null,S=null;const g=[],x=[];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._outputColorSpace=Cn,this._useLegacyLights=!1,this.toneMapping=Zr,this.toneMappingExposure=1;const M=this;let T=!1,P=0,C=0,L=null,D=-1,b=null;const R=new kt,k=new kt;let q=null;const oe=new Be(0);let V=0,Q=t.width,te=t.height,ae=1,N=null,B=null;const H=new kt(0,0,Q,te),Y=new kt(0,0,Q,te);let J=!1;const Z=new vf;let ie=!1,pe=!1,Ee=null;const Te=new ft,nt=new de,lt=new O,Xe={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function Ke(){return L===null?ae:1}let G=i;function we(z,$){for(let se=0;se{function ke(){if(le.forEach(function(Qe){Ne.get(Qe).currentProgram.isReady()&&le.delete(Qe)}),le.size===0){re(z);return}setTimeout(ke,10)}me.get("KHR_parallel_shader_compile")!==null?ke():setTimeout(ke,10)})};let Rt=null;function Gt(z){Rt&&Rt(z)}function Jt(){Bn.stop()}function Lt(){Bn.start()}const Bn=new FT;Bn.setAnimationLoop(Gt),typeof self<"u"&&Bn.setContext(self),this.setAnimationLoop=function(z){Rt=z,Ue.setAnimationLoop(z),z===null?Bn.stop():Bn.start()},Ue.addEventListener("sessionstart",Jt),Ue.addEventListener("sessionend",Lt),this.render=function(z,$){if($!==void 0&&$.isCamera!==!0){console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");return}if(T===!0)return;z.matrixWorldAutoUpdate===!0&&z.updateMatrixWorld(),$.parent===null&&$.matrixWorldAutoUpdate===!0&&$.updateMatrixWorld(),Ue.enabled===!0&&Ue.isPresenting===!0&&(Ue.cameraAutoUpdate===!0&&Ue.updateCamera($),$=Ue.getCamera()),z.isScene===!0&&z.onBeforeRender(M,z,$,L),S=tt.get(z,x.length),S.init(),x.push(S),Te.multiplyMatrices($.projectionMatrix,$.matrixWorldInverse),Z.setFromProjectionMatrix(Te),pe=this.localClippingEnabled,ie=dt.init(this.clippingPlanes,pe),w=Fe.get(z,g.length),w.init(),g.push(w),Ji(z,$,0,M.sortObjects),w.finish(),M.sortObjects===!0&&w.sort(N,B),this.info.render.frame++,ie===!0&&dt.beginShadows();const se=S.state.shadowsArray;if(Se.render(se,z,$),ie===!0&&dt.endShadows(),this.info.autoReset===!0&&this.info.reset(),Ct.render(w,z),S.setupLights(M._useLegacyLights),$.isArrayCamera){const le=$.cameras;for(let re=0,ke=le.length;re0?S=x[x.length-1]:S=null,g.pop(),g.length>0?w=g[g.length-1]:w=null};function Ji(z,$,se,le){if(z.visible===!1)return;if(z.layers.test($.layers)){if(z.isGroup)se=z.renderOrder;else if(z.isLOD)z.autoUpdate===!0&&z.update($);else if(z.isLight)S.pushLight(z),z.castShadow&&S.pushShadow(z);else if(z.isSprite){if(!z.frustumCulled||Z.intersectsSprite(z)){le&<.setFromMatrixPosition(z.matrixWorld).applyMatrix4(Te);const Qe=ye.update(z),st=z.material;st.visible&&w.push(z,Qe,st,se,lt.z,null)}}else if((z.isMesh||z.isLine||z.isPoints)&&(!z.frustumCulled||Z.intersectsObject(z))){const Qe=ye.update(z),st=z.material;if(le&&(z.boundingSphere!==void 0?(z.boundingSphere===null&&z.computeBoundingSphere(),lt.copy(z.boundingSphere.center)):(Qe.boundingSphere===null&&Qe.computeBoundingSphere(),lt.copy(Qe.boundingSphere.center)),lt.applyMatrix4(z.matrixWorld).applyMatrix4(Te)),Array.isArray(st)){const ot=Qe.groups;for(let pt=0,ht=ot.length;pt0&&fc(re,ke,$,se),le&&he.viewport(R.copy(le)),re.length>0&&La(re,$,se),ke.length>0&&La(ke,$,se),Qe.length>0&&La(Qe,$,se),he.buffers.depth.setTest(!0),he.buffers.depth.setMask(!0),he.buffers.color.setMask(!0),he.setPolygonOffset(!1)}function fc(z,$,se,le){if((se.isScene===!0?se.overrideMaterial:null)!==null)return;const ke=Ce.isWebGL2;Ee===null&&(Ee=new gr(1,1,{generateMipmaps:!0,type:me.has("EXT_color_buffer_half_float")?xa:Kr,minFilter:_o,samples:ke?4:0})),M.getDrawingBufferSize(nt),ke?Ee.setSize(nt.x,nt.y):Ee.setSize(Rp(nt.x),Rp(nt.y));const Qe=M.getRenderTarget();M.setRenderTarget(Ee),M.getClearColor(oe),V=M.getClearAlpha(),V<1&&M.setClearColor(16777215,.5),M.clear();const st=M.toneMapping;M.toneMapping=Zr,La(z,se,le),U.updateMultisampleRenderTarget(Ee),U.updateRenderTargetMipmap(Ee);let ot=!1;for(let pt=0,ht=$.length;pt0),mt=!!se.morphAttributes.position,tn=!!se.morphAttributes.normal,Hn=!!se.morphAttributes.color;let qt=Zr;le.toneMapped&&(L===null||L.isXRRenderTarget===!0)&&(qt=M.toneMapping);const In=se.morphAttributes.position||se.morphAttributes.normal||se.morphAttributes.color,at=In!==void 0?In.length:0,Ge=Ne.get(le),Qi=S.state.lights;if(ie===!0&&(pe===!0||z!==b)){const Vn=z===b&&le.id===D;dt.setState(le,z,Vn)}let Et=!1;le.version===Ge.__version?(Ge.needsLights&&Ge.lightsStateVersion!==Qi.state.version||Ge.outputColorSpace!==st||re.isBatchedMesh&&Ge.batching===!1||!re.isBatchedMesh&&Ge.batching===!0||re.isInstancedMesh&&Ge.instancing===!1||!re.isInstancedMesh&&Ge.instancing===!0||re.isSkinnedMesh&&Ge.skinning===!1||!re.isSkinnedMesh&&Ge.skinning===!0||re.isInstancedMesh&&Ge.instancingColor===!0&&re.instanceColor===null||re.isInstancedMesh&&Ge.instancingColor===!1&&re.instanceColor!==null||Ge.envMap!==ot||le.fog===!0&&Ge.fog!==ke||Ge.numClippingPlanes!==void 0&&(Ge.numClippingPlanes!==dt.numPlanes||Ge.numIntersection!==dt.numIntersection)||Ge.vertexAlphas!==pt||Ge.vertexTangents!==ht||Ge.morphTargets!==mt||Ge.morphNormals!==tn||Ge.morphColors!==Hn||Ge.toneMapping!==qt||Ce.isWebGL2===!0&&Ge.morphTargetsCount!==at)&&(Et=!0):(Et=!0,Ge.__version=le.version);let cn=Ge.currentProgram;Et===!0&&(cn=Ia(le,$,re));let Dr=!1,$i=!1,Nn=!1;const gn=cn.getUniforms(),Ur=Ge.uniforms;if(he.useProgram(cn.program)&&(Dr=!0,$i=!0,Nn=!0),le.id!==D&&(D=le.id,$i=!0),Dr||b!==z){gn.setValue(G,"projectionMatrix",z.projectionMatrix),gn.setValue(G,"viewMatrix",z.matrixWorldInverse);const Vn=gn.map.cameraPosition;Vn!==void 0&&Vn.setValue(G,lt.setFromMatrixPosition(z.matrixWorld)),Ce.logarithmicDepthBuffer&&gn.setValue(G,"logDepthBufFC",2/(Math.log(z.far+1)/Math.LN2)),(le.isMeshPhongMaterial||le.isMeshToonMaterial||le.isMeshLambertMaterial||le.isMeshBasicMaterial||le.isMeshStandardMaterial||le.isShaderMaterial)&&gn.setValue(G,"isOrthographic",z.isOrthographicCamera===!0),b!==z&&(b=z,$i=!0,Nn=!0)}if(re.isSkinnedMesh){gn.setOptional(G,re,"bindMatrix"),gn.setOptional(G,re,"bindMatrixInverse");const Vn=re.skeleton;Vn&&(Ce.floatVertexTextures?(Vn.boneTexture===null&&Vn.computeBoneTexture(),gn.setValue(G,"boneTexture",Vn.boneTexture,U)):console.warn("THREE.WebGLRenderer: SkinnedMesh can only be used with WebGL 2. With WebGL 1 OES_texture_float and vertex textures support is required."))}re.isBatchedMesh&&(gn.setOptional(G,re,"batchingTexture"),gn.setValue(G,"batchingTexture",re._matricesTexture,U));const Na=se.morphAttributes;if((Na.position!==void 0||Na.normal!==void 0||Na.color!==void 0&&Ce.isWebGL2===!0)&&yt.update(re,se,cn),($i||Ge.receiveShadow!==re.receiveShadow)&&(Ge.receiveShadow=re.receiveShadow,gn.setValue(G,"receiveShadow",re.receiveShadow)),le.isMeshGouraudMaterial&&le.envMap!==null&&(Ur.envMap.value=ot,Ur.flipEnvMap.value=ot.isCubeTexture&&ot.isRenderTargetTexture===!1?-1:1),$i&&(gn.setValue(G,"toneMappingExposure",M.toneMappingExposure),Ge.needsLights&&bm(Ur,Nn),ke&&le.fog===!0&&Le.refreshFogUniforms(Ur,ke),Le.refreshMaterialUniforms(Ur,le,ae,te,Ee),Jd.upload(G,Ef(Ge),Ur,U)),le.isShaderMaterial&&le.uniformsNeedUpdate===!0&&(Jd.upload(G,Ef(Ge),Ur,U),le.uniformsNeedUpdate=!1),le.isSpriteMaterial&&gn.setValue(G,"center",re.center),gn.setValue(G,"modelViewMatrix",re.modelViewMatrix),gn.setValue(G,"normalMatrix",re.normalMatrix),gn.setValue(G,"modelMatrix",re.matrixWorld),le.isShaderMaterial||le.isRawShaderMaterial){const Vn=le.uniformsGroups;for(let Da=0,Di=Vn.length;Da0&&U.useMultisampledRTT(z)===!1?re=Ne.get(z).__webglMultisampledFramebuffer:Array.isArray(ht)?re=ht[se]:re=ht,R.copy(z.viewport),k.copy(z.scissor),q=z.scissorTest}else R.copy(H).multiplyScalar(ae).floor(),k.copy(Y).multiplyScalar(ae).floor(),q=J;if(he.bindFramebuffer(G.FRAMEBUFFER,re)&&Ce.drawBuffers&&le&&he.drawBuffers(z,re),he.viewport(R),he.scissor(k),he.setScissorTest(q),ke){const ot=Ne.get(z.texture);G.framebufferTexture2D(G.FRAMEBUFFER,G.COLOR_ATTACHMENT0,G.TEXTURE_CUBE_MAP_POSITIVE_X+$,ot.__webglTexture,se)}else if(Qe){const ot=Ne.get(z.texture),pt=$||0;G.framebufferTextureLayer(G.FRAMEBUFFER,G.COLOR_ATTACHMENT0,ot.__webglTexture,se||0,pt)}D=-1},this.readRenderTargetPixels=function(z,$,se,le,re,ke,Qe){if(!(z&&z.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let st=Ne.get(z).__webglFramebuffer;if(z.isWebGLCubeRenderTarget&&Qe!==void 0&&(st=st[Qe]),st){he.bindFramebuffer(G.FRAMEBUFFER,st);try{const ot=z.texture,pt=ot.format,ht=ot.type;if(pt!==pi&&He.convert(pt)!==G.getParameter(G.IMPLEMENTATION_COLOR_READ_FORMAT)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}const mt=ht===xa&&(me.has("EXT_color_buffer_half_float")||Ce.isWebGL2&&me.has("EXT_color_buffer_float"));if(ht!==Kr&&He.convert(ht)!==G.getParameter(G.IMPLEMENTATION_COLOR_READ_TYPE)&&!(ht===hr&&(Ce.isWebGL2||me.has("OES_texture_float")||me.has("WEBGL_color_buffer_float")))&&!mt){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}$>=0&&$<=z.width-le&&se>=0&&se<=z.height-re&&G.readPixels($,se,le,re,He.convert(pt),He.convert(ht),ke)}finally{const ot=L!==null?Ne.get(L).__webglFramebuffer:null;he.bindFramebuffer(G.FRAMEBUFFER,ot)}}},this.copyFramebufferToTexture=function(z,$,se=0){const le=Math.pow(2,-se),re=Math.floor($.image.width*le),ke=Math.floor($.image.height*le);U.setTexture2D($,0),G.copyTexSubImage2D(G.TEXTURE_2D,se,0,0,z.x,z.y,re,ke),he.unbindTexture()},this.copyTextureToTexture=function(z,$,se,le=0){const re=$.image.width,ke=$.image.height,Qe=He.convert(se.format),st=He.convert(se.type);U.setTexture2D(se,0),G.pixelStorei(G.UNPACK_FLIP_Y_WEBGL,se.flipY),G.pixelStorei(G.UNPACK_PREMULTIPLY_ALPHA_WEBGL,se.premultiplyAlpha),G.pixelStorei(G.UNPACK_ALIGNMENT,se.unpackAlignment),$.isDataTexture?G.texSubImage2D(G.TEXTURE_2D,le,z.x,z.y,re,ke,Qe,st,$.image.data):$.isCompressedTexture?G.compressedTexSubImage2D(G.TEXTURE_2D,le,z.x,z.y,$.mipmaps[0].width,$.mipmaps[0].height,Qe,$.mipmaps[0].data):G.texSubImage2D(G.TEXTURE_2D,le,z.x,z.y,Qe,st,$.image),le===0&&se.generateMipmaps&&G.generateMipmap(G.TEXTURE_2D),he.unbindTexture()},this.copyTextureToTexture3D=function(z,$,se,le,re=0){if(M.isWebGL1Renderer){console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");return}const ke=z.max.x-z.min.x+1,Qe=z.max.y-z.min.y+1,st=z.max.z-z.min.z+1,ot=He.convert(le.format),pt=He.convert(le.type);let ht;if(le.isData3DTexture)U.setTexture3D(le,0),ht=G.TEXTURE_3D;else if(le.isDataArrayTexture||le.isCompressedArrayTexture)U.setTexture2DArray(le,0),ht=G.TEXTURE_2D_ARRAY;else{console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");return}G.pixelStorei(G.UNPACK_FLIP_Y_WEBGL,le.flipY),G.pixelStorei(G.UNPACK_PREMULTIPLY_ALPHA_WEBGL,le.premultiplyAlpha),G.pixelStorei(G.UNPACK_ALIGNMENT,le.unpackAlignment);const mt=G.getParameter(G.UNPACK_ROW_LENGTH),tn=G.getParameter(G.UNPACK_IMAGE_HEIGHT),Hn=G.getParameter(G.UNPACK_SKIP_PIXELS),qt=G.getParameter(G.UNPACK_SKIP_ROWS),In=G.getParameter(G.UNPACK_SKIP_IMAGES),at=se.isCompressedTexture?se.mipmaps[re]:se.image;G.pixelStorei(G.UNPACK_ROW_LENGTH,at.width),G.pixelStorei(G.UNPACK_IMAGE_HEIGHT,at.height),G.pixelStorei(G.UNPACK_SKIP_PIXELS,z.min.x),G.pixelStorei(G.UNPACK_SKIP_ROWS,z.min.y),G.pixelStorei(G.UNPACK_SKIP_IMAGES,z.min.z),se.isDataTexture||se.isData3DTexture?G.texSubImage3D(ht,re,$.x,$.y,$.z,ke,Qe,st,ot,pt,at.data):se.isCompressedArrayTexture?(console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture."),G.compressedTexSubImage3D(ht,re,$.x,$.y,$.z,ke,Qe,st,ot,at.data)):G.texSubImage3D(ht,re,$.x,$.y,$.z,ke,Qe,st,ot,pt,at),G.pixelStorei(G.UNPACK_ROW_LENGTH,mt),G.pixelStorei(G.UNPACK_IMAGE_HEIGHT,tn),G.pixelStorei(G.UNPACK_SKIP_PIXELS,Hn),G.pixelStorei(G.UNPACK_SKIP_ROWS,qt),G.pixelStorei(G.UNPACK_SKIP_IMAGES,In),re===0&&le.generateMipmaps&&G.generateMipmap(ht),he.unbindTexture()},this.initTexture=function(z){z.isCubeTexture?U.setTextureCube(z,0):z.isData3DTexture?U.setTexture3D(z,0):z.isDataArrayTexture||z.isCompressedArrayTexture?U.setTexture2DArray(z,0):U.setTexture2D(z,0),he.unbindTexture()},this.resetState=function(){P=0,C=0,L=null,he.reset(),X.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return br}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(e){this._outputColorSpace=e;const t=this.getContext();t.drawingBufferColorSpace=e===tm?"display-p3":"srgb",t.unpackColorSpace=Ft.workingColorSpace===df?"display-p3":"srgb"}get outputEncoding(){return console.warn("THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead."),this.outputColorSpace===Cn?mo:qy}set outputEncoding(e){console.warn("THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead."),this.outputColorSpace=e===mo?Cn:Qr}get useLegacyLights(){return console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights}set useLegacyLights(e){console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights=e}}class jT extends r_{}jT.prototype.isWebGL1Renderer=!0;class sm{constructor(e,t=25e-5){this.isFogExp2=!0,this.name="",this.color=new Be(e),this.density=t}clone(){return new sm(this.color,this.density)}toJSON(){return{type:"FogExp2",name:this.name,color:this.color.getHex(),density:this.density}}}class om{constructor(e,t=1,i=1e3){this.isFog=!0,this.name="",this.color=new Be(e),this.near=t,this.far=i}clone(){return new om(this.color,this.near,this.far)}toJSON(){return{type:"Fog",name:this.name,color:this.color.getHex(),near:this.near,far:this.far}}}class Pp extends Ot{constructor(){super(),this.isScene=!0,this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,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,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}}class am{constructor(e,t){this.isInterleavedBuffer=!0,this.array=e,this.stride=t,this.count=e!==void 0?e.length/t:0,this.usage=Yu,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.version=0,this.uuid=Yi()}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}get updateRange(){return console.warn("THREE.InterleavedBuffer: updateRange() is deprecated and will be removed in r169. Use addUpdateRange() instead."),this._updateRange}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,i){e*=this.stride,i*=t.stride;for(let r=0,s=this.stride;re.far||t.push({distance:u,point:Gc.clone(),uv:Ci.getInterpolation(Gc,rd,Xc,sd,e3,Rg,t3,new de),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 od(n,e,t,i,r,s){hl.subVectors(n,t).addScalar(.5).multiply(i),r!==void 0?(Wc.x=s*hl.x-r*hl.y,Wc.y=r*hl.x+s*hl.y):Wc.copy(hl),n.copy(e),n.x+=Wc.x,n.y+=Wc.y,n.applyMatrix4(YT)}const ad=new O,n3=new O;class ZT extends Ot{constructor(){super(),this._currentLevel=0,this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]},isLOD:{value:!0}}),this.autoUpdate=!0}copy(e){super.copy(e,!1);const t=e.levels;for(let i=0,r=t.length;i0){let i,r;for(i=1,r=t.length;i0){ad.setFromMatrixPosition(this.matrixWorld);const r=e.ray.origin.distanceTo(ad);this.getObjectForDistance(r).raycast(e,t)}}update(e){const t=this.levels;if(t.length>1){ad.setFromMatrixPosition(e.matrixWorld),n3.setFromMatrixPosition(this.matrixWorld);const i=ad.distanceTo(n3)/e.zoom;t[0].object.visible=!0;let r,s;for(r=1,s=t.length;r=o)t[r-1].object.visible=!1,t[r].object.visible=!0;else break}for(this._currentLevel=r-1;r=i.length&&i.push({start:-1,count:-1,z:-1});const s=i[this.index];r.push(s),this.index++,s.start=e.start,s.count=e.count,s.z=t}reset(){this.list.length=0,this.index=0}}const pl="batchId",qs=new ft,f3=new ft,lN=new ft,h3=new ft,Ig=new vf,ud=new yi,Ho=new ai,qc=new O,Ng=new aN,ni=new Rn,fd=[];function cN(n,e,t=0){const i=e.itemSize;if(n.isInterleavedBufferAttribute||n.array.constructor!==e.array.constructor){const r=n.count;for(let s=0;s65536?new Uint32Array(s):new Uint16Array(s);t.setIndex(new Ht(a,1))}const o=r>65536?new Uint32Array(i):new Uint16Array(i);t.setAttribute(pl,new Ht(o,1)),this._geometryInitialized=!0}}_validateGeometry(e){if(e.getAttribute(pl))throw new Error(`BatchedMesh: Geometry cannot use attribute "${pl}"`);const t=this.geometry;if(!!e.getIndex()!=!!t.getIndex())throw new Error('BatchedMesh: All geometries must consistently have "index".');for(const i in t.attributes){if(i===pl)continue;if(!e.hasAttribute(i))throw new Error(`BatchedMesh: Added geometry missing "${i}". All geometries must have consistent attributes.`);const r=e.getAttribute(i),s=t.getAttribute(i);if(r.itemSize!==s.itemSize||r.normalized!==s.normalized)throw new Error("BatchedMesh: All attributes must have a consistent itemSize and normalized value.")}}setCustomSort(e){return this.customSort=e,this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new yi);const e=this._geometryCount,t=this.boundingBox,i=this._active;t.makeEmpty();for(let r=0;r=this._maxGeometryCount)throw new Error("BatchedMesh: Maximum geometry count reached.");const r={vertexStart:-1,vertexCount:-1,indexStart:-1,indexCount:-1};let s=null;const o=this._reservedRanges,a=this._drawRanges,u=this._bounds;this._geometryCount!==0&&(s=o[o.length-1]),t===-1?r.vertexCount=e.getAttribute("position").count:r.vertexCount=t,s===null?r.vertexStart=0:r.vertexStart=s.vertexStart+s.vertexCount;const f=e.getIndex(),h=f!==null;if(h&&(i===-1?r.indexCount=f.count:r.indexCount=i,s===null?r.indexStart=0:r.indexStart=s.indexStart+s.indexCount),r.indexStart!==-1&&r.indexStart+r.indexCount>this._maxIndexCount||r.vertexStart+r.vertexCount>this._maxVertexCount)throw new Error("BatchedMesh: Reserved space request exceeds the maximum buffer size.");const d=this._visibility,p=this._active,v=this._matricesTexture,y=this._matricesTexture.image.data;d.push(!0),p.push(!0);const w=this._geometryCount;this._geometryCount++,lN.toArray(y,w*16),v.needsUpdate=!0,o.push(r),a.push({start:h?r.indexStart:r.vertexStart,count:-1}),u.push({boxInitialized:!1,box:new yi,sphereInitialized:!1,sphere:new ai});const S=this.geometry.getAttribute(pl);for(let g=0;g=this._geometryCount)throw new Error("BatchedMesh: Maximum geometry count reached.");this._validateGeometry(t);const i=this.geometry,r=i.getIndex()!==null,s=i.getIndex(),o=t.getIndex(),a=this._reservedRanges[e];if(r&&o.count>a.indexCount||t.attributes.position.count>a.vertexCount)throw new Error("BatchedMesh: Reserved space not large enough for provided geometry.");const u=a.vertexStart,f=a.vertexCount;for(const v in i.attributes){if(v===pl)continue;const y=t.getAttribute(v),w=i.getAttribute(v);cN(y,w,u);const S=y.itemSize;for(let g=y.count,x=f;g=t.length||t[e]===!1?this:(t[e]=!1,this._visibilityChanged=!0,this)}getBoundingBoxAt(e,t){if(this._active[e]===!1)return this;const r=this._bounds[e],s=r.box,o=this.geometry;if(r.boxInitialized===!1){s.makeEmpty();const a=o.index,u=o.attributes.position,f=this._drawRanges[e];for(let h=f.start,d=f.start+f.count;h=o||i[e]===!1?this:(t.toArray(s,e*16),r.needsUpdate=!0,this)}getMatrixAt(e,t){const i=this._active,r=this._matricesTexture.image.data,s=this._geometryCount;return e>=s||i[e]===!1?null:t.fromArray(r,e*16)}setVisibleAt(e,t){const i=this._visibility,r=this._active,s=this._geometryCount;return e>=s||r[e]===!1||i[e]===t?this:(i[e]=t,this._visibilityChanged=!0,this)}getVisibleAt(e){const t=this._visibility,i=this._active,r=this._geometryCount;return e>=r||i[e]===!1?!1:t[e]}raycast(e,t){const i=this._visibility,r=this._active,s=this._drawRanges,o=this._geometryCount,a=this.matrixWorld,u=this.geometry;ni.material=this.material,ni.geometry.index=u.index,ni.geometry.attributes=u.attributes,ni.geometry.boundingBox===null&&(ni.geometry.boundingBox=new yi),ni.geometry.boundingSphere===null&&(ni.geometry.boundingSphere=new ai);for(let f=0;f({...t})),this._reservedRanges=e._reservedRanges.map(t=>({...t})),this._visibility=e._visibility.slice(),this._active=e._active.slice(),this._bounds=e._bounds.map(t=>({boxInitialized:t.boxInitialized,box:t.box.clone(),sphereInitialized:t.sphereInitialized,sphere:t.sphere.clone()})),this._maxGeometryCount=e._maxGeometryCount,this._maxVertexCount=e._maxVertexCount,this._maxIndexCount=e._maxIndexCount,this._geometryInitialized=e._geometryInitialized,this._geometryCount=e._geometryCount,this._multiDrawCounts=e._multiDrawCounts.slice(),this._multiDrawStarts=e._multiDrawStarts.slice(),this._matricesTexture=e._matricesTexture.clone(),this._matricesTexture.image.data=this._matricesTexture.image.slice(),this}dispose(){return this.geometry.dispose(),this._matricesTexture.dispose(),this._matricesTexture=null,this}onBeforeRender(e,t,i,r,s){if(!this._visibilityChanged&&!this.perObjectFrustumCulled&&!this.sortObjects)return;const o=r.getIndex(),a=o===null?1:o.array.BYTES_PER_ELEMENT,u=this._visibility,f=this._multiDrawStarts,h=this._multiDrawCounts,d=this._drawRanges,p=this.perObjectFrustumCulled;p&&(h3.multiplyMatrices(i.projectionMatrix,i.matrixWorldInverse).multiply(this.matrixWorld),Ig.setFromProjectionMatrix(h3,e.isWebGPURenderer?Jl:br));let v=0;if(this.sortObjects){f3.copy(this.matrixWorld).invert(),qc.setFromMatrixPosition(i.matrixWorld).applyMatrix4(f3);for(let S=0,g=u.length;Su)continue;p.applyMatrix4(this.matrixWorld);const D=e.ray.origin.distanceTo(p);De.far||t.push({distance:D,point:d.clone().applyMatrix4(this.matrixWorld),index:M,face:null,faceIndex:null,object:this})}}else{const g=Math.max(0,o.start),x=Math.min(S.count,o.start+o.count);for(let M=g,T=x-1;Mu)continue;p.applyMatrix4(this.matrixWorld);const C=e.ray.origin.distanceTo(p);Ce.far||t.push({distance:C,point:d.clone().applyMatrix4(this.matrixWorld),index:M,face:null,faceIndex:null,object:this})}}}updateMorphTargets(){const t=this.geometry.morphAttributes,i=Object.keys(t);if(i.length>0){const r=t[i[0]];if(r!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,o=r.length;s0){const r=t[i[0]];if(r!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,o=r.length;sr.far)return;s.push({distance:f,distanceToRay:Math.sqrt(a),point:u,index:e,face:null,object:o})}}class uN extends mn{constructor(e,t,i,r,s,o,a,u,f){super(e,t,i,r,s,o,a,u,f),this.isVideoTexture=!0,this.minFilter=o!==void 0?o:sn,this.magFilter=s!==void 0?s:sn,this.generateMipmaps=!1;const h=this;function d(){h.needsUpdate=!0,e.requestVideoFrameCallback(d)}"requestVideoFrameCallback"in e&&e.requestVideoFrameCallback(d)}clone(){return new this.constructor(this.image).copy(this)}update(){const e=this.image;"requestVideoFrameCallback"in e===!1&&e.readyState>=e.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}class fN extends mn{constructor(e,t){super({width:e,height:t}),this.isFramebufferTexture=!0,this.magFilter=_n,this.minFilter=_n,this.generateMipmaps=!1,this.needsUpdate=!0}}class cm extends mn{constructor(e,t,i,r,s,o,a,u,f,h,d,p){super(null,o,a,u,f,h,r,s,d,p),this.isCompressedTexture=!0,this.image={width:t,height:i},this.mipmaps=e,this.flipY=!1,this.generateMipmaps=!1}}class hN extends cm{constructor(e,t,i,r,s,o){super(e,t,i,s,o),this.isCompressedArrayTexture=!0,this.image.depth=r,this.wrapR=si}}class dN extends cm{constructor(e,t,i){super(void 0,e[0].width,e[0].height,t,i,Ps),this.isCompressedCubeTexture=!0,this.isCubeTexture=!0,this.image=e}}class pN extends mn{constructor(e,t,i,r,s,o,a,u,f){super(e,t,i,r,s,o,a,u,f),this.isCanvasTexture=!0,this.needsUpdate=!0}}class Ir{constructor(){this.type="Curve",this.arcLengthDivisions=200}getPoint(){return console.warn("THREE.Curve: .getPoint() not implemented."),null}getPointAt(e,t){const i=this.getUtoTmapping(e);return this.getPoint(i,t)}getPoints(e=5){const t=[];for(let i=0;i<=e;i++)t.push(this.getPoint(i/e));return t}getSpacedPoints(e=5){const t=[];for(let i=0;i<=e;i++)t.push(this.getPointAt(i/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 i,r=this.getPoint(0),s=0;t.push(0);for(let o=1;o<=e;o++)i=this.getPoint(o/e),s+=i.distanceTo(r),t.push(s),r=i;return this.cacheArcLengths=t,t}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(e,t){const i=this.getLengths();let r=0;const s=i.length;let o;t?o=t:o=e*i[s-1];let a=0,u=s-1,f;for(;a<=u;)if(r=Math.floor(a+(u-a)/2),f=i[r]-o,f<0)a=r+1;else if(f>0)u=r-1;else{u=r;break}if(r=u,i[r]===o)return r/(s-1);const h=i[r],p=i[r+1]-h,v=(o-h)/p;return(r+v)/(s-1)}getTangent(e,t){let r=e-1e-4,s=e+1e-4;r<0&&(r=0),s>1&&(s=1);const o=this.getPoint(r),a=this.getPoint(s),u=t||(o.isVector2?new de:new O);return u.copy(a).sub(o).normalize(),u}getTangentAt(e,t){const i=this.getUtoTmapping(e);return this.getTangent(i,t)}computeFrenetFrames(e,t){const i=new O,r=[],s=[],o=[],a=new O,u=new ft;for(let v=0;v<=e;v++){const y=v/e;r[v]=this.getTangentAt(y,new O)}s[0]=new O,o[0]=new O;let f=Number.MAX_VALUE;const h=Math.abs(r[0].x),d=Math.abs(r[0].y),p=Math.abs(r[0].z);h<=f&&(f=h,i.set(1,0,0)),d<=f&&(f=d,i.set(0,1,0)),p<=f&&i.set(0,0,1),a.crossVectors(r[0],i).normalize(),s[0].crossVectors(r[0],a),o[0].crossVectors(r[0],s[0]);for(let v=1;v<=e;v++){if(s[v]=s[v-1].clone(),o[v]=o[v-1].clone(),a.crossVectors(r[v-1],r[v]),a.length()>Number.EPSILON){a.normalize();const y=Math.acos(dn(r[v-1].dot(r[v]),-1,1));s[v].applyMatrix4(u.makeRotationAxis(a,y))}o[v].crossVectors(r[v],s[v])}if(t===!0){let v=Math.acos(dn(s[0].dot(s[e]),-1,1));v/=e,r[0].dot(a.crossVectors(s[0],s[e]))>0&&(v=-v);for(let y=1;y<=e;y++)s[y].applyMatrix4(u.makeRotationAxis(r[y],v*y)),o[y].crossVectors(r[y],s[y])}return{tangents:r,normals:s,binormals:o}}clone(){return new this.constructor().copy(this)}copy(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}toJSON(){const e={metadata:{version:4.6,type:"Curve",generator:"Curve.toJSON"}};return e.arcLengthDivisions=this.arcLengthDivisions,e.type=this.type,e}fromJSON(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}}class um extends Ir{constructor(e=0,t=0,i=1,r=1,s=0,o=Math.PI*2,a=!1,u=0){super(),this.isEllipseCurve=!0,this.type="EllipseCurve",this.aX=e,this.aY=t,this.xRadius=i,this.yRadius=r,this.aStartAngle=s,this.aEndAngle=o,this.aClockwise=a,this.aRotation=u}getPoint(e,t){const i=t||new de,r=Math.PI*2;let s=this.aEndAngle-this.aStartAngle;const o=Math.abs(s)r;)s-=r;s0?0:(Math.floor(Math.abs(a)/s)+1)*s:u===0&&a===s-1&&(a=s-2,u=1);let f,h;this.closed||a>0?f=r[(a-1)%s]:(md.subVectors(r[0],r[1]).add(r[0]),f=md);const d=r[a%s],p=r[(a+1)%s];if(this.closed||a+2r.length-2?r.length-1:o+1],d=r[o>r.length-3?r.length-1:o+2];return i.set(x3(a,u.x,f.x,h.x,d.x),x3(a,u.y,f.y,h.y,d.y)),i}copy(e){super.copy(e),this.points=[];for(let t=0,i=e.points.length;t=i){const o=r[s]-i,a=this.curves[s],u=a.getLength(),f=u===0?0:1-o/u;return a.getPointAt(f,t)}s++}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 i=0,r=this.curves.length;i1&&!t[t.length-1].equals(t[0])&&t.push(t[0]),t}copy(e){super.copy(e),this.curves=[];for(let t=0,i=e.curves.length;t0){const d=f.getPoint(0);d.equals(this.currentPoint)||this.lineTo(d.x,d.y)}this.curves.push(f);const h=f.getPoint(1);return this.currentPoint.copy(h),this}copy(e){return super.copy(e),this.currentPoint.copy(e.currentPoint),this}toJSON(){const e=super.toJSON();return e.currentPoint=this.currentPoint.toArray(),e}fromJSON(e){return super.fromJSON(e),this.currentPoint.fromArray(e.currentPoint),this}}class _f extends St{constructor(e=[new de(0,-.5),new de(.5,0),new de(0,.5)],t=12,i=0,r=Math.PI*2){super(),this.type="LatheGeometry",this.parameters={points:e,segments:t,phiStart:i,phiLength:r},t=Math.floor(t),r=dn(r,0,Math.PI*2);const s=[],o=[],a=[],u=[],f=[],h=1/t,d=new O,p=new de,v=new O,y=new O,w=new O;let S=0,g=0;for(let x=0;x<=e.length-1;x++)switch(x){case 0:S=e[x+1].x-e[x].x,g=e[x+1].y-e[x].y,v.x=g*1,v.y=-S,v.z=g*0,w.copy(v),v.normalize(),u.push(v.x,v.y,v.z);break;case e.length-1:u.push(w.x,w.y,w.z);break;default:S=e[x+1].x-e[x].x,g=e[x+1].y-e[x].y,v.x=g*1,v.y=-S,v.z=g*0,y.copy(v),v.x+=w.x,v.y+=w.y,v.z+=w.z,v.normalize(),u.push(v.x,v.y,v.z),w.copy(y)}for(let x=0;x<=t;x++){const M=i+x*h*r,T=Math.sin(M),P=Math.cos(M);for(let C=0;C<=e.length-1;C++){d.x=e[C].x*T,d.y=e[C].y,d.z=e[C].x*P,o.push(d.x,d.y,d.z),p.x=x/t,p.y=C/(e.length-1),a.push(p.x,p.y);const L=u[3*C+0]*T,D=u[3*C+1],b=u[3*C+0]*P;f.push(L,D,b)}}for(let x=0;x0&&M(!0),t>0&&M(!1)),this.setIndex(h),this.setAttribute("position",new qe(d,3)),this.setAttribute("normal",new qe(p,3)),this.setAttribute("uv",new qe(v,2));function x(){const T=new O,P=new O;let C=0;const L=(t-e)/i;for(let D=0;D<=s;D++){const b=[],R=D/s,k=R*(t-e)+e;for(let q=0;q<=r;q++){const oe=q/r,V=oe*u+a,Q=Math.sin(V),te=Math.cos(V);P.x=k*Q,P.y=-R*i+S,P.z=k*te,d.push(P.x,P.y,P.z),T.set(Q,L,te).normalize(),p.push(T.x,T.y,T.z),v.push(oe,1-R),b.push(y++)}w.push(b)}for(let D=0;D.9&&L<.1&&(M<.2&&(o[x+0]+=1),T<.2&&(o[x+2]+=1),P<.2&&(o[x+4]+=1))}}function p(x){s.push(x.x,x.y,x.z)}function v(x,M){const T=x*3;M.x=e[T+0],M.y=e[T+1],M.z=e[T+2]}function y(){const x=new O,M=new O,T=new O,P=new O,C=new de,L=new de,D=new de;for(let b=0,R=0;b80*t){a=f=n[0],u=h=n[1];for(let y=t;yf&&(f=d),p>h&&(h=p);v=Math.max(f-a,h-u),v=v!==0?32767/v:0}return Ku(s,o,t,a,u,v,0),o}};function a4(n,e,t,i,r){let s,o;if(r===FN(n,e,t,i)>0)for(s=e;s=e;s-=i)o=S3(s,n[s],n[s+1],o);return o&&mm(o,o.next)&&(Qu(o),o=o.next),o}function wa(n,e){if(!n)return n;e||(e=n);let t=n,i;do if(i=!1,!t.steiner&&(mm(t,t.next)||on(t.prev,t,t.next)===0)){if(Qu(t),t=e=t.prev,t===t.next)break;i=!0}else t=t.next;while(i||t!==e);return e}function Ku(n,e,t,i,r,s,o){if(!n)return;!o&&s&&IN(n,i,r,s);let a=n,u,f;for(;n.prev!==n.next;){if(u=n.prev,f=n.next,s?EN(n,i,r,s):wN(n)){e.push(u.i/t|0),e.push(n.i/t|0),e.push(f.i/t|0),Qu(n),n=f.next,a=f.next;continue}if(n=f,n===a){o?o===1?(n=TN(wa(n),e,t),Ku(n,e,t,i,r,s,2)):o===2&&AN(n,e,t,i,r,s):Ku(wa(n),e,t,i,r,s,1);break}}}function wN(n){const e=n.prev,t=n,i=n.next;if(on(e,t,i)>=0)return!1;const r=e.x,s=t.x,o=i.x,a=e.y,u=t.y,f=i.y,h=rs?r>o?r:o:s>o?s:o,v=a>u?a>f?a:f:u>f?u:f;let y=i.next;for(;y!==e;){if(y.x>=h&&y.x<=p&&y.y>=d&&y.y<=v&&Ul(r,a,s,u,o,f,y.x,y.y)&&on(y.prev,y,y.next)>=0)return!1;y=y.next}return!0}function EN(n,e,t,i){const r=n.prev,s=n,o=n.next;if(on(r,s,o)>=0)return!1;const a=r.x,u=s.x,f=o.x,h=r.y,d=s.y,p=o.y,v=au?a>f?a:f:u>f?u:f,S=h>d?h>p?h:p:d>p?d:p,g=Lv(v,y,e,t,i),x=Lv(w,S,e,t,i);let M=n.prevZ,T=n.nextZ;for(;M&&M.z>=g&&T&&T.z<=x;){if(M.x>=v&&M.x<=w&&M.y>=y&&M.y<=S&&M!==r&&M!==o&&Ul(a,h,u,d,f,p,M.x,M.y)&&on(M.prev,M,M.next)>=0||(M=M.prevZ,T.x>=v&&T.x<=w&&T.y>=y&&T.y<=S&&T!==r&&T!==o&&Ul(a,h,u,d,f,p,T.x,T.y)&&on(T.prev,T,T.next)>=0))return!1;T=T.nextZ}for(;M&&M.z>=g;){if(M.x>=v&&M.x<=w&&M.y>=y&&M.y<=S&&M!==r&&M!==o&&Ul(a,h,u,d,f,p,M.x,M.y)&&on(M.prev,M,M.next)>=0)return!1;M=M.prevZ}for(;T&&T.z<=x;){if(T.x>=v&&T.x<=w&&T.y>=y&&T.y<=S&&T!==r&&T!==o&&Ul(a,h,u,d,f,p,T.x,T.y)&&on(T.prev,T,T.next)>=0)return!1;T=T.nextZ}return!0}function TN(n,e,t){let i=n;do{const r=i.prev,s=i.next.next;!mm(r,s)&&l4(r,i,i.next,s)&&Ju(r,s)&&Ju(s,r)&&(e.push(r.i/t|0),e.push(i.i/t|0),e.push(s.i/t|0),Qu(i),Qu(i.next),i=n=s),i=i.next}while(i!==n);return wa(i)}function AN(n,e,t,i,r,s){let o=n;do{let a=o.next.next;for(;a!==o.prev;){if(o.i!==a.i&&UN(o,a)){let u=c4(o,a);o=wa(o,o.next),u=wa(u,u.next),Ku(o,e,t,i,r,s,0),Ku(u,e,t,i,r,s,0);return}a=a.next}o=o.next}while(o!==n)}function CN(n,e,t,i){const r=[];let s,o,a,u,f;for(s=0,o=e.length;s=t.next.y&&t.next.y!==t.y){const p=t.x+(o-t.y)*(t.next.x-t.x)/(t.next.y-t.y);if(p<=s&&p>i&&(i=p,r=t.x=t.x&&t.x>=u&&s!==t.x&&Ul(or.x||t.x===r.x&&LN(r,t)))&&(r=t,h=d)),t=t.next;while(t!==a);return r}function LN(n,e){return on(n.prev,n,e.prev)<0&&on(e.next,n,n.next)<0}function IN(n,e,t,i){let r=n;do r.z===0&&(r.z=Lv(r.x,r.y,e,t,i)),r.prevZ=r.prev,r.nextZ=r.next,r=r.next;while(r!==n);r.prevZ.nextZ=null,r.prevZ=null,NN(r)}function NN(n){let e,t,i,r,s,o,a,u,f=1;do{for(t=n,n=null,s=null,o=0;t;){for(o++,i=t,a=0,e=0;e0||u>0&&i;)a!==0&&(u===0||!i||t.z<=i.z)?(r=t,t=t.nextZ,a--):(r=i,i=i.nextZ,u--),s?s.nextZ=r:n=r,r.prevZ=s,s=r;t=i}s.nextZ=null,f*=2}while(o>1);return n}function Lv(n,e,t,i,r){return n=(n-t)*r|0,e=(e-i)*r|0,n=(n|n<<8)&16711935,n=(n|n<<4)&252645135,n=(n|n<<2)&858993459,n=(n|n<<1)&1431655765,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,n|e<<1}function DN(n){let e=n,t=n;do(e.x=(n-o)*(s-a)&&(n-o)*(i-a)>=(t-o)*(e-a)&&(t-o)*(s-a)>=(r-o)*(i-a)}function UN(n,e){return n.next.i!==e.i&&n.prev.i!==e.i&&!zN(n,e)&&(Ju(n,e)&&Ju(e,n)&&ON(n,e)&&(on(n.prev,n,e.prev)||on(n,e.prev,e))||mm(n,e)&&on(n.prev,n,n.next)>0&&on(e.prev,e,e.next)>0)}function on(n,e,t){return(e.y-n.y)*(t.x-e.x)-(e.x-n.x)*(t.y-e.y)}function mm(n,e){return n.x===e.x&&n.y===e.y}function l4(n,e,t,i){const r=xd(on(n,e,t)),s=xd(on(n,e,i)),o=xd(on(t,i,n)),a=xd(on(t,i,e));return!!(r!==s&&o!==a||r===0&&_d(n,t,e)||s===0&&_d(n,i,e)||o===0&&_d(t,n,i)||a===0&&_d(t,e,i))}function _d(n,e,t){return e.x<=Math.max(n.x,t.x)&&e.x>=Math.min(n.x,t.x)&&e.y<=Math.max(n.y,t.y)&&e.y>=Math.min(n.y,t.y)}function xd(n){return n>0?1:n<0?-1:0}function zN(n,e){let t=n;do{if(t.i!==n.i&&t.next.i!==n.i&&t.i!==e.i&&t.next.i!==e.i&&l4(t,t.next,n,e))return!0;t=t.next}while(t!==n);return!1}function Ju(n,e){return on(n.prev,n,n.next)<0?on(n,e,n.next)>=0&&on(n,n.prev,e)>=0:on(n,e,n.prev)<0||on(n,n.next,e)<0}function ON(n,e){let t=n,i=!1;const r=(n.x+e.x)/2,s=(n.y+e.y)/2;do t.y>s!=t.next.y>s&&t.next.y!==t.y&&r<(t.next.x-t.x)*(s-t.y)/(t.next.y-t.y)+t.x&&(i=!i),t=t.next;while(t!==n);return i}function c4(n,e){const t=new Iv(n.i,n.x,n.y),i=new Iv(e.i,e.x,e.y),r=n.next,s=e.prev;return n.next=e,e.prev=n,t.next=r,r.prev=t,i.next=t,t.prev=i,s.next=i,i.prev=s,i}function S3(n,e,t,i){const r=new Iv(n,e,t);return i?(r.next=i.next,r.prev=i,i.next.prev=r,i.next=r):(r.prev=r,r.next=r),r}function Qu(n){n.next.prev=n.prev,n.prev.next=n.next,n.prevZ&&(n.prevZ.nextZ=n.nextZ),n.nextZ&&(n.nextZ.prevZ=n.prevZ)}function Iv(n,e,t){this.i=n,this.x=e,this.y=t,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function FN(n,e,t,i){let r=0;for(let s=e,o=t-i;s2&&n[e-1].equals(n[0])&&n.pop()}function w3(n,e){for(let t=0;tNumber.EPSILON){const ye=Math.sqrt(xe),je=Math.sqrt(I*I+ee*ee),Le=we.x-U/ye,Fe=we.y+Ne/ye,tt=me.x-ee/je,dt=me.y+I/je,Se=((tt-Le)*ee-(dt-Fe)*I)/(Ne*ee-U*I);Ce=Le+Ne*Se-G.x,he=Fe+U*Se-G.y;const Ct=Ce*Ce+he*he;if(Ct<=2)return new de(Ce,he);Ze=Math.sqrt(Ct/2)}else{let ye=!1;Ne>Number.EPSILON?I>Number.EPSILON&&(ye=!0):Ne<-Number.EPSILON?I<-Number.EPSILON&&(ye=!0):Math.sign(U)===Math.sign(ee)&&(ye=!0),ye?(Ce=-U,he=Ne,Ze=Math.sqrt(xe)):(Ce=Ne,he=U,Ze=Math.sqrt(xe/2))}return new de(Ce/Ze,he/Ze)}const B=[];for(let G=0,we=V.length,me=we-1,Ce=G+1;G=0;G--){const we=G/S,me=v*Math.cos(we*Math.PI/2),Ce=y*Math.sin(we*Math.PI/2)+w;for(let he=0,Ze=V.length;he=0;){const Ce=me;let he=me-1;he<0&&(he=G.length-1);for(let Ze=0,Ne=h+S*2;Ze0)&&v.push(M,T,C),(g!==i-1||u0!=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 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.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}}class p4 extends Yn{constructor(e){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new Be(16777215),this.specular=new Be(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Be(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Eo,this.normalScale=new de(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=hf,this.reflectivity=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.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.flatShading=e.flatShading,this.fog=e.fog,this}}class m4 extends Yn{constructor(e){super(),this.isMeshToonMaterial=!0,this.defines={TOON:""},this.type="MeshToonMaterial",this.color=new Be(16777215),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Be(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Eo,this.normalScale=new de(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}}class g4 extends Yn{constructor(e){super(),this.isMeshNormalMaterial=!0,this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Eo,this.normalScale=new de(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}}class v4 extends Yn{constructor(e){super(),this.isMeshLambertMaterial=!0,this.type="MeshLambertMaterial",this.color=new Be(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Be(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Eo,this.normalScale=new de(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=hf,this.reflectivity=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.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.flatShading=e.flatShading,this.fog=e.fog,this}}class y4 extends Yn{constructor(e){super(),this.isMeshMatcapMaterial=!0,this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new Be(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Eo,this.normalScale=new de(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,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.flatShading=e.flatShading,this.fog=e.fog,this}}class _4 extends Si{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 oa(n,e,t){return!n||!t&&n.constructor===e?n:typeof e.BYTES_PER_ELEMENT=="number"?new e(n):Array.prototype.slice.call(n)}function x4(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}function S4(n){function e(r,s){return n[r]-n[s]}const t=n.length,i=new Array(t);for(let r=0;r!==t;++r)i[r]=r;return i.sort(e),i}function Nv(n,e,t){const i=n.length,r=new n.constructor(i);for(let s=0,o=0;o!==i;++s){const a=t[s]*e;for(let u=0;u!==e;++u)r[o++]=n[a+u]}return r}function m_(n,e,t,i){let r=1,s=n[0];for(;s!==void 0&&s[i]===void 0;)s=n[r++];if(s===void 0)return;let o=s[i];if(o!==void 0)if(Array.isArray(o))do o=s[i],o!==void 0&&(e.push(s.time),t.push.apply(t,o)),s=n[r++];while(s!==void 0);else if(o.toArray!==void 0)do o=s[i],o!==void 0&&(e.push(s.time),o.toArray(t,t.length)),s=n[r++];while(s!==void 0);else do o=s[i],o!==void 0&&(e.push(s.time),t.push(o)),s=n[r++];while(s!==void 0)}function VN(n,e,t,i,r=30){const s=n.clone();s.name=e;const o=[];for(let u=0;u=i)){d.push(f.times[v]);for(let w=0;ws.tracks[u].times[0]&&(a=s.tracks[u].times[0]);for(let u=0;u=a.times[y]){const g=y*d+h,x=g+d-h;w=a.values.slice(g,x)}else{const g=a.createInterpolant(),x=h,M=d-h;g.evaluate(s),w=g.resultBuffer.slice(x,M)}u==="quaternion"&&new oi().fromArray(w).normalize().conjugate().toArray(w);const S=f.times.length;for(let g=0;g=s)){const a=t[1];e=s)break t}o=i,i=0;break n}break e}for(;i>>1;et;)--o;if(++o,s!==0||o!==r){s>=o&&(o=Math.max(o,1),s=o-1);const a=this.getValueSize();this.times=i.slice(s,o),this.values=this.values.slice(s*a,o*a)}return this}validate(){let e=!0;const t=this.getValueSize();t-Math.floor(t)!==0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),e=!1);const i=this.times,r=this.values,s=i.length;s===0&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);let o=null;for(let a=0;a!==s;a++){const u=i[a];if(typeof u=="number"&&isNaN(u)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,a,u),e=!1;break}if(o!==null&&o>u){console.error("THREE.KeyframeTrack: Out of order keys.",this,a,u,o),e=!1;break}o=u}if(r!==void 0&&x4(r))for(let a=0,u=r.length;a!==u;++a){const f=r[a];if(isNaN(f)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,a,f),e=!1;break}}return e}optimize(){const e=this.times.slice(),t=this.values.slice(),i=this.getValueSize(),r=this.getInterpolation()===Kd,s=e.length-1;let o=1;for(let a=1;a0){e[o]=e[s];for(let a=s*i,u=o*i,f=0;f!==i;++f)t[u+f]=t[a+f];++o}return o!==e.length?(this.times=e.slice(0,o),this.values=t.slice(0,o*i)):(this.times=e,this.values=t),this}clone(){const e=this.times.slice(),t=this.values.slice(),i=this.constructor,r=new i(this.name,e,t);return r.createInterpolant=this.createInterpolant,r}}Nr.prototype.TimeBufferType=Float32Array;Nr.prototype.ValueBufferType=Float32Array;Nr.prototype.DefaultInterpolation=Vu;class ba extends Nr{}ba.prototype.ValueTypeName="bool";ba.prototype.ValueBufferType=Array;ba.prototype.DefaultInterpolation=Hu;ba.prototype.InterpolantFactoryMethodLinear=void 0;ba.prototype.InterpolantFactoryMethodSmooth=void 0;class v_ extends Nr{}v_.prototype.ValueTypeName="color";class $u extends Nr{}$u.prototype.ValueTypeName="number";class E4 extends Mf{constructor(e,t,i,r){super(e,t,i,r)}interpolate_(e,t,i,r){const s=this.resultBuffer,o=this.sampleValues,a=this.valueSize,u=(i-t)/(r-t);let f=e*a;for(let h=f+a;f!==h;f+=4)oi.slerpFlat(s,0,o,f-a,o,f,u);return s}}class cc extends Nr{InterpolantFactoryMethodLinear(e){return new E4(this.times,this.values,this.getValueSize(),e)}}cc.prototype.ValueTypeName="quaternion";cc.prototype.DefaultInterpolation=Vu;cc.prototype.InterpolantFactoryMethodSmooth=void 0;class Ra extends Nr{}Ra.prototype.ValueTypeName="string";Ra.prototype.ValueBufferType=Array;Ra.prototype.DefaultInterpolation=Hu;Ra.prototype.InterpolantFactoryMethodLinear=void 0;Ra.prototype.InterpolantFactoryMethodSmooth=void 0;class ef extends Nr{}ef.prototype.ValueTypeName="vector";class tf{constructor(e,t=-1,i,r=em){this.name=e,this.tracks=i,this.duration=t,this.blendMode=r,this.uuid=Yi(),this.duration<0&&this.resetDuration()}static parse(e){const t=[],i=e.tracks,r=1/(e.fps||1);for(let o=0,a=i.length;o!==a;++o)t.push(jN(i[o]).scale(r));const s=new this(e.name,e.duration,t,e.blendMode);return s.uuid=e.uuid,s}static toJSON(e){const t=[],i=e.tracks,r={name:e.name,duration:e.duration,tracks:t,uuid:e.uuid,blendMode:e.blendMode};for(let s=0,o=i.length;s!==o;++s)t.push(Nr.toJSON(i[s]));return r}static CreateFromMorphTargetSequence(e,t,i,r){const s=t.length,o=[];for(let a=0;a1){const d=h[1];let p=r[d];p||(r[d]=p=[]),p.push(f)}}const o=[];for(const a in r)o.push(this.CreateFromMorphTargetSequence(a,r[a],t,i));return o}static parseAnimation(e,t){if(!e)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;const i=function(d,p,v,y,w){if(v.length!==0){const S=[],g=[];m_(v,S,g,y),S.length!==0&&w.push(new d(p,S,g))}},r=[],s=e.name||"default",o=e.fps||30,a=e.blendMode;let u=e.length||-1;const f=e.hierarchy||[];for(let d=0;d{t&&t(s),this.manager.itemEnd(e)},0),s;if(ds[e]!==void 0){ds[e].push({onLoad:t,onProgress:i,onError:r});return}ds[e]=[],ds[e].push({onLoad:t,onProgress:i,onError:r});const o=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),a=this.mimeType,u=this.responseType;fetch(o).then(f=>{if(f.status===200||f.status===0){if(f.status===0&&console.warn("THREE.FileLoader: HTTP Status 0 received."),typeof ReadableStream>"u"||f.body===void 0||f.body.getReader===void 0)return f;const h=ds[e],d=f.body.getReader(),p=f.headers.get("Content-Length")||f.headers.get("X-File-Size"),v=p?parseInt(p):0,y=v!==0;let w=0;const S=new ReadableStream({start(g){x();function x(){d.read().then(({done:M,value:T})=>{if(M)g.close();else{w+=T.byteLength;const P=new ProgressEvent("progress",{lengthComputable:y,loaded:w,total:v});for(let C=0,L=h.length;C{switch(u){case"arraybuffer":return f.arrayBuffer();case"blob":return f.blob();case"document":return f.text().then(h=>new DOMParser().parseFromString(h,a));case"json":return f.json();default:if(a===void 0)return f.text();{const d=/charset="?([^;"\s]*)"?/i.exec(a),p=d&&d[1]?d[1].toLowerCase():void 0,v=new TextDecoder(p);return f.arrayBuffer().then(y=>v.decode(y))}}}).then(f=>{Ms.add(e,f);const h=ds[e];delete ds[e];for(let d=0,p=h.length;d{const h=ds[e];if(h===void 0)throw this.manager.itemError(e),f;delete ds[e];for(let d=0,p=h.length;d{this.manager.itemEnd(e)}),this.manager.itemStart(e)}setResponseType(e){return this.responseType=e,this}setMimeType(e){return this.mimeType=e,this}}class qN extends Ni{constructor(e){super(e)}load(e,t,i,r){const s=this,o=new Ls(this.manager);o.setPath(this.path),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(e,function(a){try{t(s.parse(JSON.parse(a)))}catch(u){r?r(u):console.error(u),s.manager.itemError(e)}},i,r)}parse(e){const t=[];for(let i=0;i0:r.vertexColors=e.vertexColors),e.uniforms!==void 0)for(const s in e.uniforms){const o=e.uniforms[s];switch(r.uniforms[s]={},o.type){case"t":r.uniforms[s].value=i(o.value);break;case"c":r.uniforms[s].value=new Be().setHex(o.value);break;case"v2":r.uniforms[s].value=new de().fromArray(o.value);break;case"v3":r.uniforms[s].value=new O().fromArray(o.value);break;case"v4":r.uniforms[s].value=new kt().fromArray(o.value);break;case"m3":r.uniforms[s].value=new wt().fromArray(o.value);break;case"m4":r.uniforms[s].value=new ft().fromArray(o.value);break;default:r.uniforms[s].value=o.value}}if(e.defines!==void 0&&(r.defines=e.defines),e.vertexShader!==void 0&&(r.vertexShader=e.vertexShader),e.fragmentShader!==void 0&&(r.fragmentShader=e.fragmentShader),e.glslVersion!==void 0&&(r.glslVersion=e.glslVersion),e.extensions!==void 0)for(const s in e.extensions)r.extensions[s]=e.extensions[s];if(e.lights!==void 0&&(r.lights=e.lights),e.clipping!==void 0&&(r.clipping=e.clipping),e.size!==void 0&&(r.size=e.size),e.sizeAttenuation!==void 0&&(r.sizeAttenuation=e.sizeAttenuation),e.map!==void 0&&(r.map=i(e.map)),e.matcap!==void 0&&(r.matcap=i(e.matcap)),e.alphaMap!==void 0&&(r.alphaMap=i(e.alphaMap)),e.bumpMap!==void 0&&(r.bumpMap=i(e.bumpMap)),e.bumpScale!==void 0&&(r.bumpScale=e.bumpScale),e.normalMap!==void 0&&(r.normalMap=i(e.normalMap)),e.normalMapType!==void 0&&(r.normalMapType=e.normalMapType),e.normalScale!==void 0){let s=e.normalScale;Array.isArray(s)===!1&&(s=[s,s]),r.normalScale=new de().fromArray(s)}return e.displacementMap!==void 0&&(r.displacementMap=i(e.displacementMap)),e.displacementScale!==void 0&&(r.displacementScale=e.displacementScale),e.displacementBias!==void 0&&(r.displacementBias=e.displacementBias),e.roughnessMap!==void 0&&(r.roughnessMap=i(e.roughnessMap)),e.metalnessMap!==void 0&&(r.metalnessMap=i(e.metalnessMap)),e.emissiveMap!==void 0&&(r.emissiveMap=i(e.emissiveMap)),e.emissiveIntensity!==void 0&&(r.emissiveIntensity=e.emissiveIntensity),e.specularMap!==void 0&&(r.specularMap=i(e.specularMap)),e.specularIntensityMap!==void 0&&(r.specularIntensityMap=i(e.specularIntensityMap)),e.specularColorMap!==void 0&&(r.specularColorMap=i(e.specularColorMap)),e.envMap!==void 0&&(r.envMap=i(e.envMap)),e.envMapIntensity!==void 0&&(r.envMapIntensity=e.envMapIntensity),e.reflectivity!==void 0&&(r.reflectivity=e.reflectivity),e.refractionRatio!==void 0&&(r.refractionRatio=e.refractionRatio),e.lightMap!==void 0&&(r.lightMap=i(e.lightMap)),e.lightMapIntensity!==void 0&&(r.lightMapIntensity=e.lightMapIntensity),e.aoMap!==void 0&&(r.aoMap=i(e.aoMap)),e.aoMapIntensity!==void 0&&(r.aoMapIntensity=e.aoMapIntensity),e.gradientMap!==void 0&&(r.gradientMap=i(e.gradientMap)),e.clearcoatMap!==void 0&&(r.clearcoatMap=i(e.clearcoatMap)),e.clearcoatRoughnessMap!==void 0&&(r.clearcoatRoughnessMap=i(e.clearcoatRoughnessMap)),e.clearcoatNormalMap!==void 0&&(r.clearcoatNormalMap=i(e.clearcoatNormalMap)),e.clearcoatNormalScale!==void 0&&(r.clearcoatNormalScale=new de().fromArray(e.clearcoatNormalScale)),e.iridescenceMap!==void 0&&(r.iridescenceMap=i(e.iridescenceMap)),e.iridescenceThicknessMap!==void 0&&(r.iridescenceThicknessMap=i(e.iridescenceThicknessMap)),e.transmissionMap!==void 0&&(r.transmissionMap=i(e.transmissionMap)),e.thicknessMap!==void 0&&(r.thicknessMap=i(e.thicknessMap)),e.anisotropyMap!==void 0&&(r.anisotropyMap=i(e.anisotropyMap)),e.sheenColorMap!==void 0&&(r.sheenColorMap=i(e.sheenColorMap)),e.sheenRoughnessMap!==void 0&&(r.sheenRoughnessMap=i(e.sheenRoughnessMap)),r}setTextures(e){return this.textures=e,this}static createMaterialFromType(e){const t={ShadowMaterial:f4,SpriteMaterial:s_,RawShaderMaterial:h4,ShaderMaterial:$r,PointsMaterial:a_,MeshPhysicalMaterial:d4,MeshStandardMaterial:p_,MeshPhongMaterial:p4,MeshToonMaterial:m4,MeshNormalMaterial:g4,MeshLambertMaterial:v4,MeshDepthMaterial:n_,MeshDistanceMaterial:i_,MeshBasicMaterial:To,MeshMatcapMaterial:y4,LineDashedMaterial:_4,LineBasicMaterial:Si,Material:Yn};return new t[e]}}class Uv{static decodeText(e){if(typeof TextDecoder<"u")return new TextDecoder().decode(e);let t="";for(let i=0,r=e.length;i0){const u=new y_(t);s=new nf(u),s.setCrossOrigin(this.crossOrigin);for(let f=0,h=e.length;f0){r=new nf(this.manager),r.setCrossOrigin(this.crossOrigin);for(let o=0,a=e.length;o{const S=new yi;S.min.fromArray(w.boxMin),S.max.fromArray(w.boxMax);const g=new ai;return g.radius=w.sphereRadius,g.center.fromArray(w.sphereCenter),{boxInitialized:w.boxInitialized,box:S,sphereInitialized:w.sphereInitialized,sphere:g}}),o._maxGeometryCount=e.maxGeometryCount,o._maxVertexCount=e.maxVertexCount,o._maxIndexCount=e.maxIndexCount,o._geometryInitialized=e.geometryInitialized,o._geometryCount=e.geometryCount,o._matricesTexture=f(e.matricesTexture.uuid);break;case"LOD":o=new ZT;break;case"Line":o=new xo(a(e.geometry),u(e.material));break;case"LineLoop":o=new $T(a(e.geometry),u(e.material));break;case"LineSegments":o=new ts(a(e.geometry),u(e.material));break;case"PointCloud":case"Points":o=new e4(a(e.geometry),u(e.material));break;case"Sprite":o=new qT(u(e.material));break;case"Group":o=new Dl;break;case"Bone":o=new o_;break;default:o=new Ot}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.castShadow!==void 0&&(o.castShadow=e.castShadow),e.receiveShadow!==void 0&&(o.receiveShadow=e.receiveShadow),e.shadow&&(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.userData!==void 0&&(o.userData=e.userData),e.layers!==void 0&&(o.layers.mask=e.layers),e.children!==void 0){const p=e.children;for(let v=0;v"u"&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),typeof fetch>"u"&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.options={premultiplyAlpha:"none"}}setOptions(e){return this.options=e,this}load(e,t,i,r){e===void 0&&(e=""),this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const s=this,o=Ms.get(e);if(o!==void 0){if(s.manager.itemStart(e),o.then){o.then(f=>{t&&t(f),s.manager.itemEnd(e)}).catch(f=>{r&&r(f)});return}return setTimeout(function(){t&&t(o),s.manager.itemEnd(e)},0),o}const a={};a.credentials=this.crossOrigin==="anonymous"?"same-origin":"include",a.headers=this.requestHeader;const u=fetch(e,a).then(function(f){return f.blob()}).then(function(f){return createImageBitmap(f,Object.assign(s.options,{colorSpaceConversion:"none"}))}).then(function(f){return Ms.add(e,f),t&&t(f),s.manager.itemEnd(e),f}).catch(function(f){r&&r(f),Ms.remove(e),s.manager.itemError(e),s.manager.itemEnd(e)});Ms.add(e,u),s.manager.itemStart(e)}}let Sd;class x_{static getContext(){return Sd===void 0&&(Sd=new(window.AudioContext||window.webkitAudioContext)),Sd}static setContext(e){Sd=e}}class rD extends Ni{constructor(e){super(e)}load(e,t,i,r){const s=this,o=new Ls(this.manager);o.setResponseType("arraybuffer"),o.setPath(this.path),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(e,function(u){try{const f=u.slice(0);x_.getContext().decodeAudioData(f,function(d){t(d)}).catch(a)}catch(f){a(f)}},i,r);function a(u){r?r(u):console.error(u),s.manager.itemError(e)}}}const L3=new ft,I3=new ft,Vo=new ft;class sD{constructor(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new pn,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new pn,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,Vo.copy(e.projectionMatrix);const r=t.eyeSep/2,s=r*t.near/t.focus,o=t.near*Math.tan(ua*t.fov*.5)/t.zoom;let a,u;I3.elements[12]=-r,L3.elements[12]=r,a=-o*t.aspect+s,u=o*t.aspect+s,Vo.elements[0]=2*t.near/(u-a),Vo.elements[8]=(u+a)/(u-a),this.cameraL.projectionMatrix.copy(Vo),a=-o*t.aspect-s,u=o*t.aspect-s,Vo.elements[0]=2*t.near/(u-a),Vo.elements[8]=(u+a)/(u-a),this.cameraR.projectionMatrix.copy(Vo)}this.cameraL.matrixWorld.copy(e.matrixWorld).multiply(I3),this.cameraR.matrixWorld.copy(e.matrixWorld).multiply(L3)}}class S_{constructor(e=!0){this.autoStart=e,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=N3(),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=N3();e=(t-this.oldTime)/1e3,this.oldTime=t,this.elapsedTime+=e}return e}}function N3(){return(typeof performance>"u"?Date:performance).now()}const Go=new O,D3=new oi,oD=new O,Wo=new O;class aD extends Ot{constructor(){super(),this.type="AudioListener",this.context=x_.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null,this.timeDelta=0,this._clock=new S_}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);const t=this.context.listener,i=this.up;if(this.timeDelta=this._clock.getDelta(),this.matrixWorld.decompose(Go,D3,oD),Wo.set(0,0,-1).applyQuaternion(D3),t.positionX){const r=this.context.currentTime+this.timeDelta;t.positionX.linearRampToValueAtTime(Go.x,r),t.positionY.linearRampToValueAtTime(Go.y,r),t.positionZ.linearRampToValueAtTime(Go.z,r),t.forwardX.linearRampToValueAtTime(Wo.x,r),t.forwardY.linearRampToValueAtTime(Wo.y,r),t.forwardZ.linearRampToValueAtTime(Wo.z,r),t.upX.linearRampToValueAtTime(i.x,r),t.upY.linearRampToValueAtTime(i.y,r),t.upZ.linearRampToValueAtTime(i.z,r)}else t.setPosition(Go.x,Go.y,Go.z),t.setOrientation(Wo.x,Wo.y,Wo.z,i.x,i.y,i.z)}}class z4 extends Ot{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){console.warn("THREE.Audio: Audio is already playing.");return}if(this.hasPlaybackControl===!1){console.warn("THREE.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){console.warn("THREE.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(){if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}return this._progress=0,this.source!==null&&(this.source.stop(),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;e0){this.source.disconnect(this.filters[0]);for(let e=1,t=this.filters.length;e0&&this._mixBufferRegionAdditive(i,r,this._addIndex*t,1,t);for(let u=t,f=t+t;u!==f;++u)if(i[u]!==i[u+t]){a.setValue(i,r);break}}saveOriginalState(){const e=this.binding,t=this.buffer,i=this.valueSize,r=i*this._origIndex;e.getValue(t,r);for(let s=i,o=r;s!==o;++s)t[s]=t[r+s%i];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 i=e;i=.5)for(let o=0;o!==s;++o)e[t+o]=e[i+o]}_slerp(e,t,i,r){oi.slerpFlat(e,t,e,t,e,i,r)}_slerpAdditive(e,t,i,r,s){const o=this._workIndex*s;oi.multiplyQuaternionsFlat(e,o,e,t,e,i),oi.slerpFlat(e,t,e,t,e,o,r)}_lerp(e,t,i,r,s){const o=1-r;for(let a=0;a!==s;++a){const u=t+a;e[u]=e[u]*o+e[i+a]*r}}_lerpAdditive(e,t,i,r,s){for(let o=0;o!==s;++o){const a=t+o;e[a]=e[a]+e[i+o]*r}}}const M_="\\[\\]\\.:\\/",fD=new RegExp("["+M_+"]","g"),w_="[^"+M_+"]",hD="[^"+M_.replace("\\.","")+"]",dD=/((?:WC+[\/:])*)/.source.replace("WC",w_),pD=/(WCOD+)?/.source.replace("WCOD",hD),mD=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",w_),gD=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",w_),vD=new RegExp("^"+dD+pD+mD+gD+"$"),yD=["material","materials","bones","map"];class _D{constructor(e,t,i){const r=i||It.parseTrackName(t);this._targetGroup=e,this._bindings=e.subscribe_(t,r)}getValue(e,t){this.bind();const i=this._targetGroup.nCachedObjects_,r=this._bindings[i];r!==void 0&&r.getValue(e,t)}setValue(e,t){const i=this._bindings;for(let r=this._targetGroup.nCachedObjects_,s=i.length;r!==s;++r)i[r].setValue(e,t)}bind(){const e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,i=e.length;t!==i;++t)e[t].bind()}unbind(){const e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,i=e.length;t!==i;++t)e[t].unbind()}}class It{constructor(e,t,i){this.path=t,this.parsedPath=i||It.parseTrackName(t),this.node=It.findNode(e,this.parsedPath.nodeName),this.rootNode=e,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(e,t,i){return e&&e.isAnimationObjectGroup?new It.Composite(e,t,i):new It(e,t,i)}static sanitizeNodeName(e){return e.replace(/\s/g,"_").replace(fD,"")}static parseTrackName(e){const t=vD.exec(e);if(t===null)throw new Error("PropertyBinding: Cannot parse trackName: "+e);const i={nodeName:t[2],objectName:t[3],objectIndex:t[4],propertyName:t[5],propertyIndex:t[6]},r=i.nodeName&&i.nodeName.lastIndexOf(".");if(r!==void 0&&r!==-1){const s=i.nodeName.substring(r+1);yD.indexOf(s)!==-1&&(i.nodeName=i.nodeName.substring(0,r),i.objectName=s)}if(i.propertyName===null||i.propertyName.length===0)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+e);return i}static findNode(e,t){if(t===void 0||t===""||t==="."||t===-1||t===e.name||t===e.uuid)return e;if(e.skeleton){const i=e.skeleton.getBoneByName(t);if(i!==void 0)return i}if(e.children){const i=function(s){for(let o=0;o=s){const d=s++,p=e[d];t[p.uuid]=h,e[h]=p,t[f]=d,e[d]=u;for(let v=0,y=r;v!==y;++v){const w=i[v],S=w[d],g=w[h];w[h]=S,w[d]=g}}}this.nCachedObjects_=s}uncache(){const e=this._objects,t=this._indicesByUUID,i=this._bindings,r=i.length;let s=this.nCachedObjects_,o=e.length;for(let a=0,u=arguments.length;a!==u;++a){const f=arguments[a],h=f.uuid,d=t[h];if(d!==void 0)if(delete t[h],d0&&(t[v.uuid]=d),e[d]=v,e.pop();for(let y=0,w=r;y!==w;++y){const S=i[y];S[d]=S[p],S.pop()}}}this.nCachedObjects_=s}subscribe_(e,t){const i=this._bindingsIndicesByPath;let r=i[e];const s=this._bindings;if(r!==void 0)return s[r];const o=this._paths,a=this._parsedPaths,u=this._objects,f=u.length,h=this.nCachedObjects_,d=new Array(f);r=s.length,i[e]=r,o.push(e),a.push(t),s.push(d);for(let p=h,v=u.length;p!==v;++p){const y=u[p];d[p]=new It(y,e,t)}return d}unsubscribe_(e){const t=this._bindingsIndicesByPath,i=t[e];if(i!==void 0){const r=this._paths,s=this._parsedPaths,o=this._bindings,a=o.length-1,u=o[a],f=e[a];t[f]=i,o[i]=u,o.pop(),s[i]=s[a],s.pop(),r[i]=r[a],r.pop()}}}class F4{constructor(e,t,i=null,r=t.blendMode){this._mixer=e,this._clip=t,this._localRoot=i,this.blendMode=r;const s=t.tracks,o=s.length,a=new Array(o),u={endingStart:ia,endingEnd:ia};for(let f=0;f!==o;++f){const h=s[f].createInterpolant(null);a[f]=h,h.settings=u}this._interpolantSettings=u,this._interpolants=a,this._propertyBindings=new Array(o),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=yT,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}fadeIn(e){return this._scheduleFading(e,0,1)}fadeOut(e){return this._scheduleFading(e,1,0)}crossFadeFrom(e,t,i){if(e.fadeOut(t),this.fadeIn(t),i){const r=this._clip.duration,s=e._clip.duration,o=s/r,a=r/s;e.warp(1,o,t),this.warp(a,1,t)}return this}crossFadeTo(e,t,i){return e.crossFadeFrom(this,t,i)}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,i){const r=this._mixer,s=r.time,o=this.timeScale;let a=this._timeScaleInterpolant;a===null&&(a=r._lendControlInterpolant(),this._timeScaleInterpolant=a);const u=a.parameterPositions,f=a.sampleValues;return u[0]=s,u[1]=s+i,f[0]=e/o,f[1]=t/o,this}stopWarping(){const e=this._timeScaleInterpolant;return e!==null&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}getMixer(){return this._mixer}getClip(){return this._clip}getRoot(){return this._localRoot||this._mixer._root}_update(e,t,i,r){if(!this.enabled){this._updateWeight(e);return}const s=this._startTime;if(s!==null){const u=(e-s)*i;u<0||i===0?t=0:(this._startTime=null,t=i*u)}t*=this._updateTimeScale(e);const o=this._updateTime(t),a=this._updateWeight(e);if(a>0){const u=this._interpolants,f=this._propertyBindings;switch(this.blendMode){case Yy:for(let h=0,d=u.length;h!==d;++h)u[h].evaluate(o),f[h].accumulateAdditive(a);break;case em:default:for(let h=0,d=u.length;h!==d;++h)u[h].evaluate(o),f[h].accumulate(r,a)}}}_updateWeight(e){let t=0;if(this.enabled){t=this.weight;const i=this._weightInterpolant;if(i!==null){const r=i.evaluate(e)[0];t*=r,e>i.parameterPositions[1]&&(this.stopFading(),r===0&&(this.enabled=!1))}}return this._effectiveWeight=t,t}_updateTimeScale(e){let t=0;if(!this.paused){t=this.timeScale;const i=this._timeScaleInterpolant;if(i!==null){const r=i.evaluate(e)[0];t*=r,e>i.parameterPositions[1]&&(this.stopWarping(),t===0?this.paused=!0:this.timeScale=t)}}return this._effectiveTimeScale=t,t}_updateTime(e){const t=this._clip.duration,i=this.loop;let r=this.time+e,s=this._loopCount;const o=i===_T;if(e===0)return s===-1?r:o&&(s&1)===1?t-r:r;if(i===vT){s===-1&&(this._loopCount=0,this._setEndings(!0,!0,!1));e:{if(r>=t)r=t;else if(r<0)r=0;else{this.time=r;break e}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=r,this._mixer.dispatchEvent({type:"finished",action:this,direction:e<0?-1:1})}}else{if(s===-1&&(e>=0?(s=0,this._setEndings(!0,this.repetitions===0,o)):this._setEndings(this.repetitions===0,!0,o)),r>=t||r<0){const a=Math.floor(r/t);r-=t*a,s+=Math.abs(a);const u=this.repetitions-s;if(u<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,r=e>0?t:0,this.time=r,this._mixer.dispatchEvent({type:"finished",action:this,direction:e>0?1:-1});else{if(u===1){const f=e<0;this._setEndings(f,!f,o)}else this._setEndings(!1,!1,o);this._loopCount=s,this.time=r,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:a})}}else this.time=r;if(o&&(s&1)===1)return t-r}return r}_setEndings(e,t,i){const r=this._interpolantSettings;i?(r.endingStart=ra,r.endingEnd=ra):(e?r.endingStart=this.zeroSlopeAtStart?ra:ia:r.endingStart=Gu,t?r.endingEnd=this.zeroSlopeAtEnd?ra:ia:r.endingEnd=Gu)}_scheduleFading(e,t,i){const r=this._mixer,s=r.time;let o=this._weightInterpolant;o===null&&(o=r._lendControlInterpolant(),this._weightInterpolant=o);const a=o.parameterPositions,u=o.sampleValues;return a[0]=s,u[0]=t,a[1]=s+e,u[1]=i,this}}const SD=new Float32Array(1);class MD extends es{constructor(e){super(),this._root=e,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}_bindAction(e,t){const i=e._localRoot||this._root,r=e._clip.tracks,s=r.length,o=e._propertyBindings,a=e._interpolants,u=i.uuid,f=this._bindingsByRootAndName;let h=f[u];h===void 0&&(h={},f[u]=h);for(let d=0;d!==s;++d){const p=r[d],v=p.name;let y=h[v];if(y!==void 0)++y.referenceCount,o[d]=y;else{if(y=o[d],y!==void 0){y._cacheIndex===null&&(++y.referenceCount,this._addInactiveBinding(y,u,v));continue}const w=t&&t._propertyBindings[d].binding.parsedPath;y=new O4(It.create(i,v,w),p.ValueTypeName,p.getValueSize()),++y.referenceCount,this._addInactiveBinding(y,u,v),o[d]=y}a[d].resultBuffer=y.buffer}}_activateAction(e){if(!this._isActiveAction(e)){if(e._cacheIndex===null){const i=(e._localRoot||this._root).uuid,r=e._clip.uuid,s=this._actionsByClip[r];this._bindAction(e,s&&s.knownActions[0]),this._addInactiveAction(e,r,i)}const t=e._propertyBindings;for(let i=0,r=t.length;i!==r;++i){const s=t[i];s.useCount++===0&&(this._lendBinding(s),s.saveOriginalState())}this._lendAction(e)}}_deactivateAction(e){if(this._isActiveAction(e)){const t=e._propertyBindings;for(let i=0,r=t.length;i!==r;++i){const s=t[i];--s.useCount===0&&(s.restoreOriginalState(),this._takeBackBinding(s))}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=0;--i)e[i].stop();return this}update(e){e*=this.timeScale;const t=this._actions,i=this._nActiveActions,r=this.time+=e,s=Math.sign(e),o=this._accuIndex^=1;for(let f=0;f!==i;++f)t[f]._update(r,e,s,o);const a=this._bindings,u=this._nActiveBindings;for(let f=0;f!==u;++f)a[f].apply(o);return this}setTime(e){this.time=0;for(let t=0;tthis.max.x||e.ythis.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.xthis.max.x||e.max.ythis.max.y)}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,O3).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)}}const F3=new O,Md=new O;class RD{constructor(e=new O,t=new O){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){F3.subVectors(e,this.start),Md.subVectors(this.end,this.start);const i=Md.dot(Md);let s=Md.dot(F3)/i;return t&&(s=dn(s,0,1)),s}closestPointToPoint(e,t,i){const r=this.closestPointToPointParameter(e,t);return this.delta(i).multiplyScalar(r).add(this.start)}applyMatrix4(e){return this.start.applyMatrix4(e),this.end.applyMatrix4(e),this}equals(e){return e.start.equals(this.start)&&e.end.equals(this.end)}clone(){return new this.constructor().copy(this)}}const k3=new O;class PD extends Ot{constructor(e,t){super(),this.light=e,this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=t,this.type="SpotLightHelper";const i=new St,r=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1];for(let o=0,a=1,u=32;o1)for(let d=0;d.99999)this.quaternion.set(0,0,0,1);else if(e.y<-.99999)this.quaternion.set(1,0,0,0);else{W3.set(e.z,0,-e.x).normalize();const t=Math.acos(e.y);this.quaternion.setFromAxisAngle(W3,t)}}setLength(e,t=e*.2,i=t*.2){this.line.scale.set(1,Math.max(1e-4,e-t),1),this.line.updateMatrix(),this.cone.scale.set(i,t,i),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()}}class GD extends ts{constructor(e=1){const t=[0,0,0,e,0,0,0,0,0,0,e,0,0,0,0,0,0,e],i=[1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],r=new St;r.setAttribute("position",new qe(t,3)),r.setAttribute("color",new qe(i,3));const s=new Si({vertexColors:!0,toneMapped:!1});super(r,s),this.type="AxesHelper"}setColors(e,t,i){const r=new Be,s=this.geometry.attributes.color.array;return r.set(e),r.toArray(s,0),r.toArray(s,3),r.set(t),r.toArray(s,6),r.toArray(s,9),r.set(i),r.toArray(s,12),r.toArray(s,15),this.geometry.attributes.color.needsUpdate=!0,this}dispose(){this.geometry.dispose(),this.material.dispose()}}class WD{constructor(){this.type="ShapePath",this.color=new Be,this.subPaths=[],this.currentPath=null}moveTo(e,t){return this.currentPath=new Zu,this.subPaths.push(this.currentPath),this.currentPath.moveTo(e,t),this}lineTo(e,t){return this.currentPath.lineTo(e,t),this}quadraticCurveTo(e,t,i,r){return this.currentPath.quadraticCurveTo(e,t,i,r),this}bezierCurveTo(e,t,i,r,s,o){return this.currentPath.bezierCurveTo(e,t,i,r,s,o),this}splineThru(e){return this.currentPath.splineThru(e),this}toShapes(e){function t(g){const x=[];for(let M=0,T=g.length;MNumber.EPSILON){if(R<0&&(L=x[C],b=-b,D=x[P],R=-R),g.yD.y)continue;if(g.y===L.y){if(g.x===L.x)return!0}else{const k=R*(g.x-L.x)-b*(g.y-L.y);if(k===0)return!0;if(k<0)continue;T=!T}}else{if(g.y!==L.y)continue;if(D.x<=g.x&&g.x<=L.x||L.x<=g.x&&g.x<=D.x)return!0}}return T}const r=Jr.isClockWise,s=this.subPaths;if(s.length===0)return[];let o,a,u;const f=[];if(s.length===1)return a=s[0],u=new da,u.curves=a.curves,f.push(u),f;let h=!r(s[0].getPoints());h=e?!h:h;const d=[],p=[];let v=[],y=0,w;p[y]=void 0,v[y]=[];for(let g=0,x=s.length;g1){let g=!1,x=0;for(let M=0,T=p.length;M0&&g===!1&&(v=d)}let S;for(let g=0,x=p.length;gh||r.y>h)&&(r.x>h&&(s.x=Math.floor(h/B.x),r.x=s.x*B.x,N.mapSize.x=s.x),r.y>h&&(s.y=Math.floor(h/B.y),r.y=s.y*B.y,N.mapSize.y=s.y)),N.map===null||oe===!0||V===!0){const Y=this.type!==Er?{minFilter:_n,magFilter:_n}:{};N.map!==null&&N.map.dispose(),N.map=new gr(r.x,r.y,Y),N.map.texture.name=ae.name+".shadowMap",N.camera.updateProjectionMatrix()}n.setRenderTarget(N.map),n.clear();const H=N.getViewportCount();for(let Y=0;Y0||L.map&&L.alphaTest>0){const q=R.uuid,oe=L.uuid;let V=f[q];V===void 0&&(V={},f[q]=V);let Q=V[oe];Q===void 0&&(Q=R.clone(),V[oe]=Q,L.addEventListener("dispose",P)),R=Q}if(R.visible=L.visible,R.wireframe=L.wireframe,b===Er?R.side=L.shadowSide!==null?L.shadowSide:L.side:R.side=L.shadowSide!==null?L.shadowSide:d[L.side],R.alphaMap=L.alphaMap,R.alphaTest=L.alphaTest,R.map=L.map,R.clipShadows=L.clipShadows,R.clippingPlanes=L.clippingPlanes,R.clipIntersection=L.clipIntersection,R.displacementMap=L.displacementMap,R.displacementScale=L.displacementScale,R.displacementBias=L.displacementBias,R.wireframeLinewidth=L.wireframeLinewidth,R.linewidth=L.linewidth,D.isPointLight===!0&&R.isMeshDistanceMaterial===!0){const q=n.properties.get(R);q.light=D}return R}function T(C,L,D,b,R){if(C.visible===!1)return;if(C.layers.test(L.layers)&&(C.isMesh||C.isLine||C.isPoints)&&(C.castShadow||C.receiveShadow&&R===Er)&&(!C.frustumCulled||i.intersectsObject(C))){C.modelViewMatrix.multiplyMatrices(D.matrixWorldInverse,C.matrixWorld);const oe=e.update(C),V=C.material;if(Array.isArray(V)){const Q=oe.groups;for(let te=0,ae=Q.length;te=1):H.indexOf("OpenGL ES")!==-1&&(B=parseFloat(/^OpenGL ES (\d)/.exec(H)[1]),N=B>=2);let Y=null,J={};const Z=n.getParameter(n.SCISSOR_BOX),ie=n.getParameter(n.VIEWPORT),pe=new kt().fromArray(Z),Ee=new kt().fromArray(ie);function Te(W,Re,Ie,it){const Ye=new Uint8Array(4),At=n.createTexture();n.bindTexture(W,At),n.texParameteri(W,n.TEXTURE_MIN_FILTER,n.NEAREST),n.texParameteri(W,n.TEXTURE_MAG_FILTER,n.NEAREST);for(let Rt=0;Rt"u"?!1:/OculusBrowser/g.test(navigator.userAgent),h=new WeakMap;let d;const p=new WeakMap;let v=!1;try{v=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")!==null}catch{}function y(U,I){return v?new OffscreenCanvas(U,I):qu("canvas")}function w(U,I,ee,xe){let _e=1;if((U.width>xe||U.height>xe)&&(_e=xe/Math.max(U.width,U.height)),_e<1||I===!0)if(typeof HTMLImageElement<"u"&&U instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&U instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&U instanceof ImageBitmap){const ye=I?Rp:Math.floor,je=ye(_e*U.width),Le=ye(_e*U.height);d===void 0&&(d=y(je,Le));const Fe=ee?y(je,Le):d;return Fe.width=je,Fe.height=Le,Fe.getContext("2d").drawImage(U,0,0,je,Le),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+U.width+"x"+U.height+") to ("+je+"x"+Le+")."),Fe}else return"data"in U&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+U.width+"x"+U.height+")."),U;return U}function S(U){return Cv(U.width)&&Cv(U.height)}function g(U){return a?!1:U.wrapS!==si||U.wrapT!==si||U.minFilter!==_n&&U.minFilter!==sn}function x(U,I){return U.generateMipmaps&&I&&U.minFilter!==_n&&U.minFilter!==sn}function M(U){n.generateMipmap(U)}function T(U,I,ee,xe,_e=!1){if(a===!1)return I;if(U!==null){if(n[U]!==void 0)return n[U];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+U+"'")}let ye=I;if(I===n.RED&&(ee===n.FLOAT&&(ye=n.R32F),ee===n.HALF_FLOAT&&(ye=n.R16F),ee===n.UNSIGNED_BYTE&&(ye=n.R8)),I===n.RED_INTEGER&&(ee===n.UNSIGNED_BYTE&&(ye=n.R8UI),ee===n.UNSIGNED_SHORT&&(ye=n.R16UI),ee===n.UNSIGNED_INT&&(ye=n.R32UI),ee===n.BYTE&&(ye=n.R8I),ee===n.SHORT&&(ye=n.R16I),ee===n.INT&&(ye=n.R32I)),I===n.RG&&(ee===n.FLOAT&&(ye=n.RG32F),ee===n.HALF_FLOAT&&(ye=n.RG16F),ee===n.UNSIGNED_BYTE&&(ye=n.RG8)),I===n.RGBA){const je=_e?Wu:Ft.getTransfer(xe);ee===n.FLOAT&&(ye=n.RGBA32F),ee===n.HALF_FLOAT&&(ye=n.RGBA16F),ee===n.UNSIGNED_BYTE&&(ye=je===jt?n.SRGB8_ALPHA8:n.RGBA8),ee===n.UNSIGNED_SHORT_4_4_4_4&&(ye=n.RGBA4),ee===n.UNSIGNED_SHORT_5_5_5_1&&(ye=n.RGB5_A1)}return(ye===n.R16F||ye===n.R32F||ye===n.RG16F||ye===n.RG32F||ye===n.RGBA16F||ye===n.RGBA32F)&&e.get("EXT_color_buffer_float"),ye}function P(U,I,ee){return x(U,ee)===!0||U.isFramebufferTexture&&U.minFilter!==_n&&U.minFilter!==sn?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 C(U){return U===_n||U===Cp||U===du?n.NEAREST:n.LINEAR}function L(U){const I=U.target;I.removeEventListener("dispose",L),b(I),I.isVideoTexture&&h.delete(I)}function D(U){const I=U.target;I.removeEventListener("dispose",D),k(I)}function b(U){const I=i.get(U);if(I.__webglInit===void 0)return;const ee=U.source,xe=p.get(ee);if(xe){const _e=xe[I.__cacheKey];_e.usedTimes--,_e.usedTimes===0&&R(U),Object.keys(xe).length===0&&p.delete(ee)}i.remove(U)}function R(U){const I=i.get(U);n.deleteTexture(I.__webglTexture);const ee=U.source,xe=p.get(ee);delete xe[I.__cacheKey],o.memory.textures--}function k(U){const I=U.texture,ee=i.get(U),xe=i.get(I);if(xe.__webglTexture!==void 0&&(n.deleteTexture(xe.__webglTexture),o.memory.textures--),U.depthTexture&&U.depthTexture.dispose(),U.isWebGLCubeRenderTarget)for(let _e=0;_e<6;_e++){if(Array.isArray(ee.__webglFramebuffer[_e]))for(let ye=0;ye=r.maxTextures&&console.warn("THREE.WebGLTextures: Trying to use "+U+" texture units while this GPU supports only "+r.maxTextures),q+=1,U}function Q(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 te(U,I){const ee=i.get(U);if(U.isVideoTexture&&Ze(U),U.isRenderTargetTexture===!1&&U.version>0&&ee.__version!==U.version){const xe=U.image;if(xe===null)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else if(xe.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{pe(ee,U,I);return}}t.bindTexture(n.TEXTURE_2D,ee.__webglTexture,n.TEXTURE0+I)}function ae(U,I){const ee=i.get(U);if(U.version>0&&ee.__version!==U.version){pe(ee,U,I);return}t.bindTexture(n.TEXTURE_2D_ARRAY,ee.__webglTexture,n.TEXTURE0+I)}function N(U,I){const ee=i.get(U);if(U.version>0&&ee.__version!==U.version){pe(ee,U,I);return}t.bindTexture(n.TEXTURE_3D,ee.__webglTexture,n.TEXTURE0+I)}function B(U,I){const ee=i.get(U);if(U.version>0&&ee.__version!==U.version){Ee(ee,U,I);return}t.bindTexture(n.TEXTURE_CUBE_MAP,ee.__webglTexture,n.TEXTURE0+I)}const H={[ku]:n.REPEAT,[si]:n.CLAMP_TO_EDGE,[Bu]:n.MIRRORED_REPEAT},Y={[_n]:n.NEAREST,[Cp]:n.NEAREST_MIPMAP_NEAREST,[du]:n.NEAREST_MIPMAP_LINEAR,[sn]:n.LINEAR,[ky]:n.LINEAR_MIPMAP_NEAREST,[_o]:n.LINEAR_MIPMAP_LINEAR},J={[wT]:n.NEVER,[RT]:n.ALWAYS,[ET]:n.LESS,[Zy]:n.LEQUAL,[TT]:n.EQUAL,[bT]:n.GEQUAL,[AT]:n.GREATER,[CT]:n.NOTEQUAL};function Z(U,I,ee){if(ee?(n.texParameteri(U,n.TEXTURE_WRAP_S,H[I.wrapS]),n.texParameteri(U,n.TEXTURE_WRAP_T,H[I.wrapT]),(U===n.TEXTURE_3D||U===n.TEXTURE_2D_ARRAY)&&n.texParameteri(U,n.TEXTURE_WRAP_R,H[I.wrapR]),n.texParameteri(U,n.TEXTURE_MAG_FILTER,Y[I.magFilter]),n.texParameteri(U,n.TEXTURE_MIN_FILTER,Y[I.minFilter])):(n.texParameteri(U,n.TEXTURE_WRAP_S,n.CLAMP_TO_EDGE),n.texParameteri(U,n.TEXTURE_WRAP_T,n.CLAMP_TO_EDGE),(U===n.TEXTURE_3D||U===n.TEXTURE_2D_ARRAY)&&n.texParameteri(U,n.TEXTURE_WRAP_R,n.CLAMP_TO_EDGE),(I.wrapS!==si||I.wrapT!==si)&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),n.texParameteri(U,n.TEXTURE_MAG_FILTER,C(I.magFilter)),n.texParameteri(U,n.TEXTURE_MIN_FILTER,C(I.minFilter)),I.minFilter!==_n&&I.minFilter!==sn&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),I.compareFunction&&(n.texParameteri(U,n.TEXTURE_COMPARE_MODE,n.COMPARE_REF_TO_TEXTURE),n.texParameteri(U,n.TEXTURE_COMPARE_FUNC,J[I.compareFunction])),e.has("EXT_texture_filter_anisotropic")===!0){const xe=e.get("EXT_texture_filter_anisotropic");if(I.magFilter===_n||I.minFilter!==du&&I.minFilter!==_o||I.type===hr&&e.has("OES_texture_float_linear")===!1||a===!1&&I.type===xa&&e.has("OES_texture_half_float_linear")===!1)return;(I.anisotropy>1||i.get(I).__currentAnisotropy)&&(n.texParameterf(U,xe.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(I.anisotropy,r.getMaxAnisotropy())),i.get(I).__currentAnisotropy=I.anisotropy)}}function ie(U,I){let ee=!1;U.__webglInit===void 0&&(U.__webglInit=!0,I.addEventListener("dispose",L));const xe=I.source;let _e=p.get(xe);_e===void 0&&(_e={},p.set(xe,_e));const ye=Q(I);if(ye!==U.__cacheKey){_e[ye]===void 0&&(_e[ye]={texture:n.createTexture(),usedTimes:0},o.memory.textures++,ee=!0),_e[ye].usedTimes++;const je=_e[U.__cacheKey];je!==void 0&&(_e[U.__cacheKey].usedTimes--,je.usedTimes===0&&R(I)),U.__cacheKey=ye,U.__webglTexture=_e[ye].texture}return ee}function pe(U,I,ee){let xe=n.TEXTURE_2D;(I.isDataArrayTexture||I.isCompressedArrayTexture)&&(xe=n.TEXTURE_2D_ARRAY),I.isData3DTexture&&(xe=n.TEXTURE_3D);const _e=ie(U,I),ye=I.source;t.bindTexture(xe,U.__webglTexture,n.TEXTURE0+ee);const je=i.get(ye);if(ye.version!==je.__version||_e===!0){t.activeTexture(n.TEXTURE0+ee);const Le=Ft.getPrimaries(Ft.workingColorSpace),Fe=I.colorSpace===Gi?null:Ft.getPrimaries(I.colorSpace),tt=I.colorSpace===Gi||Le===Fe?n.NONE:n.BROWSER_DEFAULT_WEBGL;n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,I.flipY),n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,I.premultiplyAlpha),n.pixelStorei(n.UNPACK_ALIGNMENT,I.unpackAlignment),n.pixelStorei(n.UNPACK_COLORSPACE_CONVERSION_WEBGL,tt);const dt=g(I)&&S(I.image)===!1;let Se=w(I.image,dt,!1,r.maxTextureSize);Se=Ne(I,Se);const Ct=S(Se)||a,yt=s.convert(I.format,I.colorSpace);let ct=s.convert(I.type),et=T(I.internalFormat,yt,ct,I.colorSpace,I.isVideoTexture);Z(xe,I,Ct);let He;const X=I.mipmaps,ge=a&&I.isVideoTexture!==!0&&et!==jy,ze=je.__version===void 0||_e===!0,Ue=P(I,Se,Ct);if(I.isDepthTexture)et=n.DEPTH_COMPONENT,a?I.type===hr?et=n.DEPTH_COMPONENT32F:I.type===xs?et=n.DEPTH_COMPONENT24:I.type===ho?et=n.DEPTH24_STENCIL8:et=n.DEPTH_COMPONENT16:I.type===hr&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),I.format===po&&et===n.DEPTH_COMPONENT&&I.type!==$p&&I.type!==xs&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),I.type=xs,ct=s.convert(I.type)),I.format===Sa&&et===n.DEPTH_COMPONENT&&(et=n.DEPTH_STENCIL,I.type!==ho&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),I.type=ho,ct=s.convert(I.type))),ze&&(ge?t.texStorage2D(n.TEXTURE_2D,1,et,Se.width,Se.height):t.texImage2D(n.TEXTURE_2D,0,et,Se.width,Se.height,0,yt,ct,null));else if(I.isDataTexture)if(X.length>0&&Ct){ge&&ze&&t.texStorage2D(n.TEXTURE_2D,Ue,et,X[0].width,X[0].height);for(let Me=0,W=X.length;Me>=1,W>>=1}}else if(X.length>0&&Ct){ge&&ze&&t.texStorage2D(n.TEXTURE_2D,Ue,et,X[0].width,X[0].height);for(let Me=0,W=X.length;Me0&&ze++,t.texStorage2D(n.TEXTURE_CUBE_MAP,ze,He,Se[0].width,Se[0].height));for(let Me=0;Me<6;Me++)if(dt){X?t.texSubImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+Me,0,0,0,Se[Me].width,Se[Me].height,ct,et,Se[Me].data):t.texImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+Me,0,He,Se[Me].width,Se[Me].height,0,ct,et,Se[Me].data);for(let W=0;W>ye),Se=Math.max(1,I.height>>ye);_e===n.TEXTURE_3D||_e===n.TEXTURE_2D_ARRAY?t.texImage3D(_e,ye,Fe,dt,Se,I.depth,0,je,Le,null):t.texImage2D(_e,ye,Fe,dt,Se,0,je,Le,null)}t.bindFramebuffer(n.FRAMEBUFFER,U),he(I)?u.framebufferTexture2DMultisampleEXT(n.FRAMEBUFFER,xe,_e,i.get(ee).__webglTexture,0,Ce(I)):(_e===n.TEXTURE_2D||_e>=n.TEXTURE_CUBE_MAP_POSITIVE_X&&_e<=n.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&n.framebufferTexture2D(n.FRAMEBUFFER,xe,_e,i.get(ee).__webglTexture,ye),t.bindFramebuffer(n.FRAMEBUFFER,null)}function nt(U,I,ee){if(n.bindRenderbuffer(n.RENDERBUFFER,U),I.depthBuffer&&!I.stencilBuffer){let xe=a===!0?n.DEPTH_COMPONENT24:n.DEPTH_COMPONENT16;if(ee||he(I)){const _e=I.depthTexture;_e&&_e.isDepthTexture&&(_e.type===hr?xe=n.DEPTH_COMPONENT32F:_e.type===xs&&(xe=n.DEPTH_COMPONENT24));const ye=Ce(I);he(I)?u.renderbufferStorageMultisampleEXT(n.RENDERBUFFER,ye,xe,I.width,I.height):n.renderbufferStorageMultisample(n.RENDERBUFFER,ye,xe,I.width,I.height)}else n.renderbufferStorage(n.RENDERBUFFER,xe,I.width,I.height);n.framebufferRenderbuffer(n.FRAMEBUFFER,n.DEPTH_ATTACHMENT,n.RENDERBUFFER,U)}else if(I.depthBuffer&&I.stencilBuffer){const xe=Ce(I);ee&&he(I)===!1?n.renderbufferStorageMultisample(n.RENDERBUFFER,xe,n.DEPTH24_STENCIL8,I.width,I.height):he(I)?u.renderbufferStorageMultisampleEXT(n.RENDERBUFFER,xe,n.DEPTH24_STENCIL8,I.width,I.height):n.renderbufferStorage(n.RENDERBUFFER,n.DEPTH_STENCIL,I.width,I.height),n.framebufferRenderbuffer(n.FRAMEBUFFER,n.DEPTH_STENCIL_ATTACHMENT,n.RENDERBUFFER,U)}else{const xe=I.isWebGLMultipleRenderTargets===!0?I.texture:[I.texture];for(let _e=0;_e0){ee.__webglFramebuffer[Le]=[];for(let Fe=0;Fe0){ee.__webglFramebuffer=[];for(let Le=0;Le0&&he(U)===!1){const Le=ye?I:[I];ee.__webglMultisampledFramebuffer=n.createFramebuffer(),ee.__webglColorRenderbuffer=[],t.bindFramebuffer(n.FRAMEBUFFER,ee.__webglMultisampledFramebuffer);for(let Fe=0;Fe0)for(let Fe=0;Fe0)for(let Fe=0;Fe0&&he(U)===!1){const I=U.isWebGLMultipleRenderTargets?U.texture:[U.texture],ee=U.width,xe=U.height;let _e=n.COLOR_BUFFER_BIT;const ye=[],je=U.stencilBuffer?n.DEPTH_STENCIL_ATTACHMENT:n.DEPTH_ATTACHMENT,Le=i.get(U),Fe=U.isWebGLMultipleRenderTargets===!0;if(Fe)for(let tt=0;tt0&&e.has("WEBGL_multisampled_render_to_texture")===!0&&I.__useRenderToTexture!==!1}function Ze(U){const I=o.render.frame;h.get(U)!==I&&(h.set(U,I),U.update())}function Ne(U,I){const ee=U.colorSpace,xe=U.format,_e=U.type;return U.isCompressedTexture===!0||U.isVideoTexture===!0||U.format===bp||ee!==Qr&&ee!==Gi&&(Ft.getTransfer(ee)===jt?a===!1?e.has("EXT_sRGB")===!0&&xe===pi?(U.format=bp,U.minFilter=sn,U.generateMipmaps=!1):I=Jy.sRGBToLinear(I):(xe!==pi||_e!==Kr)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",ee)),I}this.allocateTextureUnit=V,this.resetTextureUnits=oe,this.setTexture2D=te,this.setTexture2DArray=ae,this.setTexture3D=N,this.setTextureCube=B,this.rebindTextures=Ke,this.setupRenderTarget=G,this.updateRenderTargetMipmap=we,this.updateMultisampleRenderTarget=me,this.setupDepthRenderbuffer=Xe,this.setupFrameBufferTexture=Te,this.useMultisampledRTT=he}function WT(n,e,t){const i=t.isWebGL2;function r(s,o=Gi){let a;const u=Ft.getTransfer(o);if(s===Kr)return n.UNSIGNED_BYTE;if(s===Hy)return n.UNSIGNED_SHORT_4_4_4_4;if(s===Vy)return n.UNSIGNED_SHORT_5_5_5_1;if(s===cT)return n.BYTE;if(s===uT)return n.SHORT;if(s===$p)return n.UNSIGNED_SHORT;if(s===By)return n.INT;if(s===xs)return n.UNSIGNED_INT;if(s===hr)return n.FLOAT;if(s===xa)return i?n.HALF_FLOAT:(a=e.get("OES_texture_half_float"),a!==null?a.HALF_FLOAT_OES:null);if(s===fT)return n.ALPHA;if(s===pi)return n.RGBA;if(s===hT)return n.LUMINANCE;if(s===dT)return n.LUMINANCE_ALPHA;if(s===po)return n.DEPTH_COMPONENT;if(s===Sa)return n.DEPTH_STENCIL;if(s===bp)return a=e.get("EXT_sRGB"),a!==null?a.SRGB_ALPHA_EXT:null;if(s===pT)return n.RED;if(s===Gy)return n.RED_INTEGER;if(s===mT)return n.RG;if(s===Wy)return n.RG_INTEGER;if(s===Xy)return n.RGBA_INTEGER;if(s===Xd||s===jd||s===Yd||s===qd)if(u===jt)if(a=e.get("WEBGL_compressed_texture_s3tc_srgb"),a!==null){if(s===Xd)return a.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(s===jd)return a.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(s===Yd)return a.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(s===qd)return a.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(a=e.get("WEBGL_compressed_texture_s3tc"),a!==null){if(s===Xd)return a.COMPRESSED_RGB_S3TC_DXT1_EXT;if(s===jd)return a.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(s===Yd)return a.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(s===qd)return a.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(s===ev||s===tv||s===nv||s===iv)if(a=e.get("WEBGL_compressed_texture_pvrtc"),a!==null){if(s===ev)return a.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(s===tv)return a.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(s===nv)return a.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(s===iv)return a.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(s===jy)return a=e.get("WEBGL_compressed_texture_etc1"),a!==null?a.COMPRESSED_RGB_ETC1_WEBGL:null;if(s===rv||s===sv)if(a=e.get("WEBGL_compressed_texture_etc"),a!==null){if(s===rv)return u===jt?a.COMPRESSED_SRGB8_ETC2:a.COMPRESSED_RGB8_ETC2;if(s===sv)return u===jt?a.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:a.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(s===ov||s===av||s===lv||s===cv||s===uv||s===fv||s===hv||s===dv||s===pv||s===mv||s===gv||s===vv||s===yv||s===_v)if(a=e.get("WEBGL_compressed_texture_astc"),a!==null){if(s===ov)return u===jt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:a.COMPRESSED_RGBA_ASTC_4x4_KHR;if(s===av)return u===jt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:a.COMPRESSED_RGBA_ASTC_5x4_KHR;if(s===lv)return u===jt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:a.COMPRESSED_RGBA_ASTC_5x5_KHR;if(s===cv)return u===jt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:a.COMPRESSED_RGBA_ASTC_6x5_KHR;if(s===uv)return u===jt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:a.COMPRESSED_RGBA_ASTC_6x6_KHR;if(s===fv)return u===jt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:a.COMPRESSED_RGBA_ASTC_8x5_KHR;if(s===hv)return u===jt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:a.COMPRESSED_RGBA_ASTC_8x6_KHR;if(s===dv)return u===jt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:a.COMPRESSED_RGBA_ASTC_8x8_KHR;if(s===pv)return u===jt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:a.COMPRESSED_RGBA_ASTC_10x5_KHR;if(s===mv)return u===jt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:a.COMPRESSED_RGBA_ASTC_10x6_KHR;if(s===gv)return u===jt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:a.COMPRESSED_RGBA_ASTC_10x8_KHR;if(s===vv)return u===jt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:a.COMPRESSED_RGBA_ASTC_10x10_KHR;if(s===yv)return u===jt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:a.COMPRESSED_RGBA_ASTC_12x10_KHR;if(s===_v)return u===jt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:a.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(s===Zd||s===xv||s===Sv)if(a=e.get("EXT_texture_compression_bptc"),a!==null){if(s===Zd)return u===jt?a.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:a.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(s===xv)return a.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(s===Sv)return a.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}else return null;if(s===gT||s===Mv||s===wv||s===Ev)if(a=e.get("EXT_texture_compression_rgtc"),a!==null){if(s===Zd)return a.COMPRESSED_RED_RGTC1_EXT;if(s===Mv)return a.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(s===wv)return a.COMPRESSED_RED_GREEN_RGTC2_EXT;if(s===Ev)return a.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return s===ho?i?n.UNSIGNED_INT_24_8:(a=e.get("WEBGL_depth_texture"),a!==null?a.UNSIGNED_INT_24_8_WEBGL:null):n[s]!==void 0?n[s]:null}return{convert:r}}class XT extends pn{constructor(e=[]){super(),this.isArrayCamera=!0,this.cameras=e}}class Dl extends zt{constructor(){super(),this.isGroup=!0,this.type="Group"}}const Q8={type:"move"};class bg{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new Dl,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 Dl,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new z,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new z),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new Dl,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new z,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new z),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 i of e.hand.values())this._getHandJoint(t,i)}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,i){let r=null,s=null,o=null;const a=this._targetRay,u=this._grip,f=this._hand;if(e&&t.session.visibilityState!=="visible-blurred"){if(f&&e.hand){o=!0;for(const w of e.hand.values()){const S=t.getJointPose(w,i),g=this._getHandJoint(f,w);S!==null&&(g.matrix.fromArray(S.transform.matrix),g.matrix.decompose(g.position,g.rotation,g.scale),g.matrixWorldNeedsUpdate=!0,g.jointRadius=S.radius),g.visible=S!==null}const h=f.joints["index-finger-tip"],d=f.joints["thumb-tip"],p=h.position.distanceTo(d.position),v=.02,y=.005;f.inputState.pinching&&p>v+y?(f.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!f.inputState.pinching&&p<=v-y&&(f.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else u!==null&&e.gripSpace&&(s=t.getPose(e.gripSpace,i),s!==null&&(u.matrix.fromArray(s.transform.matrix),u.matrix.decompose(u.position,u.rotation,u.scale),u.matrixWorldNeedsUpdate=!0,s.linearVelocity?(u.hasLinearVelocity=!0,u.linearVelocity.copy(s.linearVelocity)):u.hasLinearVelocity=!1,s.angularVelocity?(u.hasAngularVelocity=!0,u.angularVelocity.copy(s.angularVelocity)):u.hasAngularVelocity=!1));a!==null&&(r=t.getPose(e.targetRaySpace,i),r===null&&s!==null&&(r=s),r!==null&&(a.matrix.fromArray(r.transform.matrix),a.matrix.decompose(a.position,a.rotation,a.scale),a.matrixWorldNeedsUpdate=!0,r.linearVelocity?(a.hasLinearVelocity=!0,a.linearVelocity.copy(r.linearVelocity)):a.hasLinearVelocity=!1,r.angularVelocity?(a.hasAngularVelocity=!0,a.angularVelocity.copy(r.angularVelocity)):a.hasAngularVelocity=!1,this.dispatchEvent(Q8)))}return a!==null&&(a.visible=r!==null),u!==null&&(u.visible=s!==null),f!==null&&(f.visible=o!==null),this}_getHandJoint(e,t){if(e.joints[t.jointName]===void 0){const i=new Dl;i.matrixAutoUpdate=!1,i.visible=!1,e.joints[t.jointName]=i,e.add(i)}return e.joints[t.jointName]}}class $8 extends es{constructor(e,t){super();const i=this;let r=null,s=1,o=null,a="local-floor",u=1,f=null,h=null,d=null,p=null,v=null,y=null;const w=t.getContextAttributes();let S=null,g=null;const x=[],M=[],T=new de;let P=null;const C=new pn;C.layers.enable(1),C.viewport=new kt;const L=new pn;L.layers.enable(2),L.viewport=new kt;const D=[C,L],b=new XT;b.layers.enable(1),b.layers.enable(2);let R=null,k=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(Z){let ie=x[Z];return ie===void 0&&(ie=new bg,x[Z]=ie),ie.getTargetRaySpace()},this.getControllerGrip=function(Z){let ie=x[Z];return ie===void 0&&(ie=new bg,x[Z]=ie),ie.getGripSpace()},this.getHand=function(Z){let ie=x[Z];return ie===void 0&&(ie=new bg,x[Z]=ie),ie.getHandSpace()};function q(Z){const ie=M.indexOf(Z.inputSource);if(ie===-1)return;const pe=x[ie];pe!==void 0&&(pe.update(Z.inputSource,Z.frame,f||o),pe.dispatchEvent({type:Z.type,data:Z.inputSource}))}function oe(){r.removeEventListener("select",q),r.removeEventListener("selectstart",q),r.removeEventListener("selectend",q),r.removeEventListener("squeeze",q),r.removeEventListener("squeezestart",q),r.removeEventListener("squeezeend",q),r.removeEventListener("end",oe),r.removeEventListener("inputsourceschange",V);for(let Z=0;Z=0&&(M[Ee]=null,x[Ee].disconnect(pe))}for(let ie=0;ie=M.length){M.push(pe),Ee=nt;break}else if(M[nt]===null){M[nt]=pe,Ee=nt;break}if(Ee===-1)break}const Te=x[Ee];Te&&Te.connect(pe)}}const Q=new z,te=new z;function ae(Z,ie,pe){Q.setFromMatrixPosition(ie.matrixWorld),te.setFromMatrixPosition(pe.matrixWorld);const Ee=Q.distanceTo(te),Te=ie.projectionMatrix.elements,nt=pe.projectionMatrix.elements,lt=Te[14]/(Te[10]-1),Xe=Te[14]/(Te[10]+1),Ke=(Te[9]+1)/Te[5],G=(Te[9]-1)/Te[5],we=(Te[8]-1)/Te[0],me=(nt[8]+1)/nt[0],Ce=lt*we,he=lt*me,Ze=Ee/(-we+me),Ne=Ze*-we;ie.matrixWorld.decompose(Z.position,Z.quaternion,Z.scale),Z.translateX(Ne),Z.translateZ(Ze),Z.matrixWorld.compose(Z.position,Z.quaternion,Z.scale),Z.matrixWorldInverse.copy(Z.matrixWorld).invert();const U=lt+Ze,I=Xe+Ze,ee=Ce-Ne,xe=he+(Ee-Ne),_e=Ke*Xe/I*U,ye=G*Xe/I*U;Z.projectionMatrix.makePerspective(ee,xe,_e,ye,U,I),Z.projectionMatrixInverse.copy(Z.projectionMatrix).invert()}function N(Z,ie){ie===null?Z.matrixWorld.copy(Z.matrix):Z.matrixWorld.multiplyMatrices(ie.matrixWorld,Z.matrix),Z.matrixWorldInverse.copy(Z.matrixWorld).invert()}this.updateCamera=function(Z){if(r===null)return;b.near=L.near=C.near=Z.near,b.far=L.far=C.far=Z.far,(R!==b.near||k!==b.far)&&(r.updateRenderState({depthNear:b.near,depthFar:b.far}),R=b.near,k=b.far);const ie=Z.parent,pe=b.cameras;N(b,ie);for(let Ee=0;Ee0&&(S.alphaTest.value=g.alphaTest);const x=e.get(g).envMap;if(x&&(S.envMap.value=x,S.flipEnvMap.value=x.isCubeTexture&&x.isRenderTargetTexture===!1?-1:1,S.reflectivity.value=g.reflectivity,S.ior.value=g.ior,S.refractionRatio.value=g.refractionRatio),g.lightMap){S.lightMap.value=g.lightMap;const M=n._useLegacyLights===!0?Math.PI:1;S.lightMapIntensity.value=g.lightMapIntensity*M,t(g.lightMap,S.lightMapTransform)}g.aoMap&&(S.aoMap.value=g.aoMap,S.aoMapIntensity.value=g.aoMapIntensity,t(g.aoMap,S.aoMapTransform))}function o(S,g){S.diffuse.value.copy(g.color),S.opacity.value=g.opacity,g.map&&(S.map.value=g.map,t(g.map,S.mapTransform))}function a(S,g){S.dashSize.value=g.dashSize,S.totalSize.value=g.dashSize+g.gapSize,S.scale.value=g.scale}function u(S,g,x,M){S.diffuse.value.copy(g.color),S.opacity.value=g.opacity,S.size.value=g.size*x,S.scale.value=M*.5,g.map&&(S.map.value=g.map,t(g.map,S.uvTransform)),g.alphaMap&&(S.alphaMap.value=g.alphaMap,t(g.alphaMap,S.alphaMapTransform)),g.alphaTest>0&&(S.alphaTest.value=g.alphaTest)}function f(S,g){S.diffuse.value.copy(g.color),S.opacity.value=g.opacity,S.rotation.value=g.rotation,g.map&&(S.map.value=g.map,t(g.map,S.mapTransform)),g.alphaMap&&(S.alphaMap.value=g.alphaMap,t(g.alphaMap,S.alphaMapTransform)),g.alphaTest>0&&(S.alphaTest.value=g.alphaTest)}function h(S,g){S.specular.value.copy(g.specular),S.shininess.value=Math.max(g.shininess,1e-4)}function d(S,g){g.gradientMap&&(S.gradientMap.value=g.gradientMap)}function p(S,g){S.metalness.value=g.metalness,g.metalnessMap&&(S.metalnessMap.value=g.metalnessMap,t(g.metalnessMap,S.metalnessMapTransform)),S.roughness.value=g.roughness,g.roughnessMap&&(S.roughnessMap.value=g.roughnessMap,t(g.roughnessMap,S.roughnessMapTransform)),e.get(g).envMap&&(S.envMapIntensity.value=g.envMapIntensity)}function v(S,g,x){S.ior.value=g.ior,g.sheen>0&&(S.sheenColor.value.copy(g.sheenColor).multiplyScalar(g.sheen),S.sheenRoughness.value=g.sheenRoughness,g.sheenColorMap&&(S.sheenColorMap.value=g.sheenColorMap,t(g.sheenColorMap,S.sheenColorMapTransform)),g.sheenRoughnessMap&&(S.sheenRoughnessMap.value=g.sheenRoughnessMap,t(g.sheenRoughnessMap,S.sheenRoughnessMapTransform))),g.clearcoat>0&&(S.clearcoat.value=g.clearcoat,S.clearcoatRoughness.value=g.clearcoatRoughness,g.clearcoatMap&&(S.clearcoatMap.value=g.clearcoatMap,t(g.clearcoatMap,S.clearcoatMapTransform)),g.clearcoatRoughnessMap&&(S.clearcoatRoughnessMap.value=g.clearcoatRoughnessMap,t(g.clearcoatRoughnessMap,S.clearcoatRoughnessMapTransform)),g.clearcoatNormalMap&&(S.clearcoatNormalMap.value=g.clearcoatNormalMap,t(g.clearcoatNormalMap,S.clearcoatNormalMapTransform),S.clearcoatNormalScale.value.copy(g.clearcoatNormalScale),g.side===vi&&S.clearcoatNormalScale.value.negate())),g.iridescence>0&&(S.iridescence.value=g.iridescence,S.iridescenceIOR.value=g.iridescenceIOR,S.iridescenceThicknessMinimum.value=g.iridescenceThicknessRange[0],S.iridescenceThicknessMaximum.value=g.iridescenceThicknessRange[1],g.iridescenceMap&&(S.iridescenceMap.value=g.iridescenceMap,t(g.iridescenceMap,S.iridescenceMapTransform)),g.iridescenceThicknessMap&&(S.iridescenceThicknessMap.value=g.iridescenceThicknessMap,t(g.iridescenceThicknessMap,S.iridescenceThicknessMapTransform))),g.transmission>0&&(S.transmission.value=g.transmission,S.transmissionSamplerMap.value=x.texture,S.transmissionSamplerSize.value.set(x.width,x.height),g.transmissionMap&&(S.transmissionMap.value=g.transmissionMap,t(g.transmissionMap,S.transmissionMapTransform)),S.thickness.value=g.thickness,g.thicknessMap&&(S.thicknessMap.value=g.thicknessMap,t(g.thicknessMap,S.thicknessMapTransform)),S.attenuationDistance.value=g.attenuationDistance,S.attenuationColor.value.copy(g.attenuationColor)),g.anisotropy>0&&(S.anisotropyVector.value.set(g.anisotropy*Math.cos(g.anisotropyRotation),g.anisotropy*Math.sin(g.anisotropyRotation)),g.anisotropyMap&&(S.anisotropyMap.value=g.anisotropyMap,t(g.anisotropyMap,S.anisotropyMapTransform))),S.specularIntensity.value=g.specularIntensity,S.specularColor.value.copy(g.specularColor),g.specularColorMap&&(S.specularColorMap.value=g.specularColorMap,t(g.specularColorMap,S.specularColorMapTransform)),g.specularIntensityMap&&(S.specularIntensityMap.value=g.specularIntensityMap,t(g.specularIntensityMap,S.specularIntensityMapTransform))}function y(S,g){g.matcap&&(S.matcap.value=g.matcap)}function w(S,g){const x=e.get(g).light;S.referencePosition.value.setFromMatrixPosition(x.matrixWorld),S.nearDistance.value=x.shadow.camera.near,S.farDistance.value=x.shadow.camera.far}return{refreshFogUniforms:i,refreshMaterialUniforms:r}}function tN(n,e,t,i){let r={},s={},o=[];const a=t.isWebGL2?n.getParameter(n.MAX_UNIFORM_BUFFER_BINDINGS):0;function u(x,M){const T=M.program;i.uniformBlockBinding(x,T)}function f(x,M){let T=r[x.id];T===void 0&&(y(x),T=h(x),r[x.id]=T,x.addEventListener("dispose",S));const P=M.program;i.updateUBOMapping(x,P);const C=e.render.frame;s[x.id]!==C&&(p(x),s[x.id]=C)}function h(x){const M=d();x.__bindingPointIndex=M;const T=n.createBuffer(),P=x.__size,C=x.usage;return n.bindBuffer(n.UNIFORM_BUFFER,T),n.bufferData(n.UNIFORM_BUFFER,P,C),n.bindBuffer(n.UNIFORM_BUFFER,null),n.bindBufferBase(n.UNIFORM_BUFFER,M,T),T}function d(){for(let x=0;x0&&(T+=P-C),x.__size=T,x.__cache={},this}function w(x){const M={boundary:0,storage:0};return typeof x=="number"||typeof x=="boolean"?(M.boundary=4,M.storage=4):x.isVector2?(M.boundary=8,M.storage=8):x.isVector3||x.isColor?(M.boundary=16,M.storage=12):x.isVector4?(M.boundary=16,M.storage=16):x.isMatrix3?(M.boundary=48,M.storage=48):x.isMatrix4?(M.boundary=64,M.storage=64):x.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",x),M}function S(x){const M=x.target;M.removeEventListener("dispose",S);const T=o.indexOf(M.__bindingPointIndex);o.splice(T,1),n.deleteBuffer(r[M.id]),delete r[M.id],delete s[M.id]}function g(){for(const x in r)n.deleteBuffer(r[x]);o=[],r={},s={}}return{bind:u,update:f,dispose:g}}class r_{constructor(e={}){const{canvas:t=LT(),context:i=null,depth:r=!0,stencil:s=!0,alpha:o=!1,antialias:a=!1,premultipliedAlpha:u=!0,preserveDrawingBuffer:f=!1,powerPreference:h="default",failIfMajorPerformanceCaveat:d=!1}=e;this.isWebGLRenderer=!0;let p;i!==null?p=i.getContextAttributes().alpha:p=o;const v=new Uint32Array(4),y=new Int32Array(4);let w=null,S=null;const g=[],x=[];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._outputColorSpace=Cn,this._useLegacyLights=!1,this.toneMapping=Zr,this.toneMappingExposure=1;const M=this;let T=!1,P=0,C=0,L=null,D=-1,b=null;const R=new kt,k=new kt;let q=null;const oe=new Be(0);let V=0,Q=t.width,te=t.height,ae=1,N=null,B=null;const H=new kt(0,0,Q,te),Y=new kt(0,0,Q,te);let J=!1;const Z=new vf;let ie=!1,pe=!1,Ee=null;const Te=new ft,nt=new de,lt=new z,Xe={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function Ke(){return L===null?ae:1}let G=i;function we(O,$){for(let se=0;se{function ke(){if(le.forEach(function(Qe){Ne.get(Qe).currentProgram.isReady()&&le.delete(Qe)}),le.size===0){re(O);return}setTimeout(ke,10)}me.get("KHR_parallel_shader_compile")!==null?ke():setTimeout(ke,10)})};let Rt=null;function Gt(O){Rt&&Rt(O)}function Jt(){Bn.stop()}function Lt(){Bn.start()}const Bn=new FT;Bn.setAnimationLoop(Gt),typeof self<"u"&&Bn.setContext(self),this.setAnimationLoop=function(O){Rt=O,Ue.setAnimationLoop(O),O===null?Bn.stop():Bn.start()},Ue.addEventListener("sessionstart",Jt),Ue.addEventListener("sessionend",Lt),this.render=function(O,$){if($!==void 0&&$.isCamera!==!0){console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");return}if(T===!0)return;O.matrixWorldAutoUpdate===!0&&O.updateMatrixWorld(),$.parent===null&&$.matrixWorldAutoUpdate===!0&&$.updateMatrixWorld(),Ue.enabled===!0&&Ue.isPresenting===!0&&(Ue.cameraAutoUpdate===!0&&Ue.updateCamera($),$=Ue.getCamera()),O.isScene===!0&&O.onBeforeRender(M,O,$,L),S=tt.get(O,x.length),S.init(),x.push(S),Te.multiplyMatrices($.projectionMatrix,$.matrixWorldInverse),Z.setFromProjectionMatrix(Te),pe=this.localClippingEnabled,ie=dt.init(this.clippingPlanes,pe),w=Fe.get(O,g.length),w.init(),g.push(w),Ji(O,$,0,M.sortObjects),w.finish(),M.sortObjects===!0&&w.sort(N,B),this.info.render.frame++,ie===!0&&dt.beginShadows();const se=S.state.shadowsArray;if(Se.render(se,O,$),ie===!0&&dt.endShadows(),this.info.autoReset===!0&&this.info.reset(),Ct.render(w,O),S.setupLights(M._useLegacyLights),$.isArrayCamera){const le=$.cameras;for(let re=0,ke=le.length;re0?S=x[x.length-1]:S=null,g.pop(),g.length>0?w=g[g.length-1]:w=null};function Ji(O,$,se,le){if(O.visible===!1)return;if(O.layers.test($.layers)){if(O.isGroup)se=O.renderOrder;else if(O.isLOD)O.autoUpdate===!0&&O.update($);else if(O.isLight)S.pushLight(O),O.castShadow&&S.pushShadow(O);else if(O.isSprite){if(!O.frustumCulled||Z.intersectsSprite(O)){le&<.setFromMatrixPosition(O.matrixWorld).applyMatrix4(Te);const Qe=ye.update(O),st=O.material;st.visible&&w.push(O,Qe,st,se,lt.z,null)}}else if((O.isMesh||O.isLine||O.isPoints)&&(!O.frustumCulled||Z.intersectsObject(O))){const Qe=ye.update(O),st=O.material;if(le&&(O.boundingSphere!==void 0?(O.boundingSphere===null&&O.computeBoundingSphere(),lt.copy(O.boundingSphere.center)):(Qe.boundingSphere===null&&Qe.computeBoundingSphere(),lt.copy(Qe.boundingSphere.center)),lt.applyMatrix4(O.matrixWorld).applyMatrix4(Te)),Array.isArray(st)){const ot=Qe.groups;for(let pt=0,ht=ot.length;pt0&&fc(re,ke,$,se),le&&he.viewport(R.copy(le)),re.length>0&&La(re,$,se),ke.length>0&&La(ke,$,se),Qe.length>0&&La(Qe,$,se),he.buffers.depth.setTest(!0),he.buffers.depth.setMask(!0),he.buffers.color.setMask(!0),he.setPolygonOffset(!1)}function fc(O,$,se,le){if((se.isScene===!0?se.overrideMaterial:null)!==null)return;const ke=Ce.isWebGL2;Ee===null&&(Ee=new gr(1,1,{generateMipmaps:!0,type:me.has("EXT_color_buffer_half_float")?xa:Kr,minFilter:_o,samples:ke?4:0})),M.getDrawingBufferSize(nt),ke?Ee.setSize(nt.x,nt.y):Ee.setSize(Rp(nt.x),Rp(nt.y));const Qe=M.getRenderTarget();M.setRenderTarget(Ee),M.getClearColor(oe),V=M.getClearAlpha(),V<1&&M.setClearColor(16777215,.5),M.clear();const st=M.toneMapping;M.toneMapping=Zr,La(O,se,le),U.updateMultisampleRenderTarget(Ee),U.updateRenderTargetMipmap(Ee);let ot=!1;for(let pt=0,ht=$.length;pt0),mt=!!se.morphAttributes.position,tn=!!se.morphAttributes.normal,Hn=!!se.morphAttributes.color;let qt=Zr;le.toneMapped&&(L===null||L.isXRRenderTarget===!0)&&(qt=M.toneMapping);const In=se.morphAttributes.position||se.morphAttributes.normal||se.morphAttributes.color,at=In!==void 0?In.length:0,Ge=Ne.get(le),Qi=S.state.lights;if(ie===!0&&(pe===!0||O!==b)){const Vn=O===b&&le.id===D;dt.setState(le,O,Vn)}let Et=!1;le.version===Ge.__version?(Ge.needsLights&&Ge.lightsStateVersion!==Qi.state.version||Ge.outputColorSpace!==st||re.isBatchedMesh&&Ge.batching===!1||!re.isBatchedMesh&&Ge.batching===!0||re.isInstancedMesh&&Ge.instancing===!1||!re.isInstancedMesh&&Ge.instancing===!0||re.isSkinnedMesh&&Ge.skinning===!1||!re.isSkinnedMesh&&Ge.skinning===!0||re.isInstancedMesh&&Ge.instancingColor===!0&&re.instanceColor===null||re.isInstancedMesh&&Ge.instancingColor===!1&&re.instanceColor!==null||Ge.envMap!==ot||le.fog===!0&&Ge.fog!==ke||Ge.numClippingPlanes!==void 0&&(Ge.numClippingPlanes!==dt.numPlanes||Ge.numIntersection!==dt.numIntersection)||Ge.vertexAlphas!==pt||Ge.vertexTangents!==ht||Ge.morphTargets!==mt||Ge.morphNormals!==tn||Ge.morphColors!==Hn||Ge.toneMapping!==qt||Ce.isWebGL2===!0&&Ge.morphTargetsCount!==at)&&(Et=!0):(Et=!0,Ge.__version=le.version);let cn=Ge.currentProgram;Et===!0&&(cn=Ia(le,$,re));let Dr=!1,$i=!1,Nn=!1;const gn=cn.getUniforms(),Ur=Ge.uniforms;if(he.useProgram(cn.program)&&(Dr=!0,$i=!0,Nn=!0),le.id!==D&&(D=le.id,$i=!0),Dr||b!==O){gn.setValue(G,"projectionMatrix",O.projectionMatrix),gn.setValue(G,"viewMatrix",O.matrixWorldInverse);const Vn=gn.map.cameraPosition;Vn!==void 0&&Vn.setValue(G,lt.setFromMatrixPosition(O.matrixWorld)),Ce.logarithmicDepthBuffer&&gn.setValue(G,"logDepthBufFC",2/(Math.log(O.far+1)/Math.LN2)),(le.isMeshPhongMaterial||le.isMeshToonMaterial||le.isMeshLambertMaterial||le.isMeshBasicMaterial||le.isMeshStandardMaterial||le.isShaderMaterial)&&gn.setValue(G,"isOrthographic",O.isOrthographicCamera===!0),b!==O&&(b=O,$i=!0,Nn=!0)}if(re.isSkinnedMesh){gn.setOptional(G,re,"bindMatrix"),gn.setOptional(G,re,"bindMatrixInverse");const Vn=re.skeleton;Vn&&(Ce.floatVertexTextures?(Vn.boneTexture===null&&Vn.computeBoneTexture(),gn.setValue(G,"boneTexture",Vn.boneTexture,U)):console.warn("THREE.WebGLRenderer: SkinnedMesh can only be used with WebGL 2. With WebGL 1 OES_texture_float and vertex textures support is required."))}re.isBatchedMesh&&(gn.setOptional(G,re,"batchingTexture"),gn.setValue(G,"batchingTexture",re._matricesTexture,U));const Na=se.morphAttributes;if((Na.position!==void 0||Na.normal!==void 0||Na.color!==void 0&&Ce.isWebGL2===!0)&&yt.update(re,se,cn),($i||Ge.receiveShadow!==re.receiveShadow)&&(Ge.receiveShadow=re.receiveShadow,gn.setValue(G,"receiveShadow",re.receiveShadow)),le.isMeshGouraudMaterial&&le.envMap!==null&&(Ur.envMap.value=ot,Ur.flipEnvMap.value=ot.isCubeTexture&&ot.isRenderTargetTexture===!1?-1:1),$i&&(gn.setValue(G,"toneMappingExposure",M.toneMappingExposure),Ge.needsLights&&bm(Ur,Nn),ke&&le.fog===!0&&Le.refreshFogUniforms(Ur,ke),Le.refreshMaterialUniforms(Ur,le,ae,te,Ee),Jd.upload(G,Ef(Ge),Ur,U)),le.isShaderMaterial&&le.uniformsNeedUpdate===!0&&(Jd.upload(G,Ef(Ge),Ur,U),le.uniformsNeedUpdate=!1),le.isSpriteMaterial&&gn.setValue(G,"center",re.center),gn.setValue(G,"modelViewMatrix",re.modelViewMatrix),gn.setValue(G,"normalMatrix",re.normalMatrix),gn.setValue(G,"modelMatrix",re.matrixWorld),le.isShaderMaterial||le.isRawShaderMaterial){const Vn=le.uniformsGroups;for(let Da=0,Di=Vn.length;Da0&&U.useMultisampledRTT(O)===!1?re=Ne.get(O).__webglMultisampledFramebuffer:Array.isArray(ht)?re=ht[se]:re=ht,R.copy(O.viewport),k.copy(O.scissor),q=O.scissorTest}else R.copy(H).multiplyScalar(ae).floor(),k.copy(Y).multiplyScalar(ae).floor(),q=J;if(he.bindFramebuffer(G.FRAMEBUFFER,re)&&Ce.drawBuffers&&le&&he.drawBuffers(O,re),he.viewport(R),he.scissor(k),he.setScissorTest(q),ke){const ot=Ne.get(O.texture);G.framebufferTexture2D(G.FRAMEBUFFER,G.COLOR_ATTACHMENT0,G.TEXTURE_CUBE_MAP_POSITIVE_X+$,ot.__webglTexture,se)}else if(Qe){const ot=Ne.get(O.texture),pt=$||0;G.framebufferTextureLayer(G.FRAMEBUFFER,G.COLOR_ATTACHMENT0,ot.__webglTexture,se||0,pt)}D=-1},this.readRenderTargetPixels=function(O,$,se,le,re,ke,Qe){if(!(O&&O.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let st=Ne.get(O).__webglFramebuffer;if(O.isWebGLCubeRenderTarget&&Qe!==void 0&&(st=st[Qe]),st){he.bindFramebuffer(G.FRAMEBUFFER,st);try{const ot=O.texture,pt=ot.format,ht=ot.type;if(pt!==pi&&He.convert(pt)!==G.getParameter(G.IMPLEMENTATION_COLOR_READ_FORMAT)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}const mt=ht===xa&&(me.has("EXT_color_buffer_half_float")||Ce.isWebGL2&&me.has("EXT_color_buffer_float"));if(ht!==Kr&&He.convert(ht)!==G.getParameter(G.IMPLEMENTATION_COLOR_READ_TYPE)&&!(ht===hr&&(Ce.isWebGL2||me.has("OES_texture_float")||me.has("WEBGL_color_buffer_float")))&&!mt){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}$>=0&&$<=O.width-le&&se>=0&&se<=O.height-re&&G.readPixels($,se,le,re,He.convert(pt),He.convert(ht),ke)}finally{const ot=L!==null?Ne.get(L).__webglFramebuffer:null;he.bindFramebuffer(G.FRAMEBUFFER,ot)}}},this.copyFramebufferToTexture=function(O,$,se=0){const le=Math.pow(2,-se),re=Math.floor($.image.width*le),ke=Math.floor($.image.height*le);U.setTexture2D($,0),G.copyTexSubImage2D(G.TEXTURE_2D,se,0,0,O.x,O.y,re,ke),he.unbindTexture()},this.copyTextureToTexture=function(O,$,se,le=0){const re=$.image.width,ke=$.image.height,Qe=He.convert(se.format),st=He.convert(se.type);U.setTexture2D(se,0),G.pixelStorei(G.UNPACK_FLIP_Y_WEBGL,se.flipY),G.pixelStorei(G.UNPACK_PREMULTIPLY_ALPHA_WEBGL,se.premultiplyAlpha),G.pixelStorei(G.UNPACK_ALIGNMENT,se.unpackAlignment),$.isDataTexture?G.texSubImage2D(G.TEXTURE_2D,le,O.x,O.y,re,ke,Qe,st,$.image.data):$.isCompressedTexture?G.compressedTexSubImage2D(G.TEXTURE_2D,le,O.x,O.y,$.mipmaps[0].width,$.mipmaps[0].height,Qe,$.mipmaps[0].data):G.texSubImage2D(G.TEXTURE_2D,le,O.x,O.y,Qe,st,$.image),le===0&&se.generateMipmaps&&G.generateMipmap(G.TEXTURE_2D),he.unbindTexture()},this.copyTextureToTexture3D=function(O,$,se,le,re=0){if(M.isWebGL1Renderer){console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");return}const ke=O.max.x-O.min.x+1,Qe=O.max.y-O.min.y+1,st=O.max.z-O.min.z+1,ot=He.convert(le.format),pt=He.convert(le.type);let ht;if(le.isData3DTexture)U.setTexture3D(le,0),ht=G.TEXTURE_3D;else if(le.isDataArrayTexture||le.isCompressedArrayTexture)U.setTexture2DArray(le,0),ht=G.TEXTURE_2D_ARRAY;else{console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");return}G.pixelStorei(G.UNPACK_FLIP_Y_WEBGL,le.flipY),G.pixelStorei(G.UNPACK_PREMULTIPLY_ALPHA_WEBGL,le.premultiplyAlpha),G.pixelStorei(G.UNPACK_ALIGNMENT,le.unpackAlignment);const mt=G.getParameter(G.UNPACK_ROW_LENGTH),tn=G.getParameter(G.UNPACK_IMAGE_HEIGHT),Hn=G.getParameter(G.UNPACK_SKIP_PIXELS),qt=G.getParameter(G.UNPACK_SKIP_ROWS),In=G.getParameter(G.UNPACK_SKIP_IMAGES),at=se.isCompressedTexture?se.mipmaps[re]:se.image;G.pixelStorei(G.UNPACK_ROW_LENGTH,at.width),G.pixelStorei(G.UNPACK_IMAGE_HEIGHT,at.height),G.pixelStorei(G.UNPACK_SKIP_PIXELS,O.min.x),G.pixelStorei(G.UNPACK_SKIP_ROWS,O.min.y),G.pixelStorei(G.UNPACK_SKIP_IMAGES,O.min.z),se.isDataTexture||se.isData3DTexture?G.texSubImage3D(ht,re,$.x,$.y,$.z,ke,Qe,st,ot,pt,at.data):se.isCompressedArrayTexture?(console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture."),G.compressedTexSubImage3D(ht,re,$.x,$.y,$.z,ke,Qe,st,ot,at.data)):G.texSubImage3D(ht,re,$.x,$.y,$.z,ke,Qe,st,ot,pt,at),G.pixelStorei(G.UNPACK_ROW_LENGTH,mt),G.pixelStorei(G.UNPACK_IMAGE_HEIGHT,tn),G.pixelStorei(G.UNPACK_SKIP_PIXELS,Hn),G.pixelStorei(G.UNPACK_SKIP_ROWS,qt),G.pixelStorei(G.UNPACK_SKIP_IMAGES,In),re===0&&le.generateMipmaps&&G.generateMipmap(ht),he.unbindTexture()},this.initTexture=function(O){O.isCubeTexture?U.setTextureCube(O,0):O.isData3DTexture?U.setTexture3D(O,0):O.isDataArrayTexture||O.isCompressedArrayTexture?U.setTexture2DArray(O,0):U.setTexture2D(O,0),he.unbindTexture()},this.resetState=function(){P=0,C=0,L=null,he.reset(),X.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return br}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(e){this._outputColorSpace=e;const t=this.getContext();t.drawingBufferColorSpace=e===tm?"display-p3":"srgb",t.unpackColorSpace=Ft.workingColorSpace===df?"display-p3":"srgb"}get outputEncoding(){return console.warn("THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead."),this.outputColorSpace===Cn?mo:qy}set outputEncoding(e){console.warn("THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead."),this.outputColorSpace=e===mo?Cn:Qr}get useLegacyLights(){return console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights}set useLegacyLights(e){console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights=e}}class jT extends r_{}jT.prototype.isWebGL1Renderer=!0;class sm{constructor(e,t=25e-5){this.isFogExp2=!0,this.name="",this.color=new Be(e),this.density=t}clone(){return new sm(this.color,this.density)}toJSON(){return{type:"FogExp2",name:this.name,color:this.color.getHex(),density:this.density}}}class om{constructor(e,t=1,i=1e3){this.isFog=!0,this.name="",this.color=new Be(e),this.near=t,this.far=i}clone(){return new om(this.color,this.near,this.far)}toJSON(){return{type:"Fog",name:this.name,color:this.color.getHex(),near:this.near,far:this.far}}}class Pp extends zt{constructor(){super(),this.isScene=!0,this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,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,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}}class am{constructor(e,t){this.isInterleavedBuffer=!0,this.array=e,this.stride=t,this.count=e!==void 0?e.length/t:0,this.usage=Yu,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.version=0,this.uuid=Yi()}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}get updateRange(){return console.warn("THREE.InterleavedBuffer: updateRange() is deprecated and will be removed in r169. Use addUpdateRange() instead."),this._updateRange}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,i){e*=this.stride,i*=t.stride;for(let r=0,s=this.stride;re.far||t.push({distance:u,point:Gc.clone(),uv:Ci.getInterpolation(Gc,rd,Xc,sd,e3,Rg,t3,new de),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 od(n,e,t,i,r,s){hl.subVectors(n,t).addScalar(.5).multiply(i),r!==void 0?(Wc.x=s*hl.x-r*hl.y,Wc.y=r*hl.x+s*hl.y):Wc.copy(hl),n.copy(e),n.x+=Wc.x,n.y+=Wc.y,n.applyMatrix4(YT)}const ad=new z,n3=new z;class ZT extends zt{constructor(){super(),this._currentLevel=0,this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]},isLOD:{value:!0}}),this.autoUpdate=!0}copy(e){super.copy(e,!1);const t=e.levels;for(let i=0,r=t.length;i0){let i,r;for(i=1,r=t.length;i0){ad.setFromMatrixPosition(this.matrixWorld);const r=e.ray.origin.distanceTo(ad);this.getObjectForDistance(r).raycast(e,t)}}update(e){const t=this.levels;if(t.length>1){ad.setFromMatrixPosition(e.matrixWorld),n3.setFromMatrixPosition(this.matrixWorld);const i=ad.distanceTo(n3)/e.zoom;t[0].object.visible=!0;let r,s;for(r=1,s=t.length;r=o)t[r-1].object.visible=!1,t[r].object.visible=!0;else break}for(this._currentLevel=r-1;r=i.length&&i.push({start:-1,count:-1,z:-1});const s=i[this.index];r.push(s),this.index++,s.start=e.start,s.count=e.count,s.z=t}reset(){this.list.length=0,this.index=0}}const pl="batchId",qs=new ft,f3=new ft,lN=new ft,h3=new ft,Ig=new vf,ud=new yi,Ho=new ai,qc=new z,Ng=new aN,ni=new Rn,fd=[];function cN(n,e,t=0){const i=e.itemSize;if(n.isInterleavedBufferAttribute||n.array.constructor!==e.array.constructor){const r=n.count;for(let s=0;s65536?new Uint32Array(s):new Uint16Array(s);t.setIndex(new Ht(a,1))}const o=r>65536?new Uint32Array(i):new Uint16Array(i);t.setAttribute(pl,new Ht(o,1)),this._geometryInitialized=!0}}_validateGeometry(e){if(e.getAttribute(pl))throw new Error(`BatchedMesh: Geometry cannot use attribute "${pl}"`);const t=this.geometry;if(!!e.getIndex()!=!!t.getIndex())throw new Error('BatchedMesh: All geometries must consistently have "index".');for(const i in t.attributes){if(i===pl)continue;if(!e.hasAttribute(i))throw new Error(`BatchedMesh: Added geometry missing "${i}". All geometries must have consistent attributes.`);const r=e.getAttribute(i),s=t.getAttribute(i);if(r.itemSize!==s.itemSize||r.normalized!==s.normalized)throw new Error("BatchedMesh: All attributes must have a consistent itemSize and normalized value.")}}setCustomSort(e){return this.customSort=e,this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new yi);const e=this._geometryCount,t=this.boundingBox,i=this._active;t.makeEmpty();for(let r=0;r=this._maxGeometryCount)throw new Error("BatchedMesh: Maximum geometry count reached.");const r={vertexStart:-1,vertexCount:-1,indexStart:-1,indexCount:-1};let s=null;const o=this._reservedRanges,a=this._drawRanges,u=this._bounds;this._geometryCount!==0&&(s=o[o.length-1]),t===-1?r.vertexCount=e.getAttribute("position").count:r.vertexCount=t,s===null?r.vertexStart=0:r.vertexStart=s.vertexStart+s.vertexCount;const f=e.getIndex(),h=f!==null;if(h&&(i===-1?r.indexCount=f.count:r.indexCount=i,s===null?r.indexStart=0:r.indexStart=s.indexStart+s.indexCount),r.indexStart!==-1&&r.indexStart+r.indexCount>this._maxIndexCount||r.vertexStart+r.vertexCount>this._maxVertexCount)throw new Error("BatchedMesh: Reserved space request exceeds the maximum buffer size.");const d=this._visibility,p=this._active,v=this._matricesTexture,y=this._matricesTexture.image.data;d.push(!0),p.push(!0);const w=this._geometryCount;this._geometryCount++,lN.toArray(y,w*16),v.needsUpdate=!0,o.push(r),a.push({start:h?r.indexStart:r.vertexStart,count:-1}),u.push({boxInitialized:!1,box:new yi,sphereInitialized:!1,sphere:new ai});const S=this.geometry.getAttribute(pl);for(let g=0;g=this._geometryCount)throw new Error("BatchedMesh: Maximum geometry count reached.");this._validateGeometry(t);const i=this.geometry,r=i.getIndex()!==null,s=i.getIndex(),o=t.getIndex(),a=this._reservedRanges[e];if(r&&o.count>a.indexCount||t.attributes.position.count>a.vertexCount)throw new Error("BatchedMesh: Reserved space not large enough for provided geometry.");const u=a.vertexStart,f=a.vertexCount;for(const v in i.attributes){if(v===pl)continue;const y=t.getAttribute(v),w=i.getAttribute(v);cN(y,w,u);const S=y.itemSize;for(let g=y.count,x=f;g=t.length||t[e]===!1?this:(t[e]=!1,this._visibilityChanged=!0,this)}getBoundingBoxAt(e,t){if(this._active[e]===!1)return this;const r=this._bounds[e],s=r.box,o=this.geometry;if(r.boxInitialized===!1){s.makeEmpty();const a=o.index,u=o.attributes.position,f=this._drawRanges[e];for(let h=f.start,d=f.start+f.count;h=o||i[e]===!1?this:(t.toArray(s,e*16),r.needsUpdate=!0,this)}getMatrixAt(e,t){const i=this._active,r=this._matricesTexture.image.data,s=this._geometryCount;return e>=s||i[e]===!1?null:t.fromArray(r,e*16)}setVisibleAt(e,t){const i=this._visibility,r=this._active,s=this._geometryCount;return e>=s||r[e]===!1||i[e]===t?this:(i[e]=t,this._visibilityChanged=!0,this)}getVisibleAt(e){const t=this._visibility,i=this._active,r=this._geometryCount;return e>=r||i[e]===!1?!1:t[e]}raycast(e,t){const i=this._visibility,r=this._active,s=this._drawRanges,o=this._geometryCount,a=this.matrixWorld,u=this.geometry;ni.material=this.material,ni.geometry.index=u.index,ni.geometry.attributes=u.attributes,ni.geometry.boundingBox===null&&(ni.geometry.boundingBox=new yi),ni.geometry.boundingSphere===null&&(ni.geometry.boundingSphere=new ai);for(let f=0;f({...t})),this._reservedRanges=e._reservedRanges.map(t=>({...t})),this._visibility=e._visibility.slice(),this._active=e._active.slice(),this._bounds=e._bounds.map(t=>({boxInitialized:t.boxInitialized,box:t.box.clone(),sphereInitialized:t.sphereInitialized,sphere:t.sphere.clone()})),this._maxGeometryCount=e._maxGeometryCount,this._maxVertexCount=e._maxVertexCount,this._maxIndexCount=e._maxIndexCount,this._geometryInitialized=e._geometryInitialized,this._geometryCount=e._geometryCount,this._multiDrawCounts=e._multiDrawCounts.slice(),this._multiDrawStarts=e._multiDrawStarts.slice(),this._matricesTexture=e._matricesTexture.clone(),this._matricesTexture.image.data=this._matricesTexture.image.slice(),this}dispose(){return this.geometry.dispose(),this._matricesTexture.dispose(),this._matricesTexture=null,this}onBeforeRender(e,t,i,r,s){if(!this._visibilityChanged&&!this.perObjectFrustumCulled&&!this.sortObjects)return;const o=r.getIndex(),a=o===null?1:o.array.BYTES_PER_ELEMENT,u=this._visibility,f=this._multiDrawStarts,h=this._multiDrawCounts,d=this._drawRanges,p=this.perObjectFrustumCulled;p&&(h3.multiplyMatrices(i.projectionMatrix,i.matrixWorldInverse).multiply(this.matrixWorld),Ig.setFromProjectionMatrix(h3,e.isWebGPURenderer?Jl:br));let v=0;if(this.sortObjects){f3.copy(this.matrixWorld).invert(),qc.setFromMatrixPosition(i.matrixWorld).applyMatrix4(f3);for(let S=0,g=u.length;Su)continue;p.applyMatrix4(this.matrixWorld);const D=e.ray.origin.distanceTo(p);De.far||t.push({distance:D,point:d.clone().applyMatrix4(this.matrixWorld),index:M,face:null,faceIndex:null,object:this})}}else{const g=Math.max(0,o.start),x=Math.min(S.count,o.start+o.count);for(let M=g,T=x-1;Mu)continue;p.applyMatrix4(this.matrixWorld);const C=e.ray.origin.distanceTo(p);Ce.far||t.push({distance:C,point:d.clone().applyMatrix4(this.matrixWorld),index:M,face:null,faceIndex:null,object:this})}}}updateMorphTargets(){const t=this.geometry.morphAttributes,i=Object.keys(t);if(i.length>0){const r=t[i[0]];if(r!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,o=r.length;s0){const r=t[i[0]];if(r!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,o=r.length;sr.far)return;s.push({distance:f,distanceToRay:Math.sqrt(a),point:u,index:e,face:null,object:o})}}class uN extends mn{constructor(e,t,i,r,s,o,a,u,f){super(e,t,i,r,s,o,a,u,f),this.isVideoTexture=!0,this.minFilter=o!==void 0?o:sn,this.magFilter=s!==void 0?s:sn,this.generateMipmaps=!1;const h=this;function d(){h.needsUpdate=!0,e.requestVideoFrameCallback(d)}"requestVideoFrameCallback"in e&&e.requestVideoFrameCallback(d)}clone(){return new this.constructor(this.image).copy(this)}update(){const e=this.image;"requestVideoFrameCallback"in e===!1&&e.readyState>=e.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}class fN extends mn{constructor(e,t){super({width:e,height:t}),this.isFramebufferTexture=!0,this.magFilter=_n,this.minFilter=_n,this.generateMipmaps=!1,this.needsUpdate=!0}}class cm extends mn{constructor(e,t,i,r,s,o,a,u,f,h,d,p){super(null,o,a,u,f,h,r,s,d,p),this.isCompressedTexture=!0,this.image={width:t,height:i},this.mipmaps=e,this.flipY=!1,this.generateMipmaps=!1}}class hN extends cm{constructor(e,t,i,r,s,o){super(e,t,i,s,o),this.isCompressedArrayTexture=!0,this.image.depth=r,this.wrapR=si}}class dN extends cm{constructor(e,t,i){super(void 0,e[0].width,e[0].height,t,i,Ps),this.isCompressedCubeTexture=!0,this.isCubeTexture=!0,this.image=e}}class pN extends mn{constructor(e,t,i,r,s,o,a,u,f){super(e,t,i,r,s,o,a,u,f),this.isCanvasTexture=!0,this.needsUpdate=!0}}class Ir{constructor(){this.type="Curve",this.arcLengthDivisions=200}getPoint(){return console.warn("THREE.Curve: .getPoint() not implemented."),null}getPointAt(e,t){const i=this.getUtoTmapping(e);return this.getPoint(i,t)}getPoints(e=5){const t=[];for(let i=0;i<=e;i++)t.push(this.getPoint(i/e));return t}getSpacedPoints(e=5){const t=[];for(let i=0;i<=e;i++)t.push(this.getPointAt(i/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 i,r=this.getPoint(0),s=0;t.push(0);for(let o=1;o<=e;o++)i=this.getPoint(o/e),s+=i.distanceTo(r),t.push(s),r=i;return this.cacheArcLengths=t,t}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(e,t){const i=this.getLengths();let r=0;const s=i.length;let o;t?o=t:o=e*i[s-1];let a=0,u=s-1,f;for(;a<=u;)if(r=Math.floor(a+(u-a)/2),f=i[r]-o,f<0)a=r+1;else if(f>0)u=r-1;else{u=r;break}if(r=u,i[r]===o)return r/(s-1);const h=i[r],p=i[r+1]-h,v=(o-h)/p;return(r+v)/(s-1)}getTangent(e,t){let r=e-1e-4,s=e+1e-4;r<0&&(r=0),s>1&&(s=1);const o=this.getPoint(r),a=this.getPoint(s),u=t||(o.isVector2?new de:new z);return u.copy(a).sub(o).normalize(),u}getTangentAt(e,t){const i=this.getUtoTmapping(e);return this.getTangent(i,t)}computeFrenetFrames(e,t){const i=new z,r=[],s=[],o=[],a=new z,u=new ft;for(let v=0;v<=e;v++){const y=v/e;r[v]=this.getTangentAt(y,new z)}s[0]=new z,o[0]=new z;let f=Number.MAX_VALUE;const h=Math.abs(r[0].x),d=Math.abs(r[0].y),p=Math.abs(r[0].z);h<=f&&(f=h,i.set(1,0,0)),d<=f&&(f=d,i.set(0,1,0)),p<=f&&i.set(0,0,1),a.crossVectors(r[0],i).normalize(),s[0].crossVectors(r[0],a),o[0].crossVectors(r[0],s[0]);for(let v=1;v<=e;v++){if(s[v]=s[v-1].clone(),o[v]=o[v-1].clone(),a.crossVectors(r[v-1],r[v]),a.length()>Number.EPSILON){a.normalize();const y=Math.acos(dn(r[v-1].dot(r[v]),-1,1));s[v].applyMatrix4(u.makeRotationAxis(a,y))}o[v].crossVectors(r[v],s[v])}if(t===!0){let v=Math.acos(dn(s[0].dot(s[e]),-1,1));v/=e,r[0].dot(a.crossVectors(s[0],s[e]))>0&&(v=-v);for(let y=1;y<=e;y++)s[y].applyMatrix4(u.makeRotationAxis(r[y],v*y)),o[y].crossVectors(r[y],s[y])}return{tangents:r,normals:s,binormals:o}}clone(){return new this.constructor().copy(this)}copy(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}toJSON(){const e={metadata:{version:4.6,type:"Curve",generator:"Curve.toJSON"}};return e.arcLengthDivisions=this.arcLengthDivisions,e.type=this.type,e}fromJSON(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}}class um extends Ir{constructor(e=0,t=0,i=1,r=1,s=0,o=Math.PI*2,a=!1,u=0){super(),this.isEllipseCurve=!0,this.type="EllipseCurve",this.aX=e,this.aY=t,this.xRadius=i,this.yRadius=r,this.aStartAngle=s,this.aEndAngle=o,this.aClockwise=a,this.aRotation=u}getPoint(e,t){const i=t||new de,r=Math.PI*2;let s=this.aEndAngle-this.aStartAngle;const o=Math.abs(s)r;)s-=r;s0?0:(Math.floor(Math.abs(a)/s)+1)*s:u===0&&a===s-1&&(a=s-2,u=1);let f,h;this.closed||a>0?f=r[(a-1)%s]:(md.subVectors(r[0],r[1]).add(r[0]),f=md);const d=r[a%s],p=r[(a+1)%s];if(this.closed||a+2r.length-2?r.length-1:o+1],d=r[o>r.length-3?r.length-1:o+2];return i.set(x3(a,u.x,f.x,h.x,d.x),x3(a,u.y,f.y,h.y,d.y)),i}copy(e){super.copy(e),this.points=[];for(let t=0,i=e.points.length;t=i){const o=r[s]-i,a=this.curves[s],u=a.getLength(),f=u===0?0:1-o/u;return a.getPointAt(f,t)}s++}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 i=0,r=this.curves.length;i1&&!t[t.length-1].equals(t[0])&&t.push(t[0]),t}copy(e){super.copy(e),this.curves=[];for(let t=0,i=e.curves.length;t0){const d=f.getPoint(0);d.equals(this.currentPoint)||this.lineTo(d.x,d.y)}this.curves.push(f);const h=f.getPoint(1);return this.currentPoint.copy(h),this}copy(e){return super.copy(e),this.currentPoint.copy(e.currentPoint),this}toJSON(){const e=super.toJSON();return e.currentPoint=this.currentPoint.toArray(),e}fromJSON(e){return super.fromJSON(e),this.currentPoint.fromArray(e.currentPoint),this}}class _f extends St{constructor(e=[new de(0,-.5),new de(.5,0),new de(0,.5)],t=12,i=0,r=Math.PI*2){super(),this.type="LatheGeometry",this.parameters={points:e,segments:t,phiStart:i,phiLength:r},t=Math.floor(t),r=dn(r,0,Math.PI*2);const s=[],o=[],a=[],u=[],f=[],h=1/t,d=new z,p=new de,v=new z,y=new z,w=new z;let S=0,g=0;for(let x=0;x<=e.length-1;x++)switch(x){case 0:S=e[x+1].x-e[x].x,g=e[x+1].y-e[x].y,v.x=g*1,v.y=-S,v.z=g*0,w.copy(v),v.normalize(),u.push(v.x,v.y,v.z);break;case e.length-1:u.push(w.x,w.y,w.z);break;default:S=e[x+1].x-e[x].x,g=e[x+1].y-e[x].y,v.x=g*1,v.y=-S,v.z=g*0,y.copy(v),v.x+=w.x,v.y+=w.y,v.z+=w.z,v.normalize(),u.push(v.x,v.y,v.z),w.copy(y)}for(let x=0;x<=t;x++){const M=i+x*h*r,T=Math.sin(M),P=Math.cos(M);for(let C=0;C<=e.length-1;C++){d.x=e[C].x*T,d.y=e[C].y,d.z=e[C].x*P,o.push(d.x,d.y,d.z),p.x=x/t,p.y=C/(e.length-1),a.push(p.x,p.y);const L=u[3*C+0]*T,D=u[3*C+1],b=u[3*C+0]*P;f.push(L,D,b)}}for(let x=0;x0&&M(!0),t>0&&M(!1)),this.setIndex(h),this.setAttribute("position",new qe(d,3)),this.setAttribute("normal",new qe(p,3)),this.setAttribute("uv",new qe(v,2));function x(){const T=new z,P=new z;let C=0;const L=(t-e)/i;for(let D=0;D<=s;D++){const b=[],R=D/s,k=R*(t-e)+e;for(let q=0;q<=r;q++){const oe=q/r,V=oe*u+a,Q=Math.sin(V),te=Math.cos(V);P.x=k*Q,P.y=-R*i+S,P.z=k*te,d.push(P.x,P.y,P.z),T.set(Q,L,te).normalize(),p.push(T.x,T.y,T.z),v.push(oe,1-R),b.push(y++)}w.push(b)}for(let D=0;D.9&&L<.1&&(M<.2&&(o[x+0]+=1),T<.2&&(o[x+2]+=1),P<.2&&(o[x+4]+=1))}}function p(x){s.push(x.x,x.y,x.z)}function v(x,M){const T=x*3;M.x=e[T+0],M.y=e[T+1],M.z=e[T+2]}function y(){const x=new z,M=new z,T=new z,P=new z,C=new de,L=new de,D=new de;for(let b=0,R=0;b80*t){a=f=n[0],u=h=n[1];for(let y=t;yf&&(f=d),p>h&&(h=p);v=Math.max(f-a,h-u),v=v!==0?32767/v:0}return Ku(s,o,t,a,u,v,0),o}};function a4(n,e,t,i,r){let s,o;if(r===FN(n,e,t,i)>0)for(s=e;s=e;s-=i)o=S3(s,n[s],n[s+1],o);return o&&mm(o,o.next)&&(Qu(o),o=o.next),o}function wa(n,e){if(!n)return n;e||(e=n);let t=n,i;do if(i=!1,!t.steiner&&(mm(t,t.next)||on(t.prev,t,t.next)===0)){if(Qu(t),t=e=t.prev,t===t.next)break;i=!0}else t=t.next;while(i||t!==e);return e}function Ku(n,e,t,i,r,s,o){if(!n)return;!o&&s&&IN(n,i,r,s);let a=n,u,f;for(;n.prev!==n.next;){if(u=n.prev,f=n.next,s?EN(n,i,r,s):wN(n)){e.push(u.i/t|0),e.push(n.i/t|0),e.push(f.i/t|0),Qu(n),n=f.next,a=f.next;continue}if(n=f,n===a){o?o===1?(n=TN(wa(n),e,t),Ku(n,e,t,i,r,s,2)):o===2&&AN(n,e,t,i,r,s):Ku(wa(n),e,t,i,r,s,1);break}}}function wN(n){const e=n.prev,t=n,i=n.next;if(on(e,t,i)>=0)return!1;const r=e.x,s=t.x,o=i.x,a=e.y,u=t.y,f=i.y,h=rs?r>o?r:o:s>o?s:o,v=a>u?a>f?a:f:u>f?u:f;let y=i.next;for(;y!==e;){if(y.x>=h&&y.x<=p&&y.y>=d&&y.y<=v&&Ul(r,a,s,u,o,f,y.x,y.y)&&on(y.prev,y,y.next)>=0)return!1;y=y.next}return!0}function EN(n,e,t,i){const r=n.prev,s=n,o=n.next;if(on(r,s,o)>=0)return!1;const a=r.x,u=s.x,f=o.x,h=r.y,d=s.y,p=o.y,v=au?a>f?a:f:u>f?u:f,S=h>d?h>p?h:p:d>p?d:p,g=Lv(v,y,e,t,i),x=Lv(w,S,e,t,i);let M=n.prevZ,T=n.nextZ;for(;M&&M.z>=g&&T&&T.z<=x;){if(M.x>=v&&M.x<=w&&M.y>=y&&M.y<=S&&M!==r&&M!==o&&Ul(a,h,u,d,f,p,M.x,M.y)&&on(M.prev,M,M.next)>=0||(M=M.prevZ,T.x>=v&&T.x<=w&&T.y>=y&&T.y<=S&&T!==r&&T!==o&&Ul(a,h,u,d,f,p,T.x,T.y)&&on(T.prev,T,T.next)>=0))return!1;T=T.nextZ}for(;M&&M.z>=g;){if(M.x>=v&&M.x<=w&&M.y>=y&&M.y<=S&&M!==r&&M!==o&&Ul(a,h,u,d,f,p,M.x,M.y)&&on(M.prev,M,M.next)>=0)return!1;M=M.prevZ}for(;T&&T.z<=x;){if(T.x>=v&&T.x<=w&&T.y>=y&&T.y<=S&&T!==r&&T!==o&&Ul(a,h,u,d,f,p,T.x,T.y)&&on(T.prev,T,T.next)>=0)return!1;T=T.nextZ}return!0}function TN(n,e,t){let i=n;do{const r=i.prev,s=i.next.next;!mm(r,s)&&l4(r,i,i.next,s)&&Ju(r,s)&&Ju(s,r)&&(e.push(r.i/t|0),e.push(i.i/t|0),e.push(s.i/t|0),Qu(i),Qu(i.next),i=n=s),i=i.next}while(i!==n);return wa(i)}function AN(n,e,t,i,r,s){let o=n;do{let a=o.next.next;for(;a!==o.prev;){if(o.i!==a.i&&UN(o,a)){let u=c4(o,a);o=wa(o,o.next),u=wa(u,u.next),Ku(o,e,t,i,r,s,0),Ku(u,e,t,i,r,s,0);return}a=a.next}o=o.next}while(o!==n)}function CN(n,e,t,i){const r=[];let s,o,a,u,f;for(s=0,o=e.length;s=t.next.y&&t.next.y!==t.y){const p=t.x+(o-t.y)*(t.next.x-t.x)/(t.next.y-t.y);if(p<=s&&p>i&&(i=p,r=t.x=t.x&&t.x>=u&&s!==t.x&&Ul(or.x||t.x===r.x&&LN(r,t)))&&(r=t,h=d)),t=t.next;while(t!==a);return r}function LN(n,e){return on(n.prev,n,e.prev)<0&&on(e.next,n,n.next)<0}function IN(n,e,t,i){let r=n;do r.z===0&&(r.z=Lv(r.x,r.y,e,t,i)),r.prevZ=r.prev,r.nextZ=r.next,r=r.next;while(r!==n);r.prevZ.nextZ=null,r.prevZ=null,NN(r)}function NN(n){let e,t,i,r,s,o,a,u,f=1;do{for(t=n,n=null,s=null,o=0;t;){for(o++,i=t,a=0,e=0;e0||u>0&&i;)a!==0&&(u===0||!i||t.z<=i.z)?(r=t,t=t.nextZ,a--):(r=i,i=i.nextZ,u--),s?s.nextZ=r:n=r,r.prevZ=s,s=r;t=i}s.nextZ=null,f*=2}while(o>1);return n}function Lv(n,e,t,i,r){return n=(n-t)*r|0,e=(e-i)*r|0,n=(n|n<<8)&16711935,n=(n|n<<4)&252645135,n=(n|n<<2)&858993459,n=(n|n<<1)&1431655765,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,n|e<<1}function DN(n){let e=n,t=n;do(e.x=(n-o)*(s-a)&&(n-o)*(i-a)>=(t-o)*(e-a)&&(t-o)*(s-a)>=(r-o)*(i-a)}function UN(n,e){return n.next.i!==e.i&&n.prev.i!==e.i&&!ON(n,e)&&(Ju(n,e)&&Ju(e,n)&&zN(n,e)&&(on(n.prev,n,e.prev)||on(n,e.prev,e))||mm(n,e)&&on(n.prev,n,n.next)>0&&on(e.prev,e,e.next)>0)}function on(n,e,t){return(e.y-n.y)*(t.x-e.x)-(e.x-n.x)*(t.y-e.y)}function mm(n,e){return n.x===e.x&&n.y===e.y}function l4(n,e,t,i){const r=xd(on(n,e,t)),s=xd(on(n,e,i)),o=xd(on(t,i,n)),a=xd(on(t,i,e));return!!(r!==s&&o!==a||r===0&&_d(n,t,e)||s===0&&_d(n,i,e)||o===0&&_d(t,n,i)||a===0&&_d(t,e,i))}function _d(n,e,t){return e.x<=Math.max(n.x,t.x)&&e.x>=Math.min(n.x,t.x)&&e.y<=Math.max(n.y,t.y)&&e.y>=Math.min(n.y,t.y)}function xd(n){return n>0?1:n<0?-1:0}function ON(n,e){let t=n;do{if(t.i!==n.i&&t.next.i!==n.i&&t.i!==e.i&&t.next.i!==e.i&&l4(t,t.next,n,e))return!0;t=t.next}while(t!==n);return!1}function Ju(n,e){return on(n.prev,n,n.next)<0?on(n,e,n.next)>=0&&on(n,n.prev,e)>=0:on(n,e,n.prev)<0||on(n,n.next,e)<0}function zN(n,e){let t=n,i=!1;const r=(n.x+e.x)/2,s=(n.y+e.y)/2;do t.y>s!=t.next.y>s&&t.next.y!==t.y&&r<(t.next.x-t.x)*(s-t.y)/(t.next.y-t.y)+t.x&&(i=!i),t=t.next;while(t!==n);return i}function c4(n,e){const t=new Iv(n.i,n.x,n.y),i=new Iv(e.i,e.x,e.y),r=n.next,s=e.prev;return n.next=e,e.prev=n,t.next=r,r.prev=t,i.next=t,t.prev=i,s.next=i,i.prev=s,i}function S3(n,e,t,i){const r=new Iv(n,e,t);return i?(r.next=i.next,r.prev=i,i.next.prev=r,i.next=r):(r.prev=r,r.next=r),r}function Qu(n){n.next.prev=n.prev,n.prev.next=n.next,n.prevZ&&(n.prevZ.nextZ=n.nextZ),n.nextZ&&(n.nextZ.prevZ=n.prevZ)}function Iv(n,e,t){this.i=n,this.x=e,this.y=t,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function FN(n,e,t,i){let r=0;for(let s=e,o=t-i;s2&&n[e-1].equals(n[0])&&n.pop()}function w3(n,e){for(let t=0;tNumber.EPSILON){const ye=Math.sqrt(xe),je=Math.sqrt(I*I+ee*ee),Le=we.x-U/ye,Fe=we.y+Ne/ye,tt=me.x-ee/je,dt=me.y+I/je,Se=((tt-Le)*ee-(dt-Fe)*I)/(Ne*ee-U*I);Ce=Le+Ne*Se-G.x,he=Fe+U*Se-G.y;const Ct=Ce*Ce+he*he;if(Ct<=2)return new de(Ce,he);Ze=Math.sqrt(Ct/2)}else{let ye=!1;Ne>Number.EPSILON?I>Number.EPSILON&&(ye=!0):Ne<-Number.EPSILON?I<-Number.EPSILON&&(ye=!0):Math.sign(U)===Math.sign(ee)&&(ye=!0),ye?(Ce=-U,he=Ne,Ze=Math.sqrt(xe)):(Ce=Ne,he=U,Ze=Math.sqrt(xe/2))}return new de(Ce/Ze,he/Ze)}const B=[];for(let G=0,we=V.length,me=we-1,Ce=G+1;G=0;G--){const we=G/S,me=v*Math.cos(we*Math.PI/2),Ce=y*Math.sin(we*Math.PI/2)+w;for(let he=0,Ze=V.length;he=0;){const Ce=me;let he=me-1;he<0&&(he=G.length-1);for(let Ze=0,Ne=h+S*2;Ze0)&&v.push(M,T,C),(g!==i-1||u0!=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 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.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}}class p4 extends Yn{constructor(e){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new Be(16777215),this.specular=new Be(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Be(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Eo,this.normalScale=new de(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=hf,this.reflectivity=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.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.flatShading=e.flatShading,this.fog=e.fog,this}}class m4 extends Yn{constructor(e){super(),this.isMeshToonMaterial=!0,this.defines={TOON:""},this.type="MeshToonMaterial",this.color=new Be(16777215),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Be(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Eo,this.normalScale=new de(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}}class g4 extends Yn{constructor(e){super(),this.isMeshNormalMaterial=!0,this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Eo,this.normalScale=new de(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}}class v4 extends Yn{constructor(e){super(),this.isMeshLambertMaterial=!0,this.type="MeshLambertMaterial",this.color=new Be(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Be(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Eo,this.normalScale=new de(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=hf,this.reflectivity=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.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.flatShading=e.flatShading,this.fog=e.fog,this}}class y4 extends Yn{constructor(e){super(),this.isMeshMatcapMaterial=!0,this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new Be(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Eo,this.normalScale=new de(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,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.flatShading=e.flatShading,this.fog=e.fog,this}}class _4 extends Si{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 oa(n,e,t){return!n||!t&&n.constructor===e?n:typeof e.BYTES_PER_ELEMENT=="number"?new e(n):Array.prototype.slice.call(n)}function x4(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}function S4(n){function e(r,s){return n[r]-n[s]}const t=n.length,i=new Array(t);for(let r=0;r!==t;++r)i[r]=r;return i.sort(e),i}function Nv(n,e,t){const i=n.length,r=new n.constructor(i);for(let s=0,o=0;o!==i;++s){const a=t[s]*e;for(let u=0;u!==e;++u)r[o++]=n[a+u]}return r}function m_(n,e,t,i){let r=1,s=n[0];for(;s!==void 0&&s[i]===void 0;)s=n[r++];if(s===void 0)return;let o=s[i];if(o!==void 0)if(Array.isArray(o))do o=s[i],o!==void 0&&(e.push(s.time),t.push.apply(t,o)),s=n[r++];while(s!==void 0);else if(o.toArray!==void 0)do o=s[i],o!==void 0&&(e.push(s.time),o.toArray(t,t.length)),s=n[r++];while(s!==void 0);else do o=s[i],o!==void 0&&(e.push(s.time),t.push(o)),s=n[r++];while(s!==void 0)}function VN(n,e,t,i,r=30){const s=n.clone();s.name=e;const o=[];for(let u=0;u=i)){d.push(f.times[v]);for(let w=0;ws.tracks[u].times[0]&&(a=s.tracks[u].times[0]);for(let u=0;u=a.times[y]){const g=y*d+h,x=g+d-h;w=a.values.slice(g,x)}else{const g=a.createInterpolant(),x=h,M=d-h;g.evaluate(s),w=g.resultBuffer.slice(x,M)}u==="quaternion"&&new oi().fromArray(w).normalize().conjugate().toArray(w);const S=f.times.length;for(let g=0;g=s)){const a=t[1];e=s)break t}o=i,i=0;break n}break e}for(;i>>1;et;)--o;if(++o,s!==0||o!==r){s>=o&&(o=Math.max(o,1),s=o-1);const a=this.getValueSize();this.times=i.slice(s,o),this.values=this.values.slice(s*a,o*a)}return this}validate(){let e=!0;const t=this.getValueSize();t-Math.floor(t)!==0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),e=!1);const i=this.times,r=this.values,s=i.length;s===0&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);let o=null;for(let a=0;a!==s;a++){const u=i[a];if(typeof u=="number"&&isNaN(u)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,a,u),e=!1;break}if(o!==null&&o>u){console.error("THREE.KeyframeTrack: Out of order keys.",this,a,u,o),e=!1;break}o=u}if(r!==void 0&&x4(r))for(let a=0,u=r.length;a!==u;++a){const f=r[a];if(isNaN(f)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,a,f),e=!1;break}}return e}optimize(){const e=this.times.slice(),t=this.values.slice(),i=this.getValueSize(),r=this.getInterpolation()===Kd,s=e.length-1;let o=1;for(let a=1;a0){e[o]=e[s];for(let a=s*i,u=o*i,f=0;f!==i;++f)t[u+f]=t[a+f];++o}return o!==e.length?(this.times=e.slice(0,o),this.values=t.slice(0,o*i)):(this.times=e,this.values=t),this}clone(){const e=this.times.slice(),t=this.values.slice(),i=this.constructor,r=new i(this.name,e,t);return r.createInterpolant=this.createInterpolant,r}}Nr.prototype.TimeBufferType=Float32Array;Nr.prototype.ValueBufferType=Float32Array;Nr.prototype.DefaultInterpolation=Vu;class ba extends Nr{}ba.prototype.ValueTypeName="bool";ba.prototype.ValueBufferType=Array;ba.prototype.DefaultInterpolation=Hu;ba.prototype.InterpolantFactoryMethodLinear=void 0;ba.prototype.InterpolantFactoryMethodSmooth=void 0;class v_ extends Nr{}v_.prototype.ValueTypeName="color";class $u extends Nr{}$u.prototype.ValueTypeName="number";class E4 extends Mf{constructor(e,t,i,r){super(e,t,i,r)}interpolate_(e,t,i,r){const s=this.resultBuffer,o=this.sampleValues,a=this.valueSize,u=(i-t)/(r-t);let f=e*a;for(let h=f+a;f!==h;f+=4)oi.slerpFlat(s,0,o,f-a,o,f,u);return s}}class cc extends Nr{InterpolantFactoryMethodLinear(e){return new E4(this.times,this.values,this.getValueSize(),e)}}cc.prototype.ValueTypeName="quaternion";cc.prototype.DefaultInterpolation=Vu;cc.prototype.InterpolantFactoryMethodSmooth=void 0;class Ra extends Nr{}Ra.prototype.ValueTypeName="string";Ra.prototype.ValueBufferType=Array;Ra.prototype.DefaultInterpolation=Hu;Ra.prototype.InterpolantFactoryMethodLinear=void 0;Ra.prototype.InterpolantFactoryMethodSmooth=void 0;class ef extends Nr{}ef.prototype.ValueTypeName="vector";class tf{constructor(e,t=-1,i,r=em){this.name=e,this.tracks=i,this.duration=t,this.blendMode=r,this.uuid=Yi(),this.duration<0&&this.resetDuration()}static parse(e){const t=[],i=e.tracks,r=1/(e.fps||1);for(let o=0,a=i.length;o!==a;++o)t.push(jN(i[o]).scale(r));const s=new this(e.name,e.duration,t,e.blendMode);return s.uuid=e.uuid,s}static toJSON(e){const t=[],i=e.tracks,r={name:e.name,duration:e.duration,tracks:t,uuid:e.uuid,blendMode:e.blendMode};for(let s=0,o=i.length;s!==o;++s)t.push(Nr.toJSON(i[s]));return r}static CreateFromMorphTargetSequence(e,t,i,r){const s=t.length,o=[];for(let a=0;a1){const d=h[1];let p=r[d];p||(r[d]=p=[]),p.push(f)}}const o=[];for(const a in r)o.push(this.CreateFromMorphTargetSequence(a,r[a],t,i));return o}static parseAnimation(e,t){if(!e)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;const i=function(d,p,v,y,w){if(v.length!==0){const S=[],g=[];m_(v,S,g,y),S.length!==0&&w.push(new d(p,S,g))}},r=[],s=e.name||"default",o=e.fps||30,a=e.blendMode;let u=e.length||-1;const f=e.hierarchy||[];for(let d=0;d{t&&t(s),this.manager.itemEnd(e)},0),s;if(ds[e]!==void 0){ds[e].push({onLoad:t,onProgress:i,onError:r});return}ds[e]=[],ds[e].push({onLoad:t,onProgress:i,onError:r});const o=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),a=this.mimeType,u=this.responseType;fetch(o).then(f=>{if(f.status===200||f.status===0){if(f.status===0&&console.warn("THREE.FileLoader: HTTP Status 0 received."),typeof ReadableStream>"u"||f.body===void 0||f.body.getReader===void 0)return f;const h=ds[e],d=f.body.getReader(),p=f.headers.get("Content-Length")||f.headers.get("X-File-Size"),v=p?parseInt(p):0,y=v!==0;let w=0;const S=new ReadableStream({start(g){x();function x(){d.read().then(({done:M,value:T})=>{if(M)g.close();else{w+=T.byteLength;const P=new ProgressEvent("progress",{lengthComputable:y,loaded:w,total:v});for(let C=0,L=h.length;C{switch(u){case"arraybuffer":return f.arrayBuffer();case"blob":return f.blob();case"document":return f.text().then(h=>new DOMParser().parseFromString(h,a));case"json":return f.json();default:if(a===void 0)return f.text();{const d=/charset="?([^;"\s]*)"?/i.exec(a),p=d&&d[1]?d[1].toLowerCase():void 0,v=new TextDecoder(p);return f.arrayBuffer().then(y=>v.decode(y))}}}).then(f=>{Ms.add(e,f);const h=ds[e];delete ds[e];for(let d=0,p=h.length;d{const h=ds[e];if(h===void 0)throw this.manager.itemError(e),f;delete ds[e];for(let d=0,p=h.length;d{this.manager.itemEnd(e)}),this.manager.itemStart(e)}setResponseType(e){return this.responseType=e,this}setMimeType(e){return this.mimeType=e,this}}class qN extends Ni{constructor(e){super(e)}load(e,t,i,r){const s=this,o=new Ls(this.manager);o.setPath(this.path),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(e,function(a){try{t(s.parse(JSON.parse(a)))}catch(u){r?r(u):console.error(u),s.manager.itemError(e)}},i,r)}parse(e){const t=[];for(let i=0;i0:r.vertexColors=e.vertexColors),e.uniforms!==void 0)for(const s in e.uniforms){const o=e.uniforms[s];switch(r.uniforms[s]={},o.type){case"t":r.uniforms[s].value=i(o.value);break;case"c":r.uniforms[s].value=new Be().setHex(o.value);break;case"v2":r.uniforms[s].value=new de().fromArray(o.value);break;case"v3":r.uniforms[s].value=new z().fromArray(o.value);break;case"v4":r.uniforms[s].value=new kt().fromArray(o.value);break;case"m3":r.uniforms[s].value=new wt().fromArray(o.value);break;case"m4":r.uniforms[s].value=new ft().fromArray(o.value);break;default:r.uniforms[s].value=o.value}}if(e.defines!==void 0&&(r.defines=e.defines),e.vertexShader!==void 0&&(r.vertexShader=e.vertexShader),e.fragmentShader!==void 0&&(r.fragmentShader=e.fragmentShader),e.glslVersion!==void 0&&(r.glslVersion=e.glslVersion),e.extensions!==void 0)for(const s in e.extensions)r.extensions[s]=e.extensions[s];if(e.lights!==void 0&&(r.lights=e.lights),e.clipping!==void 0&&(r.clipping=e.clipping),e.size!==void 0&&(r.size=e.size),e.sizeAttenuation!==void 0&&(r.sizeAttenuation=e.sizeAttenuation),e.map!==void 0&&(r.map=i(e.map)),e.matcap!==void 0&&(r.matcap=i(e.matcap)),e.alphaMap!==void 0&&(r.alphaMap=i(e.alphaMap)),e.bumpMap!==void 0&&(r.bumpMap=i(e.bumpMap)),e.bumpScale!==void 0&&(r.bumpScale=e.bumpScale),e.normalMap!==void 0&&(r.normalMap=i(e.normalMap)),e.normalMapType!==void 0&&(r.normalMapType=e.normalMapType),e.normalScale!==void 0){let s=e.normalScale;Array.isArray(s)===!1&&(s=[s,s]),r.normalScale=new de().fromArray(s)}return e.displacementMap!==void 0&&(r.displacementMap=i(e.displacementMap)),e.displacementScale!==void 0&&(r.displacementScale=e.displacementScale),e.displacementBias!==void 0&&(r.displacementBias=e.displacementBias),e.roughnessMap!==void 0&&(r.roughnessMap=i(e.roughnessMap)),e.metalnessMap!==void 0&&(r.metalnessMap=i(e.metalnessMap)),e.emissiveMap!==void 0&&(r.emissiveMap=i(e.emissiveMap)),e.emissiveIntensity!==void 0&&(r.emissiveIntensity=e.emissiveIntensity),e.specularMap!==void 0&&(r.specularMap=i(e.specularMap)),e.specularIntensityMap!==void 0&&(r.specularIntensityMap=i(e.specularIntensityMap)),e.specularColorMap!==void 0&&(r.specularColorMap=i(e.specularColorMap)),e.envMap!==void 0&&(r.envMap=i(e.envMap)),e.envMapIntensity!==void 0&&(r.envMapIntensity=e.envMapIntensity),e.reflectivity!==void 0&&(r.reflectivity=e.reflectivity),e.refractionRatio!==void 0&&(r.refractionRatio=e.refractionRatio),e.lightMap!==void 0&&(r.lightMap=i(e.lightMap)),e.lightMapIntensity!==void 0&&(r.lightMapIntensity=e.lightMapIntensity),e.aoMap!==void 0&&(r.aoMap=i(e.aoMap)),e.aoMapIntensity!==void 0&&(r.aoMapIntensity=e.aoMapIntensity),e.gradientMap!==void 0&&(r.gradientMap=i(e.gradientMap)),e.clearcoatMap!==void 0&&(r.clearcoatMap=i(e.clearcoatMap)),e.clearcoatRoughnessMap!==void 0&&(r.clearcoatRoughnessMap=i(e.clearcoatRoughnessMap)),e.clearcoatNormalMap!==void 0&&(r.clearcoatNormalMap=i(e.clearcoatNormalMap)),e.clearcoatNormalScale!==void 0&&(r.clearcoatNormalScale=new de().fromArray(e.clearcoatNormalScale)),e.iridescenceMap!==void 0&&(r.iridescenceMap=i(e.iridescenceMap)),e.iridescenceThicknessMap!==void 0&&(r.iridescenceThicknessMap=i(e.iridescenceThicknessMap)),e.transmissionMap!==void 0&&(r.transmissionMap=i(e.transmissionMap)),e.thicknessMap!==void 0&&(r.thicknessMap=i(e.thicknessMap)),e.anisotropyMap!==void 0&&(r.anisotropyMap=i(e.anisotropyMap)),e.sheenColorMap!==void 0&&(r.sheenColorMap=i(e.sheenColorMap)),e.sheenRoughnessMap!==void 0&&(r.sheenRoughnessMap=i(e.sheenRoughnessMap)),r}setTextures(e){return this.textures=e,this}static createMaterialFromType(e){const t={ShadowMaterial:f4,SpriteMaterial:s_,RawShaderMaterial:h4,ShaderMaterial:$r,PointsMaterial:a_,MeshPhysicalMaterial:d4,MeshStandardMaterial:p_,MeshPhongMaterial:p4,MeshToonMaterial:m4,MeshNormalMaterial:g4,MeshLambertMaterial:v4,MeshDepthMaterial:n_,MeshDistanceMaterial:i_,MeshBasicMaterial:To,MeshMatcapMaterial:y4,LineDashedMaterial:_4,LineBasicMaterial:Si,Material:Yn};return new t[e]}}class Uv{static decodeText(e){if(typeof TextDecoder<"u")return new TextDecoder().decode(e);let t="";for(let i=0,r=e.length;i0){const u=new y_(t);s=new nf(u),s.setCrossOrigin(this.crossOrigin);for(let f=0,h=e.length;f0){r=new nf(this.manager),r.setCrossOrigin(this.crossOrigin);for(let o=0,a=e.length;o{const S=new yi;S.min.fromArray(w.boxMin),S.max.fromArray(w.boxMax);const g=new ai;return g.radius=w.sphereRadius,g.center.fromArray(w.sphereCenter),{boxInitialized:w.boxInitialized,box:S,sphereInitialized:w.sphereInitialized,sphere:g}}),o._maxGeometryCount=e.maxGeometryCount,o._maxVertexCount=e.maxVertexCount,o._maxIndexCount=e.maxIndexCount,o._geometryInitialized=e.geometryInitialized,o._geometryCount=e.geometryCount,o._matricesTexture=f(e.matricesTexture.uuid);break;case"LOD":o=new ZT;break;case"Line":o=new xo(a(e.geometry),u(e.material));break;case"LineLoop":o=new $T(a(e.geometry),u(e.material));break;case"LineSegments":o=new ts(a(e.geometry),u(e.material));break;case"PointCloud":case"Points":o=new e4(a(e.geometry),u(e.material));break;case"Sprite":o=new qT(u(e.material));break;case"Group":o=new Dl;break;case"Bone":o=new o_;break;default:o=new zt}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.castShadow!==void 0&&(o.castShadow=e.castShadow),e.receiveShadow!==void 0&&(o.receiveShadow=e.receiveShadow),e.shadow&&(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.userData!==void 0&&(o.userData=e.userData),e.layers!==void 0&&(o.layers.mask=e.layers),e.children!==void 0){const p=e.children;for(let v=0;v"u"&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),typeof fetch>"u"&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.options={premultiplyAlpha:"none"}}setOptions(e){return this.options=e,this}load(e,t,i,r){e===void 0&&(e=""),this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const s=this,o=Ms.get(e);if(o!==void 0){if(s.manager.itemStart(e),o.then){o.then(f=>{t&&t(f),s.manager.itemEnd(e)}).catch(f=>{r&&r(f)});return}return setTimeout(function(){t&&t(o),s.manager.itemEnd(e)},0),o}const a={};a.credentials=this.crossOrigin==="anonymous"?"same-origin":"include",a.headers=this.requestHeader;const u=fetch(e,a).then(function(f){return f.blob()}).then(function(f){return createImageBitmap(f,Object.assign(s.options,{colorSpaceConversion:"none"}))}).then(function(f){return Ms.add(e,f),t&&t(f),s.manager.itemEnd(e),f}).catch(function(f){r&&r(f),Ms.remove(e),s.manager.itemError(e),s.manager.itemEnd(e)});Ms.add(e,u),s.manager.itemStart(e)}}let Sd;class x_{static getContext(){return Sd===void 0&&(Sd=new(window.AudioContext||window.webkitAudioContext)),Sd}static setContext(e){Sd=e}}class rD extends Ni{constructor(e){super(e)}load(e,t,i,r){const s=this,o=new Ls(this.manager);o.setResponseType("arraybuffer"),o.setPath(this.path),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(e,function(u){try{const f=u.slice(0);x_.getContext().decodeAudioData(f,function(d){t(d)}).catch(a)}catch(f){a(f)}},i,r);function a(u){r?r(u):console.error(u),s.manager.itemError(e)}}}const L3=new ft,I3=new ft,Vo=new ft;class sD{constructor(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new pn,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new pn,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,Vo.copy(e.projectionMatrix);const r=t.eyeSep/2,s=r*t.near/t.focus,o=t.near*Math.tan(ua*t.fov*.5)/t.zoom;let a,u;I3.elements[12]=-r,L3.elements[12]=r,a=-o*t.aspect+s,u=o*t.aspect+s,Vo.elements[0]=2*t.near/(u-a),Vo.elements[8]=(u+a)/(u-a),this.cameraL.projectionMatrix.copy(Vo),a=-o*t.aspect-s,u=o*t.aspect-s,Vo.elements[0]=2*t.near/(u-a),Vo.elements[8]=(u+a)/(u-a),this.cameraR.projectionMatrix.copy(Vo)}this.cameraL.matrixWorld.copy(e.matrixWorld).multiply(I3),this.cameraR.matrixWorld.copy(e.matrixWorld).multiply(L3)}}class S_{constructor(e=!0){this.autoStart=e,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=N3(),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=N3();e=(t-this.oldTime)/1e3,this.oldTime=t,this.elapsedTime+=e}return e}}function N3(){return(typeof performance>"u"?Date:performance).now()}const Go=new z,D3=new oi,oD=new z,Wo=new z;class aD extends zt{constructor(){super(),this.type="AudioListener",this.context=x_.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null,this.timeDelta=0,this._clock=new S_}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);const t=this.context.listener,i=this.up;if(this.timeDelta=this._clock.getDelta(),this.matrixWorld.decompose(Go,D3,oD),Wo.set(0,0,-1).applyQuaternion(D3),t.positionX){const r=this.context.currentTime+this.timeDelta;t.positionX.linearRampToValueAtTime(Go.x,r),t.positionY.linearRampToValueAtTime(Go.y,r),t.positionZ.linearRampToValueAtTime(Go.z,r),t.forwardX.linearRampToValueAtTime(Wo.x,r),t.forwardY.linearRampToValueAtTime(Wo.y,r),t.forwardZ.linearRampToValueAtTime(Wo.z,r),t.upX.linearRampToValueAtTime(i.x,r),t.upY.linearRampToValueAtTime(i.y,r),t.upZ.linearRampToValueAtTime(i.z,r)}else t.setPosition(Go.x,Go.y,Go.z),t.setOrientation(Wo.x,Wo.y,Wo.z,i.x,i.y,i.z)}}class O4 extends zt{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){console.warn("THREE.Audio: Audio is already playing.");return}if(this.hasPlaybackControl===!1){console.warn("THREE.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){console.warn("THREE.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(){if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}return this._progress=0,this.source!==null&&(this.source.stop(),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;e0){this.source.disconnect(this.filters[0]);for(let e=1,t=this.filters.length;e0&&this._mixBufferRegionAdditive(i,r,this._addIndex*t,1,t);for(let u=t,f=t+t;u!==f;++u)if(i[u]!==i[u+t]){a.setValue(i,r);break}}saveOriginalState(){const e=this.binding,t=this.buffer,i=this.valueSize,r=i*this._origIndex;e.getValue(t,r);for(let s=i,o=r;s!==o;++s)t[s]=t[r+s%i];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 i=e;i=.5)for(let o=0;o!==s;++o)e[t+o]=e[i+o]}_slerp(e,t,i,r){oi.slerpFlat(e,t,e,t,e,i,r)}_slerpAdditive(e,t,i,r,s){const o=this._workIndex*s;oi.multiplyQuaternionsFlat(e,o,e,t,e,i),oi.slerpFlat(e,t,e,t,e,o,r)}_lerp(e,t,i,r,s){const o=1-r;for(let a=0;a!==s;++a){const u=t+a;e[u]=e[u]*o+e[i+a]*r}}_lerpAdditive(e,t,i,r,s){for(let o=0;o!==s;++o){const a=t+o;e[a]=e[a]+e[i+o]*r}}}const M_="\\[\\]\\.:\\/",fD=new RegExp("["+M_+"]","g"),w_="[^"+M_+"]",hD="[^"+M_.replace("\\.","")+"]",dD=/((?:WC+[\/:])*)/.source.replace("WC",w_),pD=/(WCOD+)?/.source.replace("WCOD",hD),mD=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",w_),gD=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",w_),vD=new RegExp("^"+dD+pD+mD+gD+"$"),yD=["material","materials","bones","map"];class _D{constructor(e,t,i){const r=i||It.parseTrackName(t);this._targetGroup=e,this._bindings=e.subscribe_(t,r)}getValue(e,t){this.bind();const i=this._targetGroup.nCachedObjects_,r=this._bindings[i];r!==void 0&&r.getValue(e,t)}setValue(e,t){const i=this._bindings;for(let r=this._targetGroup.nCachedObjects_,s=i.length;r!==s;++r)i[r].setValue(e,t)}bind(){const e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,i=e.length;t!==i;++t)e[t].bind()}unbind(){const e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,i=e.length;t!==i;++t)e[t].unbind()}}class It{constructor(e,t,i){this.path=t,this.parsedPath=i||It.parseTrackName(t),this.node=It.findNode(e,this.parsedPath.nodeName),this.rootNode=e,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(e,t,i){return e&&e.isAnimationObjectGroup?new It.Composite(e,t,i):new It(e,t,i)}static sanitizeNodeName(e){return e.replace(/\s/g,"_").replace(fD,"")}static parseTrackName(e){const t=vD.exec(e);if(t===null)throw new Error("PropertyBinding: Cannot parse trackName: "+e);const i={nodeName:t[2],objectName:t[3],objectIndex:t[4],propertyName:t[5],propertyIndex:t[6]},r=i.nodeName&&i.nodeName.lastIndexOf(".");if(r!==void 0&&r!==-1){const s=i.nodeName.substring(r+1);yD.indexOf(s)!==-1&&(i.nodeName=i.nodeName.substring(0,r),i.objectName=s)}if(i.propertyName===null||i.propertyName.length===0)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+e);return i}static findNode(e,t){if(t===void 0||t===""||t==="."||t===-1||t===e.name||t===e.uuid)return e;if(e.skeleton){const i=e.skeleton.getBoneByName(t);if(i!==void 0)return i}if(e.children){const i=function(s){for(let o=0;o=s){const d=s++,p=e[d];t[p.uuid]=h,e[h]=p,t[f]=d,e[d]=u;for(let v=0,y=r;v!==y;++v){const w=i[v],S=w[d],g=w[h];w[h]=S,w[d]=g}}}this.nCachedObjects_=s}uncache(){const e=this._objects,t=this._indicesByUUID,i=this._bindings,r=i.length;let s=this.nCachedObjects_,o=e.length;for(let a=0,u=arguments.length;a!==u;++a){const f=arguments[a],h=f.uuid,d=t[h];if(d!==void 0)if(delete t[h],d0&&(t[v.uuid]=d),e[d]=v,e.pop();for(let y=0,w=r;y!==w;++y){const S=i[y];S[d]=S[p],S.pop()}}}this.nCachedObjects_=s}subscribe_(e,t){const i=this._bindingsIndicesByPath;let r=i[e];const s=this._bindings;if(r!==void 0)return s[r];const o=this._paths,a=this._parsedPaths,u=this._objects,f=u.length,h=this.nCachedObjects_,d=new Array(f);r=s.length,i[e]=r,o.push(e),a.push(t),s.push(d);for(let p=h,v=u.length;p!==v;++p){const y=u[p];d[p]=new It(y,e,t)}return d}unsubscribe_(e){const t=this._bindingsIndicesByPath,i=t[e];if(i!==void 0){const r=this._paths,s=this._parsedPaths,o=this._bindings,a=o.length-1,u=o[a],f=e[a];t[f]=i,o[i]=u,o.pop(),s[i]=s[a],s.pop(),r[i]=r[a],r.pop()}}}class F4{constructor(e,t,i=null,r=t.blendMode){this._mixer=e,this._clip=t,this._localRoot=i,this.blendMode=r;const s=t.tracks,o=s.length,a=new Array(o),u={endingStart:ia,endingEnd:ia};for(let f=0;f!==o;++f){const h=s[f].createInterpolant(null);a[f]=h,h.settings=u}this._interpolantSettings=u,this._interpolants=a,this._propertyBindings=new Array(o),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=yT,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}fadeIn(e){return this._scheduleFading(e,0,1)}fadeOut(e){return this._scheduleFading(e,1,0)}crossFadeFrom(e,t,i){if(e.fadeOut(t),this.fadeIn(t),i){const r=this._clip.duration,s=e._clip.duration,o=s/r,a=r/s;e.warp(1,o,t),this.warp(a,1,t)}return this}crossFadeTo(e,t,i){return e.crossFadeFrom(this,t,i)}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,i){const r=this._mixer,s=r.time,o=this.timeScale;let a=this._timeScaleInterpolant;a===null&&(a=r._lendControlInterpolant(),this._timeScaleInterpolant=a);const u=a.parameterPositions,f=a.sampleValues;return u[0]=s,u[1]=s+i,f[0]=e/o,f[1]=t/o,this}stopWarping(){const e=this._timeScaleInterpolant;return e!==null&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}getMixer(){return this._mixer}getClip(){return this._clip}getRoot(){return this._localRoot||this._mixer._root}_update(e,t,i,r){if(!this.enabled){this._updateWeight(e);return}const s=this._startTime;if(s!==null){const u=(e-s)*i;u<0||i===0?t=0:(this._startTime=null,t=i*u)}t*=this._updateTimeScale(e);const o=this._updateTime(t),a=this._updateWeight(e);if(a>0){const u=this._interpolants,f=this._propertyBindings;switch(this.blendMode){case Yy:for(let h=0,d=u.length;h!==d;++h)u[h].evaluate(o),f[h].accumulateAdditive(a);break;case em:default:for(let h=0,d=u.length;h!==d;++h)u[h].evaluate(o),f[h].accumulate(r,a)}}}_updateWeight(e){let t=0;if(this.enabled){t=this.weight;const i=this._weightInterpolant;if(i!==null){const r=i.evaluate(e)[0];t*=r,e>i.parameterPositions[1]&&(this.stopFading(),r===0&&(this.enabled=!1))}}return this._effectiveWeight=t,t}_updateTimeScale(e){let t=0;if(!this.paused){t=this.timeScale;const i=this._timeScaleInterpolant;if(i!==null){const r=i.evaluate(e)[0];t*=r,e>i.parameterPositions[1]&&(this.stopWarping(),t===0?this.paused=!0:this.timeScale=t)}}return this._effectiveTimeScale=t,t}_updateTime(e){const t=this._clip.duration,i=this.loop;let r=this.time+e,s=this._loopCount;const o=i===_T;if(e===0)return s===-1?r:o&&(s&1)===1?t-r:r;if(i===vT){s===-1&&(this._loopCount=0,this._setEndings(!0,!0,!1));e:{if(r>=t)r=t;else if(r<0)r=0;else{this.time=r;break e}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=r,this._mixer.dispatchEvent({type:"finished",action:this,direction:e<0?-1:1})}}else{if(s===-1&&(e>=0?(s=0,this._setEndings(!0,this.repetitions===0,o)):this._setEndings(this.repetitions===0,!0,o)),r>=t||r<0){const a=Math.floor(r/t);r-=t*a,s+=Math.abs(a);const u=this.repetitions-s;if(u<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,r=e>0?t:0,this.time=r,this._mixer.dispatchEvent({type:"finished",action:this,direction:e>0?1:-1});else{if(u===1){const f=e<0;this._setEndings(f,!f,o)}else this._setEndings(!1,!1,o);this._loopCount=s,this.time=r,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:a})}}else this.time=r;if(o&&(s&1)===1)return t-r}return r}_setEndings(e,t,i){const r=this._interpolantSettings;i?(r.endingStart=ra,r.endingEnd=ra):(e?r.endingStart=this.zeroSlopeAtStart?ra:ia:r.endingStart=Gu,t?r.endingEnd=this.zeroSlopeAtEnd?ra:ia:r.endingEnd=Gu)}_scheduleFading(e,t,i){const r=this._mixer,s=r.time;let o=this._weightInterpolant;o===null&&(o=r._lendControlInterpolant(),this._weightInterpolant=o);const a=o.parameterPositions,u=o.sampleValues;return a[0]=s,u[0]=t,a[1]=s+e,u[1]=i,this}}const SD=new Float32Array(1);class MD extends es{constructor(e){super(),this._root=e,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}_bindAction(e,t){const i=e._localRoot||this._root,r=e._clip.tracks,s=r.length,o=e._propertyBindings,a=e._interpolants,u=i.uuid,f=this._bindingsByRootAndName;let h=f[u];h===void 0&&(h={},f[u]=h);for(let d=0;d!==s;++d){const p=r[d],v=p.name;let y=h[v];if(y!==void 0)++y.referenceCount,o[d]=y;else{if(y=o[d],y!==void 0){y._cacheIndex===null&&(++y.referenceCount,this._addInactiveBinding(y,u,v));continue}const w=t&&t._propertyBindings[d].binding.parsedPath;y=new z4(It.create(i,v,w),p.ValueTypeName,p.getValueSize()),++y.referenceCount,this._addInactiveBinding(y,u,v),o[d]=y}a[d].resultBuffer=y.buffer}}_activateAction(e){if(!this._isActiveAction(e)){if(e._cacheIndex===null){const i=(e._localRoot||this._root).uuid,r=e._clip.uuid,s=this._actionsByClip[r];this._bindAction(e,s&&s.knownActions[0]),this._addInactiveAction(e,r,i)}const t=e._propertyBindings;for(let i=0,r=t.length;i!==r;++i){const s=t[i];s.useCount++===0&&(this._lendBinding(s),s.saveOriginalState())}this._lendAction(e)}}_deactivateAction(e){if(this._isActiveAction(e)){const t=e._propertyBindings;for(let i=0,r=t.length;i!==r;++i){const s=t[i];--s.useCount===0&&(s.restoreOriginalState(),this._takeBackBinding(s))}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=0;--i)e[i].stop();return this}update(e){e*=this.timeScale;const t=this._actions,i=this._nActiveActions,r=this.time+=e,s=Math.sign(e),o=this._accuIndex^=1;for(let f=0;f!==i;++f)t[f]._update(r,e,s,o);const a=this._bindings,u=this._nActiveBindings;for(let f=0;f!==u;++f)a[f].apply(o);return this}setTime(e){this.time=0;for(let t=0;tthis.max.x||e.ythis.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.xthis.max.x||e.max.ythis.max.y)}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,z3).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)}}const F3=new z,Md=new z;class RD{constructor(e=new z,t=new z){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){F3.subVectors(e,this.start),Md.subVectors(this.end,this.start);const i=Md.dot(Md);let s=Md.dot(F3)/i;return t&&(s=dn(s,0,1)),s}closestPointToPoint(e,t,i){const r=this.closestPointToPointParameter(e,t);return this.delta(i).multiplyScalar(r).add(this.start)}applyMatrix4(e){return this.start.applyMatrix4(e),this.end.applyMatrix4(e),this}equals(e){return e.start.equals(this.start)&&e.end.equals(this.end)}clone(){return new this.constructor().copy(this)}}const k3=new z;class PD extends zt{constructor(e,t){super(),this.light=e,this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=t,this.type="SpotLightHelper";const i=new St,r=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1];for(let o=0,a=1,u=32;o1)for(let d=0;d.99999)this.quaternion.set(0,0,0,1);else if(e.y<-.99999)this.quaternion.set(1,0,0,0);else{W3.set(e.z,0,-e.x).normalize();const t=Math.acos(e.y);this.quaternion.setFromAxisAngle(W3,t)}}setLength(e,t=e*.2,i=t*.2){this.line.scale.set(1,Math.max(1e-4,e-t),1),this.line.updateMatrix(),this.cone.scale.set(i,t,i),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()}}class GD extends ts{constructor(e=1){const t=[0,0,0,e,0,0,0,0,0,0,e,0,0,0,0,0,0,e],i=[1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],r=new St;r.setAttribute("position",new qe(t,3)),r.setAttribute("color",new qe(i,3));const s=new Si({vertexColors:!0,toneMapped:!1});super(r,s),this.type="AxesHelper"}setColors(e,t,i){const r=new Be,s=this.geometry.attributes.color.array;return r.set(e),r.toArray(s,0),r.toArray(s,3),r.set(t),r.toArray(s,6),r.toArray(s,9),r.set(i),r.toArray(s,12),r.toArray(s,15),this.geometry.attributes.color.needsUpdate=!0,this}dispose(){this.geometry.dispose(),this.material.dispose()}}class WD{constructor(){this.type="ShapePath",this.color=new Be,this.subPaths=[],this.currentPath=null}moveTo(e,t){return this.currentPath=new Zu,this.subPaths.push(this.currentPath),this.currentPath.moveTo(e,t),this}lineTo(e,t){return this.currentPath.lineTo(e,t),this}quadraticCurveTo(e,t,i,r){return this.currentPath.quadraticCurveTo(e,t,i,r),this}bezierCurveTo(e,t,i,r,s,o){return this.currentPath.bezierCurveTo(e,t,i,r,s,o),this}splineThru(e){return this.currentPath.splineThru(e),this}toShapes(e){function t(g){const x=[];for(let M=0,T=g.length;MNumber.EPSILON){if(R<0&&(L=x[C],b=-b,D=x[P],R=-R),g.yD.y)continue;if(g.y===L.y){if(g.x===L.x)return!0}else{const k=R*(g.x-L.x)-b*(g.y-L.y);if(k===0)return!0;if(k<0)continue;T=!T}}else{if(g.y!==L.y)continue;if(D.x<=g.x&&g.x<=L.x||L.x<=g.x&&g.x<=D.x)return!0}}return T}const r=Jr.isClockWise,s=this.subPaths;if(s.length===0)return[];let o,a,u;const f=[];if(s.length===1)return a=s[0],u=new da,u.curves=a.curves,f.push(u),f;let h=!r(s[0].getPoints());h=e?!h:h;const d=[],p=[];let v=[],y=0,w;p[y]=void 0,v[y]=[];for(let g=0,x=s.length;g1){let g=!1,x=0;for(let M=0,T=p.length;M0&&g===!1&&(v=d)}let S;for(let g=0,x=p.length;g{const d=typeof f=="function"?f(e):f;if(d!==e){const p=e;e=h?d:Object.assign({},e,d),t.forEach(v=>v(e,p))}},r=()=>e,s=(f,h=r,d=Object.is)=>{console.warn("[DEPRECATED] Please use `subscribeWithSelector` middleware");let p=h(e);function v(){const y=h(e);if(!d(p,y)){const w=p;f(p=y,w)}}return t.add(v),()=>t.delete(v)},u={setState:i,getState:r,subscribe:(f,h,d)=>h||d?s(f,h,d):(t.add(f),()=>t.delete(f)),destroy:()=>t.clear()};return e=n(i,r,u),u}const YD=typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),X3=YD?ve.useEffect:ve.useLayoutEffect;function qD(n){const e=typeof n=="function"?jD(n):n,t=(i=e.getState,r=Object.is)=>{const[,s]=ve.useReducer(S=>S+1,0),o=e.getState(),a=ve.useRef(o),u=ve.useRef(i),f=ve.useRef(r),h=ve.useRef(!1),d=ve.useRef();d.current===void 0&&(d.current=i(o));let p,v=!1;(a.current!==o||u.current!==i||f.current!==r||h.current)&&(p=i(o),v=!r(d.current,p)),X3(()=>{v&&(d.current=p),a.current=o,u.current=i,f.current=r,h.current=!1});const y=ve.useRef(o);X3(()=>{const S=()=>{try{const x=e.getState(),M=u.current(x);f.current(d.current,M)||(a.current=x,d.current=M,s())}catch{h.current=!0,s()}},g=e.subscribe(S);return e.getState()!==y.current&&S(),g},[]);const w=v?p:d.current;return ve.useDebugValue(w),w};return Object.assign(t,e),t[Symbol.iterator]=function(){console.warn("[useStore, api] = create() is deprecated and will be removed in v4");const i=[t,e];return{next(){const r=i.length<=0;return{value:i.shift(),done:r}}}},t}var V4={exports:{}},Gg={exports:{}},Wg={};/** + */Pa.ConcurrentRoot=1;Pa.ContinuousEventPriority=4;Pa.DefaultEventPriority=16;Pa.DiscreteEventPriority=1;Pa.IdleEventPriority=536870912;Pa.LegacyRoot=0;H4.exports=Pa;var Ol=H4.exports;function jD(n){let e;const t=new Set,i=(f,h)=>{const d=typeof f=="function"?f(e):f;if(d!==e){const p=e;e=h?d:Object.assign({},e,d),t.forEach(v=>v(e,p))}},r=()=>e,s=(f,h=r,d=Object.is)=>{console.warn("[DEPRECATED] Please use `subscribeWithSelector` middleware");let p=h(e);function v(){const y=h(e);if(!d(p,y)){const w=p;f(p=y,w)}}return t.add(v),()=>t.delete(v)},u={setState:i,getState:r,subscribe:(f,h,d)=>h||d?s(f,h,d):(t.add(f),()=>t.delete(f)),destroy:()=>t.clear()};return e=n(i,r,u),u}const YD=typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),X3=YD?ve.useEffect:ve.useLayoutEffect;function qD(n){const e=typeof n=="function"?jD(n):n,t=(i=e.getState,r=Object.is)=>{const[,s]=ve.useReducer(S=>S+1,0),o=e.getState(),a=ve.useRef(o),u=ve.useRef(i),f=ve.useRef(r),h=ve.useRef(!1),d=ve.useRef();d.current===void 0&&(d.current=i(o));let p,v=!1;(a.current!==o||u.current!==i||f.current!==r||h.current)&&(p=i(o),v=!r(d.current,p)),X3(()=>{v&&(d.current=p),a.current=o,u.current=i,f.current=r,h.current=!1});const y=ve.useRef(o);X3(()=>{const S=()=>{try{const x=e.getState(),M=u.current(x);f.current(d.current,M)||(a.current=x,d.current=M,s())}catch{h.current=!0,s()}},g=e.subscribe(S);return e.getState()!==y.current&&S(),g},[]);const w=v?p:d.current;return ve.useDebugValue(w),w};return Object.assign(t,e),t[Symbol.iterator]=function(){console.warn("[useStore, api] = create() is deprecated and will be removed in v4");const i=[t,e];return{next(){const r=i.length<=0;return{value:i.shift(),done:r}}}},t}var V4={exports:{}},Gg={exports:{}},Wg={};/** * @license React * scheduler.production.min.js * @@ -3746,17 +3746,17 @@ void main() { * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var JD=function(e){var t={},i=ve,r=KD(),s=Object.assign;function o(l){for(var c="https://reactjs.org/docs/error-decoder.html?invariant="+l,m=1;mj||E[F]!==A[j]){var ue=` -`+E[F].replace(" at new "," at ");return l.displayName&&ue.includes("")&&(ue=ue.replace("",l.displayName)),ue}while(1<=F&&0<=j);break}}}finally{ht=!1,Error.prepareStackTrace=m}return(l=l?l.displayName||l.name:"")?pt(l):""}var tn=Object.prototype.hasOwnProperty,Hn=[],qt=-1;function In(l){return{current:l}}function at(l){0>qt||(l.current=Hn[qt],Hn[qt]=null,qt--)}function Ge(l,c){qt++,Hn[qt]=l.current,l.current=c}var Qi={},Et=In(Qi),cn=In(!1),Dr=Qi;function $i(l,c){var m=l.type.contextTypes;if(!m)return Qi;var _=l.stateNode;if(_&&_.__reactInternalMemoizedUnmaskedChildContext===c)return _.__reactInternalMemoizedMaskedChildContext;var E={},A;for(A in m)E[A]=c[A];return _&&(l=l.stateNode,l.__reactInternalMemoizedUnmaskedChildContext=c,l.__reactInternalMemoizedMaskedChildContext=E),E}function Nn(l){return l=l.childContextTypes,l!=null}function gn(){at(cn),at(Et)}function Ur(l,c,m){if(Et.current!==Qi)throw Error(o(168));Ge(Et,c),Ge(cn,m)}function Na(l,c,m){var _=l.stateNode;if(c=c.childContextTypes,typeof _.getChildContext!="function")return m;_=_.getChildContext();for(var E in _)if(!(E in c))throw Error(o(108,D(l)||"Unknown",E));return s({},m,_)}function Vn(l){return l=(l=l.stateNode)&&l.__reactInternalMemoizedMergedChildContext||Qi,Dr=Et.current,Ge(Et,l),Ge(cn,cn.current),!0}function Da(l,c,m){var _=l.stateNode;if(!_)throw Error(o(169));m?(l=Na(l,c,Dr),_.__reactInternalMemoizedMergedChildContext=l,at(cn),at(Et),Ge(Et,l)):at(cn),Ge(cn,m)}var Di=Math.clz32?Math.clz32:_A,Af=Math.log,yA=Math.LN2;function _A(l){return l>>>=0,l===0?32:31-(Af(l)/yA|0)|0}var Cf=64,bf=4194304;function hc(l){switch(l&-l){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: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 l&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return l&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return l}}function Rf(l,c){var m=l.pendingLanes;if(m===0)return 0;var _=0,E=l.suspendedLanes,A=l.pingedLanes,F=m&268435455;if(F!==0){var j=F&~E;j!==0?_=hc(j):(A&=F,A!==0&&(_=hc(A)))}else F=m&~E,F!==0?_=hc(F):A!==0&&(_=hc(A));if(_===0)return 0;if(c!==0&&c!==_&&!(c&E)&&(E=_&-_,A=c&-c,E>=A||E===16&&(A&4194240)!==0))return c;if(_&4&&(_|=m&16),c=l.entangledLanes,c!==0)for(l=l.entanglements,c&=_;0m;m++)c.push(l);return c}function dc(l,c,m){l.pendingLanes|=c,c!==536870912&&(l.suspendedLanes=0,l.pingedLanes=0),l=l.eventTimes,c=31-Di(c),l[c]=m}function MA(l,c){var m=l.pendingLanes&~c;l.pendingLanes=c,l.suspendedLanes=0,l.pingedLanes=0,l.expiredLanes&=c,l.mutableReadLanes&=c,l.entangledLanes&=c,c=l.entanglements;var _=l.eventTimes;for(l=l.expirationTimes;0>=F,E-=F,rs=1<<32-Di(c)+E|m<Ut?(zn=vt,vt=null):zn=vt.sibling;var zt=rt(ne,vt,ce[Ut],ze);if(zt===null){vt===null&&(vt=zn);break}l&&vt&&zt.alternate===null&&c(ne,vt),K=A(zt,K,Ut),Mt===null?Je=zt:Mt.sibling=zt,Mt=zt,vt=zn}if(Ut===ce.length)return m(ne,vt),Qt&&Ro(ne,Ut),Je;if(vt===null){for(;UtUt?(zn=vt,vt=null):zn=vt.sibling;var Hs=rt(ne,vt,zt.value,ze);if(Hs===null){vt===null&&(vt=zn);break}l&&vt&&Hs.alternate===null&&c(ne,vt),K=A(Hs,K,Ut),Mt===null?Je=Hs:Mt.sibling=Hs,Mt=Hs,vt=zn}if(zt.done)return m(ne,vt),Qt&&Ro(ne,Ut),Je;if(vt===null){for(;!zt.done;Ut++,zt=ce.next())zt=gt(ne,zt.value,ze),zt!==null&&(K=A(zt,K,Ut),Mt===null?Je=zt:Mt.sibling=zt,Mt=zt);return Qt&&Ro(ne,Ut),Je}for(vt=_(ne,vt);!zt.done;Ut++,zt=ce.next())zt=Wt(vt,ne,Ut,zt.value,ze),zt!==null&&(l&&zt.alternate!==null&&vt.delete(zt.key===null?Ut:zt.key),K=A(zt,K,Ut),Mt===null?Je=zt:Mt.sibling=zt,Mt=zt);return l&&vt.forEach(function(aC){return c(ne,aC)}),Qt&&Ro(ne,Ut),Je}function ar(ne,K,ce,ze){if(typeof ce=="object"&&ce!==null&&ce.type===h&&ce.key===null&&(ce=ce.props.children),typeof ce=="object"&&ce!==null){switch(ce.$$typeof){case u:e:{for(var Je=ce.key,Mt=K;Mt!==null;){if(Mt.key===Je){if(Je=ce.type,Je===h){if(Mt.tag===7){m(ne,Mt.sibling),K=E(Mt,ce.props.children),K.return=ne,ne=K;break e}}else if(Mt.elementType===Je||typeof Je=="object"&&Je!==null&&Je.$$typeof===M&&G_(Je)===Mt.type){m(ne,Mt.sibling),K=E(Mt,ce.props),K.ref=gc(ne,Mt,ce),K.return=ne,ne=K;break e}m(ne,Mt);break}else c(ne,Mt);Mt=Mt.sibling}ce.type===h?(K=zo(ce.props.children,ne.mode,ze,ce.key),K.return=ne,ne=K):(ze=vh(ce.type,ce.key,ce.props,null,ne.mode,ze),ze.ref=gc(ne,K,ce),ze.return=ne,ne=ze)}return F(ne);case f:e:{for(Mt=ce.key;K!==null;){if(K.key===Mt)if(K.tag===4&&K.stateNode.containerInfo===ce.containerInfo&&K.stateNode.implementation===ce.implementation){m(ne,K.sibling),K=E(K,ce.children||[]),K.return=ne,ne=K;break e}else{m(ne,K);break}else c(ne,K);K=K.sibling}K=I0(ce,ne.mode,ze),K.return=ne,ne=K}return F(ne);case M:return Mt=ce._init,ar(ne,K,Mt(ce._payload),ze)}if(Q(ce))return $e(ne,K,ce,ze);if(C(ce))return Jn(ne,K,ce,ze);Bf(ne,ce)}return typeof ce=="string"&&ce!==""||typeof ce=="number"?(ce=""+ce,K!==null&&K.tag===6?(m(ne,K.sibling),K=E(K,ce),K.return=ne,ne=K):(m(ne,K),K=L0(ce,ne.mode,ze),K.return=ne,ne=K),F(ne)):m(ne,K)}return ar}var Ba=W_(!0),X_=W_(!1),vc={},ir=In(vc),yc=In(vc),Ha=In(vc);function Br(l){if(l===vc)throw Error(o(174));return l}function Zm(l,c){Ge(Ha,c),Ge(yc,l),Ge(ir,vc),l=ae(c),at(ir),Ge(ir,l)}function Va(){at(ir),at(yc),at(Ha)}function j_(l){var c=Br(Ha.current),m=Br(ir.current);c=N(m,l.type,c),m!==c&&(Ge(yc,l),Ge(ir,c))}function Km(l){yc.current===l&&(at(ir),at(yc))}var nn=In(0);function Hf(l){for(var c=l;c!==null;){if(c.tag===13){var m=c.memoizedState;if(m!==null&&(m=m.dehydrated,m===null||uc(m)||fc(m)))return c}else if(c.tag===19&&c.memoizedProps.revealOrder!==void 0){if(c.flags&128)return c}else if(c.child!==null){c.child.return=c,c=c.child;continue}if(c===l)break;for(;c.sibling===null;){if(c.return===null||c.return===l)return null;c=c.return}c.sibling.return=c.return,c=c.sibling}return null}var Jm=[];function Qm(){for(var l=0;lm?m:4,l(!0);var _=rr.transition;rr.transition={};try{l(!1),c()}finally{Dt=m,rr.transition=_}}function ox(){return Hr().memoizedState}function DA(l,c,m){var _=Fs(l);m={lane:_,action:m,hasEagerState:!1,eagerState:null,next:null},ax(l)?lx(c,m):(cx(l,c,m),m=ui(),l=sr(l,_,m),l!==null&&ux(l,c,_))}function UA(l,c,m){var _=Fs(l),E={lane:_,action:m,hasEagerState:!1,eagerState:null,next:null};if(ax(l))lx(c,E);else{cx(l,c,E);var A=l.alternate;if(l.lanes===0&&(A===null||A.lanes===0)&&(A=c.lastRenderedReducer,A!==null))try{var F=c.lastRenderedState,j=A(F,m);if(E.hasEagerState=!0,E.eagerState=j,Or(j,F))return}catch{}finally{}m=ui(),l=sr(l,_,m),l!==null&&ux(l,c,_)}}function ax(l){var c=l.alternate;return l===un||c!==null&&c===un}function lx(l,c){_c=Gf=!0;var m=l.pending;m===null?c.next=c:(c.next=m.next,m.next=c),l.pending=c}function cx(l,c,m){Sn!==null&&l.mode&1&&!(Tt&2)?(l=c.interleaved,l===null?(m.next=m,kr===null?kr=[c]:kr.push(c)):(m.next=l.next,l.next=m),c.interleaved=m):(l=c.pending,l===null?m.next=m:(m.next=l.next,l.next=m),c.pending=m)}function ux(l,c,m){if(m&4194240){var _=c.lanes;_&=l.pendingLanes,m|=_,c.lanes=m,Im(l,m)}}var qf={readContext:er,useCallback:Zn,useContext:Zn,useEffect:Zn,useImperativeHandle:Zn,useInsertionEffect:Zn,useLayoutEffect:Zn,useMemo:Zn,useReducer:Zn,useRef:Zn,useState:Zn,useDebugValue:Zn,useDeferredValue:Zn,useTransition:Zn,useMutableSource:Zn,useSyncExternalStore:Zn,useId:Zn,unstable_isNewReconciler:!1},zA={readContext:er,useCallback:function(l,c){return os().memoizedState=[l,c===void 0?null:c],l},useContext:er,useEffect:i0,useImperativeHandle:function(l,c,m){return m=m!=null?m.concat([l]):null,jf(4194308,4,nx.bind(null,c,l),m)},useLayoutEffect:function(l,c){return jf(4194308,4,l,c)},useInsertionEffect:function(l,c){return jf(4,2,l,c)},useMemo:function(l,c){var m=os();return c=c===void 0?null:c,l=l(),m.memoizedState=[l,c],l},useReducer:function(l,c,m){var _=os();return c=m!==void 0?m(c):c,_.memoizedState=_.baseState=c,l={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:l,lastRenderedState:c},_.queue=l,l=l.dispatch=DA.bind(null,un,l),[_.memoizedState,l]},useRef:function(l){var c=os();return l={current:l},c.memoizedState=l},useState:n0,useDebugValue:r0,useDeferredValue:function(l){var c=n0(l),m=c[0],_=c[1];return i0(function(){var E=rr.transition;rr.transition={};try{_(l)}finally{rr.transition=E}},[l]),m},useTransition:function(){var l=n0(!1),c=l[0];return l=NA.bind(null,l[1]),os().memoizedState=l,[c,l]},useMutableSource:function(){},useSyncExternalStore:function(l,c,m){var _=un,E=os();if(Qt){if(m===void 0)throw Error(o(407));m=m()}else{if(m=c(),Sn===null)throw Error(o(349));Ga&30||Z_(_,c,m)}E.memoizedState=m;var A={value:m,getSnapshot:c};return E.queue=A,i0(J_.bind(null,_,A,l),[l]),_.flags|=2048,Sc(9,K_.bind(null,_,A,m,c),void 0,null),m},useId:function(){var l=os(),c=Sn.identifierPrefix;if(Qt){var m=ss,_=rs;m=(_&~(1<<32-Di(_)-1)).toString(32)+m,c=":"+c+"R"+m,m=xc++,0")&&(ue=ue.replace("",l.displayName)),ue}while(1<=F&&0<=j);break}}}finally{ht=!1,Error.prepareStackTrace=m}return(l=l?l.displayName||l.name:"")?pt(l):""}var tn=Object.prototype.hasOwnProperty,Hn=[],qt=-1;function In(l){return{current:l}}function at(l){0>qt||(l.current=Hn[qt],Hn[qt]=null,qt--)}function Ge(l,c){qt++,Hn[qt]=l.current,l.current=c}var Qi={},Et=In(Qi),cn=In(!1),Dr=Qi;function $i(l,c){var m=l.type.contextTypes;if(!m)return Qi;var _=l.stateNode;if(_&&_.__reactInternalMemoizedUnmaskedChildContext===c)return _.__reactInternalMemoizedMaskedChildContext;var E={},A;for(A in m)E[A]=c[A];return _&&(l=l.stateNode,l.__reactInternalMemoizedUnmaskedChildContext=c,l.__reactInternalMemoizedMaskedChildContext=E),E}function Nn(l){return l=l.childContextTypes,l!=null}function gn(){at(cn),at(Et)}function Ur(l,c,m){if(Et.current!==Qi)throw Error(o(168));Ge(Et,c),Ge(cn,m)}function Na(l,c,m){var _=l.stateNode;if(c=c.childContextTypes,typeof _.getChildContext!="function")return m;_=_.getChildContext();for(var E in _)if(!(E in c))throw Error(o(108,D(l)||"Unknown",E));return s({},m,_)}function Vn(l){return l=(l=l.stateNode)&&l.__reactInternalMemoizedMergedChildContext||Qi,Dr=Et.current,Ge(Et,l),Ge(cn,cn.current),!0}function Da(l,c,m){var _=l.stateNode;if(!_)throw Error(o(169));m?(l=Na(l,c,Dr),_.__reactInternalMemoizedMergedChildContext=l,at(cn),at(Et),Ge(Et,l)):at(cn),Ge(cn,m)}var Di=Math.clz32?Math.clz32:_A,Af=Math.log,yA=Math.LN2;function _A(l){return l>>>=0,l===0?32:31-(Af(l)/yA|0)|0}var Cf=64,bf=4194304;function hc(l){switch(l&-l){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: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 l&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return l&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return l}}function Rf(l,c){var m=l.pendingLanes;if(m===0)return 0;var _=0,E=l.suspendedLanes,A=l.pingedLanes,F=m&268435455;if(F!==0){var j=F&~E;j!==0?_=hc(j):(A&=F,A!==0&&(_=hc(A)))}else F=m&~E,F!==0?_=hc(F):A!==0&&(_=hc(A));if(_===0)return 0;if(c!==0&&c!==_&&!(c&E)&&(E=_&-_,A=c&-c,E>=A||E===16&&(A&4194240)!==0))return c;if(_&4&&(_|=m&16),c=l.entangledLanes,c!==0)for(l=l.entanglements,c&=_;0m;m++)c.push(l);return c}function dc(l,c,m){l.pendingLanes|=c,c!==536870912&&(l.suspendedLanes=0,l.pingedLanes=0),l=l.eventTimes,c=31-Di(c),l[c]=m}function MA(l,c){var m=l.pendingLanes&~c;l.pendingLanes=c,l.suspendedLanes=0,l.pingedLanes=0,l.expiredLanes&=c,l.mutableReadLanes&=c,l.entangledLanes&=c,c=l.entanglements;var _=l.eventTimes;for(l=l.expirationTimes;0>=F,E-=F,rs=1<<32-Di(c)+E|m<Ut?(On=vt,vt=null):On=vt.sibling;var Ot=rt(ne,vt,ce[Ut],Oe);if(Ot===null){vt===null&&(vt=On);break}l&&vt&&Ot.alternate===null&&c(ne,vt),K=A(Ot,K,Ut),Mt===null?Je=Ot:Mt.sibling=Ot,Mt=Ot,vt=On}if(Ut===ce.length)return m(ne,vt),Qt&&Ro(ne,Ut),Je;if(vt===null){for(;UtUt?(On=vt,vt=null):On=vt.sibling;var Hs=rt(ne,vt,Ot.value,Oe);if(Hs===null){vt===null&&(vt=On);break}l&&vt&&Hs.alternate===null&&c(ne,vt),K=A(Hs,K,Ut),Mt===null?Je=Hs:Mt.sibling=Hs,Mt=Hs,vt=On}if(Ot.done)return m(ne,vt),Qt&&Ro(ne,Ut),Je;if(vt===null){for(;!Ot.done;Ut++,Ot=ce.next())Ot=gt(ne,Ot.value,Oe),Ot!==null&&(K=A(Ot,K,Ut),Mt===null?Je=Ot:Mt.sibling=Ot,Mt=Ot);return Qt&&Ro(ne,Ut),Je}for(vt=_(ne,vt);!Ot.done;Ut++,Ot=ce.next())Ot=Wt(vt,ne,Ut,Ot.value,Oe),Ot!==null&&(l&&Ot.alternate!==null&&vt.delete(Ot.key===null?Ut:Ot.key),K=A(Ot,K,Ut),Mt===null?Je=Ot:Mt.sibling=Ot,Mt=Ot);return l&&vt.forEach(function(aC){return c(ne,aC)}),Qt&&Ro(ne,Ut),Je}function ar(ne,K,ce,Oe){if(typeof ce=="object"&&ce!==null&&ce.type===h&&ce.key===null&&(ce=ce.props.children),typeof ce=="object"&&ce!==null){switch(ce.$$typeof){case u:e:{for(var Je=ce.key,Mt=K;Mt!==null;){if(Mt.key===Je){if(Je=ce.type,Je===h){if(Mt.tag===7){m(ne,Mt.sibling),K=E(Mt,ce.props.children),K.return=ne,ne=K;break e}}else if(Mt.elementType===Je||typeof Je=="object"&&Je!==null&&Je.$$typeof===M&&G_(Je)===Mt.type){m(ne,Mt.sibling),K=E(Mt,ce.props),K.ref=gc(ne,Mt,ce),K.return=ne,ne=K;break e}m(ne,Mt);break}else c(ne,Mt);Mt=Mt.sibling}ce.type===h?(K=Oo(ce.props.children,ne.mode,Oe,ce.key),K.return=ne,ne=K):(Oe=vh(ce.type,ce.key,ce.props,null,ne.mode,Oe),Oe.ref=gc(ne,K,ce),Oe.return=ne,ne=Oe)}return F(ne);case f:e:{for(Mt=ce.key;K!==null;){if(K.key===Mt)if(K.tag===4&&K.stateNode.containerInfo===ce.containerInfo&&K.stateNode.implementation===ce.implementation){m(ne,K.sibling),K=E(K,ce.children||[]),K.return=ne,ne=K;break e}else{m(ne,K);break}else c(ne,K);K=K.sibling}K=I0(ce,ne.mode,Oe),K.return=ne,ne=K}return F(ne);case M:return Mt=ce._init,ar(ne,K,Mt(ce._payload),Oe)}if(Q(ce))return $e(ne,K,ce,Oe);if(C(ce))return Jn(ne,K,ce,Oe);Bf(ne,ce)}return typeof ce=="string"&&ce!==""||typeof ce=="number"?(ce=""+ce,K!==null&&K.tag===6?(m(ne,K.sibling),K=E(K,ce),K.return=ne,ne=K):(m(ne,K),K=L0(ce,ne.mode,Oe),K.return=ne,ne=K),F(ne)):m(ne,K)}return ar}var Ba=W_(!0),X_=W_(!1),vc={},ir=In(vc),yc=In(vc),Ha=In(vc);function Br(l){if(l===vc)throw Error(o(174));return l}function Zm(l,c){Ge(Ha,c),Ge(yc,l),Ge(ir,vc),l=ae(c),at(ir),Ge(ir,l)}function Va(){at(ir),at(yc),at(Ha)}function j_(l){var c=Br(Ha.current),m=Br(ir.current);c=N(m,l.type,c),m!==c&&(Ge(yc,l),Ge(ir,c))}function Km(l){yc.current===l&&(at(ir),at(yc))}var nn=In(0);function Hf(l){for(var c=l;c!==null;){if(c.tag===13){var m=c.memoizedState;if(m!==null&&(m=m.dehydrated,m===null||uc(m)||fc(m)))return c}else if(c.tag===19&&c.memoizedProps.revealOrder!==void 0){if(c.flags&128)return c}else if(c.child!==null){c.child.return=c,c=c.child;continue}if(c===l)break;for(;c.sibling===null;){if(c.return===null||c.return===l)return null;c=c.return}c.sibling.return=c.return,c=c.sibling}return null}var Jm=[];function Qm(){for(var l=0;lm?m:4,l(!0);var _=rr.transition;rr.transition={};try{l(!1),c()}finally{Dt=m,rr.transition=_}}function ox(){return Hr().memoizedState}function DA(l,c,m){var _=Fs(l);m={lane:_,action:m,hasEagerState:!1,eagerState:null,next:null},ax(l)?lx(c,m):(cx(l,c,m),m=ui(),l=sr(l,_,m),l!==null&&ux(l,c,_))}function UA(l,c,m){var _=Fs(l),E={lane:_,action:m,hasEagerState:!1,eagerState:null,next:null};if(ax(l))lx(c,E);else{cx(l,c,E);var A=l.alternate;if(l.lanes===0&&(A===null||A.lanes===0)&&(A=c.lastRenderedReducer,A!==null))try{var F=c.lastRenderedState,j=A(F,m);if(E.hasEagerState=!0,E.eagerState=j,zr(j,F))return}catch{}finally{}m=ui(),l=sr(l,_,m),l!==null&&ux(l,c,_)}}function ax(l){var c=l.alternate;return l===un||c!==null&&c===un}function lx(l,c){_c=Gf=!0;var m=l.pending;m===null?c.next=c:(c.next=m.next,m.next=c),l.pending=c}function cx(l,c,m){Sn!==null&&l.mode&1&&!(Tt&2)?(l=c.interleaved,l===null?(m.next=m,kr===null?kr=[c]:kr.push(c)):(m.next=l.next,l.next=m),c.interleaved=m):(l=c.pending,l===null?m.next=m:(m.next=l.next,l.next=m),c.pending=m)}function ux(l,c,m){if(m&4194240){var _=c.lanes;_&=l.pendingLanes,m|=_,c.lanes=m,Im(l,m)}}var qf={readContext:er,useCallback:Zn,useContext:Zn,useEffect:Zn,useImperativeHandle:Zn,useInsertionEffect:Zn,useLayoutEffect:Zn,useMemo:Zn,useReducer:Zn,useRef:Zn,useState:Zn,useDebugValue:Zn,useDeferredValue:Zn,useTransition:Zn,useMutableSource:Zn,useSyncExternalStore:Zn,useId:Zn,unstable_isNewReconciler:!1},OA={readContext:er,useCallback:function(l,c){return os().memoizedState=[l,c===void 0?null:c],l},useContext:er,useEffect:i0,useImperativeHandle:function(l,c,m){return m=m!=null?m.concat([l]):null,jf(4194308,4,nx.bind(null,c,l),m)},useLayoutEffect:function(l,c){return jf(4194308,4,l,c)},useInsertionEffect:function(l,c){return jf(4,2,l,c)},useMemo:function(l,c){var m=os();return c=c===void 0?null:c,l=l(),m.memoizedState=[l,c],l},useReducer:function(l,c,m){var _=os();return c=m!==void 0?m(c):c,_.memoizedState=_.baseState=c,l={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:l,lastRenderedState:c},_.queue=l,l=l.dispatch=DA.bind(null,un,l),[_.memoizedState,l]},useRef:function(l){var c=os();return l={current:l},c.memoizedState=l},useState:n0,useDebugValue:r0,useDeferredValue:function(l){var c=n0(l),m=c[0],_=c[1];return i0(function(){var E=rr.transition;rr.transition={};try{_(l)}finally{rr.transition=E}},[l]),m},useTransition:function(){var l=n0(!1),c=l[0];return l=NA.bind(null,l[1]),os().memoizedState=l,[c,l]},useMutableSource:function(){},useSyncExternalStore:function(l,c,m){var _=un,E=os();if(Qt){if(m===void 0)throw Error(o(407));m=m()}else{if(m=c(),Sn===null)throw Error(o(349));Ga&30||Z_(_,c,m)}E.memoizedState=m;var A={value:m,getSnapshot:c};return E.queue=A,i0(J_.bind(null,_,A,l),[l]),_.flags|=2048,Sc(9,K_.bind(null,_,A,m,c),void 0,null),m},useId:function(){var l=os(),c=Sn.identifierPrefix;if(Qt){var m=ss,_=rs;m=(_&~(1<<32-Di(_)-1)).toString(32)+m,c=":"+c+"R"+m,m=xc++,0w0&&(c.flags|=128,_=!0,Tc(E,!1),c.lanes=4194304)}else{if(!_)if(l=Hf(A),l!==null){if(c.flags|=128,_=!0,l=l.updateQueue,l!==null&&(c.updateQueue=l,c.flags|=4),Tc(E,!0),E.tail===null&&E.tailMode==="hidden"&&!A.alternate&&!Qt)return Kn(c),null}else 2*Dn()-E.renderingStartTime>w0&&m!==1073741824&&(c.flags|=128,_=!0,Tc(E,!1),c.lanes=4194304);E.isBackwards?(A.sibling=c.child,c.child=A):(l=E.last,l!==null?l.sibling=A:c.child=A,E.last=A)}return E.tail!==null?(c=E.tail,E.rendering=c,E.tail=c.sibling,E.renderingStartTime=Dn(),c.sibling=null,l=nn.current,Ge(nn,_?l&1|2:l&1),c):(Kn(c),null);case 22:case 23:return b0(),_=c.memoizedState!==null,l!==null&&l.memoizedState!==null!==_&&(c.flags|=8192),_&&c.mode&1?Fi&1073741824&&(Kn(c),Ke&&c.subtreeFlags&6&&(c.flags|=8192)):Kn(c),null;case 24:return null;case 25:return null}throw Error(o(156,c.tag))}var HA=a.ReactCurrentOwner,Oi=!1;function ci(l,c,m,_){c.child=l===null?X_(c,null,m,_):Ba(c,l.child,m,_)}function yx(l,c,m,_,E){m=m.render;var A=c.ref;return za(c,E),_=e0(l,c,m,_,A,E),m=t0(),l!==null&&!Oi?(c.updateQueue=l.updateQueue,c.flags&=-2053,l.lanes&=~E,as(l,c,E)):(Qt&&m&&Wm(c),c.flags|=1,ci(l,c,_,E),c.child)}function _x(l,c,m,_,E){if(l===null){var A=m.type;return typeof A=="function"&&!P0(A)&&A.defaultProps===void 0&&m.compare===null&&m.defaultProps===void 0?(c.tag=15,c.type=A,xx(l,c,A,_,E)):(l=vh(m.type,null,_,c,c.mode,E),l.ref=c.ref,l.return=c,c.child=l)}if(A=l.child,!(l.lanes&E)){var F=A.memoizedProps;if(m=m.compare,m=m!==null?m:If,m(F,_)&&l.ref===c.ref)return as(l,c,E)}return c.flags|=1,l=Bs(A,_),l.ref=c.ref,l.return=c,c.child=l}function xx(l,c,m,_,E){if(l!==null&&If(l.memoizedProps,_)&&l.ref===c.ref)if(Oi=!1,(l.lanes&E)!==0)l.flags&131072&&(Oi=!0);else return c.lanes=l.lanes,as(l,c,E);return a0(l,c,m,_,E)}function Sx(l,c,m){var _=c.pendingProps,E=_.children,A=l!==null?l.memoizedState:null;if(_.mode==="hidden")if(!(c.mode&1))c.memoizedState={baseLanes:0,cachePool:null},Ge(Wa,Fi),Fi|=m;else if(m&1073741824)c.memoizedState={baseLanes:0,cachePool:null},_=A!==null?A.baseLanes:m,Ge(Wa,Fi),Fi|=_;else return l=A!==null?A.baseLanes|m:m,c.lanes=c.childLanes=1073741824,c.memoizedState={baseLanes:l,cachePool:null},c.updateQueue=null,Ge(Wa,Fi),Fi|=l,null;else A!==null?(_=A.baseLanes|m,c.memoizedState=null):_=m,Ge(Wa,Fi),Fi|=_;return ci(l,c,E,m),c.child}function Mx(l,c){var m=c.ref;(l===null&&m!==null||l!==null&&l.ref!==m)&&(c.flags|=512,c.flags|=2097152)}function a0(l,c,m,_,E){var A=Nn(m)?Dr:Et.current;return A=$i(c,A),za(c,E),m=e0(l,c,m,_,A,E),_=t0(),l!==null&&!Oi?(c.updateQueue=l.updateQueue,c.flags&=-2053,l.lanes&=~E,as(l,c,E)):(Qt&&_&&Wm(c),c.flags|=1,ci(l,c,m,E),c.child)}function wx(l,c,m,_,E){if(Nn(m)){var A=!0;Vn(c)}else A=!1;if(za(c,E),c.stateNode===null)l!==null&&(l.alternate=null,c.alternate=null,c.flags|=2),O_(c,m,_),Gm(c,m,_,E),_=!0;else if(l===null){var F=c.stateNode,j=c.memoizedProps;F.props=j;var ue=F.context,be=m.contextType;typeof be=="object"&&be!==null?be=er(be):(be=Nn(m)?Dr:Et.current,be=$i(c,be));var We=m.getDerivedStateFromProps,gt=typeof We=="function"||typeof F.getSnapshotBeforeUpdate=="function";gt||typeof F.UNSAFE_componentWillReceiveProps!="function"&&typeof F.componentWillReceiveProps!="function"||(j!==_||ue!==be)&&F_(c,F,_,be),Ds=!1;var rt=c.memoizedState;F.state=rt,zf(c,_,F,E),ue=c.memoizedState,j!==_||rt!==ue||cn.current||Ds?(typeof We=="function"&&(Vm(c,m,We,_),ue=c.memoizedState),(j=Ds||z_(c,m,j,_,rt,ue,be))?(gt||typeof F.UNSAFE_componentWillMount!="function"&&typeof F.componentWillMount!="function"||(typeof F.componentWillMount=="function"&&F.componentWillMount(),typeof F.UNSAFE_componentWillMount=="function"&&F.UNSAFE_componentWillMount()),typeof F.componentDidMount=="function"&&(c.flags|=4194308)):(typeof F.componentDidMount=="function"&&(c.flags|=4194308),c.memoizedProps=_,c.memoizedState=ue),F.props=_,F.state=ue,F.context=be,_=j):(typeof F.componentDidMount=="function"&&(c.flags|=4194308),_=!1)}else{F=c.stateNode,I_(l,c),j=c.memoizedProps,be=c.type===c.elementType?j:vr(c.type,j),F.props=be,gt=c.pendingProps,rt=F.context,ue=m.contextType,typeof ue=="object"&&ue!==null?ue=er(ue):(ue=Nn(m)?Dr:Et.current,ue=$i(c,ue));var Wt=m.getDerivedStateFromProps;(We=typeof Wt=="function"||typeof F.getSnapshotBeforeUpdate=="function")||typeof F.UNSAFE_componentWillReceiveProps!="function"&&typeof F.componentWillReceiveProps!="function"||(j!==gt||rt!==ue)&&F_(c,F,_,ue),Ds=!1,rt=c.memoizedState,F.state=rt,zf(c,_,F,E);var $e=c.memoizedState;j!==gt||rt!==$e||cn.current||Ds?(typeof Wt=="function"&&(Vm(c,m,Wt,_),$e=c.memoizedState),(be=Ds||z_(c,m,be,_,rt,$e,ue)||!1)?(We||typeof F.UNSAFE_componentWillUpdate!="function"&&typeof F.componentWillUpdate!="function"||(typeof F.componentWillUpdate=="function"&&F.componentWillUpdate(_,$e,ue),typeof F.UNSAFE_componentWillUpdate=="function"&&F.UNSAFE_componentWillUpdate(_,$e,ue)),typeof F.componentDidUpdate=="function"&&(c.flags|=4),typeof F.getSnapshotBeforeUpdate=="function"&&(c.flags|=1024)):(typeof F.componentDidUpdate!="function"||j===l.memoizedProps&&rt===l.memoizedState||(c.flags|=4),typeof F.getSnapshotBeforeUpdate!="function"||j===l.memoizedProps&&rt===l.memoizedState||(c.flags|=1024),c.memoizedProps=_,c.memoizedState=$e),F.props=_,F.state=$e,F.context=ue,_=be):(typeof F.componentDidUpdate!="function"||j===l.memoizedProps&&rt===l.memoizedState||(c.flags|=4),typeof F.getSnapshotBeforeUpdate!="function"||j===l.memoizedProps&&rt===l.memoizedState||(c.flags|=1024),_=!1)}return l0(l,c,m,_,A,E)}function l0(l,c,m,_,E,A){Mx(l,c);var F=(c.flags&128)!==0;if(!_&&!F)return E&&Da(c,m,!1),as(l,c,A);_=c.stateNode,HA.current=c;var j=F&&typeof m.getDerivedStateFromError!="function"?null:_.render();return c.flags|=1,l!==null&&F?(c.child=Ba(c,l.child,null,A),c.child=Ba(c,null,j,A)):ci(l,c,j,A),c.memoizedState=_.state,E&&Da(c,m,!0),c.child}function Ex(l){var c=l.stateNode;c.pendingContext?Ur(l,c.pendingContext,c.pendingContext!==c.context):c.context&&Ur(l,c.context,!1),Zm(l,c.containerInfo)}function Tx(l,c,m,_,E){return ka(),qm(E),c.flags|=256,ci(l,c,m,_),c.child}var Jf={dehydrated:null,treeContext:null,retryLane:0};function Qf(l){return{baseLanes:l,cachePool:null}}function Ax(l,c,m){var _=c.pendingProps,E=nn.current,A=!1,F=(c.flags&128)!==0,j;if((j=F)||(j=l!==null&&l.memoizedState===null?!1:(E&2)!==0),j?(A=!0,c.flags&=-129):(l===null||l.memoizedState!==null)&&(E|=1),Ge(nn,E&1),l===null)return Ym(c),l=c.memoizedState,l!==null&&(l=l.dehydrated,l!==null)?(c.mode&1?fc(l)?c.lanes=8:c.lanes=1073741824:c.lanes=1,null):(E=_.children,l=_.fallback,A?(_=c.mode,A=c.child,E={mode:"hidden",children:E},!(_&1)&&A!==null?(A.childLanes=0,A.pendingProps=E):A=yh(E,_,0,null),l=zo(l,_,m,null),A.return=c,l.return=c,A.sibling=l,c.child=A,c.child.memoizedState=Qf(m),c.memoizedState=Jf,l):c0(c,E));if(E=l.memoizedState,E!==null){if(j=E.dehydrated,j!==null){if(F)return c.flags&256?(c.flags&=-257,$f(l,c,m,Error(o(422)))):c.memoizedState!==null?(c.child=l.child,c.flags|=128,null):(A=_.fallback,E=c.mode,_=yh({mode:"visible",children:_.children},E,0,null),A=zo(A,E,m,null),A.flags|=2,_.return=c,A.return=c,_.sibling=A,c.child=_,c.mode&1&&Ba(c,l.child,null,m),c.child.memoizedState=Qf(m),c.memoizedState=Jf,A);if(!(c.mode&1))c=$f(l,c,m,null);else if(fc(j))c=$f(l,c,m,Error(o(419)));else if(_=(m&l.childLanes)!==0,Oi||_){if(_=Sn,_!==null){switch(m&-m){case 4:A=2;break;case 16:A=8;break;case 64: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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:A=32;break;case 536870912:A=268435456;break;default:A=0}_=A&(_.suspendedLanes|m)?0:A,_!==0&&_!==E.retryLane&&(E.retryLane=_,sr(l,_,-1))}R0(),c=$f(l,c,m,Error(o(421)))}else uc(j)?(c.flags|=128,c.child=l.child,c=eC.bind(null,l),La(j,c),c=null):(m=E.treeContext,we&&(zi=Tf(j),Ui=c,Qt=!0,yr=null,pc=!1,m!==null&&(tr[nr++]=rs,tr[nr++]=ss,tr[nr++]=bo,rs=m.id,ss=m.overflow,bo=c)),c=c0(c,c.pendingProps.children),c.flags|=4096);return c}return A?(_=bx(l,c,_.children,_.fallback,m),A=c.child,E=l.child.memoizedState,A.memoizedState=E===null?Qf(m):{baseLanes:E.baseLanes|m,cachePool:null},A.childLanes=l.childLanes&~m,c.memoizedState=Jf,_):(m=Cx(l,c,_.children,m),c.memoizedState=null,m)}return A?(_=bx(l,c,_.children,_.fallback,m),A=c.child,E=l.child.memoizedState,A.memoizedState=E===null?Qf(m):{baseLanes:E.baseLanes|m,cachePool:null},A.childLanes=l.childLanes&~m,c.memoizedState=Jf,_):(m=Cx(l,c,_.children,m),c.memoizedState=null,m)}function c0(l,c){return c=yh({mode:"visible",children:c},l.mode,0,null),c.return=l,l.child=c}function Cx(l,c,m,_){var E=l.child;return l=E.sibling,m=Bs(E,{mode:"visible",children:m}),!(c.mode&1)&&(m.lanes=_),m.return=c,m.sibling=null,l!==null&&(_=c.deletions,_===null?(c.deletions=[l],c.flags|=16):_.push(l)),c.child=m}function bx(l,c,m,_,E){var A=c.mode;l=l.child;var F=l.sibling,j={mode:"hidden",children:m};return!(A&1)&&c.child!==l?(m=c.child,m.childLanes=0,m.pendingProps=j,c.deletions=null):(m=Bs(l,j),m.subtreeFlags=l.subtreeFlags&14680064),F!==null?_=Bs(F,_):(_=zo(_,A,E,null),_.flags|=2),_.return=c,m.return=c,m.sibling=_,c.child=m,_}function $f(l,c,m,_){return _!==null&&qm(_),Ba(c,l.child,null,m),l=c0(c,c.pendingProps.children),l.flags|=2,c.memoizedState=null,l}function Rx(l,c,m){l.lanes|=c;var _=l.alternate;_!==null&&(_.lanes|=c),Bm(l.return,c,m)}function u0(l,c,m,_,E){var A=l.memoizedState;A===null?l.memoizedState={isBackwards:c,rendering:null,renderingStartTime:0,last:_,tail:m,tailMode:E}:(A.isBackwards=c,A.rendering=null,A.renderingStartTime=0,A.last=_,A.tail=m,A.tailMode=E)}function Px(l,c,m){var _=c.pendingProps,E=_.revealOrder,A=_.tail;if(ci(l,c,_.children,m),_=nn.current,_&2)_=_&1|2,c.flags|=128;else{if(l!==null&&l.flags&128)e:for(l=c.child;l!==null;){if(l.tag===13)l.memoizedState!==null&&Rx(l,m,c);else if(l.tag===19)Rx(l,m,c);else if(l.child!==null){l.child.return=l,l=l.child;continue}if(l===c)break e;for(;l.sibling===null;){if(l.return===null||l.return===c)break e;l=l.return}l.sibling.return=l.return,l=l.sibling}_&=1}if(Ge(nn,_),!(c.mode&1))c.memoizedState=null;else switch(E){case"forwards":for(m=c.child,E=null;m!==null;)l=m.alternate,l!==null&&Hf(l)===null&&(E=m),m=m.sibling;m=E,m===null?(E=c.child,c.child=null):(E=m.sibling,m.sibling=null),u0(c,!1,E,m,A);break;case"backwards":for(m=null,E=c.child,c.child=null;E!==null;){if(l=E.alternate,l!==null&&Hf(l)===null){c.child=E;break}l=E.sibling,E.sibling=m,m=E,E=l}u0(c,!0,m,null,A);break;case"together":u0(c,!1,null,null,void 0);break;default:c.memoizedState=null}return c.child}function as(l,c,m){if(l!==null&&(c.dependencies=l.dependencies),Xa|=c.lanes,!(m&c.childLanes))return null;if(l!==null&&c.child!==l.child)throw Error(o(153));if(c.child!==null){for(l=c.child,m=Bs(l,l.pendingProps),c.child=m,m.return=c;l.sibling!==null;)l=l.sibling,m=m.sibling=Bs(l,l.pendingProps),m.return=c;m.sibling=null}return c.child}function VA(l,c,m){switch(c.tag){case 3:Ex(c),ka();break;case 5:j_(c);break;case 1:Nn(c.type)&&Vn(c);break;case 4:Zm(c,c.stateNode.containerInfo);break;case 10:L_(c,c.type._context,c.memoizedProps.value);break;case 13:var _=c.memoizedState;if(_!==null)return _.dehydrated!==null?(Ge(nn,nn.current&1),c.flags|=128,null):m&c.child.childLanes?Ax(l,c,m):(Ge(nn,nn.current&1),l=as(l,c,m),l!==null?l.sibling:null);Ge(nn,nn.current&1);break;case 19:if(_=(m&c.childLanes)!==0,l.flags&128){if(_)return Px(l,c,m);c.flags|=128}var E=c.memoizedState;if(E!==null&&(E.rendering=null,E.tail=null,E.lastEffect=null),Ge(nn,nn.current),_)break;return null;case 22:case 23:return c.lanes=0,Sx(l,c,m)}return as(l,c,m)}function GA(l,c){switch(Xm(c),c.tag){case 1:return Nn(c.type)&&gn(),l=c.flags,l&65536?(c.flags=l&-65537|128,c):null;case 3:return Va(),at(cn),at(Et),Qm(),l=c.flags,l&65536&&!(l&128)?(c.flags=l&-65537|128,c):null;case 5:return Km(c),null;case 13:if(at(nn),l=c.memoizedState,l!==null&&l.dehydrated!==null){if(c.alternate===null)throw Error(o(340));ka()}return l=c.flags,l&65536?(c.flags=l&-65537|128,c):null;case 19:return at(nn),null;case 4:return Va(),null;case 10:return km(c.type._context),null;case 22:case 23:return b0(),null;case 24:return null;default:return null}}var eh=!1,Lo=!1,WA=typeof WeakSet=="function"?WeakSet:Set,De=null;function th(l,c){var m=l.ref;if(m!==null)if(typeof m=="function")try{m(null)}catch(_){Ei(l,c,_)}else m.current=null}function f0(l,c,m){try{m()}catch(_){Ei(l,c,_)}}var Lx=!1;function XA(l,c){for(B(l.containerInfo),De=c;De!==null;)if(l=De,c=l.child,(l.subtreeFlags&1028)!==0&&c!==null)c.return=l,De=c;else for(;De!==null;){l=De;try{var m=l.alternate;if(l.flags&1024)switch(l.tag){case 0:case 11:case 15:break;case 1:if(m!==null){var _=m.memoizedProps,E=m.memoizedState,A=l.stateNode,F=A.getSnapshotBeforeUpdate(l.elementType===l.type?_:vr(l.type,_),E);A.__reactInternalSnapshotBeforeUpdate=F}break;case 3:Ke&&Re(l.stateNode.containerInfo);break;case 5:case 6:case 4:case 17:break;default:throw Error(o(163))}}catch(j){Ei(l,l.return,j)}if(c=l.sibling,c!==null){c.return=l.return,De=c;break}De=l.return}return m=Lx,Lx=!1,m}function Io(l,c,m){var _=c.updateQueue;if(_=_!==null?_.lastEffect:null,_!==null){var E=_=_.next;do{if((E.tag&l)===l){var A=E.destroy;E.destroy=void 0,A!==void 0&&f0(c,m,A)}E=E.next}while(E!==_)}}function Ac(l,c){if(c=c.updateQueue,c=c!==null?c.lastEffect:null,c!==null){var m=c=c.next;do{if((m.tag&l)===l){var _=m.create;m.destroy=_()}m=m.next}while(m!==c)}}function h0(l){var c=l.ref;if(c!==null){var m=l.stateNode;switch(l.tag){case 5:l=te(m);break;default:l=m}typeof c=="function"?c(l):c.current=l}}function Ix(l,c,m){if(zr&&typeof zr.onCommitFiberUnmount=="function")try{zr.onCommitFiberUnmount(Pf,c)}catch{}switch(c.tag){case 0:case 11:case 14:case 15:if(l=c.updateQueue,l!==null&&(l=l.lastEffect,l!==null)){var _=l=l.next;do{var E=_,A=E.destroy;E=E.tag,A!==void 0&&(E&2||E&4)&&f0(c,m,A),_=_.next}while(_!==l)}break;case 1:if(th(c,m),l=c.stateNode,typeof l.componentWillUnmount=="function")try{l.props=c.memoizedProps,l.state=c.memoizedState,l.componentWillUnmount()}catch(F){Ei(c,m,F)}break;case 5:th(c,m);break;case 4:Ke?Fx(l,c,m):G&&G&&(c=c.stateNode.containerInfo,m=it(c),Rt(c,m))}}function Nx(l,c,m){for(var _=c;;)if(Ix(l,_,m),_.child===null||Ke&&_.tag===4){if(_===c)break;for(;_.sibling===null;){if(_.return===null||_.return===c)return;_=_.return}_.sibling.return=_.return,_=_.sibling}else _.child.return=_,_=_.child}function Dx(l){var c=l.alternate;c!==null&&(l.alternate=null,Dx(c)),l.child=null,l.deletions=null,l.sibling=null,l.tag===5&&(c=l.stateNode,c!==null&&Ze(c)),l.stateNode=null,l.return=null,l.dependencies=null,l.memoizedProps=null,l.memoizedState=null,l.pendingProps=null,l.stateNode=null,l.updateQueue=null}function Ux(l){return l.tag===5||l.tag===3||l.tag===4}function zx(l){e:for(;;){for(;l.sibling===null;){if(l.return===null||Ux(l.return))return null;l=l.return}for(l.sibling.return=l.return,l=l.sibling;l.tag!==5&&l.tag!==6&&l.tag!==18;){if(l.flags&2||l.child===null||l.tag===4)continue e;l.child.return=l,l=l.child}if(!(l.flags&2))return l.stateNode}}function Ox(l){if(Ke){e:{for(var c=l.return;c!==null;){if(Ux(c))break e;c=c.return}throw Error(o(160))}var m=c;switch(m.tag){case 5:c=m.stateNode,m.flags&32&&(ge(c),m.flags&=-33),m=zx(l),p0(l,m,c);break;case 3:case 4:c=m.stateNode.containerInfo,m=zx(l),d0(l,m,c);break;default:throw Error(o(161))}}}function d0(l,c,m){var _=l.tag;if(_===5||_===6)l=l.stateNode,c?et(m,l,c):dt(m,l);else if(_!==4&&(l=l.child,l!==null))for(d0(l,c,m),l=l.sibling;l!==null;)d0(l,c,m),l=l.sibling}function p0(l,c,m){var _=l.tag;if(_===5||_===6)l=l.stateNode,c?ct(m,l,c):tt(m,l);else if(_!==4&&(l=l.child,l!==null))for(p0(l,c,m),l=l.sibling;l!==null;)p0(l,c,m),l=l.sibling}function Fx(l,c,m){for(var _=c,E=!1,A,F;;){if(!E){E=_.return;e:for(;;){if(E===null)throw Error(o(160));switch(A=E.stateNode,E.tag){case 5:F=!1;break e;case 3:A=A.containerInfo,F=!0;break e;case 4:A=A.containerInfo,F=!0;break e}E=E.return}E=!0}if(_.tag===5||_.tag===6)Nx(l,_,m),F?X(A,_.stateNode):He(A,_.stateNode);else if(_.tag===18)F?re(A,_.stateNode):le(A,_.stateNode);else if(_.tag===4){if(_.child!==null){A=_.stateNode.containerInfo,F=!0,_.child.return=_,_=_.child;continue}}else if(Ix(l,_,m),_.child!==null){_.child.return=_,_=_.child;continue}if(_===c)break;for(;_.sibling===null;){if(_.return===null||_.return===c)return;_=_.return,_.tag===4&&(E=!1)}_.sibling.return=_.return,_=_.sibling}}function m0(l,c){if(Ke){switch(c.tag){case 0:case 11:case 14:case 15:Io(3,c,c.return),Ac(3,c),Io(5,c,c.return);return;case 1:return;case 5:var m=c.stateNode;if(m!=null){var _=c.memoizedProps;l=l!==null?l.memoizedProps:_;var E=c.type,A=c.updateQueue;c.updateQueue=null,A!==null&&yt(m,A,E,l,_,c)}return;case 6:if(c.stateNode===null)throw Error(o(162));m=c.memoizedProps,Se(c.stateNode,l!==null?l.memoizedProps:m,m);return;case 3:we&&l!==null&&l.memoizedState.isDehydrated&&$(c.stateNode.containerInfo);return;case 12:return;case 13:nh(c);return;case 19:nh(c);return;case 17:return}throw Error(o(163))}switch(c.tag){case 0:case 11:case 14:case 15:Io(3,c,c.return),Ac(3,c),Io(5,c,c.return);return;case 12:return;case 13:nh(c);return;case 19:nh(c);return;case 3:we&&l!==null&&l.memoizedState.isDehydrated&&$(c.stateNode.containerInfo);break;case 22:case 23:return}e:if(G){switch(c.tag){case 1:case 5:case 6:break e;case 3:case 4:c=c.stateNode,Rt(c.containerInfo,c.pendingChildren);break e}throw Error(o(163))}}function nh(l){var c=l.updateQueue;if(c!==null){l.updateQueue=null;var m=l.stateNode;m===null&&(m=l.stateNode=new WA),c.forEach(function(_){var E=tC.bind(null,l,_);m.has(_)||(m.add(_),_.then(E,E))})}}function jA(l,c){for(De=c;De!==null;){c=De;var m=c.deletions;if(m!==null)for(var _=0;_";case rh:return":has("+(y0(l)||"")+")";case sh:return'[role="'+l.value+'"]';case ah:return'"'+l.value+'"';case oh:return'[data-testname="'+l.value+'"]';default:throw Error(o(365))}}function Gx(l,c){var m=[];l=[l,0];for(var _=0;_E&&(E=F),_&=~A}if(_=E,_=Dn()-_,_=(120>_?120:480>_?480:1080>_?1080:1920>_?1920:3e3>_?3e3:4320>_?4320:1960*qA(_/1960))-_,10<_){l.timeoutHandle=Te(Do.bind(null,l,Mi),_);break}Do(l,Mi);break;case 5:Do(l,Mi);break;default:throw Error(o(329))}}}return wi(l,Dn()),l.callbackNode===m?Wx.bind(null,l):null}function A0(l,c){var m=Rc;return l.current.memoizedState.isDehydrated&&(No(l,c).flags|=256),l=gh(l,c),l!==2&&(c=Mi,Mi=m,c!==null&&C0(c)),l}function C0(l){Mi===null?Mi=l:Mi.push.apply(Mi,l)}function ZA(l){for(var c=l;;){if(c.flags&16384){var m=c.updateQueue;if(m!==null&&(m=m.stores,m!==null))for(var _=0;_l?16:l,Os===null)var _=!1;else{if(l=Os,Os=null,hh=0,Tt&6)throw Error(o(331));var E=Tt;for(Tt|=4,De=l.current;De!==null;){var A=De,F=A.child;if(De.flags&16){var j=A.deletions;if(j!==null){for(var ue=0;ueDn()-M0?No(l,0):S0|=m),wi(l,c)}function Qx(l,c){c===0&&(l.mode&1?(c=bf,bf<<=1,!(bf&130023424)&&(bf=4194304)):c=1);var m=ui();l=mh(l,c),l!==null&&(dc(l,c,m),wi(l,m))}function eC(l){var c=l.memoizedState,m=0;c!==null&&(m=c.retryLane),Qx(l,m)}function tC(l,c){var m=0;switch(l.tag){case 13:var _=l.stateNode,E=l.memoizedState;E!==null&&(m=E.retryLane);break;case 19:_=l.stateNode;break;default:throw Error(o(314))}_!==null&&_.delete(c),Qx(l,m)}var $x;$x=function(l,c,m){if(l!==null)if(l.memoizedProps!==c.pendingProps||cn.current)Oi=!0;else{if(!(l.lanes&m)&&!(c.flags&128))return Oi=!1,VA(l,c,m);Oi=!!(l.flags&131072)}else Oi=!1,Qt&&c.flags&1048576&&k_(c,kf,c.index);switch(c.lanes=0,c.tag){case 2:var _=c.type;l!==null&&(l.alternate=null,c.alternate=null,c.flags|=2),l=c.pendingProps;var E=$i(c,Et.current);za(c,m),E=e0(null,c,_,l,E,m);var A=t0();return c.flags|=1,typeof E=="object"&&E!==null&&typeof E.render=="function"&&E.$$typeof===void 0?(c.tag=1,c.memoizedState=null,c.updateQueue=null,Nn(_)?(A=!0,Vn(c)):A=!1,c.memoizedState=E.state!==null&&E.state!==void 0?E.state:null,Hm(c),E.updater=Of,c.stateNode=E,E._reactInternals=c,Gm(c,_,l,m),c=l0(null,c,_,!0,A,m)):(c.tag=0,Qt&&A&&Wm(c),ci(null,c,E,m),c=c.child),c;case 16:_=c.elementType;e:{switch(l!==null&&(l.alternate=null,c.alternate=null,c.flags|=2),l=c.pendingProps,E=_._init,_=E(_._payload),c.type=_,E=c.tag=iC(_),l=vr(_,l),E){case 0:c=a0(null,c,_,l,m);break e;case 1:c=wx(null,c,_,l,m);break e;case 11:c=yx(null,c,_,l,m);break e;case 14:c=_x(null,c,_,vr(_.type,l),m);break e}throw Error(o(306,_,""))}return c;case 0:return _=c.type,E=c.pendingProps,E=c.elementType===_?E:vr(_,E),a0(l,c,_,E,m);case 1:return _=c.type,E=c.pendingProps,E=c.elementType===_?E:vr(_,E),wx(l,c,_,E,m);case 3:e:{if(Ex(c),l===null)throw Error(o(387));_=c.pendingProps,A=c.memoizedState,E=A.element,I_(l,c),zf(c,_,null,m);var F=c.memoizedState;if(_=F.element,we&&A.isDehydrated)if(A={element:_,isDehydrated:!1,cache:F.cache,transitions:F.transitions},c.updateQueue.baseState=A,c.memoizedState=A,c.flags&256){E=Error(o(423)),c=Tx(l,c,_,m,E);break e}else if(_!==E){E=Error(o(424)),c=Tx(l,c,_,m,E);break e}else for(we&&(zi=Ef(c.stateNode.containerInfo),Ui=c,Qt=!0,yr=null,pc=!1),m=X_(c,null,_,m),c.child=m;m;)m.flags=m.flags&-3|4096,m=m.sibling;else{if(ka(),_===E){c=as(l,c,m);break e}ci(l,c,_,m)}c=c.child}return c;case 5:return j_(c),l===null&&Ym(c),_=c.type,E=c.pendingProps,A=l!==null?l.memoizedProps:null,F=E.children,pe(_,E)?F=null:A!==null&&pe(_,A)&&(c.flags|=32),Mx(l,c),ci(l,c,F,m),c.child;case 6:return l===null&&Ym(c),null;case 13:return Ax(l,c,m);case 4:return Zm(c,c.stateNode.containerInfo),_=c.pendingProps,l===null?c.child=Ba(c,null,_,m):ci(l,c,_,m),c.child;case 11:return _=c.type,E=c.pendingProps,E=c.elementType===_?E:vr(_,E),yx(l,c,_,E,m);case 7:return ci(l,c,c.pendingProps,m),c.child;case 8:return ci(l,c,c.pendingProps.children,m),c.child;case 12:return ci(l,c,c.pendingProps.children,m),c.child;case 10:e:{if(_=c.type._context,E=c.pendingProps,A=c.memoizedProps,F=E.value,L_(c,_,F),A!==null)if(Or(A.value,F)){if(A.children===E.children&&!cn.current){c=as(l,c,m);break e}}else for(A=c.child,A!==null&&(A.return=c);A!==null;){var j=A.dependencies;if(j!==null){F=A.child;for(var ue=j.firstContext;ue!==null;){if(ue.context===_){if(A.tag===1){ue=is(-1,m&-m),ue.tag=2;var be=A.updateQueue;if(be!==null){be=be.shared;var We=be.pending;We===null?ue.next=ue:(ue.next=We.next,We.next=ue),be.pending=ue}}A.lanes|=m,ue=A.alternate,ue!==null&&(ue.lanes|=m),Bm(A.return,m,c),j.lanes|=m;break}ue=ue.next}}else if(A.tag===10)F=A.type===c.type?null:A.child;else if(A.tag===18){if(F=A.return,F===null)throw Error(o(341));F.lanes|=m,j=F.alternate,j!==null&&(j.lanes|=m),Bm(F,m,c),F=A.sibling}else F=A.child;if(F!==null)F.return=A;else for(F=A;F!==null;){if(F===c){F=null;break}if(A=F.sibling,A!==null){A.return=F.return,F=A;break}F=F.return}A=F}ci(l,c,E.children,m),c=c.child}return c;case 9:return E=c.type,_=c.pendingProps.children,za(c,m),E=er(E),_=_(E),c.flags|=1,ci(l,c,_,m),c.child;case 14:return _=c.type,E=vr(_,c.pendingProps),E=vr(_.type,E),_x(l,c,_,E,m);case 15:return xx(l,c,c.type,c.pendingProps,m);case 17:return _=c.type,E=c.pendingProps,E=c.elementType===_?E:vr(_,E),l!==null&&(l.alternate=null,c.alternate=null,c.flags|=2),c.tag=1,Nn(_)?(l=!0,Vn(c)):l=!1,za(c,m),O_(c,_,E),Gm(c,_,E,m),l0(null,c,_,!0,l,m);case 19:return Px(l,c,m);case 22:return Sx(l,c,m)}throw Error(o(156,c.tag))};function e2(l,c){return Nm(l,c)}function nC(l,c,m,_){this.tag=l,this.key=m,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=c,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=_,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function or(l,c,m,_){return new nC(l,c,m,_)}function P0(l){return l=l.prototype,!(!l||!l.isReactComponent)}function iC(l){if(typeof l=="function")return P0(l)?1:0;if(l!=null){if(l=l.$$typeof,l===w)return 11;if(l===x)return 14}return 2}function Bs(l,c){var m=l.alternate;return m===null?(m=or(l.tag,c,l.key,l.mode),m.elementType=l.elementType,m.type=l.type,m.stateNode=l.stateNode,m.alternate=l,l.alternate=m):(m.pendingProps=c,m.type=l.type,m.flags=0,m.subtreeFlags=0,m.deletions=null),m.flags=l.flags&14680064,m.childLanes=l.childLanes,m.lanes=l.lanes,m.child=l.child,m.memoizedProps=l.memoizedProps,m.memoizedState=l.memoizedState,m.updateQueue=l.updateQueue,c=l.dependencies,m.dependencies=c===null?null:{lanes:c.lanes,firstContext:c.firstContext},m.sibling=l.sibling,m.index=l.index,m.ref=l.ref,m}function vh(l,c,m,_,E,A){var F=2;if(_=l,typeof l=="function")P0(l)&&(F=1);else if(typeof l=="string")F=5;else e:switch(l){case h:return zo(m.children,E,A,c);case d:F=8,E|=8;break;case p:return l=or(12,m,c,E|2),l.elementType=p,l.lanes=A,l;case S:return l=or(13,m,c,E),l.elementType=S,l.lanes=A,l;case g:return l=or(19,m,c,E),l.elementType=g,l.lanes=A,l;case T:return yh(m,E,A,c);default:if(typeof l=="object"&&l!==null)switch(l.$$typeof){case v:F=10;break e;case y:F=9;break e;case w:F=11;break e;case x:F=14;break e;case M:F=16,_=null;break e}throw Error(o(130,l==null?l:typeof l,""))}return c=or(F,m,c,E),c.elementType=l,c.type=_,c.lanes=A,c}function zo(l,c,m,_){return l=or(7,l,_,c),l.lanes=m,l}function yh(l,c,m,_){return l=or(22,l,_,c),l.elementType=T,l.lanes=m,l.stateNode={},l}function L0(l,c,m){return l=or(6,l,null,c),l.lanes=m,l}function I0(l,c,m){return c=or(4,l.children!==null?l.children:[],l.key,c),c.lanes=m,c.stateNode={containerInfo:l.containerInfo,pendingChildren:null,implementation:l.implementation},c}function rC(l,c,m,_,E){this.tag=c,this.containerInfo=l,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=lt,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Lm(0),this.expirationTimes=Lm(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Lm(0),this.identifierPrefix=_,this.onRecoverableError=E,we&&(this.mutableSourceEagerHydrationData=null)}function t2(l,c,m,_,E,A,F,j,ue){return l=new rC(l,c,m,j,ue),c===1?(c=1,A===!0&&(c|=8)):c=0,A=or(3,null,null,c),l.current=A,A.stateNode=l,A.memoizedState={element:_,isDehydrated:m,cache:null,transitions:null},Hm(A),l}function n2(l){if(!l)return Qi;l=l._reactInternals;e:{if(b(l)!==l||l.tag!==1)throw Error(o(170));var c=l;do{switch(c.tag){case 3:c=c.stateNode.context;break e;case 1:if(Nn(c.type)){c=c.stateNode.__reactInternalMemoizedMergedChildContext;break e}}c=c.return}while(c!==null);throw Error(o(171))}if(l.tag===1){var m=l.type;if(Nn(m))return Na(l,m,c)}return c}function i2(l){var c=l._reactInternals;if(c===void 0)throw typeof l.render=="function"?Error(o(188)):(l=Object.keys(l).join(","),Error(o(268,l)));return l=q(c),l===null?null:l.stateNode}function r2(l,c){if(l=l.memoizedState,l!==null&&l.dehydrated!==null){var m=l.retryLane;l.retryLane=m!==0&&m=be&&A>=gt&&E<=We&&F<=rt){l.splice(c,1);break}else if(_!==be||m.width!==ue.width||rtF){if(!(A!==gt||m.height!==ue.height||We<_||be>E)){be>_&&(ue.width+=be-_,ue.x=_),WeA&&(ue.height+=gt-A,ue.y=A),rtm&&(m=F)),Fw0&&(c.flags|=128,_=!0,Tc(E,!1),c.lanes=4194304)}else{if(!_)if(l=Hf(A),l!==null){if(c.flags|=128,_=!0,l=l.updateQueue,l!==null&&(c.updateQueue=l,c.flags|=4),Tc(E,!0),E.tail===null&&E.tailMode==="hidden"&&!A.alternate&&!Qt)return Kn(c),null}else 2*Dn()-E.renderingStartTime>w0&&m!==1073741824&&(c.flags|=128,_=!0,Tc(E,!1),c.lanes=4194304);E.isBackwards?(A.sibling=c.child,c.child=A):(l=E.last,l!==null?l.sibling=A:c.child=A,E.last=A)}return E.tail!==null?(c=E.tail,E.rendering=c,E.tail=c.sibling,E.renderingStartTime=Dn(),c.sibling=null,l=nn.current,Ge(nn,_?l&1|2:l&1),c):(Kn(c),null);case 22:case 23:return b0(),_=c.memoizedState!==null,l!==null&&l.memoizedState!==null!==_&&(c.flags|=8192),_&&c.mode&1?Fi&1073741824&&(Kn(c),Ke&&c.subtreeFlags&6&&(c.flags|=8192)):Kn(c),null;case 24:return null;case 25:return null}throw Error(o(156,c.tag))}var HA=a.ReactCurrentOwner,zi=!1;function ci(l,c,m,_){c.child=l===null?X_(c,null,m,_):Ba(c,l.child,m,_)}function yx(l,c,m,_,E){m=m.render;var A=c.ref;return Oa(c,E),_=e0(l,c,m,_,A,E),m=t0(),l!==null&&!zi?(c.updateQueue=l.updateQueue,c.flags&=-2053,l.lanes&=~E,as(l,c,E)):(Qt&&m&&Wm(c),c.flags|=1,ci(l,c,_,E),c.child)}function _x(l,c,m,_,E){if(l===null){var A=m.type;return typeof A=="function"&&!P0(A)&&A.defaultProps===void 0&&m.compare===null&&m.defaultProps===void 0?(c.tag=15,c.type=A,xx(l,c,A,_,E)):(l=vh(m.type,null,_,c,c.mode,E),l.ref=c.ref,l.return=c,c.child=l)}if(A=l.child,!(l.lanes&E)){var F=A.memoizedProps;if(m=m.compare,m=m!==null?m:If,m(F,_)&&l.ref===c.ref)return as(l,c,E)}return c.flags|=1,l=Bs(A,_),l.ref=c.ref,l.return=c,c.child=l}function xx(l,c,m,_,E){if(l!==null&&If(l.memoizedProps,_)&&l.ref===c.ref)if(zi=!1,(l.lanes&E)!==0)l.flags&131072&&(zi=!0);else return c.lanes=l.lanes,as(l,c,E);return a0(l,c,m,_,E)}function Sx(l,c,m){var _=c.pendingProps,E=_.children,A=l!==null?l.memoizedState:null;if(_.mode==="hidden")if(!(c.mode&1))c.memoizedState={baseLanes:0,cachePool:null},Ge(Wa,Fi),Fi|=m;else if(m&1073741824)c.memoizedState={baseLanes:0,cachePool:null},_=A!==null?A.baseLanes:m,Ge(Wa,Fi),Fi|=_;else return l=A!==null?A.baseLanes|m:m,c.lanes=c.childLanes=1073741824,c.memoizedState={baseLanes:l,cachePool:null},c.updateQueue=null,Ge(Wa,Fi),Fi|=l,null;else A!==null?(_=A.baseLanes|m,c.memoizedState=null):_=m,Ge(Wa,Fi),Fi|=_;return ci(l,c,E,m),c.child}function Mx(l,c){var m=c.ref;(l===null&&m!==null||l!==null&&l.ref!==m)&&(c.flags|=512,c.flags|=2097152)}function a0(l,c,m,_,E){var A=Nn(m)?Dr:Et.current;return A=$i(c,A),Oa(c,E),m=e0(l,c,m,_,A,E),_=t0(),l!==null&&!zi?(c.updateQueue=l.updateQueue,c.flags&=-2053,l.lanes&=~E,as(l,c,E)):(Qt&&_&&Wm(c),c.flags|=1,ci(l,c,m,E),c.child)}function wx(l,c,m,_,E){if(Nn(m)){var A=!0;Vn(c)}else A=!1;if(Oa(c,E),c.stateNode===null)l!==null&&(l.alternate=null,c.alternate=null,c.flags|=2),z_(c,m,_),Gm(c,m,_,E),_=!0;else if(l===null){var F=c.stateNode,j=c.memoizedProps;F.props=j;var ue=F.context,be=m.contextType;typeof be=="object"&&be!==null?be=er(be):(be=Nn(m)?Dr:Et.current,be=$i(c,be));var We=m.getDerivedStateFromProps,gt=typeof We=="function"||typeof F.getSnapshotBeforeUpdate=="function";gt||typeof F.UNSAFE_componentWillReceiveProps!="function"&&typeof F.componentWillReceiveProps!="function"||(j!==_||ue!==be)&&F_(c,F,_,be),Ds=!1;var rt=c.memoizedState;F.state=rt,Of(c,_,F,E),ue=c.memoizedState,j!==_||rt!==ue||cn.current||Ds?(typeof We=="function"&&(Vm(c,m,We,_),ue=c.memoizedState),(j=Ds||O_(c,m,j,_,rt,ue,be))?(gt||typeof F.UNSAFE_componentWillMount!="function"&&typeof F.componentWillMount!="function"||(typeof F.componentWillMount=="function"&&F.componentWillMount(),typeof F.UNSAFE_componentWillMount=="function"&&F.UNSAFE_componentWillMount()),typeof F.componentDidMount=="function"&&(c.flags|=4194308)):(typeof F.componentDidMount=="function"&&(c.flags|=4194308),c.memoizedProps=_,c.memoizedState=ue),F.props=_,F.state=ue,F.context=be,_=j):(typeof F.componentDidMount=="function"&&(c.flags|=4194308),_=!1)}else{F=c.stateNode,I_(l,c),j=c.memoizedProps,be=c.type===c.elementType?j:vr(c.type,j),F.props=be,gt=c.pendingProps,rt=F.context,ue=m.contextType,typeof ue=="object"&&ue!==null?ue=er(ue):(ue=Nn(m)?Dr:Et.current,ue=$i(c,ue));var Wt=m.getDerivedStateFromProps;(We=typeof Wt=="function"||typeof F.getSnapshotBeforeUpdate=="function")||typeof F.UNSAFE_componentWillReceiveProps!="function"&&typeof F.componentWillReceiveProps!="function"||(j!==gt||rt!==ue)&&F_(c,F,_,ue),Ds=!1,rt=c.memoizedState,F.state=rt,Of(c,_,F,E);var $e=c.memoizedState;j!==gt||rt!==$e||cn.current||Ds?(typeof Wt=="function"&&(Vm(c,m,Wt,_),$e=c.memoizedState),(be=Ds||O_(c,m,be,_,rt,$e,ue)||!1)?(We||typeof F.UNSAFE_componentWillUpdate!="function"&&typeof F.componentWillUpdate!="function"||(typeof F.componentWillUpdate=="function"&&F.componentWillUpdate(_,$e,ue),typeof F.UNSAFE_componentWillUpdate=="function"&&F.UNSAFE_componentWillUpdate(_,$e,ue)),typeof F.componentDidUpdate=="function"&&(c.flags|=4),typeof F.getSnapshotBeforeUpdate=="function"&&(c.flags|=1024)):(typeof F.componentDidUpdate!="function"||j===l.memoizedProps&&rt===l.memoizedState||(c.flags|=4),typeof F.getSnapshotBeforeUpdate!="function"||j===l.memoizedProps&&rt===l.memoizedState||(c.flags|=1024),c.memoizedProps=_,c.memoizedState=$e),F.props=_,F.state=$e,F.context=ue,_=be):(typeof F.componentDidUpdate!="function"||j===l.memoizedProps&&rt===l.memoizedState||(c.flags|=4),typeof F.getSnapshotBeforeUpdate!="function"||j===l.memoizedProps&&rt===l.memoizedState||(c.flags|=1024),_=!1)}return l0(l,c,m,_,A,E)}function l0(l,c,m,_,E,A){Mx(l,c);var F=(c.flags&128)!==0;if(!_&&!F)return E&&Da(c,m,!1),as(l,c,A);_=c.stateNode,HA.current=c;var j=F&&typeof m.getDerivedStateFromError!="function"?null:_.render();return c.flags|=1,l!==null&&F?(c.child=Ba(c,l.child,null,A),c.child=Ba(c,null,j,A)):ci(l,c,j,A),c.memoizedState=_.state,E&&Da(c,m,!0),c.child}function Ex(l){var c=l.stateNode;c.pendingContext?Ur(l,c.pendingContext,c.pendingContext!==c.context):c.context&&Ur(l,c.context,!1),Zm(l,c.containerInfo)}function Tx(l,c,m,_,E){return ka(),qm(E),c.flags|=256,ci(l,c,m,_),c.child}var Jf={dehydrated:null,treeContext:null,retryLane:0};function Qf(l){return{baseLanes:l,cachePool:null}}function Ax(l,c,m){var _=c.pendingProps,E=nn.current,A=!1,F=(c.flags&128)!==0,j;if((j=F)||(j=l!==null&&l.memoizedState===null?!1:(E&2)!==0),j?(A=!0,c.flags&=-129):(l===null||l.memoizedState!==null)&&(E|=1),Ge(nn,E&1),l===null)return Ym(c),l=c.memoizedState,l!==null&&(l=l.dehydrated,l!==null)?(c.mode&1?fc(l)?c.lanes=8:c.lanes=1073741824:c.lanes=1,null):(E=_.children,l=_.fallback,A?(_=c.mode,A=c.child,E={mode:"hidden",children:E},!(_&1)&&A!==null?(A.childLanes=0,A.pendingProps=E):A=yh(E,_,0,null),l=Oo(l,_,m,null),A.return=c,l.return=c,A.sibling=l,c.child=A,c.child.memoizedState=Qf(m),c.memoizedState=Jf,l):c0(c,E));if(E=l.memoizedState,E!==null){if(j=E.dehydrated,j!==null){if(F)return c.flags&256?(c.flags&=-257,$f(l,c,m,Error(o(422)))):c.memoizedState!==null?(c.child=l.child,c.flags|=128,null):(A=_.fallback,E=c.mode,_=yh({mode:"visible",children:_.children},E,0,null),A=Oo(A,E,m,null),A.flags|=2,_.return=c,A.return=c,_.sibling=A,c.child=_,c.mode&1&&Ba(c,l.child,null,m),c.child.memoizedState=Qf(m),c.memoizedState=Jf,A);if(!(c.mode&1))c=$f(l,c,m,null);else if(fc(j))c=$f(l,c,m,Error(o(419)));else if(_=(m&l.childLanes)!==0,zi||_){if(_=Sn,_!==null){switch(m&-m){case 4:A=2;break;case 16:A=8;break;case 64: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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:A=32;break;case 536870912:A=268435456;break;default:A=0}_=A&(_.suspendedLanes|m)?0:A,_!==0&&_!==E.retryLane&&(E.retryLane=_,sr(l,_,-1))}R0(),c=$f(l,c,m,Error(o(421)))}else uc(j)?(c.flags|=128,c.child=l.child,c=eC.bind(null,l),La(j,c),c=null):(m=E.treeContext,we&&(Oi=Tf(j),Ui=c,Qt=!0,yr=null,pc=!1,m!==null&&(tr[nr++]=rs,tr[nr++]=ss,tr[nr++]=bo,rs=m.id,ss=m.overflow,bo=c)),c=c0(c,c.pendingProps.children),c.flags|=4096);return c}return A?(_=bx(l,c,_.children,_.fallback,m),A=c.child,E=l.child.memoizedState,A.memoizedState=E===null?Qf(m):{baseLanes:E.baseLanes|m,cachePool:null},A.childLanes=l.childLanes&~m,c.memoizedState=Jf,_):(m=Cx(l,c,_.children,m),c.memoizedState=null,m)}return A?(_=bx(l,c,_.children,_.fallback,m),A=c.child,E=l.child.memoizedState,A.memoizedState=E===null?Qf(m):{baseLanes:E.baseLanes|m,cachePool:null},A.childLanes=l.childLanes&~m,c.memoizedState=Jf,_):(m=Cx(l,c,_.children,m),c.memoizedState=null,m)}function c0(l,c){return c=yh({mode:"visible",children:c},l.mode,0,null),c.return=l,l.child=c}function Cx(l,c,m,_){var E=l.child;return l=E.sibling,m=Bs(E,{mode:"visible",children:m}),!(c.mode&1)&&(m.lanes=_),m.return=c,m.sibling=null,l!==null&&(_=c.deletions,_===null?(c.deletions=[l],c.flags|=16):_.push(l)),c.child=m}function bx(l,c,m,_,E){var A=c.mode;l=l.child;var F=l.sibling,j={mode:"hidden",children:m};return!(A&1)&&c.child!==l?(m=c.child,m.childLanes=0,m.pendingProps=j,c.deletions=null):(m=Bs(l,j),m.subtreeFlags=l.subtreeFlags&14680064),F!==null?_=Bs(F,_):(_=Oo(_,A,E,null),_.flags|=2),_.return=c,m.return=c,m.sibling=_,c.child=m,_}function $f(l,c,m,_){return _!==null&&qm(_),Ba(c,l.child,null,m),l=c0(c,c.pendingProps.children),l.flags|=2,c.memoizedState=null,l}function Rx(l,c,m){l.lanes|=c;var _=l.alternate;_!==null&&(_.lanes|=c),Bm(l.return,c,m)}function u0(l,c,m,_,E){var A=l.memoizedState;A===null?l.memoizedState={isBackwards:c,rendering:null,renderingStartTime:0,last:_,tail:m,tailMode:E}:(A.isBackwards=c,A.rendering=null,A.renderingStartTime=0,A.last=_,A.tail=m,A.tailMode=E)}function Px(l,c,m){var _=c.pendingProps,E=_.revealOrder,A=_.tail;if(ci(l,c,_.children,m),_=nn.current,_&2)_=_&1|2,c.flags|=128;else{if(l!==null&&l.flags&128)e:for(l=c.child;l!==null;){if(l.tag===13)l.memoizedState!==null&&Rx(l,m,c);else if(l.tag===19)Rx(l,m,c);else if(l.child!==null){l.child.return=l,l=l.child;continue}if(l===c)break e;for(;l.sibling===null;){if(l.return===null||l.return===c)break e;l=l.return}l.sibling.return=l.return,l=l.sibling}_&=1}if(Ge(nn,_),!(c.mode&1))c.memoizedState=null;else switch(E){case"forwards":for(m=c.child,E=null;m!==null;)l=m.alternate,l!==null&&Hf(l)===null&&(E=m),m=m.sibling;m=E,m===null?(E=c.child,c.child=null):(E=m.sibling,m.sibling=null),u0(c,!1,E,m,A);break;case"backwards":for(m=null,E=c.child,c.child=null;E!==null;){if(l=E.alternate,l!==null&&Hf(l)===null){c.child=E;break}l=E.sibling,E.sibling=m,m=E,E=l}u0(c,!0,m,null,A);break;case"together":u0(c,!1,null,null,void 0);break;default:c.memoizedState=null}return c.child}function as(l,c,m){if(l!==null&&(c.dependencies=l.dependencies),Xa|=c.lanes,!(m&c.childLanes))return null;if(l!==null&&c.child!==l.child)throw Error(o(153));if(c.child!==null){for(l=c.child,m=Bs(l,l.pendingProps),c.child=m,m.return=c;l.sibling!==null;)l=l.sibling,m=m.sibling=Bs(l,l.pendingProps),m.return=c;m.sibling=null}return c.child}function VA(l,c,m){switch(c.tag){case 3:Ex(c),ka();break;case 5:j_(c);break;case 1:Nn(c.type)&&Vn(c);break;case 4:Zm(c,c.stateNode.containerInfo);break;case 10:L_(c,c.type._context,c.memoizedProps.value);break;case 13:var _=c.memoizedState;if(_!==null)return _.dehydrated!==null?(Ge(nn,nn.current&1),c.flags|=128,null):m&c.child.childLanes?Ax(l,c,m):(Ge(nn,nn.current&1),l=as(l,c,m),l!==null?l.sibling:null);Ge(nn,nn.current&1);break;case 19:if(_=(m&c.childLanes)!==0,l.flags&128){if(_)return Px(l,c,m);c.flags|=128}var E=c.memoizedState;if(E!==null&&(E.rendering=null,E.tail=null,E.lastEffect=null),Ge(nn,nn.current),_)break;return null;case 22:case 23:return c.lanes=0,Sx(l,c,m)}return as(l,c,m)}function GA(l,c){switch(Xm(c),c.tag){case 1:return Nn(c.type)&&gn(),l=c.flags,l&65536?(c.flags=l&-65537|128,c):null;case 3:return Va(),at(cn),at(Et),Qm(),l=c.flags,l&65536&&!(l&128)?(c.flags=l&-65537|128,c):null;case 5:return Km(c),null;case 13:if(at(nn),l=c.memoizedState,l!==null&&l.dehydrated!==null){if(c.alternate===null)throw Error(o(340));ka()}return l=c.flags,l&65536?(c.flags=l&-65537|128,c):null;case 19:return at(nn),null;case 4:return Va(),null;case 10:return km(c.type._context),null;case 22:case 23:return b0(),null;case 24:return null;default:return null}}var eh=!1,Lo=!1,WA=typeof WeakSet=="function"?WeakSet:Set,De=null;function th(l,c){var m=l.ref;if(m!==null)if(typeof m=="function")try{m(null)}catch(_){Ei(l,c,_)}else m.current=null}function f0(l,c,m){try{m()}catch(_){Ei(l,c,_)}}var Lx=!1;function XA(l,c){for(B(l.containerInfo),De=c;De!==null;)if(l=De,c=l.child,(l.subtreeFlags&1028)!==0&&c!==null)c.return=l,De=c;else for(;De!==null;){l=De;try{var m=l.alternate;if(l.flags&1024)switch(l.tag){case 0:case 11:case 15:break;case 1:if(m!==null){var _=m.memoizedProps,E=m.memoizedState,A=l.stateNode,F=A.getSnapshotBeforeUpdate(l.elementType===l.type?_:vr(l.type,_),E);A.__reactInternalSnapshotBeforeUpdate=F}break;case 3:Ke&&Re(l.stateNode.containerInfo);break;case 5:case 6:case 4:case 17:break;default:throw Error(o(163))}}catch(j){Ei(l,l.return,j)}if(c=l.sibling,c!==null){c.return=l.return,De=c;break}De=l.return}return m=Lx,Lx=!1,m}function Io(l,c,m){var _=c.updateQueue;if(_=_!==null?_.lastEffect:null,_!==null){var E=_=_.next;do{if((E.tag&l)===l){var A=E.destroy;E.destroy=void 0,A!==void 0&&f0(c,m,A)}E=E.next}while(E!==_)}}function Ac(l,c){if(c=c.updateQueue,c=c!==null?c.lastEffect:null,c!==null){var m=c=c.next;do{if((m.tag&l)===l){var _=m.create;m.destroy=_()}m=m.next}while(m!==c)}}function h0(l){var c=l.ref;if(c!==null){var m=l.stateNode;switch(l.tag){case 5:l=te(m);break;default:l=m}typeof c=="function"?c(l):c.current=l}}function Ix(l,c,m){if(Or&&typeof Or.onCommitFiberUnmount=="function")try{Or.onCommitFiberUnmount(Pf,c)}catch{}switch(c.tag){case 0:case 11:case 14:case 15:if(l=c.updateQueue,l!==null&&(l=l.lastEffect,l!==null)){var _=l=l.next;do{var E=_,A=E.destroy;E=E.tag,A!==void 0&&(E&2||E&4)&&f0(c,m,A),_=_.next}while(_!==l)}break;case 1:if(th(c,m),l=c.stateNode,typeof l.componentWillUnmount=="function")try{l.props=c.memoizedProps,l.state=c.memoizedState,l.componentWillUnmount()}catch(F){Ei(c,m,F)}break;case 5:th(c,m);break;case 4:Ke?Fx(l,c,m):G&&G&&(c=c.stateNode.containerInfo,m=it(c),Rt(c,m))}}function Nx(l,c,m){for(var _=c;;)if(Ix(l,_,m),_.child===null||Ke&&_.tag===4){if(_===c)break;for(;_.sibling===null;){if(_.return===null||_.return===c)return;_=_.return}_.sibling.return=_.return,_=_.sibling}else _.child.return=_,_=_.child}function Dx(l){var c=l.alternate;c!==null&&(l.alternate=null,Dx(c)),l.child=null,l.deletions=null,l.sibling=null,l.tag===5&&(c=l.stateNode,c!==null&&Ze(c)),l.stateNode=null,l.return=null,l.dependencies=null,l.memoizedProps=null,l.memoizedState=null,l.pendingProps=null,l.stateNode=null,l.updateQueue=null}function Ux(l){return l.tag===5||l.tag===3||l.tag===4}function Ox(l){e:for(;;){for(;l.sibling===null;){if(l.return===null||Ux(l.return))return null;l=l.return}for(l.sibling.return=l.return,l=l.sibling;l.tag!==5&&l.tag!==6&&l.tag!==18;){if(l.flags&2||l.child===null||l.tag===4)continue e;l.child.return=l,l=l.child}if(!(l.flags&2))return l.stateNode}}function zx(l){if(Ke){e:{for(var c=l.return;c!==null;){if(Ux(c))break e;c=c.return}throw Error(o(160))}var m=c;switch(m.tag){case 5:c=m.stateNode,m.flags&32&&(ge(c),m.flags&=-33),m=Ox(l),p0(l,m,c);break;case 3:case 4:c=m.stateNode.containerInfo,m=Ox(l),d0(l,m,c);break;default:throw Error(o(161))}}}function d0(l,c,m){var _=l.tag;if(_===5||_===6)l=l.stateNode,c?et(m,l,c):dt(m,l);else if(_!==4&&(l=l.child,l!==null))for(d0(l,c,m),l=l.sibling;l!==null;)d0(l,c,m),l=l.sibling}function p0(l,c,m){var _=l.tag;if(_===5||_===6)l=l.stateNode,c?ct(m,l,c):tt(m,l);else if(_!==4&&(l=l.child,l!==null))for(p0(l,c,m),l=l.sibling;l!==null;)p0(l,c,m),l=l.sibling}function Fx(l,c,m){for(var _=c,E=!1,A,F;;){if(!E){E=_.return;e:for(;;){if(E===null)throw Error(o(160));switch(A=E.stateNode,E.tag){case 5:F=!1;break e;case 3:A=A.containerInfo,F=!0;break e;case 4:A=A.containerInfo,F=!0;break e}E=E.return}E=!0}if(_.tag===5||_.tag===6)Nx(l,_,m),F?X(A,_.stateNode):He(A,_.stateNode);else if(_.tag===18)F?re(A,_.stateNode):le(A,_.stateNode);else if(_.tag===4){if(_.child!==null){A=_.stateNode.containerInfo,F=!0,_.child.return=_,_=_.child;continue}}else if(Ix(l,_,m),_.child!==null){_.child.return=_,_=_.child;continue}if(_===c)break;for(;_.sibling===null;){if(_.return===null||_.return===c)return;_=_.return,_.tag===4&&(E=!1)}_.sibling.return=_.return,_=_.sibling}}function m0(l,c){if(Ke){switch(c.tag){case 0:case 11:case 14:case 15:Io(3,c,c.return),Ac(3,c),Io(5,c,c.return);return;case 1:return;case 5:var m=c.stateNode;if(m!=null){var _=c.memoizedProps;l=l!==null?l.memoizedProps:_;var E=c.type,A=c.updateQueue;c.updateQueue=null,A!==null&&yt(m,A,E,l,_,c)}return;case 6:if(c.stateNode===null)throw Error(o(162));m=c.memoizedProps,Se(c.stateNode,l!==null?l.memoizedProps:m,m);return;case 3:we&&l!==null&&l.memoizedState.isDehydrated&&$(c.stateNode.containerInfo);return;case 12:return;case 13:nh(c);return;case 19:nh(c);return;case 17:return}throw Error(o(163))}switch(c.tag){case 0:case 11:case 14:case 15:Io(3,c,c.return),Ac(3,c),Io(5,c,c.return);return;case 12:return;case 13:nh(c);return;case 19:nh(c);return;case 3:we&&l!==null&&l.memoizedState.isDehydrated&&$(c.stateNode.containerInfo);break;case 22:case 23:return}e:if(G){switch(c.tag){case 1:case 5:case 6:break e;case 3:case 4:c=c.stateNode,Rt(c.containerInfo,c.pendingChildren);break e}throw Error(o(163))}}function nh(l){var c=l.updateQueue;if(c!==null){l.updateQueue=null;var m=l.stateNode;m===null&&(m=l.stateNode=new WA),c.forEach(function(_){var E=tC.bind(null,l,_);m.has(_)||(m.add(_),_.then(E,E))})}}function jA(l,c){for(De=c;De!==null;){c=De;var m=c.deletions;if(m!==null)for(var _=0;_";case rh:return":has("+(y0(l)||"")+")";case sh:return'[role="'+l.value+'"]';case ah:return'"'+l.value+'"';case oh:return'[data-testname="'+l.value+'"]';default:throw Error(o(365))}}function Gx(l,c){var m=[];l=[l,0];for(var _=0;_E&&(E=F),_&=~A}if(_=E,_=Dn()-_,_=(120>_?120:480>_?480:1080>_?1080:1920>_?1920:3e3>_?3e3:4320>_?4320:1960*qA(_/1960))-_,10<_){l.timeoutHandle=Te(Do.bind(null,l,Mi),_);break}Do(l,Mi);break;case 5:Do(l,Mi);break;default:throw Error(o(329))}}}return wi(l,Dn()),l.callbackNode===m?Wx.bind(null,l):null}function A0(l,c){var m=Rc;return l.current.memoizedState.isDehydrated&&(No(l,c).flags|=256),l=gh(l,c),l!==2&&(c=Mi,Mi=m,c!==null&&C0(c)),l}function C0(l){Mi===null?Mi=l:Mi.push.apply(Mi,l)}function ZA(l){for(var c=l;;){if(c.flags&16384){var m=c.updateQueue;if(m!==null&&(m=m.stores,m!==null))for(var _=0;_l?16:l,zs===null)var _=!1;else{if(l=zs,zs=null,hh=0,Tt&6)throw Error(o(331));var E=Tt;for(Tt|=4,De=l.current;De!==null;){var A=De,F=A.child;if(De.flags&16){var j=A.deletions;if(j!==null){for(var ue=0;ueDn()-M0?No(l,0):S0|=m),wi(l,c)}function Qx(l,c){c===0&&(l.mode&1?(c=bf,bf<<=1,!(bf&130023424)&&(bf=4194304)):c=1);var m=ui();l=mh(l,c),l!==null&&(dc(l,c,m),wi(l,m))}function eC(l){var c=l.memoizedState,m=0;c!==null&&(m=c.retryLane),Qx(l,m)}function tC(l,c){var m=0;switch(l.tag){case 13:var _=l.stateNode,E=l.memoizedState;E!==null&&(m=E.retryLane);break;case 19:_=l.stateNode;break;default:throw Error(o(314))}_!==null&&_.delete(c),Qx(l,m)}var $x;$x=function(l,c,m){if(l!==null)if(l.memoizedProps!==c.pendingProps||cn.current)zi=!0;else{if(!(l.lanes&m)&&!(c.flags&128))return zi=!1,VA(l,c,m);zi=!!(l.flags&131072)}else zi=!1,Qt&&c.flags&1048576&&k_(c,kf,c.index);switch(c.lanes=0,c.tag){case 2:var _=c.type;l!==null&&(l.alternate=null,c.alternate=null,c.flags|=2),l=c.pendingProps;var E=$i(c,Et.current);Oa(c,m),E=e0(null,c,_,l,E,m);var A=t0();return c.flags|=1,typeof E=="object"&&E!==null&&typeof E.render=="function"&&E.$$typeof===void 0?(c.tag=1,c.memoizedState=null,c.updateQueue=null,Nn(_)?(A=!0,Vn(c)):A=!1,c.memoizedState=E.state!==null&&E.state!==void 0?E.state:null,Hm(c),E.updater=zf,c.stateNode=E,E._reactInternals=c,Gm(c,_,l,m),c=l0(null,c,_,!0,A,m)):(c.tag=0,Qt&&A&&Wm(c),ci(null,c,E,m),c=c.child),c;case 16:_=c.elementType;e:{switch(l!==null&&(l.alternate=null,c.alternate=null,c.flags|=2),l=c.pendingProps,E=_._init,_=E(_._payload),c.type=_,E=c.tag=iC(_),l=vr(_,l),E){case 0:c=a0(null,c,_,l,m);break e;case 1:c=wx(null,c,_,l,m);break e;case 11:c=yx(null,c,_,l,m);break e;case 14:c=_x(null,c,_,vr(_.type,l),m);break e}throw Error(o(306,_,""))}return c;case 0:return _=c.type,E=c.pendingProps,E=c.elementType===_?E:vr(_,E),a0(l,c,_,E,m);case 1:return _=c.type,E=c.pendingProps,E=c.elementType===_?E:vr(_,E),wx(l,c,_,E,m);case 3:e:{if(Ex(c),l===null)throw Error(o(387));_=c.pendingProps,A=c.memoizedState,E=A.element,I_(l,c),Of(c,_,null,m);var F=c.memoizedState;if(_=F.element,we&&A.isDehydrated)if(A={element:_,isDehydrated:!1,cache:F.cache,transitions:F.transitions},c.updateQueue.baseState=A,c.memoizedState=A,c.flags&256){E=Error(o(423)),c=Tx(l,c,_,m,E);break e}else if(_!==E){E=Error(o(424)),c=Tx(l,c,_,m,E);break e}else for(we&&(Oi=Ef(c.stateNode.containerInfo),Ui=c,Qt=!0,yr=null,pc=!1),m=X_(c,null,_,m),c.child=m;m;)m.flags=m.flags&-3|4096,m=m.sibling;else{if(ka(),_===E){c=as(l,c,m);break e}ci(l,c,_,m)}c=c.child}return c;case 5:return j_(c),l===null&&Ym(c),_=c.type,E=c.pendingProps,A=l!==null?l.memoizedProps:null,F=E.children,pe(_,E)?F=null:A!==null&&pe(_,A)&&(c.flags|=32),Mx(l,c),ci(l,c,F,m),c.child;case 6:return l===null&&Ym(c),null;case 13:return Ax(l,c,m);case 4:return Zm(c,c.stateNode.containerInfo),_=c.pendingProps,l===null?c.child=Ba(c,null,_,m):ci(l,c,_,m),c.child;case 11:return _=c.type,E=c.pendingProps,E=c.elementType===_?E:vr(_,E),yx(l,c,_,E,m);case 7:return ci(l,c,c.pendingProps,m),c.child;case 8:return ci(l,c,c.pendingProps.children,m),c.child;case 12:return ci(l,c,c.pendingProps.children,m),c.child;case 10:e:{if(_=c.type._context,E=c.pendingProps,A=c.memoizedProps,F=E.value,L_(c,_,F),A!==null)if(zr(A.value,F)){if(A.children===E.children&&!cn.current){c=as(l,c,m);break e}}else for(A=c.child,A!==null&&(A.return=c);A!==null;){var j=A.dependencies;if(j!==null){F=A.child;for(var ue=j.firstContext;ue!==null;){if(ue.context===_){if(A.tag===1){ue=is(-1,m&-m),ue.tag=2;var be=A.updateQueue;if(be!==null){be=be.shared;var We=be.pending;We===null?ue.next=ue:(ue.next=We.next,We.next=ue),be.pending=ue}}A.lanes|=m,ue=A.alternate,ue!==null&&(ue.lanes|=m),Bm(A.return,m,c),j.lanes|=m;break}ue=ue.next}}else if(A.tag===10)F=A.type===c.type?null:A.child;else if(A.tag===18){if(F=A.return,F===null)throw Error(o(341));F.lanes|=m,j=F.alternate,j!==null&&(j.lanes|=m),Bm(F,m,c),F=A.sibling}else F=A.child;if(F!==null)F.return=A;else for(F=A;F!==null;){if(F===c){F=null;break}if(A=F.sibling,A!==null){A.return=F.return,F=A;break}F=F.return}A=F}ci(l,c,E.children,m),c=c.child}return c;case 9:return E=c.type,_=c.pendingProps.children,Oa(c,m),E=er(E),_=_(E),c.flags|=1,ci(l,c,_,m),c.child;case 14:return _=c.type,E=vr(_,c.pendingProps),E=vr(_.type,E),_x(l,c,_,E,m);case 15:return xx(l,c,c.type,c.pendingProps,m);case 17:return _=c.type,E=c.pendingProps,E=c.elementType===_?E:vr(_,E),l!==null&&(l.alternate=null,c.alternate=null,c.flags|=2),c.tag=1,Nn(_)?(l=!0,Vn(c)):l=!1,Oa(c,m),z_(c,_,E),Gm(c,_,E,m),l0(null,c,_,!0,l,m);case 19:return Px(l,c,m);case 22:return Sx(l,c,m)}throw Error(o(156,c.tag))};function e2(l,c){return Nm(l,c)}function nC(l,c,m,_){this.tag=l,this.key=m,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=c,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=_,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function or(l,c,m,_){return new nC(l,c,m,_)}function P0(l){return l=l.prototype,!(!l||!l.isReactComponent)}function iC(l){if(typeof l=="function")return P0(l)?1:0;if(l!=null){if(l=l.$$typeof,l===w)return 11;if(l===x)return 14}return 2}function Bs(l,c){var m=l.alternate;return m===null?(m=or(l.tag,c,l.key,l.mode),m.elementType=l.elementType,m.type=l.type,m.stateNode=l.stateNode,m.alternate=l,l.alternate=m):(m.pendingProps=c,m.type=l.type,m.flags=0,m.subtreeFlags=0,m.deletions=null),m.flags=l.flags&14680064,m.childLanes=l.childLanes,m.lanes=l.lanes,m.child=l.child,m.memoizedProps=l.memoizedProps,m.memoizedState=l.memoizedState,m.updateQueue=l.updateQueue,c=l.dependencies,m.dependencies=c===null?null:{lanes:c.lanes,firstContext:c.firstContext},m.sibling=l.sibling,m.index=l.index,m.ref=l.ref,m}function vh(l,c,m,_,E,A){var F=2;if(_=l,typeof l=="function")P0(l)&&(F=1);else if(typeof l=="string")F=5;else e:switch(l){case h:return Oo(m.children,E,A,c);case d:F=8,E|=8;break;case p:return l=or(12,m,c,E|2),l.elementType=p,l.lanes=A,l;case S:return l=or(13,m,c,E),l.elementType=S,l.lanes=A,l;case g:return l=or(19,m,c,E),l.elementType=g,l.lanes=A,l;case T:return yh(m,E,A,c);default:if(typeof l=="object"&&l!==null)switch(l.$$typeof){case v:F=10;break e;case y:F=9;break e;case w:F=11;break e;case x:F=14;break e;case M:F=16,_=null;break e}throw Error(o(130,l==null?l:typeof l,""))}return c=or(F,m,c,E),c.elementType=l,c.type=_,c.lanes=A,c}function Oo(l,c,m,_){return l=or(7,l,_,c),l.lanes=m,l}function yh(l,c,m,_){return l=or(22,l,_,c),l.elementType=T,l.lanes=m,l.stateNode={},l}function L0(l,c,m){return l=or(6,l,null,c),l.lanes=m,l}function I0(l,c,m){return c=or(4,l.children!==null?l.children:[],l.key,c),c.lanes=m,c.stateNode={containerInfo:l.containerInfo,pendingChildren:null,implementation:l.implementation},c}function rC(l,c,m,_,E){this.tag=c,this.containerInfo=l,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=lt,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Lm(0),this.expirationTimes=Lm(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Lm(0),this.identifierPrefix=_,this.onRecoverableError=E,we&&(this.mutableSourceEagerHydrationData=null)}function t2(l,c,m,_,E,A,F,j,ue){return l=new rC(l,c,m,j,ue),c===1?(c=1,A===!0&&(c|=8)):c=0,A=or(3,null,null,c),l.current=A,A.stateNode=l,A.memoizedState={element:_,isDehydrated:m,cache:null,transitions:null},Hm(A),l}function n2(l){if(!l)return Qi;l=l._reactInternals;e:{if(b(l)!==l||l.tag!==1)throw Error(o(170));var c=l;do{switch(c.tag){case 3:c=c.stateNode.context;break e;case 1:if(Nn(c.type)){c=c.stateNode.__reactInternalMemoizedMergedChildContext;break e}}c=c.return}while(c!==null);throw Error(o(171))}if(l.tag===1){var m=l.type;if(Nn(m))return Na(l,m,c)}return c}function i2(l){var c=l._reactInternals;if(c===void 0)throw typeof l.render=="function"?Error(o(188)):(l=Object.keys(l).join(","),Error(o(268,l)));return l=q(c),l===null?null:l.stateNode}function r2(l,c){if(l=l.memoizedState,l!==null&&l.dehydrated!==null){var m=l.retryLane;l.retryLane=m!==0&&m=be&&A>=gt&&E<=We&&F<=rt){l.splice(c,1);break}else if(_!==be||m.width!==ue.width||rtF){if(!(A!==gt||m.height!==ue.height||We<_||be>E)){be>_&&(ue.width+=be-_,ue.x=_),WeA&&(ue.height+=gt-A,ue.y=A),rtm&&(m=F)),F ")+` No matching component was found for: - `)+l.join(" > ")}return null},t.getPublicRootInstance=function(l){if(l=l.current,!l.child)return null;switch(l.child.tag){case 5:return te(l.child.stateNode);default:return l.child.stateNode}},t.injectIntoDevTools=function(l){if(l={bundleType:l.bundleType,version:l.version,rendererPackageName:l.rendererPackageName,rendererConfig:l.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:a.ReactCurrentDispatcher,findHostInstanceByFiber:sC,findFiberByHostInstance:l.findFiberByHostInstance||oC,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.0.0-fc46dba67-20220329"},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")l=!1;else{var c=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(c.isDisabled||!c.supportsFiber)l=!0;else{try{Pf=c.inject(l),zr=c}catch{}l=!!c.checkDCE}}return l},t.isAlreadyRendering=function(){return!1},t.observeVisibleRects=function(l,c,m,_){if(!I)throw Error(o(363));l=_0(l,c);var E=Fe(l,m,_).disconnect;return{disconnect:function(){E()}}},t.registerMutableSourceForHydration=function(l,c){var m=c._getVersion;m=m(c._source),l.mutableSourceEagerHydrationData==null?l.mutableSourceEagerHydrationData=[c,m]:l.mutableSourceEagerHydrationData.push(c,m)},t.runWithPriority=function(l,c){var m=Dt;try{return Dt=l,c()}finally{Dt=m}},t.shouldError=function(){return null},t.shouldSuspend=function(){return!1},t.updateContainer=function(l,c,m,_){var E=c.current,A=ui(),F=Fs(E);return m=n2(m),c.context===null?c.context=m:c.pendingContext=m,c=is(A,F),c.payload={element:l},_=_===void 0?null:_,_!==null&&(c.callback=_),Us(E,c),l=sr(E,F,A),l!==null&&Uf(l,E,F),F},t};V4.exports=JD;var QD=V4.exports;const $D=Gv(QD);var G4={exports:{}},W4={};/** + `)+l.join(" > ")}return null},t.getPublicRootInstance=function(l){if(l=l.current,!l.child)return null;switch(l.child.tag){case 5:return te(l.child.stateNode);default:return l.child.stateNode}},t.injectIntoDevTools=function(l){if(l={bundleType:l.bundleType,version:l.version,rendererPackageName:l.rendererPackageName,rendererConfig:l.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:a.ReactCurrentDispatcher,findHostInstanceByFiber:sC,findFiberByHostInstance:l.findFiberByHostInstance||oC,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.0.0-fc46dba67-20220329"},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")l=!1;else{var c=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(c.isDisabled||!c.supportsFiber)l=!0;else{try{Pf=c.inject(l),Or=c}catch{}l=!!c.checkDCE}}return l},t.isAlreadyRendering=function(){return!1},t.observeVisibleRects=function(l,c,m,_){if(!I)throw Error(o(363));l=_0(l,c);var E=Fe(l,m,_).disconnect;return{disconnect:function(){E()}}},t.registerMutableSourceForHydration=function(l,c){var m=c._getVersion;m=m(c._source),l.mutableSourceEagerHydrationData==null?l.mutableSourceEagerHydrationData=[c,m]:l.mutableSourceEagerHydrationData.push(c,m)},t.runWithPriority=function(l,c){var m=Dt;try{return Dt=l,c()}finally{Dt=m}},t.shouldError=function(){return null},t.shouldSuspend=function(){return!1},t.updateContainer=function(l,c,m,_){var E=c.current,A=ui(),F=Fs(E);return m=n2(m),c.context===null?c.context=m:c.pendingContext=m,c=is(A,F),c.payload={element:l},_=_===void 0?null:_,_!==null&&(c.callback=_),Us(E,c),l=sr(E,F,A),l!==null&&Uf(l,E,F),F},t};V4.exports=JD;var QD=V4.exports;const $D=Gv(QD);var G4={exports:{}},W4={};/** * @license React * scheduler.production.min.js * @@ -3764,4 +3764,4 @@ No matching component was found for: * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */(function(n){function e(N,B){var H=N.length;N.push(B);e:for(;0>>1,J=N[Y];if(0>>1;Yr(pe,H))Eer(Te,pe)?(N[Y]=Te,N[Ee]=H,Y=Ee):(N[Y]=pe,N[ie]=H,Y=ie);else if(Eer(Te,H))N[Y]=Te,N[Ee]=H,Y=Ee;else break e}}return B}function r(N,B){var H=N.sortIndex-B.sortIndex;return H!==0?H:N.id-B.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;n.unstable_now=function(){return s.now()}}else{var o=Date,a=o.now();n.unstable_now=function(){return o.now()-a}}var u=[],f=[],h=1,d=null,p=3,v=!1,y=!1,w=!1,S=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,x=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function M(N){for(var B=t(f);B!==null;){if(B.callback===null)i(f);else if(B.startTime<=N)i(f),B.sortIndex=B.expirationTime,e(u,B);else break;B=t(f)}}function T(N){if(w=!1,M(N),!y)if(t(u)!==null)y=!0,te(P);else{var B=t(f);B!==null&&ae(T,B.startTime-N)}}function P(N,B){y=!1,w&&(w=!1,g(D),D=-1),v=!0;var H=p;try{for(M(B),d=t(u);d!==null&&(!(d.expirationTime>B)||N&&!k());){var Y=d.callback;if(typeof Y=="function"){d.callback=null,p=d.priorityLevel;var J=Y(d.expirationTime<=B);B=n.unstable_now(),typeof J=="function"?d.callback=J:d===t(u)&&i(u),M(B)}else i(u);d=t(u)}if(d!==null)var Z=!0;else{var ie=t(f);ie!==null&&ae(T,ie.startTime-B),Z=!1}return Z}finally{d=null,p=H,v=!1}}var C=!1,L=null,D=-1,b=5,R=-1;function k(){return!(n.unstable_now()-RN||125Y?(N.sortIndex=H,e(f,N),t(u)===null&&N===t(f)&&(w?(g(D),D=-1):w=!0,ae(T,H-Y))):(N.sortIndex=J,e(u,N),y||v||(y=!0,te(P))),N},n.unstable_shouldYield=k,n.unstable_wrapCallback=function(N){var B=p;return function(){var H=p;p=B;try{return N.apply(this,arguments)}finally{p=H}}}})(W4);G4.exports=W4;var q3=G4.exports;const T_={},e7=n=>void Object.assign(T_,n);function t7(n,e){function t(h,{args:d=[],attach:p,...v},y){let w=`${h[0].toUpperCase()}${h.slice(1)}`,S;if(h==="primitive"){if(v.object===void 0)throw new Error("R3F: Primitives without 'object' are invalid!");const g=v.object;S=vl(g,{type:h,root:y,attach:p,primitive:!0})}else{const g=T_[w];if(!g)throw new Error(`R3F: ${w} 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(!Array.isArray(d))throw new Error("R3F: The args prop must be an array!");S=vl(new g(...d),{type:h,root:y,attach:p,memoizedProps:{args:d}})}return S.__r3f.attach===void 0&&(S instanceof St?S.__r3f.attach="geometry":S instanceof Yn&&(S.__r3f.attach="material")),w!=="inject"&&Yg(S,v),S}function i(h,d){let p=!1;if(d){var v,y;(v=d.__r3f)!=null&&v.attach?jg(h,d,d.__r3f.attach):d.isObject3D&&h.isObject3D&&(h.add(d),p=!0),p||(y=h.__r3f)==null||y.objects.push(d),d.__r3f||vl(d,{}),d.__r3f.parent=h,kv(d),yl(d)}}function r(h,d,p){let v=!1;if(d){var y,w;if((y=d.__r3f)!=null&&y.attach)jg(h,d,d.__r3f.attach);else if(d.isObject3D&&h.isObject3D){d.parent=h,d.dispatchEvent({type:"added"});const S=h.children.filter(x=>x!==d),g=S.indexOf(p);h.children=[...S.slice(0,g),d,...S.slice(g)],v=!0}v||(w=h.__r3f)==null||w.objects.push(d),d.__r3f||vl(d,{}),d.__r3f.parent=h,kv(d),yl(d)}}function s(h,d,p=!1){h&&[...h].forEach(v=>o(d,v,p))}function o(h,d,p){if(d){var v,y,w;if(d.__r3f&&(d.__r3f.parent=null),(v=h.__r3f)!=null&&v.objects&&(h.__r3f.objects=h.__r3f.objects.filter(T=>T!==d)),(y=d.__r3f)!=null&&y.attach)$3(h,d,d.__r3f.attach);else if(d.isObject3D&&h.isObject3D){var S;h.remove(d),(S=d.__r3f)!=null&&S.root&&c7(d.__r3f.root,d)}const x=(w=d.__r3f)==null?void 0:w.primitive,M=!x&&(p===void 0?d.dispose!==null:p);if(!x){var g;s((g=d.__r3f)==null?void 0:g.objects,d,M),s(d.children,d,M)}if(delete d.__r3f,M&&d.dispose&&d.type!=="Scene"){const T=()=>{try{d.dispose()}catch{}};typeof IS_REACT_ACT_ENVIRONMENT>"u"?q3.unstable_scheduleCallback(q3.unstable_IdlePriority,T):T()}yl(h)}}function a(h,d,p,v){var y;const w=(y=h.__r3f)==null?void 0:y.parent;if(!w)return;const S=t(d,p,h.__r3f.root);if(h.children){for(const g of h.children)g.__r3f&&i(S,g);h.children=h.children.filter(g=>!g.__r3f)}h.__r3f.objects.forEach(g=>i(S,g)),h.__r3f.objects=[],h.__r3f.autoRemovedBeforeAppend||o(w,h),S.parent&&(S.__r3f.autoRemovedBeforeAppend=!0),i(w,S),S.raycast&&S.__r3f.eventCount&&S.__r3f.root.getState().internal.interaction.push(S),[v,v.alternate].forEach(g=>{g!==null&&(g.stateNode=S,g.ref&&(typeof g.ref=="function"?g.ref(S):g.ref.current=S))})}const u=()=>console.warn("Text is not allowed in the R3F tree! This could be stray whitespace or characters.");return{reconciler:$D({createInstance:t,removeChild:o,appendChild:i,appendInitialChild:i,insertBefore:r,supportsMutation:!0,isPrimaryRenderer:!1,supportsPersistence:!1,supportsHydration:!1,noTimeout:-1,appendChildToContainer:(h,d)=>{if(!d)return;const p=h.getState().scene;p.__r3f&&(p.__r3f.root=h,i(p,d))},removeChildFromContainer:(h,d)=>{d&&o(h.getState().scene,d)},insertInContainerBefore:(h,d,p)=>{if(!d||!p)return;const v=h.getState().scene;v.__r3f&&r(v,d,p)},getRootHostContext:()=>null,getChildHostContext:h=>h,finalizeInitialChildren(h){var d;return!!((d=h==null?void 0:h.__r3f)!=null?d:{}).handlers},prepareUpdate(h,d,p,v){var y;if(((y=h==null?void 0:h.__r3f)!=null?y:{}).primitive&&v.object&&v.object!==h)return[!0];{const{args:S=[],children:g,...x}=v,{args:M=[],children:T,...P}=p;if(!Array.isArray(S))throw new Error("R3F: the args prop must be an array!");if(S.some((L,D)=>L!==M[D]))return[!0];const C=J4(h,x,P,!0);return C.changes.length?[!1,C]:null}},commitUpdate(h,[d,p],v,y,w,S){d?a(h,v,w,S):Yg(h,p)},commitMount(h,d,p,v){var y;const w=(y=h.__r3f)!=null?y:{};h.raycast&&w.handlers&&w.eventCount&&h.__r3f.root.getState().internal.interaction.push(h)},getPublicInstance:h=>h,prepareForCommit:()=>null,preparePortalMount:h=>vl(h.getState().scene),resetAfterCommit:()=>{},shouldSetTextContent:()=>!1,clearContainer:()=>!1,hideInstance(h){var d;const{attach:p,parent:v}=(d=h.__r3f)!=null?d:{};p&&v&&$3(v,h,p),h.isObject3D&&(h.visible=!1),yl(h)},unhideInstance(h,d){var p;const{attach:v,parent:y}=(p=h.__r3f)!=null?p:{};v&&y&&jg(y,h,v),(h.isObject3D&&d.visible==null||d.visible)&&(h.visible=!0),yl(h)},createTextInstance:u,hideTextInstance:u,unhideTextInstance:u,getCurrentEventPriority:()=>e?e():zl.DefaultEventPriority,beforeActiveInstanceBlur:()=>{},afterActiveInstanceBlur:()=>{},detachDeletedInstance:()=>{},now:typeof performance<"u"&&$t.fun(performance.now)?performance.now:$t.fun(Date.now)?Date.now:()=>0,scheduleTimeout:$t.fun(setTimeout)?setTimeout:void 0,cancelTimeout:$t.fun(clearTimeout)?clearTimeout:void 0}),applyProps:Yg}}var Z3,K3;const Xg=n=>"colorSpace"in n||"outputColorSpace"in n,X4=()=>{var n;return(n=T_.ColorManagement)!=null?n:null},j4=n=>n&&n.isOrthographicCamera,n7=n=>n&&n.hasOwnProperty("current"),wf=typeof window<"u"&&((Z3=window.document)!=null&&Z3.createElement||((K3=window.navigator)==null?void 0:K3.product)==="ReactNative")?ve.useLayoutEffect:ve.useEffect;function Y4(n){const e=ve.useRef(n);return wf(()=>void(e.current=n),[n]),e}function i7({set:n}){return wf(()=>(n(new Promise(()=>null)),()=>n(!1)),[n]),null}class q4 extends ve.Component{constructor(...e){super(...e),this.state={error:!1}}componentDidCatch(e){this.props.set(e)}render(){return this.state.error?null:this.props.children}}q4.getDerivedStateFromError=()=>({error:!0});const Z4="__default",J3=new Map,r7=n=>n&&!!n.memoized&&!!n.changes;function K4(n){var e;const t=typeof window<"u"?(e=window.devicePixelRatio)!=null?e:2:1;return Array.isArray(n)?Math.min(Math.max(n[0],t),n[1]):n}const Kc=n=>{var e;return(e=n.__r3f)==null?void 0:e.root.getState()},$t={obj:n=>n===Object(n)&&!$t.arr(n)&&typeof n!="function",fun:n=>typeof n=="function",str:n=>typeof n=="string",num:n=>typeof n=="number",boo:n=>typeof n=="boolean",und:n=>n===void 0,arr:n=>Array.isArray(n),equ(n,e,{arrays:t="shallow",objects:i="reference",strict:r=!0}={}){if(typeof n!=typeof e||!!n!=!!e)return!1;if($t.str(n)||$t.num(n))return n===e;const s=$t.obj(n);if(s&&i==="reference")return n===e;const o=$t.arr(n);if(o&&t==="reference")return n===e;if((o||s)&&n===e)return!0;let a;for(a in n)if(!(a in e))return!1;if(s&&t==="shallow"&&i==="shallow"){for(a in r?e:n)if(!$t.equ(n[a],e[a],{strict:r,objects:"reference"}))return!1}else for(a in r?e:n)if(n[a]!==e[a])return!1;if($t.und(a)){if(o&&n.length===0&&e.length===0||s&&Object.keys(n).length===0&&Object.keys(e).length===0)return!0;if(n!==e)return!1}return!0}};function s7(n){n.dispose&&n.type!=="Scene"&&n.dispose();for(const e in n)e.dispose==null||e.dispose(),delete n[e]}function vl(n,e){const t=n;return t.__r3f={type:"",root:null,previousAttach:null,memoizedProps:{},eventCount:0,handlers:{},objects:[],parent:null,...e},n}function Fv(n,e){let t=n;if(e.includes("-")){const i=e.split("-"),r=i.pop();return t=i.reduce((s,o)=>s[o],n),{target:t,key:r}}else return{target:t,key:e}}const Q3=/-\d+$/;function jg(n,e,t){if($t.str(t)){if(Q3.test(t)){const s=t.replace(Q3,""),{target:o,key:a}=Fv(n,s);Array.isArray(o[a])||(o[a]=[])}const{target:i,key:r}=Fv(n,t);e.__r3f.previousAttach=i[r],i[r]=e}else e.__r3f.previousAttach=t(n,e)}function $3(n,e,t){var i,r;if($t.str(t)){const{target:s,key:o}=Fv(n,t),a=e.__r3f.previousAttach;a===void 0?delete s[o]:s[o]=a}else(i=e.__r3f)==null||i.previousAttach==null||i.previousAttach(n,e);(r=e.__r3f)==null||delete r.previousAttach}function J4(n,{children:e,key:t,ref:i,...r},{children:s,key:o,ref:a,...u}={},f=!1){var h;const d=(h=n==null?void 0:n.__r3f)!=null?h:{},p=Object.entries(r),v=[];if(f){const w=Object.keys(u);for(let S=0;S{var g;if((g=n.__r3f)!=null&&g.primitive&&w==="object"||$t.equ(S,u[w]))return;if(/^on(Pointer|Click|DoubleClick|ContextMenu|Wheel)/.test(w))return v.push([w,S,!0,[]]);let x=[];w.includes("-")&&(x=w.split("-")),v.push([w,S,!1,x]);for(const M in r){const T=r[M];M.startsWith(`${w}-`)&&v.push([M,T,!1,M.split("-")])}});const y={...r};return d.memoizedProps&&d.memoizedProps.args&&(y.args=d.memoizedProps.args),d.memoizedProps&&d.memoizedProps.attach&&(y.attach=d.memoizedProps.attach),{memoized:y,changes:v}}const o7=typeof process<"u"&&!1;function Yg(n,e){var t,i,r;const s=(t=n.__r3f)!=null?t:{},o=s.root,a=(i=o==null||o.getState==null?void 0:o.getState())!=null?i:{},{memoized:u,changes:f}=r7(e)?e:J4(n,e),h=s.eventCount;n.__r3f&&(n.__r3f.memoizedProps=u);for(let p=0;pM[T],n),!(x&&x.set))){const[M,...T]=S.reverse();g=T.reverse().reduce((P,C)=>P[C],n),v=M}if(y===Z4+"remove")if(g.constructor){let M=J3.get(g.constructor);M||(M=new g.constructor,J3.set(g.constructor,M)),y=M[v]}else y=0;if(w)y?s.handlers[v]=y:delete s.handlers[v],s.eventCount=Object.keys(s.handlers).length;else if(x&&x.set&&(x.copy||x instanceof fa)){if(Array.isArray(y))x.fromArray?x.fromArray(y):x.set(...y);else if(x.copy&&y&&y.constructor&&(o7?x.constructor.name===y.constructor.name:x.constructor===y.constructor))x.copy(y);else if(y!==void 0){const M=x instanceof Be;!M&&x.setScalar?x.setScalar(y):x instanceof fa&&y instanceof fa?x.mask=y.mask:x.set(y),!X4()&&!a.linear&&M&&x.convertSRGBToLinear()}}else if(g[v]=y,g[v]instanceof mn&&g[v].format===pi&&g[v].type===Kr){const M=g[v];Xg(M)&&Xg(a.gl)?M.colorSpace=a.gl.outputColorSpace:M.encoding=a.gl.outputEncoding}yl(n)}if(s.parent&&a.internal&&n.raycast&&h!==s.eventCount){const p=a.internal.interaction.indexOf(n);p>-1&&a.internal.interaction.splice(p,1),s.eventCount&&a.internal.interaction.push(n)}return!(f.length===1&&f[0][0]==="onUpdate")&&f.length&&(r=n.__r3f)!=null&&r.parent&&kv(n),n}function yl(n){var e,t;const i=(e=n.__r3f)==null||(t=e.root)==null||t.getState==null?void 0:t.getState();i&&i.internal.frames===0&&i.invalidate()}function kv(n){n.onUpdate==null||n.onUpdate(n)}function a7(n,e){n.manual||(j4(n)?(n.left=e.width/-2,n.right=e.width/2,n.top=e.height/2,n.bottom=e.height/-2):n.aspect=e.width/e.height,n.updateProjectionMatrix(),n.updateMatrixWorld())}function bd(n){return(n.eventObject||n.object).uuid+"/"+n.index+n.instanceId}function l7(){var n;const e=typeof self<"u"&&self||typeof window<"u"&&window;if(!e)return zl.DefaultEventPriority;switch((n=e.event)==null?void 0:n.type){case"click":case"contextmenu":case"dblclick":case"pointercancel":case"pointerdown":case"pointerup":return zl.DiscreteEventPriority;case"pointermove":case"pointerout":case"pointerover":case"pointerenter":case"pointerleave":case"wheel":return zl.ContinuousEventPriority;default:return zl.DefaultEventPriority}}function Q4(n,e,t,i){const r=t.get(e);r&&(t.delete(e),t.size===0&&(n.delete(i),r.target.releasePointerCapture(i)))}function c7(n,e){const{internal:t}=n.getState();t.interaction=t.interaction.filter(i=>i!==e),t.initialHits=t.initialHits.filter(i=>i!==e),t.hovered.forEach((i,r)=>{(i.eventObject===e||i.object===e)&&t.hovered.delete(r)}),t.capturedMap.forEach((i,r)=>{Q4(t.capturedMap,e,i,r)})}function u7(n){function e(u){const{internal:f}=n.getState(),h=u.offsetX-f.initialClick[0],d=u.offsetY-f.initialClick[1];return Math.round(Math.sqrt(h*h+d*d))}function t(u){return u.filter(f=>["Move","Over","Enter","Out","Leave"].some(h=>{var d;return(d=f.__r3f)==null?void 0:d.handlers["onPointer"+h]}))}function i(u,f){const h=n.getState(),d=new Set,p=[],v=f?f(h.internal.interaction):h.internal.interaction;for(let g=0;g{const M=Kc(g.object),T=Kc(x.object);return!M||!T?g.distance-x.distance:T.events.priority-M.events.priority||g.distance-x.distance}).filter(g=>{const x=bd(g);return d.has(x)?!1:(d.add(x),!0)});h.events.filter&&(w=h.events.filter(w,h));for(const g of w){let x=g.object;for(;x;){var S;(S=x.__r3f)!=null&&S.eventCount&&p.push({...g,eventObject:x}),x=x.parent}}if("pointerId"in u&&h.internal.capturedMap.has(u.pointerId))for(let g of h.internal.capturedMap.get(u.pointerId).values())d.has(bd(g.intersection))||p.push(g.intersection);return p}function r(u,f,h,d){const p=n.getState();if(u.length){const v={stopped:!1};for(const y of u){const w=Kc(y.object)||p,{raycaster:S,pointer:g,camera:x,internal:M}=w,T=new O(g.x,g.y,0).unproject(x),P=R=>{var k,q;return(k=(q=M.capturedMap.get(R))==null?void 0:q.has(y.eventObject))!=null?k:!1},C=R=>{const k={intersection:y,target:f.target};M.capturedMap.has(R)?M.capturedMap.get(R).set(y.eventObject,k):M.capturedMap.set(R,new Map([[y.eventObject,k]])),f.target.setPointerCapture(R)},L=R=>{const k=M.capturedMap.get(R);k&&Q4(M.capturedMap,y.eventObject,k,R)};let D={};for(let R in f){let k=f[R];typeof k!="function"&&(D[R]=k)}let b={...y,...D,pointer:g,intersections:u,stopped:v.stopped,delta:h,unprojectedPoint:T,ray:S.ray,camera:x,stopPropagation(){const R="pointerId"in f&&M.capturedMap.get(f.pointerId);if((!R||R.has(y.eventObject))&&(b.stopped=v.stopped=!0,M.hovered.size&&Array.from(M.hovered.values()).find(k=>k.eventObject===y.eventObject))){const k=u.slice(0,u.indexOf(y));s([...k,y])}},target:{hasPointerCapture:P,setPointerCapture:C,releasePointerCapture:L},currentTarget:{hasPointerCapture:P,setPointerCapture:C,releasePointerCapture:L},nativeEvent:f};if(d(b),v.stopped===!0)break}}return u}function s(u){const{internal:f}=n.getState();for(const h of f.hovered.values())if(!u.length||!u.find(d=>d.object===h.object&&d.index===h.index&&d.instanceId===h.instanceId)){const p=h.eventObject.__r3f,v=p==null?void 0:p.handlers;if(f.hovered.delete(bd(h)),p!=null&&p.eventCount){const y={...h,intersections:u};v.onPointerOut==null||v.onPointerOut(y),v.onPointerLeave==null||v.onPointerLeave(y)}}}function o(u,f){for(let h=0;hs([]);case"onLostPointerCapture":return f=>{const{internal:h}=n.getState();"pointerId"in f&&h.capturedMap.has(f.pointerId)&&requestAnimationFrame(()=>{h.capturedMap.has(f.pointerId)&&(h.capturedMap.delete(f.pointerId),s([]))})}}return function(h){const{onPointerMissed:d,internal:p}=n.getState();p.lastEvent.current=h;const v=u==="onPointerMove",y=u==="onClick"||u==="onContextMenu"||u==="onDoubleClick",S=i(h,v?t:void 0),g=y?e(h):0;u==="onPointerDown"&&(p.initialClick=[h.offsetX,h.offsetY],p.initialHits=S.map(M=>M.eventObject)),y&&!S.length&&g<=2&&(o(h,p.interaction),d&&d(h)),v&&s(S);function x(M){const T=M.eventObject,P=T.__r3f,C=P==null?void 0:P.handlers;if(P!=null&&P.eventCount)if(v){if(C.onPointerOver||C.onPointerEnter||C.onPointerOut||C.onPointerLeave){const L=bd(M),D=p.hovered.get(L);D?D.stopped&&M.stopPropagation():(p.hovered.set(L,M),C.onPointerOver==null||C.onPointerOver(M),C.onPointerEnter==null||C.onPointerEnter(M))}C.onPointerMove==null||C.onPointerMove(M)}else{const L=C[u];L?(!y||p.initialHits.includes(T))&&(o(h,p.interaction.filter(D=>!p.initialHits.includes(D))),L(M)):y&&p.initialHits.includes(T)&&o(h,p.interaction.filter(D=>!p.initialHits.includes(D)))}}r(S,h,g,x)}}return{handlePointer:a}}const $4=n=>!!(n!=null&&n.render),eA=ve.createContext(null),f7=(n,e)=>{const t=qD((a,u)=>{const f=new O,h=new O,d=new O;function p(g=u().camera,x=h,M=u().size){const{width:T,height:P,top:C,left:L}=M,D=T/P;x instanceof O?d.copy(x):d.set(...x);const b=g.getWorldPosition(f).distanceTo(d);if(j4(g))return{width:T/g.zoom,height:P/g.zoom,top:C,left:L,factor:1,distance:b,aspect:D};{const R=g.fov*Math.PI/180,k=2*Math.tan(R/2)*b,q=k*(T/P);return{width:q,height:k,top:C,left:L,factor:T/q,distance:b,aspect:D}}}let v;const y=g=>a(x=>({performance:{...x.performance,current:g}})),w=new de;return{set:a,get:u,gl:null,camera:null,raycaster:null,events:{priority:1,enabled:!0,connected:!1},xr:null,scene:null,invalidate:(g=1)=>n(u(),g),advance:(g,x)=>e(g,x,u()),legacy:!1,linear:!1,flat:!1,controls:null,clock:new S_,pointer:w,mouse:w,frameloop:"always",onPointerMissed:void 0,performance:{current:1,min:.5,max:1,debounce:200,regress:()=>{const g=u();v&&clearTimeout(v),g.performance.current!==g.performance.min&&y(g.performance.min),v=setTimeout(()=>y(u().performance.max),g.performance.debounce)}},size:{width:0,height:0,top:0,left:0,updateStyle:!1},viewport:{initialDpr:0,dpr:0,width:0,height:0,top:0,left:0,aspect:0,distance:0,factor:0,getCurrentViewport:p},setEvents:g=>a(x=>({...x,events:{...x.events,...g}})),setSize:(g,x,M,T,P)=>{const C=u().camera,L={width:g,height:x,top:T||0,left:P||0,updateStyle:M};a(D=>({size:L,viewport:{...D.viewport,...p(C,h,L)}}))},setDpr:g=>a(x=>{const M=K4(g);return{viewport:{...x.viewport,dpr:M,initialDpr:x.viewport.initialDpr||M}}}),setFrameloop:(g="always")=>{const x=u().clock;x.stop(),x.elapsedTime=0,g!=="never"&&(x.start(),x.elapsedTime=0),a(()=>({frameloop:g}))},previousRoot:void 0,internal:{active:!1,priority:0,frames:0,lastEvent:ve.createRef(),interaction:[],hovered:new Map,subscribers:[],initialClick:[0,0],initialHits:[],capturedMap:new Map,subscribe:(g,x,M)=>{const T=u().internal;return T.priority=T.priority+(x>0?1:0),T.subscribers.push({ref:g,priority:x,store:M}),T.subscribers=T.subscribers.sort((P,C)=>P.priority-C.priority),()=>{const P=u().internal;P!=null&&P.subscribers&&(P.priority=P.priority-(x>0?1:0),P.subscribers=P.subscribers.filter(C=>C.ref!==g))}}}}}),i=t.getState();let r=i.size,s=i.viewport.dpr,o=i.camera;return t.subscribe(()=>{const{camera:a,size:u,viewport:f,gl:h,set:d}=t.getState();if(u.width!==r.width||u.height!==r.height||f.dpr!==s){var p;r=u,s=f.dpr,a7(a,u),h.setPixelRatio(f.dpr);const v=(p=u.updateStyle)!=null?p:typeof HTMLCanvasElement<"u"&&h.domElement instanceof HTMLCanvasElement;h.setSize(u.width,u.height,v)}a!==o&&(o=a,d(v=>({viewport:{...v.viewport,...v.viewport.getCurrentViewport(a)}})))}),t.subscribe(a=>n(a)),t};let Rd,h7=new Set,d7=new Set,p7=new Set;function qg(n,e){if(n.size)for(const{callback:t}of n.values())t(e)}function Jc(n,e){switch(n){case"before":return qg(h7,e);case"after":return qg(d7,e);case"tail":return qg(p7,e)}}let Zg,Kg;function Jg(n,e,t){let i=e.clock.getDelta();for(e.frameloop==="never"&&typeof n=="number"&&(i=n-e.clock.elapsedTime,e.clock.oldTime=e.clock.elapsedTime,e.clock.elapsedTime=n),Zg=e.internal.subscribers,Rd=0;Rd0)&&!((f=r.gl.xr)!=null&&f.isPresenting)&&(t+=Jg(u,r))}if(Jc("after",u),t===0)return Jc("tail",u),e=!1,cancelAnimationFrame(i)}function o(u,f=1){var h;if(!u)return n.forEach(d=>o(d.store.getState()),f);(h=u.gl.xr)!=null&&h.isPresenting||!u.internal.active||u.frameloop==="never"||(u.internal.frames=Math.min(60,u.internal.frames+f),e||(e=!0,requestAnimationFrame(s)))}function a(u,f=!0,h,d){if(f&&Jc("before",u),h)Jg(u,h,d);else for(const p of n.values())Jg(u,p.store.getState());f&&Jc("after",u)}return{loop:s,invalidate:o,advance:a}}function tA(){const n=ve.useContext(eA);if(!n)throw new Error("R3F: Hooks can only be used within the Canvas component!");return n}function Vi(n=t=>t,e){return tA()(n,e)}function A_(n,e=0){const t=tA(),i=t.getState().internal.subscribe,r=Y4(n);return wf(()=>i(r,e,t),[e,i,t]),null}const tc=new Map,{invalidate:eM,advance:tM}=m7(tc),{reconciler:Ip,applyProps:ml}=t7(tc,l7),gl={objects:"shallow",strict:!1},g7=(n,e)=>{const t=typeof n=="function"?n(e):n;return $4(t)?t:new r_({powerPreference:"high-performance",canvas:e,antialias:!0,alpha:!0,...n})};function v7(n,e){const t=typeof HTMLCanvasElement<"u"&&n instanceof HTMLCanvasElement;if(e){const{width:i,height:r,top:s,left:o,updateStyle:a=t}=e;return{width:i,height:r,top:s,left:o,updateStyle:a}}else if(typeof HTMLCanvasElement<"u"&&n instanceof HTMLCanvasElement&&n.parentElement){const{width:i,height:r,top:s,left:o}=n.parentElement.getBoundingClientRect();return{width:i,height:r,top:s,left:o,updateStyle:t}}else if(typeof OffscreenCanvas<"u"&&n instanceof OffscreenCanvas)return{width:n.width,height:n.height,top:0,left:0,updateStyle:t};return{width:0,height:0,top:0,left:0}}function y7(n){const e=tc.get(n),t=e==null?void 0:e.fiber,i=e==null?void 0:e.store;e&&console.warn("R3F.createRoot should only be called once!");const r=typeof reportError=="function"?reportError:console.error,s=i||f7(eM,tM),o=t||Ip.createContainer(s,zl.ConcurrentRoot,null,!1,null,"",r,null);e||tc.set(n,{fiber:o,store:s});let a,u=!1,f;return{configure(h={}){let{gl:d,size:p,scene:v,events:y,onCreated:w,shadows:S=!1,linear:g=!1,flat:x=!1,legacy:M=!1,orthographic:T=!1,frameloop:P="always",dpr:C=[1,2],performance:L,raycaster:D,camera:b,onPointerMissed:R}=h,k=s.getState(),q=k.gl;k.gl||k.set({gl:q=g7(d,n)});let oe=k.raycaster;oe||k.set({raycaster:oe=new k4});const{params:V,...Q}=D||{};if($t.equ(Q,oe,gl)||ml(oe,{...Q}),$t.equ(V,oe.params,gl)||ml(oe,{params:{...oe.params,...V}}),!k.camera||k.camera===f&&!$t.equ(f,b,gl)){f=b;const J=b instanceof mf,Z=J?b:T?new Ss(0,0,0,0,.1,1e3):new pn(75,0,.1,1e3);J||(Z.position.z=5,b&&ml(Z,b),!k.camera&&!(b!=null&&b.rotation)&&Z.lookAt(0,0,0)),k.set({camera:Z}),oe.camera=Z}if(!k.scene){let J;v instanceof Pp?J=v:(J=new Pp,v&&ml(J,v)),k.set({scene:vl(J)})}if(!k.xr){var te;const J=(pe,Ee)=>{const Te=s.getState();Te.frameloop!=="never"&&tM(pe,!0,Te,Ee)},Z=()=>{const pe=s.getState();pe.gl.xr.enabled=pe.gl.xr.isPresenting,pe.gl.xr.setAnimationLoop(pe.gl.xr.isPresenting?J:null),pe.gl.xr.isPresenting||eM(pe)},ie={connect(){const pe=s.getState().gl;pe.xr.addEventListener("sessionstart",Z),pe.xr.addEventListener("sessionend",Z)},disconnect(){const pe=s.getState().gl;pe.xr.removeEventListener("sessionstart",Z),pe.xr.removeEventListener("sessionend",Z)}};typeof((te=q.xr)==null?void 0:te.addEventListener)=="function"&&ie.connect(),k.set({xr:ie})}if(q.shadowMap){const J=q.shadowMap.enabled,Z=q.shadowMap.type;if(q.shadowMap.enabled=!!S,$t.boo(S))q.shadowMap.type=hu;else if($t.str(S)){var ae;const ie={basic:LE,percentage:Jp,soft:hu,variance:Er};q.shadowMap.type=(ae=ie[S])!=null?ae:hu}else $t.obj(S)&&Object.assign(q.shadowMap,S);(J!==q.shadowMap.enabled||Z!==q.shadowMap.type)&&(q.shadowMap.needsUpdate=!0)}const N=X4();N&&("enabled"in N?N.enabled=!M:"legacyMode"in N&&(N.legacyMode=M)),ml(q,{outputEncoding:g?3e3:3001,toneMapping:x?Zr:Fy}),k.legacy!==M&&k.set(()=>({legacy:M})),k.linear!==g&&k.set(()=>({linear:g})),k.flat!==x&&k.set(()=>({flat:x})),d&&!$t.fun(d)&&!$4(d)&&!$t.equ(d,q,gl)&&ml(q,d),y&&!k.events.handlers&&k.set({events:y(s)});const Y=v7(n,p);return $t.equ(Y,k.size,gl)||k.setSize(Y.width,Y.height,Y.updateStyle,Y.top,Y.left),C&&k.viewport.dpr!==K4(C)&&k.setDpr(C),k.frameloop!==P&&k.setFrameloop(P),k.onPointerMissed||k.set({onPointerMissed:R}),L&&!$t.equ(L,k.performance,gl)&&k.set(J=>({performance:{...J.performance,...L}})),a=w,u=!0,this},render(h){return u||this.configure(),Ip.updateContainer(ve.createElement(_7,{store:s,children:h,onCreated:a,rootElement:n}),o,null,()=>{}),s},unmount(){nA(n)}}}function _7({store:n,children:e,onCreated:t,rootElement:i}){return wf(()=>{const r=n.getState();r.set(s=>({internal:{...s.internal,active:!0}})),t&&t(r),n.getState().events.connected||r.events.connect==null||r.events.connect(i)},[]),ve.createElement(eA.Provider,{value:n},e)}function nA(n,e){const t=tc.get(n),i=t==null?void 0:t.fiber;if(i){const r=t==null?void 0:t.store.getState();r&&(r.internal.active=!1),Ip.updateContainer(null,i,null,()=>{r&&setTimeout(()=>{try{var s,o,a,u;r.events.disconnect==null||r.events.disconnect(),(s=r.gl)==null||(o=s.renderLists)==null||o.dispose==null||o.dispose(),(a=r.gl)==null||a.forceContextLoss==null||a.forceContextLoss(),(u=r.gl)!=null&&u.xr&&r.xr.disconnect(),s7(r),tc.delete(n),e&&e(n)}catch{}},500)})}}Ip.injectIntoDevTools({bundleType:0,rendererPackageName:"@react-three/fiber",version:ve.version});function nc(){return nc=Object.assign?Object.assign.bind():function(n){for(var e=1;e=0?i=setTimeout(u,e-h):(i=null,t||(a=n.apply(s,r),s=r=null))}var f=function(){s=this,r=arguments,o=Date.now();var h=t&&!i;return i||(i=setTimeout(u,e)),h&&(a=n.apply(s,r),s=r=null),a};return f.clear=function(){i&&(clearTimeout(i),i=null)},f.flush=function(){i&&(a=n.apply(s,r),s=r=null,clearTimeout(i),i=null)},f}Bv.debounce=Bv;var x7=Bv;const nM=Gv(x7);function S7(n){let{debounce:e,scroll:t,polyfill:i,offsetSize:r}=n===void 0?{debounce:0,scroll:!1,offsetSize:!1}:n;const s=i||(typeof window>"u"?class{}:window.ResizeObserver);if(!s)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,a]=ve.useState({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),u=ve.useRef({element:null,scrollContainers:null,resizeObserver:null,lastBounds:o}),f=e?typeof e=="number"?e:e.scroll:null,h=e?typeof e=="number"?e:e.resize:null,d=ve.useRef(!1);ve.useEffect(()=>(d.current=!0,()=>void(d.current=!1)));const[p,v,y]=ve.useMemo(()=>{const x=()=>{if(!u.current.element)return;const{left:M,top:T,width:P,height:C,bottom:L,right:D,x:b,y:R}=u.current.element.getBoundingClientRect(),k={left:M,top:T,width:P,height:C,bottom:L,right:D,x:b,y:R};u.current.element instanceof HTMLElement&&r&&(k.height=u.current.element.offsetHeight,k.width=u.current.element.offsetWidth),Object.freeze(k),d.current&&!T7(u.current.lastBounds,k)&&a(u.current.lastBounds=k)};return[x,h?nM(x,h):x,f?nM(x,f):x]},[a,r,f,h]);function w(){u.current.scrollContainers&&(u.current.scrollContainers.forEach(x=>x.removeEventListener("scroll",y,!0)),u.current.scrollContainers=null),u.current.resizeObserver&&(u.current.resizeObserver.disconnect(),u.current.resizeObserver=null)}function S(){u.current.element&&(u.current.resizeObserver=new s(y),u.current.resizeObserver.observe(u.current.element),t&&u.current.scrollContainers&&u.current.scrollContainers.forEach(x=>x.addEventListener("scroll",y,{capture:!0,passive:!0})))}const g=x=>{!x||x===u.current.element||(w(),u.current.element=x,u.current.scrollContainers=iA(x),S())};return w7(y,!!t),M7(v),ve.useEffect(()=>{w(),S()},[t,y,v]),ve.useEffect(()=>w,[]),[g,o,p]}function M7(n){ve.useEffect(()=>{const e=n;return window.addEventListener("resize",e),()=>void window.removeEventListener("resize",e)},[n])}function w7(n,e){ve.useEffect(()=>{if(e){const t=n;return window.addEventListener("scroll",t,{capture:!0,passive:!0}),()=>void window.removeEventListener("scroll",t,!0)}},[n,e])}function iA(n){const e=[];if(!n||n===document.body)return e;const{overflow:t,overflowX:i,overflowY:r}=window.getComputedStyle(n);return[t,i,r].some(s=>s==="auto"||s==="scroll")&&e.push(n),[...e,...iA(n.parentElement)]}const E7=["x","y","top","bottom","left","right","width","height"],T7=(n,e)=>E7.every(t=>n[t]===e[t]);var A7=Object.defineProperty,C7=Object.defineProperties,b7=Object.getOwnPropertyDescriptors,iM=Object.getOwnPropertySymbols,R7=Object.prototype.hasOwnProperty,P7=Object.prototype.propertyIsEnumerable,rM=(n,e,t)=>e in n?A7(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,sM=(n,e)=>{for(var t in e||(e={}))R7.call(e,t)&&rM(n,t,e[t]);if(iM)for(var t of iM(e))P7.call(e,t)&&rM(n,t,e[t]);return n},L7=(n,e)=>C7(n,b7(e));function rA(n,e,t){if(!n)return;if(t(n)===!0)return n;let i=e?n.return:n.child;for(;i;){const r=rA(i,e,t);if(r)return r;i=e?null:i.sibling}}function sA(n){try{return Object.defineProperties(n,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return n}}const C_=sA(ve.createContext(null));class oA extends ve.Component{render(){return ve.createElement(C_.Provider,{value:this._reactInternals},this.props.children)}}const{ReactCurrentOwner:oM,ReactCurrentDispatcher:aM}=ve.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function I7(){const n=ve.useContext(C_);if(n===null)throw new Error("its-fine: useFiber must be called within a !");const e=ve.useId();return ve.useMemo(()=>{for(const i of[oM==null?void 0:oM.current,n,n==null?void 0:n.alternate]){if(!i)continue;const r=rA(i,!1,s=>{let o=s.memoizedState;for(;o;){if(o.memoizedState===e)return!0;o=o.next}});if(r)return r}},[n,e])}function N7(){var n,e;const t=I7(),[i]=ve.useState(()=>new Map);i.clear();let r=t;for(;r;){const s=(n=r.type)==null?void 0:n._context;s&&s!==C_&&!i.has(s)&&i.set(s,(e=aM==null?void 0:aM.current)==null?void 0:e.readContext(sA(s))),r=r.return}return i}function D7(){const n=N7();return ve.useMemo(()=>Array.from(n.keys()).reduce((e,t)=>i=>ve.createElement(e,null,ve.createElement(t.Provider,L7(sM({},i),{value:n.get(t)}))),e=>ve.createElement(oA,sM({},e))),[n])}const Qg={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 U7(n){const{handlePointer:e}=u7(n);return{priority:1,enabled:!0,compute(t,i,r){i.pointer.set(t.offsetX/i.size.width*2-1,-(t.offsetY/i.size.height)*2+1),i.raycaster.setFromCamera(i.pointer,i.camera)},connected:void 0,handlers:Object.keys(Qg).reduce((t,i)=>({...t,[i]:e(i)}),{}),update:()=>{var t;const{events:i,internal:r}=n.getState();(t=r.lastEvent)!=null&&t.current&&i.handlers&&i.handlers.onPointerMove(r.lastEvent.current)},connect:t=>{var i;const{set:r,events:s}=n.getState();s.disconnect==null||s.disconnect(),r(o=>({events:{...o.events,connected:t}})),Object.entries((i=s.handlers)!=null?i:[]).forEach(([o,a])=>{const[u,f]=Qg[o];t.addEventListener(u,a,{passive:f})})},disconnect:()=>{const{set:t,events:i}=n.getState();if(i.connected){var r;Object.entries((r=i.handlers)!=null?r:[]).forEach(([s,o])=>{if(i&&i.connected instanceof HTMLElement){const[a]=Qg[s];i.connected.removeEventListener(a,o)}}),t(s=>({events:{...s.events,connected:void 0}}))}}}}const z7=ve.forwardRef(function({children:e,fallback:t,resize:i,style:r,gl:s,events:o=U7,eventSource:a,eventPrefix:u,shadows:f,linear:h,flat:d,legacy:p,orthographic:v,frameloop:y,dpr:w,performance:S,raycaster:g,camera:x,scene:M,onPointerMissed:T,onCreated:P,...C},L){ve.useMemo(()=>e7(XD),[]);const D=D7(),[b,R]=S7({scroll:!0,debounce:{scroll:50,resize:0},...i}),k=ve.useRef(null),q=ve.useRef(null);ve.useImperativeHandle(L,()=>k.current);const oe=Y4(T),[V,Q]=ve.useState(!1),[te,ae]=ve.useState(!1);if(V)throw V;if(te)throw te;const N=ve.useRef(null);wf(()=>{const H=k.current;R.width>0&&R.height>0&&H&&(N.current||(N.current=y7(H)),N.current.configure({gl:s,events:o,shadows:f,linear:h,flat:d,legacy:p,orthographic:v,frameloop:y,dpr:w,performance:S,raycaster:g,camera:x,scene:M,size:R,onPointerMissed:(...Y)=>oe.current==null?void 0:oe.current(...Y),onCreated:Y=>{Y.events.connect==null||Y.events.connect(a?n7(a)?a.current:a:q.current),u&&Y.setEvents({compute:(J,Z)=>{const ie=J[u+"X"],pe=J[u+"Y"];Z.pointer.set(ie/Z.size.width*2-1,-(pe/Z.size.height)*2+1),Z.raycaster.setFromCamera(Z.pointer,Z.camera)}}),P==null||P(Y)}}),N.current.render(ve.createElement(D,null,ve.createElement(q4,{set:ae},ve.createElement(ve.Suspense,{fallback:ve.createElement(i7,{set:Q})},e)))))}),ve.useEffect(()=>{const H=k.current;if(H)return()=>nA(H)},[]);const B=a?"none":"auto";return ve.createElement("div",nc({ref:q,style:{position:"relative",width:"100%",height:"100%",overflow:"hidden",pointerEvents:B,...r}},C),ve.createElement("div",{ref:b,style:{width:"100%",height:"100%"}},ve.createElement("canvas",{ref:k,style:{display:"block"}},t)))}),O7=ve.forwardRef(function(e,t){return ve.createElement(oA,null,ve.createElement(z7,nc({},e,{ref:t})))}),F7="/my-portfolio/assets/moon-EUT5YxWH.jpg",k7="/my-portfolio/assets/normal-J2JQSlYj.jpg";function B7(){const n=new Dv().load(F7);new Dv().load(k7);const e=ve.useRef();return A_(()=>{e.current.rotation.y+=.002}),fe.jsxs("mesh",{ref:e,children:[fe.jsx("sphereGeometry",{args:[3,64,64]}),fe.jsx("meshStandardMaterial",{map:n})]})}function H7(n){return function(e){n.forEach(function(t){typeof t=="function"?t(e):t!=null&&(t.current=e)})}}var V7=Object.defineProperty,G7=(n,e,t)=>e in n?V7(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,ut=(n,e,t)=>(G7(n,typeof e!="symbol"?e+"":e,t),t);const Pd=new Aa,lM=new gs,W7=Math.cos(70*(Math.PI/180)),cM=(n,e)=>(n%e+e)%e;let X7=class extends es{constructor(e,t){super(),ut(this,"object"),ut(this,"domElement"),ut(this,"enabled",!0),ut(this,"target",new O),ut(this,"minDistance",0),ut(this,"maxDistance",1/0),ut(this,"minZoom",0),ut(this,"maxZoom",1/0),ut(this,"minPolarAngle",0),ut(this,"maxPolarAngle",Math.PI),ut(this,"minAzimuthAngle",-1/0),ut(this,"maxAzimuthAngle",1/0),ut(this,"enableDamping",!1),ut(this,"dampingFactor",.05),ut(this,"enableZoom",!0),ut(this,"zoomSpeed",1),ut(this,"enableRotate",!0),ut(this,"rotateSpeed",1),ut(this,"enablePan",!0),ut(this,"panSpeed",1),ut(this,"screenSpacePanning",!0),ut(this,"keyPanSpeed",7),ut(this,"zoomToCursor",!1),ut(this,"autoRotate",!1),ut(this,"autoRotateSpeed",2),ut(this,"reverseOrbit",!1),ut(this,"reverseHorizontalOrbit",!1),ut(this,"reverseVerticalOrbit",!1),ut(this,"keys",{LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",BOTTOM:"ArrowDown"}),ut(this,"mouseButtons",{LEFT:Zo.ROTATE,MIDDLE:Zo.DOLLY,RIGHT:Zo.PAN}),ut(this,"touches",{ONE:Ko.ROTATE,TWO:Ko.DOLLY_PAN}),ut(this,"target0"),ut(this,"position0"),ut(this,"zoom0"),ut(this,"_domElementKeyEvents",null),ut(this,"getPolarAngle"),ut(this,"getAzimuthalAngle"),ut(this,"setPolarAngle"),ut(this,"setAzimuthalAngle"),ut(this,"getDistance"),ut(this,"listenToKeyEvents"),ut(this,"stopListenToKeyEvents"),ut(this,"saveState"),ut(this,"reset"),ut(this,"update"),ut(this,"connect"),ut(this,"dispose"),this.object=e,this.domElement=t,this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this.getPolarAngle=()=>h.phi,this.getAzimuthalAngle=()=>h.theta,this.setPolarAngle=X=>{let ge=cM(X,2*Math.PI),Oe=h.phi;Oe<0&&(Oe+=2*Math.PI),ge<0&&(ge+=2*Math.PI);let Ue=Math.abs(ge-Oe);2*Math.PI-Ue{let ge=cM(X,2*Math.PI),Oe=h.theta;Oe<0&&(Oe+=2*Math.PI),ge<0&&(ge+=2*Math.PI);let Ue=Math.abs(ge-Oe);2*Math.PI-Uei.object.position.distanceTo(i.target),this.listenToKeyEvents=X=>{X.addEventListener("keydown",tt),this._domElementKeyEvents=X},this.stopListenToKeyEvents=()=>{this._domElementKeyEvents.removeEventListener("keydown",tt),this._domElementKeyEvents=null},this.saveState=()=>{i.target0.copy(i.target),i.position0.copy(i.object.position),i.zoom0=i.object.zoom},this.reset=()=>{i.target.copy(i.target0),i.object.position.copy(i.position0),i.object.zoom=i.zoom0,i.object.updateProjectionMatrix(),i.dispatchEvent(r),i.update(),u=a.NONE},this.update=(()=>{const X=new O,ge=new O(0,1,0),Oe=new oi().setFromUnitVectors(e.up,ge),Ue=Oe.clone().invert(),Me=new O,W=new oi,Re=2*Math.PI;return function(){const it=i.object.position;Oe.setFromUnitVectors(e.up,ge),Ue.copy(Oe).invert(),X.copy(it).sub(i.target),X.applyQuaternion(Oe),h.setFromVector3(X),i.autoRotate&&u===a.NONE&&V(q()),i.enableDamping?(h.theta+=d.theta*i.dampingFactor,h.phi+=d.phi*i.dampingFactor):(h.theta+=d.theta,h.phi+=d.phi);let Ye=i.minAzimuthAngle,At=i.maxAzimuthAngle;isFinite(Ye)&&isFinite(At)&&(Ye<-Math.PI?Ye+=Re:Ye>Math.PI&&(Ye-=Re),At<-Math.PI?At+=Re:At>Math.PI&&(At-=Re),Ye<=At?h.theta=Math.max(Ye,Math.min(At,h.theta)):h.theta=h.theta>(Ye+At)/2?Math.max(Ye,h.theta):Math.min(At,h.theta)),h.phi=Math.max(i.minPolarAngle,Math.min(i.maxPolarAngle,h.phi)),h.makeSafe(),i.enableDamping===!0?i.target.addScaledVector(v,i.dampingFactor):i.target.add(v),i.zoomToCursor&&b||i.object.isOrthographicCamera?h.radius=J(h.radius):h.radius=J(h.radius*p),X.setFromSpherical(h),X.applyQuaternion(Ue),it.copy(i.target).add(X),i.object.matrixAutoUpdate||i.object.updateMatrix(),i.object.lookAt(i.target),i.enableDamping===!0?(d.theta*=1-i.dampingFactor,d.phi*=1-i.dampingFactor,v.multiplyScalar(1-i.dampingFactor)):(d.set(0,0,0),v.set(0,0,0));let Rt=!1;if(i.zoomToCursor&&b){let Gt=null;if(i.object instanceof pn&&i.object.isPerspectiveCamera){const Jt=X.length();Gt=J(Jt*p);const Lt=Jt-Gt;i.object.position.addScaledVector(L,Lt),i.object.updateMatrixWorld()}else if(i.object.isOrthographicCamera){const Jt=new O(D.x,D.y,0);Jt.unproject(i.object),i.object.zoom=Math.max(i.minZoom,Math.min(i.maxZoom,i.object.zoom/p)),i.object.updateProjectionMatrix(),Rt=!0;const Lt=new O(D.x,D.y,0);Lt.unproject(i.object),i.object.position.sub(Lt).add(Jt),i.object.updateMatrixWorld(),Gt=X.length()}else console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."),i.zoomToCursor=!1;Gt!==null&&(i.screenSpacePanning?i.target.set(0,0,-1).transformDirection(i.object.matrix).multiplyScalar(Gt).add(i.object.position):(Pd.origin.copy(i.object.position),Pd.direction.set(0,0,-1).transformDirection(i.object.matrix),Math.abs(i.object.up.dot(Pd.direction))f||8*(1-W.dot(i.object.quaternion))>f?(i.dispatchEvent(r),Me.copy(i.object.position),W.copy(i.object.quaternion),Rt=!1,!0):!1}})(),this.connect=X=>{X===document&&console.error('THREE.OrbitControls: "document" should not be used as the target "domElement". Please use "renderer.domElement" instead.'),i.domElement=X,i.domElement.style.touchAction="none",i.domElement.addEventListener("contextmenu",Ct),i.domElement.addEventListener("pointerdown",ee),i.domElement.addEventListener("pointercancel",ye),i.domElement.addEventListener("wheel",Fe)},this.dispose=()=>{var X,ge,Oe,Ue,Me,W;(X=i.domElement)==null||X.removeEventListener("contextmenu",Ct),(ge=i.domElement)==null||ge.removeEventListener("pointerdown",ee),(Oe=i.domElement)==null||Oe.removeEventListener("pointercancel",ye),(Ue=i.domElement)==null||Ue.removeEventListener("wheel",Fe),(Me=i.domElement)==null||Me.ownerDocument.removeEventListener("pointermove",xe),(W=i.domElement)==null||W.ownerDocument.removeEventListener("pointerup",_e),i._domElementKeyEvents!==null&&i._domElementKeyEvents.removeEventListener("keydown",tt)};const i=this,r={type:"change"},s={type:"start"},o={type:"end"},a={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6};let u=a.NONE;const f=1e-6,h=new Ov,d=new Ov;let p=1;const v=new O,y=new de,w=new de,S=new de,g=new de,x=new de,M=new de,T=new de,P=new de,C=new de,L=new O,D=new de;let b=!1;const R=[],k={};function q(){return 2*Math.PI/60/60*i.autoRotateSpeed}function oe(){return Math.pow(.95,i.zoomSpeed)}function V(X){i.reverseOrbit||i.reverseHorizontalOrbit?d.theta+=X:d.theta-=X}function Q(X){i.reverseOrbit||i.reverseVerticalOrbit?d.phi+=X:d.phi-=X}const te=(()=>{const X=new O;return function(Oe,Ue){X.setFromMatrixColumn(Ue,0),X.multiplyScalar(-Oe),v.add(X)}})(),ae=(()=>{const X=new O;return function(Oe,Ue){i.screenSpacePanning===!0?X.setFromMatrixColumn(Ue,1):(X.setFromMatrixColumn(Ue,0),X.crossVectors(i.object.up,X)),X.multiplyScalar(Oe),v.add(X)}})(),N=(()=>{const X=new O;return function(Oe,Ue){const Me=i.domElement;if(Me&&i.object instanceof pn&&i.object.isPerspectiveCamera){const W=i.object.position;X.copy(W).sub(i.target);let Re=X.length();Re*=Math.tan(i.object.fov/2*Math.PI/180),te(2*Oe*Re/Me.clientHeight,i.object.matrix),ae(2*Ue*Re/Me.clientHeight,i.object.matrix)}else Me&&i.object instanceof Ss&&i.object.isOrthographicCamera?(te(Oe*(i.object.right-i.object.left)/i.object.zoom/Me.clientWidth,i.object.matrix),ae(Ue*(i.object.top-i.object.bottom)/i.object.zoom/Me.clientHeight,i.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),i.enablePan=!1)}})();function B(X){i.object instanceof pn&&i.object.isPerspectiveCamera||i.object instanceof Ss&&i.object.isOrthographicCamera?p/=X:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),i.enableZoom=!1)}function H(X){i.object instanceof pn&&i.object.isPerspectiveCamera||i.object instanceof Ss&&i.object.isOrthographicCamera?p*=X:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),i.enableZoom=!1)}function Y(X){if(!i.zoomToCursor||!i.domElement)return;b=!0;const ge=i.domElement.getBoundingClientRect(),Oe=X.clientX-ge.left,Ue=X.clientY-ge.top,Me=ge.width,W=ge.height;D.x=Oe/Me*2-1,D.y=-(Ue/W)*2+1,L.set(D.x,D.y,1).unproject(i.object).sub(i.object.position).normalize()}function J(X){return Math.max(i.minDistance,Math.min(i.maxDistance,X))}function Z(X){y.set(X.clientX,X.clientY)}function ie(X){Y(X),T.set(X.clientX,X.clientY)}function pe(X){g.set(X.clientX,X.clientY)}function Ee(X){w.set(X.clientX,X.clientY),S.subVectors(w,y).multiplyScalar(i.rotateSpeed);const ge=i.domElement;ge&&(V(2*Math.PI*S.x/ge.clientHeight),Q(2*Math.PI*S.y/ge.clientHeight)),y.copy(w),i.update()}function Te(X){P.set(X.clientX,X.clientY),C.subVectors(P,T),C.y>0?B(oe()):C.y<0&&H(oe()),T.copy(P),i.update()}function nt(X){x.set(X.clientX,X.clientY),M.subVectors(x,g).multiplyScalar(i.panSpeed),N(M.x,M.y),g.copy(x),i.update()}function lt(X){Y(X),X.deltaY<0?H(oe()):X.deltaY>0&&B(oe()),i.update()}function Xe(X){let ge=!1;switch(X.code){case i.keys.UP:N(0,i.keyPanSpeed),ge=!0;break;case i.keys.BOTTOM:N(0,-i.keyPanSpeed),ge=!0;break;case i.keys.LEFT:N(i.keyPanSpeed,0),ge=!0;break;case i.keys.RIGHT:N(-i.keyPanSpeed,0),ge=!0;break}ge&&(X.preventDefault(),i.update())}function Ke(){if(R.length==1)y.set(R[0].pageX,R[0].pageY);else{const X=.5*(R[0].pageX+R[1].pageX),ge=.5*(R[0].pageY+R[1].pageY);y.set(X,ge)}}function G(){if(R.length==1)g.set(R[0].pageX,R[0].pageY);else{const X=.5*(R[0].pageX+R[1].pageX),ge=.5*(R[0].pageY+R[1].pageY);g.set(X,ge)}}function we(){const X=R[0].pageX-R[1].pageX,ge=R[0].pageY-R[1].pageY,Oe=Math.sqrt(X*X+ge*ge);T.set(0,Oe)}function me(){i.enableZoom&&we(),i.enablePan&&G()}function Ce(){i.enableZoom&&we(),i.enableRotate&&Ke()}function he(X){if(R.length==1)w.set(X.pageX,X.pageY);else{const Oe=He(X),Ue=.5*(X.pageX+Oe.x),Me=.5*(X.pageY+Oe.y);w.set(Ue,Me)}S.subVectors(w,y).multiplyScalar(i.rotateSpeed);const ge=i.domElement;ge&&(V(2*Math.PI*S.x/ge.clientHeight),Q(2*Math.PI*S.y/ge.clientHeight)),y.copy(w)}function Ze(X){if(R.length==1)x.set(X.pageX,X.pageY);else{const ge=He(X),Oe=.5*(X.pageX+ge.x),Ue=.5*(X.pageY+ge.y);x.set(Oe,Ue)}M.subVectors(x,g).multiplyScalar(i.panSpeed),N(M.x,M.y),g.copy(x)}function Ne(X){const ge=He(X),Oe=X.pageX-ge.x,Ue=X.pageY-ge.y,Me=Math.sqrt(Oe*Oe+Ue*Ue);P.set(0,Me),C.set(0,Math.pow(P.y/T.y,i.zoomSpeed)),B(C.y),T.copy(P)}function U(X){i.enableZoom&&Ne(X),i.enablePan&&Ze(X)}function I(X){i.enableZoom&&Ne(X),i.enableRotate&&he(X)}function ee(X){var ge,Oe;i.enabled!==!1&&(R.length===0&&((ge=i.domElement)==null||ge.ownerDocument.addEventListener("pointermove",xe),(Oe=i.domElement)==null||Oe.ownerDocument.addEventListener("pointerup",_e)),yt(X),X.pointerType==="touch"?dt(X):je(X))}function xe(X){i.enabled!==!1&&(X.pointerType==="touch"?Se(X):Le(X))}function _e(X){var ge,Oe,Ue;ct(X),R.length===0&&((ge=i.domElement)==null||ge.releasePointerCapture(X.pointerId),(Oe=i.domElement)==null||Oe.ownerDocument.removeEventListener("pointermove",xe),(Ue=i.domElement)==null||Ue.ownerDocument.removeEventListener("pointerup",_e)),i.dispatchEvent(o),u=a.NONE}function ye(X){ct(X)}function je(X){let ge;switch(X.button){case 0:ge=i.mouseButtons.LEFT;break;case 1:ge=i.mouseButtons.MIDDLE;break;case 2:ge=i.mouseButtons.RIGHT;break;default:ge=-1}switch(ge){case Zo.DOLLY:if(i.enableZoom===!1)return;ie(X),u=a.DOLLY;break;case Zo.ROTATE:if(X.ctrlKey||X.metaKey||X.shiftKey){if(i.enablePan===!1)return;pe(X),u=a.PAN}else{if(i.enableRotate===!1)return;Z(X),u=a.ROTATE}break;case Zo.PAN:if(X.ctrlKey||X.metaKey||X.shiftKey){if(i.enableRotate===!1)return;Z(X),u=a.ROTATE}else{if(i.enablePan===!1)return;pe(X),u=a.PAN}break;default:u=a.NONE}u!==a.NONE&&i.dispatchEvent(s)}function Le(X){if(i.enabled!==!1)switch(u){case a.ROTATE:if(i.enableRotate===!1)return;Ee(X);break;case a.DOLLY:if(i.enableZoom===!1)return;Te(X);break;case a.PAN:if(i.enablePan===!1)return;nt(X);break}}function Fe(X){i.enabled===!1||i.enableZoom===!1||u!==a.NONE&&u!==a.ROTATE||(X.preventDefault(),i.dispatchEvent(s),lt(X),i.dispatchEvent(o))}function tt(X){i.enabled===!1||i.enablePan===!1||Xe(X)}function dt(X){switch(et(X),R.length){case 1:switch(i.touches.ONE){case Ko.ROTATE:if(i.enableRotate===!1)return;Ke(),u=a.TOUCH_ROTATE;break;case Ko.PAN:if(i.enablePan===!1)return;G(),u=a.TOUCH_PAN;break;default:u=a.NONE}break;case 2:switch(i.touches.TWO){case Ko.DOLLY_PAN:if(i.enableZoom===!1&&i.enablePan===!1)return;me(),u=a.TOUCH_DOLLY_PAN;break;case Ko.DOLLY_ROTATE:if(i.enableZoom===!1&&i.enableRotate===!1)return;Ce(),u=a.TOUCH_DOLLY_ROTATE;break;default:u=a.NONE}break;default:u=a.NONE}u!==a.NONE&&i.dispatchEvent(s)}function Se(X){switch(et(X),u){case a.TOUCH_ROTATE:if(i.enableRotate===!1)return;he(X),i.update();break;case a.TOUCH_PAN:if(i.enablePan===!1)return;Ze(X),i.update();break;case a.TOUCH_DOLLY_PAN:if(i.enableZoom===!1&&i.enablePan===!1)return;U(X),i.update();break;case a.TOUCH_DOLLY_ROTATE:if(i.enableZoom===!1&&i.enableRotate===!1)return;I(X),i.update();break;default:u=a.NONE}}function Ct(X){i.enabled!==!1&&X.preventDefault()}function yt(X){R.push(X)}function ct(X){delete k[X.pointerId];for(let ge=0;gep.size),r=Vi(p=>p.viewport),s=typeof n=="number"?n:i.width*r.dpr,o=typeof e=="number"?e:i.height*r.dpr,a=(typeof n=="number"?t:n)||{},{samples:u=0,depth:f,...h}=a,d=ve.useMemo(()=>{const p=new gr(s,o,{minFilter:sn,magFilter:sn,type:xa,...h});return f&&(p.depthTexture=new im(s,o,hr)),p.samples=u,p},[]);return ve.useLayoutEffect(()=>{d.setSize(s,o),u&&(d.samples=u)},[u,d,s,o]),ve.useEffect(()=>()=>d.dispose(),[]),d}const Y7=n=>typeof n=="function",q7=ve.forwardRef(({envMap:n,resolution:e=256,frames:t=1/0,makeDefault:i,children:r,...s},o)=>{const a=Vi(({set:S})=>S),u=Vi(({camera:S})=>S),f=Vi(({size:S})=>S),h=ve.useRef(null),d=ve.useRef(null),p=j7(e);ve.useLayoutEffect(()=>{s.manual||(h.current.aspect=f.width/f.height)},[f,s]),ve.useLayoutEffect(()=>{h.current.updateProjectionMatrix()});let v=0,y=null;const w=Y7(r);return A_(S=>{w&&(t===1/0||v{if(i){const S=u;return a(()=>({camera:h.current})),()=>a(()=>({camera:S}))}},[h,i,a]),ve.createElement(ve.Fragment,null,ve.createElement("perspectiveCamera",nc({ref:H7([h,o])},s),!w&&r),ve.createElement("group",{ref:d},w&&r(p.texture)))}),Z7=ve.forwardRef(({makeDefault:n,camera:e,regress:t,domElement:i,enableDamping:r=!0,keyEvents:s=!1,onChange:o,onStart:a,onEnd:u,...f},h)=>{const d=Vi(C=>C.invalidate),p=Vi(C=>C.camera),v=Vi(C=>C.gl),y=Vi(C=>C.events),w=Vi(C=>C.setEvents),S=Vi(C=>C.set),g=Vi(C=>C.get),x=Vi(C=>C.performance),M=e||p,T=i||y.connected||v.domElement,P=ve.useMemo(()=>new X7(M),[M]);return A_(()=>{P.enabled&&P.update()},-1),ve.useEffect(()=>(s&&P.connect(s===!0?T:s),P.connect(T),()=>void P.dispose()),[s,T,t,P,d]),ve.useEffect(()=>{const C=b=>{d(),t&&x.regress(),o&&o(b)},L=b=>{a&&a(b)},D=b=>{u&&u(b)};return P.addEventListener("change",C),P.addEventListener("start",L),P.addEventListener("end",D),()=>{P.removeEventListener("start",L),P.removeEventListener("end",D),P.removeEventListener("change",C)}},[o,a,u,P,d,w]),ve.useEffect(()=>{if(n){const C=g().controls;return S({controls:P}),()=>S({controls:C})}},[n,P]),ve.createElement("primitive",nc({ref:h,object:P,enableDamping:r},f))}),ii=["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","55","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"];let uM=1234567;const aA=Math.PI/180,lA=180/Math.PI;function K7(){const n=Math.random()*4294967295|0,e=Math.random()*4294967295|0,t=Math.random()*4294967295|0,i=Math.random()*4294967295|0;return(ii[n&255]+ii[n>>8&255]+ii[n>>16&255]+ii[n>>24&255]+"-"+ii[e&255]+ii[e>>8&255]+"-"+ii[e>>16&15|64]+ii[e>>24&255]+"-"+ii[t&63|128]+ii[t>>8&255]+"-"+ii[t>>16&255]+ii[t>>24&255]+ii[i&255]+ii[i>>8&255]+ii[i>>16&255]+ii[i>>24&255]).toLowerCase()}function J7(n,e,t){return Math.max(e,Math.min(t,n))}function cA(n,e){return(n%e+e)%e}function Q7(n,e,t,i,r){return i+(n-e)*(r-i)/(t-e)}function $7(n,e,t){return n!==e?(t-n)/(e-n):0}function uA(n,e,t){return(1-t)*n+t*e}function eU(n,e,t,i){return uA(n,e,1-Math.exp(-t*i))}function tU(n,e=1){return e-Math.abs(cA(n,e*2)-e)}function nU(n,e,t){return n<=e?0:n>=t?1:(n=(n-e)/(t-e),n*n*(3-2*n))}function iU(n,e,t){return n<=e?0:n>=t?1:(n=(n-e)/(t-e),n*n*n*(n*(n*6-15)+10))}function rU(n,e){return n+Math.floor(Math.random()*(e-n+1))}function sU(n,e){return n+Math.random()*(e-n)}function oU(n){return n*(.5-Math.random())}function aU(n){n!==void 0&&(uM=n);let e=uM+=1831565813;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}function lU(n){return n*aA}function cU(n){return n*lA}function uU(n){return(n&n-1)===0&&n!==0}function fU(n){return Math.pow(2,Math.ceil(Math.log(n)/Math.LN2))}function hU(n){return Math.pow(2,Math.floor(Math.log(n)/Math.LN2))}function dU(n,e,t,i,r){const s=Math.cos,o=Math.sin,a=s(t/2),u=o(t/2),f=s((e+i)/2),h=o((e+i)/2),d=s((e-i)/2),p=o((e-i)/2),v=s((i-e)/2),y=o((i-e)/2);switch(r){case"XYX":n.set(a*h,u*d,u*p,a*f);break;case"YZY":n.set(u*p,a*h,u*d,a*f);break;case"ZXZ":n.set(u*d,u*p,a*h,a*f);break;case"XZX":n.set(a*h,u*y,u*v,a*f);break;case"YXY":n.set(u*v,a*h,u*y,a*f);break;case"ZYZ":n.set(u*y,u*v,a*h,a*f);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+r)}}function pU(n,e){switch(e.constructor){case Float32Array:return n;case Uint32Array:return n/4294967295;case Uint16Array:return n/65535;case Uint8Array:return n/255;case Int32Array:return Math.max(n/2147483647,-1);case Int16Array:return Math.max(n/32767,-1);case Int8Array:return Math.max(n/127,-1);default:throw new Error("Invalid component type.")}}function mU(n,e){switch(e.constructor){case Float32Array:return n;case Uint32Array:return Math.round(n*4294967295);case Uint16Array:return Math.round(n*65535);case Uint8Array:return Math.round(n*255);case Int32Array:return Math.round(n*2147483647);case Int16Array:return Math.round(n*32767);case Int8Array:return Math.round(n*127);default:throw new Error("Invalid component type.")}}const gU={DEG2RAD:aA,RAD2DEG:lA,generateUUID:K7,clamp:J7,euclideanModulo:cA,mapLinear:Q7,inverseLerp:$7,lerp:uA,damp:eU,pingpong:tU,smoothstep:nU,smootherstep:iU,randInt:rU,randFloat:sU,randFloatSpread:oU,seededRandom:aU,degToRad:lU,radToDeg:cU,isPowerOfTwo:uU,ceilPowerOfTwo:fU,floorPowerOfTwo:hU,setQuaternionFromProperEuler:dU,normalize:mU,denormalize:pU};function vU(){const n=Array(3).fill().map(()=>gU.randFloatSpread(200));return fe.jsxs("mesh",{position:n,children:[fe.jsx("sphereGeometry",{args:[.25,24,24]}),fe.jsx("meshBasicMaterial",{color:"#ffffff"})]})}function yU(){return fe.jsxs(O7,{children:[fe.jsx(q7,{makeDefault:!0,fov:50,position:[0,0,10]}),fe.jsx("color",{args:[0,0,0],attach:"background"}),fe.jsx("ambientLight",{intensity:.5}),fe.jsx("pointLight",{position:[-5,1.5,5],angle:.5,intensity:200}),fe.jsx(B7,{}),fe.jsx(Z7,{enableZoom:!1,enableDamping:!0,autoRotate:!0,autoRotateSpeed:.4}),Array(200).fill().map((n,e)=>fe.jsx(vU,{},e))]})}const _U="/my-portfolio/assets/SitePhoto-ttmvt0EA.jpg";function xU(){return fe.jsx("div",{className:"bg-blue-950",children:fe.jsxs("div",{className:"p-8 flex flex-col md:flex-row justify-around container mx-auto",children:[fe.jsxs("div",{className:"flex-1 justify-center",children:[fe.jsxs("h2",{className:"text-3xl font-bold mb-4 text-center my-2 flex justify-start text-white",children:["Hi there",fe.jsxs("picture",{className:"mx-2",children:[fe.jsx("source",{srcSet:"https://fonts.gstatic.com/s/e/notoemoji/latest/1f44b/512.webp",type:"image/webp"}),fe.jsx("img",{src:"https://fonts.gstatic.com/s/e/notoemoji/latest/1f44b/512.gif",alt:"👋",width:"32",height:"32"})]})]}),fe.jsx("p",{className:"text-gray-200 mx-auto",children:"Hi there! I'm Abhinav Choudhary, a passionate developer who loves creating awesome web applications. I have experience with front-end technologies like React and enjoy exploring new technologies to enhance my skills."}),fe.jsx("p",{className:"text-gray-200 mt-2",children:"In my free time, I enjoy solving coding challenges, making games, and staying up-to-date with the latest trends in the tech world."})]}),fe.jsx("div",{className:"flex-1 flex justify-center items-center",children:fe.jsx("img",{src:_U,alt:"Avatar",className:"rounded-full object-cover w-full md:w-64 h-auto my-2 md:mb-0 shadow-md shadow-white/70 hover:shadow-white hover:shadow-lg"})})]})})}function SU(n){return Vt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M243.583 91.6027L323.695 138.384C326.575 140.026 326.68 144.583 323.695 146.225L228.503 201.854C225.623 203.55 222.22 203.444 219.549 201.854L124.357 146.225C121.425 144.636 121.373 139.973 124.357 138.384L204.417 91.6027V0L0 119.417V358.252L78.3843 312.477V218.914C78.3319 215.576 82.2066 213.192 85.0865 214.993L180.279 270.622C183.159 272.318 184.782 275.338 184.782 278.464V389.669C184.834 393.007 180.959 395.391 178.079 393.589L97.9673 346.808L19.583 392.583L224 512L428.417 392.583L350.033 346.808L269.921 393.589C267.093 395.338 263.114 393.06 263.218 389.669V278.464C263.218 275.126 265.051 272.159 267.721 270.622L362.914 214.993C365.741 213.245 369.72 215.47 369.616 218.914V312.477L448 358.252V119.417L243.583 0V91.6027Z"},child:[]}]})(n)}function MU(n){return Vt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M32 32v448h448V32zm240 348c0 43.61-25.76 64.87-63.05 64.87-33.68 0-53.23-17.44-63.15-38.49l34.28-20.75c6.61 11.73 11.63 21.65 26.06 21.65 12 0 21.86-5.41 21.86-26.46V240h44zm99.35 63.87c-39.09 0-64.35-17.64-76.68-42L329 382c9 14.74 20.75 24.56 41.5 24.56 17.44 0 27.57-7.72 27.57-19.75 0-14.43-10.43-19.54-29.68-28l-10.52-4.52c-30.38-12.92-50.52-29.16-50.52-63.45 0-31.57 24.05-54.63 61.64-54.63 26.77 0 46 8.32 59.85 32.68L396 290c-7.22-12.93-15-18-27.06-18-12.33 0-20.15 7.82-20.15 18 0 12.63 7.82 17.74 25.86 25.56l10.52 4.51c35.79 15.34 55.94 31 55.94 66.16.01 37.9-29.76 57.64-69.76 57.64z"},child:[]}]})(n)}function wU(n){return Vt({tag:"svg",attr:{viewBox:"0 0 16 16",fill:"currentColor"},child:[{tag:"path",attr:{d:"M13.281 11.156a.84.84 0 0 1 .375.297c.084.125.143.276.18.453.02.104.044.2.07.29a1.772 1.772 0 0 0 .219.476c.047.073.11.153.188.242.067.073.127.167.18.281a.793.793 0 0 1 .077.328.49.49 0 0 1-.093.305.944.944 0 0 1-.235.219c-.12.083-.245.156-.375.219-.13.062-.26.127-.39.195a3.624 3.624 0 0 0-.555.328c-.156.115-.313.26-.469.438a2.815 2.815 0 0 1-.625.523 1.471 1.471 0 0 1-.383.172c-.13.036-.26.06-.39.07-.302 0-.552-.052-.75-.156-.198-.104-.37-.294-.516-.57-.042-.079-.083-.128-.125-.149a.774.774 0 0 0-.203-.055L8.67 15c-.26-.02-.525-.031-.796-.031a4.28 4.28 0 0 0-.672.054c-.229.037-.456.081-.68.133-.046.01-.093.05-.14.117a1.7 1.7 0 0 1-.196.227 1.106 1.106 0 0 1-.335.219 1.475 1.475 0 0 1-.555.101c-.172 0-.357-.018-.555-.054a1.82 1.82 0 0 1-.531-.18 3.578 3.578 0 0 0-.953-.328c-.313-.057-.643-.11-.992-.156a3.392 3.392 0 0 1-.344-.063.774.774 0 0 1-.29-.133.705.705 0 0 1-.194-.219.78.78 0 0 1-.079-.351c0-.162.021-.318.063-.469.042-.15.065-.31.07-.476 0-.115-.008-.227-.023-.336a3.53 3.53 0 0 1-.032-.352c0-.265.063-.46.188-.586.125-.125.307-.224.547-.297a.99.99 0 0 0 .297-.148 2.27 2.27 0 0 0 .234-.203 1.86 1.86 0 0 0 .203-.242c.063-.089.133-.178.211-.266a.114.114 0 0 0 .024-.07c0-.063-.003-.123-.008-.18l-.016-.188c0-.354.055-.71.164-1.07.11-.36.253-.71.43-1.055a9.08 9.08 0 0 1 .594-.992c.218-.317.435-.612.648-.883a4.35 4.35 0 0 0 .68-1.203c.15-.416.229-.87.234-1.36 0-.207-.01-.413-.031-.616a6.122 6.122 0 0 1-.031-.625c0-.417.047-.792.14-1.125.094-.334.24-.62.438-.86s.456-.419.773-.539C7.474.075 7.854.01 8.296 0c.527 0 .946.104 1.259.313.312.208.552.481.718.82.167.338.274.716.32 1.133.048.416.074.838.079 1.265v.133c0 .214.002.404.008.57a2.527 2.527 0 0 0 .226.977c.073.161.182.336.328.523.25.329.506.66.766.993.26.333.497.677.71 1.03.214.355.389.725.524 1.11.136.386.206.802.211 1.25a3.3 3.3 0 0 1-.164 1.04zm-6.554-8.14c.072 0 .132.018.18.054a.357.357 0 0 1 .109.149.85.85 0 0 1 .054.187c.01.063.016.128.016.196a.282.282 0 0 1-.024.125.27.27 0 0 1-.07.086l-.094.078a.796.796 0 0 0-.093.093.428.428 0 0 1-.149.141 2.129 2.129 0 0 0-.18.117 1.31 1.31 0 0 0-.156.133.264.264 0 0 0-.07.195c0 .047.023.086.07.117a.704.704 0 0 1 .266.305c.052.12.11.237.172.352.062.114.143.21.242.289.099.078.253.117.46.117h.048c.208-.01.406-.065.594-.164.187-.099.375-.203.562-.313a.633.633 0 0 1 .102-.046.37.37 0 0 0 .101-.055l.57-.445a.926.926 0 0 0 .024-.102 2.75 2.75 0 0 0 .016-.11.236.236 0 0 0-.04-.14.4.4 0 0 0-.093-.094.34.34 0 0 0-.133-.054.909.909 0 0 1-.14-.04 1.083 1.083 0 0 1-.352-.14 1.457 1.457 0 0 0-.344-.156c-.02-.006-.036-.021-.047-.047a.983.983 0 0 1-.031-.094.23.23 0 0 1-.008-.102.126.126 0 0 0-.008-.078c0-.062.005-.127.016-.195a.551.551 0 0 1 .07-.195.417.417 0 0 1 .125-.14.411.411 0 0 1 .203-.056c.162 0 .279.06.352.18.073.12.112.25.117.39a.397.397 0 0 1-.039.18.379.379 0 0 0-.04.172c0 .042.014.07.04.086a.26.26 0 0 0 .102.031c.12 0 .197-.028.234-.085a.533.533 0 0 0 .062-.258c0-.12-.01-.253-.03-.399a1.32 1.32 0 0 0-.126-.406.969.969 0 0 0-.242-.313.574.574 0 0 0-.383-.124c-.27 0-.466.067-.586.203-.12.135-.182.338-.187.609 0 .078.005.156.015.234.01.079.016.157.016.235 0 .026-.003.039-.008.039a.218.218 0 0 1-.047-.016 4.263 4.263 0 0 1-.093-.039.774.774 0 0 0-.118-.039.514.514 0 0 0-.203-.008 1.007 1.007 0 0 1-.125.008c-.073 0-.11-.013-.11-.039 0-.078-.004-.177-.015-.297-.01-.12-.036-.24-.078-.36a.995.995 0 0 0-.156-.296c-.063-.078-.156-.12-.281-.125a.323.323 0 0 0-.227.086.905.905 0 0 0-.164.203.64.64 0 0 0-.086.266 5.4 5.4 0 0 1-.031.25 1.459 1.459 0 0 0 .07.406c.026.083.055.156.086.219.031.062.068.093.11.093.025 0 .06-.018.101-.054.042-.037.063-.07.063-.102 0-.016-.008-.026-.024-.031a.147.147 0 0 0-.047-.008c-.036 0-.068-.018-.094-.055a.468.468 0 0 1-.062-.125 5.144 5.144 0 0 1-.047-.148.564.564 0 0 1 .055-.398c.047-.084.133-.128.258-.133zM5.023 15.18c.125 0 .248-.01.368-.032a.97.97 0 0 0 .336-.125.614.614 0 0 0 .234-.242.943.943 0 0 0 .094-.375.816.816 0 0 0-.047-.273.963.963 0 0 0-.133-.25 2.763 2.763 0 0 0-.203-.281 2.763 2.763 0 0 1-.203-.282 62.93 62.93 0 0 1-.29-.43c-.093-.14-.187-.288-.28-.445a8.124 8.124 0 0 1-.235-.406 2.646 2.646 0 0 0-.266-.398 1.203 1.203 0 0 0-.218-.211.469.469 0 0 0-.29-.094.436.436 0 0 0-.296.11 2.26 2.26 0 0 0-.258.265 3.241 3.241 0 0 1-.297.305c-.11.099-.25.177-.422.234a.744.744 0 0 0-.312.172c-.073.073-.11.185-.11.336 0 .104.008.208.024.312.015.104.026.209.031.313 0 .14-.02.273-.063.398a1.157 1.157 0 0 0-.062.367c0 .141.05.24.148.297.1.058.211.097.336.117.157.027.305.047.446.063.14.016.278.04.414.07.135.032.27.065.406.102.135.036.279.094.43.172.03.015.078.034.14.054l.211.07c.078.027.151.048.219.063a.741.741 0 0 0 .148.024zm2.86-.938c.146 0 .302-.015.469-.047a3.54 3.54 0 0 0 .976-.336 2.59 2.59 0 0 0 .406-.257.222.222 0 0 0 .032-.047.305.305 0 0 0 .023-.063v-.008c.031-.114.057-.24.078-.375a8.63 8.63 0 0 0 .055-.414 8.98 8.98 0 0 1 .055-.414c.02-.135.039-.268.054-.398.021-.14.047-.276.078-.406.032-.13.073-.253.125-.368a1.03 1.03 0 0 1 .211-.304 1.54 1.54 0 0 1 .344-.25v-.016l-.008-.023a.29.29 0 0 1 .047-.149 1.4 1.4 0 0 1 .117-.164.582.582 0 0 1 .149-.133.946.946 0 0 1 .164-.078 9.837 9.837 0 0 0-.102-.375 4.938 4.938 0 0 1-.094-.375 7.126 7.126 0 0 0-.093-.476 2.954 2.954 0 0 0-.11-.36 1.317 1.317 0 0 0-.18-.32c-.077-.104-.174-.23-.288-.375a1.189 1.189 0 0 1-.118-.156.555.555 0 0 1-.046-.196 2.206 2.206 0 0 0-.047-.203 9.48 9.48 0 0 0-.242-.75 2.91 2.91 0 0 0-.172-.383 3.87 3.87 0 0 0-.172-.289c-.052-.078-.107-.117-.164-.117-.125 0-.274.05-.446.149-.171.099-.354.208-.546.328-.193.12-.38.232-.563.336-.182.104-.346.153-.492.148a.7.7 0 0 1-.43-.148 2.236 2.236 0 0 1-.36-.344c-.109-.13-.2-.242-.273-.336-.073-.094-.127-.146-.164-.156-.041 0-.065.031-.07.093a2.56 2.56 0 0 0-.008.211v.133c0 .032-.005.052-.016.063-.057.12-.12.237-.187.351-.068.115-.135.232-.203.352a1.611 1.611 0 0 0-.219.758c0 .078.005.156.016.234.01.078.036.154.078.227l-.016.03a1.31 1.31 0 0 1-.133.157 1.072 1.072 0 0 0-.132.164 2.796 2.796 0 0 0-.407.93c-.078.333-.12.672-.125 1.015 0 .089.006.178.016.266.01.089.016.177.016.266a.526.526 0 0 1-.008.086.525.525 0 0 0-.008.086.75.75 0 0 1 .313.109c.12.068.25.154.39.258.14.104.274.224.399.36.125.135.244.267.359.398.115.13.198.26.25.39.052.13.086.237.101.32a.444.444 0 0 1-.125.329.955.955 0 0 1-.312.203c.089.156.198.289.328.398.13.11.271.198.422.266.151.068.315.117.492.148.177.032.35.047.516.047zm3.133 1.11c.109 0 .216-.016.32-.047a1.65 1.65 0 0 0 .445-.203c.136-.089.26-.198.375-.329a3.07 3.07 0 0 1 .977-.75l.258-.117a2.18 2.18 0 0 0 .257-.133.962.962 0 0 0 .165-.132.256.256 0 0 0 .078-.188.295.295 0 0 0-.024-.117.58.58 0 0 0-.07-.117 5.136 5.136 0 0 1-.203-.305 1.978 1.978 0 0 1-.149-.297l-.125-.312a2.558 2.558 0 0 1-.11-.352.28.28 0 0 0-.054-.101.53.53 0 0 0-.46-.235.533.533 0 0 0-.266.07l-.266.149a7.335 7.335 0 0 1-.281.148.656.656 0 0 1-.297.07.411.411 0 0 1-.258-.077.636.636 0 0 1-.172-.211 2.218 2.218 0 0 1-.117-.258l-.094-.258a1.26 1.26 0 0 1-.14.188.666.666 0 0 0-.125.203c-.068.156-.11.33-.125.523-.026.302-.06.596-.102.883a4.7 4.7 0 0 1-.21.86 1.914 1.914 0 0 0-.063.273 2.88 2.88 0 0 0-.032.289c0 .255.079.466.235.633.156.166.367.25.633.25z"},child:[]}]})(n)}function EU(n){return Vt({tag:"svg",attr:{viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},child:[]},{tag:"path",attr:{d:"M10 9a3 3 0 0 0 -3 -3h-.5a3.5 3.5 0 0 0 -3.5 3.5v5a3.5 3.5 0 0 0 3.5 3.5h.5a3 3 0 0 0 3 -3"},child:[]},{tag:"path",attr:{d:"M16 7l-1 10"},child:[]},{tag:"path",attr:{d:"M20 7l-1 10"},child:[]},{tag:"path",attr:{d:"M14 10h7.5"},child:[]},{tag:"path",attr:{d:"M21 14h-7.5"},child:[]}]})(n)}function TU(n){return Vt({tag:"svg",attr:{viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},child:[]},{tag:"path",attr:{d:"M18 12h4"},child:[]},{tag:"path",attr:{d:"M20 10v4"},child:[]},{tag:"path",attr:{d:"M11 12h4"},child:[]},{tag:"path",attr:{d:"M13 10v4"},child:[]},{tag:"path",attr:{d:"M9 9a3 3 0 0 0 -3 -3h-.5a3.5 3.5 0 0 0 -3.5 3.5v5a3.5 3.5 0 0 0 3.5 3.5h.5a3 3 0 0 0 3 -3"},child:[]}]})(n)}function AU(n){return Vt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M18.344 8.71c-.707 0-1.279.572-1.279 1.278v4.53a1.278 1.278 0 1 0 2.558 0v-4.53c0-.706-.572-1.278-1.279-1.278zm-12.688 0c-.707 0-1.279.572-1.279 1.278v4.53a1.278 1.278 0 1 0 2.558 0v-4.53A1.277 1.277 0 0 0 5.656 8.71zm8.889-3.809.768-1.388a.343.343 0 0 0-.133-.47.344.344 0 0 0-.471.135l-.789 1.42c-.588-.235-1.236-.368-1.92-.368s-1.332.132-1.92.367l-.789-1.418a.344.344 0 0 0-.471-.135.345.345 0 0 0-.133.47l.768 1.388C8.072 5.69 7.148 7.099 7.148 8.71c0 .011 0 .021.002.034-.002.006-.002.013-.002.019v.001h9.703V8.71c.001-1.611-.923-3.019-2.306-3.809zM9.76 6.869a.346.346 0 1 1 .005-.693.346.346 0 0 1-.005.693zm4.48 0a.347.347 0 0 1 0-.692.346.346 0 0 1 0 .692zM7.148 16.12c0 .646.525 1.171 1.174 1.171h.586v2.401a1.279 1.279 0 0 0 2.558 0v-2.401h1.066v2.401c0 .707.572 1.278 1.277 1.278.709 0 1.281-.571 1.281-1.278v-2.401h.586c.648 0 1.174-.524 1.174-1.171V9.028H7.148v7.092z"},child:[]}]})(n)}function CU(n){return Vt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M13.78 18.29c0 .12.15 0 0 0zm-3.35-2.7c.39.17-.31-.6 0 0zm-5.03.28c.15.26 0-.12 0 0zm5.6.39c-.27-.42-.2.06 0 .32.48.47.18-.26 0-.32z"},child:[]},{tag:"path",attr:{d:"M20.24 19.06c-.53.63-1-.07-1.63.13-1.1 0 .09-.5.06-1-.58-.45-1.24.61-1.62.9a10.75 10.75 0 0 1-2.67-.83 8 8 0 0 1-2.6-1.94 8.36 8.36 0 0 1-1.87-2.84 21.36 21.36 0 0 1-.84-5.74c.07-1.3 1.44.14 2-.33-.21-.67-1.29-.88-1.89-1.16-.58 0-.79-.55-1.4-.59 0-.73-1.13-.33-1.56-.84.42-1.08-1.37 0-1.23-.91.58-1.2-1.78-1-.8.06.95.54-.93.93-.38 1.29a.59.59 0 0 1-.53.86c-.74.07-.67 1.09.06.55.81-.25.14.11-.25.18a1.3 1.3 0 0 0-.95 1.9 35.32 35.32 0 0 1 1 3.42A16.25 16.25 0 0 0 5.84 17 9.78 9.78 0 0 0 8 19a9.89 9.89 0 0 0 2.43 1.22 18 18 0 0 0 4.73.73 16.53 16.53 0 0 0 2.9-.24c.87.09 1.49-.65 2.26-.26.48-.42 1.16-.23 1.63-.54.32-1.22-1.22-.27-1.71-.85zm-1.74-.74c-.22 0 .05-.34 0 0zm-7.63-11c-.1 0-.08-.12-.16-.15-.8-.37.39-.23.16.19zm6.76 11.39c-.35-.08.28-.25 0 0zm-2.81.11c-.23 0 .18-.14 0 0zm-1.88-1.18c-.13 0 0-.13 0 0zm-.22-.17c-.36 0-.09-.23 0 0zm-.42-.36c-.33.08 0-.34 0 0zm-6-11.66c-.53-.28.11.33-.34.32-.24 0-.69-.52-.54-.78.3.16.83.21.92.5zm-.92-.81h-.11c-.03-.27.87-.06.15.04zm-1.02-.79c-.42-.19 0-.93.44-.58.51.73-.95-.08-.44.58zm.49.69c-.27.11.16-.21 0 0zm.48.92c.6.46-.34 0-.72.29-.61.06.66-.34.72-.29zm.17.6c.35 0 1.88-.69 1.37-.07.47.55.1.37-.21 0 .28.19.06 1-.37.45s-.5-.18-.17.21C5.8 6 4.88 6.28 4.21 6.5c-.43-.04 1.13-.37 1.29-.44zM3.58 7.51c-.16.4.24.53.62.6.62-.17-.41-.28.06-.44.26 0-.82-.26.08-.38S6.09 6.77 7 6.58a8.71 8.71 0 0 1 2.35-.19c.3.35-.23.94-.77 1a8.61 8.61 0 0 1-2 .39c-.8-.1-1.37.61-2.19.7.22-.4-.18-.14-.59-.16.21.82-1.47-.21-.48-.41-.74-.26-.75.52-.67 1-.65-.91.07-1.29.93-1.4zm1.88 1.08c-.22-.05.17-.2 0 0zm-.72.88s-.34-.08-.2-.17c1 .13-.9-.33.13-.22.66-.02.44.36.07.39zm.33.17c-.12.12 0-.24 0 0zm-.71 0c-.44-.09.21-.22 0 0zm-.06 1.43c-.07.1-.1-.08 0 0zM4 10.9c-.55-.19 0-.21 0 0zm-.12 1.28c-.26-.09-.25-.5-.37-.72-.38-1.03.41.4.33.72zm.23-1.49c-.69-.08-.05-.49 0 0zm0-.34h-.09c-.76-.35.45-.17-.02 0zM4 9.56c-.61-.31.58-.36 0 0zm.21.26c-.34.06.05-.32 0 0zm-1.3.07c-.12.08 0-.23 0 0zM3 9.75c-.16 0 0-.27 0 0zm.08-1c-.4-.1.33-.25 0 0zm.26 2c-.44-.1-.12-.65 0 0zm.3 1.25c.42.51.26.79.69 1.41-.56-.35-.67-1.2-1-1.75-.41-.9.23-.01.31.34zm4.09 6.38c-.34-.07-.57-.43-.81-.66a4.88 4.88 0 0 1-1.57-1.94 12.26 12.26 0 0 1-1.46-2.38c-.41-.92.25.07.35.42.21.68.88 1.07.94 1.52.74.42.36 1.12 1 1.31.27-.14.3.84.89.64-.33.15.13.33.3.61.35-.05 1.17.82.36.52zM4.62 12c-.31-.07.33-.11 0 0zm.2.47c-.55-.14.52-.2 0 0zm1.39.47c.4-.17.16.78.55.9.76 1-.53 0-1-.07.06 0-.38-.12-.19-.16-.14-.15-.45-.66.26-.32.6.24.65.06.38-.39zm1.31 1.76c0 .15-.72.13-.06.42-.38 0-.5 0 0 .3-.22.17.43.31.21.57.66.52-.12.13-.4-.08s-.85-.35-.75-.5c.81.42.21 0-.15-.3.65.16-.51-.48.1-.31.19.05-.27-.38.33-.07-.54-.52.47-.12.72-.07zm.48-.17c-.61-.14 0-.34 0 0zm-.17 2c-.61-.26.39 0 0 0zm-.45-.17c-.71-.23.52 0 0 0zm-.09.11c-.22 0 0-.17 0 0zm-1.08-1.55c-.72-.3-.2-.33 0 0zm-.54-.35c-.58-.33-.08-.33 0 0zm0 .65c-.57-.44-.07-.25 0 0zm-.15-1.34c-.35 0 .13-.2 0 0zM8 17.38c-.51-.15 0-.14 0 0zM7.63 17h-.16c-.68-.54.31-.38.75-.14.97.14-.22.39-.59.14zm2.7 1.65c-.68-.16.16-.27 0 0zm-.17-.52c-.05 0-.1-.11 0 0zm-.86-1.34c-.59-.14.21-.19.36 0 1.02.21-.06.26-.36 0zM9.51 18H9.4l-.13-.06c-.56-.59 1.19.28.24.06zm-.28.69c-.15.06 0-.14 0 0zm.29-1.19-.16-.05c-.66-.45.84.09.16 0zm.16 1.72c-.4-.16.26-.25 0 0zm.1-.74c-.58-.14.36-.13 0 0zm.13-.61c-.44-.06.05-.21 0 0zm-.72-.88c.46.06.47.27 0 .14-.09 0-.24 0-.28-.17-.76-.5.03-.25.28-.02zm-.06 2c-.2.12 0-.22 0 0zm-.31-.51c-.53 0 .4-.26 0 0zm-.12.35c-.26-.1.17-.08 0 0zm.3-.89c-.52-.14.25-.18 0 0zm-.16-.57c-.28 0-.06-.16 0 0zm-.54-.95c-.57-.46 1.18.38 0 0zm-.06.19c0 .06-.11-.09 0 0zm3.65 3.78a9.4 9.4 0 0 1-2.56-.85l-.33-.2c-.57-.31-.5-.38.06-.07.19.16 1.59.73.93.35-.29-.07-1.9-.95-.84-.57a20.92 20.92 0 0 0 2.74 1.21 7.14 7.14 0 0 0 2.43.15c.65.33 1.33-.08 2 .21a13.05 13.05 0 0 1-4.45-.23zm-1.25-.7c-.51-.09.16-.23 0 0zm.73-1c-.58-.11.6-.23 0 0zm.84 1.31c1 .37-.6.12-.93-.09-.92-.38.72.09.93.09zm-1.06-1.1c-.81-.12.9 0 0 0zm1.52.85c-.29.23 0-.3 0 0zm.29.05c-.15.06 0-.17 0 0zm.27-.38c-.16.2 0-.23 0 0zm.31 0c-.45.17.47-.39 0 0zm.14 0c.49-.42.51-.22.5.13-.43.48-.17-.2-.44.06s-.19-.1-.06-.17zm.83.45c-.5 0 .51-.54 0 0zm0 .18c-.2.05 0-.13 0 0zm-.16-.35c-.39-.26.94-.61 0 0zm.57.09h-.08c-.03-.23.54-.27.08.02zm.15.19c-.3-.08.47-.4 0 0zm.36-.1c-.51.18.48-.4 0 0zm.22.11-.12.08c-.23-.14.71-.48.12-.07zm-.43-.53c-.54-.18-1.4-.76-2-.37-.8.51.41-.56-.24-.08-.66.79-.45-.5-1.09-.11 0-.12-.57-.16-.17-.37-.36 0-.13-.05 0-.34-.16 0-1 0-1.36-.29-.4-.52.07-.3.48-.23-.67.12.24.5.68.29-.2-.09-.43-.52-1-.9a18.83 18.83 0 0 0-2.13-1c-.84-.5.18-.18.47.08.84.37.51-.51 0-.74-.54 0-.67-.59-1.1-.56.67.11 1.14-.17.39-.85s.3.63-.11.44c-.19-.25-.05-.6-.65-.73 0 .23-.08.58-.21.1-.17 0-.36.21-.5-.28.13-.57-.56-.7-.67-1.06.6.38.87.08.45-.33s-.33-.11-.49 0c-.59.6-.06-1-.32-.56-.26 0-.11.29-.1.65-.86-.21.2.45.45.81-.39-.4-.32.31-.65 0-.11-.3-.12-.77-.67-.85.62-.22-.36-.65-.28-.67.35-.32.4-.76.82-.07-.53 0 0 .88.12.6 0-.47.22-1-.59-1.19-.24.32-.65-.63-.18-.43-.06-.63.74-.26.69-.53.42-.18-.5-.77 0-1 .38.24 1.36-.36.7-.44.42 0 .75.18.79-.24.33.07 1.24.36.42-.09a3.45 3.45 0 0 1 1.13-.25c.79-.61.63 1 .45 1.45.3-.21.24.94.14 1.37.16-.22.23.36 0 .77 0-.07.4-.13.12.35-.22-.47-.31 1-.17.32.37-.61.28 0 .39.24.08.55.32 1.06.4 1.56.35.35-.15.11-.15.59.11-.14.58.19.57.68 0-.78.09-.18.47 0a5.48 5.48 0 0 0 1 1.42c.37.43 0 .13.14.39a3.19 3.19 0 0 0 2.09 1.28 1.46 1.46 0 0 0 1.57.7c-.6.37 1.68.47.91.67-.23.16-.62-.2-1.01-.18zM8.7 15.89c-.24 0 0-.2 0 0zm.38.22c-.18 0-.12-.24 0 0zm-2.61-3.65c-.24-.07.1-.09 0 0zm-.59 0c-.26 0 0-.34 0 0zm-.3-.08c-.1.05 0-.11 0 0zm11 8.25c-.39-.07.32-.22 0 0zm.73-1.05h-.3c.06-.45 1.33-.1 1.85-.09-.16.34-1.13.04-1.55.13zm2 0c-.27 0 .12-.32 0 0zm1-.09c-.25.13 0-.3 0 0zm.48.11c-.52-.12.24-.12.4-.14.94.02 0 .16-.47.16z"},child:[]},{tag:"path",attr:{d:"M6.51 7.11c1-.2-.38-.33-.69 0 .18.13.41-.21.69 0zm-.82.13c0 .19.18-.22 0 0zm2.62-.48c.67-.11.11-.41-.09.1.07.14.11-.05.09-.1zm-.62.1c.93.36-.05-1 0 0zm-2.92.93a.51.51 0 0 1 .33.1c.75.52-.1-.84-.33-.1z"},child:[]},{tag:"path",attr:{d:"M4.81 7.43c.16.13.29-.21 0 0zm.37.01.14.12c.68.06-.11-.46-.14-.12zM10.69 16c.09.3 0-.39 0 0zm-4.78-5c.1.18.18-.18 0 0zm.09.61c.19.34 0-.51 0 0zm.21-.49c.33.21-.28-.52 0 0zm-.41-.82c.07.15.24.16.37.2 1.32.61-.95-1-.37-.2zm.54 1.43c.31.53.18-.37 0 0zm.48-.16c.37.92-.23-.12-.3-.43a2.11 2.11 0 0 0 .28 1c.34.51.19-.28.55.23-.2-.45.1-.2.06-.4s-1-1.17-.59-.4zm.36 1.78c.09.31.18 0 0 0zM5.85 9c.06.14.11 0 0 0zm.67.42c.32.41.17-.36 0 0zm-.89 1.14.14.15c.99.29-1.05-.95-.14-.15zm.7-.37c1 .41-.09-.27-.44-.2.11.13.32.07.44.2zm-.18-.44c.18.18.82.51.31.06.32-.06 0-.16-.24-.32-.44-.67.07.06-.07.26z"},child:[]},{tag:"path",attr:{d:"M5.51 10.64c-.53-.44.16.21-.06.2-.55-.4-.32-.11 0 .2.33.5.6-.3.06-.4zm2.14.64c.12.11-.06-.68 0 0zm1.02-3.5c0 .12.07-.1 0 0zM9 12.47c0 .21 0-.18 0 0zm-.29-1.22c.08.46.1-.78 0 0zm.14.22v.1c.21-.51.04-.79 0-.1zm-.1-2.7c-.14.7-.27.41-.08-.11-.05-.67-.45.41-.27.72.29.47.6-1.16.35-.61zm1.01 5.98c.13.35.11-.42 0 0zm-1.35-4.28c0 .2 0-.14 0 0zm.64 1.7c0 .26.11-.38 0 0zM9.5 14l.07.11c.14-.49-.36-.79-.07-.11zm-1.56-.52c.27.22-.13-.23 0 0zm1.23-.85c.08.29 0-.42 0 0zM8.14 9.81c.15.33-.05-.27 0 0z"},child:[]},{tag:"path",attr:{d:"M8.3 10.23c.24.34-.26-.64 0 0zm-.06 1.15c-.13-1-.42.45 0 .69.13.34.25.2.3-.19-.32 0 .08-.62-.3-.5z"},child:[]}]})(n)}function bU(n){return Vt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"m21.62 11.108-8.731-8.729a1.292 1.292 0 0 0-1.823 0L9.257 4.19l2.299 2.3a1.532 1.532 0 0 1 1.939 1.95l2.214 2.217a1.53 1.53 0 0 1 1.583 2.531c-.599.6-1.566.6-2.166 0a1.536 1.536 0 0 1-.337-1.662l-2.074-2.063V14.9c.146.071.286.169.407.29a1.537 1.537 0 0 1 0 2.166 1.536 1.536 0 0 1-2.174 0 1.528 1.528 0 0 1 0-2.164c.152-.15.322-.264.504-.339v-5.49a1.529 1.529 0 0 1-.83-2.008l-2.26-2.271-5.987 5.982c-.5.504-.5 1.32 0 1.824l8.731 8.729a1.286 1.286 0 0 0 1.821 0l8.69-8.689a1.284 1.284 0 0 0 .003-1.822"},child:[]}]})(n)}function RU(n){return Vt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fillRule:"evenodd",clipRule:"evenodd",d:"M12.026 2c-5.509 0-9.974 4.465-9.974 9.974 0 4.406 2.857 8.145 6.821 9.465.499.09.679-.217.679-.481 0-.237-.008-.865-.011-1.696-2.775.602-3.361-1.338-3.361-1.338-.452-1.152-1.107-1.459-1.107-1.459-.905-.619.069-.605.069-.605 1.002.07 1.527 1.028 1.527 1.028.89 1.524 2.336 1.084 2.902.829.091-.645.351-1.085.635-1.334-2.214-.251-4.542-1.107-4.542-4.93 0-1.087.389-1.979 1.024-2.675-.101-.253-.446-1.268.099-2.64 0 0 .837-.269 2.742 1.021a9.582 9.582 0 0 1 2.496-.336 9.554 9.554 0 0 1 2.496.336c1.906-1.291 2.742-1.021 2.742-1.021.545 1.372.203 2.387.099 2.64.64.696 1.024 1.587 1.024 2.675 0 3.833-2.33 4.675-4.552 4.922.355.308.675.916.675 1.846 0 1.334-.012 2.41-.012 2.737 0 .267.178.577.687.479C19.146 20.115 22 16.379 22 11.974 22 6.465 17.535 2 12.026 2z"},child:[]}]})(n)}function PU(n){return Vt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M4.136 3.012h15.729l-1.431 16.15-6.451 1.826-6.414-1.826-1.433-16.15zm5.266 7.302-.173-2.035 7.533.002.173-1.963-9.87-.002.522 5.998h6.835l-.243 2.566-2.179.602-2.214-.605-.141-1.58H7.691l.247 3.123L12 17.506l4.028-1.08.558-6.111H9.402v-.001z"},child:[]}]})(n)}function LU(n){return Vt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M11.55 21H3v-8.55h8.55V21zM21 21h-8.55v-8.55H21V21zm-9.45-9.45H3V3h8.55v8.55zm9.45 0h-8.55V3H21v8.55z"},child:[]}]})(n)}function IU(n){return Vt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M15.661 15.549a1.315 1.315 0 0 0 1.185-1.386 1.363 1.363 0 0 0-1.35-1.302h-.048a1.352 1.352 0 0 0-1.303 1.397c.024.379.179.687.391.911-.827 1.609-2.07 2.794-3.954 3.788-1.266.663-2.604.912-3.905.734-1.089-.153-1.94-.64-2.463-1.421-.78-1.185-.852-2.462-.201-3.74a5.597 5.597 0 0 1 1.658-1.931 7.88 7.88 0 0 1-.331-1.218c-3.506 2.51-3.148 5.942-2.084 7.564.794 1.184 2.415 1.941 4.19 1.941.474 0 .972-.035 1.457-.154 3.077-.592 5.409-2.438 6.747-5.16l.011-.023z"},child:[]},{tag:"path",attr:{d:"M19.887 12.589c-1.834-2.154-4.533-3.337-7.611-3.337h-.403c-.2-.438-.661-.711-1.183-.711h-.036c-.744 0-1.325.64-1.301 1.385.023.71.627 1.302 1.35 1.302h.059a1.332 1.332 0 0 0 1.183-.828h.439c1.824 0 3.551.532 5.126 1.574 1.206.792 2.072 1.834 2.557 3.077.425 1.019.402 2.013-.035 2.843-.675 1.302-1.812 1.988-3.314 1.988-.947 0-1.871-.296-2.345-.509-.283.235-.758.626-1.102.863 1.042.473 2.096.746 3.113.746 2.309 0 4.023-1.302 4.676-2.557.709-1.422.651-3.813-1.161-5.859l-.012.023z"},child:[]},{tag:"path",attr:{d:"M7.647 15.975c.023.71.626 1.302 1.35 1.302h.048a1.334 1.334 0 0 0 1.302-1.397c0-.71-.616-1.301-1.338-1.301h-.048c-.048 0-.118 0-.178.022-.982-1.657-1.397-3.434-1.242-5.349.094-1.445.567-2.7 1.42-3.742.71-.888 2.048-1.326 2.96-1.35 2.556-.048 3.622 3.138 3.704 4.404l1.184.354C16.536 5.036 14.122 3 11.813 3 9.647 3 7.647 4.574 6.842 6.884c-1.102 3.077-.379 6.036.971 8.404-.118.154-.189.426-.166.687z"},child:[]}]})(n)}function NU(n){return Vt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M18.5 9.51a4.22 4.22 0 0 1-1.91-1.34A5.77 5.77 0 0 0 12 6a4.72 4.72 0 0 0-5 4 3.23 3.23 0 0 1 3.5-1.49 4.32 4.32 0 0 1 1.91 1.35A5.77 5.77 0 0 0 17 12a4.72 4.72 0 0 0 5-4 3.2 3.2 0 0 1-3.5 1.51zm-13 4.98a4.22 4.22 0 0 1 1.91 1.34A5.77 5.77 0 0 0 12 18a4.72 4.72 0 0 0 5-4 3.23 3.23 0 0 1-3.5 1.49 4.32 4.32 0 0 1-1.91-1.35A5.8 5.8 0 0 0 7 12a4.72 4.72 0 0 0-5 4 3.2 3.2 0 0 1 3.5-1.51z"},child:[]}]})(n)}function DU(n){return Vt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"m21.29 4.1-4.12-2a1.36 1.36 0 0 0-.48-.1h-.08a1.18 1.18 0 0 0-.72.24l-.14.12-7.88 7.19L4.44 7a.83.83 0 0 0-.54-.17.88.88 0 0 0-.53.17l-1.1 1a.8.8 0 0 0-.27.61.84.84 0 0 0 .27.62l3 2.71-3 2.72a.84.84 0 0 0 0 1.23l1.1 1a.89.89 0 0 0 .6.22.93.93 0 0 0 .47-.17l3.43-2.61 7.88 7.19a1.2 1.2 0 0 0 .76.36h.17a1 1 0 0 0 .49-.12l4.12-2a1.25 1.25 0 0 0 .71-1.1V5.23a1.26 1.26 0 0 0-.71-1.13zM17 16.47l-6-4.53 6-4.53z"},child:[]}]})(n)}function UU(){const n=[fe.jsx(Yb,{color:"#46d3f2",size:64}),fe.jsx(CU,{size:64}),fe.jsx(Xb,{color:"green",size:64}),fe.jsx(qb,{size:64}),fe.jsx(Kb,{color:"green",size:64}),fe.jsx(Jb,{color:"#f78f07",size:64}),fe.jsx(SU,{size:64}),fe.jsx($b,{size:64}),fe.jsx(jb,{color:"#2027b0",size:64}),fe.jsx(MU,{color:"#f5dd07",size:64}),fe.jsx(Wb,{color:"#6d7ecf",size:64}),fe.jsx(TU,{color:"#002aff",size:64}),fe.jsx(PU,{color:"#fc0303",size:64}),fe.jsx(EU,{color:"#a004d4",size:64}),fe.jsx(Qb,{size:64}),fe.jsx(NU,{color:"#03f4fc",size:64}),fe.jsx(Bb,{color:"#01056b",size:64}),fe.jsx(AU,{color:"#09ff00",size:64}),fe.jsx(RU,{size:64}),fe.jsx(bU,{color:"#fa1919",size:64}),fe.jsx(wU,{size:64}),fe.jsx(LU,{color:"blue",size:64}),fe.jsx(IU,{color:"#46d3f2",size:64}),fe.jsx(DU,{color:"#0390fc",size:64})];return fe.jsx("div",{className:"grid grid-cols-4 md:grid-cols-6 2xl:grid-cols-8 gap-4",children:n.map((e,t)=>fe.jsx("div",{className:"p-2",children:e},t))})}function zU(){return fe.jsxs("div",{className:"bg-white container flex flex-col items-center justify-center mx-auto my-3",children:[fe.jsx("h2",{className:"text-3xl font-bold text-black",children:"Skills"}),fe.jsx("p",{className:"text-gray-950 mx-auto",children:"You name it! I've done it!"}),fe.jsx("div",{className:"flex justify-center",children:fe.jsx(UU,{})})]})}const OU="/my-portfolio/assets/GEU-CyzQLqoM.jpg",FU="/my-portfolio/assets/Clairco-QdSIebFl.jpg",kU=()=>fe.jsx("div",{className:"bg-blue-950 p-8 text-white ",children:fe.jsxs("div",{className:"container mx-auto max-w-4xl",children:[fe.jsx("h1",{className:"text-3xl font-bold mb-4",children:"Experience"}),fe.jsxs("div",{className:"mb-8 flex flex-col-reverse md:flex-row",children:[fe.jsx("img",{src:OU,alt:"GEU image",className:"rounded-full object-cover w-48 md:w-48 h-auto my-2 md:mb-0 mx-auto md:mr-3 shadow-md shadow-white/70 hover:shadow-white hover:shadow-lg"}),fe.jsxs("div",{children:[fe.jsx("h2",{className:"text-2xl font-bold",children:"Graphic Era University"}),fe.jsx("h3",{className:"font-semibold text-gray-400 text-sm md:text-lg",children:"CS Student | 2021-2025 | SCGPA: 8.47"}),fe.jsx("p",{className:"text-white",children:"Dedicated Computer Science student with expertise in data structures, algorithms, cybersecurity, blockchain, game development and web development. Certified in Cloud computing, Frontend development, and AI. Passionate about continuous learning and active participation in computer science discussions."})]})]}),fe.jsxs("div",{className:"mb-8 flex flex-col-reverse md:flex-row",children:[fe.jsx("img",{src:FU,alt:"Clairco Image",className:"rounded-full object-cover w-48 md:w-48 h-auto my-2 md:mb-0 mx-auto md:mr-3 shadow-md shadow-white/70 hover:shadow-white hover:shadow-lg"}),fe.jsxs("div",{children:[fe.jsx("h2",{className:"text-2xl font-bold",children:"Clairco"}),fe.jsx("h3",{className:"text-sm md:text-lg font-semibold text-gray-400",children:"Software Development Intern | Jun'23 - Aug'23"}),fe.jsx("p",{className:"text-white",children:"Clairco (Aliferous Technologies Pvt Ltd) is a Bangalore based startup. As a Software Developer intern, I contributed to interactive applications using React, MongoDB, Express.js, and Node.js, gaining hands-on experience across the software development lifecycle."})]})]})]})}),rf={_origin:"https://api.emailjs.com"},BU=(n,e="https://api.emailjs.com")=>{rf._userID=n,rf._origin=e},fA=(n,e,t)=>{if(!n)throw"The public key is required. Visit https://dashboard.emailjs.com/admin/account";if(!e)throw"The service ID is required. Visit https://dashboard.emailjs.com/admin";if(!t)throw"The template ID is required. Visit https://dashboard.emailjs.com/admin/templates";return!0};class fM{constructor(e){this.status=e?e.status:0,this.text=e?e.responseText:"Network Error"}}const hA=(n,e,t={})=>new Promise((i,r)=>{const s=new XMLHttpRequest;s.addEventListener("load",({target:o})=>{const a=new fM(o);a.status===200||a.text==="OK"?i(a):r(a)}),s.addEventListener("error",({target:o})=>{r(new fM(o))}),s.open("POST",rf._origin+n,!0),Object.keys(t).forEach(o=>{s.setRequestHeader(o,t[o])}),s.send(e)}),HU=(n,e,t,i)=>{const r=i||rf._userID;return fA(r,n,e),hA("/api/v1.0/email/send",JSON.stringify({lib_version:"3.12.1",user_id:r,service_id:n,template_id:e,template_params:t}),{"Content-type":"application/json"})},VU=n=>{let e;if(typeof n=="string"?e=document.querySelector(n):e=n,!e||e.nodeName!=="FORM")throw"The 3rd parameter is expected to be the HTML form element or the style selector of form";return e},GU=(n,e,t,i)=>{const r=i||rf._userID,s=VU(t);fA(r,n,e);const o=new FormData(s);return o.append("lib_version","3.12.1"),o.append("service_id",n),o.append("template_id",e),o.append("user_id",r),hA("/api/v1.0/email/send-form",o)},WU={init:BU,send:HU,sendForm:GU};function dA(n){var e,t,i="";if(typeof n=="string"||typeof n=="number")i+=n;else if(typeof n=="object")if(Array.isArray(n)){var r=n.length;for(e=0;etypeof n=="number"&&!isNaN(n),pa=n=>typeof n=="string",Xi=n=>typeof n=="function",Qd=n=>pa(n)||Xi(n)?n:null,Hv=n=>ve.isValidElement(n)||pa(n)||Xi(n)||sf(n);function XU(n,e,t){t===void 0&&(t=300);const{scrollHeight:i,style:r}=n;requestAnimationFrame(()=>{r.minHeight="initial",r.height=i+"px",r.transition=`all ${t}ms`,requestAnimationFrame(()=>{r.height="0",r.padding="0",r.margin="0",setTimeout(e,t)})})}function Tm(n){let{enter:e,exit:t,appendPosition:i=!1,collapse:r=!0,collapseDuration:s=300}=n;return function(o){let{children:a,position:u,preventExitTransition:f,done:h,nodeRef:d,isIn:p,playToast:v}=o;const y=i?`${e}--${u}`:e,w=i?`${t}--${u}`:t,S=ve.useRef(0);return ve.useLayoutEffect(()=>{const g=d.current,x=y.split(" "),M=T=>{T.target===d.current&&(v(),g.removeEventListener("animationend",M),g.removeEventListener("animationcancel",M),S.current===0&&T.type!=="animationcancel"&&g.classList.remove(...x))};g.classList.add(...x),g.addEventListener("animationend",M),g.addEventListener("animationcancel",M)},[]),ve.useEffect(()=>{const g=d.current,x=()=>{g.removeEventListener("animationend",x),r?XU(g,h,s):h()};p||(f?x():(S.current=1,g.className+=` ${w}`,g.addEventListener("animationend",x)))},[p]),Pt.createElement(Pt.Fragment,null,a)}}function hM(n,e){return n!=null?{content:n.content,containerId:n.props.containerId,id:n.props.toastId,theme:n.props.theme,type:n.props.type,data:n.props.data||{},isLoading:n.props.isLoading,icon:n.props.icon,status:e}:{}}const mi=new Map;let of=[];const Vv=new Set,jU=n=>Vv.forEach(e=>e(n)),pA=()=>mi.size>0;function mA(n,e){var t;if(e)return!((t=mi.get(e))==null||!t.isToastActive(n));let i=!1;return mi.forEach(r=>{r.isToastActive(n)&&(i=!0)}),i}function gA(n,e){Hv(n)&&(pA()||of.push({content:n,options:e}),mi.forEach(t=>{t.buildToast(n,e)}))}function dM(n,e){mi.forEach(t=>{e!=null&&e!=null&&e.containerId?(e==null?void 0:e.containerId)===t.id&&t.toggle(n,e==null?void 0:e.id):t.toggle(n,e==null?void 0:e.id)})}function YU(n){const{subscribe:e,getSnapshot:t,setProps:i}=ve.useRef(function(s){const o=s.containerId||1;return{subscribe(a){const u=function(h,d,p){let v=1,y=0,w=[],S=[],g=[],x=d;const M=new Map,T=new Set,P=()=>{g=Array.from(M.values()),T.forEach(D=>D())},C=D=>{S=D==null?[]:S.filter(b=>b!==D),P()},L=D=>{const{toastId:b,onOpen:R,updateId:k,children:q}=D.props,oe=k==null;D.staleId&&M.delete(D.staleId),M.set(b,D),S=[...S,D.props.toastId].filter(V=>V!==D.staleId),P(),p(hM(D,oe?"added":"updated")),oe&&Xi(R)&&R(ve.isValidElement(q)&&q.props)};return{id:h,props:x,observe:D=>(T.add(D),()=>T.delete(D)),toggle:(D,b)=>{M.forEach(R=>{b!=null&&b!==R.props.toastId||Xi(R.toggle)&&R.toggle(D)})},removeToast:C,toasts:M,clearQueue:()=>{y-=w.length,w=[]},buildToast:(D,b)=>{if((J=>{let{containerId:Z,toastId:ie,updateId:pe}=J;const Ee=Z?Z!==h:h!==1,Te=M.has(ie)&&pe==null;return Ee||Te})(b))return;const{toastId:R,updateId:k,data:q,staleId:oe,delay:V}=b,Q=()=>{C(R)},te=k==null;te&&y++;const ae={...x,style:x.toastStyle,key:v++,...Object.fromEntries(Object.entries(b).filter(J=>{let[Z,ie]=J;return ie!=null})),toastId:R,updateId:k,data:q,closeToast:Q,isIn:!1,className:Qd(b.className||x.toastClassName),bodyClassName:Qd(b.bodyClassName||x.bodyClassName),progressClassName:Qd(b.progressClassName||x.progressClassName),autoClose:!b.isLoading&&(N=b.autoClose,B=x.autoClose,N===!1||sf(N)&&N>0?N:B),deleteToast(){const J=M.get(R),{onClose:Z,children:ie}=J.props;Xi(Z)&&Z(ve.isValidElement(ie)&&ie.props),p(hM(J,"removed")),M.delete(R),y--,y<0&&(y=0),w.length>0?L(w.shift()):P()}};var N,B;ae.closeButton=x.closeButton,b.closeButton===!1||Hv(b.closeButton)?ae.closeButton=b.closeButton:b.closeButton===!0&&(ae.closeButton=!Hv(x.closeButton)||x.closeButton);let H=D;ve.isValidElement(D)&&!pa(D.type)?H=ve.cloneElement(D,{closeToast:Q,toastProps:ae,data:q}):Xi(D)&&(H=D({closeToast:Q,toastProps:ae,data:q}));const Y={content:H,props:ae,staleId:oe};x.limit&&x.limit>0&&y>x.limit&&te?w.push(Y):sf(V)?setTimeout(()=>{L(Y)},V):L(Y)},setProps(D){x=D},setToggle:(D,b)=>{M.get(D).toggle=b},isToastActive:D=>S.some(b=>b===D),getSnapshot:()=>x.newestOnTop?g.reverse():g}}(o,s,jU);mi.set(o,u);const f=u.observe(a);return of.forEach(h=>gA(h.content,h.options)),of=[],()=>{f(),mi.delete(o)}},setProps(a){var u;(u=mi.get(o))==null||u.setProps(a)},getSnapshot(){var a;return(a=mi.get(o))==null?void 0:a.getSnapshot()}}}(n)).current;i(n);const r=ve.useSyncExternalStore(e,t,t);return{getToastToRender:function(s){if(!r)return[];const o=new Map;return r.forEach(a=>{const{position:u}=a.props;o.has(u)||o.set(u,[]),o.get(u).push(a)}),Array.from(o,a=>s(a[0],a[1]))},isToastActive:mA,count:r==null?void 0:r.length}}function qU(n){const[e,t]=ve.useState(!1),[i,r]=ve.useState(!1),s=ve.useRef(null),o=ve.useRef({start:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,didMove:!1}).current,{autoClose:a,pauseOnHover:u,closeToast:f,onClick:h,closeOnClick:d}=n;var p,v;function y(){t(!0)}function w(){t(!1)}function S(M){const T=s.current;o.canDrag&&T&&(o.didMove=!0,e&&w(),o.delta=n.draggableDirection==="x"?M.clientX-o.start:M.clientY-o.start,o.start!==M.clientX&&(o.canCloseOnClick=!1),T.style.transform=`translate3d(${n.draggableDirection==="x"?`${o.delta}px, var(--y)`:`0, calc(${o.delta}px + var(--y))`},0)`,T.style.opacity=""+(1-Math.abs(o.delta/o.removalDistance)))}function g(){document.removeEventListener("pointermove",S),document.removeEventListener("pointerup",g);const M=s.current;if(o.canDrag&&o.didMove&&M){if(o.canDrag=!1,Math.abs(o.delta)>o.removalDistance)return r(!0),n.closeToast(),void n.collapseAll();M.style.transition="transform 0.2s, opacity 0.2s",M.style.removeProperty("transform"),M.style.removeProperty("opacity")}}(v=mi.get((p={id:n.toastId,containerId:n.containerId,fn:t}).containerId||1))==null||v.setToggle(p.id,p.fn),ve.useEffect(()=>{if(n.pauseOnFocusLoss)return document.hasFocus()||w(),window.addEventListener("focus",y),window.addEventListener("blur",w),()=>{window.removeEventListener("focus",y),window.removeEventListener("blur",w)}},[n.pauseOnFocusLoss]);const x={onPointerDown:function(M){if(n.draggable===!0||n.draggable===M.pointerType){o.didMove=!1,document.addEventListener("pointermove",S),document.addEventListener("pointerup",g);const T=s.current;o.canCloseOnClick=!0,o.canDrag=!0,T.style.transition="none",n.draggableDirection==="x"?(o.start=M.clientX,o.removalDistance=T.offsetWidth*(n.draggablePercent/100)):(o.start=M.clientY,o.removalDistance=T.offsetHeight*(n.draggablePercent===80?1.5*n.draggablePercent:n.draggablePercent)/100)}},onPointerUp:function(M){const{top:T,bottom:P,left:C,right:L}=s.current.getBoundingClientRect();M.nativeEvent.type!=="touchend"&&n.pauseOnHover&&M.clientX>=C&&M.clientX<=L&&M.clientY>=T&&M.clientY<=P?w():y()}};return a&&u&&(x.onMouseEnter=w,n.stacked||(x.onMouseLeave=y)),d&&(x.onClick=M=>{h&&h(M),o.canCloseOnClick&&f()}),{playToast:y,pauseToast:w,isRunning:e,preventExitTransition:i,toastRef:s,eventHandlers:x}}function ZU(n){let{delay:e,isRunning:t,closeToast:i,type:r="default",hide:s,className:o,style:a,controlledProgress:u,progress:f,rtl:h,isIn:d,theme:p}=n;const v=s||u&&f===0,y={...a,animationDuration:`${e}ms`,animationPlayState:t?"running":"paused"};u&&(y.transform=`scaleX(${f})`);const w=io("Toastify__progress-bar",u?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated",`Toastify__progress-bar-theme--${p}`,`Toastify__progress-bar--${r}`,{"Toastify__progress-bar--rtl":h}),S=Xi(o)?o({rtl:h,type:r,defaultClassName:w}):io(w,o),g={[u&&f>=1?"onTransitionEnd":"onAnimationEnd"]:u&&f<1?null:()=>{d&&i()}};return Pt.createElement("div",{className:"Toastify__progress-bar--wrp","data-hidden":v},Pt.createElement("div",{className:`Toastify__progress-bar--bg Toastify__progress-bar-theme--${p} Toastify__progress-bar--${r}`}),Pt.createElement("div",{role:"progressbar","aria-hidden":v?"true":"false","aria-label":"notification timer",className:S,style:y,...g}))}let KU=1;const vA=()=>""+KU++;function JU(n){return n&&(pa(n.toastId)||sf(n.toastId))?n.toastId:vA()}function yu(n,e){return gA(n,e),e.toastId}function Np(n,e){return{...e,type:e&&e.type||n,toastId:JU(e)}}function Ld(n){return(e,t)=>yu(e,Np(n,t))}function Xt(n,e){return yu(n,Np("default",e))}Xt.loading=(n,e)=>yu(n,Np("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...e})),Xt.promise=function(n,e,t){let i,{pending:r,error:s,success:o}=e;r&&(i=pa(r)?Xt.loading(r,t):Xt.loading(r.render,{...t,...r}));const a={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},u=(h,d,p)=>{if(d==null)return void Xt.dismiss(i);const v={type:h,...a,...t,data:p},y=pa(d)?{render:d}:d;return i?Xt.update(i,{...v,...y}):Xt(y.render,{...v,...y}),p},f=Xi(n)?n():n;return f.then(h=>u("success",o,h)).catch(h=>u("error",s,h)),f},Xt.success=Ld("success"),Xt.info=Ld("info"),Xt.error=Ld("error"),Xt.warning=Ld("warning"),Xt.warn=Xt.warning,Xt.dark=(n,e)=>yu(n,Np("default",{theme:"dark",...e})),Xt.dismiss=function(n){(function(e){var t;if(pA()){if(e==null||pa(t=e)||sf(t))mi.forEach(r=>{r.removeToast(e)});else if(e&&("containerId"in e||"id"in e)){var i;(i=mi.get(e.containerId))!=null&&i.removeToast(e.id)||mi.forEach(r=>{r.removeToast(e.id)})}}else of=of.filter(r=>e!=null&&r.options.toastId!==e)})(n)},Xt.clearWaitingQueue=function(n){n===void 0&&(n={}),mi.forEach(e=>{!e.props.limit||n.containerId&&e.id!==n.containerId||e.clearQueue()})},Xt.isActive=mA,Xt.update=function(n,e){e===void 0&&(e={});const t=((i,r)=>{var s;let{containerId:o}=r;return(s=mi.get(o||1))==null?void 0:s.toasts.get(i)})(n,e);if(t){const{props:i,content:r}=t,s={delay:100,...i,...e,toastId:e.toastId||n,updateId:vA()};s.toastId!==n&&(s.staleId=n);const o=s.render||r;delete s.render,yu(o,s)}},Xt.done=n=>{Xt.update(n,{progress:1})},Xt.onChange=function(n){return Vv.add(n),()=>{Vv.delete(n)}},Xt.play=n=>dM(!0,n),Xt.pause=n=>dM(!1,n);const QU=typeof window<"u"?ve.useLayoutEffect:ve.useEffect,Id=n=>{let{theme:e,type:t,isLoading:i,...r}=n;return Pt.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:e==="colored"?"currentColor":`var(--toastify-icon-color-${t})`,...r})},$g={info:function(n){return Pt.createElement(Id,{...n},Pt.createElement("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))},warning:function(n){return Pt.createElement(Id,{...n},Pt.createElement("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))},success:function(n){return Pt.createElement(Id,{...n},Pt.createElement("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))},error:function(n){return Pt.createElement(Id,{...n},Pt.createElement("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))},spinner:function(){return Pt.createElement("div",{className:"Toastify__spinner"})}},$U=n=>{const{isRunning:e,preventExitTransition:t,toastRef:i,eventHandlers:r,playToast:s}=qU(n),{closeButton:o,children:a,autoClose:u,onClick:f,type:h,hideProgressBar:d,closeToast:p,transition:v,position:y,className:w,style:S,bodyClassName:g,bodyStyle:x,progressClassName:M,progressStyle:T,updateId:P,role:C,progress:L,rtl:D,toastId:b,deleteToast:R,isIn:k,isLoading:q,closeOnClick:oe,theme:V}=n,Q=io("Toastify__toast",`Toastify__toast-theme--${V}`,`Toastify__toast--${h}`,{"Toastify__toast--rtl":D},{"Toastify__toast--close-on-click":oe}),te=Xi(w)?w({rtl:D,position:y,type:h,defaultClassName:Q}):io(Q,w),ae=function(Y){let{theme:J,type:Z,isLoading:ie,icon:pe}=Y,Ee=null;const Te={theme:J,type:Z,isLoading:ie};return pe===!1||(Xi(pe)?Ee=pe(Te):ve.isValidElement(pe)?Ee=ve.cloneElement(pe,Te):ie?Ee=$g.spinner():(nt=>nt in $g)(Z)&&(Ee=$g[Z](Te))),Ee}(n),N=!!L||!u,B={closeToast:p,type:h,theme:V};let H=null;return o===!1||(H=Xi(o)?o(B):ve.isValidElement(o)?ve.cloneElement(o,B):function(Y){let{closeToast:J,theme:Z,ariaLabel:ie="close"}=Y;return Pt.createElement("button",{className:`Toastify__close-button Toastify__close-button--${Z}`,type:"button",onClick:pe=>{pe.stopPropagation(),J(pe)},"aria-label":ie},Pt.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},Pt.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}(B)),Pt.createElement(v,{isIn:k,done:R,position:y,preventExitTransition:t,nodeRef:i,playToast:s},Pt.createElement("div",{id:b,onClick:f,"data-in":k,className:te,...r,style:S,ref:i},Pt.createElement("div",{...k&&{role:C},className:Xi(g)?g({type:h}):io("Toastify__toast-body",g),style:x},ae!=null&&Pt.createElement("div",{className:io("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!q})},ae),Pt.createElement("div",null,a)),H,Pt.createElement(ZU,{...P&&!N?{key:`pb-${P}`}:{},rtl:D,theme:V,delay:u,isRunning:e,isIn:k,closeToast:p,hide:d,type:h,style:T,className:M,controlledProgress:N,progress:L||0})))},Am=function(n,e){return e===void 0&&(e=!1),{enter:`Toastify--animate Toastify__${n}-enter`,exit:`Toastify--animate Toastify__${n}-exit`,appendPosition:e}},ez=Tm(Am("bounce",!0));Tm(Am("slide",!0));Tm(Am("zoom"));Tm(Am("flip"));const tz={position:"top-right",transition:ez,autoClose:5e3,closeButton:!0,pauseOnHover:!0,pauseOnFocusLoss:!0,draggable:"touch",draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light"};function nz(n){let e={...tz,...n};const t=n.stacked,[i,r]=ve.useState(!0),s=ve.useRef(null),{getToastToRender:o,isToastActive:a,count:u}=YU(e),{className:f,style:h,rtl:d,containerId:p}=e;function v(w){const S=io("Toastify__toast-container",`Toastify__toast-container--${w}`,{"Toastify__toast-container--rtl":d});return Xi(f)?f({position:w,rtl:d,defaultClassName:S}):io(S,Qd(f))}function y(){t&&(r(!0),Xt.play())}return QU(()=>{if(t){var w;const S=s.current.querySelectorAll('[data-in="true"]'),g=12,x=(w=e.position)==null?void 0:w.includes("top");let M=0,T=0;Array.from(S).reverse().forEach((P,C)=>{const L=P;L.classList.add("Toastify__toast--stacked"),C>0&&(L.dataset.collapsed=`${i}`),L.dataset.pos||(L.dataset.pos=x?"top":"bot");const D=M*(i?.2:1)+(i?0:g*C);L.style.setProperty("--y",`${x?D:-1*D}px`),L.style.setProperty("--g",`${g}`),L.style.setProperty("--s",""+(1-(i?T:0))),M+=L.offsetHeight,T+=.025})}},[i,u,t]),Pt.createElement("div",{ref:s,className:"Toastify",id:p,onMouseEnter:()=>{t&&(r(!1),Xt.pause())},onMouseLeave:y},o((w,S)=>{const g=S.length?{...h}:{...h,pointerEvents:"none"};return Pt.createElement("div",{className:v(w),style:g,key:`container-${w}`},S.map(x=>{let{content:M,props:T}=x;return Pt.createElement($U,{...T,stacked:t,collapseAll:y,isIn:a(T.toastId,T.containerId),style:T.style,key:`toast-${T.key}`},M)}))}))}function iz(){const n=ve.useRef(),e=r=>{r.preventDefault(),WU.sendForm("service_kz36odt","template_h2od0rf",n.current,"y3RyWxgsJ48z6erxD").then(s=>{const o=s.text;console.log(o),o==="OK"?t("Email sent successfully!"):i("Error sending email. Please try again later.")},s=>{console.log(s.text),i("Error sending email. Please try again later.")})},t=r=>{Xt.success(r,{position:"top-center",autoClose:3e3})},i=r=>{Xt.error(r,{position:"top-center",autoClose:3e3})};return fe.jsxs("div",{className:"my-10",children:[fe.jsx(nz,{}),fe.jsxs("h2",{className:"text-3xl font-bold mb-4 text-center my-2 flex justify-center",children:["Contact Me",fe.jsxs("picture",{className:"mx-2",children:[fe.jsx("source",{srcSet:"https://fonts.gstatic.com/s/e/notoemoji/latest/1f60e/512.webp",type:"image/webp"}),fe.jsx("img",{src:"https://fonts.gstatic.com/s/e/notoemoji/latest/1f60e/512.gif",alt:"😎",width:"32",height:"32"})]})]}),fe.jsxs("form",{ref:n,onSubmit:e,className:"max-w-md mx-5 md:mx-auto",children:[fe.jsxs("div",{className:"mb-4",children:[fe.jsx("label",{className:"block text-gray-800 font-bold mb-2",htmlFor:"user_name",children:"Name"}),fe.jsx("input",{className:"shadow appearance-none border rounded w-full py-2 px-3 text-gray-800 leading-tight focus:outline-none focus:shadow-outline",id:"user_name",type:"text",name:"user_name",placeholder:"Enter your name"})]}),fe.jsxs("div",{className:"mb-4",children:[fe.jsx("label",{className:"block text-gray-800 font-bold mb-2",htmlFor:"user_email",children:"Email"}),fe.jsx("input",{className:"shadow appearance-none border rounded w-full py-2 px-3 text-gray-800 leading-tight focus:outline-none focus:shadow-outline",id:"user_email",type:"email",name:"user_email",placeholder:"Enter your email"})]}),fe.jsxs("div",{className:"mb-4",children:[fe.jsx("label",{className:"block text-gray-800 font-bold mb-2",htmlFor:"message",children:"Message"}),fe.jsx("textarea",{className:"shadow appearance-none border rounded w-full py-2 px-3 text-gray-800 leading-tight focus:outline-none focus:shadow-outline",id:"message",name:"message",placeholder:"Enter your message"})]}),fe.jsx("div",{className:"flex items-center justify-center",children:fe.jsx("button",{className:"bg-blue-950 hover:bg-blue-800 text-white font-bold py-2 px-4 rounded focus:outline-none focus:shadow-outline w-full",type:"submit",children:"Send"})})]})]})}function rz(){return fe.jsx("div",{className:"bg-blue-950 text-white py-6 text-center",children:fe.jsxs("div",{className:"container mx-auto",children:[fe.jsx("p",{className:"text-sm",children:"© 2024 Abhinav Choudhary. All rights reserved."}),fe.jsxs("p",{className:"mt-2",children:["Connect with me:"," ",fe.jsx("a",{href:"https://www.linkedin.com/in/abhinavchdhary/",target:"_blank",rel:"noopener noreferrer",className:"text-blue-400 hover:underline",children:"LinkedIn"})," ","|"," ",fe.jsx("a",{href:"https://github.com/Abhinav-Chdhary",target:"_blank",rel:"noopener noreferrer",className:"text-blue-400 hover:underline",children:"GitHub"})," ","|"," ",fe.jsx("a",{href:"mailto:abhinavchdhary@gmail.com",className:"text-blue-400 hover:underline",children:"Email"})]})]})})}function sz(){return fe.jsxs("div",{children:[fe.jsx(eR,{}),fe.jsx(yU,{}),fe.jsx(xU,{}),fe.jsx(zU,{}),fe.jsx(kU,{}),fe.jsx(iz,{}),fe.jsx(rz,{})]})}e1.createRoot(document.getElementById("root")).render(fe.jsx(Pt.StrictMode,{children:fe.jsx(sz,{})})); + */(function(n){function e(N,B){var H=N.length;N.push(B);e:for(;0>>1,J=N[Y];if(0>>1;Yr(pe,H))Eer(Te,pe)?(N[Y]=Te,N[Ee]=H,Y=Ee):(N[Y]=pe,N[ie]=H,Y=ie);else if(Eer(Te,H))N[Y]=Te,N[Ee]=H,Y=Ee;else break e}}return B}function r(N,B){var H=N.sortIndex-B.sortIndex;return H!==0?H:N.id-B.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;n.unstable_now=function(){return s.now()}}else{var o=Date,a=o.now();n.unstable_now=function(){return o.now()-a}}var u=[],f=[],h=1,d=null,p=3,v=!1,y=!1,w=!1,S=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,x=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function M(N){for(var B=t(f);B!==null;){if(B.callback===null)i(f);else if(B.startTime<=N)i(f),B.sortIndex=B.expirationTime,e(u,B);else break;B=t(f)}}function T(N){if(w=!1,M(N),!y)if(t(u)!==null)y=!0,te(P);else{var B=t(f);B!==null&&ae(T,B.startTime-N)}}function P(N,B){y=!1,w&&(w=!1,g(D),D=-1),v=!0;var H=p;try{for(M(B),d=t(u);d!==null&&(!(d.expirationTime>B)||N&&!k());){var Y=d.callback;if(typeof Y=="function"){d.callback=null,p=d.priorityLevel;var J=Y(d.expirationTime<=B);B=n.unstable_now(),typeof J=="function"?d.callback=J:d===t(u)&&i(u),M(B)}else i(u);d=t(u)}if(d!==null)var Z=!0;else{var ie=t(f);ie!==null&&ae(T,ie.startTime-B),Z=!1}return Z}finally{d=null,p=H,v=!1}}var C=!1,L=null,D=-1,b=5,R=-1;function k(){return!(n.unstable_now()-RN||125Y?(N.sortIndex=H,e(f,N),t(u)===null&&N===t(f)&&(w?(g(D),D=-1):w=!0,ae(T,H-Y))):(N.sortIndex=J,e(u,N),y||v||(y=!0,te(P))),N},n.unstable_shouldYield=k,n.unstable_wrapCallback=function(N){var B=p;return function(){var H=p;p=B;try{return N.apply(this,arguments)}finally{p=H}}}})(W4);G4.exports=W4;var q3=G4.exports;const T_={},e7=n=>void Object.assign(T_,n);function t7(n,e){function t(h,{args:d=[],attach:p,...v},y){let w=`${h[0].toUpperCase()}${h.slice(1)}`,S;if(h==="primitive"){if(v.object===void 0)throw new Error("R3F: Primitives without 'object' are invalid!");const g=v.object;S=vl(g,{type:h,root:y,attach:p,primitive:!0})}else{const g=T_[w];if(!g)throw new Error(`R3F: ${w} 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(!Array.isArray(d))throw new Error("R3F: The args prop must be an array!");S=vl(new g(...d),{type:h,root:y,attach:p,memoizedProps:{args:d}})}return S.__r3f.attach===void 0&&(S instanceof St?S.__r3f.attach="geometry":S instanceof Yn&&(S.__r3f.attach="material")),w!=="inject"&&Yg(S,v),S}function i(h,d){let p=!1;if(d){var v,y;(v=d.__r3f)!=null&&v.attach?jg(h,d,d.__r3f.attach):d.isObject3D&&h.isObject3D&&(h.add(d),p=!0),p||(y=h.__r3f)==null||y.objects.push(d),d.__r3f||vl(d,{}),d.__r3f.parent=h,kv(d),yl(d)}}function r(h,d,p){let v=!1;if(d){var y,w;if((y=d.__r3f)!=null&&y.attach)jg(h,d,d.__r3f.attach);else if(d.isObject3D&&h.isObject3D){d.parent=h,d.dispatchEvent({type:"added"});const S=h.children.filter(x=>x!==d),g=S.indexOf(p);h.children=[...S.slice(0,g),d,...S.slice(g)],v=!0}v||(w=h.__r3f)==null||w.objects.push(d),d.__r3f||vl(d,{}),d.__r3f.parent=h,kv(d),yl(d)}}function s(h,d,p=!1){h&&[...h].forEach(v=>o(d,v,p))}function o(h,d,p){if(d){var v,y,w;if(d.__r3f&&(d.__r3f.parent=null),(v=h.__r3f)!=null&&v.objects&&(h.__r3f.objects=h.__r3f.objects.filter(T=>T!==d)),(y=d.__r3f)!=null&&y.attach)$3(h,d,d.__r3f.attach);else if(d.isObject3D&&h.isObject3D){var S;h.remove(d),(S=d.__r3f)!=null&&S.root&&c7(d.__r3f.root,d)}const x=(w=d.__r3f)==null?void 0:w.primitive,M=!x&&(p===void 0?d.dispose!==null:p);if(!x){var g;s((g=d.__r3f)==null?void 0:g.objects,d,M),s(d.children,d,M)}if(delete d.__r3f,M&&d.dispose&&d.type!=="Scene"){const T=()=>{try{d.dispose()}catch{}};typeof IS_REACT_ACT_ENVIRONMENT>"u"?q3.unstable_scheduleCallback(q3.unstable_IdlePriority,T):T()}yl(h)}}function a(h,d,p,v){var y;const w=(y=h.__r3f)==null?void 0:y.parent;if(!w)return;const S=t(d,p,h.__r3f.root);if(h.children){for(const g of h.children)g.__r3f&&i(S,g);h.children=h.children.filter(g=>!g.__r3f)}h.__r3f.objects.forEach(g=>i(S,g)),h.__r3f.objects=[],h.__r3f.autoRemovedBeforeAppend||o(w,h),S.parent&&(S.__r3f.autoRemovedBeforeAppend=!0),i(w,S),S.raycast&&S.__r3f.eventCount&&S.__r3f.root.getState().internal.interaction.push(S),[v,v.alternate].forEach(g=>{g!==null&&(g.stateNode=S,g.ref&&(typeof g.ref=="function"?g.ref(S):g.ref.current=S))})}const u=()=>console.warn("Text is not allowed in the R3F tree! This could be stray whitespace or characters.");return{reconciler:$D({createInstance:t,removeChild:o,appendChild:i,appendInitialChild:i,insertBefore:r,supportsMutation:!0,isPrimaryRenderer:!1,supportsPersistence:!1,supportsHydration:!1,noTimeout:-1,appendChildToContainer:(h,d)=>{if(!d)return;const p=h.getState().scene;p.__r3f&&(p.__r3f.root=h,i(p,d))},removeChildFromContainer:(h,d)=>{d&&o(h.getState().scene,d)},insertInContainerBefore:(h,d,p)=>{if(!d||!p)return;const v=h.getState().scene;v.__r3f&&r(v,d,p)},getRootHostContext:()=>null,getChildHostContext:h=>h,finalizeInitialChildren(h){var d;return!!((d=h==null?void 0:h.__r3f)!=null?d:{}).handlers},prepareUpdate(h,d,p,v){var y;if(((y=h==null?void 0:h.__r3f)!=null?y:{}).primitive&&v.object&&v.object!==h)return[!0];{const{args:S=[],children:g,...x}=v,{args:M=[],children:T,...P}=p;if(!Array.isArray(S))throw new Error("R3F: the args prop must be an array!");if(S.some((L,D)=>L!==M[D]))return[!0];const C=J4(h,x,P,!0);return C.changes.length?[!1,C]:null}},commitUpdate(h,[d,p],v,y,w,S){d?a(h,v,w,S):Yg(h,p)},commitMount(h,d,p,v){var y;const w=(y=h.__r3f)!=null?y:{};h.raycast&&w.handlers&&w.eventCount&&h.__r3f.root.getState().internal.interaction.push(h)},getPublicInstance:h=>h,prepareForCommit:()=>null,preparePortalMount:h=>vl(h.getState().scene),resetAfterCommit:()=>{},shouldSetTextContent:()=>!1,clearContainer:()=>!1,hideInstance(h){var d;const{attach:p,parent:v}=(d=h.__r3f)!=null?d:{};p&&v&&$3(v,h,p),h.isObject3D&&(h.visible=!1),yl(h)},unhideInstance(h,d){var p;const{attach:v,parent:y}=(p=h.__r3f)!=null?p:{};v&&y&&jg(y,h,v),(h.isObject3D&&d.visible==null||d.visible)&&(h.visible=!0),yl(h)},createTextInstance:u,hideTextInstance:u,unhideTextInstance:u,getCurrentEventPriority:()=>e?e():Ol.DefaultEventPriority,beforeActiveInstanceBlur:()=>{},afterActiveInstanceBlur:()=>{},detachDeletedInstance:()=>{},now:typeof performance<"u"&&$t.fun(performance.now)?performance.now:$t.fun(Date.now)?Date.now:()=>0,scheduleTimeout:$t.fun(setTimeout)?setTimeout:void 0,cancelTimeout:$t.fun(clearTimeout)?clearTimeout:void 0}),applyProps:Yg}}var Z3,K3;const Xg=n=>"colorSpace"in n||"outputColorSpace"in n,X4=()=>{var n;return(n=T_.ColorManagement)!=null?n:null},j4=n=>n&&n.isOrthographicCamera,n7=n=>n&&n.hasOwnProperty("current"),wf=typeof window<"u"&&((Z3=window.document)!=null&&Z3.createElement||((K3=window.navigator)==null?void 0:K3.product)==="ReactNative")?ve.useLayoutEffect:ve.useEffect;function Y4(n){const e=ve.useRef(n);return wf(()=>void(e.current=n),[n]),e}function i7({set:n}){return wf(()=>(n(new Promise(()=>null)),()=>n(!1)),[n]),null}class q4 extends ve.Component{constructor(...e){super(...e),this.state={error:!1}}componentDidCatch(e){this.props.set(e)}render(){return this.state.error?null:this.props.children}}q4.getDerivedStateFromError=()=>({error:!0});const Z4="__default",J3=new Map,r7=n=>n&&!!n.memoized&&!!n.changes;function K4(n){var e;const t=typeof window<"u"?(e=window.devicePixelRatio)!=null?e:2:1;return Array.isArray(n)?Math.min(Math.max(n[0],t),n[1]):n}const Kc=n=>{var e;return(e=n.__r3f)==null?void 0:e.root.getState()},$t={obj:n=>n===Object(n)&&!$t.arr(n)&&typeof n!="function",fun:n=>typeof n=="function",str:n=>typeof n=="string",num:n=>typeof n=="number",boo:n=>typeof n=="boolean",und:n=>n===void 0,arr:n=>Array.isArray(n),equ(n,e,{arrays:t="shallow",objects:i="reference",strict:r=!0}={}){if(typeof n!=typeof e||!!n!=!!e)return!1;if($t.str(n)||$t.num(n))return n===e;const s=$t.obj(n);if(s&&i==="reference")return n===e;const o=$t.arr(n);if(o&&t==="reference")return n===e;if((o||s)&&n===e)return!0;let a;for(a in n)if(!(a in e))return!1;if(s&&t==="shallow"&&i==="shallow"){for(a in r?e:n)if(!$t.equ(n[a],e[a],{strict:r,objects:"reference"}))return!1}else for(a in r?e:n)if(n[a]!==e[a])return!1;if($t.und(a)){if(o&&n.length===0&&e.length===0||s&&Object.keys(n).length===0&&Object.keys(e).length===0)return!0;if(n!==e)return!1}return!0}};function s7(n){n.dispose&&n.type!=="Scene"&&n.dispose();for(const e in n)e.dispose==null||e.dispose(),delete n[e]}function vl(n,e){const t=n;return t.__r3f={type:"",root:null,previousAttach:null,memoizedProps:{},eventCount:0,handlers:{},objects:[],parent:null,...e},n}function Fv(n,e){let t=n;if(e.includes("-")){const i=e.split("-"),r=i.pop();return t=i.reduce((s,o)=>s[o],n),{target:t,key:r}}else return{target:t,key:e}}const Q3=/-\d+$/;function jg(n,e,t){if($t.str(t)){if(Q3.test(t)){const s=t.replace(Q3,""),{target:o,key:a}=Fv(n,s);Array.isArray(o[a])||(o[a]=[])}const{target:i,key:r}=Fv(n,t);e.__r3f.previousAttach=i[r],i[r]=e}else e.__r3f.previousAttach=t(n,e)}function $3(n,e,t){var i,r;if($t.str(t)){const{target:s,key:o}=Fv(n,t),a=e.__r3f.previousAttach;a===void 0?delete s[o]:s[o]=a}else(i=e.__r3f)==null||i.previousAttach==null||i.previousAttach(n,e);(r=e.__r3f)==null||delete r.previousAttach}function J4(n,{children:e,key:t,ref:i,...r},{children:s,key:o,ref:a,...u}={},f=!1){var h;const d=(h=n==null?void 0:n.__r3f)!=null?h:{},p=Object.entries(r),v=[];if(f){const w=Object.keys(u);for(let S=0;S{var g;if((g=n.__r3f)!=null&&g.primitive&&w==="object"||$t.equ(S,u[w]))return;if(/^on(Pointer|Click|DoubleClick|ContextMenu|Wheel)/.test(w))return v.push([w,S,!0,[]]);let x=[];w.includes("-")&&(x=w.split("-")),v.push([w,S,!1,x]);for(const M in r){const T=r[M];M.startsWith(`${w}-`)&&v.push([M,T,!1,M.split("-")])}});const y={...r};return d.memoizedProps&&d.memoizedProps.args&&(y.args=d.memoizedProps.args),d.memoizedProps&&d.memoizedProps.attach&&(y.attach=d.memoizedProps.attach),{memoized:y,changes:v}}const o7=typeof process<"u"&&!1;function Yg(n,e){var t,i,r;const s=(t=n.__r3f)!=null?t:{},o=s.root,a=(i=o==null||o.getState==null?void 0:o.getState())!=null?i:{},{memoized:u,changes:f}=r7(e)?e:J4(n,e),h=s.eventCount;n.__r3f&&(n.__r3f.memoizedProps=u);for(let p=0;pM[T],n),!(x&&x.set))){const[M,...T]=S.reverse();g=T.reverse().reduce((P,C)=>P[C],n),v=M}if(y===Z4+"remove")if(g.constructor){let M=J3.get(g.constructor);M||(M=new g.constructor,J3.set(g.constructor,M)),y=M[v]}else y=0;if(w)y?s.handlers[v]=y:delete s.handlers[v],s.eventCount=Object.keys(s.handlers).length;else if(x&&x.set&&(x.copy||x instanceof fa)){if(Array.isArray(y))x.fromArray?x.fromArray(y):x.set(...y);else if(x.copy&&y&&y.constructor&&(o7?x.constructor.name===y.constructor.name:x.constructor===y.constructor))x.copy(y);else if(y!==void 0){const M=x instanceof Be;!M&&x.setScalar?x.setScalar(y):x instanceof fa&&y instanceof fa?x.mask=y.mask:x.set(y),!X4()&&!a.linear&&M&&x.convertSRGBToLinear()}}else if(g[v]=y,g[v]instanceof mn&&g[v].format===pi&&g[v].type===Kr){const M=g[v];Xg(M)&&Xg(a.gl)?M.colorSpace=a.gl.outputColorSpace:M.encoding=a.gl.outputEncoding}yl(n)}if(s.parent&&a.internal&&n.raycast&&h!==s.eventCount){const p=a.internal.interaction.indexOf(n);p>-1&&a.internal.interaction.splice(p,1),s.eventCount&&a.internal.interaction.push(n)}return!(f.length===1&&f[0][0]==="onUpdate")&&f.length&&(r=n.__r3f)!=null&&r.parent&&kv(n),n}function yl(n){var e,t;const i=(e=n.__r3f)==null||(t=e.root)==null||t.getState==null?void 0:t.getState();i&&i.internal.frames===0&&i.invalidate()}function kv(n){n.onUpdate==null||n.onUpdate(n)}function a7(n,e){n.manual||(j4(n)?(n.left=e.width/-2,n.right=e.width/2,n.top=e.height/2,n.bottom=e.height/-2):n.aspect=e.width/e.height,n.updateProjectionMatrix(),n.updateMatrixWorld())}function bd(n){return(n.eventObject||n.object).uuid+"/"+n.index+n.instanceId}function l7(){var n;const e=typeof self<"u"&&self||typeof window<"u"&&window;if(!e)return Ol.DefaultEventPriority;switch((n=e.event)==null?void 0:n.type){case"click":case"contextmenu":case"dblclick":case"pointercancel":case"pointerdown":case"pointerup":return Ol.DiscreteEventPriority;case"pointermove":case"pointerout":case"pointerover":case"pointerenter":case"pointerleave":case"wheel":return Ol.ContinuousEventPriority;default:return Ol.DefaultEventPriority}}function Q4(n,e,t,i){const r=t.get(e);r&&(t.delete(e),t.size===0&&(n.delete(i),r.target.releasePointerCapture(i)))}function c7(n,e){const{internal:t}=n.getState();t.interaction=t.interaction.filter(i=>i!==e),t.initialHits=t.initialHits.filter(i=>i!==e),t.hovered.forEach((i,r)=>{(i.eventObject===e||i.object===e)&&t.hovered.delete(r)}),t.capturedMap.forEach((i,r)=>{Q4(t.capturedMap,e,i,r)})}function u7(n){function e(u){const{internal:f}=n.getState(),h=u.offsetX-f.initialClick[0],d=u.offsetY-f.initialClick[1];return Math.round(Math.sqrt(h*h+d*d))}function t(u){return u.filter(f=>["Move","Over","Enter","Out","Leave"].some(h=>{var d;return(d=f.__r3f)==null?void 0:d.handlers["onPointer"+h]}))}function i(u,f){const h=n.getState(),d=new Set,p=[],v=f?f(h.internal.interaction):h.internal.interaction;for(let g=0;g{const M=Kc(g.object),T=Kc(x.object);return!M||!T?g.distance-x.distance:T.events.priority-M.events.priority||g.distance-x.distance}).filter(g=>{const x=bd(g);return d.has(x)?!1:(d.add(x),!0)});h.events.filter&&(w=h.events.filter(w,h));for(const g of w){let x=g.object;for(;x;){var S;(S=x.__r3f)!=null&&S.eventCount&&p.push({...g,eventObject:x}),x=x.parent}}if("pointerId"in u&&h.internal.capturedMap.has(u.pointerId))for(let g of h.internal.capturedMap.get(u.pointerId).values())d.has(bd(g.intersection))||p.push(g.intersection);return p}function r(u,f,h,d){const p=n.getState();if(u.length){const v={stopped:!1};for(const y of u){const w=Kc(y.object)||p,{raycaster:S,pointer:g,camera:x,internal:M}=w,T=new z(g.x,g.y,0).unproject(x),P=R=>{var k,q;return(k=(q=M.capturedMap.get(R))==null?void 0:q.has(y.eventObject))!=null?k:!1},C=R=>{const k={intersection:y,target:f.target};M.capturedMap.has(R)?M.capturedMap.get(R).set(y.eventObject,k):M.capturedMap.set(R,new Map([[y.eventObject,k]])),f.target.setPointerCapture(R)},L=R=>{const k=M.capturedMap.get(R);k&&Q4(M.capturedMap,y.eventObject,k,R)};let D={};for(let R in f){let k=f[R];typeof k!="function"&&(D[R]=k)}let b={...y,...D,pointer:g,intersections:u,stopped:v.stopped,delta:h,unprojectedPoint:T,ray:S.ray,camera:x,stopPropagation(){const R="pointerId"in f&&M.capturedMap.get(f.pointerId);if((!R||R.has(y.eventObject))&&(b.stopped=v.stopped=!0,M.hovered.size&&Array.from(M.hovered.values()).find(k=>k.eventObject===y.eventObject))){const k=u.slice(0,u.indexOf(y));s([...k,y])}},target:{hasPointerCapture:P,setPointerCapture:C,releasePointerCapture:L},currentTarget:{hasPointerCapture:P,setPointerCapture:C,releasePointerCapture:L},nativeEvent:f};if(d(b),v.stopped===!0)break}}return u}function s(u){const{internal:f}=n.getState();for(const h of f.hovered.values())if(!u.length||!u.find(d=>d.object===h.object&&d.index===h.index&&d.instanceId===h.instanceId)){const p=h.eventObject.__r3f,v=p==null?void 0:p.handlers;if(f.hovered.delete(bd(h)),p!=null&&p.eventCount){const y={...h,intersections:u};v.onPointerOut==null||v.onPointerOut(y),v.onPointerLeave==null||v.onPointerLeave(y)}}}function o(u,f){for(let h=0;hs([]);case"onLostPointerCapture":return f=>{const{internal:h}=n.getState();"pointerId"in f&&h.capturedMap.has(f.pointerId)&&requestAnimationFrame(()=>{h.capturedMap.has(f.pointerId)&&(h.capturedMap.delete(f.pointerId),s([]))})}}return function(h){const{onPointerMissed:d,internal:p}=n.getState();p.lastEvent.current=h;const v=u==="onPointerMove",y=u==="onClick"||u==="onContextMenu"||u==="onDoubleClick",S=i(h,v?t:void 0),g=y?e(h):0;u==="onPointerDown"&&(p.initialClick=[h.offsetX,h.offsetY],p.initialHits=S.map(M=>M.eventObject)),y&&!S.length&&g<=2&&(o(h,p.interaction),d&&d(h)),v&&s(S);function x(M){const T=M.eventObject,P=T.__r3f,C=P==null?void 0:P.handlers;if(P!=null&&P.eventCount)if(v){if(C.onPointerOver||C.onPointerEnter||C.onPointerOut||C.onPointerLeave){const L=bd(M),D=p.hovered.get(L);D?D.stopped&&M.stopPropagation():(p.hovered.set(L,M),C.onPointerOver==null||C.onPointerOver(M),C.onPointerEnter==null||C.onPointerEnter(M))}C.onPointerMove==null||C.onPointerMove(M)}else{const L=C[u];L?(!y||p.initialHits.includes(T))&&(o(h,p.interaction.filter(D=>!p.initialHits.includes(D))),L(M)):y&&p.initialHits.includes(T)&&o(h,p.interaction.filter(D=>!p.initialHits.includes(D)))}}r(S,h,g,x)}}return{handlePointer:a}}const $4=n=>!!(n!=null&&n.render),eA=ve.createContext(null),f7=(n,e)=>{const t=qD((a,u)=>{const f=new z,h=new z,d=new z;function p(g=u().camera,x=h,M=u().size){const{width:T,height:P,top:C,left:L}=M,D=T/P;x instanceof z?d.copy(x):d.set(...x);const b=g.getWorldPosition(f).distanceTo(d);if(j4(g))return{width:T/g.zoom,height:P/g.zoom,top:C,left:L,factor:1,distance:b,aspect:D};{const R=g.fov*Math.PI/180,k=2*Math.tan(R/2)*b,q=k*(T/P);return{width:q,height:k,top:C,left:L,factor:T/q,distance:b,aspect:D}}}let v;const y=g=>a(x=>({performance:{...x.performance,current:g}})),w=new de;return{set:a,get:u,gl:null,camera:null,raycaster:null,events:{priority:1,enabled:!0,connected:!1},xr:null,scene:null,invalidate:(g=1)=>n(u(),g),advance:(g,x)=>e(g,x,u()),legacy:!1,linear:!1,flat:!1,controls:null,clock:new S_,pointer:w,mouse:w,frameloop:"always",onPointerMissed:void 0,performance:{current:1,min:.5,max:1,debounce:200,regress:()=>{const g=u();v&&clearTimeout(v),g.performance.current!==g.performance.min&&y(g.performance.min),v=setTimeout(()=>y(u().performance.max),g.performance.debounce)}},size:{width:0,height:0,top:0,left:0,updateStyle:!1},viewport:{initialDpr:0,dpr:0,width:0,height:0,top:0,left:0,aspect:0,distance:0,factor:0,getCurrentViewport:p},setEvents:g=>a(x=>({...x,events:{...x.events,...g}})),setSize:(g,x,M,T,P)=>{const C=u().camera,L={width:g,height:x,top:T||0,left:P||0,updateStyle:M};a(D=>({size:L,viewport:{...D.viewport,...p(C,h,L)}}))},setDpr:g=>a(x=>{const M=K4(g);return{viewport:{...x.viewport,dpr:M,initialDpr:x.viewport.initialDpr||M}}}),setFrameloop:(g="always")=>{const x=u().clock;x.stop(),x.elapsedTime=0,g!=="never"&&(x.start(),x.elapsedTime=0),a(()=>({frameloop:g}))},previousRoot:void 0,internal:{active:!1,priority:0,frames:0,lastEvent:ve.createRef(),interaction:[],hovered:new Map,subscribers:[],initialClick:[0,0],initialHits:[],capturedMap:new Map,subscribe:(g,x,M)=>{const T=u().internal;return T.priority=T.priority+(x>0?1:0),T.subscribers.push({ref:g,priority:x,store:M}),T.subscribers=T.subscribers.sort((P,C)=>P.priority-C.priority),()=>{const P=u().internal;P!=null&&P.subscribers&&(P.priority=P.priority-(x>0?1:0),P.subscribers=P.subscribers.filter(C=>C.ref!==g))}}}}}),i=t.getState();let r=i.size,s=i.viewport.dpr,o=i.camera;return t.subscribe(()=>{const{camera:a,size:u,viewport:f,gl:h,set:d}=t.getState();if(u.width!==r.width||u.height!==r.height||f.dpr!==s){var p;r=u,s=f.dpr,a7(a,u),h.setPixelRatio(f.dpr);const v=(p=u.updateStyle)!=null?p:typeof HTMLCanvasElement<"u"&&h.domElement instanceof HTMLCanvasElement;h.setSize(u.width,u.height,v)}a!==o&&(o=a,d(v=>({viewport:{...v.viewport,...v.viewport.getCurrentViewport(a)}})))}),t.subscribe(a=>n(a)),t};let Rd,h7=new Set,d7=new Set,p7=new Set;function qg(n,e){if(n.size)for(const{callback:t}of n.values())t(e)}function Jc(n,e){switch(n){case"before":return qg(h7,e);case"after":return qg(d7,e);case"tail":return qg(p7,e)}}let Zg,Kg;function Jg(n,e,t){let i=e.clock.getDelta();for(e.frameloop==="never"&&typeof n=="number"&&(i=n-e.clock.elapsedTime,e.clock.oldTime=e.clock.elapsedTime,e.clock.elapsedTime=n),Zg=e.internal.subscribers,Rd=0;Rd0)&&!((f=r.gl.xr)!=null&&f.isPresenting)&&(t+=Jg(u,r))}if(Jc("after",u),t===0)return Jc("tail",u),e=!1,cancelAnimationFrame(i)}function o(u,f=1){var h;if(!u)return n.forEach(d=>o(d.store.getState()),f);(h=u.gl.xr)!=null&&h.isPresenting||!u.internal.active||u.frameloop==="never"||(u.internal.frames=Math.min(60,u.internal.frames+f),e||(e=!0,requestAnimationFrame(s)))}function a(u,f=!0,h,d){if(f&&Jc("before",u),h)Jg(u,h,d);else for(const p of n.values())Jg(u,p.store.getState());f&&Jc("after",u)}return{loop:s,invalidate:o,advance:a}}function tA(){const n=ve.useContext(eA);if(!n)throw new Error("R3F: Hooks can only be used within the Canvas component!");return n}function Vi(n=t=>t,e){return tA()(n,e)}function A_(n,e=0){const t=tA(),i=t.getState().internal.subscribe,r=Y4(n);return wf(()=>i(r,e,t),[e,i,t]),null}const tc=new Map,{invalidate:eM,advance:tM}=m7(tc),{reconciler:Ip,applyProps:ml}=t7(tc,l7),gl={objects:"shallow",strict:!1},g7=(n,e)=>{const t=typeof n=="function"?n(e):n;return $4(t)?t:new r_({powerPreference:"high-performance",canvas:e,antialias:!0,alpha:!0,...n})};function v7(n,e){const t=typeof HTMLCanvasElement<"u"&&n instanceof HTMLCanvasElement;if(e){const{width:i,height:r,top:s,left:o,updateStyle:a=t}=e;return{width:i,height:r,top:s,left:o,updateStyle:a}}else if(typeof HTMLCanvasElement<"u"&&n instanceof HTMLCanvasElement&&n.parentElement){const{width:i,height:r,top:s,left:o}=n.parentElement.getBoundingClientRect();return{width:i,height:r,top:s,left:o,updateStyle:t}}else if(typeof OffscreenCanvas<"u"&&n instanceof OffscreenCanvas)return{width:n.width,height:n.height,top:0,left:0,updateStyle:t};return{width:0,height:0,top:0,left:0}}function y7(n){const e=tc.get(n),t=e==null?void 0:e.fiber,i=e==null?void 0:e.store;e&&console.warn("R3F.createRoot should only be called once!");const r=typeof reportError=="function"?reportError:console.error,s=i||f7(eM,tM),o=t||Ip.createContainer(s,Ol.ConcurrentRoot,null,!1,null,"",r,null);e||tc.set(n,{fiber:o,store:s});let a,u=!1,f;return{configure(h={}){let{gl:d,size:p,scene:v,events:y,onCreated:w,shadows:S=!1,linear:g=!1,flat:x=!1,legacy:M=!1,orthographic:T=!1,frameloop:P="always",dpr:C=[1,2],performance:L,raycaster:D,camera:b,onPointerMissed:R}=h,k=s.getState(),q=k.gl;k.gl||k.set({gl:q=g7(d,n)});let oe=k.raycaster;oe||k.set({raycaster:oe=new k4});const{params:V,...Q}=D||{};if($t.equ(Q,oe,gl)||ml(oe,{...Q}),$t.equ(V,oe.params,gl)||ml(oe,{params:{...oe.params,...V}}),!k.camera||k.camera===f&&!$t.equ(f,b,gl)){f=b;const J=b instanceof mf,Z=J?b:T?new Ss(0,0,0,0,.1,1e3):new pn(75,0,.1,1e3);J||(Z.position.z=5,b&&ml(Z,b),!k.camera&&!(b!=null&&b.rotation)&&Z.lookAt(0,0,0)),k.set({camera:Z}),oe.camera=Z}if(!k.scene){let J;v instanceof Pp?J=v:(J=new Pp,v&&ml(J,v)),k.set({scene:vl(J)})}if(!k.xr){var te;const J=(pe,Ee)=>{const Te=s.getState();Te.frameloop!=="never"&&tM(pe,!0,Te,Ee)},Z=()=>{const pe=s.getState();pe.gl.xr.enabled=pe.gl.xr.isPresenting,pe.gl.xr.setAnimationLoop(pe.gl.xr.isPresenting?J:null),pe.gl.xr.isPresenting||eM(pe)},ie={connect(){const pe=s.getState().gl;pe.xr.addEventListener("sessionstart",Z),pe.xr.addEventListener("sessionend",Z)},disconnect(){const pe=s.getState().gl;pe.xr.removeEventListener("sessionstart",Z),pe.xr.removeEventListener("sessionend",Z)}};typeof((te=q.xr)==null?void 0:te.addEventListener)=="function"&&ie.connect(),k.set({xr:ie})}if(q.shadowMap){const J=q.shadowMap.enabled,Z=q.shadowMap.type;if(q.shadowMap.enabled=!!S,$t.boo(S))q.shadowMap.type=hu;else if($t.str(S)){var ae;const ie={basic:LE,percentage:Jp,soft:hu,variance:Er};q.shadowMap.type=(ae=ie[S])!=null?ae:hu}else $t.obj(S)&&Object.assign(q.shadowMap,S);(J!==q.shadowMap.enabled||Z!==q.shadowMap.type)&&(q.shadowMap.needsUpdate=!0)}const N=X4();N&&("enabled"in N?N.enabled=!M:"legacyMode"in N&&(N.legacyMode=M)),ml(q,{outputEncoding:g?3e3:3001,toneMapping:x?Zr:Fy}),k.legacy!==M&&k.set(()=>({legacy:M})),k.linear!==g&&k.set(()=>({linear:g})),k.flat!==x&&k.set(()=>({flat:x})),d&&!$t.fun(d)&&!$4(d)&&!$t.equ(d,q,gl)&&ml(q,d),y&&!k.events.handlers&&k.set({events:y(s)});const Y=v7(n,p);return $t.equ(Y,k.size,gl)||k.setSize(Y.width,Y.height,Y.updateStyle,Y.top,Y.left),C&&k.viewport.dpr!==K4(C)&&k.setDpr(C),k.frameloop!==P&&k.setFrameloop(P),k.onPointerMissed||k.set({onPointerMissed:R}),L&&!$t.equ(L,k.performance,gl)&&k.set(J=>({performance:{...J.performance,...L}})),a=w,u=!0,this},render(h){return u||this.configure(),Ip.updateContainer(ve.createElement(_7,{store:s,children:h,onCreated:a,rootElement:n}),o,null,()=>{}),s},unmount(){nA(n)}}}function _7({store:n,children:e,onCreated:t,rootElement:i}){return wf(()=>{const r=n.getState();r.set(s=>({internal:{...s.internal,active:!0}})),t&&t(r),n.getState().events.connected||r.events.connect==null||r.events.connect(i)},[]),ve.createElement(eA.Provider,{value:n},e)}function nA(n,e){const t=tc.get(n),i=t==null?void 0:t.fiber;if(i){const r=t==null?void 0:t.store.getState();r&&(r.internal.active=!1),Ip.updateContainer(null,i,null,()=>{r&&setTimeout(()=>{try{var s,o,a,u;r.events.disconnect==null||r.events.disconnect(),(s=r.gl)==null||(o=s.renderLists)==null||o.dispose==null||o.dispose(),(a=r.gl)==null||a.forceContextLoss==null||a.forceContextLoss(),(u=r.gl)!=null&&u.xr&&r.xr.disconnect(),s7(r),tc.delete(n),e&&e(n)}catch{}},500)})}}Ip.injectIntoDevTools({bundleType:0,rendererPackageName:"@react-three/fiber",version:ve.version});function nc(){return nc=Object.assign?Object.assign.bind():function(n){for(var e=1;e=0?i=setTimeout(u,e-h):(i=null,t||(a=n.apply(s,r),s=r=null))}var f=function(){s=this,r=arguments,o=Date.now();var h=t&&!i;return i||(i=setTimeout(u,e)),h&&(a=n.apply(s,r),s=r=null),a};return f.clear=function(){i&&(clearTimeout(i),i=null)},f.flush=function(){i&&(a=n.apply(s,r),s=r=null,clearTimeout(i),i=null)},f}Bv.debounce=Bv;var x7=Bv;const nM=Gv(x7);function S7(n){let{debounce:e,scroll:t,polyfill:i,offsetSize:r}=n===void 0?{debounce:0,scroll:!1,offsetSize:!1}:n;const s=i||(typeof window>"u"?class{}:window.ResizeObserver);if(!s)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,a]=ve.useState({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),u=ve.useRef({element:null,scrollContainers:null,resizeObserver:null,lastBounds:o}),f=e?typeof e=="number"?e:e.scroll:null,h=e?typeof e=="number"?e:e.resize:null,d=ve.useRef(!1);ve.useEffect(()=>(d.current=!0,()=>void(d.current=!1)));const[p,v,y]=ve.useMemo(()=>{const x=()=>{if(!u.current.element)return;const{left:M,top:T,width:P,height:C,bottom:L,right:D,x:b,y:R}=u.current.element.getBoundingClientRect(),k={left:M,top:T,width:P,height:C,bottom:L,right:D,x:b,y:R};u.current.element instanceof HTMLElement&&r&&(k.height=u.current.element.offsetHeight,k.width=u.current.element.offsetWidth),Object.freeze(k),d.current&&!T7(u.current.lastBounds,k)&&a(u.current.lastBounds=k)};return[x,h?nM(x,h):x,f?nM(x,f):x]},[a,r,f,h]);function w(){u.current.scrollContainers&&(u.current.scrollContainers.forEach(x=>x.removeEventListener("scroll",y,!0)),u.current.scrollContainers=null),u.current.resizeObserver&&(u.current.resizeObserver.disconnect(),u.current.resizeObserver=null)}function S(){u.current.element&&(u.current.resizeObserver=new s(y),u.current.resizeObserver.observe(u.current.element),t&&u.current.scrollContainers&&u.current.scrollContainers.forEach(x=>x.addEventListener("scroll",y,{capture:!0,passive:!0})))}const g=x=>{!x||x===u.current.element||(w(),u.current.element=x,u.current.scrollContainers=iA(x),S())};return w7(y,!!t),M7(v),ve.useEffect(()=>{w(),S()},[t,y,v]),ve.useEffect(()=>w,[]),[g,o,p]}function M7(n){ve.useEffect(()=>{const e=n;return window.addEventListener("resize",e),()=>void window.removeEventListener("resize",e)},[n])}function w7(n,e){ve.useEffect(()=>{if(e){const t=n;return window.addEventListener("scroll",t,{capture:!0,passive:!0}),()=>void window.removeEventListener("scroll",t,!0)}},[n,e])}function iA(n){const e=[];if(!n||n===document.body)return e;const{overflow:t,overflowX:i,overflowY:r}=window.getComputedStyle(n);return[t,i,r].some(s=>s==="auto"||s==="scroll")&&e.push(n),[...e,...iA(n.parentElement)]}const E7=["x","y","top","bottom","left","right","width","height"],T7=(n,e)=>E7.every(t=>n[t]===e[t]);var A7=Object.defineProperty,C7=Object.defineProperties,b7=Object.getOwnPropertyDescriptors,iM=Object.getOwnPropertySymbols,R7=Object.prototype.hasOwnProperty,P7=Object.prototype.propertyIsEnumerable,rM=(n,e,t)=>e in n?A7(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,sM=(n,e)=>{for(var t in e||(e={}))R7.call(e,t)&&rM(n,t,e[t]);if(iM)for(var t of iM(e))P7.call(e,t)&&rM(n,t,e[t]);return n},L7=(n,e)=>C7(n,b7(e));function rA(n,e,t){if(!n)return;if(t(n)===!0)return n;let i=e?n.return:n.child;for(;i;){const r=rA(i,e,t);if(r)return r;i=e?null:i.sibling}}function sA(n){try{return Object.defineProperties(n,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return n}}const C_=sA(ve.createContext(null));class oA extends ve.Component{render(){return ve.createElement(C_.Provider,{value:this._reactInternals},this.props.children)}}const{ReactCurrentOwner:oM,ReactCurrentDispatcher:aM}=ve.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function I7(){const n=ve.useContext(C_);if(n===null)throw new Error("its-fine: useFiber must be called within a !");const e=ve.useId();return ve.useMemo(()=>{for(const i of[oM==null?void 0:oM.current,n,n==null?void 0:n.alternate]){if(!i)continue;const r=rA(i,!1,s=>{let o=s.memoizedState;for(;o;){if(o.memoizedState===e)return!0;o=o.next}});if(r)return r}},[n,e])}function N7(){var n,e;const t=I7(),[i]=ve.useState(()=>new Map);i.clear();let r=t;for(;r;){const s=(n=r.type)==null?void 0:n._context;s&&s!==C_&&!i.has(s)&&i.set(s,(e=aM==null?void 0:aM.current)==null?void 0:e.readContext(sA(s))),r=r.return}return i}function D7(){const n=N7();return ve.useMemo(()=>Array.from(n.keys()).reduce((e,t)=>i=>ve.createElement(e,null,ve.createElement(t.Provider,L7(sM({},i),{value:n.get(t)}))),e=>ve.createElement(oA,sM({},e))),[n])}const Qg={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 U7(n){const{handlePointer:e}=u7(n);return{priority:1,enabled:!0,compute(t,i,r){i.pointer.set(t.offsetX/i.size.width*2-1,-(t.offsetY/i.size.height)*2+1),i.raycaster.setFromCamera(i.pointer,i.camera)},connected:void 0,handlers:Object.keys(Qg).reduce((t,i)=>({...t,[i]:e(i)}),{}),update:()=>{var t;const{events:i,internal:r}=n.getState();(t=r.lastEvent)!=null&&t.current&&i.handlers&&i.handlers.onPointerMove(r.lastEvent.current)},connect:t=>{var i;const{set:r,events:s}=n.getState();s.disconnect==null||s.disconnect(),r(o=>({events:{...o.events,connected:t}})),Object.entries((i=s.handlers)!=null?i:[]).forEach(([o,a])=>{const[u,f]=Qg[o];t.addEventListener(u,a,{passive:f})})},disconnect:()=>{const{set:t,events:i}=n.getState();if(i.connected){var r;Object.entries((r=i.handlers)!=null?r:[]).forEach(([s,o])=>{if(i&&i.connected instanceof HTMLElement){const[a]=Qg[s];i.connected.removeEventListener(a,o)}}),t(s=>({events:{...s.events,connected:void 0}}))}}}}const O7=ve.forwardRef(function({children:e,fallback:t,resize:i,style:r,gl:s,events:o=U7,eventSource:a,eventPrefix:u,shadows:f,linear:h,flat:d,legacy:p,orthographic:v,frameloop:y,dpr:w,performance:S,raycaster:g,camera:x,scene:M,onPointerMissed:T,onCreated:P,...C},L){ve.useMemo(()=>e7(XD),[]);const D=D7(),[b,R]=S7({scroll:!0,debounce:{scroll:50,resize:0},...i}),k=ve.useRef(null),q=ve.useRef(null);ve.useImperativeHandle(L,()=>k.current);const oe=Y4(T),[V,Q]=ve.useState(!1),[te,ae]=ve.useState(!1);if(V)throw V;if(te)throw te;const N=ve.useRef(null);wf(()=>{const H=k.current;R.width>0&&R.height>0&&H&&(N.current||(N.current=y7(H)),N.current.configure({gl:s,events:o,shadows:f,linear:h,flat:d,legacy:p,orthographic:v,frameloop:y,dpr:w,performance:S,raycaster:g,camera:x,scene:M,size:R,onPointerMissed:(...Y)=>oe.current==null?void 0:oe.current(...Y),onCreated:Y=>{Y.events.connect==null||Y.events.connect(a?n7(a)?a.current:a:q.current),u&&Y.setEvents({compute:(J,Z)=>{const ie=J[u+"X"],pe=J[u+"Y"];Z.pointer.set(ie/Z.size.width*2-1,-(pe/Z.size.height)*2+1),Z.raycaster.setFromCamera(Z.pointer,Z.camera)}}),P==null||P(Y)}}),N.current.render(ve.createElement(D,null,ve.createElement(q4,{set:ae},ve.createElement(ve.Suspense,{fallback:ve.createElement(i7,{set:Q})},e)))))}),ve.useEffect(()=>{const H=k.current;if(H)return()=>nA(H)},[]);const B=a?"none":"auto";return ve.createElement("div",nc({ref:q,style:{position:"relative",width:"100%",height:"100%",overflow:"hidden",pointerEvents:B,...r}},C),ve.createElement("div",{ref:b,style:{width:"100%",height:"100%"}},ve.createElement("canvas",{ref:k,style:{display:"block"}},t)))}),z7=ve.forwardRef(function(e,t){return ve.createElement(oA,null,ve.createElement(O7,nc({},e,{ref:t})))}),F7="/my-portfolio/assets/moon-EUT5YxWH.jpg",k7="/my-portfolio/assets/normal-J2JQSlYj.jpg";function B7(){const n=new Dv().load(F7);new Dv().load(k7);const e=ve.useRef();return A_(()=>{e.current.rotation.y+=.002}),fe.jsxs("mesh",{ref:e,children:[fe.jsx("sphereGeometry",{args:[3,64,64]}),fe.jsx("meshStandardMaterial",{map:n})]})}function H7(n){return function(e){n.forEach(function(t){typeof t=="function"?t(e):t!=null&&(t.current=e)})}}var V7=Object.defineProperty,G7=(n,e,t)=>e in n?V7(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,ut=(n,e,t)=>(G7(n,typeof e!="symbol"?e+"":e,t),t);const Pd=new Aa,lM=new gs,W7=Math.cos(70*(Math.PI/180)),cM=(n,e)=>(n%e+e)%e;let X7=class extends es{constructor(e,t){super(),ut(this,"object"),ut(this,"domElement"),ut(this,"enabled",!0),ut(this,"target",new z),ut(this,"minDistance",0),ut(this,"maxDistance",1/0),ut(this,"minZoom",0),ut(this,"maxZoom",1/0),ut(this,"minPolarAngle",0),ut(this,"maxPolarAngle",Math.PI),ut(this,"minAzimuthAngle",-1/0),ut(this,"maxAzimuthAngle",1/0),ut(this,"enableDamping",!1),ut(this,"dampingFactor",.05),ut(this,"enableZoom",!0),ut(this,"zoomSpeed",1),ut(this,"enableRotate",!0),ut(this,"rotateSpeed",1),ut(this,"enablePan",!0),ut(this,"panSpeed",1),ut(this,"screenSpacePanning",!0),ut(this,"keyPanSpeed",7),ut(this,"zoomToCursor",!1),ut(this,"autoRotate",!1),ut(this,"autoRotateSpeed",2),ut(this,"reverseOrbit",!1),ut(this,"reverseHorizontalOrbit",!1),ut(this,"reverseVerticalOrbit",!1),ut(this,"keys",{LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",BOTTOM:"ArrowDown"}),ut(this,"mouseButtons",{LEFT:Zo.ROTATE,MIDDLE:Zo.DOLLY,RIGHT:Zo.PAN}),ut(this,"touches",{ONE:Ko.ROTATE,TWO:Ko.DOLLY_PAN}),ut(this,"target0"),ut(this,"position0"),ut(this,"zoom0"),ut(this,"_domElementKeyEvents",null),ut(this,"getPolarAngle"),ut(this,"getAzimuthalAngle"),ut(this,"setPolarAngle"),ut(this,"setAzimuthalAngle"),ut(this,"getDistance"),ut(this,"listenToKeyEvents"),ut(this,"stopListenToKeyEvents"),ut(this,"saveState"),ut(this,"reset"),ut(this,"update"),ut(this,"connect"),ut(this,"dispose"),this.object=e,this.domElement=t,this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this.getPolarAngle=()=>h.phi,this.getAzimuthalAngle=()=>h.theta,this.setPolarAngle=X=>{let ge=cM(X,2*Math.PI),ze=h.phi;ze<0&&(ze+=2*Math.PI),ge<0&&(ge+=2*Math.PI);let Ue=Math.abs(ge-ze);2*Math.PI-Ue{let ge=cM(X,2*Math.PI),ze=h.theta;ze<0&&(ze+=2*Math.PI),ge<0&&(ge+=2*Math.PI);let Ue=Math.abs(ge-ze);2*Math.PI-Uei.object.position.distanceTo(i.target),this.listenToKeyEvents=X=>{X.addEventListener("keydown",tt),this._domElementKeyEvents=X},this.stopListenToKeyEvents=()=>{this._domElementKeyEvents.removeEventListener("keydown",tt),this._domElementKeyEvents=null},this.saveState=()=>{i.target0.copy(i.target),i.position0.copy(i.object.position),i.zoom0=i.object.zoom},this.reset=()=>{i.target.copy(i.target0),i.object.position.copy(i.position0),i.object.zoom=i.zoom0,i.object.updateProjectionMatrix(),i.dispatchEvent(r),i.update(),u=a.NONE},this.update=(()=>{const X=new z,ge=new z(0,1,0),ze=new oi().setFromUnitVectors(e.up,ge),Ue=ze.clone().invert(),Me=new z,W=new oi,Re=2*Math.PI;return function(){const it=i.object.position;ze.setFromUnitVectors(e.up,ge),Ue.copy(ze).invert(),X.copy(it).sub(i.target),X.applyQuaternion(ze),h.setFromVector3(X),i.autoRotate&&u===a.NONE&&V(q()),i.enableDamping?(h.theta+=d.theta*i.dampingFactor,h.phi+=d.phi*i.dampingFactor):(h.theta+=d.theta,h.phi+=d.phi);let Ye=i.minAzimuthAngle,At=i.maxAzimuthAngle;isFinite(Ye)&&isFinite(At)&&(Ye<-Math.PI?Ye+=Re:Ye>Math.PI&&(Ye-=Re),At<-Math.PI?At+=Re:At>Math.PI&&(At-=Re),Ye<=At?h.theta=Math.max(Ye,Math.min(At,h.theta)):h.theta=h.theta>(Ye+At)/2?Math.max(Ye,h.theta):Math.min(At,h.theta)),h.phi=Math.max(i.minPolarAngle,Math.min(i.maxPolarAngle,h.phi)),h.makeSafe(),i.enableDamping===!0?i.target.addScaledVector(v,i.dampingFactor):i.target.add(v),i.zoomToCursor&&b||i.object.isOrthographicCamera?h.radius=J(h.radius):h.radius=J(h.radius*p),X.setFromSpherical(h),X.applyQuaternion(Ue),it.copy(i.target).add(X),i.object.matrixAutoUpdate||i.object.updateMatrix(),i.object.lookAt(i.target),i.enableDamping===!0?(d.theta*=1-i.dampingFactor,d.phi*=1-i.dampingFactor,v.multiplyScalar(1-i.dampingFactor)):(d.set(0,0,0),v.set(0,0,0));let Rt=!1;if(i.zoomToCursor&&b){let Gt=null;if(i.object instanceof pn&&i.object.isPerspectiveCamera){const Jt=X.length();Gt=J(Jt*p);const Lt=Jt-Gt;i.object.position.addScaledVector(L,Lt),i.object.updateMatrixWorld()}else if(i.object.isOrthographicCamera){const Jt=new z(D.x,D.y,0);Jt.unproject(i.object),i.object.zoom=Math.max(i.minZoom,Math.min(i.maxZoom,i.object.zoom/p)),i.object.updateProjectionMatrix(),Rt=!0;const Lt=new z(D.x,D.y,0);Lt.unproject(i.object),i.object.position.sub(Lt).add(Jt),i.object.updateMatrixWorld(),Gt=X.length()}else console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."),i.zoomToCursor=!1;Gt!==null&&(i.screenSpacePanning?i.target.set(0,0,-1).transformDirection(i.object.matrix).multiplyScalar(Gt).add(i.object.position):(Pd.origin.copy(i.object.position),Pd.direction.set(0,0,-1).transformDirection(i.object.matrix),Math.abs(i.object.up.dot(Pd.direction))f||8*(1-W.dot(i.object.quaternion))>f?(i.dispatchEvent(r),Me.copy(i.object.position),W.copy(i.object.quaternion),Rt=!1,!0):!1}})(),this.connect=X=>{X===document&&console.error('THREE.OrbitControls: "document" should not be used as the target "domElement". Please use "renderer.domElement" instead.'),i.domElement=X,i.domElement.style.touchAction="none",i.domElement.addEventListener("contextmenu",Ct),i.domElement.addEventListener("pointerdown",ee),i.domElement.addEventListener("pointercancel",ye),i.domElement.addEventListener("wheel",Fe)},this.dispose=()=>{var X,ge,ze,Ue,Me,W;(X=i.domElement)==null||X.removeEventListener("contextmenu",Ct),(ge=i.domElement)==null||ge.removeEventListener("pointerdown",ee),(ze=i.domElement)==null||ze.removeEventListener("pointercancel",ye),(Ue=i.domElement)==null||Ue.removeEventListener("wheel",Fe),(Me=i.domElement)==null||Me.ownerDocument.removeEventListener("pointermove",xe),(W=i.domElement)==null||W.ownerDocument.removeEventListener("pointerup",_e),i._domElementKeyEvents!==null&&i._domElementKeyEvents.removeEventListener("keydown",tt)};const i=this,r={type:"change"},s={type:"start"},o={type:"end"},a={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6};let u=a.NONE;const f=1e-6,h=new zv,d=new zv;let p=1;const v=new z,y=new de,w=new de,S=new de,g=new de,x=new de,M=new de,T=new de,P=new de,C=new de,L=new z,D=new de;let b=!1;const R=[],k={};function q(){return 2*Math.PI/60/60*i.autoRotateSpeed}function oe(){return Math.pow(.95,i.zoomSpeed)}function V(X){i.reverseOrbit||i.reverseHorizontalOrbit?d.theta+=X:d.theta-=X}function Q(X){i.reverseOrbit||i.reverseVerticalOrbit?d.phi+=X:d.phi-=X}const te=(()=>{const X=new z;return function(ze,Ue){X.setFromMatrixColumn(Ue,0),X.multiplyScalar(-ze),v.add(X)}})(),ae=(()=>{const X=new z;return function(ze,Ue){i.screenSpacePanning===!0?X.setFromMatrixColumn(Ue,1):(X.setFromMatrixColumn(Ue,0),X.crossVectors(i.object.up,X)),X.multiplyScalar(ze),v.add(X)}})(),N=(()=>{const X=new z;return function(ze,Ue){const Me=i.domElement;if(Me&&i.object instanceof pn&&i.object.isPerspectiveCamera){const W=i.object.position;X.copy(W).sub(i.target);let Re=X.length();Re*=Math.tan(i.object.fov/2*Math.PI/180),te(2*ze*Re/Me.clientHeight,i.object.matrix),ae(2*Ue*Re/Me.clientHeight,i.object.matrix)}else Me&&i.object instanceof Ss&&i.object.isOrthographicCamera?(te(ze*(i.object.right-i.object.left)/i.object.zoom/Me.clientWidth,i.object.matrix),ae(Ue*(i.object.top-i.object.bottom)/i.object.zoom/Me.clientHeight,i.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),i.enablePan=!1)}})();function B(X){i.object instanceof pn&&i.object.isPerspectiveCamera||i.object instanceof Ss&&i.object.isOrthographicCamera?p/=X:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),i.enableZoom=!1)}function H(X){i.object instanceof pn&&i.object.isPerspectiveCamera||i.object instanceof Ss&&i.object.isOrthographicCamera?p*=X:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),i.enableZoom=!1)}function Y(X){if(!i.zoomToCursor||!i.domElement)return;b=!0;const ge=i.domElement.getBoundingClientRect(),ze=X.clientX-ge.left,Ue=X.clientY-ge.top,Me=ge.width,W=ge.height;D.x=ze/Me*2-1,D.y=-(Ue/W)*2+1,L.set(D.x,D.y,1).unproject(i.object).sub(i.object.position).normalize()}function J(X){return Math.max(i.minDistance,Math.min(i.maxDistance,X))}function Z(X){y.set(X.clientX,X.clientY)}function ie(X){Y(X),T.set(X.clientX,X.clientY)}function pe(X){g.set(X.clientX,X.clientY)}function Ee(X){w.set(X.clientX,X.clientY),S.subVectors(w,y).multiplyScalar(i.rotateSpeed);const ge=i.domElement;ge&&(V(2*Math.PI*S.x/ge.clientHeight),Q(2*Math.PI*S.y/ge.clientHeight)),y.copy(w),i.update()}function Te(X){P.set(X.clientX,X.clientY),C.subVectors(P,T),C.y>0?B(oe()):C.y<0&&H(oe()),T.copy(P),i.update()}function nt(X){x.set(X.clientX,X.clientY),M.subVectors(x,g).multiplyScalar(i.panSpeed),N(M.x,M.y),g.copy(x),i.update()}function lt(X){Y(X),X.deltaY<0?H(oe()):X.deltaY>0&&B(oe()),i.update()}function Xe(X){let ge=!1;switch(X.code){case i.keys.UP:N(0,i.keyPanSpeed),ge=!0;break;case i.keys.BOTTOM:N(0,-i.keyPanSpeed),ge=!0;break;case i.keys.LEFT:N(i.keyPanSpeed,0),ge=!0;break;case i.keys.RIGHT:N(-i.keyPanSpeed,0),ge=!0;break}ge&&(X.preventDefault(),i.update())}function Ke(){if(R.length==1)y.set(R[0].pageX,R[0].pageY);else{const X=.5*(R[0].pageX+R[1].pageX),ge=.5*(R[0].pageY+R[1].pageY);y.set(X,ge)}}function G(){if(R.length==1)g.set(R[0].pageX,R[0].pageY);else{const X=.5*(R[0].pageX+R[1].pageX),ge=.5*(R[0].pageY+R[1].pageY);g.set(X,ge)}}function we(){const X=R[0].pageX-R[1].pageX,ge=R[0].pageY-R[1].pageY,ze=Math.sqrt(X*X+ge*ge);T.set(0,ze)}function me(){i.enableZoom&&we(),i.enablePan&&G()}function Ce(){i.enableZoom&&we(),i.enableRotate&&Ke()}function he(X){if(R.length==1)w.set(X.pageX,X.pageY);else{const ze=He(X),Ue=.5*(X.pageX+ze.x),Me=.5*(X.pageY+ze.y);w.set(Ue,Me)}S.subVectors(w,y).multiplyScalar(i.rotateSpeed);const ge=i.domElement;ge&&(V(2*Math.PI*S.x/ge.clientHeight),Q(2*Math.PI*S.y/ge.clientHeight)),y.copy(w)}function Ze(X){if(R.length==1)x.set(X.pageX,X.pageY);else{const ge=He(X),ze=.5*(X.pageX+ge.x),Ue=.5*(X.pageY+ge.y);x.set(ze,Ue)}M.subVectors(x,g).multiplyScalar(i.panSpeed),N(M.x,M.y),g.copy(x)}function Ne(X){const ge=He(X),ze=X.pageX-ge.x,Ue=X.pageY-ge.y,Me=Math.sqrt(ze*ze+Ue*Ue);P.set(0,Me),C.set(0,Math.pow(P.y/T.y,i.zoomSpeed)),B(C.y),T.copy(P)}function U(X){i.enableZoom&&Ne(X),i.enablePan&&Ze(X)}function I(X){i.enableZoom&&Ne(X),i.enableRotate&&he(X)}function ee(X){var ge,ze;i.enabled!==!1&&(R.length===0&&((ge=i.domElement)==null||ge.ownerDocument.addEventListener("pointermove",xe),(ze=i.domElement)==null||ze.ownerDocument.addEventListener("pointerup",_e)),yt(X),X.pointerType==="touch"?dt(X):je(X))}function xe(X){i.enabled!==!1&&(X.pointerType==="touch"?Se(X):Le(X))}function _e(X){var ge,ze,Ue;ct(X),R.length===0&&((ge=i.domElement)==null||ge.releasePointerCapture(X.pointerId),(ze=i.domElement)==null||ze.ownerDocument.removeEventListener("pointermove",xe),(Ue=i.domElement)==null||Ue.ownerDocument.removeEventListener("pointerup",_e)),i.dispatchEvent(o),u=a.NONE}function ye(X){ct(X)}function je(X){let ge;switch(X.button){case 0:ge=i.mouseButtons.LEFT;break;case 1:ge=i.mouseButtons.MIDDLE;break;case 2:ge=i.mouseButtons.RIGHT;break;default:ge=-1}switch(ge){case Zo.DOLLY:if(i.enableZoom===!1)return;ie(X),u=a.DOLLY;break;case Zo.ROTATE:if(X.ctrlKey||X.metaKey||X.shiftKey){if(i.enablePan===!1)return;pe(X),u=a.PAN}else{if(i.enableRotate===!1)return;Z(X),u=a.ROTATE}break;case Zo.PAN:if(X.ctrlKey||X.metaKey||X.shiftKey){if(i.enableRotate===!1)return;Z(X),u=a.ROTATE}else{if(i.enablePan===!1)return;pe(X),u=a.PAN}break;default:u=a.NONE}u!==a.NONE&&i.dispatchEvent(s)}function Le(X){if(i.enabled!==!1)switch(u){case a.ROTATE:if(i.enableRotate===!1)return;Ee(X);break;case a.DOLLY:if(i.enableZoom===!1)return;Te(X);break;case a.PAN:if(i.enablePan===!1)return;nt(X);break}}function Fe(X){i.enabled===!1||i.enableZoom===!1||u!==a.NONE&&u!==a.ROTATE||(X.preventDefault(),i.dispatchEvent(s),lt(X),i.dispatchEvent(o))}function tt(X){i.enabled===!1||i.enablePan===!1||Xe(X)}function dt(X){switch(et(X),R.length){case 1:switch(i.touches.ONE){case Ko.ROTATE:if(i.enableRotate===!1)return;Ke(),u=a.TOUCH_ROTATE;break;case Ko.PAN:if(i.enablePan===!1)return;G(),u=a.TOUCH_PAN;break;default:u=a.NONE}break;case 2:switch(i.touches.TWO){case Ko.DOLLY_PAN:if(i.enableZoom===!1&&i.enablePan===!1)return;me(),u=a.TOUCH_DOLLY_PAN;break;case Ko.DOLLY_ROTATE:if(i.enableZoom===!1&&i.enableRotate===!1)return;Ce(),u=a.TOUCH_DOLLY_ROTATE;break;default:u=a.NONE}break;default:u=a.NONE}u!==a.NONE&&i.dispatchEvent(s)}function Se(X){switch(et(X),u){case a.TOUCH_ROTATE:if(i.enableRotate===!1)return;he(X),i.update();break;case a.TOUCH_PAN:if(i.enablePan===!1)return;Ze(X),i.update();break;case a.TOUCH_DOLLY_PAN:if(i.enableZoom===!1&&i.enablePan===!1)return;U(X),i.update();break;case a.TOUCH_DOLLY_ROTATE:if(i.enableZoom===!1&&i.enableRotate===!1)return;I(X),i.update();break;default:u=a.NONE}}function Ct(X){i.enabled!==!1&&X.preventDefault()}function yt(X){R.push(X)}function ct(X){delete k[X.pointerId];for(let ge=0;gep.size),r=Vi(p=>p.viewport),s=typeof n=="number"?n:i.width*r.dpr,o=typeof e=="number"?e:i.height*r.dpr,a=(typeof n=="number"?t:n)||{},{samples:u=0,depth:f,...h}=a,d=ve.useMemo(()=>{const p=new gr(s,o,{minFilter:sn,magFilter:sn,type:xa,...h});return f&&(p.depthTexture=new im(s,o,hr)),p.samples=u,p},[]);return ve.useLayoutEffect(()=>{d.setSize(s,o),u&&(d.samples=u)},[u,d,s,o]),ve.useEffect(()=>()=>d.dispose(),[]),d}const Y7=n=>typeof n=="function",q7=ve.forwardRef(({envMap:n,resolution:e=256,frames:t=1/0,makeDefault:i,children:r,...s},o)=>{const a=Vi(({set:S})=>S),u=Vi(({camera:S})=>S),f=Vi(({size:S})=>S),h=ve.useRef(null),d=ve.useRef(null),p=j7(e);ve.useLayoutEffect(()=>{s.manual||(h.current.aspect=f.width/f.height)},[f,s]),ve.useLayoutEffect(()=>{h.current.updateProjectionMatrix()});let v=0,y=null;const w=Y7(r);return A_(S=>{w&&(t===1/0||v{if(i){const S=u;return a(()=>({camera:h.current})),()=>a(()=>({camera:S}))}},[h,i,a]),ve.createElement(ve.Fragment,null,ve.createElement("perspectiveCamera",nc({ref:H7([h,o])},s),!w&&r),ve.createElement("group",{ref:d},w&&r(p.texture)))}),Z7=ve.forwardRef(({makeDefault:n,camera:e,regress:t,domElement:i,enableDamping:r=!0,keyEvents:s=!1,onChange:o,onStart:a,onEnd:u,...f},h)=>{const d=Vi(C=>C.invalidate),p=Vi(C=>C.camera),v=Vi(C=>C.gl),y=Vi(C=>C.events),w=Vi(C=>C.setEvents),S=Vi(C=>C.set),g=Vi(C=>C.get),x=Vi(C=>C.performance),M=e||p,T=i||y.connected||v.domElement,P=ve.useMemo(()=>new X7(M),[M]);return A_(()=>{P.enabled&&P.update()},-1),ve.useEffect(()=>(s&&P.connect(s===!0?T:s),P.connect(T),()=>void P.dispose()),[s,T,t,P,d]),ve.useEffect(()=>{const C=b=>{d(),t&&x.regress(),o&&o(b)},L=b=>{a&&a(b)},D=b=>{u&&u(b)};return P.addEventListener("change",C),P.addEventListener("start",L),P.addEventListener("end",D),()=>{P.removeEventListener("start",L),P.removeEventListener("end",D),P.removeEventListener("change",C)}},[o,a,u,P,d,w]),ve.useEffect(()=>{if(n){const C=g().controls;return S({controls:P}),()=>S({controls:C})}},[n,P]),ve.createElement("primitive",nc({ref:h,object:P,enableDamping:r},f))}),ii=["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","55","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"];let uM=1234567;const aA=Math.PI/180,lA=180/Math.PI;function K7(){const n=Math.random()*4294967295|0,e=Math.random()*4294967295|0,t=Math.random()*4294967295|0,i=Math.random()*4294967295|0;return(ii[n&255]+ii[n>>8&255]+ii[n>>16&255]+ii[n>>24&255]+"-"+ii[e&255]+ii[e>>8&255]+"-"+ii[e>>16&15|64]+ii[e>>24&255]+"-"+ii[t&63|128]+ii[t>>8&255]+"-"+ii[t>>16&255]+ii[t>>24&255]+ii[i&255]+ii[i>>8&255]+ii[i>>16&255]+ii[i>>24&255]).toLowerCase()}function J7(n,e,t){return Math.max(e,Math.min(t,n))}function cA(n,e){return(n%e+e)%e}function Q7(n,e,t,i,r){return i+(n-e)*(r-i)/(t-e)}function $7(n,e,t){return n!==e?(t-n)/(e-n):0}function uA(n,e,t){return(1-t)*n+t*e}function eU(n,e,t,i){return uA(n,e,1-Math.exp(-t*i))}function tU(n,e=1){return e-Math.abs(cA(n,e*2)-e)}function nU(n,e,t){return n<=e?0:n>=t?1:(n=(n-e)/(t-e),n*n*(3-2*n))}function iU(n,e,t){return n<=e?0:n>=t?1:(n=(n-e)/(t-e),n*n*n*(n*(n*6-15)+10))}function rU(n,e){return n+Math.floor(Math.random()*(e-n+1))}function sU(n,e){return n+Math.random()*(e-n)}function oU(n){return n*(.5-Math.random())}function aU(n){n!==void 0&&(uM=n);let e=uM+=1831565813;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}function lU(n){return n*aA}function cU(n){return n*lA}function uU(n){return(n&n-1)===0&&n!==0}function fU(n){return Math.pow(2,Math.ceil(Math.log(n)/Math.LN2))}function hU(n){return Math.pow(2,Math.floor(Math.log(n)/Math.LN2))}function dU(n,e,t,i,r){const s=Math.cos,o=Math.sin,a=s(t/2),u=o(t/2),f=s((e+i)/2),h=o((e+i)/2),d=s((e-i)/2),p=o((e-i)/2),v=s((i-e)/2),y=o((i-e)/2);switch(r){case"XYX":n.set(a*h,u*d,u*p,a*f);break;case"YZY":n.set(u*p,a*h,u*d,a*f);break;case"ZXZ":n.set(u*d,u*p,a*h,a*f);break;case"XZX":n.set(a*h,u*y,u*v,a*f);break;case"YXY":n.set(u*v,a*h,u*y,a*f);break;case"ZYZ":n.set(u*y,u*v,a*h,a*f);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+r)}}function pU(n,e){switch(e.constructor){case Float32Array:return n;case Uint32Array:return n/4294967295;case Uint16Array:return n/65535;case Uint8Array:return n/255;case Int32Array:return Math.max(n/2147483647,-1);case Int16Array:return Math.max(n/32767,-1);case Int8Array:return Math.max(n/127,-1);default:throw new Error("Invalid component type.")}}function mU(n,e){switch(e.constructor){case Float32Array:return n;case Uint32Array:return Math.round(n*4294967295);case Uint16Array:return Math.round(n*65535);case Uint8Array:return Math.round(n*255);case Int32Array:return Math.round(n*2147483647);case Int16Array:return Math.round(n*32767);case Int8Array:return Math.round(n*127);default:throw new Error("Invalid component type.")}}const gU={DEG2RAD:aA,RAD2DEG:lA,generateUUID:K7,clamp:J7,euclideanModulo:cA,mapLinear:Q7,inverseLerp:$7,lerp:uA,damp:eU,pingpong:tU,smoothstep:nU,smootherstep:iU,randInt:rU,randFloat:sU,randFloatSpread:oU,seededRandom:aU,degToRad:lU,radToDeg:cU,isPowerOfTwo:uU,ceilPowerOfTwo:fU,floorPowerOfTwo:hU,setQuaternionFromProperEuler:dU,normalize:mU,denormalize:pU};function vU(){const n=Array(3).fill().map(()=>gU.randFloatSpread(200));return fe.jsxs("mesh",{position:n,children:[fe.jsx("sphereGeometry",{args:[.25,24,24]}),fe.jsx("meshBasicMaterial",{color:"#ffffff"})]})}function yU(){return fe.jsxs(z7,{children:[fe.jsx(q7,{makeDefault:!0,fov:50,position:[0,0,10]}),fe.jsx("color",{args:[0,0,0],attach:"background"}),fe.jsx("ambientLight",{intensity:.5}),fe.jsx("pointLight",{position:[-5,1.5,5],angle:.5,intensity:200}),fe.jsx(B7,{}),fe.jsx(Z7,{enableZoom:!1,enableDamping:!0,autoRotate:!0,autoRotateSpeed:.4}),Array(200).fill().map((n,e)=>fe.jsx(vU,{},e))]})}const _U="/my-portfolio/assets/SitePhoto-ttmvt0EA.jpg";function xU(){return fe.jsx("div",{className:"bg-blue-950",children:fe.jsxs("div",{className:"p-8 flex flex-col md:flex-row justify-around container mx-auto",children:[fe.jsxs("div",{className:"flex-1 justify-center",children:[fe.jsxs("h2",{className:"text-3xl font-bold mb-4 text-center my-2 flex justify-start text-white",children:["Hi there",fe.jsxs("picture",{className:"mx-2",children:[fe.jsx("source",{srcSet:"https://fonts.gstatic.com/s/e/notoemoji/latest/1f44b/512.webp",type:"image/webp"}),fe.jsx("img",{src:"https://fonts.gstatic.com/s/e/notoemoji/latest/1f44b/512.gif",alt:"👋",width:"32",height:"32"})]})]}),fe.jsx("p",{className:"text-gray-200 mx-auto",children:"Hi there! I'm Abhinav Choudhary, a passionate developer who loves creating awesome web applications. I have experience with front-end technologies like React and enjoy exploring new technologies to enhance my skills."}),fe.jsx("p",{className:"text-gray-200 mt-2",children:"In my free time, I enjoy solving coding challenges, making games, and staying up-to-date with the latest trends in the tech world."})]}),fe.jsx("div",{className:"flex-1 flex justify-center items-center",children:fe.jsx("img",{src:_U,alt:"Avatar",className:"rounded-full object-cover w-full md:w-64 h-auto my-2 md:mb-0 shadow-md shadow-white/70 hover:shadow-white hover:shadow-lg"})})]})})}function SU(n){return Vt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M243.583 91.6027L323.695 138.384C326.575 140.026 326.68 144.583 323.695 146.225L228.503 201.854C225.623 203.55 222.22 203.444 219.549 201.854L124.357 146.225C121.425 144.636 121.373 139.973 124.357 138.384L204.417 91.6027V0L0 119.417V358.252L78.3843 312.477V218.914C78.3319 215.576 82.2066 213.192 85.0865 214.993L180.279 270.622C183.159 272.318 184.782 275.338 184.782 278.464V389.669C184.834 393.007 180.959 395.391 178.079 393.589L97.9673 346.808L19.583 392.583L224 512L428.417 392.583L350.033 346.808L269.921 393.589C267.093 395.338 263.114 393.06 263.218 389.669V278.464C263.218 275.126 265.051 272.159 267.721 270.622L362.914 214.993C365.741 213.245 369.72 215.47 369.616 218.914V312.477L448 358.252V119.417L243.583 0V91.6027Z"},child:[]}]})(n)}function MU(n){return Vt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M32 32v448h448V32zm240 348c0 43.61-25.76 64.87-63.05 64.87-33.68 0-53.23-17.44-63.15-38.49l34.28-20.75c6.61 11.73 11.63 21.65 26.06 21.65 12 0 21.86-5.41 21.86-26.46V240h44zm99.35 63.87c-39.09 0-64.35-17.64-76.68-42L329 382c9 14.74 20.75 24.56 41.5 24.56 17.44 0 27.57-7.72 27.57-19.75 0-14.43-10.43-19.54-29.68-28l-10.52-4.52c-30.38-12.92-50.52-29.16-50.52-63.45 0-31.57 24.05-54.63 61.64-54.63 26.77 0 46 8.32 59.85 32.68L396 290c-7.22-12.93-15-18-27.06-18-12.33 0-20.15 7.82-20.15 18 0 12.63 7.82 17.74 25.86 25.56l10.52 4.51c35.79 15.34 55.94 31 55.94 66.16.01 37.9-29.76 57.64-69.76 57.64z"},child:[]}]})(n)}function wU(n){return Vt({tag:"svg",attr:{viewBox:"0 0 16 16",fill:"currentColor"},child:[{tag:"path",attr:{d:"M13.281 11.156a.84.84 0 0 1 .375.297c.084.125.143.276.18.453.02.104.044.2.07.29a1.772 1.772 0 0 0 .219.476c.047.073.11.153.188.242.067.073.127.167.18.281a.793.793 0 0 1 .077.328.49.49 0 0 1-.093.305.944.944 0 0 1-.235.219c-.12.083-.245.156-.375.219-.13.062-.26.127-.39.195a3.624 3.624 0 0 0-.555.328c-.156.115-.313.26-.469.438a2.815 2.815 0 0 1-.625.523 1.471 1.471 0 0 1-.383.172c-.13.036-.26.06-.39.07-.302 0-.552-.052-.75-.156-.198-.104-.37-.294-.516-.57-.042-.079-.083-.128-.125-.149a.774.774 0 0 0-.203-.055L8.67 15c-.26-.02-.525-.031-.796-.031a4.28 4.28 0 0 0-.672.054c-.229.037-.456.081-.68.133-.046.01-.093.05-.14.117a1.7 1.7 0 0 1-.196.227 1.106 1.106 0 0 1-.335.219 1.475 1.475 0 0 1-.555.101c-.172 0-.357-.018-.555-.054a1.82 1.82 0 0 1-.531-.18 3.578 3.578 0 0 0-.953-.328c-.313-.057-.643-.11-.992-.156a3.392 3.392 0 0 1-.344-.063.774.774 0 0 1-.29-.133.705.705 0 0 1-.194-.219.78.78 0 0 1-.079-.351c0-.162.021-.318.063-.469.042-.15.065-.31.07-.476 0-.115-.008-.227-.023-.336a3.53 3.53 0 0 1-.032-.352c0-.265.063-.46.188-.586.125-.125.307-.224.547-.297a.99.99 0 0 0 .297-.148 2.27 2.27 0 0 0 .234-.203 1.86 1.86 0 0 0 .203-.242c.063-.089.133-.178.211-.266a.114.114 0 0 0 .024-.07c0-.063-.003-.123-.008-.18l-.016-.188c0-.354.055-.71.164-1.07.11-.36.253-.71.43-1.055a9.08 9.08 0 0 1 .594-.992c.218-.317.435-.612.648-.883a4.35 4.35 0 0 0 .68-1.203c.15-.416.229-.87.234-1.36 0-.207-.01-.413-.031-.616a6.122 6.122 0 0 1-.031-.625c0-.417.047-.792.14-1.125.094-.334.24-.62.438-.86s.456-.419.773-.539C7.474.075 7.854.01 8.296 0c.527 0 .946.104 1.259.313.312.208.552.481.718.82.167.338.274.716.32 1.133.048.416.074.838.079 1.265v.133c0 .214.002.404.008.57a2.527 2.527 0 0 0 .226.977c.073.161.182.336.328.523.25.329.506.66.766.993.26.333.497.677.71 1.03.214.355.389.725.524 1.11.136.386.206.802.211 1.25a3.3 3.3 0 0 1-.164 1.04zm-6.554-8.14c.072 0 .132.018.18.054a.357.357 0 0 1 .109.149.85.85 0 0 1 .054.187c.01.063.016.128.016.196a.282.282 0 0 1-.024.125.27.27 0 0 1-.07.086l-.094.078a.796.796 0 0 0-.093.093.428.428 0 0 1-.149.141 2.129 2.129 0 0 0-.18.117 1.31 1.31 0 0 0-.156.133.264.264 0 0 0-.07.195c0 .047.023.086.07.117a.704.704 0 0 1 .266.305c.052.12.11.237.172.352.062.114.143.21.242.289.099.078.253.117.46.117h.048c.208-.01.406-.065.594-.164.187-.099.375-.203.562-.313a.633.633 0 0 1 .102-.046.37.37 0 0 0 .101-.055l.57-.445a.926.926 0 0 0 .024-.102 2.75 2.75 0 0 0 .016-.11.236.236 0 0 0-.04-.14.4.4 0 0 0-.093-.094.34.34 0 0 0-.133-.054.909.909 0 0 1-.14-.04 1.083 1.083 0 0 1-.352-.14 1.457 1.457 0 0 0-.344-.156c-.02-.006-.036-.021-.047-.047a.983.983 0 0 1-.031-.094.23.23 0 0 1-.008-.102.126.126 0 0 0-.008-.078c0-.062.005-.127.016-.195a.551.551 0 0 1 .07-.195.417.417 0 0 1 .125-.14.411.411 0 0 1 .203-.056c.162 0 .279.06.352.18.073.12.112.25.117.39a.397.397 0 0 1-.039.18.379.379 0 0 0-.04.172c0 .042.014.07.04.086a.26.26 0 0 0 .102.031c.12 0 .197-.028.234-.085a.533.533 0 0 0 .062-.258c0-.12-.01-.253-.03-.399a1.32 1.32 0 0 0-.126-.406.969.969 0 0 0-.242-.313.574.574 0 0 0-.383-.124c-.27 0-.466.067-.586.203-.12.135-.182.338-.187.609 0 .078.005.156.015.234.01.079.016.157.016.235 0 .026-.003.039-.008.039a.218.218 0 0 1-.047-.016 4.263 4.263 0 0 1-.093-.039.774.774 0 0 0-.118-.039.514.514 0 0 0-.203-.008 1.007 1.007 0 0 1-.125.008c-.073 0-.11-.013-.11-.039 0-.078-.004-.177-.015-.297-.01-.12-.036-.24-.078-.36a.995.995 0 0 0-.156-.296c-.063-.078-.156-.12-.281-.125a.323.323 0 0 0-.227.086.905.905 0 0 0-.164.203.64.64 0 0 0-.086.266 5.4 5.4 0 0 1-.031.25 1.459 1.459 0 0 0 .07.406c.026.083.055.156.086.219.031.062.068.093.11.093.025 0 .06-.018.101-.054.042-.037.063-.07.063-.102 0-.016-.008-.026-.024-.031a.147.147 0 0 0-.047-.008c-.036 0-.068-.018-.094-.055a.468.468 0 0 1-.062-.125 5.144 5.144 0 0 1-.047-.148.564.564 0 0 1 .055-.398c.047-.084.133-.128.258-.133zM5.023 15.18c.125 0 .248-.01.368-.032a.97.97 0 0 0 .336-.125.614.614 0 0 0 .234-.242.943.943 0 0 0 .094-.375.816.816 0 0 0-.047-.273.963.963 0 0 0-.133-.25 2.763 2.763 0 0 0-.203-.281 2.763 2.763 0 0 1-.203-.282 62.93 62.93 0 0 1-.29-.43c-.093-.14-.187-.288-.28-.445a8.124 8.124 0 0 1-.235-.406 2.646 2.646 0 0 0-.266-.398 1.203 1.203 0 0 0-.218-.211.469.469 0 0 0-.29-.094.436.436 0 0 0-.296.11 2.26 2.26 0 0 0-.258.265 3.241 3.241 0 0 1-.297.305c-.11.099-.25.177-.422.234a.744.744 0 0 0-.312.172c-.073.073-.11.185-.11.336 0 .104.008.208.024.312.015.104.026.209.031.313 0 .14-.02.273-.063.398a1.157 1.157 0 0 0-.062.367c0 .141.05.24.148.297.1.058.211.097.336.117.157.027.305.047.446.063.14.016.278.04.414.07.135.032.27.065.406.102.135.036.279.094.43.172.03.015.078.034.14.054l.211.07c.078.027.151.048.219.063a.741.741 0 0 0 .148.024zm2.86-.938c.146 0 .302-.015.469-.047a3.54 3.54 0 0 0 .976-.336 2.59 2.59 0 0 0 .406-.257.222.222 0 0 0 .032-.047.305.305 0 0 0 .023-.063v-.008c.031-.114.057-.24.078-.375a8.63 8.63 0 0 0 .055-.414 8.98 8.98 0 0 1 .055-.414c.02-.135.039-.268.054-.398.021-.14.047-.276.078-.406.032-.13.073-.253.125-.368a1.03 1.03 0 0 1 .211-.304 1.54 1.54 0 0 1 .344-.25v-.016l-.008-.023a.29.29 0 0 1 .047-.149 1.4 1.4 0 0 1 .117-.164.582.582 0 0 1 .149-.133.946.946 0 0 1 .164-.078 9.837 9.837 0 0 0-.102-.375 4.938 4.938 0 0 1-.094-.375 7.126 7.126 0 0 0-.093-.476 2.954 2.954 0 0 0-.11-.36 1.317 1.317 0 0 0-.18-.32c-.077-.104-.174-.23-.288-.375a1.189 1.189 0 0 1-.118-.156.555.555 0 0 1-.046-.196 2.206 2.206 0 0 0-.047-.203 9.48 9.48 0 0 0-.242-.75 2.91 2.91 0 0 0-.172-.383 3.87 3.87 0 0 0-.172-.289c-.052-.078-.107-.117-.164-.117-.125 0-.274.05-.446.149-.171.099-.354.208-.546.328-.193.12-.38.232-.563.336-.182.104-.346.153-.492.148a.7.7 0 0 1-.43-.148 2.236 2.236 0 0 1-.36-.344c-.109-.13-.2-.242-.273-.336-.073-.094-.127-.146-.164-.156-.041 0-.065.031-.07.093a2.56 2.56 0 0 0-.008.211v.133c0 .032-.005.052-.016.063-.057.12-.12.237-.187.351-.068.115-.135.232-.203.352a1.611 1.611 0 0 0-.219.758c0 .078.005.156.016.234.01.078.036.154.078.227l-.016.03a1.31 1.31 0 0 1-.133.157 1.072 1.072 0 0 0-.132.164 2.796 2.796 0 0 0-.407.93c-.078.333-.12.672-.125 1.015 0 .089.006.178.016.266.01.089.016.177.016.266a.526.526 0 0 1-.008.086.525.525 0 0 0-.008.086.75.75 0 0 1 .313.109c.12.068.25.154.39.258.14.104.274.224.399.36.125.135.244.267.359.398.115.13.198.26.25.39.052.13.086.237.101.32a.444.444 0 0 1-.125.329.955.955 0 0 1-.312.203c.089.156.198.289.328.398.13.11.271.198.422.266.151.068.315.117.492.148.177.032.35.047.516.047zm3.133 1.11c.109 0 .216-.016.32-.047a1.65 1.65 0 0 0 .445-.203c.136-.089.26-.198.375-.329a3.07 3.07 0 0 1 .977-.75l.258-.117a2.18 2.18 0 0 0 .257-.133.962.962 0 0 0 .165-.132.256.256 0 0 0 .078-.188.295.295 0 0 0-.024-.117.58.58 0 0 0-.07-.117 5.136 5.136 0 0 1-.203-.305 1.978 1.978 0 0 1-.149-.297l-.125-.312a2.558 2.558 0 0 1-.11-.352.28.28 0 0 0-.054-.101.53.53 0 0 0-.46-.235.533.533 0 0 0-.266.07l-.266.149a7.335 7.335 0 0 1-.281.148.656.656 0 0 1-.297.07.411.411 0 0 1-.258-.077.636.636 0 0 1-.172-.211 2.218 2.218 0 0 1-.117-.258l-.094-.258a1.26 1.26 0 0 1-.14.188.666.666 0 0 0-.125.203c-.068.156-.11.33-.125.523-.026.302-.06.596-.102.883a4.7 4.7 0 0 1-.21.86 1.914 1.914 0 0 0-.063.273 2.88 2.88 0 0 0-.032.289c0 .255.079.466.235.633.156.166.367.25.633.25z"},child:[]}]})(n)}function EU(n){return Vt({tag:"svg",attr:{viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},child:[]},{tag:"path",attr:{d:"M10 9a3 3 0 0 0 -3 -3h-.5a3.5 3.5 0 0 0 -3.5 3.5v5a3.5 3.5 0 0 0 3.5 3.5h.5a3 3 0 0 0 3 -3"},child:[]},{tag:"path",attr:{d:"M16 7l-1 10"},child:[]},{tag:"path",attr:{d:"M20 7l-1 10"},child:[]},{tag:"path",attr:{d:"M14 10h7.5"},child:[]},{tag:"path",attr:{d:"M21 14h-7.5"},child:[]}]})(n)}function TU(n){return Vt({tag:"svg",attr:{viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},child:[]},{tag:"path",attr:{d:"M18 12h4"},child:[]},{tag:"path",attr:{d:"M20 10v4"},child:[]},{tag:"path",attr:{d:"M11 12h4"},child:[]},{tag:"path",attr:{d:"M13 10v4"},child:[]},{tag:"path",attr:{d:"M9 9a3 3 0 0 0 -3 -3h-.5a3.5 3.5 0 0 0 -3.5 3.5v5a3.5 3.5 0 0 0 3.5 3.5h.5a3 3 0 0 0 3 -3"},child:[]}]})(n)}function AU(n){return Vt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M18.344 8.71c-.707 0-1.279.572-1.279 1.278v4.53a1.278 1.278 0 1 0 2.558 0v-4.53c0-.706-.572-1.278-1.279-1.278zm-12.688 0c-.707 0-1.279.572-1.279 1.278v4.53a1.278 1.278 0 1 0 2.558 0v-4.53A1.277 1.277 0 0 0 5.656 8.71zm8.889-3.809.768-1.388a.343.343 0 0 0-.133-.47.344.344 0 0 0-.471.135l-.789 1.42c-.588-.235-1.236-.368-1.92-.368s-1.332.132-1.92.367l-.789-1.418a.344.344 0 0 0-.471-.135.345.345 0 0 0-.133.47l.768 1.388C8.072 5.69 7.148 7.099 7.148 8.71c0 .011 0 .021.002.034-.002.006-.002.013-.002.019v.001h9.703V8.71c.001-1.611-.923-3.019-2.306-3.809zM9.76 6.869a.346.346 0 1 1 .005-.693.346.346 0 0 1-.005.693zm4.48 0a.347.347 0 0 1 0-.692.346.346 0 0 1 0 .692zM7.148 16.12c0 .646.525 1.171 1.174 1.171h.586v2.401a1.279 1.279 0 0 0 2.558 0v-2.401h1.066v2.401c0 .707.572 1.278 1.277 1.278.709 0 1.281-.571 1.281-1.278v-2.401h.586c.648 0 1.174-.524 1.174-1.171V9.028H7.148v7.092z"},child:[]}]})(n)}function CU(n){return Vt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M13.78 18.29c0 .12.15 0 0 0zm-3.35-2.7c.39.17-.31-.6 0 0zm-5.03.28c.15.26 0-.12 0 0zm5.6.39c-.27-.42-.2.06 0 .32.48.47.18-.26 0-.32z"},child:[]},{tag:"path",attr:{d:"M20.24 19.06c-.53.63-1-.07-1.63.13-1.1 0 .09-.5.06-1-.58-.45-1.24.61-1.62.9a10.75 10.75 0 0 1-2.67-.83 8 8 0 0 1-2.6-1.94 8.36 8.36 0 0 1-1.87-2.84 21.36 21.36 0 0 1-.84-5.74c.07-1.3 1.44.14 2-.33-.21-.67-1.29-.88-1.89-1.16-.58 0-.79-.55-1.4-.59 0-.73-1.13-.33-1.56-.84.42-1.08-1.37 0-1.23-.91.58-1.2-1.78-1-.8.06.95.54-.93.93-.38 1.29a.59.59 0 0 1-.53.86c-.74.07-.67 1.09.06.55.81-.25.14.11-.25.18a1.3 1.3 0 0 0-.95 1.9 35.32 35.32 0 0 1 1 3.42A16.25 16.25 0 0 0 5.84 17 9.78 9.78 0 0 0 8 19a9.89 9.89 0 0 0 2.43 1.22 18 18 0 0 0 4.73.73 16.53 16.53 0 0 0 2.9-.24c.87.09 1.49-.65 2.26-.26.48-.42 1.16-.23 1.63-.54.32-1.22-1.22-.27-1.71-.85zm-1.74-.74c-.22 0 .05-.34 0 0zm-7.63-11c-.1 0-.08-.12-.16-.15-.8-.37.39-.23.16.19zm6.76 11.39c-.35-.08.28-.25 0 0zm-2.81.11c-.23 0 .18-.14 0 0zm-1.88-1.18c-.13 0 0-.13 0 0zm-.22-.17c-.36 0-.09-.23 0 0zm-.42-.36c-.33.08 0-.34 0 0zm-6-11.66c-.53-.28.11.33-.34.32-.24 0-.69-.52-.54-.78.3.16.83.21.92.5zm-.92-.81h-.11c-.03-.27.87-.06.15.04zm-1.02-.79c-.42-.19 0-.93.44-.58.51.73-.95-.08-.44.58zm.49.69c-.27.11.16-.21 0 0zm.48.92c.6.46-.34 0-.72.29-.61.06.66-.34.72-.29zm.17.6c.35 0 1.88-.69 1.37-.07.47.55.1.37-.21 0 .28.19.06 1-.37.45s-.5-.18-.17.21C5.8 6 4.88 6.28 4.21 6.5c-.43-.04 1.13-.37 1.29-.44zM3.58 7.51c-.16.4.24.53.62.6.62-.17-.41-.28.06-.44.26 0-.82-.26.08-.38S6.09 6.77 7 6.58a8.71 8.71 0 0 1 2.35-.19c.3.35-.23.94-.77 1a8.61 8.61 0 0 1-2 .39c-.8-.1-1.37.61-2.19.7.22-.4-.18-.14-.59-.16.21.82-1.47-.21-.48-.41-.74-.26-.75.52-.67 1-.65-.91.07-1.29.93-1.4zm1.88 1.08c-.22-.05.17-.2 0 0zm-.72.88s-.34-.08-.2-.17c1 .13-.9-.33.13-.22.66-.02.44.36.07.39zm.33.17c-.12.12 0-.24 0 0zm-.71 0c-.44-.09.21-.22 0 0zm-.06 1.43c-.07.1-.1-.08 0 0zM4 10.9c-.55-.19 0-.21 0 0zm-.12 1.28c-.26-.09-.25-.5-.37-.72-.38-1.03.41.4.33.72zm.23-1.49c-.69-.08-.05-.49 0 0zm0-.34h-.09c-.76-.35.45-.17-.02 0zM4 9.56c-.61-.31.58-.36 0 0zm.21.26c-.34.06.05-.32 0 0zm-1.3.07c-.12.08 0-.23 0 0zM3 9.75c-.16 0 0-.27 0 0zm.08-1c-.4-.1.33-.25 0 0zm.26 2c-.44-.1-.12-.65 0 0zm.3 1.25c.42.51.26.79.69 1.41-.56-.35-.67-1.2-1-1.75-.41-.9.23-.01.31.34zm4.09 6.38c-.34-.07-.57-.43-.81-.66a4.88 4.88 0 0 1-1.57-1.94 12.26 12.26 0 0 1-1.46-2.38c-.41-.92.25.07.35.42.21.68.88 1.07.94 1.52.74.42.36 1.12 1 1.31.27-.14.3.84.89.64-.33.15.13.33.3.61.35-.05 1.17.82.36.52zM4.62 12c-.31-.07.33-.11 0 0zm.2.47c-.55-.14.52-.2 0 0zm1.39.47c.4-.17.16.78.55.9.76 1-.53 0-1-.07.06 0-.38-.12-.19-.16-.14-.15-.45-.66.26-.32.6.24.65.06.38-.39zm1.31 1.76c0 .15-.72.13-.06.42-.38 0-.5 0 0 .3-.22.17.43.31.21.57.66.52-.12.13-.4-.08s-.85-.35-.75-.5c.81.42.21 0-.15-.3.65.16-.51-.48.1-.31.19.05-.27-.38.33-.07-.54-.52.47-.12.72-.07zm.48-.17c-.61-.14 0-.34 0 0zm-.17 2c-.61-.26.39 0 0 0zm-.45-.17c-.71-.23.52 0 0 0zm-.09.11c-.22 0 0-.17 0 0zm-1.08-1.55c-.72-.3-.2-.33 0 0zm-.54-.35c-.58-.33-.08-.33 0 0zm0 .65c-.57-.44-.07-.25 0 0zm-.15-1.34c-.35 0 .13-.2 0 0zM8 17.38c-.51-.15 0-.14 0 0zM7.63 17h-.16c-.68-.54.31-.38.75-.14.97.14-.22.39-.59.14zm2.7 1.65c-.68-.16.16-.27 0 0zm-.17-.52c-.05 0-.1-.11 0 0zm-.86-1.34c-.59-.14.21-.19.36 0 1.02.21-.06.26-.36 0zM9.51 18H9.4l-.13-.06c-.56-.59 1.19.28.24.06zm-.28.69c-.15.06 0-.14 0 0zm.29-1.19-.16-.05c-.66-.45.84.09.16 0zm.16 1.72c-.4-.16.26-.25 0 0zm.1-.74c-.58-.14.36-.13 0 0zm.13-.61c-.44-.06.05-.21 0 0zm-.72-.88c.46.06.47.27 0 .14-.09 0-.24 0-.28-.17-.76-.5.03-.25.28-.02zm-.06 2c-.2.12 0-.22 0 0zm-.31-.51c-.53 0 .4-.26 0 0zm-.12.35c-.26-.1.17-.08 0 0zm.3-.89c-.52-.14.25-.18 0 0zm-.16-.57c-.28 0-.06-.16 0 0zm-.54-.95c-.57-.46 1.18.38 0 0zm-.06.19c0 .06-.11-.09 0 0zm3.65 3.78a9.4 9.4 0 0 1-2.56-.85l-.33-.2c-.57-.31-.5-.38.06-.07.19.16 1.59.73.93.35-.29-.07-1.9-.95-.84-.57a20.92 20.92 0 0 0 2.74 1.21 7.14 7.14 0 0 0 2.43.15c.65.33 1.33-.08 2 .21a13.05 13.05 0 0 1-4.45-.23zm-1.25-.7c-.51-.09.16-.23 0 0zm.73-1c-.58-.11.6-.23 0 0zm.84 1.31c1 .37-.6.12-.93-.09-.92-.38.72.09.93.09zm-1.06-1.1c-.81-.12.9 0 0 0zm1.52.85c-.29.23 0-.3 0 0zm.29.05c-.15.06 0-.17 0 0zm.27-.38c-.16.2 0-.23 0 0zm.31 0c-.45.17.47-.39 0 0zm.14 0c.49-.42.51-.22.5.13-.43.48-.17-.2-.44.06s-.19-.1-.06-.17zm.83.45c-.5 0 .51-.54 0 0zm0 .18c-.2.05 0-.13 0 0zm-.16-.35c-.39-.26.94-.61 0 0zm.57.09h-.08c-.03-.23.54-.27.08.02zm.15.19c-.3-.08.47-.4 0 0zm.36-.1c-.51.18.48-.4 0 0zm.22.11-.12.08c-.23-.14.71-.48.12-.07zm-.43-.53c-.54-.18-1.4-.76-2-.37-.8.51.41-.56-.24-.08-.66.79-.45-.5-1.09-.11 0-.12-.57-.16-.17-.37-.36 0-.13-.05 0-.34-.16 0-1 0-1.36-.29-.4-.52.07-.3.48-.23-.67.12.24.5.68.29-.2-.09-.43-.52-1-.9a18.83 18.83 0 0 0-2.13-1c-.84-.5.18-.18.47.08.84.37.51-.51 0-.74-.54 0-.67-.59-1.1-.56.67.11 1.14-.17.39-.85s.3.63-.11.44c-.19-.25-.05-.6-.65-.73 0 .23-.08.58-.21.1-.17 0-.36.21-.5-.28.13-.57-.56-.7-.67-1.06.6.38.87.08.45-.33s-.33-.11-.49 0c-.59.6-.06-1-.32-.56-.26 0-.11.29-.1.65-.86-.21.2.45.45.81-.39-.4-.32.31-.65 0-.11-.3-.12-.77-.67-.85.62-.22-.36-.65-.28-.67.35-.32.4-.76.82-.07-.53 0 0 .88.12.6 0-.47.22-1-.59-1.19-.24.32-.65-.63-.18-.43-.06-.63.74-.26.69-.53.42-.18-.5-.77 0-1 .38.24 1.36-.36.7-.44.42 0 .75.18.79-.24.33.07 1.24.36.42-.09a3.45 3.45 0 0 1 1.13-.25c.79-.61.63 1 .45 1.45.3-.21.24.94.14 1.37.16-.22.23.36 0 .77 0-.07.4-.13.12.35-.22-.47-.31 1-.17.32.37-.61.28 0 .39.24.08.55.32 1.06.4 1.56.35.35-.15.11-.15.59.11-.14.58.19.57.68 0-.78.09-.18.47 0a5.48 5.48 0 0 0 1 1.42c.37.43 0 .13.14.39a3.19 3.19 0 0 0 2.09 1.28 1.46 1.46 0 0 0 1.57.7c-.6.37 1.68.47.91.67-.23.16-.62-.2-1.01-.18zM8.7 15.89c-.24 0 0-.2 0 0zm.38.22c-.18 0-.12-.24 0 0zm-2.61-3.65c-.24-.07.1-.09 0 0zm-.59 0c-.26 0 0-.34 0 0zm-.3-.08c-.1.05 0-.11 0 0zm11 8.25c-.39-.07.32-.22 0 0zm.73-1.05h-.3c.06-.45 1.33-.1 1.85-.09-.16.34-1.13.04-1.55.13zm2 0c-.27 0 .12-.32 0 0zm1-.09c-.25.13 0-.3 0 0zm.48.11c-.52-.12.24-.12.4-.14.94.02 0 .16-.47.16z"},child:[]},{tag:"path",attr:{d:"M6.51 7.11c1-.2-.38-.33-.69 0 .18.13.41-.21.69 0zm-.82.13c0 .19.18-.22 0 0zm2.62-.48c.67-.11.11-.41-.09.1.07.14.11-.05.09-.1zm-.62.1c.93.36-.05-1 0 0zm-2.92.93a.51.51 0 0 1 .33.1c.75.52-.1-.84-.33-.1z"},child:[]},{tag:"path",attr:{d:"M4.81 7.43c.16.13.29-.21 0 0zm.37.01.14.12c.68.06-.11-.46-.14-.12zM10.69 16c.09.3 0-.39 0 0zm-4.78-5c.1.18.18-.18 0 0zm.09.61c.19.34 0-.51 0 0zm.21-.49c.33.21-.28-.52 0 0zm-.41-.82c.07.15.24.16.37.2 1.32.61-.95-1-.37-.2zm.54 1.43c.31.53.18-.37 0 0zm.48-.16c.37.92-.23-.12-.3-.43a2.11 2.11 0 0 0 .28 1c.34.51.19-.28.55.23-.2-.45.1-.2.06-.4s-1-1.17-.59-.4zm.36 1.78c.09.31.18 0 0 0zM5.85 9c.06.14.11 0 0 0zm.67.42c.32.41.17-.36 0 0zm-.89 1.14.14.15c.99.29-1.05-.95-.14-.15zm.7-.37c1 .41-.09-.27-.44-.2.11.13.32.07.44.2zm-.18-.44c.18.18.82.51.31.06.32-.06 0-.16-.24-.32-.44-.67.07.06-.07.26z"},child:[]},{tag:"path",attr:{d:"M5.51 10.64c-.53-.44.16.21-.06.2-.55-.4-.32-.11 0 .2.33.5.6-.3.06-.4zm2.14.64c.12.11-.06-.68 0 0zm1.02-3.5c0 .12.07-.1 0 0zM9 12.47c0 .21 0-.18 0 0zm-.29-1.22c.08.46.1-.78 0 0zm.14.22v.1c.21-.51.04-.79 0-.1zm-.1-2.7c-.14.7-.27.41-.08-.11-.05-.67-.45.41-.27.72.29.47.6-1.16.35-.61zm1.01 5.98c.13.35.11-.42 0 0zm-1.35-4.28c0 .2 0-.14 0 0zm.64 1.7c0 .26.11-.38 0 0zM9.5 14l.07.11c.14-.49-.36-.79-.07-.11zm-1.56-.52c.27.22-.13-.23 0 0zm1.23-.85c.08.29 0-.42 0 0zM8.14 9.81c.15.33-.05-.27 0 0z"},child:[]},{tag:"path",attr:{d:"M8.3 10.23c.24.34-.26-.64 0 0zm-.06 1.15c-.13-1-.42.45 0 .69.13.34.25.2.3-.19-.32 0 .08-.62-.3-.5z"},child:[]}]})(n)}function bU(n){return Vt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"m21.62 11.108-8.731-8.729a1.292 1.292 0 0 0-1.823 0L9.257 4.19l2.299 2.3a1.532 1.532 0 0 1 1.939 1.95l2.214 2.217a1.53 1.53 0 0 1 1.583 2.531c-.599.6-1.566.6-2.166 0a1.536 1.536 0 0 1-.337-1.662l-2.074-2.063V14.9c.146.071.286.169.407.29a1.537 1.537 0 0 1 0 2.166 1.536 1.536 0 0 1-2.174 0 1.528 1.528 0 0 1 0-2.164c.152-.15.322-.264.504-.339v-5.49a1.529 1.529 0 0 1-.83-2.008l-2.26-2.271-5.987 5.982c-.5.504-.5 1.32 0 1.824l8.731 8.729a1.286 1.286 0 0 0 1.821 0l8.69-8.689a1.284 1.284 0 0 0 .003-1.822"},child:[]}]})(n)}function RU(n){return Vt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fillRule:"evenodd",clipRule:"evenodd",d:"M12.026 2c-5.509 0-9.974 4.465-9.974 9.974 0 4.406 2.857 8.145 6.821 9.465.499.09.679-.217.679-.481 0-.237-.008-.865-.011-1.696-2.775.602-3.361-1.338-3.361-1.338-.452-1.152-1.107-1.459-1.107-1.459-.905-.619.069-.605.069-.605 1.002.07 1.527 1.028 1.527 1.028.89 1.524 2.336 1.084 2.902.829.091-.645.351-1.085.635-1.334-2.214-.251-4.542-1.107-4.542-4.93 0-1.087.389-1.979 1.024-2.675-.101-.253-.446-1.268.099-2.64 0 0 .837-.269 2.742 1.021a9.582 9.582 0 0 1 2.496-.336 9.554 9.554 0 0 1 2.496.336c1.906-1.291 2.742-1.021 2.742-1.021.545 1.372.203 2.387.099 2.64.64.696 1.024 1.587 1.024 2.675 0 3.833-2.33 4.675-4.552 4.922.355.308.675.916.675 1.846 0 1.334-.012 2.41-.012 2.737 0 .267.178.577.687.479C19.146 20.115 22 16.379 22 11.974 22 6.465 17.535 2 12.026 2z"},child:[]}]})(n)}function PU(n){return Vt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M4.136 3.012h15.729l-1.431 16.15-6.451 1.826-6.414-1.826-1.433-16.15zm5.266 7.302-.173-2.035 7.533.002.173-1.963-9.87-.002.522 5.998h6.835l-.243 2.566-2.179.602-2.214-.605-.141-1.58H7.691l.247 3.123L12 17.506l4.028-1.08.558-6.111H9.402v-.001z"},child:[]}]})(n)}function LU(n){return Vt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M11.55 21H3v-8.55h8.55V21zM21 21h-8.55v-8.55H21V21zm-9.45-9.45H3V3h8.55v8.55zm9.45 0h-8.55V3H21v8.55z"},child:[]}]})(n)}function IU(n){return Vt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M15.661 15.549a1.315 1.315 0 0 0 1.185-1.386 1.363 1.363 0 0 0-1.35-1.302h-.048a1.352 1.352 0 0 0-1.303 1.397c.024.379.179.687.391.911-.827 1.609-2.07 2.794-3.954 3.788-1.266.663-2.604.912-3.905.734-1.089-.153-1.94-.64-2.463-1.421-.78-1.185-.852-2.462-.201-3.74a5.597 5.597 0 0 1 1.658-1.931 7.88 7.88 0 0 1-.331-1.218c-3.506 2.51-3.148 5.942-2.084 7.564.794 1.184 2.415 1.941 4.19 1.941.474 0 .972-.035 1.457-.154 3.077-.592 5.409-2.438 6.747-5.16l.011-.023z"},child:[]},{tag:"path",attr:{d:"M19.887 12.589c-1.834-2.154-4.533-3.337-7.611-3.337h-.403c-.2-.438-.661-.711-1.183-.711h-.036c-.744 0-1.325.64-1.301 1.385.023.71.627 1.302 1.35 1.302h.059a1.332 1.332 0 0 0 1.183-.828h.439c1.824 0 3.551.532 5.126 1.574 1.206.792 2.072 1.834 2.557 3.077.425 1.019.402 2.013-.035 2.843-.675 1.302-1.812 1.988-3.314 1.988-.947 0-1.871-.296-2.345-.509-.283.235-.758.626-1.102.863 1.042.473 2.096.746 3.113.746 2.309 0 4.023-1.302 4.676-2.557.709-1.422.651-3.813-1.161-5.859l-.012.023z"},child:[]},{tag:"path",attr:{d:"M7.647 15.975c.023.71.626 1.302 1.35 1.302h.048a1.334 1.334 0 0 0 1.302-1.397c0-.71-.616-1.301-1.338-1.301h-.048c-.048 0-.118 0-.178.022-.982-1.657-1.397-3.434-1.242-5.349.094-1.445.567-2.7 1.42-3.742.71-.888 2.048-1.326 2.96-1.35 2.556-.048 3.622 3.138 3.704 4.404l1.184.354C16.536 5.036 14.122 3 11.813 3 9.647 3 7.647 4.574 6.842 6.884c-1.102 3.077-.379 6.036.971 8.404-.118.154-.189.426-.166.687z"},child:[]}]})(n)}function NU(n){return Vt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M18.5 9.51a4.22 4.22 0 0 1-1.91-1.34A5.77 5.77 0 0 0 12 6a4.72 4.72 0 0 0-5 4 3.23 3.23 0 0 1 3.5-1.49 4.32 4.32 0 0 1 1.91 1.35A5.77 5.77 0 0 0 17 12a4.72 4.72 0 0 0 5-4 3.2 3.2 0 0 1-3.5 1.51zm-13 4.98a4.22 4.22 0 0 1 1.91 1.34A5.77 5.77 0 0 0 12 18a4.72 4.72 0 0 0 5-4 3.23 3.23 0 0 1-3.5 1.49 4.32 4.32 0 0 1-1.91-1.35A5.8 5.8 0 0 0 7 12a4.72 4.72 0 0 0-5 4 3.2 3.2 0 0 1 3.5-1.51z"},child:[]}]})(n)}function DU(n){return Vt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"m21.29 4.1-4.12-2a1.36 1.36 0 0 0-.48-.1h-.08a1.18 1.18 0 0 0-.72.24l-.14.12-7.88 7.19L4.44 7a.83.83 0 0 0-.54-.17.88.88 0 0 0-.53.17l-1.1 1a.8.8 0 0 0-.27.61.84.84 0 0 0 .27.62l3 2.71-3 2.72a.84.84 0 0 0 0 1.23l1.1 1a.89.89 0 0 0 .6.22.93.93 0 0 0 .47-.17l3.43-2.61 7.88 7.19a1.2 1.2 0 0 0 .76.36h.17a1 1 0 0 0 .49-.12l4.12-2a1.25 1.25 0 0 0 .71-1.1V5.23a1.26 1.26 0 0 0-.71-1.13zM17 16.47l-6-4.53 6-4.53z"},child:[]}]})(n)}function UU(){const n=[fe.jsx(Yb,{color:"#46d3f2",size:64}),fe.jsx(CU,{size:64}),fe.jsx(Xb,{color:"green",size:64}),fe.jsx(qb,{size:64}),fe.jsx(Kb,{color:"green",size:64}),fe.jsx(Jb,{color:"#f78f07",size:64}),fe.jsx(SU,{size:64}),fe.jsx($b,{size:64}),fe.jsx(jb,{color:"#2027b0",size:64}),fe.jsx(MU,{color:"#f5dd07",size:64}),fe.jsx(Wb,{color:"#6d7ecf",size:64}),fe.jsx(TU,{color:"#002aff",size:64}),fe.jsx(PU,{color:"#fc0303",size:64}),fe.jsx(EU,{color:"#a004d4",size:64}),fe.jsx(Qb,{size:64}),fe.jsx(NU,{color:"#03f4fc",size:64}),fe.jsx(Bb,{color:"#01056b",size:64}),fe.jsx(AU,{color:"#09ff00",size:64}),fe.jsx(RU,{size:64}),fe.jsx(bU,{color:"#fa1919",size:64}),fe.jsx(wU,{size:64}),fe.jsx(LU,{color:"blue",size:64}),fe.jsx(IU,{color:"#46d3f2",size:64}),fe.jsx(DU,{color:"#0390fc",size:64})];return fe.jsx("div",{className:"grid grid-cols-4 md:grid-cols-6 2xl:grid-cols-8 gap-4",children:n.map((e,t)=>fe.jsx("div",{className:"p-2",children:e},t))})}function OU(){return fe.jsxs("div",{className:"bg-white container flex flex-col items-center justify-center mx-auto my-3",children:[fe.jsx("h2",{className:"text-3xl font-bold text-black",children:"Skills"}),fe.jsx("p",{className:"text-gray-950 mx-auto",children:"You name it! I've done it!"}),fe.jsx("div",{className:"flex justify-center",children:fe.jsx(UU,{})})]})}const zU="/my-portfolio/assets/GEU-CyzQLqoM.jpg",FU="/my-portfolio/assets/Clairco-QdSIebFl.jpg",kU=()=>fe.jsx("div",{className:"bg-blue-950 p-8 text-white ",children:fe.jsxs("div",{className:"container mx-auto max-w-4xl",children:[fe.jsx("h1",{className:"text-3xl font-bold mb-4",children:"Experience"}),fe.jsxs("div",{className:"mb-8 flex flex-col-reverse md:flex-row",children:[fe.jsx("img",{src:zU,alt:"GEU image",className:"rounded-full object-cover w-48 md:w-48 h-auto my-2 md:mb-0 mx-auto md:mr-3 shadow-md shadow-white/70 hover:shadow-white hover:shadow-lg"}),fe.jsxs("div",{children:[fe.jsx("h2",{className:"text-2xl font-bold",children:"Graphic Era University"}),fe.jsx("h3",{className:"font-semibold text-gray-400 text-sm md:text-lg",children:"CS Student | 2021-2025 | SCGPA: 8.47"}),fe.jsx("p",{className:"text-white",children:"Dedicated Computer Science student with expertise in data structures, algorithms, cybersecurity, blockchain, game development and web development. Certified in Cloud computing, Frontend development, and AI. Passionate about continuous learning and active participation in computer science discussions."})]})]}),fe.jsxs("div",{className:"mb-8 flex flex-col-reverse md:flex-row",children:[fe.jsx("img",{src:FU,alt:"Clairco Image",className:"rounded-full object-cover w-48 md:w-48 h-auto my-2 md:mb-0 mx-auto md:mr-3 shadow-md shadow-white/70 hover:shadow-white hover:shadow-lg"}),fe.jsxs("div",{children:[fe.jsx("h2",{className:"text-2xl font-bold",children:"Clairco"}),fe.jsx("h3",{className:"text-sm md:text-lg font-semibold text-gray-400",children:"Software Development Intern | Jun'23 - Aug'23"}),fe.jsx("p",{className:"text-white",children:"Clairco (Aliferous Technologies Pvt Ltd) is a Bangalore based startup. As a Software Developer intern, I contributed to interactive applications using React, MongoDB, Express.js, and Node.js, gaining hands-on experience across the software development lifecycle."})]})]})]})}),rf={_origin:"https://api.emailjs.com"},BU=(n,e="https://api.emailjs.com")=>{rf._userID=n,rf._origin=e},fA=(n,e,t)=>{if(!n)throw"The public key is required. Visit https://dashboard.emailjs.com/admin/account";if(!e)throw"The service ID is required. Visit https://dashboard.emailjs.com/admin";if(!t)throw"The template ID is required. Visit https://dashboard.emailjs.com/admin/templates";return!0};class fM{constructor(e){this.status=e?e.status:0,this.text=e?e.responseText:"Network Error"}}const hA=(n,e,t={})=>new Promise((i,r)=>{const s=new XMLHttpRequest;s.addEventListener("load",({target:o})=>{const a=new fM(o);a.status===200||a.text==="OK"?i(a):r(a)}),s.addEventListener("error",({target:o})=>{r(new fM(o))}),s.open("POST",rf._origin+n,!0),Object.keys(t).forEach(o=>{s.setRequestHeader(o,t[o])}),s.send(e)}),HU=(n,e,t,i)=>{const r=i||rf._userID;return fA(r,n,e),hA("/api/v1.0/email/send",JSON.stringify({lib_version:"3.12.1",user_id:r,service_id:n,template_id:e,template_params:t}),{"Content-type":"application/json"})},VU=n=>{let e;if(typeof n=="string"?e=document.querySelector(n):e=n,!e||e.nodeName!=="FORM")throw"The 3rd parameter is expected to be the HTML form element or the style selector of form";return e},GU=(n,e,t,i)=>{const r=i||rf._userID,s=VU(t);fA(r,n,e);const o=new FormData(s);return o.append("lib_version","3.12.1"),o.append("service_id",n),o.append("template_id",e),o.append("user_id",r),hA("/api/v1.0/email/send-form",o)},WU={init:BU,send:HU,sendForm:GU};function dA(n){var e,t,i="";if(typeof n=="string"||typeof n=="number")i+=n;else if(typeof n=="object")if(Array.isArray(n)){var r=n.length;for(e=0;etypeof n=="number"&&!isNaN(n),pa=n=>typeof n=="string",Xi=n=>typeof n=="function",Qd=n=>pa(n)||Xi(n)?n:null,Hv=n=>ve.isValidElement(n)||pa(n)||Xi(n)||sf(n);function XU(n,e,t){t===void 0&&(t=300);const{scrollHeight:i,style:r}=n;requestAnimationFrame(()=>{r.minHeight="initial",r.height=i+"px",r.transition=`all ${t}ms`,requestAnimationFrame(()=>{r.height="0",r.padding="0",r.margin="0",setTimeout(e,t)})})}function Tm(n){let{enter:e,exit:t,appendPosition:i=!1,collapse:r=!0,collapseDuration:s=300}=n;return function(o){let{children:a,position:u,preventExitTransition:f,done:h,nodeRef:d,isIn:p,playToast:v}=o;const y=i?`${e}--${u}`:e,w=i?`${t}--${u}`:t,S=ve.useRef(0);return ve.useLayoutEffect(()=>{const g=d.current,x=y.split(" "),M=T=>{T.target===d.current&&(v(),g.removeEventListener("animationend",M),g.removeEventListener("animationcancel",M),S.current===0&&T.type!=="animationcancel"&&g.classList.remove(...x))};g.classList.add(...x),g.addEventListener("animationend",M),g.addEventListener("animationcancel",M)},[]),ve.useEffect(()=>{const g=d.current,x=()=>{g.removeEventListener("animationend",x),r?XU(g,h,s):h()};p||(f?x():(S.current=1,g.className+=` ${w}`,g.addEventListener("animationend",x)))},[p]),Pt.createElement(Pt.Fragment,null,a)}}function hM(n,e){return n!=null?{content:n.content,containerId:n.props.containerId,id:n.props.toastId,theme:n.props.theme,type:n.props.type,data:n.props.data||{},isLoading:n.props.isLoading,icon:n.props.icon,status:e}:{}}const mi=new Map;let of=[];const Vv=new Set,jU=n=>Vv.forEach(e=>e(n)),pA=()=>mi.size>0;function mA(n,e){var t;if(e)return!((t=mi.get(e))==null||!t.isToastActive(n));let i=!1;return mi.forEach(r=>{r.isToastActive(n)&&(i=!0)}),i}function gA(n,e){Hv(n)&&(pA()||of.push({content:n,options:e}),mi.forEach(t=>{t.buildToast(n,e)}))}function dM(n,e){mi.forEach(t=>{e!=null&&e!=null&&e.containerId?(e==null?void 0:e.containerId)===t.id&&t.toggle(n,e==null?void 0:e.id):t.toggle(n,e==null?void 0:e.id)})}function YU(n){const{subscribe:e,getSnapshot:t,setProps:i}=ve.useRef(function(s){const o=s.containerId||1;return{subscribe(a){const u=function(h,d,p){let v=1,y=0,w=[],S=[],g=[],x=d;const M=new Map,T=new Set,P=()=>{g=Array.from(M.values()),T.forEach(D=>D())},C=D=>{S=D==null?[]:S.filter(b=>b!==D),P()},L=D=>{const{toastId:b,onOpen:R,updateId:k,children:q}=D.props,oe=k==null;D.staleId&&M.delete(D.staleId),M.set(b,D),S=[...S,D.props.toastId].filter(V=>V!==D.staleId),P(),p(hM(D,oe?"added":"updated")),oe&&Xi(R)&&R(ve.isValidElement(q)&&q.props)};return{id:h,props:x,observe:D=>(T.add(D),()=>T.delete(D)),toggle:(D,b)=>{M.forEach(R=>{b!=null&&b!==R.props.toastId||Xi(R.toggle)&&R.toggle(D)})},removeToast:C,toasts:M,clearQueue:()=>{y-=w.length,w=[]},buildToast:(D,b)=>{if((J=>{let{containerId:Z,toastId:ie,updateId:pe}=J;const Ee=Z?Z!==h:h!==1,Te=M.has(ie)&&pe==null;return Ee||Te})(b))return;const{toastId:R,updateId:k,data:q,staleId:oe,delay:V}=b,Q=()=>{C(R)},te=k==null;te&&y++;const ae={...x,style:x.toastStyle,key:v++,...Object.fromEntries(Object.entries(b).filter(J=>{let[Z,ie]=J;return ie!=null})),toastId:R,updateId:k,data:q,closeToast:Q,isIn:!1,className:Qd(b.className||x.toastClassName),bodyClassName:Qd(b.bodyClassName||x.bodyClassName),progressClassName:Qd(b.progressClassName||x.progressClassName),autoClose:!b.isLoading&&(N=b.autoClose,B=x.autoClose,N===!1||sf(N)&&N>0?N:B),deleteToast(){const J=M.get(R),{onClose:Z,children:ie}=J.props;Xi(Z)&&Z(ve.isValidElement(ie)&&ie.props),p(hM(J,"removed")),M.delete(R),y--,y<0&&(y=0),w.length>0?L(w.shift()):P()}};var N,B;ae.closeButton=x.closeButton,b.closeButton===!1||Hv(b.closeButton)?ae.closeButton=b.closeButton:b.closeButton===!0&&(ae.closeButton=!Hv(x.closeButton)||x.closeButton);let H=D;ve.isValidElement(D)&&!pa(D.type)?H=ve.cloneElement(D,{closeToast:Q,toastProps:ae,data:q}):Xi(D)&&(H=D({closeToast:Q,toastProps:ae,data:q}));const Y={content:H,props:ae,staleId:oe};x.limit&&x.limit>0&&y>x.limit&&te?w.push(Y):sf(V)?setTimeout(()=>{L(Y)},V):L(Y)},setProps(D){x=D},setToggle:(D,b)=>{M.get(D).toggle=b},isToastActive:D=>S.some(b=>b===D),getSnapshot:()=>x.newestOnTop?g.reverse():g}}(o,s,jU);mi.set(o,u);const f=u.observe(a);return of.forEach(h=>gA(h.content,h.options)),of=[],()=>{f(),mi.delete(o)}},setProps(a){var u;(u=mi.get(o))==null||u.setProps(a)},getSnapshot(){var a;return(a=mi.get(o))==null?void 0:a.getSnapshot()}}}(n)).current;i(n);const r=ve.useSyncExternalStore(e,t,t);return{getToastToRender:function(s){if(!r)return[];const o=new Map;return r.forEach(a=>{const{position:u}=a.props;o.has(u)||o.set(u,[]),o.get(u).push(a)}),Array.from(o,a=>s(a[0],a[1]))},isToastActive:mA,count:r==null?void 0:r.length}}function qU(n){const[e,t]=ve.useState(!1),[i,r]=ve.useState(!1),s=ve.useRef(null),o=ve.useRef({start:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,didMove:!1}).current,{autoClose:a,pauseOnHover:u,closeToast:f,onClick:h,closeOnClick:d}=n;var p,v;function y(){t(!0)}function w(){t(!1)}function S(M){const T=s.current;o.canDrag&&T&&(o.didMove=!0,e&&w(),o.delta=n.draggableDirection==="x"?M.clientX-o.start:M.clientY-o.start,o.start!==M.clientX&&(o.canCloseOnClick=!1),T.style.transform=`translate3d(${n.draggableDirection==="x"?`${o.delta}px, var(--y)`:`0, calc(${o.delta}px + var(--y))`},0)`,T.style.opacity=""+(1-Math.abs(o.delta/o.removalDistance)))}function g(){document.removeEventListener("pointermove",S),document.removeEventListener("pointerup",g);const M=s.current;if(o.canDrag&&o.didMove&&M){if(o.canDrag=!1,Math.abs(o.delta)>o.removalDistance)return r(!0),n.closeToast(),void n.collapseAll();M.style.transition="transform 0.2s, opacity 0.2s",M.style.removeProperty("transform"),M.style.removeProperty("opacity")}}(v=mi.get((p={id:n.toastId,containerId:n.containerId,fn:t}).containerId||1))==null||v.setToggle(p.id,p.fn),ve.useEffect(()=>{if(n.pauseOnFocusLoss)return document.hasFocus()||w(),window.addEventListener("focus",y),window.addEventListener("blur",w),()=>{window.removeEventListener("focus",y),window.removeEventListener("blur",w)}},[n.pauseOnFocusLoss]);const x={onPointerDown:function(M){if(n.draggable===!0||n.draggable===M.pointerType){o.didMove=!1,document.addEventListener("pointermove",S),document.addEventListener("pointerup",g);const T=s.current;o.canCloseOnClick=!0,o.canDrag=!0,T.style.transition="none",n.draggableDirection==="x"?(o.start=M.clientX,o.removalDistance=T.offsetWidth*(n.draggablePercent/100)):(o.start=M.clientY,o.removalDistance=T.offsetHeight*(n.draggablePercent===80?1.5*n.draggablePercent:n.draggablePercent)/100)}},onPointerUp:function(M){const{top:T,bottom:P,left:C,right:L}=s.current.getBoundingClientRect();M.nativeEvent.type!=="touchend"&&n.pauseOnHover&&M.clientX>=C&&M.clientX<=L&&M.clientY>=T&&M.clientY<=P?w():y()}};return a&&u&&(x.onMouseEnter=w,n.stacked||(x.onMouseLeave=y)),d&&(x.onClick=M=>{h&&h(M),o.canCloseOnClick&&f()}),{playToast:y,pauseToast:w,isRunning:e,preventExitTransition:i,toastRef:s,eventHandlers:x}}function ZU(n){let{delay:e,isRunning:t,closeToast:i,type:r="default",hide:s,className:o,style:a,controlledProgress:u,progress:f,rtl:h,isIn:d,theme:p}=n;const v=s||u&&f===0,y={...a,animationDuration:`${e}ms`,animationPlayState:t?"running":"paused"};u&&(y.transform=`scaleX(${f})`);const w=io("Toastify__progress-bar",u?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated",`Toastify__progress-bar-theme--${p}`,`Toastify__progress-bar--${r}`,{"Toastify__progress-bar--rtl":h}),S=Xi(o)?o({rtl:h,type:r,defaultClassName:w}):io(w,o),g={[u&&f>=1?"onTransitionEnd":"onAnimationEnd"]:u&&f<1?null:()=>{d&&i()}};return Pt.createElement("div",{className:"Toastify__progress-bar--wrp","data-hidden":v},Pt.createElement("div",{className:`Toastify__progress-bar--bg Toastify__progress-bar-theme--${p} Toastify__progress-bar--${r}`}),Pt.createElement("div",{role:"progressbar","aria-hidden":v?"true":"false","aria-label":"notification timer",className:S,style:y,...g}))}let KU=1;const vA=()=>""+KU++;function JU(n){return n&&(pa(n.toastId)||sf(n.toastId))?n.toastId:vA()}function yu(n,e){return gA(n,e),e.toastId}function Np(n,e){return{...e,type:e&&e.type||n,toastId:JU(e)}}function Ld(n){return(e,t)=>yu(e,Np(n,t))}function Xt(n,e){return yu(n,Np("default",e))}Xt.loading=(n,e)=>yu(n,Np("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...e})),Xt.promise=function(n,e,t){let i,{pending:r,error:s,success:o}=e;r&&(i=pa(r)?Xt.loading(r,t):Xt.loading(r.render,{...t,...r}));const a={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},u=(h,d,p)=>{if(d==null)return void Xt.dismiss(i);const v={type:h,...a,...t,data:p},y=pa(d)?{render:d}:d;return i?Xt.update(i,{...v,...y}):Xt(y.render,{...v,...y}),p},f=Xi(n)?n():n;return f.then(h=>u("success",o,h)).catch(h=>u("error",s,h)),f},Xt.success=Ld("success"),Xt.info=Ld("info"),Xt.error=Ld("error"),Xt.warning=Ld("warning"),Xt.warn=Xt.warning,Xt.dark=(n,e)=>yu(n,Np("default",{theme:"dark",...e})),Xt.dismiss=function(n){(function(e){var t;if(pA()){if(e==null||pa(t=e)||sf(t))mi.forEach(r=>{r.removeToast(e)});else if(e&&("containerId"in e||"id"in e)){var i;(i=mi.get(e.containerId))!=null&&i.removeToast(e.id)||mi.forEach(r=>{r.removeToast(e.id)})}}else of=of.filter(r=>e!=null&&r.options.toastId!==e)})(n)},Xt.clearWaitingQueue=function(n){n===void 0&&(n={}),mi.forEach(e=>{!e.props.limit||n.containerId&&e.id!==n.containerId||e.clearQueue()})},Xt.isActive=mA,Xt.update=function(n,e){e===void 0&&(e={});const t=((i,r)=>{var s;let{containerId:o}=r;return(s=mi.get(o||1))==null?void 0:s.toasts.get(i)})(n,e);if(t){const{props:i,content:r}=t,s={delay:100,...i,...e,toastId:e.toastId||n,updateId:vA()};s.toastId!==n&&(s.staleId=n);const o=s.render||r;delete s.render,yu(o,s)}},Xt.done=n=>{Xt.update(n,{progress:1})},Xt.onChange=function(n){return Vv.add(n),()=>{Vv.delete(n)}},Xt.play=n=>dM(!0,n),Xt.pause=n=>dM(!1,n);const QU=typeof window<"u"?ve.useLayoutEffect:ve.useEffect,Id=n=>{let{theme:e,type:t,isLoading:i,...r}=n;return Pt.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:e==="colored"?"currentColor":`var(--toastify-icon-color-${t})`,...r})},$g={info:function(n){return Pt.createElement(Id,{...n},Pt.createElement("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))},warning:function(n){return Pt.createElement(Id,{...n},Pt.createElement("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))},success:function(n){return Pt.createElement(Id,{...n},Pt.createElement("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))},error:function(n){return Pt.createElement(Id,{...n},Pt.createElement("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))},spinner:function(){return Pt.createElement("div",{className:"Toastify__spinner"})}},$U=n=>{const{isRunning:e,preventExitTransition:t,toastRef:i,eventHandlers:r,playToast:s}=qU(n),{closeButton:o,children:a,autoClose:u,onClick:f,type:h,hideProgressBar:d,closeToast:p,transition:v,position:y,className:w,style:S,bodyClassName:g,bodyStyle:x,progressClassName:M,progressStyle:T,updateId:P,role:C,progress:L,rtl:D,toastId:b,deleteToast:R,isIn:k,isLoading:q,closeOnClick:oe,theme:V}=n,Q=io("Toastify__toast",`Toastify__toast-theme--${V}`,`Toastify__toast--${h}`,{"Toastify__toast--rtl":D},{"Toastify__toast--close-on-click":oe}),te=Xi(w)?w({rtl:D,position:y,type:h,defaultClassName:Q}):io(Q,w),ae=function(Y){let{theme:J,type:Z,isLoading:ie,icon:pe}=Y,Ee=null;const Te={theme:J,type:Z,isLoading:ie};return pe===!1||(Xi(pe)?Ee=pe(Te):ve.isValidElement(pe)?Ee=ve.cloneElement(pe,Te):ie?Ee=$g.spinner():(nt=>nt in $g)(Z)&&(Ee=$g[Z](Te))),Ee}(n),N=!!L||!u,B={closeToast:p,type:h,theme:V};let H=null;return o===!1||(H=Xi(o)?o(B):ve.isValidElement(o)?ve.cloneElement(o,B):function(Y){let{closeToast:J,theme:Z,ariaLabel:ie="close"}=Y;return Pt.createElement("button",{className:`Toastify__close-button Toastify__close-button--${Z}`,type:"button",onClick:pe=>{pe.stopPropagation(),J(pe)},"aria-label":ie},Pt.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},Pt.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}(B)),Pt.createElement(v,{isIn:k,done:R,position:y,preventExitTransition:t,nodeRef:i,playToast:s},Pt.createElement("div",{id:b,onClick:f,"data-in":k,className:te,...r,style:S,ref:i},Pt.createElement("div",{...k&&{role:C},className:Xi(g)?g({type:h}):io("Toastify__toast-body",g),style:x},ae!=null&&Pt.createElement("div",{className:io("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!q})},ae),Pt.createElement("div",null,a)),H,Pt.createElement(ZU,{...P&&!N?{key:`pb-${P}`}:{},rtl:D,theme:V,delay:u,isRunning:e,isIn:k,closeToast:p,hide:d,type:h,style:T,className:M,controlledProgress:N,progress:L||0})))},Am=function(n,e){return e===void 0&&(e=!1),{enter:`Toastify--animate Toastify__${n}-enter`,exit:`Toastify--animate Toastify__${n}-exit`,appendPosition:e}},eO=Tm(Am("bounce",!0));Tm(Am("slide",!0));Tm(Am("zoom"));Tm(Am("flip"));const tO={position:"top-right",transition:eO,autoClose:5e3,closeButton:!0,pauseOnHover:!0,pauseOnFocusLoss:!0,draggable:"touch",draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light"};function nO(n){let e={...tO,...n};const t=n.stacked,[i,r]=ve.useState(!0),s=ve.useRef(null),{getToastToRender:o,isToastActive:a,count:u}=YU(e),{className:f,style:h,rtl:d,containerId:p}=e;function v(w){const S=io("Toastify__toast-container",`Toastify__toast-container--${w}`,{"Toastify__toast-container--rtl":d});return Xi(f)?f({position:w,rtl:d,defaultClassName:S}):io(S,Qd(f))}function y(){t&&(r(!0),Xt.play())}return QU(()=>{if(t){var w;const S=s.current.querySelectorAll('[data-in="true"]'),g=12,x=(w=e.position)==null?void 0:w.includes("top");let M=0,T=0;Array.from(S).reverse().forEach((P,C)=>{const L=P;L.classList.add("Toastify__toast--stacked"),C>0&&(L.dataset.collapsed=`${i}`),L.dataset.pos||(L.dataset.pos=x?"top":"bot");const D=M*(i?.2:1)+(i?0:g*C);L.style.setProperty("--y",`${x?D:-1*D}px`),L.style.setProperty("--g",`${g}`),L.style.setProperty("--s",""+(1-(i?T:0))),M+=L.offsetHeight,T+=.025})}},[i,u,t]),Pt.createElement("div",{ref:s,className:"Toastify",id:p,onMouseEnter:()=>{t&&(r(!1),Xt.pause())},onMouseLeave:y},o((w,S)=>{const g=S.length?{...h}:{...h,pointerEvents:"none"};return Pt.createElement("div",{className:v(w),style:g,key:`container-${w}`},S.map(x=>{let{content:M,props:T}=x;return Pt.createElement($U,{...T,stacked:t,collapseAll:y,isIn:a(T.toastId,T.containerId),style:T.style,key:`toast-${T.key}`},M)}))}))}function iO(){const n=ve.useRef(),[e,t]=ve.useState({user_name:"",user_email:"",message:""}),[i,r]=ve.useState({user_name:"",user_email:"",message:""}),s=h=>{h.preventDefault(),o()&&WU.sendForm("service_kz36odt","template_h2od0rf",n.current,"y3RyWxgsJ48z6erxD").then(d=>{const p=d.text;console.log(p),p==="OK"?a("Email sent successfully!"):u("Error sending email. Please try again later.")},d=>{console.log(d.text),u("Error sending email. Please try again later.")})},o=()=>{let h={};return e.user_name.trim()||(h.user_name="Name is required"),e.user_email.trim()?/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e.user_email)||(h.user_email="Invalid email address"):h.user_email="Email is required",e.message.trim()||(h.message="Message is required"),r(h),Object.keys(h).length===0},a=h=>{Xt.success(h,{position:"top-center",autoClose:3e3})},u=h=>{Xt.error(h,{position:"top-center",autoClose:3e3})},f=h=>{const{name:d,value:p}=h.target;t({...e,[d]:p})};return fe.jsxs("div",{className:"my-10",children:[fe.jsx(nO,{}),fe.jsxs("h2",{className:"text-3xl font-bold mb-4 text-center my-2 flex justify-center",children:["Contact Me",fe.jsxs("picture",{className:"mx-2",children:[fe.jsx("source",{srcSet:"https://fonts.gstatic.com/s/e/notoemoji/latest/1f60e/512.webp",type:"image/webp"}),fe.jsx("img",{src:"https://fonts.gstatic.com/s/e/notoemoji/latest/1f60e/512.gif",alt:"😎",width:"32",height:"32"})]})]}),fe.jsxs("form",{ref:n,onSubmit:s,className:"max-w-md mx-5 md:mx-auto",children:[fe.jsxs("div",{className:"mb-4",children:[fe.jsx("label",{className:"block text-gray-800 font-bold mb-2",htmlFor:"user_name",children:"Name"}),fe.jsx("input",{className:`shadow appearance-none border rounded w-full py-2 px-3 text-gray-800 leading-tight focus:outline-none focus:shadow-outline ${i.user_name&&"border-red-500"}`,id:"user_name",type:"text",name:"user_name",placeholder:"Enter your name",value:e.user_name,onChange:f}),i.user_name&&fe.jsx("p",{className:"text-red-500 text-xs italic",children:i.user_name})]}),fe.jsxs("div",{className:"mb-4",children:[fe.jsx("label",{className:"block text-gray-800 font-bold mb-2",htmlFor:"user_email",children:"Email"}),fe.jsx("input",{className:`shadow appearance-none border rounded w-full py-2 px-3 text-gray-800 leading-tight focus:outline-none focus:shadow-outline ${i.user_email&&"border-red-500"}`,id:"user_email",type:"email",name:"user_email",placeholder:"Enter your email",value:e.user_email,onChange:f}),i.user_email&&fe.jsx("p",{className:"text-red-500 text-xs italic",children:i.user_email})]}),fe.jsxs("div",{className:"mb-4",children:[fe.jsx("label",{className:"block text-gray-800 font-bold mb-2",htmlFor:"message",children:"Message"}),fe.jsx("textarea",{className:`shadow appearance-none border rounded w-full py-2 px-3 text-gray-800 leading-tight focus:outline-none focus:shadow-outline ${i.message&&"border-red-500"}`,id:"message",name:"message",placeholder:"Enter your message",value:e.message,onChange:f}),i.message&&fe.jsx("p",{className:"text-red-500 text-xs italic",children:i.message})]}),fe.jsx("div",{className:"flex items-center justify-center",children:fe.jsx("button",{className:"bg-blue-950 hover:bg-blue-800 text-white font-bold py-2 px-4 rounded focus:outline-none focus:shadow-outline w-full",type:"submit",children:"Send"})})]})]})}function rO(){return fe.jsx("div",{className:"bg-blue-950 text-white py-6 text-center",children:fe.jsxs("div",{className:"container mx-auto",children:[fe.jsx("p",{className:"text-sm",children:"© 2024 Abhinav Choudhary. All rights reserved."}),fe.jsxs("p",{className:"mt-2",children:["Connect with me:"," ",fe.jsx("a",{href:"https://www.linkedin.com/in/abhinavchdhary/",target:"_blank",rel:"noopener noreferrer",className:"text-blue-400 hover:underline",children:"LinkedIn"})," ","|"," ",fe.jsx("a",{href:"https://github.com/Abhinav-Chdhary",target:"_blank",rel:"noopener noreferrer",className:"text-blue-400 hover:underline",children:"GitHub"})," ","|"," ",fe.jsx("a",{href:"mailto:abhinavchdhary@gmail.com",className:"text-blue-400 hover:underline",children:"Email"})]})]})})}function sO(){return fe.jsxs("div",{children:[fe.jsx(eR,{}),fe.jsx(yU,{}),fe.jsx(xU,{}),fe.jsx(OU,{}),fe.jsx(kU,{}),fe.jsx(iO,{}),fe.jsx(rO,{})]})}e1.createRoot(document.getElementById("root")).render(fe.jsx(Pt.StrictMode,{children:fe.jsx(sO,{})})); diff --git a/index.html b/index.html index 1bb6521..38c28e6 100644 --- a/index.html +++ b/index.html @@ -5,8 +5,8 @@ Abhinav - - + +