PageSourceSearch

https://godsunchained.com/libs_shared_pack-opening_src_index_ts.980a70a4b42e4c1d.js

js godsunchained.com collected 2026-10-03 20:51:59 UTC 1,967,655 bytes, 84 lines download raw bytes

1(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([["libs_shared_pack-opening_src_index_ts"],{39662:(d,p,v)=>{"use strict";v.d(p,{R:()=>me});var S=v(24398),I=v(91890),y=v(82886),U=v(25047),q=v(3068),X=v(80835),ee=v(30221),oe=v(83398);let me=class extends I.WF{constructor(){super(...arguments),this.#e={},this.#n=0,this.#i=void 0,this.qualities={small:250,normal:375,large:500,"x-large":720,"xx-large":1024}}static#t=this.ratio=100;#e;get sizes(){return this.#e}set sizes(le){this.#e=le}#n;get protoId(){return this.#n}set protoId(le){this.#n=le}#i;get image(){return this.#i}set image(le){this.#i=le}static get styles(){return I.AH`
2      :host {
3        position: relative;
4        display: block;
5        width: 100%;
6      }
7
8      .card-image {
9        display: block;
10        width: 100%;
11        padding-bottom: ${this.ratio}%; /* ratio of card images is: 1.347583643122677 */
12        position: relative;
13        opacity: 1;
14        ${(0,X.asCssProp)(ee.animation.slowTransition("opacity"))};
15
16        -webkit-touch-callout: none;
17        -webkit-user-drag: none;
18      }
19
20      :host(.loading) .card-image {
21        opacity: 0;
22      }
23
24      .card-image__image {
25        position: absolute;
26        top: 0;
27        left: 0;
28        width: 100%;
29        height: 100%;
30
31        -webkit-touch-callout: inherit;
32        -webkit-user-drag: inherit;
33      }
34
35      .card-image__spinner {
36        display: block;
37        position: absolute;
38        top: 50%;
39        left: 50%;
40        transform: translate(-50%, -50%);
41        font-size: ${(0,X.asCssProp)((0,q.sr)(20))};
42        color: ${(0,X.asCssProp)(ee.colors.light[100])};
43        opacity: 0;
44        ${(0,X.asCssProp)(ee.animation.slowTransition("opacity"))};
45      }
46
47      :host(.loading) .card-image__spinner {
48        opacity: 1;
49      }
50    `}getImageUrl(le,ce){return(0,U.V)(`art2/${le}/${this.protoId}${ce?".png":".webp"}`)}renderSourceSet(le=!1){return Object.keys(this.qualities).map(ce=>
50{const se=this.qualities[ce];return`${this.getImageUrl(se,le)} ${se}w`}).join(", ")}renderSizes(){return Object.keys(this.sizes).map(le=>"default"===le?this.sizes[le]:`(min-width: ${oe.breakpointSizeMapping[le]}) ${this.sizes[le]}`).join(", ")}notifyState(le){this.dispatchEvent(new CustomEvent(le,{detail:this,bubbles:!1,composed:!1}))}updated(le){if(super.updated(le),this.image?.complete)this.classList.remove("loading","error"),this.classList.add("loaded"),this.notifyState("loaded");else{if(this.classList.remove("error"),this.classList.add("loading"),this.notifyState("loading"),!this.image)return;(0,q.Hd)(this.image).then(()=>{this.classList.remove("loading","error"),this.classList.add("loaded"),this.notifyState("loaded")}).catch(()=>{this.classList.remove("loading"),this.classList.add("error"),this.notifyState("error")})}}render(){const le=this.renderSizes();return I.qy`
51      <picture class="card-image" data-proto-id="${this.protoId}">
52        <source srcset="${this.renderSourceSet()}" type="image/webp" sizes="${le}" />
53        <source srcset=${this.renderSourceSet(!0)} type="image/png" sizes="${le}" />
54        <img
55          class="card-image__image"
56          src="${this.getImageUrl(this.qualities.small,!0)}"
57          alt="Card Image"
58          loading="lazy"
59        />
60      </picture>
61      <slot class="card-image__spinner"></slot>
62    `}};(0,S.Cg)([(0,y.MZ)()],me.prototype,"sizes",null),(0,S.Cg)([(0,y.MZ)()],me.prototype,"protoId",null),(0,S.Cg)([(0,y.P)(".card-image__image")],me.prototype,"image",null),me=(0,S.Cg)([(0,y.EM)("gu-card-art-image")],me)},71038:(d,p,v)=>{"use strict";v.d(p,{q:()=>X});var S=v(24398),I=v(91890),y=v(82886),U=v(25047),q=v(39662);let X=class extends q.R{constructor(){super(...arguments),this.#e=5,this.qualities={small:128,normal:256,large:512,"x-large":720,"xx-large":1024}}static#t=this.ratio=134.75;static get styles(){return I.AH`
63      ${super.styles}
64
65      .card-image__spinner {
66        top: 0;
67        left: 0;
68        right: 0;
69        bottom: 0;
70        transform: translateX(6px) scale(0.98);
71      }
72    `}#e;get quality(){return this.#e}set quality(oe){this.#e=oe}getImageUrl(oe,me){return(0,U.B)(`?id=${this.protoId}&q=${this.quality}&w=${oe}${me?"&png=true":""}`)}};(0,S.Cg)([(0,y.MZ)()],X.prototype,"quality",null),X=(0,S.Cg)([(0,y.EM)("gu-card-image")],X)},62162:(d,p,v)=>{"use strict";v.r(p),v.d(p,{AssetPanelComponent:()=>YT,OpenPacksComponent:()=>iI,SharedPackOpeningModule:()=>aL});var S=v(60316),I=v(92662),y=v(68559),U=v(84205),q=function(f){return f[f.BACKDROP_CLICK=0]="BACKDROP_CLICK",f[f.CLOSE_BUTTON_CLICK=1]="CLOSE_BUTTON_CLICK",f[f.ESC=2]="ESC",f}(q||{});class X{constructor(e,t,r){this.nodes=e,this.viewRef=t,this.componentRef=r}}class ee{close(e){}dismiss(e){}}class oe{get componentInstance(){if(this.contentRef&&this.contentRef.componentRef)return this.contentRef.componentRef.instance}constructor(e,t,r,s,l,u,g){this.windowComponentRef=e,this.contentRef=t,this.backdropComponentRef=r,this.beforeDismiss=s,this.onBackdropClicked=l,this.onCloseButtonClicked=u,this.onEscKeyPressed=g,e?.instance.dismissEvent.subscribe(_=>{this.dismiss(_)}),this.result=new Promise((_,x)=>{this.resolve=_,this.reject=x}),this.result.then(null,()=>{})}close(e){this.windowComponentRef&&(this.resolve(e),this.removeModalElements())}dismissModal(e){this.reject(e),this.removeModalElements()}dismiss(e){if(this.windowComponentRef)return this.runInteractionEventHandlers(e),this.beforeDismiss?this.handleBeforeDismissResult(this.beforeDismiss(),e):this.dismissModal(e)}handleBeforeDismissResult(e,t){return"boolean"!=typeof e?e.then(r=>{!1!==r&&this.dismissModal(t)}):!1!==e?this.dismissModal(t):void 0}runInteractionEventHandlers(e){this.onBackdropClicked&&e===q.BACKDROP_CLICK&&this.onBackdropClicked(),this.onCloseButtonClicked&&e===q.CLOSE_BUTTON_CLICK&&this.onCloseButtonClicked(),this.onEscKeyPressed&&e===q.ESC&&this.onEscKeyPressed()}removeModalElements(){const e=this.windowComponentRef?.location.nativeElement;if(e.parentNode.removeChild(e),this.windowComponentRef?.destroy(),this.backdropComponentRef){const t=this.backdropComponentRef.location.nativeElement;t.parentNode.removeChild(t),this.backdropComponentRef.destroy()}this.contentRef&&this.contentRef.viewRef&&this.contentRef.viewRef.destroy(),this.windowComponentRef=null,this.backdropComponentRef=null,this.contentRef=null}}var me=v(18537),K=v(33900),le=v(70271),ce=v(51567),se=v(15842),be=function(f){return f[f.Tab=9]="Tab",f[f.Enter=13]="Enter",f[f.Escape=27]="Escape",f[f.Space=32]="Space",f[f.PageUp=33]="PageUp",f[f.PageDown=34]="PageDown",f[f.End=35]="End",f[f.Home=36]="Home",f[f.ArrowLeft=37]="ArrowLeft",f[f.ArrowUp=38]="ArrowUp",f[f.ArrowRight=39]="ArrowRight",f[f.ArrowDown=40]="ArrowDown",f}(be||{});const ae=["a[href]","button:not([disabled])",'input:not([disabled]):not([type="hidden"])',"select:not([disabled])","textarea:not([disabled])","[contenteditable]",'[tabindex]:not([tabindex="-1"])'].join(", "),re=[...ae.split(", "),"gu-hex-button","gu-link","gu-standard-button"].join(", "),j=f=>{const e=f.shadowRoot;if(e){const t=e.querySelector(ae);if(null!==t)return t}return f};function $(f){const e=Array.from(f.querySelectorAll(re)).filter(t=>-1!==j(t).tabIndex);return[e[0],e[e.length-1]]}function Oe(f){return null!=f}var it=v(69072);let on=(()=>{class f{get hostClasses(){return"cerberusModal__backdrop"+(this.backdropClass?" "+this.backdropClass:"")}constructor(t){this.environment=t,this.modalEnvironment=""}ngOnInit(){this.modalEnvironment=this.environment.app}static#t=this.\u0275fac=function(r){return new(r||f)(y.rXU(it.CF))};static#e=this.\u0275cmp=y.VBU({type:f,selectors:[["cerberus-modal-backdrop"]],hostVars:2,hostBindings:function(r,s){2&r&&y.HbH(s.hostClasses)},inputs:{backdropClass:"backdropClass"},decls:0,vars:0,template:function(r,s){},encapsulation:2})}return f})();var Yt=v(98764),_t=v(36647),Kt=v(64334);v(46599);const Mt=["dialog"],rt=["*"];function ke(f,e){if(1&f){const t=y.RV6();y.j41(0,"button",3),y.bIt("click",function(){y.eBV(t);const s=y.XpG();return y.Njj(s.dismiss(1))}),y.nrm(1,"gu-icon",4),y.k0s()}}let xe=(()=>{class f{get hostClasses(){return"cerberusModal"+(this.windowClass?" "+this.windowClass:"")}constructor(t,r,s,l){this.environment=t,this.document=r,this.elRef=s,this.zone=l,this.closed$=new U.B,this.elWithFocus=null,this.modalEnvironment="",this.backdrop=!0,this.centered=!1,this.keyboard=!0,this.scrollable=!1,this.defaultStylings=!0,this.withCloseButton=!1,this.noInitialFocus=!1,this.dismissEvent=new y.bkB,this.role="dialog",this.tabIndex=-1,this.ariaModal=!0,this.ariaLabelledByValue=this.ariaLabelledBy}dismiss(t){this.dismissEvent.emit(t)}ngOnInit(){this.elWithFocus=this.document.activeElement,this.modalEnvironment=this.environment.app}ngAfterViewInit(){const{nativeElement:t}=this.elRef;if(this.zone.runOutsideAngular(()=>{this.setUpEscapeKeyhandler(t),this.setUpMouseEventHandlers(t)}),!t.contains(document.activeElement)){const r=t.querySelector("[ngbAutofocus]"),s=$(t)[0];(this.noInitialFocus&&t||r||s||t).focus()}}setUpEscapeKeyhandler(t){(0,me.R)(t,"keydown").pipe((0,K.Q)(this.closed$),(0,ce.p)(r=>r.which===be.Escape&&this.keyboard)).subscribe(r=>requestAnimationFrame(()=>{r.defaultPrevented||this.zone.run(()=>this.dismiss(q.ESC))}))}setUpMouseEventHandlers(t){let r=!1;(0,me.R)(this.dialogEl.nativeElement,"mousedown").pipe((0,K.Q)(this.closed$),(0,Yt.M)(()=>r=!1),(0,_t.n)(()=>(0,me.R)(t,"mouseup").pipe((0,K.Q)(this.closed$),(0,Kt.s)(1))),(0,ce.p)(({target:s})=>t===s)).subscribe(()=>{r=!0}),(0,me.R)(t,"click").pipe((0,K.Q)(this.closed$)).subscribe(({target:s})=>{!0===this.backdrop&&t===s&&!r&&this.zone.run(()=>this.dismiss(q.BACKDROP_CLICK)),r=!1})}ngOnDestroy(){const t=this.document.body,r=this.elWithFocus;let s;s=r&&r.focus&&t.contains(r)?r:t,this.zone.runOutsideAngular(()=>{setTimeout(()=>s.focus()),this.elWithFocus=null}),this.closed$.next()}static#t=this.\u0275fac=function(r){return new(r||f)(y.rXU(it.CF),y.rXU(S.qQ),y.rXU(y.aKT),y.rXU(y.SKi))};static#e=this.\u0275cmp=y.VBU({type:f,selectors:[["cerberus-modal-window"]],viewQuery:function(r,s){if(1&r&&y.GBs(Mt,7),2&r){let l;y.mGM(l=y.lsd())&&(s.dialogEl=l.first)}},hostVars:6,hostBindings:function(r,s){2&r&&(y.BMQ("role",s.role)("tabindex",s.tabIndex)("aria-modal",s.ariaModal)("aria-labelledby",s.ariaLabelledByValue),y.HbH(s.hostClasses))},inputs:{ariaLabelledBy:"ariaLabelledBy",backdrop:"backdrop",centered:"centered",keyboard:"keyboard",scrollable:"scrollable",size:"size",windowClass:"windowClass",defaultStylings:"defaultStylings",withCloseButton:"withCloseButton",noInitialFocus:"noInitialFocus"},outputs:{dismissEvent:"dismissEvent"},ngContentSelectors:rt,decls:5,vars:5,consts:[["dialog",""],["role","document"],["class","cerberusModal__closeButton",3,"click",4,"ngIf"],[1,"cerberusModal__closeButton",3,"click"],["iconLigature","close_x"]],template:function(r,s){1&r&&(y.NAR(),y.j41(0,"div",1,0)(2,"div"),y.SdG(3),y.DNE(4,ke,2,0,"button",2),y.k0s()()),2&r&&(y.HbH("cerberusModal__dialog"+(s.size?" cerberus-modal-"+s.size:"")+(s.defaultStylings?" cerberusModal__dialog--defaultStylings":"")+(s.centered?" cerberusModal__dialog--centered":"")+(s.scrollable?" cerberusModal__dialog--scrollable":"")+(s.modalEnvironment?" cerberusModal__dialog--"+s.modalEnvironment:"")),y.R7$(2),y.HbH("cerberusModal__content"+(s.defaultStylings?" cerberusModal__content--defaultStylings":"")),y.R7$(2),y.Y8G("ngIf",s.withCloseButton))},dependencies:[S.bT],styles:['.form-row{margin-bottom:16px}.form-row--with-validation{min-height:90px}.cerberusModal__open{overflow:hidden;height:100vh;width:100vw;-webkit-user-select:none;user-select:none;pointer-events:none}.cerberusModal__open .cerberusModal{overflow:hidden;-webkit-user-select:auto;user-select:auto;pointer-events:auto}.cerberusModal{position:absolute;top:0;left:0;z-index:22;width:100%;height:100%;overflow:hidden;outline:0;display:flex;justify-content:center;align-items:flex-start}.cerberusModal--offsetTitleBar{padding-top:28px}.cerberusModal__dialog{position:relative;width:100%;height:100%;pointer-events:none;justify-content:center;display:flex}.cerberusModal__dialog--scrollable{display:flex;max-height:calc(100% - 16px)}.cerberusModal__dialog--scrollable .cerberusModal__content{max-height:calc(100vh - 16px);overflow:hidden}.cerberusModal__dialog--scrollable .cerberusModal__header .cerberusModal__footer{flex-shrink:0}.cerberusModal__dialog--scrollable .cerberusModal__body{overflow-y:auto}.cerberusModal__dialog--defaultStylings{margin:8px}.cerberusModal__dialog--centered{width:auto;height:auto;display:flex;align-items:center;min-height:calc(100% - 16px);align-self:center}.cerberusModal__dialog--centered:before{display:block;height:calc(100vh - 16px);height:min-content;content:""}.cerberusModal__dialog--centered.cerberusModal__dialog--scrollable{flex-direction:column;justify-content:center;height:100%}.cerberusModal__dialog--centered.cerberusModal__dialog--scrollable .cerberusModal__content{max-height:none}.cerberusModal__dialog--centered.cerberusModal__dialog--scrollable:before{content:none}.cerberusModal__content{position:relative;flex-direction:column;display:flex;width:100%;height:100%;pointer-events:auto;background-clip:padding-box;outline:0}.cerberusModal__content--defaultStylings{border:2px solid white;border:1px solid rgba(0,0,0,.2);background-color:#fff}.cerberusModal__backdrop{position:absolute;top:0;left:0;z-index:22;width:100%;height:100%;background-color:#000;opacity:.5}.cerberusModal__backdrop--blur{-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}.cerberusModal__header{display:flex;align-items:flex-start;justify-content:space-between;padding:16px;border-bottom:1px solid #dee2e6}.cerberusModal__header .close{padding:16px;margin:-16px -16px -16px auto}.cerberusModal__title{margin-bottom:0;line-height:1.5}.cerberusModal__body{position:relative;flex:1 1 auto;padding:16px}.cerberusModal__footer{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;padding:12px;border-top:1px solid #dee2e6}.cerberusModal__footer>*{margin:4px}.cerberusModal__scrollbarMeasure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}.cerberusModal__closeButton{background:none;border:none;color:#8be1e0;cursor:pointer;font-size:24px;height:24px;padding:0;position:absolute;right:20px;top:20px;transition:all .15s ease-in-out}.cerberusModal__closeButton:focus{outline:2px solid #ff8d01}\n',"cerberus-modal-window .component-host-scrollable{display:flex;flex-direction:column;overflow:hidden}.cerberusModal__dialog--defaultStylings.cerberusModal__dialog--website{top:96px}.cerberusModal__dialog--defaultStylings.cerberusModal__dialog--desktop{top:calc(var(--vh) * 9)}\n"],encapsulation:2})}return f})(),Pe=(()=>{class f{constructor(){this.applicationRef=(0,y.WQX)(y.o8S)}getModalRef(t,r,s,l){return new oe(r,t,s,l.beforeDismiss,l.onBackdropClicked,l.onCloseButtonClicked,l.onEscKeyPressed)}getBackdropComponent(t){const r=(0,y.a0P)(on,{environmentInjector:this.applicationRef.injector,elementInjector:this.applicationRef.injector});return this.applicationRef.attachView(r.hostView),t.appendChild(r.location.nativeElement),r}getWindowComponent(t,r){const s=(0,y.a0P)(xe,{environmentInjector:this.applicationRef.injector,elementInjector:this.applicationRef.injector,projectableNodes:r.nodes});return this.applicationRef.attachView(s.hostView),t.appendChild(s.location.nativeElement),s}getContentRef(t,r,s,l){const u=y.zZn.create({providers:[{provide:ee,useValue:r}],parent:s.injector||this.applicationRef.injector}),g=(0,y.a0P)(t,{environmentInjector:this.applicationRef.injector,elementInjector:u});this.applyInitialValues(g.instance,l);const _=g.location.nativeElement;return s.scrollable&&_.classList.add("component-host-scrollable"),this.applicationRef.attachView(g.hostView),new X([[_]],g.hostView,g)}
72applyInitialValues(t,r){r&&Object.keys(r).forEach(s=>{t[s]=r[s]})}static#t=this.\u0275fac=function(r){return new(r||f)};static#e=this.\u0275prov=y.jDH({token:f,factory:f.\u0275fac,providedIn:"root"})}return f})();const Ft=()=>{};let pt=(()=>{class f{constructor(t){this._document=t}compensate(){const t=this._getWidth();return this._isPresent(t)?this._adjustBody(t):Ft}_adjustBody(t){const r=this._document.body,s=r.style.paddingRight,l=parseFloat(window.getComputedStyle(r).paddingRight);return r.style.paddingRight=`${l+t}px`,()=>r.style.paddingRight=s}_isPresent(t){const r=this._document.body.getBoundingClientRect();return window.innerWidth-(r.left+r.right)>=t-.1*t}_getWidth(){const t=this._document.createElement("div");t.className="cerberusModal__scrollbarMeasure";const r=this._document.body;r.appendChild(t);const s=t.getBoundingClientRect().width-t.clientWidth;return r.removeChild(t),s}static#t=this.\u0275fac=function(r){return new(r||f)(y.KVO(S.qQ))};static#e=this.\u0275prov=y.jDH({token:f,factory:f.\u0275fac,providedIn:"root"})}return f})();const Hn=["backdropClass"],Li=["ariaLabelledBy","backdrop","centered","keyboard","scrollable","size","windowClass","defaultStylings","withCloseButton","
72noInitialFocus"];let ri=(()=>{class f{constructor(t,r,s,l,u){this.factory=t,this.document=r,this.scrollBar=s,this.rendererFactory=l,this.ngZone=u,this.activeWindowComponentHasChanged=new U.B,this.ariaHiddenValues=new Map,this.modalRefs=[],this.windowComponents=[],this.activeWindowComponentHasChanged.subscribe(()=>{if(this.windowComponents.length){const g=this.windowComponents[this.windowComponents.length-1];((f,e,t,r=!1)=>{f.runOutsideAngular(()=>{const s=(0,me.R)(e,"focusin").pipe((0,K.Q)(t),(0,le.T)(l=>l.target));(0,me.R)(e,"keydown").pipe((0,K.Q)(t),(0,ce.p)(l=>l.which===be.Tab),(0,se.E)(s)).subscribe(([l,u])=>{((f,e,t)=>{const[r,s]=$(f);(e===r||e===f)&&t.shiftKey&&(j(s).focus(),t.preventDefault()),e===s&&!t.shiftKey&&(j(r).focus(),t.preventDefault())})(e,u,l)}),r&&(0,me.R)(e,"click").pipe((0,K.Q)(t),(0,se.E)(s),(0,le.T)(l=>l[1])).subscribe(l=>l.focus())})})(this.ngZone,g.location.nativeElement,this.activeWindowComponentHasChanged),this.revertAriaHidden(),this.setAriaHidden(g.location.nativeElement)}})}open(t,r,s){const l=this.findModalRoot(r),u=this.rendererFactory.createRenderer(null,null);if(!l)throw new Error(`The specified modal container "${r.container||"body"}" was not found in the DOM.`);const g=new ee,_=this.factory.getContentRef(t,g,r,s),x=!1!==r.backdrop?this.factory.getBackdropComponent(l):null,M=this.factory.getWindowComponent(l,_),C=this.factory.getModalRef(_,M,x,r);return this.registerModalRef(C),this.registerWindowComponent(M),this.applyCloseBehaviour(C,u),g.close=P=>{C.close(P)},g.dismiss=P=>{C.dismiss(P)},this.applyLayoutOptions(r,M,x,u),C}applyCloseBehaviour(t,r){const s=this.scrollBar.compensate(),l=()=>{this.modalRefs.length||(r.removeClass(this.document.querySelector("html"),"cerberusModal__open"),this.revertAriaHidden())};t.result.then(s,s),t.result.then(l,l)}applyLayoutOptions(t,r,s,l){this.applyWindowOptions(r.instance,t),1===this.modalRefs.length&&l.addClass(this.document.querySelector("html"),"cerberusModal__open"),s&&s.instance&&this.applyBackdropOptions(s.instance,t)}findModalRoot(t){return t.container instanceof HTMLElement?t.container:this.document.querySelector(t.container||".modal-root")||this.document.body}dismissAll(t){this.modalRefs.forEach(r=>r.dismiss(t))}closeAll(t){this.modalRefs.forEach(r=>r.close(t))}hasOpenModals(){return this.modalRefs.length>0}applyWindowOptions(t,r){Li.forEach(s=>{Oe(r[s])&&(t[s]=r[s])})}
72applyBackdropOptions(t,r){Hn.forEach(s=>{Oe(r[s])&&(t[s]=r[s])})}setAriaHidden(t){const r=t.parentElement;r&&t!==this.document.body&&(Array.from(r.children).forEach(s=>{s!==t&&"SCRIPT"!==s.nodeName&&(this.ariaHiddenValues.set(s,s.getAttribute("aria-hidden")||""),s.setAttribute("aria-hidden","true"))}),this.setAriaHidden(r))}revertAriaHidden(){this.ariaHiddenValues.forEach((t,r)=>{t?r.setAttribute("aria-hidden",t):r.removeAttribute("aria-hidden")}),this.ariaHiddenValues.clear()}registerModalRef(t){const r=()=>{const s=this.modalRefs.indexOf(t);s>-1&&this.modalRefs.splice(s,1)};this.modalRefs.push(t),t.result.then(r,r)}registerWindowComponent(t){this.windowComponents.push(t),this.activeWindowComponentHasChanged.next(),t.onDestroy(()=>{const r=this.windowComponents.indexOf(t);r>-1&&(this.windowComponents.splice(r,1),this.activeWindowComponentHasChanged.next())})}static#t=this.\u0275fac=function(r){return new(r||f)(y.KVO(Pe),y.KVO(S.qQ),y.KVO(pt),y.KVO(y._9s),y.KVO(y.SKi))};static#e=this.\u0275prov=y.jDH({token:f,factory:f.\u0275fac,providedIn:"root"})}return f})(),Gr=(()=>{class f{constructor(){this.backdrop=!0,this.keyboard=!0}static#t=this.\u0275fac=function(r){return new(r||f)};static#e=this.\u0275prov=y.jDH({token:f,factory:f.\u0275fac,providedIn:"root"})}return f})(),hr=(()=>{class f{constructor(t,r){this.modalStack=t,this.config=r}open(t,r={},s){const l=Object.assign({},this.config,r);return this.modalStack.open(t,l,s)}dismissAll(t){this.modalStack.dismissAll(t)}closeAll(t){this.modalStack.closeAll(t)}hasOpenModals(){return this.modalStack.hasOpenModals()}static#t=this.\u0275fac=function(r){return new(r||f)(y.KVO(ri),y.KVO(Gr))};static#e=this.\u0275prov=y.jDH({token:f,factory:f.\u0275fac,providedIn:"root"})}return f})();v(61515),v(38964),v(1600);let Tn=(()=>{class f{static#t=this.\u0275fac=function(r){return new(r||f)};static#e=this.\u0275mod=y.$C({type:f});static#n=this.\u0275inj=y.G2t({providers:[hr],imports:[S.MD,I.r]})}return f})();var sr=v(44549),Ps=v(99938);function rr(f){if(void 0===f)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return f}function pa(f,e){f.prototype=Object.create(e.prototype),f.prototype.constructor=f,f.__proto__=e}var Rs,er,Yi,yr,Xa,Wd,Bl,Um,yf,ou,If,_,x,M,C,P,R,f,e,t,r,s,l,u,g,F,wr={autoSleep:120,force3D:"auto",nullTargetWarn:1,units:{lineHeight:""}},ds={duration:.5,overwrite:!1,delay:0},ur=1e8,vi=1e-8,Bs=2*Math.PI,ps=Bs/4,Ls=0,at=Math.sqrt,Pn=Math.cos,Nr=Math.sin,Jn=function(e){return"string"==typeof e},Wi=function(e){return"function"==typeof e},js=function(e){return"number"==typeof e},lo=function(e){return typeof e>"u"},Wa=function(e){return"object"==typeof e},Mi=function(e){return!1!==e},ma=function(){return typeof window<"u"},Qd=function(e){return Wi(e)||Jn(e)},Il="function"==typeof ArrayBuffer&&ArrayBuffer.isView||function(){},Js=Array.isArray,Ko=/(?:-?\.?\d|\.)+/gi,Om=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g,eh=/[-+=.]*\d+[.e-]*\d*[a-z%]*/g,_f=/[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi,Nm=/[+-]=-?[.\d]+/,Pl=/[^,'"\[\]\s]+/gi,Rl=/^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i,Ia={},ea={},zm=function(e){return(ea=Dl(e,Ia))&&is},Zo=function(e,t){return console.warn("Invalid property",e,"set to",t,"Missing plugin? gsap.registerPlugin()")},jo=function(e,t){return!t&&console.warn(e)},Gm=function(e,t){return e&&(Ia[e]=t)&&ea&&(ea[e]=t)||Ia},Jh=function(){return 0},yA={suppressEvents:!0,isStart:!0,kill:!1},vf={suppressEvents:!0,kill:!1},xA={suppressEvents:!0},eu={},Do=[],tu={},ga={},xf={},Xd=30,nu=[],qd="",Ef=function(e){var r,s,t=e[0];if(Wa(t)||Wi(t)||(e=[e]),!(r=(t._gsap||{}).harness)){for(s=nu.length;s--&&!nu[s].targetTest(t););r=nu[s]}for(s=e.length;s--;)e[s]&&(e[s]._gsap||(e[s]._gsap=new Ba(e[s],r)))||e.splice(s,1);return e},Ll=function(e){return e._gsap||Ef(ho(e))[0]._gsap},Yd=function(e,t,r){return(r=e[t])&&Wi(r)?e[t]():lo(r)&&e.getAttribute&&e.getAttribute(t)||r},ta=function(e,t){return(e=e.split(",")).forEach(t)||e},Vr=function(e){return Math.round(1e5*e)/1e5||0},bs=function(e){return Math.round(1e7*e)/1e7||0},hc=function(e,t){var r=t.charAt(0),s=parseFloat(t.substr(2));return e=parseFloat(e),"+"===r?e+s:"-"===r?e-s:"*"===r?e*s:e/s},Vm=function(e,t){for(var r=t.length,s=0;e.indexOf(t[s])<0&&++s<r;);return s<r},iu=function(){var r,s,e=Do.length,t=Do.slice(0);for(tu={},Do.length=0,r=0;r<e;r++)(s=t[r])&&s._lazy&&(s.render(s._lazy[0],s._lazy[1],!0)._lazy=0)},$d=function(e,t,r,s){Do.length&&!er&&iu(),e.render(t,r,s||er&&t<0&&(e._initted||e._startAt)),Do.length&&!er&&iu()},Kd=function(e){var t=parseFloat(e);return(t||0===t)&&(e+"").match(Pl).length<2?t:Jn(e)?e.trim():e},Zd=function(e){return e},Pa=function(e,t){for(var r in t)r in e||(e[r]=t[r]);return e},Dl=function(e,t){for(var r in t)e[r]=t[r];return e},jd=function f(e,t){for(var r in t)"__proto__"!==r&&"constructor"!==r&&"prototype"!==r&&(e[r]=Wa(t[r])?f(e[r]||(e[r]={}),t[r]):t[r]);return e},th=function(e,t){var s,r={};for(s in e)s in t||(r[s]=e[s]);return r},ru=function(e){var t=e.parent||yr,r=e.keyframes?function(e){return function(t,r){for(var s in r)s in t||"duration"===s&&e||"ease"===s||(t[s]=r[s])}}
vendor: 5,457 bytes, line 72
72(Js(e.keyframes)):Pa;if(Mi(e.inherit))for(;t;)r(e,t.vars.defaults),t=t.parent||t._dp;return e},Jd=function(e,t,r,s,l){void 0===r&&(r="_first"),void 0===s&&(s="_last");var g,u=e[s];if(l)for(g=t[l];u&&u[l]>g;)u=u._prev;return u?(t._next=u._next,u._next=t):(t._next=e[r],e[r]=t),t._next?t._next._prev=t:e[s]=t,t._prev=u,t.parent=t._dp=e,t},su=function(e,t,r,s){void 0===r&&(r="_first"),void 0===s&&(s="_last");var l=t._prev,u=t._next;l?l._next=u:e[r]===t&&(e[r]=u),u?u._prev=l:e[s]===t&&(e[s]=l),t._next=t._prev=t.parent=null},Fl=function(e,t){e.parent&&(!t||e.parent.autoRemoveChildren)&&e.parent.remove&&e.parent.remove(e),e._act=0},uc=function(e,t){if(e&&(!t||t._end>e._dur||t._start<0))for(var r=e;r;)r._dirty=1,r=r.parent;return e},nh=function(e,t,r,s){return e._startAt&&(er?e._startAt.revert(vf):e.vars.immediateRender&&!e.vars.autoRevert||e._startAt.render(t,!0,s))},bf=function f(e){return!e||e._ts&&f(e.parent)},Sf=function(e){return e._repeat?co(e._tTime,e=e.duration()+e._rDelay)*e:0},co=function(e,t){var r=Math.floor(e/=t);return e&&r===e?r-1:r},Jo=function(e,t){return(e-t._start)*t._ts+(t._ts>=0?0:t._dirty?t.totalDuration():t._tDur)},fc=function(e){return e._end=bs(e._start+(e._tDur/Math.abs(e._ts||e._rts||vi)||0))},ih=function(e,t){var r=e._dp;return r&&r.smoothChildTiming&&e._ts&&(e._start=bs(r._time-(e._ts>0?t/e._ts:((e._dirty?e.totalDuration():e._tDur)-t)/-e._ts)),fc(e),r._dirty||uc(r,e)),e},ep=function(e,t){var r;if((t._time||t._initted&&!t._dur)&&(r=Jo(e.rawTime(),t),(!t._dur||Mf(0,t.totalDuration(),r)-t._tTime>vi)&&t.render(r,!0)),uc(e,t)._dp&&e._initted&&e._time>=e._dur&&e._ts){if(e._dur<e.duration())for(r=e;r._dp;)r.rawTime()>=0&&r.totalTime(r._tTime),r=r._dp;e._zTime=-vi}},el=function(e,t,r,s){return t.parent&&Fl(t),t._start=bs((js(r)?r:r||e!==yr?Zr(e,r,t):e._time)+t._delay),t._end=bs(t._start+(t.totalDuration()/Math.abs(t.timeScale())||0)),Jd(e,t,"_first","_last",e._sort?"_start":0),xr(t)||(e._recent=t),s||ep(e,t),e._ts<0&&ih(e,e._tTime),e},bA=function(e,t){return(Ia.ScrollTrigger||Zo("scrollTrigger",t))&&Ia.ScrollTrigger.create(t,e)},SA=function(e,t,r,s,l){return ah(e,t,l),e._initted?!r&&e._pt&&!er&&(e._dur&&!1!==e.vars.lazy||!e._dur&&e.vars.lazy)&&yf!==Ws.frame?(Do.push(e),e._lazy=[l,s],1):void 0:1},dc=function f(e){var t=e.parent;return t&&t._ts&&t._initted&&!t._lock&&(t.rawTime()<0||f(t))},xr=function(e){var t=e.data;return"isFromStart"===t||"isStart"===t},qa=function(e,t,r,s){var l=e._repeat,u=bs(t)||0,g=e._tTime/e._tDur;return g&&!s&&(e._time*=u/e._dur),e._dur=u,e._tDur=l?l<0?1e10:bs(u*(l+1)+e._rDelay*l):u,g>0&&!s&&ih(e,e._tTime=e._tDur*g),e.parent&&fc(e),r||uc(e.parent,e),e},Wm=function(e){return e instanceof Aa?uc(e):qa(e,e._dur)},Mx={_start:0,endTime:Jh,totalDuration:Jh},Zr=function f(e,t,r){var g,_,x,s=e.labels,l=e._recent||Mx,u=e.duration()>=ur?l.endTime(!1):e._dur;return Jn(t)&&(isNaN(t)||t in s)?(_=t.charAt(0),x="%"===t.substr(-1),g=t.indexOf("="),"<"===_||">"===_?(g>=0&&(t=t.replace(/=/,"")),("<"===_?l._start:l.endTime(l._repeat>=0))+(parseFloat(t.substr(1))||0)*(x?(g<0?l:r).totalDuration()/100:1)):g<0?(t in s||(s[t]=u),s[t]):(_=parseFloat(t.charAt(g-1)+t.substr(g+1)),x&&r&&(_=_/100*(Js(r)?r[0]:r).totalDuration()),g>1?f(e,t.substr(0,g-1),r)+_:u+_)):null==t?u:+t},tl=function(e,t,r){var g,_,s=js(t[1]),l=(s?2:1)+(e<2?0:1),u=t[l];if(s&&(u.duration=t[1]),u.parent=r,e){for(g=u,_=r;_&&!("immediateRender"in g);)g=_.vars.defaults||{},_=Mi(_.vars.inherit)&&_.parent;u.immediateRender=Mi(g.immediateRender),e<2?u.runBackwards=1:u.startAt=t[l-1]}return new gs(t[0],u,t[l+1])},nl=function(e,t){return e||0===e?t(e):t},Mf=function(e,t,r){return r<e?e:r>t?t:r},Ss=function(e,t){return Jn(e)&&(t=Rl.exec(e))?t[1]:""},Xm=[].slice,CA=function(e,t){return e&&Wa(e)&&"length"in e&&(!t&&!e.length||e.length-1 in e&&Wa(e[0]))&&!e.nodeType&&e!==Xa},ho=function(e,t,r){return Yi&&!t&&Yi.selector?Yi.selector(e):!Jn(e)||r||!Wd&&lu()?Js(e)?function(e,t,r){return void 0===r&&(r=[]),e.forEach(function(s){var l;return Jn(s)&&!t||CA(s,1)?(l=r).push.apply(l,ho(s)):r.push(s)})||r}(e,r):CA(e)?Xm.call(e,0):e?[e]:[]:Xm.call((t||Bl).querySelectorAll(e),0)},qm=function(e){return e=ho(e)[0]||jo("Invalid scope")||{},function(t){var r=e.current||e.nativeElement||e;return ho(t,r.querySelectorAll?r:r===e?jo("Invalid scope")||Bl.createElement("div"):e)}},TA=function(e){return e.sort(function(){return.5-Math.random()})},IA=function(e){if(Wi(e))return e;var t=Wa(e)?e:{each:e},r=sh(t.ease),s=t.from||0,l=parseFloat(t.base)||0,u={},g=s>0&&s<1,_=isNaN(s)||g,x=t.axis,M=s,C=s;return Jn(s)?M=C={center:.5,edges:.5,end:1}[s]||0:!g&&_&&(M=s[0],C=s[1]),function(P,R,F){var L,V,z,W,ne,fe,ge,de,ie,O=(F||t).length,k=u[O];if(!k){if(!(ie="auto"===t.grid?0:(t.grid||[1,ur])[1])){for(ge=-ur;ge<(ge=F[ie++].getBoundingClientRect().left)&&ie<O;);ie--}for(k=u[O]=[],L=_?Math.min(ie,O)*M-.5:s%ie,V=ie===ur?0:_?O*C/ie-.5:s/ie|0,ge=0,de=ur,fe=0;fe<O;fe++)z=fe%ie-L,W=V-(fe/ie|0),k[fe]=ne=x?Math.abs("y"===x?W:z):at(z*z+W*W),ne>ge&&(ge=ne),ne<de&&(de=ne);"random"===s&&TA(k),k.max=ge-de,k.min=de,k.v=O=(parseFloat(t.amount)||parseFloat(t.each)*(ie>O?O-1:x?"y"===x?O/ie:ie:Math.max(ie,O/ie))||0)*("edges"===s?-1:1),k.b=O<0?l-O:l,k.u=Ss(t.amount||t.each)||0,r=r&&O<0?kA(r):r}return O=(k[P]-k.min)/k.max||0,bs(k.b+(r?r(O):O)*k.v)+k.u}},Ym=function(e){var t=Math.pow(10,((e+"").split(".")[1]||"").length);return function(r){var s=bs(Math.round(parseFloat(r)/e)*e*t);return(s-s%1)/t+(js(r)?0:Ss(r))}},PA=function(e,t){var s,l,r=Js(e);
vendor: 5,064 bytes, line 72
72return!r&&Wa(e)&&(s=r=e.radius||ur,e.values?(e=ho(e.values),(l=!js(e[0]))&&(s*=s)):e=Ym(e.increment)),nl(t,r?Wi(e)?function(u){return l=e(u),Math.abs(l-u)<=s?l:u}:function(u){for(var P,R,g=parseFloat(l?u.x:u),_=parseFloat(l?u.y:0),x=ur,M=0,C=e.length;C--;)(P=l?(P=e[C].x-g)*P+(R=e[C].y-_)*R:Math.abs(e[C]-g))<x&&(x=P,M=C);return M=!s||x<=s?e[M]:u,l||M===u||js(u)?M:M+Ss(u)}:Ym(e))},RA=function(e,t,r,s){return nl(Js(e)?!t:!0===r?!!(r=0):!s,function(){return Js(e)?e[~~(Math.random()*e.length)]:(r=r||1e-5)&&(s=r<1?Math.pow(10,(r+"").length-2):1)&&Math.floor(Math.round((e-r/2+Math.random()*(t-e+.99*r))/r)*r*s)/s})},au=function(e,t,r){return nl(r,function(s){return e[~~t(s)]})},wf=function(e){for(var s,l,u,g,t=0,r="";~(s=e.indexOf("random(",t));)u=e.indexOf(")",s),g="["===e.charAt(s+7),l=e.substr(s+7,u-s-7).match(g?Pl:Ko),r+=e.substr(t,s-t)+RA(g?l:+l[0],g?0:+l[1],+l[2]||1e-5),t=u+1;return r+e.substr(t,e.length-t)},LA=function(e,t,r,s,l){var u=t-e,g=s-r;return nl(l,function(_){return r+((_-e)/u*g||0)})},DA=function(e,t,r){var u,g,_,s=e.labels,l=ur;for(u in s)(g=s[u]-t)<0==!!r&&g&&l>(g=Math.abs(g))&&(_=u,l=g);return _},uo=function(e,t,r){var _,x,M,s=e.vars,l=s[t],u=Yi,g=e._ctx;if(l)return _=s[t+"Params"],x=s.callbackScope||e,r&&Do.length&&iu(),g&&(Yi=g),M=_?l.apply(x,_):l.call(x),Yi=u,M},Cf=function(e){return Fl(e),e.scrollTrigger&&e.scrollTrigger.kill(!!er),e.progress()<1&&uo(e,"onInterrupt"),e},tp=[],Tf=function(e){if(ma()&&e){var t=(e=!e.name&&e.default||e).name,r=Wi(e),s=t&&!r&&e.init?function(){this._props=[]}:e,l={init:Jh,render:fr,add:Di,kill:sp,modifier:Fo,rawVars:0},u={targetTest:0,get:0,getSetter:Ol,aliases:{},register:0};if(lu(),e!==s){if(ga[t])return;Pa(s,Pa(th(e,l),u)),Dl(s.prototype,Dl(l,th(e,u))),ga[s.prop=t]=s,e.targetTest&&(nu.push(s),eu[t]=1),t=("css"===t?"CSS":t.charAt(0).toUpperCase()+t.substr(1))+"Plugin"}Gm(t,s),e.register&&e.register(is,s,La)}else e&&tp.push(e)},Ki=255,ms={aqua:[0,Ki,Ki],lime:[0,Ki,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,Ki],navy:[0,0,128],white:[Ki,Ki,Ki],olive:[128,128,0],yellow:[Ki,Ki,0],orange:[Ki,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[Ki,0,0],pink:[Ki,192,203],cyan:[0,Ki,Ki],transparent:[Ki,Ki,Ki,0]},np=function(e,t,r){return(6*(e+=e<0?1:e>1?-1:0)<1?t+(r-t)*e*6:e<.5?r:3*e<2?t+(r-t)*(2/3-e)*6:t)*Ki+.5|0},pc=function(e,t,r){var l,u,g,_,x,M,C,P,R,F,s=e?js(e)?[e>>16,e>>8&Ki,e&Ki]:0:ms.black;if(!s){if(","===e.substr(-1)&&(e=e.substr(0,e.length-1)),ms[e])s=ms[e];else if("#"===e.charAt(0)){if(e.length<6&&(l=e.charAt(1),u=e.charAt(2),g=e.charAt(3),e="#"+l+l+u+u+g+g+(5===e.length?e.charAt(4)+e.charAt(4):"")),9===e.length)return[(s=parseInt(e.substr(1,6),16))>>16,s>>8&Ki,s&Ki,parseInt(e.substr(7),16)/255];s=[(e=parseInt(e.substr(1),16))>>16,e>>8&Ki,e&Ki]}else if("hsl"===e.substr(0,3))if(s=F=e.match(Ko),t){if(~e.indexOf("="))return s=e.match(Om),r&&s.length<4&&(s[3]=1),s}else _=+s[0]%360/360,x=+s[1]/100,l=2*(M=+s[2]/100)-(u=M<=.5?M*(x+1):M+x-M*x),s.length>3&&(s[3]*=1),s[0]=np(_+1/3,l,u),s[1]=np(_,l,u),s[2]=np(_-1/3,l,u);else s=e.match(Ko)||ms.transparent;s=s.map(Number)}return t&&!F&&(l=s[0]/Ki,u=s[1]/Ki,g=s[2]/Ki,M=((C=Math.max(l,u,g))+(P=Math.min(l,u,g)))/2,C===P?_=x=0:(R=C-P,x=M>.5?R/(2-C-P):R/(C+P),_=C===l?(u-g)/R+(u<g?6:0):C===u?(g-l)/R+2:(l-u)/R+4,_*=60),s[0]=~~(_+.5),s[1]=~~(100*x+.5),s[2]=~~(100*M+.5)),r&&s.length<4&&(s[3]=1),s},rh=function(e){var t=[],r=[],s=-1;return e.split(gr).forEach(function(l){var u=l.match(eh)||[];t.push.apply(t,u),r.push(s+=u.length+1)}),t.c=r,t},Ra=function(e,t,r){var _,x,M,C,s="",l=(e+s).match(gr),u=t?"hsla(":"rgba(",g=0;if(!l)return e;if(l=l.map(function(P){return(P=pc(P,t,1))&&u+(t?P[0]+","+P[1]+"%,"+P[2]+"%,"+P[3]:P.join(","))+")"}),r&&(M=rh(e),(_=r.c).join(s)!==M.c.join(s)))for(C=(x=e.replace(gr,"1").split(eh)).length-1;g<C;g++)s+=x[g]+(~_.indexOf(g)?l.shift()||u+"0,0,0,0)":(M.length?M:l.length?l:r).shift());if(!x)for(C=(x=e.split(gr)).length-1;g<C;g++)s+=x[g]+l[g];return s+x[C]},gr=function(){var e,f="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3,4}){1,2}\\b";for(e in ms)f+="|"+e+"\\b";return new RegExp(f+")","gi")}(),$m=/hsl[a]?\(/,FA=function(e){var r,t=e.join(" ");if(gr.lastIndex=0,gr.test(t))return r=$m.test(t),e[1]=Ra(e[1],r),e[0]=Ra(e[0],r,rh(e[1])),!0},Ws=(f=Date.now,e=500,t=33,r=f(),s=r,u=l=1e3/240,F=function O(k){var z,W,ne,fe,L=f()-s,V=!0===k;if(L>e&&(r+=L-t),((z=(ne=(s+=L)-r)-u)>0||V)&&(fe=++C.frame,P=ne-1e3*C.time,C.time=ne/=1e3,u+=z+(z>=l?4:l-z),W=1),V||(_=x(O)),W)for(R=0;R<g.length;R++)g[R](ne,P,fe,k)},C={time:0,frame:0,tick:function(){F(!0)},deltaRatio:function(k){return P/(1e3/(k||60))},wake:function(){Um&&(!Wd&&ma()&&(Xa=Wd=window,Bl=Xa.document||{},Ia.gsap=is,(Xa.gsapVersions||(Xa.gsapVersions=[])).push(is.version),zm(ea||Xa.GreenSockGlobals||!Xa.gsap&&Xa||{}),M=Xa.requestAnimationFrame,tp.forEach(Tf)),_&&C.sleep(),x=M||function(k){return setTimeout(k,u-1e3*C.time+1|0)},If=1,F(2))},sleep:function(){(M?Xa.cancelAnimationFrame:clearTimeout)(_),If=0,x=Jh},lagSmoothing:function(k,L){e=k||1/0,t=Math.min(L||33,e)}
vendor: 7,909 bytes, line 72
72,fps:function(k){u=1e3*C.time+(l=1e3/(k||240))},add:function(k,L,V){var z=L?function(W,ne,fe,ge){k(W,ne,fe,ge),C.remove(z)}:k;return C.remove(k),g[V?"unshift":"push"](z),lu(),z},remove:function(k,L){~(L=g.indexOf(k))&&g.splice(L,1)&&R>=L&&R--},_listeners:g=[]}),lu=function(){return!If&&Ws.wake()},Zi={},Lx=/^[\d.\-M][\d.\-,\s]/,Dx=/["']/g,Fx=function(e){for(var g,_,x,t={},r=e.substr(1,e.length-3).split(":"),s=r[0],l=1,u=r.length;l<u;l++)_=r[l],g=l!==u-1?_.lastIndexOf(","):_.length,x=_.substr(0,g),t[s]=isNaN(x)?x.replace(Dx,"").trim():+x,s=_.substr(g+1).trim();return t},kA=function(e){return function(t){return 1-e(1-t)}},OA=function f(e,t){for(var s,r=e._first;r;)r instanceof Aa?f(r,t):r.vars.yoyoEase&&(!r._yoyo||!r._repeat)&&r._yoyo!==t&&(r.timeline?f(r.timeline,t):(s=r._ease,r._ease=r._yEase,r._yEase=s,r._yoyo=t)),r=r._next},sh=function(e,t){return e&&(Wi(e)?e:Zi[e]||function(e){var t=(e+"").split("("),r=Zi[t[0]];return r&&t.length>1&&r.config?r.config.apply(null,~e.indexOf("{")?[Fx(t[1])]:function(e){var t=e.indexOf("(")+1,r=e.indexOf(")"),s=e.indexOf("(",t);return e.substring(t,~s&&s<r?e.indexOf(")",r+1):r)}(e).split(",").map(Kd)):Zi._CE&&Lx.test(e)?Zi._CE("",e):r}(e))||t},kl=function(e,t,r,s){void 0===r&&(r=function(_){return 1-t(1-_)}),void 0===s&&(s=function(_){return _<.5?t(2*_)/2:1-t(2*(1-_))/2});var u,l={easeIn:t,easeOut:r,easeInOut:s};return ta(e,function(g){for(var _ in Zi[g]=Ia[g]=l,Zi[u=g.toLowerCase()]=r,l)Zi[u+("easeIn"===_?".in":"easeOut"===_?".out":".inOut")]=Zi[g+"."+_]=l[_]}),l},Km=function(e){return function(t){return t<.5?(1-e(1-2*t))/2:.5+e(2*(t-.5))/2}},ip=function f(e,t,r){var s=t>=1?t:1,l=(r||(e?.3:.45))/(t<1?t:1),u=l/Bs*(Math.asin(1/s)||0),g=function(M){return 1===M?1:s*Math.pow(2,-10*M)*Nr((M-u)*l)+1},_="out"===e?g:"in"===e?function(x){return 1-g(1-x)}:Km(g);return l=Bs/l,_.config=function(x,M){return f(e,x,M)},_},Zm=function f(e,t){void 0===t&&(t=1.70158);var r=function(u){return u?--u*u*((t+1)*u+t)+1:0},s="out"===e?r:"in"===e?function(l){return 1-r(1-l)}:Km(r);return s.config=function(l){return f(e,l)},s};ta("Linear,Quad,Cubic,Quart,Quint,Strong",function(f,e){var t=e<5?e+1:e;kl(f+",Power"+(t-1),e?function(r){return Math.pow(r,t)}:function(r){return r},function(r){return 1-Math.pow(1-r,t)},function(r){return r<.5?Math.pow(2*r,t)/2:1-Math.pow(2*(1-r),t)/2})}),Zi.Linear.easeNone=Zi.none=Zi.Linear.easeIn,kl("Elastic",ip("in"),ip("out"),ip()),function(f,e){var t=1/e,r=2*t,s=2.5*t,l=function(g){return g<t?f*g*g:g<r?f*Math.pow(g-1.5/e,2)+.75:g<s?f*(g-=2.25/e)*g+.9375:f*Math.pow(g-2.625/e,2)+.984375};kl("Bounce",function(u){return 1-l(1-u)},l)}(7.5625,2.75),kl("Expo",function(f){return f?Math.pow(2,10*(f-1)):0}),kl("Circ",function(f){return-(at(1-f*f)-1)}),kl("Sine",function(f){return 1===f?1:1-Pn(f*ps)}),kl("Back",Zm("in"),Zm("out"),Zm()),Zi.SteppedEase=Zi.steps=Ia.SteppedEase={config:function(e,t){void 0===e&&(e=1);var r=1/e,s=e+(t?0:1),l=t?1:0,u=1-vi;return function(g){return((s*Mf(0,u,g)|0)+l)*r}}},ds.ease=Zi["quad.out"],ta("onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt",function(f){return qd+=f+","+f+"Params,"});var Ba=function(e,t){this.id=Ls++,e._gsap=this,this.target=e,this.harness=t,this.get=t?t.get:Yd,this.set=t?t.getSetter:Ol},wi=function(){function f(t){this.vars=t,this._delay=+t.delay||0,(this._repeat=t.repeat===1/0?-2:t.repeat||0)&&(this._rDelay=t.repeatDelay||0,this._yoyo=!!t.yoyo||!!t.yoyoEase),this._ts=1,qa(this,+t.duration,1,1),this.data=t.data,Yi&&(this._ctx=Yi,Yi.data.push(this)),If||Ws.wake()}var e=f.prototype;return e.delay=function(r){return r||0===r?(this.parent&&this.parent.smoothChildTiming&&this.startTime(this._start+r-this._delay),this._delay=r,this):this._delay},e.duration=function(r){return arguments.length?this.totalDuration(this._repeat>0?r+(r+this._rDelay)*this._repeat:r):this.totalDuration()&&this._dur},e.totalDuration=function(r){return arguments.length?(this._dirty=0,qa(this,this._repeat<0?r:(r-this._repeat*this._rDelay)/(this._repeat+1))):this._tDur},e.totalTime=function(r,s){if(lu(),!arguments.length)return this._tTime;var l=this._dp;if(l&&l.smoothChildTiming&&this._ts){for(ih(this,r),!l._dp||l.parent||ep(l,this);l&&l.parent;)l.parent._time!==l._start+(l._ts>=0?l._tTime/l._ts:(l.totalDuration()-l._tTime)/-l._ts)&&l.totalTime(l._tTime,!0),l=l.parent;!this.parent&&this._dp.autoRemoveChildren&&(this._ts>0&&r<this._tDur||this._ts<0&&r>0||!this._tDur&&!r)&&el(this._dp,this,this._start-this._delay)}return(this._tTime!==r||!this._dur&&!s||this._initted&&Math.abs(this._zTime)===vi||!r&&!this._initted&&(this.add||this._ptLookup))&&(this._ts||(this._pTime=r),$d(this,r,s)),this},e.time=function(r,s){return arguments.length?this.totalTime(Math.min(this.totalDuration(),r+Sf(this))%(this._dur+this._rDelay)||(r?this._dur:0),s):this._time},e.totalProgress=function(r,s){return arguments.length?this.totalTime(this.totalDuration()*r,s):this.totalDuration()?Math.min(1,this._tTime/this._tDur):this.ratio},e.progress=function(r,s){return arguments.length?this.totalTime(this.duration()*(!this._yoyo||1&this.iteration()?r:1-r)+Sf(this),s):this.duration()?Math.min(1,this._time/this._dur):this.ratio},e.iteration=function(r,s){var l=this.duration()+this._rDelay;return arguments.length?this.totalTime(this._time+(r-1)*l,s):this._repeat?co(this._tTime,l)+1:1},e.timeScale=function(r){if(!arguments.length)return this._rts===-vi?0:this._rts;if(this._rts===r)return this;var s=this.parent&&this._ts?Jo(this.parent._time,this):this._tTime;return this._rts=+r||0,this._ts=this._ps||r===-vi?0:this._rts,this.totalTime(Mf(-Math.abs(this._delay),this._tDur,s),!0),fc(this),function(e){for(var t=e.parent;t&&t.parent;)t._dirty=1,t.totalDuration(),t=t.parent;return e}(this)},e.paused=function(r){return arguments.length?(this._ps!==r&&(this._ps=r,r?(this._pTime=this._tTime||Math.max(-this._delay,this.rawTime()),this._ts=this._act=0):(lu(),this._ts=this._rts,this.totalTime(this.parent&&!this.parent.smoothChildTiming?this.rawTime():this._tTime||this._pTime,1===this.progress()&&Math.abs(this._zTime)!==vi&&(this._tTime-=vi)))),this):this._ps},e.startTime=function(r){if(arguments.length){this._start=r;var s=this.parent||this._dp;return s&&(s._sort||!this.parent)&&el(s,this,r-this._delay),this}return this._start},e.endTime=function(r){return this._start+(Mi(r)?this.totalDuration():this.duration())/Math.abs(this._ts||1)},e.rawTime=function(r){var s=this.parent||this._dp;return s?r&&(!this._ts||this._repeat&&this._time&&this.totalProgress()<1)?this._tTime%(this._dur+this._rDelay):this._ts?Jo(s.rawTime(r),this):this._tTime:this._tTime},e.revert=function(r){void 0===r&&(r=xA);var s=er;return er=r,(this._initted||this._startAt)&&(this.timeline&&this.timeline.revert(r),this.totalTime(-.01,r.suppressEvents)),"nested"!==this.data&&!1!==r.kill&&this.kill(),er=s,this},e.globalTime=function(r){for(var s=this,l=arguments.length?r:s.rawTime();s;)l=s._start+l/(s._ts||1),s=s._dp;return!this.parent&&this._sat?this._sat.vars.immediateRender?-1:this._sat.globalTime(r):l},e.repeat=function(r){return arguments.length?(this._repeat=r===1/0?-2:r,Wm(this)):-2===this._repeat?1/0:this._repeat},e.repeatDelay=function(r){if(arguments.length){var s=this._time;return this._rDelay=r,Wm(this),s?this.time(s):this}return this._rDelay},e.yoyo=function(r){return arguments.length?(this._yoyo=r,this):this._yoyo},e.seek=function(r,s){return this.totalTime(Zr(this,r),Mi(s))},e.restart=function(r,s){return this.play().totalTime(r?-this._delay:0,Mi(s))},e.play=function(r,s){return null!=r&&this.seek(r,s),this.reversed(!1).paused(!1)},e.reverse=function(r,s){return null!=r&&this.seek(r||this.totalDuration(),s),this.reversed(!0).paused(!1)},e.pause=function(r,s){return null!=r&&this.seek(r,s),this.paused(!0)},e.resume=function(){return this.paused(!1)},e.reversed=function(r){return arguments.length?(!!r!==this.reversed()&&this.timeScale(-this._rts||(r?-vi:0)),this):this._rts<0}
vendor: 4,654 bytes, line 72
72,e.invalidate=function(){return this._initted=this._act=0,this._zTime=-vi,this},e.isActive=function(){var l,r=this.parent||this._dp,s=this._start;return!(r&&!(this._ts&&this._initted&&r.isActive()&&(l=r.rawTime(!0))>=s&&l<this.endTime(!0)-vi))},e.eventCallback=function(r,s,l){var u=this.vars;return arguments.length>1?(s?(u[r]=s,l&&(u[r+"Params"]=l),"onUpdate"===r&&(this._onUpdate=s)):delete u[r],this):u[r]},e.then=function(r){var s=this;return new Promise(function(l){var u=Wi(r)?r:Zd,g=function(){var x=s.then;s.then=null,Wi(u)&&(u=u(s))&&(u.then||u===s)&&(s.then=x),l(u),s.then=x};s._initted&&1===s.totalProgress()&&s._ts>=0||!s._tTime&&s._ts<0?g():s._prom=g})},e.kill=function(){Cf(this)},f}();Pa(wi.prototype,{_time:0,_start:0,_end:0,_tTime:0,_tDur:0,_dirty:0,_repeat:0,_yoyo:!1,parent:null,_initted:!1,_rDelay:0,_ts:1,_dp:0,ratio:0,_zTime:-vi,_prom:0,_ps:!1,_rts:1});var Aa=function(f){function e(r,s){var l;return void 0===r&&(r={}),(l=f.call(this,r)||this).labels={},l.smoothChildTiming=!!r.smoothChildTiming,l.autoRemoveChildren=!!r.autoRemoveChildren,l._sort=Mi(r.sortChildren),yr&&el(r.parent||yr,rr(l),s),r.reversed&&l.reverse(),r.paused&&l.paused(!0),r.scrollTrigger&&bA(rr(l),r.scrollTrigger),l}pa(e,f);var t=e.prototype;return t.to=function(s,l,u){return tl(0,arguments,this),this},t.from=function(s,l,u){return tl(1,arguments,this),this},t.fromTo=function(s,l,u,g){return tl(2,arguments,this),this},t.set=function(s,l,u){return l.duration=0,l.parent=this,ru(l).repeatDelay||(l.repeat=0),l.immediateRender=!!l.immediateRender,new gs(s,l,Zr(this,u),1),this},t.call=function(s,l,u){return el(this,gs.delayedCall(0,s,l),u)},t.staggerTo=function(s,l,u,g,_,x,M){return u.duration=l,u.stagger=u.stagger||g,u.onComplete=x,u.onCompleteParams=M,u.parent=this,new gs(s,u,Zr(this,_)),this},t.staggerFrom=function(s,l,u,g,_,x,M){return u.runBackwards=1,ru(u).immediateRender=Mi(u.immediateRender),this.staggerTo(s,l,u,g,_,x,M)},t.staggerFromTo=function(s,l,u,g,_,x,M,C){return g.startAt=u,ru(g).immediateRender=Mi(g.immediateRender),this.staggerTo(s,l,g,_,x,M,C)},t.render=function(s,l,u){var P,R,F,O,k,L,V,z,W,ne,fe,ge,g=this._time,_=this._dirty?this.totalDuration():this._tDur,x=this._dur,M=s<=0?0:bs(s),C=this._zTime<0!=s<0&&(this._initted||!x);if(this!==yr&&M>_&&s>=0&&(M=_),M!==this._tTime||u||C){if(g!==this._time&&x&&(M+=this._time-g,s+=this._time-g),P=M,W=this._start,L=!(z=this._ts),C&&(x||(g=this._zTime),(s||!l)&&(this._zTime=s)),this._repeat){if(fe=this._yoyo,k=x+this._rDelay,this._repeat<-1&&s<0)return this.totalTime(100*k+s,l,u);if(P=bs(M%k),M===_?(O=this._repeat,P=x):((O=~~(M/k))&&O===M/k&&(P=x,O--),P>x&&(P=x)),ne=co(this._tTime,k),!g&&this._tTime&&ne!==O&&this._tTime-ne*k-this._dur<=0&&(ne=O),fe&&1&O&&(P=x-P,ge=1),O!==ne&&!this._lock){var de=fe&&1&ne,ie=de===(fe&&1&O);if(O<ne&&(de=!de),g=de?0:x,this._lock=1,this.render(g||(ge?0:bs(O*k)),l,!x)._lock=0,this._tTime=M,!l&&this.parent&&uo(this,"onRepeat"),this.vars.repeatRefresh&&!ge&&(this.invalidate()._lock=1),g&&g!==this._time||L!==!this._ts||this.vars.onRepeat&&!this.parent&&!this._act)return this;if(x=this._dur,_=this._tDur,ie&&(this._lock=2,this.render(g=de?x:-1e-4,!0),this.vars.repeatRefresh&&!ge&&this.invalidate()),this._lock=0,!this._ts&&!L)return this;OA(this,ge)}}if(this._hasPause&&!this._forcing&&this._lock<2&&(V=function(e,t,r){var s;if(r>t)for(s=e._first;s&&s._start<=r;){if("isPause"===s.data&&s._start>t)return s;s=s._next}else for(s=e._last;s&&s._start>=r;){if("isPause"===s.data&&s._start<t)return s;s=s._prev}}(this,bs(g),bs(P)),V&&(M-=P-(P=V._start))),this._tTime=M,this._time=P,this._act=!z,this._initted||(this._onUpdate=this.vars.onUpdate,this._initted=1,this._zTime=s,g=0),!g&&P&&!l&&!O&&(uo(this,"onStart"),this._tTime!==M))return this;if(P>=g&&s>=0)for(R=this._first;R;){if(F=R._next,(R._act||P>=R._start)&&R._ts&&V!==R){if(R.parent!==this)return this.render(s,l,u);if(R.render(R._ts>0?(P-R._start)*R._ts:(R._dirty?R.totalDuration():R._tDur)+(P-R._start)*R._ts,l,u),P!==this._time||!this._ts&&!L){V=0,F&&(M+=this._zTime=-vi);break}}R=F}else{R=this._last;for(var ye=s<0?s:P;R;){if(F=R._prev,(R._act||ye<=R._end)&&R._ts&&V!==R){if(R.parent!==this)return this.render(s,l,u);if(R.render(R._ts>0?(ye-R._start)*R._ts:(R._dirty?R.totalDuration():R._tDur)+(ye-R._start)*R._ts,l,u||er&&(R._initted||R._startAt)),P!==this._time||!this._ts&&!L){V=0,F&&(M+=this._zTime=ye?-vi:vi);break}}R=F}}if(V&&!l&&(this.pause(),V.render(P>=g?0:-vi)._zTime=P>=g?1:-1,this._ts))return this._start=W,fc(this),this.render(s,l,u);this._onUpdate&&!l&&uo(this,"onUpdate",!0),(M===_&&this._tTime>=this.totalDuration()||!M&&g)&&(W===this._start||Math.abs(z)!==Math.abs(this._ts
vendor: 9,505 bytes, line 72
72))&&(this._lock||((s||!x)&&(M===_&&this._ts>0||!M&&this._ts<0)&&Fl(this,1),!l&&(!(s<0)||g)&&(M||g||!_)&&(uo(this,M===_&&s>=0?"onComplete":"onReverseComplete",!0),this._prom&&!(M<_&&this.timeScale()>0)&&this._prom())))}return this},t.add=function(s,l){var u=this;if(js(l)||(l=Zr(this,l,s)),!(s instanceof wi)){if(Js(s))return s.forEach(function(g){return u.add(g,l)}),this;if(Jn(s))return this.addLabel(s,l);if(!Wi(s))return this;s=gs.delayedCall(0,s)}return this!==s?el(this,s,l):this},t.getChildren=function(s,l,u,g){void 0===s&&(s=!0),void 0===l&&(l=!0),void 0===u&&(u=!0),void 0===g&&(g=-ur);for(var _=[],x=this._first;x;)x._start>=g&&(x instanceof gs?l&&_.push(x):(u&&_.push(x),s&&_.push.apply(_,x.getChildren(!0,l,u)))),x=x._next;return _},t.getById=function(s){for(var l=this.getChildren(1,1,1),u=l.length;u--;)if(l[u].vars.id===s)return l[u]},t.remove=function(s){return Jn(s)?this.removeLabel(s):Wi(s)?this.killTweensOf(s):(su(this,s),s===this._recent&&(this._recent=this._last),uc(this))},t.totalTime=function(s,l){return arguments.length?(this._forcing=1,!this._dp&&this._ts&&(this._start=bs(Ws.time-(this._ts>0?s/this._ts:(this.totalDuration()-s)/-this._ts))),f.prototype.totalTime.call(this,s,l),this._forcing=0,this):this._tTime},t.addLabel=function(s,l){return this.labels[s]=Zr(this,l),this},t.removeLabel=function(s){return delete this.labels[s],this},t.addPause=function(s,l,u){var g=gs.delayedCall(0,l||Jh,u);return g.data="isPause",this._hasPause=1,el(this,g,Zr(this,s))},t.removePause=function(s){var l=this._first;for(s=Zr(this,s);l;)l._start===s&&"isPause"===l.data&&Fl(l),l=l._next},t.killTweensOf=function(s,l,u){for(var g=this.getTweensOf(s,u),_=g.length;_--;)mc!==g[_]&&g[_].kill(s,l);return this},t.getTweensOf=function(s,l){for(var M,u=[],g=ho(s),_=this._first,x=js(l);_;)_ instanceof gs?Vm(_._targets,g)&&(x?(!mc||_._initted&&_._ts)&&_.globalTime(0)<=l&&_.globalTime(_.totalDuration())>l:!l||_.isActive())&&u.push(_):(M=_.getTweensOf(g,l)).length&&u.push.apply(u,M),_=_._next;return u},t.tweenTo=function(s,l){l=l||{};var R,u=this,g=Zr(u,s),x=l.startAt,M=l.onStart,C=l.onStartParams,P=l.immediateRender,F=gs.to(u,Pa({ease:l.ease||"none",lazy:!1,immediateRender:!1,time:g,overwrite:"auto",duration:l.duration||Math.abs((g-(x&&"time"in x?x.time:u._time))/u.timeScale())||vi,onStart:function(){if(u.pause(),!R){var k=l.duration||Math.abs((g-(x&&"time"in x?x.time:u._time))/u.timeScale());F._dur!==k&&qa(F,k,0,1).render(F._time,!0,!0),R=1}M&&M.apply(F,C||[])}},l));return P?F.render(0):F},t.tweenFromTo=function(s,l,u){return this.tweenTo(l,Pa({startAt:{time:Zr(this,s)}},u))},t.recent=function(){return this._recent},t.nextLabel=function(s){return void 0===s&&(s=this._time),DA(this,Zr(this,s))},t.previousLabel=function(s){return void 0===s&&(s=this._time),DA(this,Zr(this,s),1)},t.currentLabel=function(s){return arguments.length?this.seek(s,!0):this.previousLabel(this._time+vi)},t.shiftChildren=function(s,l,u){void 0===u&&(u=0);for(var x,g=this._first,_=this.labels;g;)g._start>=u&&(g._start+=s,g._end+=s),g=g._next;if(l)for(x in _)_[x]>=u&&(_[x]+=s);return uc(this)},t.invalidate=function(s){var l=this._first;for(this._lock=0;l;)l.invalidate(s),l=l._next;return f.prototype.invalidate.call(this,s)},t.clear=function(s){void 0===s&&(s=!0);for(var u,l=this._first;l;)u=l._next,this.remove(l),l=u;return this._dp&&(this._time=this._tTime=this._pTime=0),s&&(this.labels={}),uc(this)},t.totalDuration=function(s){var x,M,C,l=0,u=this,g=u._last,_=ur;if(arguments.length)return u.timeScale((u._repeat<0?u.duration():u.totalDuration())/(u.reversed()?-s:s));if(u._dirty){for(C=u.parent;g;)x=g._prev,g._dirty&&g.totalDuration(),(M=g._start)>_&&u._sort&&g._ts&&!u._lock?(u._lock=1,el(u,g,M-g._delay,1)._lock=0):_=M,M<0&&g._ts&&(l-=M,(!C&&!u._dp||C&&C.smoothChildTiming)&&(u._start+=M/u._ts,u._time-=M,u._tTime-=M),u.shiftChildren(-M,!1,-1/0),_=0),g._end>l&&g._ts&&(l=g._end),g=x;qa(u,u===yr&&u._time>l?u._time:l,1,1),u._dirty=0}return u._tDur},e.updateRoot=function(s){if(yr._ts&&($d(yr,Jo(s,yr)),yf=Ws.frame),Ws.frame>=Xd){Xd+=wr.autoSleep||120;var l=yr._first;if((!l||!l._ts)&&wr.autoSleep&&Ws._listeners.length<2){for(;l&&!l._ts;)l=l._next;l||Ws.sleep()}}},e}(wi);Pa(Aa.prototype,{_lock:0,_hasPause:0,_forcing:0});var mc,gc,qt=function(e,t,r,s,l,u,g){var C,P,R,F,O,k,L,V,_=new La(this._pt,e,t,0,1,va,null,l),x=0,M=0;for(_.b=r,_.e=s,r+="",(L=~(s+="").indexOf("random("))&&(s=wf(s)),u&&(u(V=[r,s],e,t),r=V[0],s=V[1]),P=r.match(_f)||[];C=_f.exec(s);)F=C[0],O=s.substring(x,C.index),R?R=(R+1)%5:"rgba("===O.substr(-5)&&(R=1),F!==P[M++]&&(k=parseFloat(P[M-1])||0,_._pt={_next:_._pt,p:O||1===M?O:",",s:k,c:"="===F.charAt(1)?hc(k,F)-k:parseFloat(F)-k,m:R&&R<4?Math.round:0},x=_f.lastIndex);return _.c=x<s.length?s.substring(x,s.length):"",_.fp=g,(Nm.test(s)||L)&&(_.e=0),this._pt=_,_},Di=function(e,t,r,s,l,u,g,_,x,M){Wi(s)&&(s=s(l||0,e,u));var F,C=e[t],P="get"!==r?r:Wi(C)?x?e[t.indexOf("set")||!Wi(e["get"+t.substr(3)])?t:"get"+t.substr(3)](x):e[t]():C,R=Wi(C)?x?hu:_a:tg;if(Jn(s)&&(~s.indexOf("random(")&&(s=wf(s)),"="===s.charAt(1)&&((F=hc(P,s)+(Ss(P)||0))||0===F)&&(s=F)),!M||P!==s||gc)return isNaN(P*s)||""===s?(!C&&!(t in e)&&Zo(t,s),qt.call(this,e,t,P,s,R,_||wr.stringFilter,x)):(F=new La(this._pt,e,t,+P||0,s-(P||0),"boolean"==typeof C?Ux:rp,0,R),x&&(F.fp=x),g&&F.modifier(g,this,e),this._pt=F)},Jm=function(e,t,r,s,l,u){var g,_,x,M;if(ga[e]&&!1!==(g=new ga[e]).init(l,g.rawVars?t[e]:function(e,t,r,s,l){if(Wi(e)&&(e=Pf(e,l,t,r,s)),!Wa(e)||e.style&&e.nodeType||Js(e)||Il(e))return Jn(e)?Pf(e,l,t,r,s):e;var g,u={};for(g in e)u[g]=Pf(e[g],l,t,r,s);return u}(t[e],s,l,u,r),r,s,u)&&(r._pt=_=new La(r._pt,l,e,0,1,g.render,g,0,g.priority),r!==ou))for(x=r._ptLookup[r._targets.indexOf(l)],M=g._props.length;M--;)x[g._props[M]]=_;return g},ah=function f(e,t,r){var ge,de,ie,ye,He,qe,Ge,Ve,We,nt,et,tt,gt,s=e.vars,l=s.ease,u=s.startAt,g=s.immediateRender,_=s.lazy,x=s.onUpdate,M=s.onUpdateParams,C=s.callbackScope,P=s.runBackwards,R=s.yoyoEase,F=s.keyframes,O=s.autoRevert,k=e._dur,L=e._startAt,V=e._targets,z=e.parent,W=z&&"nested"===z.data?z.vars.targets:V,ne="auto"===e._overwrite&&!Rs,fe=e.timeline;if(fe&&(!F||!l)&&(l="none"),e._ease=sh(l,ds.ease),e._yEase=R?kA(sh(!0===R?l:R,ds.ease)):0,R&&e._yoyo&&!e._repeat&&(R=e._yEase,e._yEase=e._ease,e._ease=R),e._from=!fe&&!!s.runBackwards,!fe||F&&!s.stagger){if(tt=(Ve=V[0]?Ll(V[0]).harness:0)&&s[Ve.prop],ge=th(s,eu),L&&(L._zTime<0&&L.progress(1),t<0&&P&&g&&!O?L.render(-1,!0):L.revert(P&&k?vf:yA),L._lazy=0),u){if(Fl(e._startAt=gs.set(V,Pa({data:"isStart",overwrite:!1,parent:z,immediateRender:!0,lazy:!L&&Mi(_),startAt:null,delay:0,onUpdate:x,onUpdateParams:M,callbackScope:C,stagger:0},u))),e._startAt._dp=0,e._startAt._sat=e,t<0&&(er||!g&&!O)&&e._startAt.revert(vf),g&&k&&t<=0&&r<=0)return void(t&&(e._zTime=t))}else if(P&&k&&!L)if(t&&(g=!1),ie=Pa({overwrite:!1,data:"isFromStart",lazy:g&&!L&&Mi(_),immediateRender:g,stagger:0,parent:z},ge),tt&&(ie[Ve.prop]=tt),Fl(e._startAt=gs.set(V,ie)),e._startAt._dp=0,e._startAt._sat=e,t<0&&(er?e._startAt.revert(vf):e._startAt.render(-1,!0)),e._zTime=t,g){if(!t)return}else f(e._startAt,vi,vi);for(e._pt=e._ptCache=0,_=k&&Mi(_)||_&&!k,de=0;de<V.length;de++){if(Ge=(He=V[de])._gsap||Ef(V)[de]._gsap,e._ptLookup[de]=nt={},tu[Ge.id]&&Do.length&&iu(),et=W===V?de:W.indexOf(He),Ve&&!1!==(We=new Ve).init(He,tt||ge,e,et,W)&&(e._pt=ye=new La(e._pt,He,We.name,0,1,We.render,We,0,We.priority),We._props.forEach(function(bt){nt[bt]=ye}),We.priority&&(qe=1)),!Ve||tt)for(ie in ge)ga[ie]&&(We=Jm(ie,ge,e,et,He,W))?We.priority&&(qe=1):nt[ie]=ye=Di.call(e,He,ie,"get",ge[ie],et,W,0,s.stringFilter);e._op&&e._op[de]&&e.kill(He,e._op[de]),ne&&e._pt&&(mc=e,yr.killTweensOf(He,nt,e.globalTime(t)),gt=!e.parent,mc=0),e._pt&&_&&(tu[Ge.id]=1)}qe&&ap(e),e._onInit&&e._onInit(e)}e._onUpdate=x,e._initted=(!e._op||e._pt)&&!gt,F&&t<=0&&fe.render(ur,!0,!0)},Nx=function(e,t,r,s){var u,g,l=t.ease||s||"power1.inOut";if(Js(t))g=r[e]||(r[e]=[]),t.forEach(function(_,x){return g.push({t:x/(t.length-1)*100,v:_,e:l})});else for(u in t)g=r[u]||(r[u]=[]),"ease"===u||g.push({t:parseFloat(e),v:t[u],e:l})},Pf=function(e,t,r,s,l){return Wi(e)?e.call(t,r,s,l):Jn(e)&&~e.indexOf("random(")?wf(e):e},NA=qd+"repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,autoRevert",UA={};ta(NA+",id,stagger,delay,duration,paused,scrollTrigger",function(f){return UA[f]=1});var gs=function(f){function e(r,s,l,u){var g;"number"==typeof s&&(l.duration=s,s=l,l=null);var W,ne,fe,ge,de,ie,ye,He,_=(g=f.call(this,u?s:ru(s))||this).vars,x=_.duration,M=_.delay,C=_.immediateRender,P=_.stagger,R=_.overwrite,F=_.keyframes,O=_.defaults,k=_.scrollTrigger,L=_.yoyoEase,V=s.parent||yr,z=(Js(r)||Il(r)?js(r[0]):"length"in s)?[r]:ho(r);if(g._targets=z.length?Ef(z):jo("GSAP target "+r+" not found. https://greensock.com",!wr.nullTargetWarn)||[],g._ptLookup=[],g._overwrite=R,F||P||Qd(x)||Qd(M)){if(s=g.vars,(W=g.timeline=new Aa({data:"nested",defaults:O||{},targets:V&&"nested"===V.data?V.vars.targets:z})).kill(),W.parent=W._dp=rr(g),W._start=0,P||Qd(x)||Qd(M)){if(ge=z.length,ye=P&&IA(P),Wa(P))for(de in P)~NA.indexOf(de)&&(He||(He={}),He[de]=P[de]);for(ne=0;ne<ge;ne++)(fe=th(s,UA)).stagger=0,L&&(fe.yoyoEase=L),He&&Dl(fe,He),ie=z[ne],fe.duration=+Pf(x,rr(g),ne,ie,z),fe.delay=(+Pf(M,rr(g),ne,ie,z)||0)-g._delay,!P&&1===ge&&fe.delay&&(g._delay=M=fe.delay,g._start+=M,fe.delay=0),W.to(ie,fe,ye?ye(ne,ie,z):0),W._ease=Zi.none;W.duration()?x=M=0:g.timeline=0}else if(F){ru(Pa(W.vars.defaults,{ease:"none"})),W._ease=sh(F.ease||s.ease||"none");var Ge,Ve,We,qe=0;
vendor: 2,567 bytes, line 72
72if(Js(F))F.forEach(function(nt){return W.to(z,nt,">")}),W.duration();else{for(de in fe={},F)"ease"===de||"easeEach"===de||Nx(de,F[de],fe,F.easeEach);for(de in fe)for(Ge=fe[de].sort(function(nt,et){return nt.t-et.t}),qe=0,ne=0;ne<Ge.length;ne++)(We={ease:(Ve=Ge[ne]).e,duration:(Ve.t-(ne?Ge[ne-1].t:0))/100*x})[de]=Ve.v,W.to(z,We,qe),qe+=We.duration;W.duration()<x&&W.to({},{duration:x-W.duration()})}}x||g.duration(x=W.duration())}else g.timeline=0;return!0===R&&!Rs&&(mc=rr(g),yr.killTweensOf(z),mc=0),el(V,rr(g),l),s.reversed&&g.reverse(),s.paused&&g.paused(!0),(C||!x&&!F&&g._start===bs(V._time)&&Mi(C)&&bf(rr(g))&&"nested"!==V.data)&&(g._tTime=-vi,g.render(Math.max(0,-M)||0)),k&&bA(rr(g),k),g}pa(e,f);var t=e.prototype;return t.render=function(s,l,u){var P,R,F,O,k,L,V,z,W,g=this._time,_=this._tDur,x=this._dur,M=s<0,C=s>_-vi&&!M?_:s<vi?0:s;if(x){if(C!==this._tTime||!s||u||!this._initted&&this._tTime||this._startAt&&this._zTime<0!==M){if(P=C,z=this.timeline,this._repeat){if(O=x+this._rDelay,this._repeat<-1&&M)return this.totalTime(100*O+s,l,u);if(P=bs(C%O),C===_?(F=this._repeat,P=x):((F=~~(C/O))&&F===C/O&&(P=x,F--),P>x&&(P=x)),(L=this._yoyo&&1&F)&&(W=this._yEase,P=x-P),k=co(this._tTime,O),P===g&&!u&&this._initted)return this._tTime=C,this;F!==k&&(z&&this._yEase&&OA(z,L),this.vars.repeatRefresh&&!L&&!this._lock&&(this._lock=u=1,this.render(bs(O*F),!0).invalidate()._lock=0))}if(!this._initted){if(SA(this,M?s:P,u,l,C))return this._tTime=0,this;if(g!==this._time)return this;if(x!==this._dur)return this.render(s,l,u)}if(this._tTime=C,this._time=P,!this._act&&this._ts&&(this._act=1,this._lazy=0),this.ratio=V=(W||this._ease)(P/x),this._from&&(this.ratio=V=1-V),P&&!g&&!l&&!F&&(uo(this,"onStart"),this._tTime!==C))return this;for(R=this._pt;R;)R.r(V,R.d),R=R._next;z&&z.render(s<0?s:!P&&L?-vi:z._dur*z._ease(P/this._dur),l,u)||this._startAt&&(this._zTime=s),this._onUpdate&&!l&&(M&&nh(this,s,0,u),uo(this,"onUpdate")),this._repeat&&F!==k&&this.vars.onRepeat&&!l&&this.parent&&uo(this,"onRepeat"),(C===this._tDur||!C)&&this._tTime===C&&(M&&!this._onUpdate&&nh(this,s,0,!0),(s||!x)&&(C===this._tDur&&this._ts>0||!C&&this._ts<0)&&Fl(this,1),!l&&(!M||g)&&(C||g||L)&&(uo(this,C===_?"onComplete":"onReverseComplete",!0),this._prom&&!(C<_&&this.timeScale()>0)&&this._prom()))}}else!function(e,t,r,s){var x,M,C,l=e.ratio,u=t<0||!t&&(!e._start&&dc(e)&&(e._initted||!xr(e))||(e._ts<0||e._dp._ts<0)&&!xr(e))?0:1,g=e._rDelay,_=0;if(g&&e._repeat&&(_=Mf(0,e._tDur,t),M=co(_,g),e._yoyo&&1&M&&(u=1-u),M!==co(e._tTime,g)&&(l=1-u,e.vars.repeatRefresh&&e._initted&&e.invali
vendor: 4,250 bytes, line 72
72date())),u!==l||er||s||e._zTime===vi||!t&&e._zTime){if(!e._initted&&SA(e,t,s,r,_))return;for(C=e._zTime,e._zTime=t||(r?vi:0),r||(r=t&&!C),e.ratio=u,e._from&&(u=1-u),e._time=0,e._tTime=_,x=e._pt;x;)x.r(u,x.d),x=x._next;t<0&&nh(e,t,0,!0),e._onUpdate&&!r&&uo(e,"onUpdate"),_&&e._repeat&&!r&&e.parent&&uo(e,"onRepeat"),(t>=e._tDur||t<0)&&e.ratio===u&&(u&&Fl(e,1),!r&&!er&&(uo(e,u?"onComplete":"onReverseComplete",!0),e._prom&&e._prom()))}else e._zTime||(e._zTime=t)}(this,s,l,u);return this},t.targets=function(){return this._targets},t.invalidate=function(s){return(!s||!this.vars.runBackwards)&&(this._startAt=0),this._pt=this._op=this._onUpdate=this._lazy=this.ratio=0,this._ptLookup=[],this.timeline&&this.timeline.invalidate(s),f.prototype.invalidate.call(this,s)},t.resetTo=function(s,l,u,g){If||Ws.wake(),this._ts||this.play();var _=Math.min(this._dur,(this._dp._time-this._start)*this._ts);return this._initted||ah(this,_),function(e,t,r,s,l,u,g){var x,M,C,P,_=(e._pt&&e._ptCache||(e._ptCache={}))[t];if(!_)for(_=e._ptCache[t]=[],C=e._ptLookup,P=e._targets.length;P--;){if((x=C[P][t])&&x.d&&x.d._pt)for(x=x.d._pt;x&&x.p!==t&&x.fp!==t;)x=x._next;if(!x)return gc=1,e.vars[t]="+=0",ah(e,g),gc=0,1;_.push(x)}for(P=_.length;P--;)(x=(M=_[P])._pt||M).s=!s&&0!==s||l?x.s+(s||0)+u*x.c:s,x.c=r-x.s,M.e&&(M.e=Vr(r)+Ss(M.e)),M.b&&(M.b=x.s+Ss(M.b))}(this,s,l,u,g,this._ease(_/this._dur),_)?this.resetTo(s,l,u,g):(ih(this,0),this.parent||Jd(this._dp,this,"_first","_last",this._dp._sort?"_start":0),this.render(0))},t.kill=function(s,l){if(void 0===l&&(l="all"),!(s||l&&"all"!==l))return this._lazy=this._pt=0,this.parent?Cf(this):this;if(this.timeline){var u=this.timeline.totalDuration();return this.timeline.killTweensOf(s,l,mc&&!0!==mc.vars.overwrite)._first||Cf(this),this.parent&&u!==this.timeline.totalDuration()&&qa(this,this._dur*this.timeline._tDur/u,0,1),this}var C,P,R,F,O,k,L,g=this._targets,_=s?ho(s):g,x=this._ptLookup,M=this._pt;if((!l||"all"===l)&&function(e,t){for(var r=e.length,s=r===t.length;s&&r--&&e[r]===t[r];);return r<0}(g,_))return"all"===l&&(this._pt=0),Cf(this);for(C=this._op=this._op||[],"all"!==l&&(Jn(l)&&(O={},ta(l,function(V){return O[V]=1}),l=O),l=function(e,t){var l,u,g,_,r=e[0]?Ll(e[0]).harness:0,s=r&&r.aliases;if(!s)return t;for(u in l=Dl({},t),s)if(u in l)for(g=(_=s[u].split(",")).length;g--;)l[_[g]]=l[u];return l}(g,l)),L=g.length;L--;)if(~_.indexOf(g[L]))for(O in P=x[L],"all"===l?(C[L]=l,F=P,R={}):(R=C[L]=C[L]||{},F=l),F)(k=P&&P[O])&&((!("kill"in k.d)||!0===k.d.kill(O))&&su(this,k,"_pt"),delete P[O]),"all"!==R&&(R[O]=1);return this._initted&&!this._pt&&M&&Cf(this),this},e.to=function(s,l){return new e(s,l,arguments[2])},e.from=function(s,l){return tl(1,arguments)},e.delayedCall=function(s,l,u,g){return new e(l,0,{immediateRender:!1,lazy:!1,overwrite:!1,delay:s,onComplete:l,onReverseComplete:l,onCompleteParams:u,onReverseCompleteParams:u,callbackScope:g})},e.fromTo=function(s,l,u){return tl(2,arguments)},e.set=function(s,l){return l.duration=0,l.repeatDelay||(l.repeat=0),new e(s,l)},e.killTweensOf=function(s,l,u){return yr.killTweensOf(s,l,u)},e}(wi);Pa(gs.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0}),ta("staggerTo,staggerFrom,staggerFromTo",function(f){gs[f]=function(){var e=new Aa,t=Xm.call(arguments,0);return t.splice("staggerFromTo"===f?5:4,0,0),e[f].apply(e,t)}});var tg=function(e,t,r){return e[t]=r},_a=function(e,t,r){return e[t](r)},hu=function(e,t,r,s){return e[t](s.fp,r)},ng=function(e,t,r){return e.setAttribute(t,r)},Ol=function(e,t){return Wi(e[t])?_a:lo(e[t])&&e.setAttribute?ng:tg},rp=function(e,t){return t.set(t.t,t.p,Math.round(1e6*(t.s+t.c*e))/1e6,t)},Ux=function(e,t){return t.set(t.t,t.p,!!(t.s+t.c*e),t)},va=function(e,t){var r=t._pt,s="";if(!e&&t.b)s=t.b;else if(1===e&&t.e)s=t.e;else{for(;r;)s=r.p+(r.m?r.m(r.s+r.c*e):Math.round(1e4*(r.s+r.c*e))/1e4)+s,r=r._next;s+=t.c}t.set(t.t,t.p,s,t)},fr=function(e,t){for(var r=t._pt;r;)r.r(e,r.d),r=r._next},Fo=function(e,t,r,s){for(var u,l=this._pt;l;)u=l._next,l.p===s&&l.modifier(e,t,r),l=u},sp=function(e){for(var r,s,t=this._pt;t;)s=t._next,t.p===e&&!t.op||t.op===e?su(this,t,"_pt"):t.dep||(r=1),t=s;return!r},zx=function(e,t,r,s){s.mSet(e,t,s.m.call(s.tween,r,s.mt),s)},ap=function(e){for(var r,s,l,u,t=e._pt;t;
vendor: 3,206 bytes, line 72
72){for(r=t._next,s=l;s&&s.pr>t.pr;)s=s._next;(t._prev=s?s._prev:u)?t._prev._next=t:l=t,(t._next=s)?s._prev=t:u=t,t=r}e._pt=l},La=function(){function f(t,r,s,l,u,g,_,x,M){this.t=r,this.s=l,this.c=u,this.p=s,this.r=g||rp,this.d=_||this,this.set=x||tg,this.pr=M||0,this._next=t,t&&(t._prev=this)}return f.prototype.modifier=function(r,s,l){this.mSet=this.mSet||this.set,this.set=zx,this.m=r,this.mt=l,this.tween=s},f}();ta(qd+"parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger",function(f){return eu[f]=1}),Ia.TweenMax=Ia.TweenLite=gs,Ia.TimelineLite=Ia.TimelineMax=Aa,yr=new Aa({sortChildren:!1,defaults:ds,autoRemoveChildren:!0,id:"root",smoothChildTiming:!0}),wr.stringFilter=FA;var oh=[],Xs={},De=[],op=0,zA=0,fo=function(e){return(Xs[e]||De).map(function(t){return t()})},ko=function(){var e=Date.now(),t=[];e-op>2&&(fo("matchMediaInit"),oh.forEach(function(r){var u,g,_,x,s=r.queries,l=r.conditions;for(g in s)(u=Xa.matchMedia(s[g]).matches)&&(_=1),u!==l[g]&&(l[g]=u,x=1);x&&(r.revert(),_&&t.push(r))}),fo("matchMediaRevert"),t.forEach(function(r){return r.onMatch(r)}),op=e,fo("matchMedia"))},il=function(){function f(t,r){this.selector=r&&qm(r),this.data=[],this._r=[],this.isReverted=!1,this.id=zA++,t&&this.add(t)}var e=f.prototype;return e.add=function(r,s,l){Wi(r)&&(l=s,s=r,r=Wi);var u=this,g=function(){var C,x=Yi,M=u.selector;return x&&x!==u&&x.data.push(u),l&&(u.selector=qm(l)),Yi=u,C=s.apply(u,arguments),Wi(C)&&u._r.push(C),Yi=x,u.selector=M,u.isReverted=!1,C};return u.last=g,r===Wi?g(u):r?u[r]=g:g},e.ignore=function(r){var s=Yi;Yi=null,r(this),Yi=s},e.getTweens=function(){var r=[];return this.data.forEach(function(s){return s instanceof f?r.push.apply(r,s.getTweens()):s instanceof gs&&!(s.parent&&"nested"===s.parent.data)&&r.push(s)}),r},e.clear=function(){this._r.length=this.data.length=0},e.kill=function(r,s){var l=this;if(r){var u=this.getTweens();this.data.forEach(function(_){"isFlip"===_.data&&(_.revert(),_.getChildren(!0,!0,!1).forEach(function(x){return u.splice(u.indexOf(x),1)}))}),u.map(function(_){return{g:_.globalTime(0),t:_}}).sort(function(_,x){return x.g-_.g||-1}).forEach(function(_){return _.t.revert(r)}),this.data.forEach(function(_){return _ instanceof Aa?"nested"!==_.data&&_.kill():!(_ instanceof gs)&&_.revert&&_.revert(r)}),this._r.forEach(function(_){return _(r,l)}),this.isReverted=!0}else this.data.forEach(function(_){return _.kill&&_.kill()});if(this.clear(),s)for(var g=oh.length;g--;)oh[g].id===this.id&&oh.splice(g,1)},e.revert=function(r){this.kill(r||{})},f}(),uu=function(){function f(t){this.contexts=[],this.scope=t}var e=f.prototype;return e.add=function(r,s,l){Wa(r)||(r={matches:r});var _,x,M,u=new il(0,l||this.scope),g=u.conditions={};for(x in Yi&&!u.selector&&(u.selector=Yi.selector),this.contexts.push(u),s=u.add("onMatch",s),u.queries=r,r)"all"===x?M=1:(_=Xa.matchMedia(r[x]))&&(oh.indexOf(u)<0&&oh.push(u),(g[x]=_.matches)&&(M=1),_.addListener?_.addListener(ko):_.addEventListener("change",ko));return M&&s(u),this},e.revert=function(r){this.kill(r||{})}
vendor: 7,146 bytes, line 72
72,e.kill=function(r){this.contexts.forEach(function(s){return s.kill(r,!0)})},f}(),Nl={registerPlugin:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];t.forEach(function(s){return Tf(s)})},timeline:function(e){return new Aa(e)},getTweensOf:function(e,t){return yr.getTweensOf(e,t)},getProperty:function(e,t,r,s){Jn(e)&&(e=ho(e)[0]);var l=Ll(e||{}).get,u=r?Zd:Kd;return"native"===r&&(r=""),e&&(t?u((ga[t]&&ga[t].get||l)(e,t,r,s)):function(g,_,x){return u((ga[g]&&ga[g].get||l)(e,g,_,x))})},quickSetter:function(e,t,r){if((e=ho(e)).length>1){var s=e.map(function(M){return is.quickSetter(M,t,r)}),l=s.length;return function(M){for(var C=l;C--;)s[C](M)}}var u=ga[t],g=Ll(e=e[0]||{}),_=g.harness&&(g.harness.aliases||{})[t]||t,x=u?function(M){var C=new u;ou._pt=0,C.init(e,r?M+r:M,ou,0,[e]),C.render(1,C),ou._pt&&fr(1,ou)}:g.set(e,_);return u?x:function(M){return x(e,_,r?M+r:M,g,1)}},quickTo:function(e,t,r){var s,l=is.to(e,Dl(((s={})[t]="+=0.1",s.paused=!0,s),r||{})),u=function(_,x,M){return l.resetTo(t,_,x,M)};return u.tween=l,u},isTweening:function(e){return yr.getTweensOf(e,!0).length>0},defaults:function(e){return e&&e.ease&&(e.ease=sh(e.ease,ds.ease)),jd(ds,e||{})},config:function(e){return jd(wr,e||{})},registerEffect:function(e){var t=e.name,r=e.effect,l=e.defaults,u=e.extendTimeline;(e.plugins||"").split(",").forEach(function(g){return g&&!ga[g]&&!Ia[g]&&jo(t+" effect requires "+g+" plugin.")}),xf[t]=function(g,_,x){return r(ho(g),Pa(_||{},l),x)},u&&(Aa.prototype[t]=function(g,_,x){return this.add(xf[t](g,Wa(_)?_:(x=_)&&{},this),x)})},registerEase:function(e,t){Zi[e]=sh(t)},parseEase:function(e,t){return arguments.length?sh(e,t):Zi},getById:function(e){return yr.getById(e)},exportRoot:function(e,t){void 0===e&&(e={});var s,l,r=new Aa(e);for(r.smoothChildTiming=Mi(e.smoothChildTiming),yr.remove(r),r._dp=0,r._time=r._tTime=yr._time,s=yr._first;s;)l=s._next,(t||!(!s._dur&&s instanceof gs&&s.vars.onComplete===s._targets[0]))&&el(r,s,s._start-s._delay),s=l;return el(yr,r,0),r},context:function(e,t){return e?new il(e,t):Yi},matchMedia:function(e){return new uu(e)},matchMediaRefresh:function(){return oh.forEach(function(e){var r,s,t=e.conditions;for(s in t)t[s]&&(t[s]=!1,r=1);r&&e.revert()})||ko()},addEventListener:function(e,t){var r=Xs[e]||(Xs[e]=[]);~r.indexOf(t)||r.push(t)},removeEventListener:function(e,t){var r=Xs[e],s=r&&r.indexOf(t);s>=0&&r.splice(s,1)},utils:{wrap:function f(e,t,r){var s=t-e;return Js(e)?au(e,f(0,e.length),t):nl(r,function(l){return(s+(l-e)%s)%s+e})},wrapYoyo:function f(e,t,r){var s=t-e,l=2*s;return Js(e)?au(e,f(0,e.length-1),t):nl(r,function(u){return e+((u=(l+(u-e)%l)%l||0)>s?l-u:u)})},distribute:IA,random:RA,snap:PA,normalize:function(e,t,r){return LA(e,t,0,1,r)},getUnit:Ss,clamp:function(e,t,r){return nl(r,function(s){return Mf(e,t,s)})},splitColor:pc,toArray:ho,selector:qm,mapRange:LA,pipe:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(s){return t.reduce(function(l,u){return u(l)},s)}},unitize:function(e,t){return function(r){return e(parseFloat(r))+(t||Ss(r))}},interpolate:function f(e,t,r,s){var l=isNaN(e+t)?0:function(R){return(1-R)*e+R*t};if(!l){var _,x,M,C,P,u=Jn(e),g={};if(!0===r&&(s=1)&&(r=null),u)e={p:e},t={p:t};else if(Js(e)&&!Js(t)){for(M=[],P=(C=e.length)-2,x=1;x<C;x++)M.push(f(e[x-1],e[x]));C--,l=function(F){F*=C;var O=Math.min(P,~~F);return M[O](F-O)},r=t}else s||(e=Dl(Js(e)?[]:{},e));if(!M){for(_ in t)Di.call(g,e,_,"get",t[_]);l=function(F){return fr(F,g)||(u?e.p:e)}}}return nl(r,l)},shuffle:TA},install:zm,effects:xf,ticker:Ws,updateRoot:Aa.updateRoot,plugins:ga,globalTimeline:yr,core:{PropTween:La,globals:Gm,Tween:gs,Timeline:Aa,Animation:wi,getCache:Ll,_removeLinkedListItem:su,reverting:function(){return er},context:function(e){return e&&Yi&&(Yi.data.push(e),e._ctx=Yi),Yi},suppressOverwrites:function(e){return Rs=e}}};ta("to,from,fromTo,delayedCall,set,killTweensOf",function(f){return Nl[f]=gs[f]}),Ws.add(Aa.updateRoot),ou=Nl.to({},{duration:0});var fu=function(e,t){for(var r=e._pt;r&&r.p!==t&&r.op!==t&&r.fp!==t;)r=r._next;return r},rl=function(e,t){return{name:e,rawVars:1,init:function(s,l,u){u._onInit=function(g){var _,x;if(Jn(l)&&(_={},ta(l,function(M){return _[M]=1}),l=_),t){for(x in _={},l)_[x]=t(l[x]);l=_}!function(e,t){var s,l,u,r=e._targets;for(s in t)for(l=r.length;l--;)(u=e._ptLookup[l][s])&&(u=u.d)&&(u._pt&&(u=fu(u,s)),u&&u.modifier&&u.modifier(t[s],e,r[l],s))}(g,l)}}}},is=Nl.registerPlugin({name:"attr",init:function(e,t,r,s,l){var u,g,_;for(u in this.tween=r,t)_=e.getAttribute(u)||"",(g=this.add(e,"setAttribute",(_||0)+"",t[u],s,l,0,0,u)).op=u,g.b=_,this._props.push(u)},render:function(e,t){for(var r=t._pt;r;)er?r.set(r.t,r.p,r.b,r):r.r(e,r.d),r=r._next}},{name:"endArray",init:function(e,t){for(var r=t.length;r--;)this.add(e,r,e[r]||0,t[r],0,0,0,0,0,1)}},rl("roundProps",Ym),rl("modifiers"),rl("snap",PA))||Nl;gs.version=Aa.version=is.version="3.12.1",Um=1,ma()&&lu();var Ti,Ya,na,og,ch,Rf,ya,Bf,sl={},vc=180/Math.PI,zl=Math.PI/180,gu=Math.atan2,lg=1e8,yc=/([A-Z])/g,Gl=/(left|right|width|margin|padding|x)/i,up=/[\s,\(]\S/,Da={autoAlpha:"opacity,visibility",scale:"scaleX,scaleY",alpha:"opacity"},cg=function(e,t){return t.set(t.t,t.p,Math.round(1e4*(t.s+t.c*e))/1e4+t.u,t)},Gx=function(e,t){return t.set(t.t,t.p,1===e?t.e:Math.round(1e4*(t.s+t.c*e))/1e4+t.u,t)},qA=function(e,t){return t.set(t.t,t.p,e?Math.round(1e4*(t.s+t.c*e))/1e4+t.u:t.b,t)},YA=function(e,t){var r=t.s+t.c*e;t.set(t.t,t.p,~~(r+(r<0?-.5:.5))+t.u,t)},hg=function(e,t){return t.set(t.t,t.p,e?t.e:t.b,t)},$A=function(e,t){return t.set(t.t,t.p,1!==e?t.b:t.e,t)},KA=function(e,t,r){return e.style[t]=r},Fr=function(e,t,r){return e.style.setProperty(t,r)},Oo=function(e,t,r){return e._gsap[t]=r},Vl=function(e,t,r){return e._gsap.scaleX=e._gsap.scaleY=r},ug=function(e,t,r,s,l){var u=e._gsap;u.scaleX=u.scaleY=r,u.renderTransform(l,u)},Hl=function(e,t,r,s,l){var u=e._gsap;u[t]=r,u.renderTransform(l,u)},Er="transform",ia=Er+"Origin",ZA=function f(e,t){var r=this,s=this.target,l=s.style;if(e in sl&&l){if(this.tfm=this.tfm||{},"transform"===e)return Da.transform.split(",").forEach(function(u){return f.call(r,u,t)});if(~(e=Da[e]||e).indexOf(",")?e.split(",").forEach(function(u){return r.tfm[u]=Ql(s,u)}):this.tfm[e]=s._gsap.x?s._gsap[e]:Ql(s,e),this.props.indexOf(Er)>=0)return;s._gsap.svg&&(this.svgo=s.getAttribute("data-svg-origin"),this.props.push(ia,t,"")),e=Er}(l||t)&&this.props.push(e,t,l[e])},fp=function(e){e.translate&&(e.removeProperty("translate"),e.removeProperty("scale"),e.removeProperty("rotate"))},fg=function(){var l,u,e=this.props,t=this.target,r=t.style,s=t._gsap;for(l=0;l<e.length;l+=3)e[l+1]?t[e[l]]=e[l+2]:e[l+2]?r[e[l]]=e[l+2]:r.removeProperty("--"===e[l].substr(0,2)?e[l]:e[l].replace(yc,"-$1").toLowerCase());if(this.tfm){for(u in this.tfm)s[u]=this.tfm[u];s.svg&&(s.renderTransform(),t.setAttribute("data-svg-origin",this.svgo||"")),(!(l=ya())||!l.isStart)&&!r[Er]&&(fp(r),s.uncache=1)}},dp=function(e,t){var r={target:e,props:[],revert:fg,save:ZA};return e._gsap||is.core.getCache(e),t&&t.split(",").forEach(function(s){return r.s
vendor: 4,551 bytes, line 72
72ave(s)}),r},ra=function(e,t){var r=Ya.createElementNS?Ya.createElementNS((t||"http://www.w3.org/1999/xhtml").replace(/^https/,"http"),e):Ya.createElement(e);return r.style?r:Ya.createElement(e)},al=function f(e,t,r){var s=getComputedStyle(e);return s[t]||s.getPropertyValue(t.replace(yc,"-$1").toLowerCase())||s.getPropertyValue(t)||!r&&f(e,hh(t)||t,1)||""},qs="O,Moz,ms,Ms,Webkit".split(","),hh=function(e,t,r){var l=(t||ch).style,u=5;if(e in l&&!r)return e;for(e=e.charAt(0).toUpperCase()+e.substr(1);u--&&!(qs[u]+e in l););return u<0?null:(3===u?"ms":u>=0?qs[u]:"")+e},$a=function(){typeof window<"u"&&window.document&&(Ti=window,na=(Ya=Ti.document).documentElement,ch=ra("div")||{style:{}},ra("div"),Er=hh(Er),ia=Er+"Origin",ch.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",Bf=!!hh("perspective"),ya=is.core.reverting,og=1)},Au=function f(e){var u,t=ra("svg",this.ownerSVGElement&&this.ownerSVGElement.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),r=this.parentNode,s=this.nextSibling,l=this.style.cssText;if(na.appendChild(t),t.appendChild(this),this.style.display="block",e)try{u=this.getBBox(),this._gsapBBox=this.getBBox,this.getBBox=f}catch{}else this._gsapBBox&&(u=this._gsapBBox());return r&&(s?r.insertBefore(this,s):r.appendChild(this)),na.removeChild(t),this.style.cssText=l,u},pp=function(e,t){for(var r=t.length;r--;)if(e.hasAttribute(t[r]))return e.getAttribute(t[r])},Dn=function(e){var t;try{t=e.getBBox()}catch{t=Au.call(e,!0)}return t&&(t.width||t.height)||e.getBBox===Au||(t=Au.call(e,!0)),!t||t.width||t.x||t.y?t:{x:+pp(e,["x","cx","x1"])||0,y:+pp(e,["y","cy","y1"])||0,width:0,height:0}},Ys=function(e){return!(!e.getCTM||e.parentNode&&!e.ownerSVGElement||!Dn(e))},po=function(e,t){if(t){var r=e.style;t in sl&&t!==ia&&(t=Er),r.removeProperty?(("ms"===t.substr(0,2)||"webkit"===t.substr(0,6))&&(t="-"+t),r.removeProperty(t.replace(yc,"-$1").toLowerCase())):r.removeAttribute(t)}},sa=function(e,t,r,s,l,u){var g=new La(e._pt,t,r,0,1,u?$A:hg);return e._pt=g,g.b=s,g.e=l,e._props.push(r),g},jA={deg:1,rad:1,turn:1},Fa={grid:1,flex:1},mo=function f(e,t,r,s){var F,O,k,L,l=parseFloat(r)||0,u=(r+"").trim().substr((l+"").length)||"px",g=ch.style,_=Gl.test(t),x="svg"===e.tagName.toLowerCase(),M=(x?"client":"offset")+(_?"Width":"Height"),C=100,P="px"===s,R="%"===s;return s===u||!l||jA[s]||jA[u]?l:("px"!==u&&!P&&(l=f(e,t,r,"px")),L=e.getCTM&&Ys(e),!R&&"%"!==u||!sl[t]&&!~t.indexOf("adius")?(g[_?"width":"height"]=C+(P?u:s),O=~t.indexOf("adius")||"em"===s&&e.appendChild&&!x?e:e.parentNode,L&&(O=(e.ownerSVGElement||{}).parentNode),(!O||O===Ya||!O.appendChild)&&(O=Ya.body),(k=O._gsap)&&R&&k.width&&_&&k.time===Ws.time&&!k.uncache?Vr(l/k.width*C):((R||"%"===u)&&!Fa[al(O,"display")]&&(g.position=al(e,"position")),O===e&&(g.position="static"),O.appendChild(ch),F=ch[M],O.removeChild(ch),g.position="absolute",_&&R&&((k=Ll(O)).time=Ws.time,k.width=O[M]),Vr(P?F*l/C:F&&l?C/F*l:0))):(F=L?e.getBBox()[_?"width":"height"]:e[M],Vr(R?l/F*C:l/100*F)))},Ql=function(e,t,r,s){var l;return og||$a(),t in Da&&"transform"!==t&&~(t=Da[t]).indexOf(",")&&(t=t.split(",")[0]),sl[t]&&"transform"!==t?(l=zn(e,s),l="transformOrigin"!==t?l[t]:l.svg?l.origin:Ap(al(e,ia))+" "+l.zOrigin+"px"):(!(l=e.style[t])||"auto"===l||s||~(l+"").indexOf("calc("))&&(l=mp[t]&&mp[t](e,t,r)||al(e,t)||Yd(e,t)||("opacity"===t?1:0)),r&&!~(l+"").trim().indexOf(" ")?mo(e,t,l,r)+r:l},As=function(e,t,r,s){if(!r||"none"===r){var l=hh(t,e,1),u=l&&al(e,l,1);u&&u!==r?(t=l,r=u):"borderColor"===t&&(r=al(e,"borderTopColor"))}var M,C,P,R,F,O,k,L,V,z,W,g=new La(this._pt,e.style,t,0,1,va),_=0,x=0;if(g.b=r,g.e=s,r+="","auto"==(s+="")&&(e.style[t]=s,s=al(e,t)||s,e.style[t]=r),FA(M=[r,s]),s=M[1],P=(r=M[0]).match(eh)||[],(s.match(eh)||[]).length){for(;C=eh.exec(s);)k=C[0],V=s.substring(_,C.index),F?F=(F+1)%5:("rgba("===V.substr(-5)||"hsla("===V.substr(-5))&&(F=1),k!==(O=P[x++]||"")&&(R=parseFloat(O)||0,W=O.substr((R+"").length),"="===k.charAt(1)&&(k=hc(R,k)+W),L=parseFloat(k),z=k.substr((L+"").length),_=eh.lastIndex-z.length,z||(z=z||wr.units[t]||W,_===s.length&&(s+=z,g.e+=z)),W!==z&&(R=mo(e,t,O,z)||0),g._pt={_next:g._pt,p:V||1===x?V:",",s:R,c:L-R,m:F&&F<4||"zIndex"===t?Math.round:0});g.c=_<s.length?s.substring(_,s.length):""}else g.r="display"===t&&"none"===s?$A:hg;return Nm.test(s)&&(g.e=0),this._pt=g,g},Lf={top:"0%",bottom:"100%",left:"0%",right:"100%",center:"50%"},Cr=function(e){var t=e.split(" "),r=t[0],s=t[1]||"50%";return("top"===r||"bottom"===r||"left"===s||"right"===s)&&(e=r,r=s,s=e),t[0]=Lf[r]||r,t[1]=Lf[s]||s,t.join(" ")}
vendor: 5,128 bytes, line 72
72,Vx=function(e,t){if(t.tween&&t.tween._time===t.tween._dur){var g,_,x,r=t.t,s=r.style,l=t.u,u=r._gsap;if("all"===l||!0===l)s.cssText="",_=1;else for(x=(l=l.split(",")).length;--x>-1;)sl[g=l[x]]&&(_=1,g="transformOrigin"===g?ia:Er),po(r,g);_&&(po(r,Er),u&&(u.svg&&r.removeAttribute("transform"),zn(r,1),u.uncache=1,fp(s)))}},mp={clearProps:function(e,t,r,s,l){if("isFromStart"!==l.data){var u=e._pt=new La(e._pt,t,r,0,0,Vx);return u.u=s,u.pr=-10,u.tween=l,e._props.push(r),1}}},Df=[1,0,0,1,0,0],JA={},gp=function(e){return"matrix(1, 0, 0, 1, 0, 0)"===e||"none"===e||!e},e_=function(e){var t=al(e,Er);return gp(t)?Df:t.substr(7).match(Om).map(Vr)},Ff=function(e,t){var u,g,_,x,r=e._gsap||Ll(e),s=e.style,l=e_(e);return r.svg&&e.getAttribute("transform")?"1,0,0,1,0,0"===(l=[(_=e.transform.baseVal.consolidate().matrix).a,_.b,_.c,_.d,_.e,_.f]).join(",")?Df:l:(l===Df&&!e.offsetParent&&e!==na&&!r.svg&&(_=s.display,s.display="block",(!(u=e.parentNode)||!e.offsetParent)&&(x=1,g=e.nextElementSibling,na.appendChild(e)),l=e_(e),_?s.display=_:po(e,"display"),x&&(g?u.insertBefore(e,g):u?u.appendChild(e):na.removeChild(e))),t&&l.length>6?[l[0],l[1],l[4],l[5],l[12],l[13]]:l)},dg=function(e,t,r,s,l,u){var fe,ge,ie,g=e._gsap,_=l||Ff(e,!0),x=g.xOrigin||0,M=g.yOrigin||0,C=g.xOffset||0,P=g.yOffset||0,R=_[0],F=_[1],O=_[2],k=_[3],L=_[4],V=_[5],z=t.split(" "),W=parseFloat(z[0])||0,ne=parseFloat(z[1])||0;r?_!==Df&&(ge=R*k-F*O)&&(ie=W*(-F/ge)+ne*(R/ge)-(R*V-F*L)/ge,W=W*(k/ge)+ne*(-O/ge)+(O*V-k*L)/ge,ne=ie):(W=(fe=Dn(e)).x+(~z[0].indexOf("%")?W/100*fe.width:W),ne=fe.y+(~(z[1]||z[0]).indexOf("%")?ne/100*fe.height:ne)),s||!1!==s&&g.smooth?(g.xOffset=C+((L=W-x)*R+(V=ne-M)*O)-L,g.yOffset=P+(L*F+V*k)-V):g.xOffset=g.yOffset=0,g.xOrigin=W,g.yOrigin=ne,g.smooth=!!s,g.origin=t,g.originIsAbsolute=!!r,e.style[ia]="0px 0px",u&&(sa(u,g,"xOrigin",x,W),sa(u,g,"yOrigin",M,ne),sa(u,g,"xOffset",C,g.xOffset),sa(u,g,"yOffset",P,g.yOffset)),e.setAttribute("data-svg-origin",W+" "+ne)},zn=function(e,t){var r=e._gsap||new Ba(e);if("x"in r&&!t&&!r.uncache)return r;var M,C,P,R,F,O,k,L,V,z,W,ne,fe,ge,de,ie,ye,He,qe,Ge,Ve,We,nt,et,tt,gt,bt,jt,Qt,ct,At,Ut,s=e.style,l=r.scaleX<0,u="px",g="deg",_=getComputedStyle(e),x=al(e,ia)||"0";return M=C=P=O=k=L=V=z=W=0,R=F=1,r.svg=!(!e.getCTM||!Ys(e)),_.translate&&(("none"!==_.translate||"none"!==_.scale||"none"!==_.rotate)&&(s[Er]=("none"!==_.translate?"translate3d("+(_.translate+" 0 0").split(" ").slice(0,3).join(", ")+") ":"")+("none"!==_.rotate?"rotate("+_.rotate+") ":"")+("none"!==_.scale?"scale("+_.scale.split(" ").join(",")+") ":"")+("none"!==_[Er]?_[Er]:"")),s.scale=s.rotate=s.translate="none"),ge=Ff(e,r.svg),r.svg&&(r.uncache?(tt=e.getBBox(),x=r.xOrigin-tt.x+"px "+(r.yOrigin-tt.y)+"px",et=""):et=!t&&e.getAttribute("data-svg-origin"),dg(e,et||x,!!et||r.originIsAbsolute,!1!==r.smooth,ge)),ne=r.xOrigin||0,fe=r.yOrigin||0,ge!==Df&&(He=ge[0],qe=ge[1],Ge=ge[2],Ve=ge[3],M=We=ge[4],C=nt=ge[5],6===ge.length?(R=Math.sqrt(He*He+qe*qe),F=Math.sqrt(Ve*Ve+Ge*Ge),O=He||qe?gu(qe,He)*vc:0,(V=Ge||Ve?gu(Ge,Ve)*vc+O:0)&&(F*=Math.abs(Math.cos(V*zl))),r.svg&&(M-=ne-(ne*He+fe*Ge),C-=fe-(ne*qe+fe*Ve))):(ct=ge[7],bt=ge[8],jt=ge[9],At=ge[11],M=ge[12],C=ge[13],P=ge[14],k=(de=gu(Ut=ge[6],Qt=ge[10]))*vc,de&&(et=We*(ie=Math.cos(-de))+bt*(ye=Math.sin(-de)),tt=nt*ie+jt*ye,gt=Ut*ie+Qt*ye,bt=We*-ye+bt*ie,jt=nt*-ye+jt*ie,Qt=Ut*-ye+Qt*ie,At=ct*-ye+At*ie,We=et,nt=tt,Ut=gt),L=(de=gu(-Ge,Qt))*vc,de&&(ie=Math.cos(-de),At=Ve*(ye=Math.sin(-de))+At*ie,He=et=He*ie-bt*ye,qe=tt=qe*ie-jt*ye,Ge=gt=Ge*ie-Qt*ye),O=(de=gu(qe,He))*vc,de&&(et=He*(ie=Math.cos(de))+qe*(ye=Math.sin(de)),tt=We*ie+nt*ye,qe=qe*ie-He*ye,nt=nt*ie-We*ye,He=et,We=tt),k&&Math.abs(k)+Math.abs(O)>359.9&&(k=O=0,L=180-L),R=Vr(Math.sqrt(He*He+qe*qe+Ge*Ge)),F=Vr(Math.sqrt(nt*nt+Ut*Ut)),de=gu(We,nt),V=Math.abs(de)>2e-4?de*vc:0,W=At?1/(At<0?-At:At):0),r.svg&&(et=e.getAttribute("transform"),r.forceCSS=e.setAttribute("transform","")||!gp(al(e,Er)),et&&e.setAttribute("transform",et))),Math.abs(V)>90&&Math.abs(V)<270&&(l?(R*=-1,V+=O<=0?180:-180,O+=O<=0?180:-180):(F*=-1,V+=V<=0?180:-180)),t=t||r.uncache,r.x=M-((r.xPercent=M&&(!t&&r.xPercent||(Math.round(e.offsetWidth/2)===Math.round(-M)?-50:0)))?e.offsetWidth*r.xPercent/100:0)+u,r.y=C-((r.yPercent=C&&(!t&&r.yPercent||(Math.round(e.offsetHeight/2)===Math.round(-C)?-50:0)))?e.offsetHeight*r.yPercent/100:0)+u,r.z=P+u,r.scaleX=Vr(R),r.scaleY=Vr(F),r.rotation=Vr(O)+g,r.rotationX=Vr(k)+g,r.rotationY=Vr(L)+g,r.skewX=V+g,r.skewY=z+g,r.transformPerspective=W+u,(r.zOrigin=parseFloat(x.split(" ")[2])||0)&&(s[ia]=Ap(x)),r.xOffset=r.yOffset=0,r.force3D=wr.force3D,r.renderTransform=r.svg?Ds:Bf?_u:go,r.uncache=0,r},Ap=function(e){return(e=e.split(" "))[0]+" "+e[1]},pg=function(e,t,r){var s=Ss(t);return Vr(parseFloat(t)+parseFloat(mo(e,"x",r+"px",s)))+s},go=function(e,t){t.z="0px",t.rotationY=t.rotationX="0deg",t.force3D=0,_u(e,t)},Wl="0deg",ol="0px",Ms=") ",_u=function(e,t){var r=t||this,s=r.xPercent,l=r.yPercent,u=r.x,g=r.y,_=r.z,x=r.rotation,M=r.rotationY,C=r.rotationX,P=r.skewX,R=r.skewY,F=r.scaleX,O=r.scaleY,k=r.transformPerspective,L=r.force3D,V=r.target,z=r.zOrigin,W="",ne="auto"===L&&e&&1!==e||!0===L;
vendor: 5,212 bytes, line 72
72if(z&&(C!==Wl||M!==Wl)){var ie,fe=parseFloat(M)*zl,ge=Math.sin(fe),de=Math.cos(fe);fe=parseFloat(C)*zl,ie=Math.cos(fe),u=pg(V,u,ge*ie*-z),g=pg(V,g,-Math.sin(fe)*-z),_=pg(V,_,de*ie*-z+z)}k!==ol&&(W+="perspective("+k+Ms),(s||l)&&(W+="translate("+s+"%, "+l+"%) "),(ne||u!==ol||g!==ol||_!==ol)&&(W+=_!==ol||ne?"translate3d("+u+", "+g+", "+_+") ":"translate("+u+", "+g+Ms),x!==Wl&&(W+="rotate("+x+Ms),M!==Wl&&(W+="rotateY("+M+Ms),C!==Wl&&(W+="rotateX("+C+Ms),(P!==Wl||R!==Wl)&&(W+="skew("+P+", "+R+Ms),(1!==F||1!==O)&&(W+="scale("+F+", "+O+Ms),V.style[Er]=W||"translate(0, 0)"},Ds=function(e,t){var ne,fe,ge,de,ie,r=t||this,s=r.xPercent,l=r.yPercent,u=r.x,g=r.y,_=r.rotation,x=r.skewX,M=r.skewY,C=r.scaleX,P=r.scaleY,R=r.target,F=r.xOrigin,O=r.yOrigin,k=r.xOffset,L=r.yOffset,V=r.forceCSS,z=parseFloat(u),W=parseFloat(g);_=parseFloat(_),x=parseFloat(x),(M=parseFloat(M))&&(x+=M=parseFloat(M),_+=M),_||x?(_*=zl,x*=zl,ne=Math.cos(_)*C,fe=Math.sin(_)*C,ge=Math.sin(_-x)*-P,de=Math.cos(_-x)*P,x&&(M*=zl,ie=Math.tan(x-M),ge*=ie=Math.sqrt(1+ie*ie),de*=ie,M&&(ie=Math.tan(M),ne*=ie=Math.sqrt(1+ie*ie),fe*=ie)),ne=Vr(ne),fe=Vr(fe),ge=Vr(ge),de=Vr(de)):(ne=C,de=P,fe=ge=0),(z&&!~(u+"").indexOf("px")||W&&!~(g+"").indexOf("px"))&&(z=mo(R,"x",u,"px"),W=mo(R,"y",g,"px")),(F||O||k||L)&&(z=Vr(z+F-(F*ne+O*ge)+k),W=Vr(W+O-(F*fe+O*de)+L)),(s||l)&&(ie=R.getBBox(),z=Vr(z+s/100*ie.width),W=Vr(W+l/100*ie.height)),R.setAttribute("transform",ie="matrix("+ne+","+fe+","+ge+","+de+","+z+","+W+")"),V&&(R.style[Er]=ie)},Fi=function(e,t,r,s,l){var C,P,u=360,g=Jn(l),x=parseFloat(l)*(g&&~l.indexOf("rad")?vc:1)-s,M=s+x+"deg";return g&&("short"===(C=l.split("_")[1])&&(x%=u)!=x%180&&(x+=x<0?u:-u),"cw"===C&&x<0?x=(x+u*lg)%u-~~(x/u)*u:"ccw"===C&&x>0&&(x=(x-u*lg)%u-~~(x/u)*u)),e._pt=P=new La(e._pt,t,r,s,x,Gx),P.e=M,P.u="deg",e._props.push(r),P},mg=function(e,t){for(var r in t)e[r]=t[r];return e},ll=function(e,t,r){var g,_,x,M,C,P,F,s=mg({},r._gsap),u=r.style;for(_ in s.svg?(x=r.getAttribute("transform"),r.setAttribute("transform",""),u[Er]=t,g=zn(r,1),po(r,Er),r.setAttribute("transform",x)):(x=getComputedStyle(r)[Er],u[Er]=t,g=zn(r,1),u[Er]=x),sl)(x=s[_])!==(M=g[_])&&"perspective,force3D,transformOrigin,svgOrigin".indexOf(_)<0&&(C=Ss(x)!==(F=Ss(M))?mo(r,_,x,F):parseFloat(x),P=parseFloat(M),e._pt=new La(e._pt,g,_,C,P-C,cg),e._pt.u=F||0,e._props.push(_));mg(g,s)};ta("padding,margin,Width,Radius",function(f,e){var t="Top",r="Right",s="Bottom",l="Left",u=(e<3?[t,r,s,l]:[t+l,t+r,s+r,s+l]).map(function(g){return e<2?f+g:"border"+g+f});mp[e>1?"border"+f:f]=function(g,_,x,M,C){var P,R;if(arguments.length<4)return P=u.map(function(F){return Ql(g,F,x)}),5===(R=P.join(" ")).split(P[0]).length?P[0]:R;P=(M+"").split(" "),R={},u.forEach(function(F,O){return R[F]=P[O]=P[O]||P[(O-1)/2|0]}),g.init(_,R,C)}});var kf={name:"css",register:$a,targetTest:function(e){return e.style&&e.nodeType},init:function(e,t,r,s,l){var x,M,C,P,R,F,O,k,L,V,z,W,ne,fe,ge,de,u=this._props,g=e.style,_=r.vars.startAt;for(O in og||$a(),this.styles=this.styles||dp(e),de=this.styles.props,this.tween=r,t)if("autoRound"!==O&&(M=t[O],!ga[O]||!Jm(O,t,r,s,e,l)))if(F=mp[O],"function"==(R=typeof M)&&(R=typeof(M=M.call(r,s,e,l))),"string"===R&&~M.indexOf("random(")&&(M=wf(M)),F)F(this,e,O,M,r)&&(ge=1);else if("--"===O.substr(0,2))x=(getComputedStyle(e).getPropertyValue(O)+"").trim(),M+="",gr.lastIndex=0,gr.test(x)||(k=Ss(x),L=Ss(M)),L?k!==L&&(x=mo(e,O,x,L)+L):k&&(M+=k),this.add(g,"setProperty",x,M,s,l,0,0,O),u.push(O),de.push(O,0,g[O]);else if("undefined"!==R){if(_&&O in _?(x="function"==typeof _[O]?_[O].call(r,s,e,l):_[O],Jn(x)&&~x.indexOf("random(")&&(x=wf(x)),Ss(x+"")||(x+=wr.units[O]||Ss(Ql(e,O))||""),"="===(x+"").charAt(1)&&(x=Ql(e,O))):x=Ql(e,O),P=parseFloat(x),(V="string"===R&&"="===M.charAt(1)&&M.substr(0,2))&&(M=M.substr(2)),C=parseFloat(M),O in Da&&("autoAlpha"===O&&(1===P&&"hidden"===Ql(e,"visibility")&&C&&(P=0),de.push("visibility",0,g.visibility),sa(this,g,"visibility",P?"inherit":"hidden",C?"inherit":"hidden",!C)),"scale"!==O&&"transform"!==O&&~(O=Da[O]).indexOf(",")&&(O=O.split(",")[0])),z=O in sl)if(this.styles.save(O),W||((ne=e._gsap).renderTransform&&!t.parseTransform||zn(e,t.parseTransform),fe=!1!==t.smoothOrigin&&ne.smooth,(W=this._pt=new La(this._pt,g,Er,0,1,ne.renderTransform,ne,0,-1)).dep=1),"scale"===O)this._pt=new La(this._pt,ne,"scaleY",ne.scaleY,(V?hc(ne.scaleY,V+C):C)-ne.scaleY||0,cg),this._pt.u=0,u.push("scaleY",O),O+="X";else{if("transformOrigin"===O){de.push(ia,0,g[ia]),M=Cr(M),ne.svg?dg(e,M,0,fe,0,this):((L=parseFloat(M.split(" ")[2])||0)!==ne.zOrigin&&sa(this,ne,"zOrigin",ne.zOrigin,L),sa(this,g,O,Ap(x),Ap(M)));continue}if("svgOrigin"===O){dg(e,M,1,fe,0,this);continue}if(O in JA){Fi(this,ne,O,P,V?hc(P,V+M):M);continue}if("smoothOrigin"===O){sa(this,ne,"smooth",ne.smooth,M);continue}if("force3D"===O){ne[O]=M;continue}if("transform"===O){ll(this,M,e);continue}}else O in g||(O=hh(O)||O);if(z||(C||0===C)&&(P||0===P)&&!up.test(M)&&O in g)C||(C=0),(k=(x+"").substr((P+"").length))!==(L=Ss(M)||(O in wr.units?wr.units[O]:k))&&(P=mo(e,O,x,L)),this._pt=new La(this._pt,z?ne:g,O,P,(V?hc(P,V+C):C)-P,z||"px"!==L&&"zIndex"!==O||!1===t.autoRound?cg:YA),this._pt.u=L||0,k!==L&&"%"!==L&&(this._pt.b=x,this._pt.r=qA);
72else if(O in g)As.call(this,e,O,x,V?V+M:M);else if(O in e)this.add(e,O,x||e[O],V?V+M:M,s,l);else if("parseTransform"!==O){Zo(O,M);continue}z||(O in g?de.push(O,0,g[O]):de.push(O,1,x||e[O])),u.push(O)}ge&&ap(this)},render:function(e,t){if(t.tween._time||!ya())for(var r=t._pt;r;)r.r(e,r.d),r=r._next;else t.styles.revert()},get:Ql,aliases:Da,getSetter:function(e,t,r){var s=Da[t];return s&&s.indexOf(",")<0&&(t=s),t in sl&&t!==ia&&(e._gsap.x||Ql(e,"x"))?r&&Rf===r?"scale"===t?Vl:Oo:(Rf=r||{})&&("scale"===t?ug:Hl):e.style&&!lo(e.style[t])?KA:~t.indexOf("-")?Fr:Ol(e,t)},core:{_removeProperty:po,_getMatrix:Ff}};is.utils.checkPrefix=hh,is.core.getStyleSaver=dp,function(f,e){var s=ta(f+","+e+",transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective",function(l){sl[l]=1});ta(e,function(l){wr.units[l]="deg",JA[l]=1}),Da[s[13]]=f+","+e,ta("0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY",function(l){var u=l.split(":");Da[u[1]]=s[u[0]]})}("x,y,z,scale,scaleX,scaleY,xPercent,yPercent","rotation,rotationX,rotationY,skewX,skewY"),ta("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",function(f){wr.units[f]="px"}),is.registerPlugin(kf);var br=is.registerPlugin(kf)||is,vu=/[achlmqstvz]|(-?\d*\.?\d*(?:e[\-+]?\d+)?)[0-9]/gi,yu=/(?:(-)?\d*\.?\d*(?:e[\-+]?\d+)?)[0-9]/gi,gg=/[\+\-]?\d*\.?\d+e[\+\-]?\d+/gi,_p=/(^[#\.][a-z]|[a-y][a-z])/i,vp=Math.PI/180,yp=180/Math.PI,uh=Math.sin,Nf=Math.cos,xa=Math.abs,cl=Math.sqrt,xp=Math.atan2,Xl=1e8,Fs=function(e){return"string"==typeof e},t_=function(e){return"number"==typeof e},xc={},xu={},ks=1e5,n_=function(e){return Math.round((e+Xl)%1*ks)/ks||(e<0?0:1)},ar=function(e){return Math.round(e*ks)/ks||0},Ag=function(e){return Math.round(1e10*e)/1e10||0},i_=function(e,t,r,s){var l=e[t],u=1===s?6:Sp(l,r,s);if(u&&u+r+2<l.length)return e.splice(t,0,l.slice(0,r+u+2)),l.splice(0,r+u),1},r_=function(e,t,r){var s=e.length,l=~~(r*s);if(e[l]>t){for(;--l&&e[l]>t;);l<0&&(l=0)}else for(;e[++l]<t&&l<s;);return l<s?l:s-1},Uf=function(e,t){return t.totalLength=e.totalLength,e.samples?(t.samples=e.samples.slice(0),t.lookup=e.lookup.slice(0),t.minLength=e.minLength,t.resolution=e.resolution):e.totalPoints&&(t.totalPoints=e.totalPoints),t},$s=function(e,t){var r=e.length,s=e[r-1]||[],l=s.length;r&&t[0]===s[l-2]&&t[1]===s[l-1]&&(t=s.concat(t.slice(2)),r--),e[r]=t};function ql(f){var t,e=(f=Fs(f)&&_p.test(f)&&document.querySelector(f)||f).getAttribute?f:0;return e&&(f=f.getAttribute("d"))?(e._gsPath||(e._gsPath={}),(t=e._gsPath[f])&&!t._dirty?t:e._gsPath[f]=Vf(f)):f?Fs(f)?Vf(f):t_(f[0])?[f]:f:console.warn("Expecting a <path> element or an SVG path data string")}function zf(f){var t,e=0;for(f.reverse();e<f.length;e+=2)t=f[e],f[e]=f[e+1],f[e+1]=t;f.reversed=!f.reversed}var _g={rect:"rx,ry,x,y,width,height",circle:"r,cx,cy",ellipse:"rx,ry,cx,cy",line:"x1,x2,y1,y2"};function Yl(f,e,t){var u,r=f[e],s=f[e+2],l=f[e+4];return r+=(s-r)*t,u=(s+=(l-s)*t)+(l+(f[e+6]-l)*t-s)*t-(r+=(s-r)*t),r=f[e+1],r+=((s=f[e+3])-r)*t,ar(xp((s+=((l=f[e+5])-s)*t)+(l+(f[e+7]-l)*t-s)*t-(r+=(s-r)*t),u)*yp)}function Gf(f,e,t){t=function(e){return typeof e>"u"}(t)?1:Ag(t)||0,e=Ag(e)||0;var r=Math.max(0,~~(xa(t-e)-1e-8)),s=function s_(f){for(var e=[],t=0;t<f.length;t++)e[t]=Uf(f[t],f[t].slice(0));return Uf(f,e)}(f);if(e>t&&(e=1-e,t=1-t,function(e){var r=e.length;for(e.reverse();r--;)e[r].reversed||zf(e[r])}(s),s.totalLength=0),e<0||t<0){var l=Math.abs(~~Math.min(e,t))+1;e+=l,t+=l}s.totalLength||Ec(s);var L,V,z,W,ne,fe,ge,de,u=t>1,g=bc(s,e,xc,!0),_=bc(s,t,xu),x=_.segment,M=g.segment,C=_.segIndex,P=g.segIndex,R=_.i,F=g.i,O=P===C,k=R===F&&O;if(u||r){for(L=C<P||O&&R<F||k&&_.t<g.t,i_(s,P,F,g.t)&&(P++,L||(C++,k?(_.t=(_.t-g.t)/(1-g.t),R=0):O&&(R-=F))),Math.abs(1-(t-e))<1e-5?C=P-1:!_.t&&C?C--:i_(s,C,R,_.t)&&L&&P++,1===g.t&&(P=(P+1)%s.length),ne=[],ge=1+(fe=s.length)*r,de=P,ge+=(fe-P+C)%fe,W=0;W<ge;W++)$s(ne,s[de++%fe]);s=ne}else if(z=1===_.t?6:Sp(x,R,_.t),e!==t)for(V=Sp(M,F,k?g.t/_.t:g.t),O&&(z+=V),x.splice(R+z+2),(V||F)&&M.splice(0,F+V),W=s.length;W--;)(W<P||W>C)&&s.splice(W,1);else x.angle=Yl(x,R+z,0),g=x[R+=z],_=x[R+1],x.length=x.totalLength=0,x.totalPoints=s.totalPoints=8,x.push(g,_,g,_,g,_,g,_);return s.totalLength=0,s}function bp(f,e,t){e=e||0,f.samples||(f.samples=[],f.lookup=[]);var F,O,k,L,V,z,W,ne,fe,ge,de,ie,ye,He,qe,Ge,Ve,r=~~f.resolution||12,s=1/r,l=t?e+6*t+1:f.length,u=f[e],g=f[e+1],_=e?e/6*r:0,x=f.samples,M=f.lookup,C=(e?f.minLength:Xl)||Xl,P=x[_+t*r-1],R=e?x[_-1]:0;for(x.length=M.length=0,O=e+2;O<l;O+=6){if(L=f[O+2]-u,V=f[O]-u,ne=f[O+5]-g,fe=f[O+3]-g,ge=f[O+1]-g,z=W=de=ie=0,xa(k=f[O+4]-u)<.01&&xa(ne)<.01&&xa(V)+xa(ge)<.01)f.length>8&&(f.splice(O,6),O-=6,l-=6);else for(F=1;F<=r;F++)z=W-(W=((He=s*F)*He*k+3*(ye=1-He)*(He*L+ye*V))*He),de=ie-(ie=(He*He*ne+3*ye*(He*fe+ye*ge))*He),(Ge=cl(de*de+z*z))<C&&(C=Ge),x[_++]=R+=Ge;u+=k,g+=ne}if(P)for(P-=R;_<x.length;_++)x[_]+=P;if(x.length&&C){if(f.totalLength=Ve=x[x.length-1]||0,f.minLength=C,Ve/C<9999)for(Ge=qe=0,F=0;F<Ve;F+=C)M[Ge++]=x[qe]<F?++qe:qe}else f.totalLength=x[0]=0;return e?R-x[e/2-1]:R}function Ec(f,e){var t,r,s;for(s=t=r=0;s<f.length;s++)f[s].resolution=~~e||12,r+=f[s].length,t+=bp(f[s]);return f.totalPoints=r,f.totalLength=t,f}function Sp(f,e,t){if(t<=0||t>=1)return 0;var r=f[e],s=f[e+1],l=f[e+2],u=f[e+3],g=f[e+4],_=f[e+5],C=r+(l-r)*t,P=l+(g-l)*t,R=s+(u-s)*t,F=u+(_-u)*t,O=C+(P-C)*t,k=R+(F-R)*t,L=g+(f[e+6]-g)*t,V=_+(f[e+7]-_)*t;
72return P+=(L-P)*t,F+=(V-F)*t,f.splice(e+2,4,ar(C),ar(R),ar(O),ar(k),ar(O+(P-O)*t),ar(k+(F-k)*t),ar(P),ar(F),ar(L),ar(V)),f.samples&&f.samples.splice(e/6*f.resolution|0,0,0,0,0,0,0,0),6}function bc(f,e,t,r){t=t||{},f.totalLength||Ec(f),(e<0||e>1)&&(e=n_(e));var u,g,_,x,M,C,P,s=0,l=f[0];if(e)if(1===e)P=1,C=(l=f[s=f.length-1]).length-8;else{if(f.length>1){for(_=f.totalLength*e,M=C=0;(M+=f[C++].totalLength)<_;)s=C;e=(_-(x=M-(l=f[s]).totalLength))/(M-x)||0}u=l.samples,g=l.resolution,_=l.totalLength*e,x=(C=l.lookup.length?l.lookup[~~(_/l.minLength)]||0:r_(u,_,e))?u[C-1]:0,(M=u[C])<_&&(x=M,M=u[++C]),P=1/g*((_-x)/(M-x)+C%g),C=6*~~(C/g),r&&1===P&&(C+6<l.length?(C+=6,P=0):s+1<f.length&&(C=P=0,l=f[++s]))}else P=C=s=0,l=f[0];return t.t=P,t.i=C,t.path=f,t.segment=l,t.segIndex=s,t}function o_(f,e,t,r){var u,g,_,x,M,C,P,R,F,s=f[0],l=r||{};if((e<0||e>1)&&(e=n_(e)),s.lookup||Ec(f),f.length>1){for(_=f.totalLength*e,M=C=0;(M+=f[C++].totalLength)<_;)s=f[C];e=(_-(x=M-s.totalLength))/(M-x)||0}return u=s.samples,g=s.resolution,_=s.totalLength*e,x=(C=s.lookup.length?s.lookup[e<1?~~(_/s.minLength):s.lookup.length-1]||0:r_(u,_,e))?u[C-1]:0,(M=u[C])<_&&(x=M,M=u[++C]),l.x=ar(((P=1/g*((_-x)/(M-x)+C%g)||0)*P*(s[6+(C=6*~~(C/g))]-(R=s[C]))+3*(F=1-P)*(P*(s[C+4]-R)+F*(s[C+2]-R)))*P+R),l.y=ar((P*P*(s[C+7]-(R=s[C+1]))+3*F*(P*(s[C+5]-R)+F*(s[C+3]-R)))*P+R),t&&(l.angle=s.totalLength?Yl(s,C,P>=1?1-1e-9:P||1e-9):s.angle||0),l}function Eu(f,e,t,r,s,l,u){for(var _,x,M,C,P,g=f.length;--g>-1;)for(x=(_=f[g]).length,M=0;M<x;M+=2)_[M]=(C=_[M])*e+(P=_[M+1])*r+l,_[M+1]=C*t+P*s+u;return f._dirty=1,f}function Wx(f,e,t,r,s,l,u,g,_){if(f!==g||e!==_){t=xa(t),r=xa(r);var x=s%360*vp,M=Nf(x),C=uh(x),P=Math.PI,R=2*P,F=(f-g)/2,O=(e-_)/2,k=M*F+C*O,L=-C*F+M*O,V=k*k,z=L*L,W=V/(t*t)+z/(r*r);W>1&&(t=cl(W)*t,r=cl(W)*r);var ne=t*t,fe=r*r,ge=(ne*fe-ne*z-fe*V)/(ne*z+fe*V);ge<0&&(ge=0);var de=(l===u?-1:1)*cl(ge),ie=de*(t*L/r),ye=de*(-r*k/t),Ge=(f+g)/2+(M*ie-C*ye),Ve=(e+_)/2+(C*ie+M*ye),We=(k-ie)/t,nt=(L-ye)/r,et=(-k-ie)/t,tt=(-L-ye)/r,gt=We*We+nt*nt,bt=(nt<0?-1:1)*Math.acos(We/cl(gt)),jt=(We*tt-nt*et<0?-1:1)*Math.acos((We*et+nt*tt)/cl(gt*(et*et+tt*tt)));isNaN(jt)&&(jt=P),!u&&jt>0?jt-=R:u&&jt<0&&(jt+=R),bt%=R,jt%=R;var Gt,Qt=Math.ceil(xa(jt)/(R/4)),ct=[],At=jt/Qt,Ut=4/3*uh(At/2)/(1+Nf(At/2)),Vt=M*t,ut=C*t,Nn=C*-r,ni=M*r;for(Gt=0;Gt<Qt;Gt++)k=Nf(s=bt+Gt*At),L=uh(s),We=Nf(s+=At),nt=uh(s),ct.push(k-Ut*L,L+Ut*k,We+Ut*nt,nt-Ut*We,We,nt);for(Gt=0;Gt<ct.length;Gt+=2)ct[Gt]=(k=ct[Gt])*Vt+(L=ct[Gt+1])*Nn+Ge,ct[Gt+1]=k*ut+L*ni+Ve;return ct[Gt-2]=g,ct[Gt-1]=_,ct}}function Vf(f){var x,M,C,P,R,F,O,k,L,V,z,W,ne,fe,ge,e=(f+"").replace(gg,function(ie){var ye=+ie;return ye<1e-4&&ye>-1e-4?0:ye}).match(vu)||[],t=[],r=0,s=0,l=2/3,u=e.length,g=0,_="ERROR: malformed path: "+f,de=function(ye,He,qe,Ge){O.push(ye+(V=(qe-ye)/3),He+(z=(Ge-He)/3),qe-V,Ge-z,qe,Ge)};if(!f||!isNaN(e[0])||isNaN(e[1]))return console.log(_),t;for(x=0;x<u;x++)if(ne=R,isNaN(e[x])?F=(R=e[x].toUpperCase())!==e[x]:x--,C=+e[x+1],P=+e[x+2],F&&(C+=r,P+=s),x||(k=C,L=P),"M"===R)O&&(O.length<8?t.length-=1:g+=O.length),r=k=C,s=L=P,t.push(O=[C,P]),x+=2,R="L";else if("C"===R)O||(O=[0,0]),F||(r=s=0),O.push(C,P,r+1*e[x+3],s+1*e[x+4],r+=1*e[x+5],s+=1*e[x+6]),x+=6;else if("S"===R)V=r,z=s,("C"===ne||"S"===ne)&&(V+=r-O[O.length-4],z+=s-O[O.length-3]),F||(r=s=0),O.push(V,z,C,P,r+=1*e[x+3],s+=1*e[x+4]),x+=4;else if("Q"===R)V=r+(C-r)*l,z=s+(P-s)*l,F||(r=s=0),O.push(V,z,(r+=1*e[x+3])+(C-r)*l,(s+=1*e[x+4])+(P-s)*l,r,s),x+=4;else if("T"===R)O.push(r+(V=r-O[O.length-4]),s+(z=s-O[O.length-3]),C+(r+1.5*V-C)*l,P+(s+1.5*z-P)*l,r=C,s=P),x+=2;else if("H"===R)de(r,s,r=C,s),x+=1;else if("V"===R)de(r,s,r,s=C+(F?s-r:0)),x+=1;else if("L"===R||"Z"===R)"Z"===R&&(C=k,P=L,O.closed=!0),("L"===R||xa(r-C)>.5||xa(s-P)>.5)&&(de(r,s,C,P),"L"===R&&(x+=2)),r=C,s=P;else if("A"===R){if(ge=e[x+5],V=e[x+6],z=e[x+7],M=7,(fe=e[x+4]).length>1&&(fe.length<3?(z=V,V=ge,M--):(z=ge,V=fe.substr(2),M-=2),ge=fe.charAt(1),fe=fe.charAt(0)),W=Wx(r,s,+e[x+1],+e[x+2],+e[x+3],+fe,+ge,(F?r:0)+1*V,(F?s:0)+1*z),x+=M,W)for(M=0;M<W.length;M++)O.push(W[M]);r=O[O.length-2],s=O[O.length-1]}else console.log(_);return(x=O.length)<6?(t.pop(),x=0):O[0]===O[x-2]&&O[1]===O[x-1]&&(O.closed=!0),t.totalPoints=g+x,t}function Xx(f,e){void 0===e&&(e=1);for(var t=f[0],r=0,s=[t,r],l=2;l<f.length;l+=2)s.push(t,r,f[l],r=(f[l]-t)*e/2,t=f[l],-r);return s}function vg(f,e){xa(f[0]-f[2])<1e-4&&xa(f[1]-f[3])<1e-4&&(f=f.slice(2));var C,P,R,F,O,k,L,z,W,ne,fe,ge,de,ie,t=f.length-2,r=+f[0],s=+f[1],l=+f[2],u=+f[3],g=[r,s,r,s],_=l-r,x=u-s,M=Math.abs(f[t]-r)<.001&&Math.abs(f[t+1]-s)<.001;for(M&&(f.push(l,u),l=r,u=s,f.unshift(r=f[t-2],s=f[t-1]),t+=4),e=e||0===e?+e:1,R=2;R<t;R+=2)C=r,P=s,s=u,u=+f[R+3],((r=l)!==(l=+f[R+2])||s!==u)&&(F=_,O=x,_=l-r,x=u-s,z=((k=cl(F*F+O*O))+(L=cl(_*_+x*x)))*e*.25/cl(Math.pow(_/L+F/k,2)+Math.pow(x/L+O/k,2)),fe=r-((W=r-(r-C)*(k?z/k:0))+(((ne=r+(l-r)*(L?z/L:0))-W)*(3*k/(k+L)+.5)/4||0)),ie=s-((ge=s-(s-P)*(k?z/k:0))+(((de=s+(u-s)*(L?z/L:0))-ge)*(3*k/(k+L)+.5)/4||0)),(r!==C||s!==P)&&g.push(ar(W+fe),ar(ge+ie),ar(r),ar(s),ar(ne+fe),ar(de+ie)));
72return r!==l||s!==u||g.length<4?g.push(ar(l),ar(u),ar(l),ar(u)):g.length-=2,2===g.length?g.push(r,s,r,s,r,s):M&&(g.splice(0,6),g.length=g.length-6),g}function xg(f){t_(f[0])&&(f=[f]);var r,s,l,u,e="",t=f.length;for(s=0;s<t;s++){for(e+="M"+ar((u=f[s])[0])+","+ar(u[1])+" C",r=u.length,l=2;l<r;l++)e+=ar(u[l++])+","+ar(u[l++])+" "+ar(u[l++])+","+ar(u[l++])+" "+ar(u[l++])+","+ar(u[l])+" ";u.closed&&(e+="z")}return e}var $l,dh,Eg,bu,Hf,wp,Cp,Qf,c_,_o="transform",bg=_o+"Origin",h_=function(e){var t=e.ownerDocument||e;for((!(_o in e.style)&&"msTransform"in e.style&&(bg=(_o="msTransform")+"Origin"));t.parentNode&&(t=t.parentNode););if(dh=window,Cp=new Wf,t){Eg=t.documentElement,bu=t.body,(Qf=($l=t).createElementNS("http://www.w3.org/2000/svg","g")).style.transform="none";var r=t.createElement("div"),s=t.createElement("div");bu.appendChild(r),r.appendChild(s),r.style.position="static",r.style[_o]="translate3d(0,0,1px)",c_=s.offsetParent!==r,bu.removeChild(r)}return t},u_=[],f_=[],Sg=function(e){return e.ownerSVGElement||("svg"===(e.tagName+"").toLowerCase()?e:null)},Zx=function f(e){return"fixed"===dh.getComputedStyle(e).position||((e=e.parentNode)&&1===e.nodeType?f(e):void 0)},Mg=function f(e,t){if(e.parentNode&&($l||h_(e))){var r=Sg(e),s=r?r.getAttribute("xmlns")||"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",l=r?t?"rect":"g":"div",u=2!==t?0:100,g=3===t?100:0,_="position:absolute;display:block;pointer-events:none;margin:0;padding:0;",x=$l.createElementNS?$l.createElementNS(s.replace(/^https/,"http"),l):$l.createElement(l);return t&&(r?(wp||(wp=f(e)),x.setAttribute("width",.01),x.setAttribute("height",.01),x.setAttribute("transform","translate("+u+","+g+")"),wp.appendChild(x)):(Hf||((Hf=f(e)).style.cssText=_),x.style.cssText=_+"width:0.1px;height:0.1px;top:"+g+"px;left:"+u+"px",Hf.appendChild(x))),x}throw"Need document and parent."},wg=function(e,t,r,s,l,u,g){return e.a=t,e.b=r,e.c=s,e.d=l,e.e=u,e.f=g,e},Wf=function(){function f(t,r,s,l,u,g){void 0===t&&(t=1),void 0===r&&(r=0),void 0===s&&(s=0),void 0===l&&(l=1),void 0===u&&(u=0),void 0===g&&(g=0),wg(this,t,r,s,l,u,g)}var e=f.prototype;return e.inverse=function(){var r=this.a,s=this.b,l=this.c,u=this.d,g=this.e,_=this.f,x=r*u-s*l||1e-10;return wg(this,u/x,-s/x,-l/x,r/x,(l*_-u*g)/x,-(r*_-s*g)/x)},e.multiply=function(r){var s=this.a,l=this.b,u=this.c,g=this.d,M=r.a,C=r.c,P=r.b,R=r.d,F=r.e,O=r.f;return wg(this,M*s+P*u,M*l+P*g,C*s+R*u,C*l+R*g,this.e+F*s+O*u,this.f+F*l+O*g)},e.clone=function(){return new f(this.a,this.b,this.c,this.d,this.e,this.f)},e.equals=function(r){return this.a===r.a&&this.b===r.b&&this.c===r.c&&this.d===r.d&&this.e===r.e&&this.f===r.f},e.apply=function(r,s){void 0===s&&(s={});var l=r.x,u=r.y,_=this.b,M=this.d,P=this.f;return s.x=l*this.a+u*this.c+this.e||0,s.y=l*_+u*M+P||0,s},f}();function Su(f,e,t,r){if(!f||!f.parentNode||($l||h_(f)).documentElement===f)return new Wf;var s=function(e){for(var t,r;e&&e!==bu;)(r=e._gsap)&&r.uncache&&r.get(e,"x"),r&&!r.scaleX&&!r.scaleY&&r.renderTransform&&(r.scaleX=r.scaleY=1e-4,r.renderTransform(1,r),t?t.push(r):t=[r]),e=e.parentNode;return t}(f),u=Sg(f)?u_:f_,g=function(e,t){var g,_,x,M,C,P,r=Sg(e),s=e===r,l=r?u_:f_,u=e.parentNode;if(e===dh)return e;if(l.length||l.push(Mg(e,1),Mg(e,2),Mg(e,3)),g=r?wp:Hf,r)s?(x=function(e){var r,t=e.getCTM();return t||(r=e.style[_o],e.style[_o]="none",e.appendChild(Qf),t=Qf.getCTM(),e.removeChild(Qf),r?e.style[_o]=r:e.style.removeProperty(_o.replace(/([A-Z])/g,"-$1").toLowerCase())),t||Cp.clone()}(e),M=-x.e/x.a,C=-x.f/x.d,_=Cp):e.getBBox?(x=e.getBBox(),_=(_=e.transform?e.transform.baseVal:{}).numberOfItems?_.numberOfItems>1?function(e){for(var t=new Wf,r=0;r<e.numberOfItems;
72r++)t.multiply(e.getItem(r).matrix);return t}(_):_.getItem(0).matrix:Cp,M=_.a*x.x+_.c*x.y,C=_.b*x.x+_.d*x.y):(_=new Wf,M=C=0),t&&"g"===e.tagName.toLowerCase()&&(M=C=0),(s?r:u).appendChild(g),g.setAttribute("transform","matrix("+_.a+","+_.b+","+_.c+","+_.d+","+(_.e+M)+","+(_.f+C)+")");else{if(M=C=0,c_)for(_=e.offsetParent,x=e;x&&(x=x.parentNode)&&x!==_&&x.parentNode;)(dh.getComputedStyle(x)[_o]+"").length>4&&(M=x.offsetLeft,C=x.offsetTop,x=0);if("absolute"!==(P=dh.getComputedStyle(e)).position&&"fixed"!==P.position)for(_=e.offsetParent;u&&u!==_;)M+=u.scrollLeft||0,C+=u.scrollTop||0,u=u.parentNode;(x=g.style).top=e.offsetTop-C+"px",x.left=e.offsetLeft-M+"px",x[_o]=P[_o],x[bg]=P[bg],x.position="fixed"===P.position?"fixed":"absolute",e.parentNode.appendChild(g)}return g}(f,t),_=u[0].getBoundingClientRect(),x=u[1].getBoundingClientRect(),M=u[2].getBoundingClientRect(),C=g.parentNode,P=!r&&Zx(f),R=new Wf((x.left-_.left)/100,(x.top-_.top)/100,(M.left-_.left)/100,(M.top-_.top)/100,_.left+(P?0:dh.pageXOffset||$l.scrollLeft||Eg.scrollLeft||bu.scrollLeft||0),_.top+(P?0:dh.pageYOffset||$l.scrollTop||Eg.scrollTop||bu.scrollTop||0));if(C.removeChild(g),s)for(_=s.length;_--;)(x=s[_]).scaleX=x.scaleY=0,x.renderTransform(1,x);return e?R.inverse():R}var vo,d_,Mu,Cg,Tg,p_,t1="x,translateX,left,marginLeft,xPercent".split(","),n1="y,translateY,top,marginTop,yPercent".split(","),r1=Math.PI/180,Xf=function(e,t,r,s){for(var l=t.length,u=2===s?0:s,g=0;g<l;g++)e[u]=parseFloat(t[g][r]),2===s&&(e[u+1]=0),u+=2;return e},wu=function(e,t,r){return parseFloat(e._gsap.get(e,t,r||"px"))||0},m_=function(e){var s,t=e[0],r=e[1];for(s=2;s<e.length;s+=2)t=e[s]+=t,r=e[s+1]+=r},g_=function(e,t,r,s,l,u,g,_,x){return"cubic"===g.type?t=[t]:(!1!==g.fromCurrent&&t.unshift(wu(r,s,_),l?wu(r,l,x):0),g.relative&&m_(t),t=[(l?vg:Xx)(t,g.curviness)]),t=u(__(t,r,g)),Tp(e,r,s,t,"x",_),l&&Tp(e,r,l,t,"y",x),Ec(t,g.resolution||(0===g.curviness?20:12))},a1=function(e){return e},o1=/[-+\.]*\d+\.?(?:e-|e\+)?\d*/g,A_=function(e,t,r){var g,s=Su(e),l=0,u=0;return"svg"===(e.tagName+"").toLowerCase()?(g=e.viewBox.baseVal).width||(g={width:+e.getAttribute("width"),height:+e.getAttribute("height")}):g=t&&e.getBBox&&e.getBBox(),t&&"auto"!==t&&(l=t.push?t[0]*(g?g.width:e.offsetWidth||0):t.x,u=t.push?t[1]*(g?g.height:e.offsetHeight||0):t.y),r.apply(l||u?s.apply({x:l,y:u}):{x:s.e,y:s.f})},Ig=function(e,t,r,s){var C,l=Su(e.parentNode,!0,!0),u=l.clone().multiply(Su(t)),g=A_(e,r,l),_=A_(t,s,l),x=_.x,M=_.y;return u.e=u.f=0,"auto"===s&&t.getTotalLength&&"path"===t.tagName.toLowerCase()&&(C=t.getAttribute("d").match(o1)||[],x+=(C=u.apply({x:+C[0],y:+C[1]})).x,M+=C.y),C&&(x-=(C=u.apply(t.getBBox())).x,M-=C.y),u.e=x-g.x,u.f=M-g.y,u},__=function(e,t,r){var R,F,O,s=r.align,l=r.matrix,u=r.offsetX,g=r.offsetY,_=r.alignOrigin,x=e[0][0],M=e[0][1],C=wu(t,"x"),P=wu(t,"y");return e&&e.length?(s&&("self"===s||(R=Cg(s)[0]||t)===t?Eu(e,1,0,0,1,C-x,P-M):(_&&!1!==_[2]?vo.set(t,{transformOrigin:100*_[0]+"% "+100*_[1]+"%"}):_=[wu(t,"xPercent")/-100,wu(t,"yPercent")/-100],O=(F=Ig(t,R,_,"auto")).apply({x,y:M}),Eu(e,F.a,F.b,F.c,F.d,C+F.e-(O.x-F.e),P+F.f-(O.y-F.f)))),l?Eu(e,l.a,l.b,l.c,l.d,l.e,l.f):(u||g)&&Eu(e,1,0,0,1,u||0,g||0),e):ql("M0,0L0,0")},Tp=function(e,t,r,s,l,u){var g=t._gsap,_=g.harness,x=_&&_.aliases&&_.aliases[r],M=x&&x.indexOf(",")<0?x:r,C=e._pt=new d_(e._pt,t,M,0,0,a1,0,g.set(t,M,e));C.u=Mu(g.get(t,M,u))||0,C.path=s,C.pp=l,e._props.push(M)},v_={version:"3.12.1",name:"motionPath",register:function(e,t,r){Mu=(vo=e).utils.getUnit,Cg=vo.utils.toArray,Tg=vo.core.getStyleSaver,p_=vo.core.reverting||function(){},d_=r},init:function(e,t,r){if(!vo)return console.warn("Please gsap.registerPlugin(MotionPathPlugin)"),!1;("object"!=typeof t||t.style||!t.path)&&(t={path:t});var F,O,s=[],u=t.path,g=t.autoRotate,_=t.unitX,x=t.unitY,M=t.x,C=t.y,P=u[0],R=function(e,t){return function(r){return e||1!==t?Gf(r,e,t):r}}(t.start,"end"in t?t.end:1);if(this.rawPaths=s,this.target=e,this.tween=r,this.styles=Tg&&Tg(e,"transform"),(this.rotate=g||0===g)&&(this.rOffset=parseFloat(g)||0,this.radians=!!t.useRadians,this.rProp=t.rotation||"rotation",this.rSet=e._gsap.set(e,this.rProp,this),this.ru=Mu(e._gs
72ap.get(e,this.rProp))||0),Array.isArray(u)&&!("closed"in u)&&"number"!=typeof P){for(O in P)!M&&~t1.indexOf(O)?M=O:!C&&~n1.indexOf(O)&&(C=O);for(O in M&&C?s.push(g_(this,Xf(Xf([],u,M,0),u,C,1),e,M,C,R,t,_||Mu(u[0][M]),x||Mu(u[0][C]))):M=C=0,P)O!==M&&O!==C&&s.push(g_(this,Xf([],u,O,2),e,O,0,R,t,Mu(u[0][O])))}else Ec(F=R(__(ql(t.path),e,t)),t.resolution),s.push(F),Tp(this,e,t.x||"x",F,"x",t.unitX||"px"),Tp(this,e,t.y||"y",F,"y",t.unitY||"px")},render:function(e,t){var r=t.rawPaths,s=r.length,l=t._pt;if(t.tween._time||!p_()){for(e>1?e=1:e<0&&(e=0);s--;)o_(r[s],e,!s&&t.rotate,r[s]);for(;l;)l.set(l.t,l.p,l.path[l.pp]+l.u,l.d,e),l=l._next;t.rotate&&t.rSet(t.target,t.rProp,r[0].angle*(t.radians?r1:1)+t.rOffset+t.ru,t,e)}else t.styles.revert()},getLength:function(e){return Ec(ql(e)).totalLength},sliceRawPath:Gf,getRawPath:ql,pointsToSegment:vg,stringToRawPath:Vf,rawPathToString:xg,transformRawPath:Eu,getGlobalMatrix:Su,getPositionOnPath:o_,cacheRawPathMeasurements:Ec,convertToPath:function(e,t){return Cg(e).map(function(r){return function Qx(f,e){var s,l,u,g,_,x,M,C,P,R,F,O,k,L,V,z,W,ne,fe,ge,de,ie,t=f.tagName.toLowerCase(),r=.552284749831;return"path"!==t&&f.getBBox?(x=function(e,t){var u,r=document.createElementNS("http://www.w3.org/2000/svg","path"),s=[].slice.call(e.attributes),l=s.length;for(t=","+t+",";--l>-1;)u=s[l].nodeName.toLowerCase(),t.indexOf(","+u+",")<0&&r.setAttributeNS(null,u,s[l].nodeValue);return r}(f,"x,y,width,height,cx,cy,rx,ry,r,x1,x2,y1,y2,points"),ie=function(e,t){for(var r=t?t.split(","):[],s={},l=r.length;--l>-1;)s[r[l]]=+e.getAttribute(r[l])||0;return s}(f,_g[t]),"rect"===t?(l=ie.x,u=ie.y,R=ie.width-2*(g=ie.rx),F=ie.height-2*(_=ie.ry||g),s=g||_?"M"+(z=(L=(k=l+g)+R)+g)+","+(ne=u+_)+" V"+(fe=ne+F)+" C"+[z,ge=fe+_*r,V=L+g*r,de=fe+_,L,de,L-(L-k)/3,de,k+(L-k)/3,de,k,de,O=l+g*(1-r),de,l,ge,l,fe,l,fe-(fe-ne)/3,l,ne+(fe-ne)/3,l,ne,l,W=u+_*(1-r),O,u,k,u,k+(L-k)/3,u,L-(L-k)/3,u,L,u,V,u,z,W,z,ne].join(",")+"z":"M"+(l+R)+","+u+" v"+F+" h"+-R+" v"+-F+" h"+R+"z"):"circle"===t||"ellipse"===t?("circle"===t?C=(g=_=ie.r)*r:(g=ie.rx,C=(_=ie.ry)*r),s="M"+((l=ie.cx)+g)+","+(u=ie.cy)+" C"+[l+g,u+C,l+(M=g*r),u+_,l,u+_,l-M,u+_,l-g,u+C,l-g,u,l-g,u-C,l-M,u-_,l,u-_,l+M,u-_,l+g,u-C,l+g,u].join(",")+"z"):"line"===t?s="M"+ie.x1+","+ie.y1+" L"+ie.x2+","+ie.y2:("polyline"===t||"polygon"===t)&&(s="M"+(l=(P=(f.getAttribute("points")+"").match(yu)||[]).shift())+","+(u=P.shift())+" L"+P.join(","),"polygon"===t&&(s+=","+l+","+u+"z")),x.setAttribute("d",xg(x._gsRawPath=Vf(s))),e&&f.parentNode&&(f.parentNode.insertBefore(x,f),f.parentNode.removeChild(f)),x):f}(r,!1!==t)})},convertCoordinates:function(e,t,r){var s=Su(t,!0,!0).multiply(Su(e));return r?s.apply(r):s},getAlignMatrix:Ig,getRelativePosition:function(e,t,r,s){var l=Ig(e,t,r,s);return{x:l.e,y:l.f}},arrayToRawPath:function(e,t){var r=Xf(Xf([],e,(t=t||{}).x||"x",0),e,t.y||"y",1);return t.relative&&m_(r),["cubic"===t.type?r:vg(r,t.curviness)]}};(vo||typeof window<"u"&&(vo=window.gsap)&&vo.registerPlugin&&vo)&&vo.registerPlugin(v_);var xi=v(89204),ul=v(24398),qf=v(87416),Pg=v(91890),fl=v(82886),y_=v(51601),c1=v(2747),Rg=v(63163);const Yf=(f,e)=>{const t=f._$AN;if(void 0===t)return!1;for(const r of t)r._$AO?.(e,!1),Yf(r,e);return!0},Ip=f=>{let e,t;do{if(void 0===(e=f._$AM))break;t=e._$AN,t.delete(f),f=e}while(0===t?.size)},x_=f=>{for(let e;e=f._$AM;f=e){let t=e._$AN;if(void 0===t)e._$AN=t=new Set;else if(t.has(f))break;t.add(f),f1(e)}};function h1(f){void 0!==this._$AN?(Ip(this),this._$AM=f,x_(this)):this._$AM=f}function u1(f,e=!1,t=0){const r=this._$AH,s=this._$AN;if(void 0!==s&&0!==s.size)if(e)if(Array.isArray(r))for(let l=t;l<r.length;l++)Yf(r[l],!1),Ip(r[l]);else null!=r&&(Yf(r,!1),Ip(r));else Yf(this,f)}const f1=f=>{f.type==Rg.OA.CHILD&&(f._$AP??=u1,f._$AQ??=h1)};class d1 extends Rg.WL{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,t,r){super._$AT(e,t,r),x_(this),this.isConnected=e._$AU}_$AO(e,t=!0){e!==this.isConnected&&(this.isConnected=e,e?this.reconnected?.():this.disconnected?.()),t&&(Yf(this,e),Ip(this))}setValue(e){if((0,c1.Rt)(this._$Ct))this._$Ct._$AI(e,this);else{const t=[...this._$Ct._$AH];t[this._$Ci]=e,this._$Ct._$AI(t,this,0)}}disconnected(){}reconnected(){}}class m1{}const Bg=new WeakMap,g1=(0,Rg.u$)(class extends d1{render(f){return y_.s6}update(f,[e]){const t=e!==this.Y;return t&&void 0!==this.Y&&this.rt(void 0),(t||this.lt!==this.ct)&&(this.Y=e,this.ht=f.options?.host,this.rt(this.ct=f.element)),y_.s6}rt(f){if(this.isConnected||(f=void 0),"function"==typeof this.Y){const e=this.ht??globalThis;let t=Bg.get(e);void 0===t&&(t=new WeakMap,Bg.set(e,t)),void 0!==t.get(this.Y)&&this.Y.call(this.ht,void 0),t.set(this.Y,f),void 0!==f&&this.Y.call(this.ht,f)}else this.Y.value=f}get lt(){return"function"==typeof this.Y?Bg.get(this.ht??globalThis)?.get(this.Y):this.Y?.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}}),b_=1,v1=2,$f=3,Kl=0,ka=1,No=2,Tu=100,qS=101,YS=102,$S=200,KS=201,ZS=202,jS=203,b1=204,S1=205,JS=206,eM=207,tM=208,nM=209,iM=210,Fg=0,uM=1,fM=2,Mc=0,M1=1,dM=2,pM=3,w1=4,mM=5,Iu=301,bi=302,wc=306,Zl=1e3,aa=1001,Kf=1002,Hr=1003,Pp=1004,Cc=1005,Tr=1006,jl=1007,Uo=1008,rs=1009,Tc=1014,Os=1015,Ka=1016,Ic=1020,Ns=1023,ph=1026,Ru=1027,Bu=1028,jf=1030,Jf=33776,ed=33779,kp=36492,td=2300,Du=2301,Fu=2400,ku=2401,zo=3e3,Ui=3001,yo="srgb",Ou="srgb-linear",J_="display-p3",iv="300 es";class Pc{addEventListener(e,t){void 0===this._listeners&&(this._listeners={});const r=this._listeners;void 0===r[e]&&(r[e]=[]),-1===r[e].indexOf(t)&&r[e].push(t)}hasEventListener(e,t){if(void 0===this._listeners)return!1;const r=this._listeners;return void 0!==r[e]&&-1!==r[e].indexOf(t)}removeEventListener(e,t){if(void 0===this._listeners)return;const s=this._listeners[e];if(void 0!==s){const l=s.indexOf(t);-1!==l&&s.splice(l,1)}}dispatchEvent(e){if(void 0===this._listeners)return;const r=this._listeners[e.type];if(void 0!==r){e.target=this;const s=r.slice(0);for(let l=0,u=s.length;l<u;l++)s[l].call(this,e);e.target=null}}}const oa=["00","01","02","03","04","05","06","07","08","09","0a","0b","0c","0d","0e","0f","10","11","12","13","14","15","16","17","18","19","1a","1b","1c","1d","1e","1f","20","21","22","23","24","25","26","27","28","29","2a","2b","2c","2d","2e","2f","30","31","32","33","34","35","36","37","38","39","3a","3b","3c","3d","3e","3f","40","41","42","43","44","45","46","47","48","49","4a","4b","4c","4d","4e","4f","50","51","52","53","54","5
725","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"];const Ah=Math.PI/180,Nu=180/Math.PI;function Za(){const f=4294967295*Math.random()|0,e=4294967295*Math.random()|0,t=4294967295*Math.random()|0,r=4294967295*Math.random()|0;return(oa[255&f]+oa[f>>8&255]+oa[f>>16&255]+oa[f>>24&255]+"-"+oa[255&e]+oa[e>>8&255]+"-"+oa[e>>16&15|64]+oa[e>>24&255]+"-"+oa[63&t|128]+oa[t>>8&255]+"-"+oa[t>>16&255]+oa[t>>24&255]+oa[255&r]+oa[r>>8&255]+oa[r>>16&255]+oa[r>>24&255]).toLowerCase()}function jr(f,e,t){return Math.max(e,Math.min(t,f))}function Hg(f,e){return(f%e+e)%e}function id(f,e,t){return(1-t)*f+t*e}function Xg(f){return!(f&f-1)&&0!==f}function lv(f){return Math.pow(2,Math.ceil(Math.log(f)/Math.LN2))}function cv(f){return Math.pow(2,Math.floor(Math.log(f)/Math.LN2))}function Na(f,e){switch(e.constructor){case Float32Array:return f;case Uint16Array:return f/65535;case Uint8Array:return f/255;case Int16Array:return Math.max(f/32767,-1);case Int8Array:return Math.max(f/127,-1);default:throw new Error("Invalid component type.")}}function Bi(f,e){switch(e.constructor){case Float32Array:return f;case Uint16Array:return Math.round(65535*f);case Uint8Array:return Math.round(255*f);case Int16Array:return Math.round(32767*f);case Int8Array:return Math.round(127*f);default:throw new Error("Invalid component type.")}}const Jr_degToRad=function Wg(f){return f*Ah},Jr_radToDeg=function K1(f){return f*Nu};class Rt{constructor(e=0,t=0){Rt.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,r=this.y,s=e.elements;return this.x=s[0]*t+s[3]*r+s[6],this.y=s[1]*t+s[4]*r+s[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 r=this.length();return this.divideScalar(r||1).multiplyScalar(Math.max(e,Math.min(t,r)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}
vendor: 4,823 bytes, line 72
72round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(0===t)return Math.PI/2;const r=this.dot(e)/t;return Math.acos(jr(r,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,r=this.y-e.y;return t*t+r*r}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,r){return this.x=e.x+(t.x-e.x)*r,this.y=e.y+(t.y-e.y)*r,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 r=Math.cos(t),s=Math.sin(t),l=this.x-e.x,u=this.y-e.y;return this.x=l*r-u*s+e.x,this.y=l*s+u*r+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class zi{constructor(){zi.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1]}set(e,t,r,s,l,u,g,_,x){const M=this.elements;return M[0]=e,M[1]=s,M[2]=g,M[3]=t,M[4]=l,M[5]=_,M[6]=r,M[7]=u,M[8]=x,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){const t=this.elements,r=e.elements;return t[0]=r[0],t[1]=r[1],t[2]=r[2],t[3]=r[3],t[4]=r[4],t[5]=r[5],t[6]=r[6],t[7]=r[7],t[8]=r[8],this}extractBasis(e,t,r){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),r.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 r=e.elements,s=t.elements,l=this.elements,u=r[0],g=r[3],_=r[6],x=r[1],M=r[4],C=r[7],P=r[2],R=r[5],F=r[8],O=s[0],k=s[3],L=s[6],V=s[1],z=s[4],W=s[7],ne=s[2],fe=s[5],ge=s[8];return l[0]=u*O+g*V+_*ne,l[3]=u*k+g*z+_*fe,l[6]=u*L+g*W+_*ge,l[1]=x*O+M*V+C*ne,l[4]=x*k+M*z+C*fe,l[7]=x*L+M*W+C*ge,l[2]=P*O+R*V+F*ne,l[5]=P*k+R*z+F*fe,l[8]=P*L+R*W+F*ge,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],r=e[1],s=e[2],l=e[3],u=e[4],g=e[5],_=e[6],x=e[7],M=e[8];return t*u*M-t*g*x-r*l*M+r*g*_+s*l*x-s*u*_}invert(){const e=this.elements,t=e[0],r=e[1],s=e[2],l=e[3],u=e[4],g=e[5],_=e[6],x=e[7],M=e[8],C=M*u-g*x,P=g*_-M*l,R=x*l-u*_,F=t*C+r*P+s*R;if(0===F)return this.set(0,0,0,0,0,0,0,0,0);const O=1/F;return e[0]=C*O,e[1]=(s*x-M*r)*O,e[2]=(g*r-s*u)*O,e[3]=P*O,e[4]=(M*t-s*_)*O,e[5]=(s*l-g*t)*O,e[6]=R*O,e[7]=(r*_-x*t)*O,e[8]=(u*t-r*l)*O,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,r,s,l,u,g){const _=Math.cos(l),x=Math.sin(l);return this.set(r*_,r*x,-r*(_*u+x*g)+u+e,-s*x,s*_,-s*(-x*u+_*g)+g+t,0,0,1),this}scale(e,t){return this.premultiply(zp.makeScale(e,t)),this}rotate(e){return this.premultiply(zp.makeRotation(-e)),this}translate(e,t){return this.premultiply(zp.makeTranslation(e,t)),this}makeTranslation(e,t){return this.set(1,0,e,0,1,t,0,0,1),this}makeRotation(e){const t=Math.cos(e),r=Math.sin(e);return this.set(t,-r,0,r,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,r=e.elements;for(let s=0;s<9;s++)if(t[s]!==r[s])return!1;return!0}fromArray(e,t=0){for(let r=0;r<9;r++)this.elements[r]=e[r+t];return this}toArray(e=[],t=0){const r=this.elements;return e[t]=r[0],e[t+1]=r[1],e[t+2]=r[2],e[t+3]=r[3],e[t+4]=r[4],e[t+5]=r[5],e[t+6]=r[6],e[t+7]=r[7],e[t+8]=r[8],e}clone(){return(new this.constructor).fromArray(this.elements)}}const zp=new zi;function hv(f){for(let e=f.length-1;e>=0;--e)if(f[e]>=65535)return!0;return!1}function rd(f){return document.createElementNS("http://www.w3.org/1999/xhtml",f)}function _h(f){return f<.04045?.0773993808*f:Math.pow(.9478672986*f+.0521327014,2.4)}
72function Gp(f){return f<.0031308?12.92*f:1.055*Math.pow(f,.41666)-.055}Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array;const Vp=(new zi).fromArray([.8224621,.0331941,.0170827,.177538,.9668058,.0723974,-1e-7,1e-7,.9105199]),Hp=(new zi).fromArray([1.2249401,-.0420569,-.0196376,-.2249404,1.0420571,-.0786361,1e-7,0,1.0982735]),Ea={[Ou]:f=>f,[yo]:f=>f.convertSRGBToLinear(),[J_]:function uv(f){return f.convertSRGBToLinear().applyMatrix3(Hp)}},vh={[Ou]:f=>f,[yo]:f=>f.convertLinearToSRGB(),[J_]:function Qp(f){return f.applyMatrix3(Vp).convertLinearToSRGB()}},la={enabled:!1,get legacyMode(){return console.warn("THREE.ColorManagement: .legacyMode=false renamed to .enabled=true in r150."),!this.enabled},set legacyMode(f){console.warn("THREE.ColorManagement: .legacyMode=false renamed to .enabled=true in r150."),this.enabled=!f},get workingColorSpace(){return Ou},set workingColorSpace(f){console.warn("THREE.ColorManagement: .workingColorSpace is readonly.")},convert:function(f,e,t){if(!1===this.enabled||e===t||!e||!t)return f;const r=Ea[e],s=vh[t];if(void 0===r||void 0===s)throw new Error(`Unsupported color space conversion, "${e}" to "${t}".`);return s(r(f))},fromWorkingColorSpace:function(f,e){return this.convert(f,this.workingColorSpace,e)},toWorkingColorSpace:function(f,e){return this.convert(f,e,this.workingColorSpace)}};let Go;class zu{static getDataURL(e){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement>"u")return e.src;let t;if(e instanceof HTMLCanvasElement)t=e;else{void 0===Go&&(Go=rd("canvas")),Go.width=e.width,Go.height=e.height;const r=Go.getContext("2d");e instanceof ImageData?r.putImageData(e,0,0):r.drawImage(e,0,0,e.width,e.height),t=Go}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=rd("canvas");t.width=e.width,t.height=e.height;const r=t.getContext("2d");r.drawImage(e,0,0,e.width,e.height);const s=r.getImageData(0,0,e.width,e.height),l=s.data;for(let u=0;u<l.length;u++)l[u]=255*_h(l[u]/255);return r.putImageData(s,0,0),t}if(e.data){const t=e.data.slice(0);for(let r=0;r<t.length;r++)t[r]=t instanceof Uint8Array||t instanceof Uint8ClampedArray?Math.floor(255*_h(t[r]/255)):_h(t[r]);return{data:t,width:e.width,height:e.height}}return console.warn("THREE.ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied."),e}}class Vo{constructor(e=null){this.isSource=!0,this.uuid=Za(),this.data=e,this.version=0}set needsUpdate(e){!0===e&&this.version++}toJSON(e){const t=void 0===e||"string"==typeof e;if(!t&&void 0!==e.images[this.uuid])return e.images[this.uuid];const r={uuid:this.uuid,url:""},s=this.data;if(null!==s){let l;if(Array.isArray(s)){l=[];for(let u=0,g=s.length;u<g;u++)l.push(Rc(s[u].isDataTexture?s[u].image:s[u]))}else l=Rc(s);r.url=l}return t||(e.images[this.uuid]=r),r}}function Rc(f){return typeof HTMLImageElement<"u"&&f instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&f instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&f instanceof ImageBitmap?zu.getDataURL(f):f.data?{data:Array.from(f.data),width:f.width,height:f.height,type:f.data.constructor.name}:(console.warn("THREE.Texture: Unable to serialize Texture."),{})}let Gu=0,ws=(()=>{class f extends Pc{constructor(t=f.DEFAULT_IMAGE,r=f.DEFAULT_MAPPING,s=aa,l=aa,u=Tr,g=Uo,_=Ns,x=rs,M=f.DEFAULT_ANISOTROPY,C=zo){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:Gu++}),this.uuid=Za(),this.name="",this.source=new Vo(t),this.mipmaps=[],this.mapping=r,this.channel=0,this.wrapS=s,this.wrapT=l,this.magFilter=u,this.minFilter=g,this.anisotropy=M,this.format=_,this.internalFormat=null,this.type=x,this.offset=new Rt(0,0),this.repeat=new Rt(1,1),this.center=new Rt(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new zi,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.encoding=C,this.userData={},this.version=0,this.onUpdate=null,this.isRenderTargetTexture=!1,this.needsPMREMUpdate=!1}get image(){return this.source.data}set image(t=null){this.source.data=t}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}clone(){return(new this.constructor).copy(this)}copy(t){return this.name=t.name,this.source=t.source,this.mipmaps=t.mipmaps.slice(0),this.mapping=t.mapping,this.channel=t.channel,this.wrapS=t.wrapS,this.wrapT=t.wrapT,this.magFilter=t.magFilter,this.minFilter=t.minFilter,this.anisotropy=t.anisotropy,this.format=t.format,this.internalFormat=t.internalFormat,this.type=t.type,this.offset.copy(t.offset),this.repeat.copy(t.repeat),this.center.copy(t.center),this.rotation=t.rotation,this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrix.copy(t.matrix),this.generateMipmaps=t.generateMipmaps,this.premultiplyAlpha=t.premultiplyAlpha,this.flipY=t.flipY,this.unpackAlignment=t.unpackAlignment,this.encoding=t.encoding,this.userData=JSON.parse(JSON.stringify(t.userData)),this.needsUpdate=!0,this}toJSON(t){const r=void 0===t||"string"==typeof t;if(!r&&void 0!==t.textures[this.uuid])return t.textures[this.uuid];const s={metadata:{version:4.5,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,image:this.source.toJSON(t).uuid,mapping:this.mapping,channel:this.channel,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,internalFormat:this.internalFormat,type:this.t
vendor: 4,843 bytes, line 72
72ype,encoding:this.encoding,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,generateMipmaps:this.generateMipmaps,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};return Object.keys(this.userData).length>0&&(s.userData=this.userData),r||(t.textures[this.uuid]=s),s}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(t){if(300!==this.mapping)return t;if(t.applyMatrix3(this.matrix),t.x<0||t.x>1)switch(this.wrapS){case Zl:t.x=t.x-Math.floor(t.x);break;case aa:t.x=t.x<0?0:1;break;case 1002:t.x=1===Math.abs(Math.floor(t.x)%2)?Math.ceil(t.x)-t.x:t.x-Math.floor(t.x)}if(t.y<0||t.y>1)switch(this.wrapT){case Zl:t.y=t.y-Math.floor(t.y);break;case aa:t.y=t.y<0?0:1;break;case 1002:t.y=1===Math.abs(Math.floor(t.y)%2)?Math.ceil(t.y)-t.y:t.y-Math.floor(t.y)}return this.flipY&&(t.y=1-t.y),t}set needsUpdate(t){!0===t&&(this.version++,this.source.needsUpdate=!0)}}return f.DEFAULT_IMAGE=null,f.DEFAULT_MAPPING=300,f.DEFAULT_ANISOTROPY=1,f})();class Ar{constructor(e=0,t=0,r=0,s=1){Ar.prototype.isVector4=!0,this.x=e,this.y=t,this.z=r,this.w=s}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,r,s){return this.x=e,this.y=t,this.z=r,this.w=s,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;case 3:this.w=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=void 0!==e.w?e.w:1,this}add(e){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,r=this.y,s=this.z,l=this.w,u=e.elements;return this.x=u[0]*t+u[4]*r+u[8]*s+u[12]*l,this.y=u[1]*t+u[5]*r+u[9]*s+u[13]*l,this.z=u[2]*t+u[6]*r+u[10]*s+u[14]*l,this.w=u[3]*t+u[7]*r+u[11]*s+u[15]*l,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,r,s,l;const _=e.elements,x=_[0],M=_[4],C=_[8],P=_[1],R=_[5],F=_[9],O=_[2],k=_[6],L=_[10];if(Math.abs(M-P)<.01&&Math.abs(C-O)<.01&&Math.abs(F-k)<.01){if(Math.abs(M+P)<.1&&Math.abs(C+O)<.1&&Math.abs(F+k)<.1&&Math.abs(x+R+L-3)<.1)return this.set(1,0,0,0),this;t=Math.PI;const z=(x+1)/2,W=(R+1)/2,ne=(L+1)/2,fe=(M+P)/4,ge=(C+O)/4,de=(F+k)/4;return z>W&&z>ne?z<.01?(r=0,s=.707106781,l=.707106781):(r=Math.sqrt(z),s=fe/r,l=ge/r):W>ne?W<.01?(r=.707106781,s=0,l=.707106781):(s=Math.sqrt(W),r=fe/s,l=de/s):ne<.01?(r=.707106781,s=.707106781,l=0):(l=Math.sqrt(ne),r=ge/l,s=de/l),this.set(r,s,l,t),this}let V=Math.sqrt((k-F)*(k-F)+(C-O)*(C-O)+(P-M)*(P-M));return Math.abs(V)<.001&&(V=1),this.x=(k-F)/V,this.y=(C-O)/V,this.z=(P-M)/V,this.w=Math.acos((x+R+L-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 r=this.length();return this.divideScalar(r||1).multiplyScalar(Math.max(e,Math.min(t,r)))}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}
vendor: 18,890 bytes, line 72
72round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this.w=this.w<0?Math.ceil(this.w):Math.floor(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this.w+=(e.w-this.w)*t,this}lerpVectors(e,t,r){return this.x=e.x+(t.x-e.x)*r,this.y=e.y+(t.y-e.y)*r,this.z=e.z+(t.z-e.z)*r,this.w=e.w+(t.w-e.w)*r,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 Ks extends Pc{constructor(e=1,t=1,r={}){super(),this.isWebGLRenderTarget=!0,this.width=e,this.height=t,this.depth=1,this.scissor=new Ar(0,0,e,t),this.scissorTest=!1,this.viewport=new Ar(0,0,e,t),this.texture=new ws({width:e,height:t,depth:1},r.mapping,r.wrapS,r.wrapT,r.magFilter,r.minFilter,r.format,r.type,r.anisotropy,r.encoding),this.texture.isRenderTargetTexture=!0,this.texture.flipY=!1,this.texture.generateMipmaps=void 0!==r.generateMipmaps&&r.generateMipmaps,this.texture.internalFormat=void 0!==r.internalFormat?r.internalFormat:null,this.texture.minFilter=void 0!==r.minFilter?r.minFilter:Tr,this.depthBuffer=void 0===r.depthBuffer||r.depthBuffer,this.stencilBuffer=void 0!==r.stencilBuffer&&r.stencilBuffer,this.depthTexture=void 0!==r.depthTexture?r.depthTexture:null,this.samples=void 0!==r.samples?r.samples:0}setSize(e,t,r=1){(this.width!==e||this.height!==t||this.depth!==r)&&(this.width=e,this.height=t,this.depth=r,this.texture.image.width=e,this.texture.image.height=t,this.texture.image.depth=r,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.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 Vo(t),this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,null!==e.depthTexture&&(this.depthTexture=e.depthTexture.clone()),this.samples=e.samples,this}dispose(){this.dispatchEvent({type:"dispose"})}}class yh extends ws{constructor(e=null,t=1,r=1,s=1){super(null),this.isDataArrayTexture=!0,this.image={data:e,width:t,height:r,depth:s},this.magFilter=Hr,this.minFilter=Hr,this.wrapR=aa,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class Wp extends ws{constructor(e=null,t=1,r=1,s=1){super(null),this.isData3DTexture=!0,this.image={data:e,width:t,height:r,depth:s},this.magFilter=Hr,this.minFilter=Hr,this.wrapR=aa,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class Ir{constructor(e=0,t=0,r=0,s=1){this.isQuaternion=!0,this._x=e,this._y=t,this._z=r,this._w=s}static slerpFlat(e,t,r,s,l,u,g){let _=r[s+0],x=r[s+1],M=r[s+2],C=r[s+3];const P=l[u+0],R=l[u+1],F=l[u+2],O=l[u+3];if(0===g)return e[t+0]=_,e[t+1]=x,e[t+2]=M,void(e[t+3]=C);if(1===g)return e[t+0]=P,e[t+1]=R,e[t+2]=F,void(e[t+3]=O);if(C!==O||_!==P||x!==R||M!==F){let k=1-g;const L=_*P+x*R+M*F+C*O,V=L>=0?1:-1,z=1-L*L;if(z>Number.EPSILON){const ne=Math.sqrt(z),fe=Math.atan2(ne,L*V);k=Math.sin(k*fe)/ne,g=Math.sin(g*fe)/ne}const W=g*V;if(_=_*k+P*W,x=x*k+R*W,M=M*k+F*W,C=C*k+O*W,k===1-g){const ne=1/Math.sqrt(_*_+x*x+M*M+C*C);_*=ne,x*=ne,M*=ne,C*=ne}}e[t]=_,e[t+1]=x,e[t+2]=M,e[t+3]=C}static multiplyQuaternionsFlat(e,t,r,s,l,u){const g=r[s],_=r[s+1],x=r[s+2],M=r[s+3],C=l[u],P=l[u+1],R=l[u+2],F=l[u+3];return e[t]=g*F+M*C+_*R-x*P,e[t+1]=_*F+M*P+x*C-g*R,e[t+2]=x*F+M*R+g*P-_*C,e[t+3]=M*F-g*C-_*P-x*R,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,r,s){return this._x=e,this._y=t,this._z=r,this._w=s,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){const r=e._x,s=e._y,l=e._z,u=e._order,g=Math.cos,_=Math.sin,x=g(r/2),M=g(s/2),C=g(l/2),P=_(r/2),R=_(s/2),F=_(l/2);switch(u){case"XYZ":this._x=P*M*C+x*R*F,this._y=x*R*C-P*M*F,this._z=x*M*F+P*R*C,this._w=x*M*C-P*R*F;break;case"YXZ":this._x=P*M*C+x*R*F,this._y=x*R*C-P*M*F,this._z=x*M*F-P*R*C,this._w=x*M*C+P*R*F;break;case"ZXY":this._x=P*M*C-x*R*F,this._y=x*R*C+P*M*F,this._z=x*M*F+P*R*C,this._w=x*M*C-P*R*F;break;case"ZYX":this._x=P*M*C-x*R*F,this._y=x*R*C+P*M*F,this._z=x*M*F-P*R*C,this._w=x*M*C+P*R*F;break;case"YZX":this._x=P*M*C+x*R*F,this._y=x*R*C+P*M*F,this._z=x*M*F-P*R*C,this._w=x*M*C-P*R*F;break;case"XZY":this._x=P*M*C-x*R*F,this._y=x*R*C-P*M*F,this._z=x*M*F+P*R*C,this._w=x*M*C+P*R*F;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+u)}return!1!==t&&this._onChangeCallback(),this}setFromAxisAngle(e,t){const r=t/2,s=Math.sin(r);return this._x=e.x*s,this._y=e.y*s,this._z=e.z*s,this._w=Math.cos(r),this._onChangeCallback(),this}setFromRotationMatrix(e){const t=e.elements,r=t[0],s=t[4],l=t[8],u=t[1],g=t[5],_=t[9],x=t[2],M=t[6],C=t[10],P=r+g+C;if(P>0){const R=.5/Math.sqrt(P+1);this._w=.25/R,this._x=(M-_)*R,this._y=(l-x)*R,this._z=(u-s)*R}else if(r>g&&r>C){const R=2*Math.sqrt(1+r-g-C);this._w=(M-_)/R,this._x=.25*R,this._y=(s+u)/R,this._z=(l+x)/R}else if(g>C){const R=2*Math.sqrt(1+g-r-C);this._w=(l-x)/R,this._x=(s+u)/R,this._y=.25*R,this._z=(_+M)/R}else{const R=2*Math.sqrt(1+C-r-g);this._w=(u-s)/R,this._x=(l+x)/R,this._y=(_+M)/R,this._z=.25*R}return this._onChangeCallback(),this}setFromUnitVectors(e,t){let r=e.dot(t)+1;return r<Number.EPSILON?(r=0,Math.abs(e.x)>Math.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=r):(this._x=0,this._y=-e.z,this._z=e.y,this._w=r)):(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=r),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(jr(this.dot(e),-1,1)))}rotateTowards(e,t){const r=this.angleTo(e);if(0===r)return this;const s=Math.min(1,t/r);return this.slerp(e,s),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return 0===e?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this}multiply(e){return this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,t){const r=e._x,s=e._y,l=e._z,u=e._w,g=t._x,_=t._y,x=t._z,M=t._w;return this._x=r*M+u*g+s*x-l*_,this._y=s*M+u*_+l*g-r*x,this._z=l*M+u*x+r*_-s*g,this._w=u*M-r*g-s*_-l*x,this._onChangeCallback(),this}slerp(e,t){if(0===t)return this;if(1===t)return this.copy(e);const r=this._x,s=this._y,l=this._z,u=this._w;let g=u*e._w+r*e._x+s*e._y+l*e._z;if(g<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,g=-g):this.copy(e),g>=1)return this._w=u,this._x=r,this._y=s,this._z=l,this;const _=1-g*g;if(_<=Number.EPSILON){const R=1-t;return this._w=R*u+t*this._w,this._x=R*r+t*this._x,this._y=R*s+t*this._y,this._z=R*l+t*this._z,this.normalize(),this._onChangeCallback(),this}const x=Math.sqrt(_),M=Math.atan2(x,g),C=Math.sin((1-t)*M)/x,P=Math.sin(t*M)/x;return this._w=u*C+this._w*P,this._x=r*C+this._x*P,this._y=s*C+this._y*P,this._z=l*C+this._z*P,this._onChangeCallback(),this}slerpQuaternions(e,t,r){return this.copy(e).slerp(t,r)}random(){const e=Math.random(),t=Math.sqrt(1-e),r=Math.sqrt(e),s=2*Math.PI*Math.random(),l=2*Math.PI*Math.random();return this.set(t*Math.cos(s),r*Math.sin(l),r*Math.cos(l),t*Math.sin(s))}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}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 Me{constructor(e=0,t=0,r=0){Me.prototype.isVector3=!0,this.x=e,this.y=t,this.z=r}set(e,t,r){return void 0===r&&(r=this.z),this.x=e,this.y=t,this.z=r,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(Yg.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(Yg.setFromAxisAngle(e,t))}applyMatrix3(e){const t=this.x,r=this.y,s=this.z,l=e.elements;return this.x=l[0]*t+l[3]*r+l[6]*s,this.y=l[1]*t+l[4]*r+l[7]*s,this.z=l[2]*t+l[5]*r+l[8]*s,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const t=this.x,r=this.y,s=this.z,l=e.elements,u=1/(l[3]*t+l[7]*r+l[11]*s+l[15]);return this.x=(l[0]*t+l[4]*r+l[8]*s+l[12])*u,this.y=(l[1]*t+l[5]*r+l[9]*s+l[13])*u,this.z=(l[2]*t+l[6]*r+l[10]*s+l[14])*u,this}applyQuaternion(e){const t=this.x,r=this.y,s=this.z,l=e.x,u=e.y,g=e.z,_=e.w,x=_*t+u*s-g*r,M=_*r+g*t-l*s,C=_*s+l*r-u*t,P=-l*t-u*r-g*s;return this.x=x*_+P*-l+M*-g-C*-u,this.y=M*_+P*-u+C*-l-x*-g,this.z=C*_+P*-g+x*-u-M*-l,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,r=this.y,s=this.z,l=e.elements;return this.x=l[0]*t+l[4]*r+l[8]*s,this.y=l[1]*t+l[5]*r+l[9]*s,this.z=l[2]*t+l[6]*r+l[10]*s,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 r=this.length();return this.divideScalar(r||1).multiplyScalar(Math.max(e,Math.min(t,r)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this}lerpVectors(e,t,r){return this.x=e.x+(t.x-e.x)*r,this.y=e.y+(t.y-e.y)*r,this.z=e.z+(t.z-e.z)*r,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,t){const r=e.x,s=e.y,l=e.z,u=t.x,g=t.y,_=t.z;return this.x=s*_-l*g,this.y=l*u-r*_,this.z=r*g-s*u,this}projectOnVector(e){const t=e.lengthSq();if(0===t)return this.set(0,0,0);const r=e.dot(this)/t;return this.copy(e).multiplyScalar(r)}projectOnPlane(e){return Vu.copy(this).projectOnVector(e),this.sub(Vu)}reflect(e){return this.sub(Vu.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(0===t)return Math.PI/2;const r=this.dot(e)/t;return Math.acos(jr(r,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,r=this.y-e.y,s=this.z-e.z;return t*t+r*r+s*s}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,r){const s=Math.sin(t)*e;return this.x=s*Math.sin(r),this.y=Math.cos(t)*e,this.z=s*Math.cos(r),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,t,r){return this.x=e*Math.sin(t),this.y=r,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(),r=this.setFromMatrixColumn(e,1).length(),s=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=r,this.z=s,this}setFromMatrixColumn(e,t){return this.fromArray(e.elements,4*t)}setFromMatrix3Column(e,t){return this.fromArray(e.elements,3*t)}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=2*(Math.random()-.5),t=Math.random()*Math.PI*2,r=Math.sqrt(1-e**2);return this.x=r*Math.cos(t),this.y=r*Math.sin(t),this.z=e,this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const Vu=new Me,Yg=new Ir;class xo{constructor(e=new Me(1/0,1/0,1/0),t=new Me(-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,r=e.length;t<r;t+=3)this.expandByPoint(pl.fromArray(e,t));return this}setFromBufferAttribute(e){this.makeEmpty();for(let t=0,r=e.count;t<r;t++)this.expandByPoint(pl.fromBufferAttribute(e,t));return this}setFromPoints(e){this.makeEmpty();for(let t=0,r=e.length;t<r;t++)this.expandByPoint(e[t]);return this}setFromCenterAndSize(e,t){const r=pl.copy(t).multiplyScalar(.5);return this.min.copy(e).sub(r),this.max.copy(e).add(r),this}setFromObject(e,t=!1){return this.makeEmpty(),this.expandByObject(e,t)}clone(){return(new this.constructor).copy(this)}copy(e){return this.min.copy(e.min),this.max.copy(e.max),this}makeEmpty(){return this.min.x=this.min.y=this.min.z=1/0,this.max.x=this.max.y=this.max.z=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z}getCenter(e){return this.isEmpty()?e.set(0,0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(e){return this.isEmpty()?e.set(0,0,0):e.subVectors(this.max,this.min)}expandByPoint(e){return this.min.min(e),this.max.max(e),this}expandByVector(e){return this.min.sub(e),this.max.add(e),this}expandByScalar(e){return this.min.addScalar(-e),this.max.addScalar(e),this}expandByObject(e,t=!1){if(e.updateWorldMatrix(!1,!1),void 0!==e.boundingBox)null===e.boundingBox&&e.computeBoundingBox(),xh.copy(e.boundingBox),xh.applyMatrix4(e.matrixWorld),this.union(xh);else{const s=e.geometry;if(void 0!==s)if(t&&void 0!==s.attributes&&void 0!==s.attributes.position){const l=s.attributes.position;for(let u=0,g=l.count;u<g;u++)pl.fromBufferAttribute(l,u).applyMatrix4(e.matrixWorld),this.expandByPoint(pl)}else null===s.boundingBox&&s.computeBoundingBox(),xh.copy(s.boundingBox),xh.applyMatrix4(e.matrixWorld),this.union(xh)}const r=e.children;for(let s=0,l=r.length;s<l;s++)this.expandByObject(r[s],t);return this}containsPoint(e){return!(e.x<this.min.x||e.x>this.max.x||e.y<this.min.y||e.y>this.max.y||e.z<this.min.z||e.z>this.max.z)}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(e){return!(e.max.x<this.min.x||e.min.x>this.max.x||e.max.y<this.min.y||e.min.y>this.max.y||e.max.z<this.min.z||e.min.z>this.max.z)}intersectsSphere(e){return this.clampPoint(e.center,pl),pl.distanceToSquared(e.center)<=e.radius*e.radiu
vendor: 5,374 bytes, line 72
72s}intersectsPlane(e){let t,r;return e.normal.x>0?(t=e.normal.x*this.min.x,r=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,r=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,r+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,r+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,r+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,r+=e.normal.z*this.min.z),t<=-e.constant&&r>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(Qu),Xp.subVectors(this.max,Qu),Hu.subVectors(e.a,Qu),Eh.subVectors(e.b,Qu),Ho.subVectors(e.c,Qu),Jl.subVectors(Eh,Hu),ml.subVectors(Ho,Eh),Eo.subVectors(Hu,Ho);let t=[0,-Jl.z,Jl.y,0,-ml.z,ml.y,0,-Eo.z,Eo.y,Jl.z,0,-Jl.x,ml.z,0,-ml.x,Eo.z,0,-Eo.x,-Jl.y,Jl.x,0,-ml.y,ml.x,0,-Eo.y,Eo.x,0];return!(!Bc(t,Hu,Eh,Ho,Xp)||(t=[1,0,0,0,1,0,0,0,1],!Bc(t,Hu,Eh,Ho,Xp)))&&(bh.crossVectors(Jl,ml),t=[bh.x,bh.y,bh.z],Bc(t,Hu,Eh,Ho,Xp))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,pl).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=.5*this.getSize(pl).length()),e}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}applyMatrix4(e){return this.isEmpty()||(dl[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),dl[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),dl[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),dl[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),dl[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),dl[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),dl[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),dl[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(dl)),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 dl=[new Me,new Me,new Me,new Me,new Me,new Me,new Me,new Me],pl=new Me,xh=new xo,Hu=new Me,Eh=new Me,Ho=new Me,Jl=new Me,ml=new Me,Eo=new Me,Qu=new Me,Xp=new Me,bh=new Me,bo=new Me;function Bc(f,e,t,r,s){for(let l=0,u=f.length-3;l<=u;l+=3){bo.fromArray(f,l);const g=s.x*Math.abs(bo.x)+s.y*Math.abs(bo.y)+s.z*Math.abs(bo.z),_=e.dot(bo),x=t.dot(bo),M=r.dot(bo);if(Math.max(-Math.max(_,x,M),Math.min(_,x,M))>g)return!1}return!0}const dv=new xo,Lc=new Me,qp=new Me;class gl{constructor(e=new Me,t=-1){this.center=e,this.radius=t}set(e,t){return this.center.copy(e),this.radius=t,this}setFromPoints(e,t){const r=this.center;void 0!==t?r.copy(t):dv.setFromPoints(e).getCenter(r);let s=0;for(let l=0,u=e.length;l<u;l++)s=Math.max(s,r.distanceToSquared(e[l]));return this.radius=Math.sqrt(s),this}copy(e){return this.center.copy(e.center),this.radius=e.radius,this}isEmpty(){return this.radius<0}makeEmpty(){return this.center.set(0,0,0),this.radius=-1,this}containsPoint(e){return e.distanceToSquared(this.center)<=this.radius*this.radius}distanceToPoint(e){return e.distanceTo(this.center)-this.radius}intersectsSphere(e){const t=this.radius+e.radius;return e.center.distanceToSquared(this.center)<=t*t}intersectsBox(e){return e.intersectsSphere(this)}intersectsPlane(e){return Math.abs(e.distanceToPoint(this.center))<=this.radius}clampPoint(e,t){const r=this.center.distanceToSquared(e);return t.copy(e),r>this.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t}getBoundingBox(e){return this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}applyMatrix4(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this}translate(e){return this.center.add(e),this}expandByPoint(e){if(this.isEmpty())return this.center.copy(e),this.radius=0,this;Lc.subVectors(e,this.center);const t=Lc.lengthSq();if(t>this.radius*this.radius){const r=Math.sqrt(t),s=.5*(r-this.radius);this.center.addScaledVector(Lc,s/r),this.radius+=s}return this}union(e){return e.isEmpty()?this:this.isEmpty()?(this.copy(e),this):(!0===this.center.equals(e.center)?this.radius=Math.max(this.radius,e.radius):(qp.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(Lc.copy(e.center).add(qp)),this.expandByPoint(Lc.copy(e.center).sub(qp))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return(new this.constructor).copy(this)}}const ja=new Me,Sh=new Me,sd=new Me,es=new Me,Yp=new Me,ad=new Me,$p=new Me;class Wu{constructor(e=new Me,t=new Me(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,ja)),this}closestPointToPoint(e,t){t.subVectors(e,this.origin);const r=t.dot(this.direction);return r<0?t.copy(this.origin):t.copy(this.origin).addScaledVector(this.direction,r)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){const t=ja.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(ja.copy(this.origin).addScaledVector(this.direction,t),ja.distanceToSquared(e))}
vendor: 4,997 bytes, line 72
72distanceSqToSegment(e,t,r,s){Sh.copy(e).add(t).multiplyScalar(.5),sd.copy(t).sub(e).normalize(),es.copy(this.origin).sub(Sh);const l=.5*e.distanceTo(t),u=-this.direction.dot(sd),g=es.dot(this.direction),_=-es.dot(sd),x=es.lengthSq(),M=Math.abs(1-u*u);let C,P,R,F;if(M>0)if(C=u*_-g,P=u*g-_,F=l*M,C>=0)if(P>=-F)if(P<=F){const O=1/M;C*=O,P*=O,R=C*(C+u*P+2*g)+P*(u*C+P+2*_)+x}else P=l,C=Math.max(0,-(u*P+g)),R=-C*C+P*(P+2*_)+x;else P=-l,C=Math.max(0,-(u*P+g)),R=-C*C+P*(P+2*_)+x;else P<=-F?(C=Math.max(0,-(-u*l+g)),P=C>0?-l:Math.min(Math.max(-l,-_),l),R=-C*C+P*(P+2*_)+x):P<=F?(C=0,P=Math.min(Math.max(-l,-_),l),R=P*(P+2*_)+x):(C=Math.max(0,-(u*l+g)),P=C>0?l:Math.min(Math.max(-l,-_),l),R=-C*C+P*(P+2*_)+x);else P=u>0?-l:l,C=Math.max(0,-(u*P+g)),R=-C*C+P*(P+2*_)+x;return r&&r.copy(this.origin).addScaledVector(this.direction,C),s&&s.copy(Sh).addScaledVector(sd,P),R}intersectSphere(e,t){ja.subVectors(e.center,this.origin);const r=ja.dot(this.direction),s=ja.dot(ja)-r*r,l=e.radius*e.radius;if(s>l)return null;const u=Math.sqrt(l-s),g=r-u,_=r+u;return _<0?null:this.at(g<0?_:g,t)}intersectsSphere(e){return this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){const t=e.normal.dot(this.direction);if(0===t)return 0===e.distanceToPoint(this.origin)?0:null;const r=-(this.origin.dot(e.normal)+e.constant)/t;return r>=0?r:null}intersectPlane(e,t){const r=this.distanceToPlane(e);return null===r?null:this.at(r,t)}intersectsPlane(e){const t=e.distanceToPoint(this.origin);return 0===t||e.normal.dot(this.direction)*t<0}intersectBox(e,t){let r,s,l,u,g,_;const x=1/this.direction.x,M=1/this.direction.y,C=1/this.direction.z,P=this.origin;return x>=0?(r=(e.min.x-P.x)*x,s=(e.max.x-P.x)*x):(r=(e.max.x-P.x)*x,s=(e.min.x-P.x)*x),M>=0?(l=(e.min.y-P.y)*M,u=(e.max.y-P.y)*M):(l=(e.max.y-P.y)*M,u=(e.min.y-P.y)*M),r>u||l>s||((l>r||isNaN(r))&&(r=l),(u<s||isNaN(s))&&(s=u),C>=0?(g=(e.min.z-P.z)*C,_=(e.max.z-P.z)*C):(g=(e.max.z-P.z)*C,_=(e.min.z-P.z)*C),r>_||g>s)||((g>r||r!=r)&&(r=g),(_<s||s!=s)&&(s=_),s<0)?null:this.at(r>=0?r:s,t)}intersectsBox(e){return null!==this.intersectBox(e,ja)}intersectTriangle(e,t,r,s,l){Yp.subVectors(t,e),ad.subVectors(r,e),$p.crossVectors(Yp,ad);let g,u=this.direction.dot($p);if(u>0){if(s)return null;g=1}else{if(!(u<0))return null;g=-1,u=-u}es.subVectors(this.origin,e);const _=g*this.direction.dot(ad.crossVectors(es,ad));if(_<0)return null;const x=g*this.direction.dot(Yp.cross(es));if(x<0||_+x>u)return null;const M=-g*es.dot($p);return M<0?null:this.at(M/u,l)}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 ui{constructor(){ui.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}set(e,t,r,s,l,u,g,_,x,M,C,P,R,F,O,k){const L=this.elements;return L[0]=e,L[4]=t,L[8]=r,L[12]=s,L[1]=l,L[5]=u,L[9]=g,L[13]=_,L[2]=x,L[6]=M,L[10]=C,L[14]=P,L[3]=R,L[7]=F,L[11]=O,L[15]=k,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 ui).fromArray(this.elements)}copy(e){const t=this.elements,r=e.elements;return t[0]=r[0],t[1]=r[1],t[2]=r[2],t[3]=r[3],t[4]=r[4],t[5]=r[5],t[6]=r[6],t[7]=r[7],t[8]=r[8],t[9]=r[9],t[10]=r[10],t[11]=r[11],t[12]=r[12],t[13]=r[13],t[14]=r[14],t[15]=r[15],this}copyPosition(e){const t=this.elements,r=e.elements;return t[12]=r[12],t[13]=r[13],t[14]=r[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,r){return e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),r.setFromMatrixColumn(this,2),this}makeBasis(e,t,r){return this.set(e.x,t.x,r.x,0,e.y,t.y,r.y,0,e.z,t.z,r.z,0,0,0,0,1),this}extractRotation(e){const t=this.elements,r=e.elements,s=1/Ja.setFromMatrixColumn(e,0).length(),l=1/Ja.setFromMatrixColumn(e,1).length(),u=1/Ja.setFromMatrixColumn(e,2).length();return t[0]=r[0]*s,t[1]=r[1]*s,t[2]=r[2]*s,t[3]=0,t[4]=r[4]*l,t[5]=r[5]*l,t[6]=r[6]*l,t[7]=0,t[8]=r[8]*u,t[9]=r[9]*u,t[10]=r[10]*u,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromEuler(e){const t=this.elements,r=e.x,s=e.y,l=e.z,u=Math.cos(r),g=Math.sin(r),_=Math.cos(s),x=Math.sin(s),M=Math.cos(l),C=Math.sin(l);if("XYZ"===e.order){const P=u*M,R=u*C,F=g*M,O=g*C;t[0]=_*M,t[4]=-_*C,t[8]=x,t[1]=R+F*x,t[5]=P-O*x,t[9]=-g*_,t[2]=O-P*x,t[6]=F+R*x,t[10]=u*_}else if("YXZ"===e.order){const P=_*M,R=_*C,F=x*M,O=x*C;t[0]=P+O*g,t[4]=F*g-R,t[8]=u*x,t[1]=u*C,t[5]=u*M,t[9]=-g,t[2]=R*g-F,t[6]=O+P*g,t[10]=u*_}else if("ZXY"===e.order){const P=_*M,R=_*C,F=x*M,O=x*C;t[0]=P-O*g,t[4]=-u*C,t[8]=F+R*g,t[1]=R+F*g,t[5]=u*M,t[9]=O-P*g,t[2]=-u*x,t[6]=g,t[10]=u*_}else if("ZYX"===e.order){const P=u*M,R=u*C,F=g*M,O=g*C;t[0]=_*M,t[4]=F*x-R,t[8]=P*x+O,t[1]=_*C,t[5]=O*x+P,t[9]=R*x-F,t[2]=-x,t[6]=g*_,t[10]=u*_}else if("YZX"===e.order){const P=u*_,R=u*x,F=g*_,O=g*x;t[0]=_*M,t[4]=O-P*C,t[8]=F*C+R,t[1]=C,t[5]=u*M,t[9]=-g*M,t[2]=-x*M,t[6]=R*C+F,t[10]=P-O*C}
vendor: 5,461 bytes, line 72
72else if("XZY"===e.order){const P=u*_,R=u*x,F=g*_,O=g*x;t[0]=_*M,t[4]=-C,t[8]=x*M,t[1]=P*C+O,t[5]=u*M,t[9]=R*C-F,t[2]=F*C-R,t[6]=g*M,t[10]=O*C+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(pv,e,Al)}lookAt(e,t,r){const s=this.elements;return Ua.subVectors(e,t),0===Ua.lengthSq()&&(Ua.z=1),Ua.normalize(),ec.crossVectors(r,Ua),0===ec.lengthSq()&&(1===Math.abs(r.z)?Ua.x+=1e-4:Ua.z+=1e-4,Ua.normalize(),ec.crossVectors(r,Ua)),ec.normalize(),Xu.crossVectors(Ua,ec),s[0]=ec.x,s[4]=Xu.x,s[8]=Ua.x,s[1]=ec.y,s[5]=Xu.y,s[9]=Ua.y,s[2]=ec.z,s[6]=Xu.z,s[10]=Ua.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const r=e.elements,s=t.elements,l=this.elements,u=r[0],g=r[4],_=r[8],x=r[12],M=r[1],C=r[5],P=r[9],R=r[13],F=r[2],O=r[6],k=r[10],L=r[14],V=r[3],z=r[7],W=r[11],ne=r[15],fe=s[0],ge=s[4],de=s[8],ie=s[12],ye=s[1],He=s[5],qe=s[9],Ge=s[13],Ve=s[2],We=s[6],nt=s[10],et=s[14],tt=s[3],gt=s[7],bt=s[11],jt=s[15];return l[0]=u*fe+g*ye+_*Ve+x*tt,l[4]=u*ge+g*He+_*We+x*gt,l[8]=u*de+g*qe+_*nt+x*bt,l[12]=u*ie+g*Ge+_*et+x*jt,l[1]=M*fe+C*ye+P*Ve+R*tt,l[5]=M*ge+C*He+P*We+R*gt,l[9]=M*de+C*qe+P*nt+R*bt,l[13]=M*ie+C*Ge+P*et+R*jt,l[2]=F*fe+O*ye+k*Ve+L*tt,l[6]=F*ge+O*He+k*We+L*gt,l[10]=F*de+O*qe+k*nt+L*bt,l[14]=F*ie+O*Ge+k*et+L*jt,l[3]=V*fe+z*ye+W*Ve+ne*tt,l[7]=V*ge+z*He+W*We+ne*gt,l[11]=V*de+z*qe+W*nt+ne*bt,l[15]=V*ie+z*Ge+W*et+ne*jt,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],r=e[4],s=e[8],l=e[12],u=e[1],g=e[5],_=e[9],x=e[13],M=e[2],C=e[6],P=e[10],R=e[14];return e[3]*(+l*_*C-s*x*C-l*g*P+r*x*P+s*g*R-r*_*R)+e[7]*(+t*_*R-t*x*P+l*u*P-s*u*R+s*x*M-l*_*M)+e[11]*(+t*x*C-t*g*R-l*u*C+r*u*R+l*g*M-r*x*M)+e[15]*(-s*g*M-t*_*C+t*g*P+s*u*C-r*u*P+r*_*M)}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,r){const s=this.elements;return e.isVector3?(s[12]=e.x,s[13]=e.y,s[14]=e.z):(s[12]=e,s[13]=t,s[14]=r),this}invert(){const e=this.elements,t=e[0],r=e[1],s=e[2],l=e[3],u=e[4],g=e[5],_=e[6],x=e[7],M=e[8],C=e[9],P=e[10],R=e[11],F=e[12],O=e[13],k=e[14],L=e[15],V=C*k*x-O*P*x+O*_*R-g*k*R-C*_*L+g*P*L,z=F*P*x-M*k*x-F*_*R+u*k*R+M*_*L-u*P*L,W=M*O*x-F*C*x+F*g*R-u*O*R-M*g*L+u*C*L,ne=F*C*_-M*O*_-F*g*P+u*O*P+M*g*k-u*C*k,fe=t*V+r*z+s*W+l*ne;if(0===fe)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const ge=1/fe;return e[0]=V*ge,e[1]=(O*P*l-C*k*l-O*s*R+r*k*R+C*s*L-r*P*L)*ge,e[2]=(g*k*l-O*_*l+O*s*x-r*k*x-g*s*L+r*_*L)*ge,e[3]=(C*_*l-g*P*l-C*s*x+r*P*x+g*s*R-r*_*R)*ge,e[4]=z*ge,e[5]=(M*k*l-F*P*l+F*s*R-t*k*R-M*s*L+t*P*L)*ge,e[6]=(F*_*l-u*k*l-F*s*x+t*k*x+u*s*L-t*_*L)*ge,e[7]=(u*P*l-M*_*l+M*s*x-t*P*x-u*s*R+t*_*R)*ge,e[8]=W*ge,e[9]=(F*C*l-M*O*l-F*r*R+t*O*R+M*r*L-t*C*L)*ge,e[10]=(u*O*l-F*g*l+F*r*x-t*O*x-u*r*L+t*g*L)*ge,e[11]=(M*g*l-u*C*l-M*r*x+t*C*x+u*r*R-t*g*R)*ge,e[12]=ne*ge,e[13]=(M*O*s-F*C*s+F*r*P-t*O*P-M*r*k+t*C*k)*ge,e[14]=(F*g*s-u*O*s-F*r*_+t*O*_+u*r*k-t*g*k)*ge,e[15]=(u*C*s-M*g*s+M*r*_-t*C*_-u*r*P+t*g*P)*ge,this}scale(e){const t=this.elements,r=e.x,s=e.y,l=e.z;return t[0]*=r,t[4]*=s,t[8]*=l,t[1]*=r,t[5]*=s,t[9]*=l,t[2]*=r,t[6]*=s,t[10]*=l,t[3]*=r,t[7]*=s,t[11]*=l,this}getMaxScaleOnAxis(){const e=this.elements;return Math.sqrt(Math.max(e[0]*e[0]+e[1]*e[1]+e[2]*e[2],e[4]*e[4]+e[5]*e[5]+e[6]*e[6],e[8]*e[8]+e[9]*e[9]+e[10]*e[10]))}makeTranslation(e,t,r){return this.set(1,0,0,e,0,1,0,t,0,0,1,r,0,0,0,1),this}makeRotationX(e){const t=Math.cos(e),r=Math.sin(e);return this.set(1,0,0,0,0,t,-r,0,0,r,t,0,0,0,0,1),this}makeRotationY(e){const t=Math.cos(e),r=Math.sin(e);return this.set(t,0,r,0,0,1,0,0,-r,0,t,0,0,0,0,1),this}makeRotationZ(e){const t=Math.cos(e),r=Math.sin(e);return this.set(t,-r,0,0,r,t,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,t){const r=Math.cos(t),s=Math.sin(t),l=1-r,u=e.x,g=e.y,_=e.z,x=l*u,M=l*g;return this.set(x*u+r,x*g-s*_,x*_+s*g,0,x*g+s*_,M*g+r,M*_-s*u,0,x*_-s*g,M*_+s*u,l*_*_+r,0,0,0,0,1),this}makeScale(e,t,r){return this.set(e,0,0,0,0,t,0,0,0,0,r,0,0,0,0,1),this}makeShear(e,t,r,s,l,u){return this.set(1,r,l,0,e,1,u,0,t,s,1,0,0,0,0,1),this}compose(e,t,r){const s=this.elements,l=t._x,u=t._y,g=t._z,_=t._w,x=l+l,M=u+u,C=g+g,P=l*x,R=l*M,F=l*C,O=u*M,k=u*C,L=g*C,V=_*x,z=_*M,W=_*C,ne=r.x,fe=r.y,ge=r.z;return s[0]=(1-(O+L))*ne,s[1]=(R+W)*ne,s[2]=(F-z)*ne,s[3]=0,s[4]=(R-W)*fe,s[5]=(1-(P+L))*fe,s[6]=(k+V)*fe,s[7]=0,s[8]=(F+z)*ge,s[9]=(k-V)*ge,s[10]=(1-(P+O))*ge,s[11]=0,s[12]=e.x,s[13]=e.y,s[14]=e.z,s[15]=1,this}decompose(e,t,r){const s=this.elements;let l=Ja.set(s[0],s[1],s[2]).length();const u=Ja.set(s[4],s[5],s[6]).length(),g=Ja.set(s[8],s[9],s[10]).length();this.determinant()<0&&(l=-l),e.x=s[12],e.y=s[13],e.z=s[14],So.copy(this);const x=1/l,M=1/u,C=1/g;return So.elements[0]*=x,So.elements[1]*=x,So.elements[2]*=x,So.elements[4]*=M,So.elements[5]*=M,So.elements[6]*=M,So.elements[8]*=C,So.elements[9]*=C,So.elements[10]*=C,t.setFromRotationMatrix(So),r.x=l,r.y=u,r.z=g,this}makePerspective(e,t,r,s,l,u){const g=this.elements,x=2*l/(r-s),M=(t+e)/(t-e),C=(r+s)/(r-s),P=-(u+l)/(u-l),R=-2*u*l/(u-l);return g[0]=2*l/(t-e),g[4]=0,g[8]=M,g[12]=0,g[1]=0,g[5]=x,g[9]=C,g[13]=0,g[2]=0,g[6]=0,g[10]=P,g[14]=R,g[3]=0,g[7]=0,g[11]=-1,g[15]=0,this}
vendor: 5,249 bytes, line 72
72makeOrthographic(e,t,r,s,l,u){const g=this.elements,_=1/(t-e),x=1/(r-s),M=1/(u-l),C=(t+e)*_,P=(r+s)*x,R=(u+l)*M;return g[0]=2*_,g[4]=0,g[8]=0,g[12]=-C,g[1]=0,g[5]=2*x,g[9]=0,g[13]=-P,g[2]=0,g[6]=0,g[10]=-2*M,g[14]=-R,g[3]=0,g[7]=0,g[11]=0,g[15]=1,this}equals(e){const t=this.elements,r=e.elements;for(let s=0;s<16;s++)if(t[s]!==r[s])return!1;return!0}fromArray(e,t=0){for(let r=0;r<16;r++)this.elements[r]=e[r+t];return this}toArray(e=[],t=0){const r=this.elements;return e[t]=r[0],e[t+1]=r[1],e[t+2]=r[2],e[t+3]=r[3],e[t+4]=r[4],e[t+5]=r[5],e[t+6]=r[6],e[t+7]=r[7],e[t+8]=r[8],e[t+9]=r[9],e[t+10]=r[10],e[t+11]=r[11],e[t+12]=r[12],e[t+13]=r[13],e[t+14]=r[14],e[t+15]=r[15],e}}const Ja=new Me,So=new ui,pv=new Me(0,0,0),Al=new Me(1,1,1),ec=new Me,Xu=new Me,Ua=new Me,Kp=new ui,od=new Ir;let ld=(()=>{class f{constructor(t=0,r=0,s=0,l=f.DEFAULT_ORDER){this.isEuler=!0,this._x=t,this._y=r,this._z=s,this._order=l}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get order(){return this._order}set order(t){this._order=t,this._onChangeCallback()}set(t,r,s,l=this._order){return this._x=t,this._y=r,this._z=s,this._order=l,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(t){return this._x=t._x,this._y=t._y,this._z=t._z,this._order=t._order,this._onChangeCallback(),this}setFromRotationMatrix(t,r=this._order,s=!0){const l=t.elements,u=l[0],g=l[4],_=l[8],x=l[1],M=l[5],C=l[9],P=l[2],R=l[6],F=l[10];switch(r){case"XYZ":this._y=Math.asin(jr(_,-1,1)),Math.abs(_)<.9999999?(this._x=Math.atan2(-C,F),this._z=Math.atan2(-g,u)):(this._x=Math.atan2(R,M),this._z=0);break;case"YXZ":this._x=Math.asin(-jr(C,-1,1)),Math.abs(C)<.9999999?(this._y=Math.atan2(_,F),this._z=Math.atan2(x,M)):(this._y=Math.atan2(-P,u),this._z=0);break;case"ZXY":this._x=Math.asin(jr(R,-1,1)),Math.abs(R)<.9999999?(this._y=Math.atan2(-P,F),this._z=Math.atan2(-g,M)):(this._y=0,this._z=Math.atan2(x,u));break;case"ZYX":this._y=Math.asin(-jr(P,-1,1)),Math.abs(P)<.9999999?(this._x=Math.atan2(R,F),this._z=Math.atan2(x,u)):(this._x=0,this._z=Math.atan2(-g,M));break;case"YZX":this._z=Math.asin(jr(x,-1,1)),Math.abs(x)<.9999999?(this._x=Math.atan2(-C,M),this._y=Math.atan2(-P,u)):(this._x=0,this._y=Math.atan2(_,F));break;case"XZY":this._z=Math.asin(-jr(g,-1,1)),Math.abs(g)<.9999999?(this._x=Math.atan2(R,M),this._y=Math.atan2(_,u)):(this._x=Math.atan2(-C,F),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+r)}return this._order=r,!0===s&&this._onChangeCallback(),this}setFromQuaternion(t,r,s){return Kp.makeRotationFromQuaternion(t),this.setFromRotationMatrix(Kp,r,s)}setFromVector3(t,r=this._order){return this.set(t.x,t.y,t.z,r)}reorder(t){return od.setFromEuler(this),this.setFromQuaternion(od,t)}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._order===this._order}fromArray(t){return this._x=t[0],this._y=t[1],this._z=t[2],void 0!==t[3]&&(this._order=t[3]),this._onChangeCallback(),this}toArray(t=[],r=0){return t[r]=this._x,t[r+1]=this._y,t[r+2]=this._z,t[r+3]=this._order,t}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}return f.DEFAULT_ORDER="XYZ",f})();class Zp{constructor(){this.mask=1}set(e){this.mask=1<<e>>>0}enable(e){this.mask|=1<<e}enableAll(){this.mask=-1}toggle(e){this.mask^=1<<e}disable(e){this.mask&=~(1<<e)}disableAll(){this.mask=0}test(e){return!!(this.mask&e.mask)}isEnabled(e){return!!(this.mask&1<<e)}}let mv=0;const gv=new Me,qu=new Ir,Qo=new ui,jp=new Me,cd=new Me,Wo=new Me,Jp=new Ir,$g=new Me(1,0,0),em=new Me(0,1,0),hd=new Me(0,0,1),Kg={type:"added"},tm={type:"removed"};let or=(()=>{class f extends Pc{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:mv++}),this.uuid=Za(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=f.DEFAULT_UP.clone();const t=new Me,r=new ld,s=new Ir,l=new Me(1,1,1);r._onChange(function u(){s.setFromEuler(r,!1)}),s._onChange(function g(){r.setFromQuaternion(s,void 0,!1)}),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:t},rotation:{configurable:!0,enumerable:!0,value:r},quaternion:{configurable:!0,enumerable:!0,value:s},scale:{configurable:!0,enumerable:!0,value:l},modelViewMatrix:{value:new ui},normalMatrix:{value:new zi}}),this.matrix=new ui,this.matrixWorld=new ui,this.matrixAutoUpdate=f.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.matrixWorldAutoUpdate=f.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.layers=new Zp,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.animations=[],this.userData={}}onBeforeRender(){}onAfterRender(){}applyMatrix4(t){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(t),this.matrix.decompose(this.position,this.quaternion,this.scale)}applyQuaternion(t){return this.quaternion.premultiply(t),this}setRotationFromAxisAngle(t,r){this.quaternion.setFromAxisAngle(t,r)}setRotationFromEuler(t){this.quaternion.setFromEuler(t,!0)}
vendor: 13,036 bytes, line 72
72setRotationFromMatrix(t){this.quaternion.setFromRotationMatrix(t)}setRotationFromQuaternion(t){this.quaternion.copy(t)}rotateOnAxis(t,r){return qu.setFromAxisAngle(t,r),this.quaternion.multiply(qu),this}rotateOnWorldAxis(t,r){return qu.setFromAxisAngle(t,r),this.quaternion.premultiply(qu),this}rotateX(t){return this.rotateOnAxis($g,t)}rotateY(t){return this.rotateOnAxis(em,t)}rotateZ(t){return this.rotateOnAxis(hd,t)}translateOnAxis(t,r){return gv.copy(t).applyQuaternion(this.quaternion),this.position.add(gv.multiplyScalar(r)),this}translateX(t){return this.translateOnAxis($g,t)}translateY(t){return this.translateOnAxis(em,t)}translateZ(t){return this.translateOnAxis(hd,t)}localToWorld(t){return this.updateWorldMatrix(!0,!1),t.applyMatrix4(this.matrixWorld)}worldToLocal(t){return this.updateWorldMatrix(!0,!1),t.applyMatrix4(Qo.copy(this.matrixWorld).invert())}lookAt(t,r,s){t.isVector3?jp.copy(t):jp.set(t,r,s);const l=this.parent;this.updateWorldMatrix(!0,!1),cd.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?Qo.lookAt(cd,jp,this.up):Qo.lookAt(jp,cd,this.up),this.quaternion.setFromRotationMatrix(Qo),l&&(Qo.extractRotation(l.matrixWorld),qu.setFromRotationMatrix(Qo),this.quaternion.premultiply(qu.invert()))}add(t){if(arguments.length>1){for(let r=0;r<arguments.length;r++)this.add(arguments[r]);return this}return t===this?(console.error("THREE.Object3D.add: object can't be added as a child of itself.",t),this):(t&&t.isObject3D?(null!==t.parent&&t.parent.remove(t),t.parent=this,this.children.push(t),t.dispatchEvent(Kg)):console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.",t),this)}remove(t){if(arguments.length>1){for(let s=0;s<arguments.length;s++)this.remove(arguments[s]);return this}const r=this.children.indexOf(t);return-1!==r&&(t.parent=null,this.children.splice(r,1),t.dispatchEvent(tm)),this}removeFromParent(){const t=this.parent;return null!==t&&t.remove(this),this}clear(){for(let t=0;t<this.children.length;t++){const r=this.children[t];r.parent=null,r.dispatchEvent(tm)}return this.children.length=0,this}attach(t){return this.updateWorldMatrix(!0,!1),Qo.copy(this.matrixWorld).invert(),null!==t.parent&&(t.parent.updateWorldMatrix(!0,!1),Qo.multiply(t.parent.matrixWorld)),t.applyMatrix4(Qo),this.add(t),t.updateWorldMatrix(!1,!0),this}getObjectById(t){return this.getObjectByProperty("id",t)}getObjectByName(t){return this.getObjectByProperty("name",t)}getObjectByProperty(t,r){if(this[t]===r)return this;for(let s=0,l=this.children.length;s<l;s++){const g=this.children[s].getObjectByProperty(t,r);if(void 0!==g)return g}}getObjectsByProperty(t,r){let s=[];this[t]===r&&s.push(this);for(let l=0,u=this.children.length;l<u;l++){const g=this.children[l].getObjectsByProperty(t,r);g.length>0&&(s=s.concat(g))}return s}getWorldPosition(t){return this.updateWorldMatrix(!0,!1),t.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(cd,t,Wo),t}getWorldScale(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(cd,Jp,t),t}getWorldDirection(t){this.updateWorldMatrix(!0,!1);const r=this.matrixWorld.elements;return t.set(r[8],r[9],r[10]).normalize()}raycast(){}traverse(t){t(this);const r=this.children;for(let s=0,l=r.length;s<l;s++)r[s].traverse(t)}traverseVisible(t){if(!1===this.visible)return;t(this);const r=this.children;for(let s=0,l=r.length;s<l;s++)r[s].traverseVisible(t)}traverseAncestors(t){const r=this.parent;null!==r&&(t(r),r.traverseAncestors(t))}updateMatrix(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0}updateMatrixWorld(t){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||t)&&(null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),this.matrixWorldNeedsUpdate=!1,t=!0);const r=this.children;for(let s=0,l=r.length;s<l;s++){const u=r[s];(!0===u.matrixWorldAutoUpdate||!0===t)&&u.updateMatrixWorld(t)}}updateWorldMatrix(t,r){const s=this.parent;if(!0===t&&null!==s&&!0===s.matrixWorldAutoUpdate&&s.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),!0===r){const l=this.children;for(let u=0,g=l.length;u<g;u++){const _=l[u];!0===_.matrixWorldAutoUpdate&&_.updateWorldMatrix(!1,!0)}}}toJSON(t){const r=void 0===t||"string"==typeof t,s={};r&&(t={geometries:{},materials:{},textures:{},images:{},shapes:{},skeletons:{},animations:{},nodes:{}},s.metadata={version:4.5,type:"Object",generator:"Object3D.toJSON"});const l={};function u(_,x){return void 0===_[x.uuid]&&(_[x.uuid]=x.toJSON(t)),x.uuid}if(l.uuid=this.uuid,l.type=this.type,""!==this.name&&(l.name=this.name),!0===this.castShadow&&(l.castShadow=!0),!0===this.receiveShadow&&(l.receiveShadow=!0),!1===this.visible&&(l.visible=!1),!1===this.frustumCulled&&(l.frustumCulled=!1),0!==this.renderOrder&&(l.renderOrder=this.renderOrder),Object.keys(this.userData).length>0&&(l.userData=this.userData),l.layers=this.layers.mask,l.matrix=this.matrix.toArray(),l.up=this.up.toArray(),!1===this.matrixAutoUpdate&&(l.matrixAutoUpdate=!1),this.isInstancedMesh&&(l.type="InstancedMesh",l.count=this.count,l.instanceMatrix=this.instanceMatrix.toJSON(),null!==this.instanceColor&&(l.instanceColor=this.instanceColor.toJSON())),this.isScene)this.background&&(this.background.isColor?l.background=this.background.toJSON():this.background.isTexture&&(l.background=this.background.toJSON(t).uuid)),this.environment&&this.environment.isTexture&&!0!==this.environment.isRenderTargetTexture&&(l.environment=this.environment.toJSON(t).uuid);else if(this.isMesh||this.isLine||this.isPoints){l.geometry=u(t.geometries,this.geometry);const _=this.geometry.parameters;if(void 0!==_&&void 0!==_.shapes){const x=_.shapes;if(Array.isArray(x))for(let M=0,C=x.length;M<C;M++)u(t.shapes,x[M]);else u(t.shapes,x)}}if(this.isSkinnedMesh&&(l.bindMode=this.bindMode,l.bindMatrix=this.bindMatrix.toArray(),void 0!==this.skeleton&&(u(t.skeletons,this.skeleton),l.skeleton=this.skeleton.uuid)),void 0!==this.material)if(Array.isArray(this.material)){const _=[];for(let x=0,M=this.material.length;x<M;x++)_.push(u(t.materials,this.material[x]));l.material=_}else l.material=u(t.materials,this.material);if(this.children.length>0){l.children=[];for(let _=0;_<this.children.length;_++)l.children.push(this.children[_].toJSON(t).object)}if(this.animations.length>0){l.animations=[];for(let _=0;_<this.animations.length;_++)l.animations.push(u(t.animations,this.animations[_]))}if(r){const _=g(t.geometries),x=g(t.materials),M=g(t.textures),C=g(t.images),P=g(t.shapes),R=g(t.skeletons),F=g(t.animations),O=g(t.nodes);_.length>0&&(s.geometries=_),x.length>0&&(s.materials=x),M.length>0&&(s.textures=M),C.length>0&&(s.images=C),P.length>0&&(s.shapes=P),R.length>0&&(s.skeletons=R),F.length>0&&(s.animations=F),O.length>0&&(s.nodes=O)}return s.object=l,s;function g(_){const x=[];for(const M in _){const C=_[M];delete C.metadata,x.push(C)}return x}}clone(t){return(new this.constructor).copy(this,t)}copy(t,r=!0){if(this.name=t.name,this.up.copy(t.up),this.position.copy(t.position),this.rotation.order=t.rotation.order,this.quaternion.copy(t.quaternion),this.scale.copy(t.scale),this.matrix.copy(t.matrix),this.matrixWorld.copy(t.matrixWorld),this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrixWorldNeedsUpdate=t.matrixWorldNeedsUpdate,this.matrixWorldAutoUpdate=t.matrixWorldAutoUpdate,this.layers.mask=t.layers.mask,this.visible=t.visible,this.castShadow=t.castShadow,this.receiveShadow=t.receiveShadow,this.frustumCulled=t.frustumCulled,this.renderOrder=t.renderOrder,this.userData=JSON.parse(JSON.stringify(t.userData)),!0===r)for(let s=0;s<t.children.length;s++)this.add(t.children[s].clone());return this}}return f.DEFAULT_UP=new Me(0,1,0),f.DEFAULT_MATRIX_AUTO_UPDATE=!0,f.DEFAULT_MATRIX_WORLD_AUTO_UPDATE=!0,f})();const Mo=new Me,_l=new Me,Zg=new Me,tc=new Me,Yu=new Me,vl=new Me,Av=new Me,jg=new Me,Jg=new Me,e0=new Me;let Dc=!1;class ba{constructor(e=new Me,t=new Me,r=new Me){this.a=e,this.b=t,this.c=r}static getNormal(e,t,r,s){s.subVectors(r,t),Mo.subVectors(e,t),s.cross(Mo);const l=s.lengthSq();return l>0?s.multiplyScalar(1/Math.sqrt(l)):s.set(0,0,0)}static getBarycoord(e,t,r,s,l){Mo.subVectors(s,t),_l.subVectors(r,t),Zg.subVectors(e,t);const u=Mo.dot(Mo),g=Mo.dot(_l),_=Mo.dot(Zg),x=_l.dot(_l),M=_l.dot(Zg),C=u*x-g*g;if(0===C)return l.set(-2,-1,-1);const P=1/C,R=(x*_-g*M)*P,F=(u*M-g*_)*P;return l.set(1-R-F,F,R)}static containsPoint(e,t,r,s){return this.getBarycoord(e,t,r,s,tc),tc.x>=0&&tc.y>=0&&tc.x+tc.y<=1}static getUV(e,t,r,s,l,u,g,_){return!1===Dc&&(console.warn("THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."),Dc=!0),this.getInterpolation(e,t,r,s,l,u,g,_)}static getInterpolation(e,t,r,s,l,u,g,_){return this.getBarycoord(e,t,r,s,tc),_.setScalar(0),_.addScaledVector(l,tc.x),_.addScaledVector(u,tc.y),_.addScaledVector(g,tc.z),_}static isFrontFacing(e,t,r,s){return Mo.subVectors(r,t),_l.subVectors(e,t),Mo.cross(_l).dot(s)<0}set(e,t,r){return this.a.copy(e),this.b.copy(t),this.c.copy(r),this}setFromPointsAndIndices(e,t,r,s){return this.a.copy(e[t]),this.b.copy(e[r]),this.c.copy(e[s]),this}setFromAttributeAndIndices(e,t,r,s){return this.a.fromBufferAttribute(e,t),this.b.fromBufferAttribute(e,r),this.c.fromBufferAttribute(e,s),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 Mo.subVectors(this.c,this.b),_l.subVectors(this.a,this.b),.5*Mo.cross(_l).length()}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return ba.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return ba.getBarycoord(e,this.a,this.b,this.c,t)}getUV(e,t,r,s,l){return!1===Dc&&(console.warn("THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."),Dc=!0),ba.getInterpolation(e,this.a,this.b,this.c,t,r,s,l)}getInterpolation(e,t,r,s,l){return ba.getInterpolation(e,this.a,this.b,this.c,t,r,s,l)}containsPoint(e){return ba.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return ba.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,t){const r=this.a,s=this.b,l=this.c;let u,g;Yu.subVectors(s,r),vl.subVectors(l,r),jg.subVectors(e,r);const _=Yu.dot(jg),x=vl.dot(jg);if(_<=0&&x<=0)return t.copy(r);Jg.subVectors(e,s);const M=Yu.dot(Jg),C=vl.dot(Jg);if(M>=0&&C<=M)return t.copy(s);const P=_*C-M*x;if(P<=0&&_>=0&&M<=0)return u=_/(_-M),t.copy(r).addScaledVector(Yu,u);e0.subVectors(e,l);const R=Yu.dot(e0),F=vl.dot(e0);if(F>=0&&R<=F)return t.copy(l);const O=R*x-_*F;if(O<=0&&x>=0&&F<=0)return g=x/(x-F),t.copy(r).addScaledVector(vl,g);const k=M*F-R*C;if(k<=0&&C-M>=0&&R-F>=0)return Av.subVectors(l,s),g=(C-M)/(C-M+(R-F)),t.copy(s).addScaledVector(Av,g);const L=1/(k+O+P);return u=O*L,g=P*L,t.copy(r).addScaledVector(Yu,u).addScaledVector(vl,g)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}let _v=0;class as extends Pc{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:_v++}),this.uuid=Za(),this.name="",this.type="Material",this.blending=1,this.side=0,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.blendSrc=204,this.blendDst=205,this.blendEquation=100,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.depthFunc=3,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=519,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=7680,this.stencilZFail=7680,this.stencilZPass=7680,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.forceSinglePass=!1,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0,this._alphaTest=0}get alphaTest(){return this._alphaTest}set alphaTest(e){this._alphaTest>0!=e>0&&this.version++,this._alphaTest=e}onBuild(){}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(void 0!==e)for(const t in e){const r=e[t];if(void 0===r){console.warn(`THREE.Material: parameter '${t}' has value of undefined.`);continue}const s=this[t];void 0!==s?s&&s.isColor?s.set(r):s&&s.isVector3&&r&&r.isVector3?s.copy(r):this[t]=r:console.warn(`THREE.Material: '${t}' is not a property of THREE.${this.type}.`)}}toJSON(e){const t=void 0===e||"string"==typeof e;t&&(e={textures:{},images:{}});const r={metadata:{version:4.5,type:"Material",generator:"Material.toJSON"}};function s(l){const u=[];for(const g in l){const _=l[g];delete _.metadata,u.push(_)}return u}
vendor: 7,538 bytes, line 72
72if(r.uuid=this.uuid,r.type=this.type,""!==this.name&&(r.name=this.name),this.color&&this.color.isColor&&(r.color=this.color.getHex()),void 0!==this.roughness&&(r.roughness=this.roughness),void 0!==this.metalness&&(r.metalness=this.metalness),void 0!==this.sheen&&(r.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(r.sheenColor=this.sheenColor.getHex()),void 0!==this.sheenRoughness&&(r.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(r.emissive=this.emissive.getHex()),this.emissiveIntensity&&1!==this.emissiveIntensity&&(r.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(r.specular=this.specular.getHex()),void 0!==this.specularIntensity&&(r.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(r.specularColor=this.specularColor.getHex()),void 0!==this.shininess&&(r.shininess=this.shininess),void 0!==this.clearcoat&&(r.clearcoat=this.clearcoat),void 0!==this.clearcoatRoughness&&(r.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(r.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(r.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(r.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,r.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),void 0!==this.iridescence&&(r.iridescence=this.iridescence),void 0!==this.iridescenceIOR&&(r.iridescenceIOR=this.iridescenceIOR),void 0!==this.iridescenceThicknessRange&&(r.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(r.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(r.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(r.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(r.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(r.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(r.lightMap=this.lightMap.toJSON(e).uuid,r.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(r.aoMap=this.aoMap.toJSON(e).uuid,r.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(r.bumpMap=this.bumpMap.toJSON(e).uuid,r.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(r.normalMap=this.normalMap.toJSON(e).uuid,r.normalMapType=this.normalMapType,r.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(r.displacementMap=this.displacementMap.toJSON(e).uuid,r.displacementScale=this.displacementScale,r.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(r.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(r.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(r.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(r.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(r.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(r.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(r.envMap=this.envMap.toJSON(e).uuid,void 0!==this.combine&&(r.combine=this.combine)),void 0!==this.envMapIntensity&&(r.envMapIntensity=this.envMapIntensity),void 0!==this.reflectivity&&(r.reflectivity=this.reflectivity),void 0!==this.refractionRatio&&(r.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(r.gradientMap=this.gradientMap.toJSON(e).uuid),void 0!==this.transmission&&(r.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(r.transmissionMap=this.transmissionMap.toJSON(e).uuid),void 0!==this.thickness&&(r.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(r.thicknessMap=this.thicknessMap.toJSON(e).uuid),void 0!==this.attenuationDistance&&this.attenuationDistance!==1/0&&(r.attenuationDistance=this.attenuationDistance),void 0!==this.attenuationColor&&(r.attenuationColor=this.attenuationColor.getHex()),void 0!==this.size&&(r.size=this.size),null!==this.shadowSide&&(r.shadowSide=this.shadowSide),void 0!==this.sizeAttenuation&&(r.sizeAttenuation=this.sizeAttenuation),1!==this.blending&&(r.blending=this.blending),0!==this.side&&(r.side=this.side),this.vertexColors&&(r.vertexColors=!0),this.opacity<1&&(r.opacity=this.opacity),!0===this.transparent&&(r.transparent=this.transparent),r.depthFunc=this.depthFunc,r.depthTest=this.depthTest,r.depthWrite=this.depthWrite,r.colorWrite=this.colorWrite,r.stencilWrite=this.stencilWrite,r.stencilWriteMask=this.stencilWriteMask,r.stencilFunc=this.stencilFunc,r.stencilRef=this.stencilRef,r.stencilFuncMask=this.stencilFuncMask,r.stencilFail=this.stencilFail,r.stencilZFail=this.stencilZFail,r.stencilZPass=this.stencilZPass,void 0!==this.rotation&&0!==this.rotation&&(r.rotation=this.rotation),!0===this.polygonOffset&&(r.polygonOffset=!0),0!==this.polygonOffsetFactor&&(r.polygonOffsetFactor=this.polygonOffsetFactor),0!==this.polygonOffsetUnits&&(r.polygonOffsetUnits=this.polygonOffsetUnits),void 0!==this.linewidth&&1!==this.linewidth&&(r.linewidth=this.linewidth),void 0!==this.dashSize&&(r.dashSize=this.dashSize),void 0!==this.gapSize&&(r.gapSize=this.gapSize),void 0!==this.scale&&(r.scale=this.scale),!0===this.dithering&&(r.dithering=!0),this.alphaTest>0&&(r.alphaTest=this.alphaTest),!0===this.alphaToCoverage&&(r.alphaToCoverage=this.alphaToCoverage),!0===this.premultipliedAlpha&&(r.premultipliedAlpha=this.premultipliedAlpha),!0===this.forceSinglePass&&(r.forceSinglePass=this.forceSinglePass),!0===this.wireframe&&(r.wireframe=this.wireframe),this.wireframeLinewidth>1&&(r.wireframeLinewidth=this.wireframeLinewidth),"round"!==this.wireframeLinecap&&(r.wireframeLinecap=this.wireframeLinecap),"round"!==this.wireframeLinejoin&&(r.wireframeLinejoin=this.wireframeLinejoin),!0===this.flatShading&&(r.flatShading=this.flatShading),!1===this.visible&&(r.visible=!1),!1===this.toneMapped&&(r.toneMapped=!1),!1===this.fog&&(r.fog=!1),Object.keys(this.userData).length>0&&(r.userData=this.userData),t){const l=s(e.textures),u=s(e.images);l.length>0&&(r.textures=l),u.length>0&&(r.images=u)}return r}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.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 r=null;if(null!==t){const s=t.length;r=new Array(s);for(let l=0;l!==s;++l)r[l]=t[l].clone()}return this.clippingPlanes=r,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipSh
vendor: 13,670 bytes, line 72
72adows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.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){!0===e&&this.version++}}const t0={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},eo={h:0,s:0,l:0},$u={h:0,s:0,l:0};function ud(f,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?f+6*(e-f)*t:t<.5?e:t<2/3?f+6*(e-f)*(2/3-t):f}class An{constructor(e,t,r){return this.isColor=!0,this.r=1,this.g=1,this.b=1,void 0===t&&void 0===r?this.set(e):this.setRGB(e,t,r)}set(e){return e&&e.isColor?this.copy(e):"number"==typeof e?this.setHex(e):"string"==typeof e&&this.setStyle(e),this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,t=yo){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(255&e)/255,la.toWorkingColorSpace(this,t),this}setRGB(e,t,r,s=la.workingColorSpace){return this.r=e,this.g=t,this.b=r,la.toWorkingColorSpace(this,s),this}setHSL(e,t,r,s=la.workingColorSpace){if(e=Hg(e,1),t=jr(t,0,1),r=jr(r,0,1),0===t)this.r=this.g=this.b=r;else{const l=r<=.5?r*(1+t):r+t-r*t,u=2*r-l;this.r=ud(u,l,e+1/3),this.g=ud(u,l,e),this.b=ud(u,l,e-1/3)}return la.toWorkingColorSpace(this,s),this}setStyle(e,t=yo){function r(l){void 0!==l&&parseFloat(l)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}let s;if(s=/^(\w+)\(([^\)]*)\)/.exec(e)){let l;const g=s[2];switch(s[1]){case"rgb":case"rgba":if(l=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(g))return this.r=Math.min(255,parseInt(l[1],10))/255,this.g=Math.min(255,parseInt(l[2],10))/255,this.b=Math.min(255,parseInt(l[3],10))/255,la.toWorkingColorSpace(this,t),r(l[4]),this;if(l=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(g))return this.r=Math.min(100,parseInt(l[1],10))/100,this.g=Math.min(100,parseInt(l[2],10))/100,this.b=Math.min(100,parseInt(l[3],10))/100,la.toWorkingColorSpace(this,t),r(l[4]),this;break;case"hsl":case"hsla":if(l=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(g)){const _=parseFloat(l[1])/360,x=parseFloat(l[2])/100,M=parseFloat(l[3])/100;return r(l[4]),this.setHSL(_,x,M,t)}break;default:console.warn("THREE.Color: Unknown color model "+e)}}else if(s=/^\#([A-Fa-f\d]+)$/.exec(e)){const l=s[1],u=l.length;if(3===u)return this.setRGB(parseInt(l.charAt(0),16)/15,parseInt(l.charAt(1),16)/15,parseInt(l.charAt(2),16)/15,t);if(6===u)return this.setHex(parseInt(l,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=yo){const r=t0[e.toLowerCase()];return void 0!==r?this.setHex(r,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=_h(e.r),this.g=_h(e.g),this.b=_h(e.b),this}copyLinearToSRGB(e){return this.r=Gp(e.r),this.g=Gp(e.g),this.b=Gp(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=yo){return la.fromWorkingColorSpace(Zs.copy(this),e),jr(255*Zs.r,0,255)<<16^jr(255*Zs.g,0,255)<<8^jr(255*Zs.b,0,255)}getHexString(e=yo){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t=la.workingColorSpace){la.fromWorkingColorSpace(Zs.copy(this),t);const r=Zs.r,s=Zs.g,l=Zs.b,u=Math.max(r,s,l),g=Math.min(r,s,l);let _,x;const M=(g+u)/2;if(g===u)_=0,x=0;else{const C=u-g;switch(x=M<=.5?C/(u+g):C/(2-u-g),u){case r:_=(s-l)/C+(s<l?6:0);break;case s:_=(l-r)/C+2;break;case l:_=(r-s)/C+4}_/=6}return e.h=_,e.s=x,e.l=M,e}getRGB(e,t=la.workingColorSpace){return la.fromWorkingColorSpace(Zs.copy(this),t),e.r=Zs.r,e.g=Zs.g,e.b=Zs.b,e}getStyle(e=yo){la.fromWorkingColorSpace(Zs.copy(this),e);const t=Zs.r,r=Zs.g,s=Zs.b;return e!==yo?`color(${e} ${t.toFixed(3)} ${r.toFixed(3)} ${s.toFixed(3)})`:`rgb(${255*t|0},${255*r|0},${255*s|0})`}offsetHSL(e,t,r){return this.getHSL(eo),eo.h+=e,eo.s+=t,eo.l+=r,this.setHSL(eo.h,eo.s,eo.l),this}add(e){return this.r+=e.r,this.g+=e.g,this.b+=e.b,this}addColors(e,t){return this.r=e.r+t.r,this.g=e.g+t.g,this.b=e.b+t.b,this}addScalar(e){return this.r+=e,this.g+=e,this.b+=e,this}sub(e){return this.r=Math.max(0,this.r-e.r),this.g=Math.max(0,this.g-e.g),this.b=Math.max(0,this.b-e.b),this}multiply(e){return this.r*=e.r,this.g*=e.g,this.b*=e.b,this}multiplyScalar(e){return this.r*=e,this.g*=e,this.b*=e,this}lerp(e,t){return this.r+=(e.r-this.r)*t,this.g+=(e.g-this.g)*t,this.b+=(e.b-this.b)*t,this}lerpColors(e,t,r){return this.r=e.r+(t.r-e.r)*r,this.g=e.g+(t.g-e.g)*r,this.b=e.b+(t.b-e.b)*r,this}lerpHSL(e,t){this.getHSL(eo),e.getHSL($u);const r=id(eo.h,$u.h,t),s=id(eo.s,$u.s,t),l=id(eo.l,$u.l,t);return this.setHSL(r,s,l),this}setFromVector3(e){return this.r=e.x,this.g=e.y,this.b=e.z,this}applyMatrix3(e){const t=this.r,r=this.g,s=this.b,l=e.elements;return this.r=l[0]*t+l[3]*r+l[6]*s,this.g=l[1]*t+l[4]*r+l[7]*s,this.b=l[2]*t+l[5]*r+l[8]*s,this}equals(e){return e.r===this.r&&e.g===this.g&&e.b===this.b}fromArray(e,t=0){return this.r=e[t],this.g=e[t+1],this.b=e[t+2],this}toArray(e=[],t=0){return e[t]=this.r,e[t+1]=this.g,e[t+2]=this.b,e}fromBufferAttribute(e,t){return this.r=e.getX(t),this.g=e.getY(t),this.b=e.getZ(t),this}toJSON(){return this.getHex()}*[Symbol.iterator](){yield this.r,yield this.g,yield this.b}}const Zs=new An;An.NAMES=t0;class vs extends as{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new An(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=Fg,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 za=fd();function fd(){const f=new ArrayBuffer(4),e=new Float32Array(f),t=new Uint32Array(f),r=new Uint32Array(512),s=new Uint32Array(512);for(let _=0;_<256;++_){const x=_-127;x<-27?(r[_]=0,r[256|_]=32768,s[_]=24,s[256|_]=24):x<-14?(r[_]=1024>>-x-14,r[256|_]=1024>>-x-14|32768,s[_]=-x-1,s[256|_]=-x-1):x<=15?(r[_]=x+15<<10,r[256|_]=x+15<<10|32768,s[_]=13,s[256|_]=13):x<128?(r[_]=31744,r[256|_]=64512,s[_]=24,s[256|_]=24):(r[_]=31744,r[256|_]=64512,s[_]=13,s[256|_]=13)}const l=new Uint32Array(2048),u=new Uint32Array(64),g=new Uint32Array(64);for(let _=1;_<1024;++_){let x=_<<13,M=0;for(;!(8388608&x);)x<<=1,M-=8388608;x&=-8388609,M+=947912704,l[_]=x|M}for(let _=1024;_<2048;++_)l[_]=939524096+(_-1024<<13);for(let _=1;_<31;++_)u[_]=_<<23;u[31]=1199570944,u[32]=2147483648;for(let _=33;_<63;++_)u[_]=2147483648+(_-32<<23);u[63]=3347054592;for(let _=1;_<64;++_)32!==_&&(g[_]=1024);return{floatView:e,uint32View:t,baseTable:r,shiftTable:s,mantissaTable:l,exponentTable:u,offsetTable:g}}const Ku={toHalfFloat:function Us(f){Math.abs(f)>65504&&console.warn("THREE.DataUtils.toHalfFloat(): Value out of range."),f=jr(f,-65504,65504),za.floatView[0]=f;const e=za.uint32View[0],t=e>>23&511;return za.baseTable[t]+((8388607&e)>>za.shiftTable[t])},fromHalfFloat:function Xo(f){const e=f>>10;return za.uint32View[0]=za.mantissaTable[za.offsetTable[e]+(1023&f)]+za.exponentTable[e],za.floatView[0]}},Sr=new Me,Fc=new Rt;class tr{constructor(e,t,r=!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=void 0!==e?e.length/t:0,this.normalized=r,this.usage=35044,this.updateRange={offset:0,count:-1},this.version=0}onUploadCallback(){}set needsUpdate(e){!0===e&&this.version++}setUsage(e){return this.usage=e,this}copy(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this}copyAt(e,t,r){e*=this.itemSize,r*=t.itemSize;for(let s=0,l=this.itemSize;s<l;s++)this.array[e+s]=t.array[r+s];return this}copyArray(e){return this.array.set(e),this}applyMatrix3(e){if(2===this.itemSize)for(let t=0,r=this.count;t<r;t++)Fc.fromBufferAttribute(this,t),Fc.applyMatrix3(e),this.setXY(t,Fc.x,Fc.y);else if(3===this.itemSize)for(let t=0,r=this.count;t<r;t++)Sr.fromBufferAttribute(this,t),Sr.applyMatrix3(e),this.setXYZ(t,Sr.x,Sr.y,Sr.z);return this}applyMatrix4(e){for(let t=0,r=this.count;t<r;t++)Sr.fromBufferAttribute(this,t),Sr.applyMatrix4(e),this.setXYZ(t,Sr.x,Sr.y,Sr.z);return this}applyNormalMatrix(e){for(let t=0,r=this.count;t<r;t++)Sr.fromBufferAttribute(this,t),Sr.applyNormalMatrix(e),this.setXYZ(t,Sr.x,Sr.y,Sr.z);return this}transformDirection(e){for(let t=0,r=this.count;t<r;t++)Sr.fromBufferAttribute(this,t),Sr.transformDirection(e),this.setXYZ(t,Sr.x,Sr.y,Sr.z);return this}set(e,t=0){return this.array.set(e,t),this}getX(e){let t=this.array[e*this.itemSize];return this.normalized&&(t=Na(t,this.array)),t}setX(e,t){return this.normalized&&(t=Bi(t,this.array)),this.array[e*this.itemSize]=t,this}getY(e){let t=this.array[e*this.itemSize+1];return this.normalized&&(t=Na(t,this.array)),t}setY(e,t){return this.normalized&&(t=Bi(t,this.array)),this.array[e*this.itemSize+1]=t,this}getZ(e){let t=this.array[e*this.itemSize+2];return this.normalized&&(t=Na(t,this.array)),t}setZ(e,t){return this.normalized&&(t=Bi(t,this.array)),this.array[e*this.itemSize+2]=t,this}getW(e){let t=this.array[e*this.itemSize+3];return this.normalized&&(t=Na(t,this.array)),t}setW(e,t){return this.normalized&&(t=Bi(t,this.array)),this.array[e*this.itemSize+3]=t,this}setXY(e,t,r){return e*=this.itemSize,this.normalized&&(t=Bi(t,this.array),r=Bi(r,this.array)),this.array[e+0]=t,this.array[e+1]=r,this}setXYZ(e,t,r,s){return e*=this.itemSize,this.normalized&&(t=Bi(t,this.array),r=Bi(r,this.array),s=Bi(s,this.array)),this.array[e+0]=t,this.array[e+1]=r,this.array[e+2]=s,this}setXYZW(e,t,r,s,l){return e*=this.itemSize,this.normalized&&(t=Bi(t,this.array),r=Bi(r,this.array),s=Bi(s,this.array),l=Bi(l,this.array)),this.array[e+0]=t,this.array[e+1]=r,this.array[e+2]=s,this.array[e+3]=l,this}
vendor: 3,483 bytes, line 72
72onUpload(e){return this.onUploadCallback=e,this}clone(){return new this.constructor(this.array,this.itemSize).copy(this)}toJSON(){const e={itemSize:this.itemSize,type:this.array.constructor.name,array:Array.from(this.array),normalized:this.normalized};return""!==this.name&&(e.name=this.name),35044!==this.usage&&(e.usage=this.usage),(0!==this.updateRange.offset||-1!==this.updateRange.count)&&(e.updateRange=this.updateRange),e}copyColorsArray(){console.error("THREE.BufferAttribute: copyColorsArray() was removed in r144.")}copyVector2sArray(){console.error("THREE.BufferAttribute: copyVector2sArray() was removed in r144.")}copyVector3sArray(){console.error("THREE.BufferAttribute: copyVector3sArray() was removed in r144.")}copyVector4sArray(){console.error("THREE.BufferAttribute: copyVector4sArray() was removed in r144.")}}class kc extends tr{constructor(e,t,r){super(new Uint16Array(e),t,r)}}class s0 extends tr{constructor(e,t,r){super(new Uint32Array(e),t,r)}}class Fn extends tr{constructor(e,t,r){super(new Float32Array(e),t,r)}}let tE=0;const wo=new ui,a0=new or,ju=new Me,to=new xo,dd=new xo,zs=new Me;class Ii extends Pc{constructor(){super(),this.isBufferGeometry=!0,Object.defineProperty(this,"id",{value:tE++}),this.uuid=Za(),this.name="",this.type="BufferGeometry",this.index=null,this.attributes={},this.morphAttributes={},this.morphTargetsRelative=!1,this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0},this.userData={}}getIndex(){return this.index}setIndex(e){return this.index=Array.isArray(e)?new(hv(e)?s0:kc)(e,1):e,this}getAttribute(e){return this.attributes[e]}setAttribute(e,t){return this.attributes[e]=t,this}deleteAttribute(e){return delete this.attributes[e],this}hasAttribute(e){return void 0!==this.attributes[e]}addGroup(e,t,r=0){this.groups.push({start:e,count:t,materialIndex:r})}clearGroups(){this.groups=[]}setDrawRange(e,t){this.drawRange.start=e,this.drawRange.count=t}applyMatrix4(e){const t=this.attributes.position;void 0!==t&&(t.applyMatrix4(e),t.needsUpdate=!0);const r=this.attributes.normal;if(void 0!==r){const l=(new zi).getNormalMatrix(e);r.applyNormalMatrix(l),r.needsUpdate=!0}const s=this.attributes.tangent;return void 0!==s&&(s.transformDirection(e),s.needsUpdate=!0),null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this}applyQuaternion(e){return wo.makeRotationFromQuaternion(e),this.applyMatrix4(wo),this}rotateX(e){return wo.makeRotationX(e),this.applyMatrix4(wo),this}rotateY(e){return wo.makeRotationY(e),this.applyMatrix4(wo),this}rotateZ(e){return wo.makeRotationZ(e),this.applyMatrix4(wo),this}translate(e,t,r){return wo.makeTranslation(e,t,r),this.applyMatrix4(wo),this}scale(e,t,r){return wo.makeScale(e,t,r),this.applyMatrix4(wo),this}lookAt(e){return a0.lookAt(e),a0.updateMatrix(),this.applyMatrix4(a0.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(ju).negate(),this.translate(ju.x,ju.y,ju.z),this}setFromPoints(e){const t=[];for(let r=0,s=e.length;r<s;r++){const l=e[r];t.push(l.x,l.y,l.z||0)}return this.setAttribute("position",new Fn(t,3)),this}computeBoundingBox(){null===this.boundingBox&&(this.boundingBox=new xo);const e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute)return console.error('THREE.BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box. Alternatively set "mesh.frustumCulled" to "fal
72se".',this),void this.boundingBox.set(new Me(-1/0,-1/0,-1/0),new Me(1/0,1/0,1/0));if(void 0!==e){if(this.boundingBox.setFromBufferAttribute(e),t)for(let r=0,s=t.length;r<s;r++)to.setFromBufferAttribute(t[r]),this.morphTargetsRelative?(zs.addVectors(this.boundingBox.min,to.min),this.boundingBox.expandByPoint(zs),zs.addVectors(this.boundingBox.max,to.max),this.boundingBox.expandByPoint(zs)):(this.boundingBox.expandByPoint(to.min),this.boundingBox.expandByPoint(to.max))}else this.boundingBox.makeEmpty();(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&console.error('THREE.BufferGeometry.computeBoundingBox(): Computed min/max have NaN values. The "position" attribute is likely to have NaN values.',this)}computeBoundingSphere(){null===this.boundingSphere&&(this.boundingSphere=new gl);const e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute)return console.error('THREE.BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere. Alternatively set "mesh.frustumCulled" to "fal
72se".',this),void this.boundingSphere.set(new Me,1/0);if(e){const r=this.boundingSphere.center;if(to.setFromBufferAttribute(e),t)for(let l=0,u=t.length;l<u;l++)dd.setFromBufferAttribute(t[l]),this.morphTargetsRelative?(zs.addVectors(to.min,dd.min),to.expandByPoint(zs),zs.addVectors(to.max,dd.max),to.expandByPoint(zs)):(to.expandByPoint(dd.min),to.expandByPoint(dd.max));to.getCenter(r);let s=0;for(let l=0,u=e.count;l<u;l++)zs.fromBufferAttribute(e,l),s=Math.max(s,r.distanceToSquared(zs));if(t)for(let l=0,u=t.length;l<u;l++){const g=t[l],_=this.morphTargetsRelative;for(let x=0,M=g.count;x<M;x++)zs.fromBufferAttribute(g,x),_&&(ju.fromBufferAttribute(e,x),zs.add(ju)),s=Math.max(s,r.distanceToSquared(zs))}this.boundingSphere.radius=Math.sqrt(s),isNaN(this.boundingSphere.radius)&&console.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this)}}computeTangents(){const e=this.index,t=this.attributes;if(null===e||void 0===t.position||void 0===t.normal||void 0===t.uv)return void console.error("THREE.BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)");const r=e.array,s=t.position.array,l=t.normal.array,u=t.uv.array,g=s.length/3;!1===this.hasAttribute("tangent")&&this.setAttribute("tangent",new tr(new Float32Array(4*g),4));const _=this.getAttribute("tangent").array,x=[],M=[];for(let ye=0;ye<g;ye++)x[ye]=new Me,M[ye]=new Me;const C=new Me,P=new Me,R=new Me,F=new Rt,O=new Rt,k=new Rt,L=new Me,V=new Me;function z(ye,He,qe){C.fromArray(s,3*ye),P.fromArray(s,3*He),R.fromArray(s,3*qe),F.fromArray(u,2*ye),O.fromArray(u,2*He),k.fromArray(u,2*qe),P.sub(C),R.sub(C),O.sub(F),k.sub(F);const Ge=1/(O.x*k.y-k.x*O.y);isFinite(Ge)&&(L.copy(P).multiplyScalar(k.y).addScaledVector(R,-O.y).multiplyScalar(Ge),V.copy(R).multiplyScalar(O.x).addScaledVector(P,-k.x).multiplyScalar(Ge),x[ye].add(L),x[He].add(L),x[qe].add(L),M[ye].add(V),M[He].add(V),M[qe].add(V))}let W=this.groups;0===W.length&&(W=[{start:0,count:r.length}]);for(let ye=0,He=W.length;ye<He;++ye){const qe=W[ye],Ge=qe.start;for(let We=Ge,nt=Ge+qe.count;We<nt;We+=3)z(r[We+0],r[We+1],r[We+2])}const ne=new Me,fe=new Me,ge=new Me,de=new Me;function ie(ye){ge.fromArray(l,3*ye),de.copy(ge);const He=x[ye];ne.copy(He),ne.sub(ge.multiplyScalar(ge.dot(He))).normalize(),fe.crossVectors(de,He);const Ge=fe.dot(M[ye])<0?-1:1;_[4*ye]=ne.x,_[4*ye+1]=ne.y,_[4*ye+2]=ne.z,_[4*ye+3]=Ge}for(let ye=0,He=W.length;ye<He;++ye){const qe=W[ye],Ge=qe.start;for(let We=Ge,nt=Ge+qe.count;We<nt;We+=3)ie(r[We+0]),ie(r[We+1]),ie(r[We+2])}}computeVertexNormals(){const e=this.index,t=this.getAttribute("position");if(void 0!==t){let r=this.getAttribute("normal");if(void 0===r)r=new tr(new Float32Array(3*t.count),3),this.setAttribute("normal",r);else for(let P=0,R=r.count;P<R;P++)r.setXYZ(P,0,0,0);const s=new Me,l=new Me,u=new Me,g=new Me,_=new Me,x=new Me,M=new Me,C=new Me;if(e)for(let P=0,R=e.count;P<R;P+=3){const F=e.getX(P+0),O=e.getX(P+1),k=e.getX(P+2);s.fromBufferAttribute(t,F),l.fromBufferAttribute(t,O),u.fromBufferAttribute(t,k),M.subVectors(u,l),C.subVectors(s,l),M.cross(C),g.fromBufferAttribute(r,F),_.fromBufferAttribute(r,O),x.fromBufferAttribute(r,k),g.add(M),_.add(M),x.add(M),r.setXYZ(F,g.x,g.y,g.z),r.setXYZ(O,_.x,_.y,_.z),r.setXYZ(k,x.x,x.y,x.z)}else for(let P=0,R=t.count;P<R;P+=3)s.fromBufferAttribute(t,P+0),l.fromBufferAttribute(t,P+1),u.fromBufferAttribute(t,P+2),M.subVectors(u,l),C.subVectors(s,l),M.cross(C),r.setXYZ(P+0,M.x,M.y,M.z),r.setXYZ(P+1,M.x,M.y,M.z),r.setXYZ(P+2,M.x,M.y,M.z);this.normalizeNormals(),r.needsUpdate=!0}}merge(){return console.error("THREE.BufferGeometry.merge() has been removed. Use THREE.BufferGeometryUtils.mergeGeometries() instead."),this}normalizeNormals(){const e=this.attributes.normal;for(let t=0,r=e.count;t<r;t++)zs.fromBufferAttribute(e,t),zs.normalize(),e.setXYZ(t,zs.x,zs.y,zs.z)}toNonIndexed(){function e(g,_){const x=g.array,M=g.itemSize,C=g.normalized,P=new x.constructor(_.length*M);let R=0,F=0;for(let O=0,k=_.length;O<k;O++){R=g.isInterleavedBufferAttribute?_[O]*g.data.stride+g.offset:_[O]*M;for(let L=0;L<M;L++)P[F++]=x[R++]}return new tr(P,M,C)}if(null===this.index)return console.warn("THREE.BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."),this;const t=new Ii,r=this.index.array,s=this.attributes;for(const g in s){const x=e(s[g],r);t.setAttribute(g,x)}const l=this.morphAttributes;for(const g in l){const _=[],x=l[g];for(let M=0,C=x.length;M<C;M++){const R=e(x[M],r);_.push(R)}t.morphAttributes[g]=_}t.morphTargetsRelative=this.morphTargetsRelative;const u=this.groups;for(let g=0,_=u.length;g<_;g++){const x=u[g];t.addGroup(x.start,x.count,x.materialIndex)}return t}toJSON(){const e={metadata:{version:4.5,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};
vendor: 11,265 bytes, line 72
72if(e.uuid=this.uuid,e.type=this.type,""!==this.name&&(e.name=this.name),Object.keys(this.userData).length>0&&(e.userData=this.userData),void 0!==this.parameters){const _=this.parameters;for(const x in _)void 0!==_[x]&&(e[x]=_[x]);return e}e.data={attributes:{}};const t=this.index;null!==t&&(e.data.index={type:t.array.constructor.name,array:Array.prototype.slice.call(t.array)});const r=this.attributes;for(const _ in r)e.data.attributes[_]=r[_].toJSON(e.data);const s={};let l=!1;for(const _ in this.morphAttributes){const x=this.morphAttributes[_],M=[];for(let C=0,P=x.length;C<P;C++)M.push(x[C].toJSON(e.data));M.length>0&&(s[_]=M,l=!0)}l&&(e.data.morphAttributes=s,e.data.morphTargetsRelative=this.morphTargetsRelative);const u=this.groups;u.length>0&&(e.data.groups=JSON.parse(JSON.stringify(u)));const g=this.boundingSphere;return null!==g&&(e.data.boundingSphere={center:g.center.toArray(),radius:g.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 r=e.index;null!==r&&this.setIndex(r.clone(t));const s=e.attributes;for(const x in s)this.setAttribute(x,s[x].clone(t));const l=e.morphAttributes;for(const x in l){const M=[],C=l[x];for(let P=0,R=C.length;P<R;P++)M.push(C[P].clone(t));this.morphAttributes[x]=M}this.morphTargetsRelative=e.morphTargetsRelative;const u=e.groups;for(let x=0,M=u.length;x<M;x++){const C=u[x];this.addGroup(C.start,C.count,C.materialIndex)}const g=e.boundingBox;null!==g&&(this.boundingBox=g.clone());const _=e.boundingSphere;return null!==_&&(this.boundingSphere=_.clone()),this.drawRange.start=e.drawRange.start,this.drawRange.count=e.drawRange.count,this.userData=e.userData,this}dispose(){this.dispatchEvent({type:"dispose"})}}const yv=new ui,yl=new Wu,Ju=new gl,xv=new Me,qo=new Me,ef=new Me,Mr=new Me,tf=new Me,pd=new Me,Mh=new Rt,wh=new Rt,nm=new Rt,nf=new Me,Ev=new Me,o0=new Me,md=new Me,Oc=new Me;class pn extends or{constructor(e=new Ii,t=new vs){super(),this.isMesh=!0,this.type="Mesh",this.geometry=e,this.material=t,this.updateMorphTargets()}copy(e,t){return super.copy(e,t),void 0!==e.morphTargetInfluences&&(this.morphTargetInfluences=e.morphTargetInfluences.slice()),void 0!==e.morphTargetDictionary&&(this.morphTargetDictionary=Object.assign({},e.morphTargetDictionary)),this.material=e.material,this.geometry=e.geometry,this}updateMorphTargets(){const t=this.geometry.morphAttributes,r=Object.keys(t);if(r.length>0){const s=t[r[0]];if(void 0!==s){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let l=0,u=s.length;l<u;l++){const g=s[l].name||String(l);this.morphTargetInfluences.push(0),this.morphTargetDictionary[g]=l}}}}getVertexPosition(e,t){const r=this.geometry,l=r.morphAttributes.position,u=r.morphTargetsRelative;t.fromBufferAttribute(r.attributes.position,e);const g=this.morphTargetInfluences;if(l&&g){pd.set(0,0,0);for(let _=0,x=l.length;_<x;_++){const M=g[_];0!==M&&(tf.fromBufferAttribute(l[_],e),pd.addScaledVector(u?tf:tf.sub(t),M))}t.add(pd)}return this.isSkinnedMesh&&this.applyBoneTransform(e,t),t}raycast(e,t){const r=this.geometry,s=this.material,l=this.matrixWorld;if(void 0===s||(null===r.boundingSphere&&r.computeBoundingSphere(),Ju.copy(r.boundingSphere),Ju.applyMatrix4(l),yl.copy(e.ray).recast(e.near),!1===Ju.containsPoint(yl.origin)&&(null===yl.intersectSphere(Ju,xv)||yl.origin.distanceToSquared(xv)>(e.far-e.near)**2))||(yv.copy(l).invert(),yl.copy(e.ray).applyMatrix4(yv),null!==r.boundingBox&&!1===yl.intersectsBox(r.boundingBox)))return;let u;const g=r.index,_=r.attributes.position,x=r.attributes.uv,M=r.attributes.uv2,C=r.attributes.normal,P=r.groups,R=r.drawRange;if(null!==g)if(Array.isArray(s))for(let F=0,O=P.length;F<O;F++){const k=P[F],L=s[k.materialIndex];for(let W=Math.max(k.start,R.start),ne=Math.min(g.count,Math.min(k.start+k.count,R.start+R.count));W<ne;W+=3){const fe=g.getX(W),ge=g.getX(W+1),de=g.getX(W+2);u=no(this,L,e,yl,x,M,C,fe,ge,de),u&&(u.faceIndex=Math.floor(W/3),u.face.materialIndex=k.materialIndex,t.push(u))}}else for(let k=Math.max(0,R.start),L=Math.min(g.count,R.start+R.count);k<L;k+=3){const V=g.getX(k),z=g.getX(k+1),W=g.getX(k+2);u=no(this,s,e,yl,x,M,C,V,z,W),u&&(u.faceIndex=Math.floor(k/3),t.push(u))}else if(void 0!==_)if(Array.isArray(s))for(let F=0,O=P.length;F<O;F++){const k=P[F],L=s[k.materialIndex];for(let W=Math.max(k.start,R.start),ne=Math.min(_.count,Math.min(k.start+k.count,R.start+R.count));W<ne;W+=3)u=no(this,L,e,yl,x,M,C,W,W+1,W+2),u&&(u.faceIndex=Math.floor(W/3),u.face.materialIndex=k.materialIndex,t.push(u))}else for(let k=Math.max(0,R.start),L=Math.min(_.count,R.start+R.count);k<L;k+=3)u=no(this,s,e,yl,x,M,C,k,k+1,k+2),u&&(u.faceIndex=Math.floor(k/3),t.push(u))}}function no(f,e,t,r,s,l,u,g,_,x){f.getVertexPosition(g,qo),f.getVertexPosition(_,ef),f.getVertexPosition(x,Mr);const M=function nE(f,e,t,r,s,l,u,g){let _;if(_=1===e.side?r.intersectTriangle(u,l,s,!0,g):r.intersectTriangle(s,l,u,0===e.side,g),null===_)return null;Oc.copy(g),Oc.applyMatrix4(f.matrixWorld);const x=t.ray.origin.distanceTo(Oc);return x<t.near||x>t.far?null:{distance:x,point:Oc.clone(),object:f}}(f,e,t,r,qo,ef,Mr,md);if(M){s&&(Mh.fromBufferAttribute(s,g),wh.fromBufferAttribute(s,_),nm.fromBufferAttribute(s,x),M.uv=ba.getInterpolation(md,qo,ef,Mr,Mh,wh,nm,new Rt)),l&&(Mh.fromBufferAttribute(l,g),wh.fromBufferAttribute(l,_),nm.fromBufferAttribute(l,x),M.uv2=ba.getInterpolation(md,qo,ef,Mr,Mh,wh,nm,new Rt)),u&&(nf.fromBufferAttribute(u,g),Ev.fromBufferAttribute(u,_),o0.fromBufferAttribute(u,x),M.normal=ba.getInterpolation(md,qo,ef,Mr,nf,Ev,o0,new Me),M.normal.dot(r.direction)>0&&M.normal.multiplyScalar(-1));const C={a:g,b:_,c:x,normal:new Me,materialIndex:0};ba.getNormal(qo,ef,Mr,C.normal),M.face=C}return M}class Qr extends Ii{constructor(e=1,t=1,r=1,s=1,l=1,u=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:t,depth:r,widthSegments:s,heightSegments:l,depthSegments:u};const g=this;s=Math.floor(s),l=Math.floor(l),u=Math.floor(u);const _=[],x=[],M=[],C=[];let P=0,R=0;function F(O,k,L,V,z,W,ne,fe,ge,de,ie){const ye=W/ge,He=ne/de,qe=W/2,Ge=ne/2,Ve=fe/2,We=ge+1,nt=de+1;let et=0,tt=0;const gt=new Me;for(let bt=0;bt<nt;bt++){const jt=bt*He-Ge;for(let Qt=0;Qt<We;Qt++)gt[O]=(Qt*ye-qe)*V,gt[k]=jt*z,gt[L]=Ve,x.push(gt.x,gt.y,gt.z),gt[O]=0,gt[k]=0,gt[L]=fe>0?1:-1,M.push(gt.x,gt.y,gt.z),C.push(Qt/ge),C.push(1-bt/de),et+=1}for(let bt=0;bt<de;bt++)for(let jt=0;jt<ge;jt++){const ct=P+jt+We*(bt+1),At=P+(jt+1)+We*(bt+1),Ut=P+(jt+1)+We*bt;_.push(P+jt+We*bt,ct,Ut),_.push(ct,At,Ut),tt+=6}g.addGroup(R,tt,ie),R+=tt,P+=et}F("z","y","x",-1,-1,r,t,e,u,l,0),F("z","y","x",1,-1,r,t,-e,u,l,1),F("x","z","y",1,1,e,r,t,s,u,2),F("x","z","y",1,-1,e,r,-t,s,u,3),F("x","y","z",1,-1,e,t,r,s,l,4),F("x","y","z",-1,-1,e,t,-r,s,l,5),this.setIndex(_),this.setAttribute("position",new Fn(x,3)),this.setAttribute("normal",new Fn(M,3)),this.setAttribute("uv",new Fn(C,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new Qr(e.width,e.height,e.depth,e.widthSegments,e.heightSegments,e.depthSegments)}}function Ch(f){const e={};for(const t in f){e[t]={};for(const r in f[t]){const s=f[t][r];s&&(s.isColor||s.isMatrix3||s.isMatrix4||s.isVector2||s.isVector3||s.isVector4||s.isTexture||s.isQuaternion)?s.isRenderTargetTexture?(console.warn("UniformsUtils: Textures of render targets cannot be cloned via cloneUniforms() or mergeUniforms()."),e[t][r]=null):e[t][r]=s.clone():e[t][r]=Array.isArray(s)?s.slice():s}}return e}function Cs(f){const e={};for(let t=0;t<f.length;t++){const r=Ch(f[t]);for(const s in r)e[s]=r[s]}return e}function bv(f){return null===f.getRenderTarget()&&f.outputEncoding===Ui?yo:Ou}const Nc={clone:Ch,merge:Cs};class Ts extends as{constructor(e){super(),this.isShaderMaterial=!0,this.type="ShaderMaterial",this.defines={},this.uniforms={},this.uniformsGroups=[],this.vertexShader="void main() {\n\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}",this.fragmentShader="void main() {\n\tgl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );\n}",this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!1,this.forceSinglePass=!0,this.extensions={derivatives:!1,fragDepth:!1,drawBuffers:!1,shaderTextureLOD:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv2:[0,0]},this.index0AttributeName=void 0,this.uniformsNeedUpdate=!1,this.glslVersion=null,void 0!==e&&this.setValues(e)}copy(e){return super.copy(e),this.fragmentShader=e.fragmentShader,this.vertexShader=e.vertexShader,this.uniforms=Ch(e.uniforms),this.uniformsGroups=function iE(f){const e=[];for(let t=0;t<f.length;t++)e.push(f[t].clone());return e}(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 s in this.uniforms){const u=this.uniforms[s].value;t.uniforms[s]=u&&u.isTexture?{type:"t",value:u.toJSON(e).uuid}:u&&u.isColor?{type:"c",value:u.getHex()}:u&&u.isVector2?{type:"v2",value:u.toArray()}:u&&u.isVector3?{type:"v3",value:u.toArray()}:u&&u.isVector4?{type:"v4",value:u.toArray()}:u&&u.isMatrix3?{type:"m3",value:u.toArray()}:u&&u.isMatrix4?{type:"m4",value:u.toArray()}:{value:u}}Object.keys(this.defines).length>0&&(t.defines=this.defines),t.vertexShader=this.vertexShader,t.fragmentShader=this.fragmentShader;const r={};for(const s in this.extensions)!0===this.extensions[s]&&(r[s]=!0);return Object.keys(r).length>0&&(t.extensions=r),t}}class l0 extends or{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new ui,this.projectionMatrix=new ui,this.projectionMatrixInverse=new ui}copy(e,t){return super.copy(e,t),this.matrixWorldInverse.copy(e.matrixWorldInverse),this.projectionMatrix.copy(e.projectionMatrix),this.projectionMatrixInverse.copy(e.projectionMatrixInverse),this}getWorldDirection(e){this.updateWorldMatrix(!0,!1);const t=this.matrixWorld.elements;return e.set(-t[8],-t[9],-t[10]).normalize()}updateMatrixWorld(e){super.updateMatrixWorld(e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(e,t){super.updateWorldMatrix(e,t),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return(new this.constructor).copy(this)}}class Wr extends l0{constructor(e=50,t=1,r=.1,s=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=e,this.zoom=1,this.near=r,this.far=s,this.focus=10,this.aspect=t,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.fov=e.fov,this.zoom=e.zoom,this.near=e.near,this.far=e.far,this.focus=e.focus,this.aspect=e.aspect,this.view=null===e.view?null:Object.assign({},e.view),this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this}setFocalLength(e){const t=.5*this.getFilmHeight()/e;this.fov=2*Nu*Math.atan(t),this.updateProjectionMatrix()}getFocalLength(){const e=Math.tan(.5*Ah*this.fov);return.5*this.getFilmHeight()/e}
vendor: 5,814 bytes, line 72
72getEffectiveFOV(){return 2*Nu*Math.atan(Math.tan(.5*Ah*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,r,s,l,u){this.aspect=e/t,null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=r,this.view.offsetY=s,this.view.width=l,this.view.height=u,this.updateProjectionMatrix()}clearViewOffset(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=this.near;let t=e*Math.tan(.5*Ah*this.fov)/this.zoom,r=2*t,s=this.aspect*r,l=-.5*s;const u=this.view;if(null!==this.view&&this.view.enabled){const _=u.fullWidth,x=u.fullHeight;l+=u.offsetX*s/_,t-=u.offsetY*r/x,s*=u.width/_,r*=u.height/x}const g=this.filmOffset;0!==g&&(l+=e*g/this.getFilmWidth()),this.projectionMatrix.makePerspective(l,l+s,t,t-r,e,this.far),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const t=super.toJSON(e);return t.object.fov=this.fov,t.object.zoom=this.zoom,t.object.near=this.near,t.object.far=this.far,t.object.focus=this.focus,t.object.aspect=this.aspect,null!==this.view&&(t.object.view=Object.assign({},this.view)),t.object.filmGauge=this.filmGauge,t.object.filmOffset=this.filmOffset,t}}class Ad extends or{constructor(e,t,r){super(),this.type="CubeCamera",this.renderTarget=r;const s=new Wr(-90,1,e,t);s.layers=this.layers,s.up.set(0,1,0),s.lookAt(1,0,0),this.add(s);const l=new Wr(-90,1,e,t);l.layers=this.layers,l.up.set(0,1,0),l.lookAt(-1,0,0),this.add(l);const u=new Wr(-90,1,e,t);u.layers=this.layers,u.up.set(0,0,-1),u.lookAt(0,1,0),this.add(u);const g=new Wr(-90,1,e,t);g.layers=this.layers,g.up.set(0,0,1),g.lookAt(0,-1,0),this.add(g);const _=new Wr(-90,1,e,t);_.layers=this.layers,_.up.set(0,1,0),_.lookAt(0,0,1),this.add(_);const x=new Wr(-90,1,e,t);x.layers=this.layers,x.up.set(0,1,0),x.lookAt(0,0,-1),this.add(x)}update(e,t){null===this.parent&&this.updateMatrixWorld();const r=this.renderTarget,[s,l,u,g,_,x]=this.children,M=e.getRenderTarget(),C=e.toneMapping,P=e.xr.enabled;e.toneMapping=Mc,e.xr.enabled=!1;const R=r.texture.generateMipmaps;r.texture.generateMipmaps=!1,e.setRenderTarget(r,0),e.render(t,s),e.setRenderTarget(r,1),e.render(t,l),e.setRenderTarget(r,2),e.render(t,u),e.setRenderTarget(r,3),e.render(t,g),e.setRenderTarget(r,4),e.render(t,_),r.texture.generateMipmaps=R,e.setRenderTarget(r,5),e.render(t,x),e.setRenderTarget(M),e.toneMapping=C,e.xr.enabled=P,r.texture.needsPMREMUpdate=!0}}class Uc extends ws{constructor(e,t,r,s,l,u,g,_,x,M){super(e=void 0!==e?e:[],t=void 0!==t?t:Iu,r,s,l,u,g,_,x,M),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(e){this.image=e}}class Sv extends Ks{constructor(e=1,t={}){super(e,e,t),this.isWebGLCubeRenderTarget=!0;const r={width:e,height:e,depth:1};this.texture=new Uc([r,r,r,r,r,r],t.mapping,t.wrapS,t.wrapT,t.magFilter,t.minFilter,t.format,t.type,t.anisotropy,t.encoding),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=void 0!==t.generateMipmaps&&t.generateMipmaps,this.texture.minFilter=void 0!==t.minFilter?t.minFilter:Tr}fromEquirectangularTexture(e,t){this.texture.type=t.type,this.texture.encoding=t.encoding,this.texture.generateMipmaps=t.generateMipmaps,this.texture.minFilter=t.minFilter,this.texture.magFilter=t.magFilter;const r_uniforms={tEquirect:{value:null}},r_vertexShader="\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\tvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\n\t\t\t\t\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n\n\t\t\t\t}\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvWorldDirection = transformDirection( position, modelMatrix );\n\n\t\t\t\t\t#include <begin_vertex>\n\t\t\t\t\t#include <project_vertex>\n\n\t\t\t\t}\n\t\t\t",r_fragmentShader="\n\n\t\t\t\tuniform sampler2D tEquirect;\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\t#include <common>\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvec3 direction = normalize( vWorldDirection );\n\n\t\t\t\t\tvec2 sampleUV = equirectUv( direction );\n\n\t\t\t\t\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\n\t\t\t\t}\n\t\t\t",s=new Qr(5,5,5),l=new Ts({name:"CubemapFromEquirect",uniforms:Ch(r_uniforms),vertexShader:r_vertexShader,fragmentShader:r_fragmentShader,side:1,blending:0});l.uniforms.tEquirect.value=t;const u=new pn(s,l),g=t.minFilter;return t.minFilter===Uo&&(t.minFilter=Tr),new Ad(1,10,this).update(e,u),t.minFilter=g,u.geometry.dispose(),u.material.dispose(),this}clear(e,t,r,s){const l=e.getRenderTarget();for(let u=0;u<6;u++)e.setRenderTarget(this,u),e.clear(t,r,s);e.setRenderTarget(l)}}const im=new Me,Mv=new Me,wv=new zi;class Co{constructor(e=new Me(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,r,s){return this.normal.set(e,t,r),this.constant=s,this}setFromNormalAndCoplanarPoint(e,t){return this.normal.copy(e),this.constant=-t.dot(this.normal),this}setFromCoplanarPoints(e,t,r){const s=im.subVectors(r,t).cross(Mv.subVectors(e,t)).normalize();return this.setFromNormalAndCoplanarPoint(s,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 r=e.delta(im),s=this.normal.dot(r);if(0===s)return 0===this.distanceToPoint(e.start)?t.copy(e.start):null;
vendor: 5,857 bytes, line 72
72const l=-(e.start.dot(this.normal)+this.constant)/s;return l<0||l>1?null:t.copy(e.start).addScaledVector(r,l)}intersectsLine(e){const t=this.distanceToPoint(e.start),r=this.distanceToPoint(e.end);return t<0&&r>0||r<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 r=t||wv.getNormalMatrix(e),s=this.coplanarPoint(im).applyMatrix4(e),l=this.normal.applyMatrix3(r).normalize();return this.constant=-s.dot(l),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 nc=new gl,_d=new Me;class rm{constructor(e=new Co,t=new Co,r=new Co,s=new Co,l=new Co,u=new Co){this.planes=[e,t,r,s,l,u]}set(e,t,r,s,l,u){const g=this.planes;return g[0].copy(e),g[1].copy(t),g[2].copy(r),g[3].copy(s),g[4].copy(l),g[5].copy(u),this}copy(e){const t=this.planes;for(let r=0;r<6;r++)t[r].copy(e.planes[r]);return this}setFromProjectionMatrix(e){const t=this.planes,r=e.elements,s=r[0],l=r[1],u=r[2],g=r[3],_=r[4],x=r[5],M=r[6],C=r[7],P=r[8],R=r[9],F=r[10],O=r[11],k=r[12],L=r[13],V=r[14],z=r[15];return t[0].setComponents(g-s,C-_,O-P,z-k).normalize(),t[1].setComponents(g+s,C+_,O+P,z+k).normalize(),t[2].setComponents(g+l,C+x,O+R,z+L).normalize(),t[3].setComponents(g-l,C-x,O-R,z-L).normalize(),t[4].setComponents(g-u,C-M,O-F,z-V).normalize(),t[5].setComponents(g+u,C+M,O+F,z+V).normalize(),this}intersectsObject(e){if(void 0!==e.boundingSphere)null===e.boundingSphere&&e.computeBoundingSphere(),nc.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{const t=e.geometry;null===t.boundingSphere&&t.computeBoundingSphere(),nc.copy(t.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(nc)}intersectsSprite(e){return nc.center.set(0,0,0),nc.radius=.7071067811865476,nc.applyMatrix4(e.matrixWorld),this.intersectsSphere(nc)}intersectsSphere(e){const t=this.planes,r=e.center,s=-e.radius;for(let l=0;l<6;l++)if(t[l].distanceToPoint(r)<s)return!1;return!0}intersectsBox(e){const t=this.planes;for(let r=0;r<6;r++){const s=t[r];if(_d.x=s.normal.x>0?e.max.x:e.min.x,_d.y=s.normal.y>0?e.max.y:e.min.y,_d.z=s.normal.z>0?e.max.z:e.min.z,s.distanceToPoint(_d)<0)return!1}return!0}containsPoint(e){const t=this.planes;for(let r=0;r<6;r++)if(t[r].distanceToPoint(e)<0)return!1;return!0}clone(){return(new this.constructor).copy(this)}}function c0(){let f=null,e=!1,t=null,r=null;function s(l,u){t(l,u),r=f.requestAnimationFrame(s)}return{start:function(){!0!==e&&null!==t&&(r=f.requestAnimationFrame(s),e=!0)},stop:function(){f.cancelAnimationFrame(r),e=!1},setAnimationLoop:function(l){t=l},setContext:function(l){f=l}}}function Cv(f,e){const t=e.isWebGL2,r=new WeakMap;return{get:function u(x){return x.isInterleavedBufferAttribute&&(x=x.data),r.get(x)},remove:function g(x){x.isInterleavedBufferAttribute&&(x=x.data);const M=r.get(x);M&&(f.deleteBuffer(M.buffer),r.delete(x))},update:function _(x,M){if(x.isGLBufferAttribute){const P=r.get(x);return void((!P||P.version<x.version)&&r.set(x,{buffer:x.buffer,type:x.type,bytesPerElement:x.elementSize,version:x.version}))}x.isInterleavedBufferAttribute&&(x=x.data);const C=r.get(x);void 0===C?r.set(x,function s(x,M){const C=x.array,P=x.usage,R=f.createBuffer();let F;if(f.bindBuffer(M,R),f.bufferData(M,C,P),x.onUploadCallback(),C instanceof Float32Array)F=5126;else if(C instanceof Uint16Array)if(x.isFloat16BufferAttribute){if(!t)throw new Error("THREE.WebGLAttributes: Usage of Float16BufferAttribute requires WebGL2.");F=5131}else F=5123;else if(C instanceof Int16Array)F=5122;else if(C instanceof Uint32Array)F=5125;else if(C instanceof Int32Array)F=5124;else if(C instanceof Int8Array)F=5120;else if(C instanceof Uint8Array)F=5121;else{if(!(C instanceof Uint8ClampedArray))throw new Error("THREE.WebGLAttributes: Unsupported buffer data format: "+C);F=5121}return{buffer:R,type:F,bytesPerElement:C.BYTES_PER_ELEMENT,version:x.version}}(x,M)):C.version<x.version&&(function l(x,M,C){const P=M.array,R=M.updateRange;f.bindBuffer(C,x),-1===R.count?f.bufferSubData(C,0,P):(t?f.bufferSubData(C,R.offset*P.BYTES_PER_ELEMENT,P,R.offset,R.count):f.bufferSubData(C,R.offset*P.BYTES_PER_ELEMENT,P.subarray(R.offset,R.offset+R.count)),R.count=-1),M.onUploadCallback()}(C.buffer,x,M),C.version=x.version)}}}class Th extends Ii{constructor(e=1,t=1,r=1,s=1){super(),this.type="PlaneGeometry",this.parameters={width:e,height:t,widthSegments:r,heightSegments:s};const l=e/2,u=t/2,g=Math.floor(r),_=Math.floor(s),x=g+1,M=_+1,C=e/g,P=t/_,R=[],F=[],O=[],k=[];for(let L=0;L<M;L++){const V=L*P-u;for(let z=0;z<x;z++)F.push(z*C-l,-V,0),O.push(0,0,1),k.push(z/g),k.push(1-L/_)}for(let L=0;L<_;L++)for(let V=0;V<g;V++){const W=V+x*(L+1),ne=V+1+x*(L+1),fe=V+1+x*L;R.push(V+x*L,W,fe),R.push(W,ne,fe)}this.setIndex(R),this.setAttribute("position",new Fn(F,3)),this.setAttribute("normal",new Fn(O,3)),this.setAttribute("uv",new Fn(k,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new Th(e.width,e.height,e.widthSegments,e.heightSegments)}}const Pi={alphamap_fragment:"#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, vAlphaMapUv ).g;\n#endif",alphamap_pars_fragment:"#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif",alphatest_fragment:"#ifdef USE_ALPHATEST\n\tif ( diffuseColor.a < alphaTest ) discard;\n#endif",alphatest_pars_fragment:"#ifdef USE_ALPHATEST\n\tuniform float alphaTest;\n#endif",aomap_fragment:"#ifdef USE_AOMAP\n\tfloat ambientOcclusion = ( texture2D( aoMap, vAoMapUv ).r - 1.0 ) * aoMapIntensity + 1.0;\n\treflectedLight.indirectDiffuse *= ambientOcclusion;\n\t#if defined( USE_ENVMAP ) && defined( STANDARD )\n\t\tfloat dotNV = saturate( dot
72( geometry.normal, geometry.viewDir ) );\n\t\treflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.roughness );\n\t#endif\n#endif",aomap_pars_fragment:"#ifdef USE_AOMAP\n\tuniform sampler2D aoMap;\n\tuniform float aoMapIntensity;\n#endif",begin_vertex:"vec3 transformed = vec3( position );",beginnormal_vertex:"vec3 objectNormal = vec3( normal );\n#ifdef USE_TANGENT\n\tvec3 objectTangent = vec3( tangent.xyz );\n#endif",bsdfs:"float G_BlinnPhong_Implicit( ) {\n\treturn 0.25;\n}\nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {\n\treturn RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );\n}\nvec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float shininess ) {\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, 1.0, dotVH );\n\tfloat G = G_BlinnPhong_Implicit( );\n\tfloat D = D_BlinnPhong( shininess, dotNH );\n\treturn F * ( G * D );\n} // validated",iridescence_fragment:"#ifdef USE_IRIDESCENCE\n\tconst mat3 XYZ_TO_REC709 = mat3(\n\t\t 3.2404542, -0.9692660,  0.0556434,\n\t\t-1.5371385,  1.8760108, -0.2040259,\n\t\t-0.4985314,  0.0415560,  1.0572252\n\t);\n\tvec3 Fresnel0ToIor( vec3 fresnel0 ) {\n\t\tvec3 sqrtF0 = sqrt( fresnel0 );\n\t\treturn ( vec3( 1.0 ) + sqrtF0 ) / ( vec3( 1.0 ) - sqrtF0 );\n\t}\n\tvec3 IorToFresnel0( vec3 transmittedIor, float incidentIor ) {\n\t\treturn pow2( ( transmittedIor - vec3( incidentIor ) ) / ( transmittedIor + vec3( incidentIor ) ) );\n\t}\n\tfloat IorToFresnel0( float transmittedIor, float incidentIor ) {\n\t\treturn pow2( ( transmittedIor - incidentIor ) / ( transmittedIor + incidentIor ));\n\t}\n\tvec3 evalSensitivity( float OPD, vec3 shift ) {\n\t\tfloat phase = 2.0 * PI * OPD * 1.0e-9;\n\t\tvec3 val = vec3( 5.4856e-13, 4.4201e-13, 5.2481e-13 );\n\t\tvec3 pos = vec3( 1.6810e+06, 1.7953e+06, 2.2084e+06 );\n\t\tvec3 var = vec3( 4.3278e+09, 9.3046e+09, 6.6121e+09 );\n\t\tvec3 xyz = val * sqrt( 2.0 * PI * var ) * cos( pos * phase + shift ) * exp( - pow2( phase ) * var );\n\t\txyz.x += 9.7470e-14 * sqrt( 2.0 * PI * 4.5282e+09 ) * cos( 2.2399e+06 * phase + shift[ 0 ] ) * exp( - 4.5282e+09 * pow2( phase ) );\n\t\txyz /= 1.0685e-7;\n\t\tvec3 rgb = XYZ_TO_REC709 * xyz;\n\t\treturn rgb;\n\t}\n\tvec3 evalIridescence( float outsideIOR, float eta2, float cosTheta1, float thinFilmThickness, vec3 baseF0 ) {\n\t\tvec3 I;\n\t\tfloat iridescenceIOR = mix( outsideIOR, eta2, smoothstep( 0.0, 0.03, thinFilmThickness ) );\n\t\tfloat sinTheta2Sq = pow2( outsideIOR / iridescenceIOR ) * ( 1.0 - pow2( cosTheta1 ) );\n\t\tfloat cosTheta2Sq = 1.0 - sinTheta2Sq;\n\t\tif ( cosTheta2Sq < 0.0 ) {\n\t\t\t return vec3( 1.0 );\n\t\t}\n\t\tfloat cosTheta2 = sqrt( cosTheta2Sq );\n\t\tfloat R0 = IorToFresnel0( iridescenceIOR, outsideIOR );\n\t\tfloat R12 = F_Schlick( R0, 1.0, cosTheta1 );\n\t\tfloat R21 = R12;\n\t\tfloat T121 = 1.0 - R12;\n\t\tfloat phi12 = 0.0;\n\t\tif ( iridescenceIOR < outsideIOR ) phi12 = PI;\n\t\tfloat phi21 = PI - phi12;\n\t\tvec3 baseIOR = Fresnel0ToIor( clamp( baseF0, 0.0, 0.9999 ) );\t\tvec3 R1 = IorToFresnel0( baseIOR, iridescenceIOR );
72\n\t\tvec3 R23 = F_Schlick( R1, 1.0, cosTheta2 );\n\t\tvec3 phi23 = vec3( 0.0 );\n\t\tif ( baseIOR[ 0 ] < iridescenceIOR ) phi23[ 0 ] = PI;\n\t\tif ( baseIOR[ 1 ] < iridescenceIOR ) phi23[ 1 ] = PI;\n\t\tif ( baseIOR[ 2 ] < iridescenceIOR ) phi23[ 2 ] = PI;\n\t\tfloat OPD = 2.0 * iridescenceIOR * thinFilmThickness * cosTheta2;\n\t\tvec3 phi = vec3( phi21 ) + phi23;\n\t\tvec3 R123 = clamp( R12 * R23, 1e-5, 0.9999 );\n\t\tvec3 r123 = sqrt( R123 );\n\t\tvec3 Rs = pow2( T121 ) * R23 / ( vec3( 1.0 ) - R123 );\n\t\tvec3 C0 = R12 + Rs;\n\t\tI = C0;\n\t\tvec3 Cm = Rs - T121;\n\t\tfor ( int m = 1; m <= 2; ++ m ) {\n\t\t\tCm *= r123;\n\t\t\tvec3 Sm = 2.0 * evalSensitivity( float( m ) * OPD, float( m ) * phi );\n\t\t\tI += Cm * Sm;\n\t\t}\n\t\treturn max( I, vec3( 0.0 ) );\n\t}\n#endif",bumpmap_pars_fragment:"#ifdef USE_BUMPMAP\n\tuniform sampler2D bumpMap;\n\tuniform float bumpScale;\n\tvec2 dHdxy_fwd() {\n\t\tvec2 dSTdx = dFdx( vBumpMapUv );\n\t\tvec2 dSTdy = dFdy( vBumpMapUv );\n\t\tfloat Hll = bumpScale * texture2D( bumpMap, vBumpMapUv ).x;\n\t\tfloat dBx = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdx ).x - Hll;\n\t\tfloat dBy = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdy ).x - Hll;\n\t\treturn vec2( dBx, dBy );\n\t}\n\tvec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy, float faceDirection ) {\n\t\tvec3 vSigmaX = dFdx( surf_pos.xyz );\n\t\tvec3 vSigmaY = dFdy( surf_pos.xyz );\n\t\tvec3 vN = surf_norm;\n\t\tvec3 R1 = cross( vSigmaY, vN );\n\t\tvec3 R2 = cross( vN, vSigmaX );\n\t\tfloat fDet = dot( vSigmaX, R1 ) * faceDirection;\n\t\tvec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\n\t\treturn normalize( abs( fDet ) * surf_norm - vGrad );\n\t}\n#endif",clipping_planes_fragment:"#if NUM_CLIPPING_PLANES > 0\n\tvec4 plane;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n\t\tplane = clippingPlanes[ i ];\n\t\tif ( dot( vClipPosition, plane.xyz ) > plane.w ) discard;\n\t}\n\t#pragma unroll_loop_end\n\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\t\tbool clipped = true;\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n\t\t\tplane = clippingPlanes[ i ];\n\t\t\tclipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t\tif ( clipped ) discard;\n\t#endif\n#endif",clipping_planes_pars_fragment:"#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\n#endif",clipping_planes_pars_vertex:"#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n#endif",clipping_planes_vertex:"#if NUM_CLIPPING_PLANES > 0\n\tvClipPosition = - mvPosition.xyz;\n#endif",color_fragment:"#if defined( USE_COLOR_ALPHA )\n\tdiffuseColor *= vColor;\n#elif defined( USE_COLOR )\n\tdiffuseColor.rgb *= vColor;\n#endif",color_pars_fragment:"#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR )\n\tvarying vec3 vColor;\n#endif",color_pars_vertex:"#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n\tvarying vec3 vColor;\n#endif",color_vertex:"#if defined( USE_COLOR_ALPHA )\n\tvColor = vec4( 1.0 );\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n\tvColor = vec3( 1.0 );\n#endif\n#ifdef USE_COLOR\n\tvColor *= color;\n#endif\n#ifdef USE_INSTANCING_COLOR\n\tvColor.xyz *= instanceColor.xyz;\n#endif",common:"#define PI 3.141592653589793\n#define PI2 6.283185307179586\n#define PI_HALF 1.5707963267948966\n#define RECIPROCAL_PI 0.3183098861837907\n#define RECIPROCAL_PI2 0.15915494309189535\n#define EPSILON 1e-6\n#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\n#define whiteComplement( a ) ( 1.0 - saturate( a ) )\nfloat pow2( const in float x ) { return x*x; }\nvec3 pow2( const in vec3 x ) { return x*x; }\nfloat pow3( const in float x ) { return x*x*x; }\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\nfloat max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); }\nfloat average( const in vec3 v ) { return dot( v, vec3( 0.3333333 ) ); }\nhighp float rand( const in vec2 uv ) {\n\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\n\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\n\treturn fract( sin( sn ) * c );\n}\n#ifdef HIGH_PRECISION\n\tfloat precisionSafeLength( vec3 v ) { return length( v ); }\n#else\n\tfloat precisionSafeLength( vec3 v ) {\n\t\tfloat maxComponent = max3( abs( v ) );\n\t\treturn length( v / maxComponent ) * maxComponent;\n\t}\n#endif\nstruct IncidentLight {\n\tvec3 color;\n\tvec3 direction;\n\tbool visible;\n};\nstruct ReflectedLight {\n\tvec3 directDiffuse;\n\tvec3 directSpecular;\n\tvec3 indirectDiffuse;\n\tvec3 indirectSpecular;\n};\nstruct GeometricContext {\n\tvec3 position;\n\tvec3 normal;\n\tvec3 viewDir;\n#ifdef USE_CLEARCOAT\n\tvec3 clearcoatNormal;\n#endif\n};\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n}\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\n}\nmat3 transposeMat3( const in mat3 m ) {\n\tmat3 tmp;\n\ttmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\n\ttmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\n\ttmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\n\treturn tmp;\n}\nfloat luminance( const in vec3 rgb ) {\n\tconst vec3 weights = vec3( 0.2126729, 0.7151522, 0.0721750 );\n\treturn dot( weights, rgb );\n}\nbool isPerspectiveMatrix( mat4 m ) {\n\treturn m[ 2 ][ 3 ] == - 1.0;\n}\nvec2 equirectUv( in vec3 dir ) {\n\tfloat u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5;\n\tfloat v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\treturn vec2( u, v );\n}\nvec3 BRDF_Lambert( const in vec3 diffuseColor ) {\n\treturn RECIPROCAL_PI * diffuseColor;\n}\nvec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) {\n\tfloat fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n\treturn f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n}\nfloat F_Schlick( const in float f0, const in float f90, const in float dotVH ) {\n\tfloat fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n\treturn f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n} // validated",cube_uv_reflection_fragment:"#ifdef ENVMAP_TYPE_CUBE_UV\n\t#define cubeUV_minMipLevel 4.0\n\t#define cubeUV_minTileSize 16.0\n\tfloat getFace( vec3 direction ) {\n\t\tvec3 absDirection = abs( direction );\n\t\tfloat face = - 1.0;\n\t\tif ( absDirection.x > absDirection.z ) {\n\t\t\tif ( absDirection.x > absDirection.y )\n\t\t\t\tface = direction.x > 0.0 ? 0.0 : 3.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t} else {\n\t\t\tif ( absDirection.z > absDirection.y )\n\t\t\t\tface = direction.z > 0.0 ? 2.0 : 5.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t}\n\t\treturn face;\n\t}\n\tvec2 getUV( vec3 direction, float face ) {\n\t\tvec2 uv;\n\t\tif ( face == 0.0 ) {\n\t\t\tuv = vec2( direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 1.0 ) {\n\t\t\tuv = vec2( - direction.x, - direction.z ) / abs( direction.y );\n\t\t} else if ( face == 2.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.y ) / abs( direction.z );\n\t\t} else if ( face == 3.0 ) {\n\t\t\tuv = vec2( - direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 4.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.z ) / abs( direction.y );\n\t\t} else {\n\t\t\tuv = vec2( direction.x, direction.y ) / abs( direction.z );\n\t\t}\n\t\treturn 0.5 * ( uv + 1.0 );\n\t}\n\tvec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) {\n\t\tfloat face = getFace( direction );\n\t\tfloat filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );\n\t\tmipInt = max( mipInt, cubeUV_minMipLevel );\n\t\tfloat faceSize = exp2( mipInt );\n\t\thighp vec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0;\n\t\tif ( face > 2.0 ) {\n\t\t\tuv.y += faceSize;\n\t\t\tface -= 3.0;\n\t\t}\n\t\tuv.x += face * faceSize;\n\t\tuv.x += filterInt * 3.0 * cubeUV_minTileSize;\n\t\tuv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize );\n\t\tuv.x *= CUBEUV_TEXEL_WIDTH;\n\t\tuv.y *= CUBEUV_TEXEL_HEIGHT;\n\t\t#ifdef texture2DGradEXT\n\t\t\treturn texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb;\n\t\t#else\n\t\t\treturn texture2D( envMap, uv ).rgb;\n\t\t#endif\n\t}\n\t#define cubeUV_r0 1.0\n\t#define cubeUV_v0 0.339\n\t#define cubeUV_m0 - 2.0\n\t#define cubeUV_r1 0.8\n\t#define cubeUV_v1 0.276\n\t#define cubeUV_m1 - 1.0\n\t#define cubeUV_r4 0.4\n\t#define cubeUV_v4 0.046\n\t#define cubeUV_m4 2.0\n\t#define cubeUV_r5 0.305\n\t#define cubeUV_v5 0.016\n\t#define cubeUV_m5 3.0\n\t#define cubeUV_r6 0.21\n\t#define cubeUV_v6 0.0038\n\t#define cubeUV_m6 4.0\n\tfloat roughnessToMip( float roughness ) {\n\t\tfloat mip = 0.0;\n\t\tif ( roughness >= cubeUV_r1 ) {\n\t\t\tmip = ( cubeUV_r0 - roughness ) * ( cubeUV_m1 - cubeUV_m0 ) / ( cubeUV_r0 - cubeUV_r1 ) + cubeUV_m0;\n\t\t} else if ( roughness >= cubeUV_r4 ) {\n\t\t\tmip = ( cubeUV_r1 - roughness ) * ( cubeUV_m4 - cubeUV_m1 ) / ( cubeUV_r1 - cubeUV_r4 ) + cubeUV_m1;\n\t\t} else if ( roughness >= cubeUV_r5 ) {\n\t\t\tmip = ( cubeUV_r4 - roughness ) * ( cubeUV_m5 - cubeUV_m4 ) / ( cubeUV_r4 - cubeUV_r5 ) + cubeUV_m4;\n\t\t} else if ( roughness >= cubeUV_r6 ) {\n\t\t\tmip = ( cubeUV_r5 - roughness ) * ( cubeUV_m6 - cubeUV_m5 ) / ( cubeUV_r5 - cubeUV_r6 ) + cubeUV_m5;\n\t\t} else {\n\t\t\tmip = - 2.0 * log2( 1.16 * roughness );\t\t}\n\t\treturn mip;\n\t}\n\tvec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) {\n\t\tfloat mip = clamp( roughnessToMip( roughness ), cubeUV_m0, CUBEUV_MAX_MIP );\n\t\tfloat mipF = fract( mip );\n\t\tfloat mipInt = floor( mip );\n\t\tvec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt );\n\t\tif ( mipF == 0.0 ) {\n\t\t\treturn vec4( color0, 1.0 );\n\t\t} else {\n\t\t\tvec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 );\n\t\t\treturn vec4( mix( color0, color1, mipF ), 1.0 );\n\t\t}\n\t}\n#endif",defaultnormal_vertex:"vec3 transformedNormal = objectNormal;\n#ifdef USE_INSTANCING\n\tmat3 m = mat3( instanceMatrix );\n\ttransformedNormal /= vec3( dot( m[ 0 ], m[ 0 ] ), dot( m[ 1 ], m[ 1 ] ), dot( m[ 2 ], m[ 2 ] ) );\n\ttransformedNormal = m * transformedNormal;\n#endif\ntransformedNormal = normalMatrix * transformedNormal;\n#ifdef FLIP_SIDED\n\ttransformedNormal = - transformedNormal;\n#endif\n#ifdef USE_TANGENT\n\tvec3 transformedTangent = ( modelViewMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\t#ifdef FLIP_SIDED\n\t\ttransformedTangent = - transformedTangent;\n\t#endif\n#endif",displacementmap_pars_vertex:"#ifdef USE_DISPLACEMENTMAP\n\tuniform sampler2D displacementMap;\n\tuniform float displacementScale;\n\tuniform float displacementBias;\n#endif",displacementmap_vertex:"#ifdef USE_DISPLACEMENTMAP\n\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, vDisplacementMapUv ).x * displacementScale + dis
72placementBias );\n#endif",emissivemap_fragment:"#ifdef USE_EMISSIVEMAP\n\tvec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv );\n\ttotalEmissiveRadiance *= emissiveColor.rgb;\n#endif",emissivemap_pars_fragment:"#ifdef USE_EMISSIVEMAP\n\tuniform sampler2D emissiveMap;\n#endif",encodings_fragment:"gl_FragColor = linearToOutputTexel( gl_FragColor );",encodings_pars_fragment:"vec4 LinearToLinear( in vec4 value ) {\n\treturn value;\n}\nvec4 LinearTosRGB( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a );\n}",envmap_fragment:"#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvec3 cameraToFrag;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToFrag = normalize( vWorldPosition - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( cameraToFrag, worldNormal );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio );\n\t\t#endif\n\t#else\n\t\tvec3 reflectVec = vReflect;\n\t#endif\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\n\t#else\n\t\tvec4 envColor = vec4( 0.0 );\n\t#endif\n\t#ifdef ENVMAP_BLENDING_MULTIPLY\n\t\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_MIX )\n\t\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_ADD )\n\t\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\n\t#endif\n#endif",envmap_common_pars_fragment:"#ifdef USE_ENVMAP\n\tuniform float envMapIntensity;\n\tuniform float flipEnvMap;\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tuniform samplerCube envMap;\n\t#else\n\t\tuniform sampler2D envMap;\n\t#endif\n\t\n#endif",envmap_pars_fragment:"#ifdef USE_ENVMAP\n\tuniform float reflectivity;\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\tvarying vec3 vWorldPosition;\n\t\tuniform float refractionRatio;\n\t#else\n\t\tvarying vec3 vReflect;\n\t#endif\n#endif",envmap_pars_vertex:"#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\t\n\t\tvarying vec3 vWorldPosition;\n\t#else\n\t\tvarying vec3 vReflect;\n\t\tuniform float refractionRatio;\n\t#endif\n#endif",envmap_physical_pars_fragment:"#if defined( USE_ENVMAP )\n\tvec3 getIBLIrradiance( const in vec3 normal ) {\n\t\t#if defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, worldNormal, 1.0 );\n\t\t\treturn PI * envMapColor.rgb * envMapIntensity;\n\t\t#else\n\t\t\treturn vec3( 0.0 );\n\t\t#endif\n\t}\n\tvec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) {\n\t\t#if defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec3 reflectVec = reflect( - viewDir, normal );\n\t\t\treflectVec = normalize( mix( reflectVec, normal, roughness * roughness) );\n\t\t\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, reflectVec, roughness );\n\t\t\treturn envMapColor.rgb * envMapIntensity;\n\t\t#else\n\t\t\treturn vec3( 0.0 );\n\t\t#endif\n\t}\n#endif",envmap_vertex:"#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvWorldPosition = worldPosition.xyz;\n\t#else\n\t\tvec3 cameraToVertex;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t}
72 else {\n\t\t\tcameraToVertex = normalize( worldPosition.xyz - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvReflect = reflect( cameraToVertex, worldNormal );\n\t\t#else\n\t\t\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\n\t\t#endif\n\t#endif\n#endif",fog_vertex:"#ifdef USE_FOG\n\tvFogDepth = - mvPosition.z;\n#endif",fog_pars_vertex:"#ifdef USE_FOG\n\tvarying float vFogDepth;\n#endif",fog_fragment:"#ifdef USE_FOG\n\t#ifdef FOG_EXP2\n\t\tfloat fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth );\n\t#else\n\t\tfloat fogFactor = smoothstep( fogNear, fogFar, vFogDepth );\n\t#endif\n\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\n#endif",fog_pars_fragment:"#ifdef USE_FOG\n\tuniform vec3 fogColor;\n\tvarying float vFogDepth;\n\t#ifdef FOG_EXP2\n\t\tuniform float fogDensity;\n\t#else\n\t\tuniform float fogNear;\n\t\tuniform float fogFar;\n\t#endif\n#endif",gradientmap_pars_fragment:"#ifdef USE_GRADIENTMAP\n\tuniform sampler2D gradientMap;\n#endif\nvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\n\tfloat dotNL = dot( normal, lightDirection );\n\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\n\t#ifdef USE_GRADIENTMAP\n\t\treturn vec3( texture2D( gradientMap, coord ).r );\n\t#else\n\t\tvec2 fw = fwidth( coord ) * 0.5;\n\t\treturn mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) );\n\t#endif\n}",lightmap_fragment:"#ifdef USE_LIGHTMAP\n\tvec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\n\tvec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;\n\treflectedLight.indirectDiffuse += lightMapIrradiance;\n#endif",lightmap_pars_fragment:"#ifdef USE_LIGHTMAP\n\tuniform sampler2D lightMap;\n\tuniform float lightMapIntensity;\n#endif",lights_lambert_fragment:"LambertMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularStrength = specularStrength;",lights_lambert_pars_fragment:"varying vec3 vViewPosition;\nstruct LambertMaterial {\n\tvec3 diffuseColor;\n\tfloat specularStrength;\n};\nvoid RE_Direct_Lambert( const in IncidentLight directLight, const in GeometricContext geometry, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Lambert( const in vec3 irradiance, const in GeometricContext geometry, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Lambert\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Lambert",lights_pars_begin:"uniform bool receiveShadow;\nuniform vec3 ambientLightColor;\nuniform vec3 lightProbe[ 9 ];\nvec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {\n\tfloat x = normal.x, y = normal.y, z = normal.z;\n\tvec3 result = shCoefficients[ 0 ] * 0.886227;\n\tresult += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;\n\tresult += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;\n\tresult += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;\n\tresult += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;\n\tresult += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;\n\tresult += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );\n\tresult += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;\n\tresult += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );\n\treturn result;\n}\nvec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in vec3 normal ) {\n\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\tvec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe );\n\treturn irradiance;\n}\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\n\tvec3 irradiance = ambientLightColor;\n\treturn irradiance;\n}\nfloat getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\n\t#if defined ( LEGACY_LIGHTS )\n\t\tif ( cutoffDistance > 0.0 && decayExponent > 0.0 ) {\n\t\t\treturn pow( saturate( - lightDistance / cutoffDistance + 1.0 ), decayExponent );\n\t\t}\n\t\treturn 1.0;\n\t#else\n\t\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\t\tif ( cutoffDistance > 0.0 ) {\n\t\t\tdistanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t\t}\n\t\treturn distanceFalloff;\n\t#endif\n}\nfloat getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) {\n\treturn smoothstep( coneCosine, penumbraCosine, angleCosine );\n}\n#if NUM_DIR_LIGHTS > 0\n\tstruct DirectionalLight {\n\t\tvec3 direction;\n\t\tvec3 color;\n\t};\n\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\n\tvoid getDirectionalLightInfo( const in DirectionalLight directionalLight, const in GeometricContext geometry, out IncidentLight light ) {\n\t\tlight.color = directionalLight.color;\n\t\tlight.direction = directionalLight.direction;\n\t\tlight.visible = true;\n\t}\n#endif\n#if NUM_POINT_LIGHTS > 0\n\tstruct PointLight {\n\t\tvec3 position;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t};\n\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\n\tvoid getPointLightInfo( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight light ) {\n\t\tvec3 lVector = pointLight.position - geometry.position;\n\t\tlight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tlight.color = pointLight.color;\n\t\tlight.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay );\n\t\tlight.visible = ( light.color != vec3( 0.0 ) );\n\t}
72\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\tstruct SpotLight {\n\t\tvec3 position;\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t\tfloat coneCos;\n\t\tfloat penumbraCos;\n\t};\n\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\n\tvoid getSpotLightInfo( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight light ) {\n\t\tvec3 lVector = spotLight.position - geometry.position;\n\t\tlight.direction = normalize( lVector );\n\t\tfloat angleCos = dot( light.direction, spotLight.direction );\n\t\tfloat spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n\t\tif ( spotAttenuation > 0.0 ) {\n\t\t\tfloat lightDistance = length( lVector );\n\t\t\tlight.color = spotLight.color * spotAttenuation;\n\t\t\tlight.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay );\n\t\t\tlight.visible = ( light.color != vec3( 0.0 ) );\n\t\t} else {\n\t\t\tlight.color = vec3( 0.0 );\n\t\t\tlight.visible = false;\n\t\t}\n\t}\n#endif\n#if NUM_RECT_AREA_LIGHTS > 0\n\tstruct RectAreaLight {\n\t\tvec3 color;\n\t\tvec3 position;\n\t\tvec3 halfWidth;\n\t\tvec3 halfHeight;\n\t};\n\tuniform sampler2D ltc_1;\tuniform sampler2D ltc_2;\n\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\tstruct HemisphereLight {\n\t\tvec3 direction;\n\t\tvec3 skyColor;\n\t\tvec3 groundColor;\n\t};\n\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\n\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in vec3 normal ) {\n\t\tfloat dotNL = dot( normal, hemiLight.direction );\n\t\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n\t\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n\t\treturn irradiance;\n\t}\n#endif",lights_toon_fragment:"ToonMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;",lights_toon_pars_fragment:"varying vec3 vViewPosition;\nstruct ToonMaterial {\n\tvec3 diffuseColor;\n};\nvoid RE_Direct_Toon( const in IncidentLight directLight, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\tvec3 irradiance = getGradientIrradiance( geometry.normal, directLight.direction ) * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Toon\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Toon",lights_phong_fragment:"BlinnPhongMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularColor = specular;\nmaterial.specularShininess = shininess;\nmaterial.specularStrength = specularStrength;",lights_phong_pars_fragment:"varying vec3 vViewPosition;\nstruct BlinnPhongMaterial {\n\tvec3 diffuseColor;\n\tvec3 specularColor;\n\tfloat specularShininess;\n\tfloat specularStrength;\n};\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n\treflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometry.viewDir, geometry.normal, material.specularColor, material.specularShininess ) * material.specularStrength;\n}\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_BlinnPhong\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_BlinnPhong",lights_physical_fragment:"PhysicalMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\nvec3 dxy = max( abs( dFdx( geometryNormal ) ), abs( dFdy( geometryNormal ) ) );\nfloat geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );\nmaterial.roughness = max( roughnessFactor, 0.0525 );material.roughness += geometryRoughness;\nmaterial.roughness = min( material.roughness, 1.0 );\n#ifdef IOR\n\tmaterial.ior = ior;\n\t#ifdef USE_SPECULAR\n\t\tfloat specularIntensityFactor = specularIntensity;\n\t\tvec3 specularColorFactor = specularColor;\n\t\t#ifdef USE_SPECULAR_COLORMAP\n\t\t\tspecularColorFactor *= texture2D( specularColorMap, vSpecularColorMapUv ).rgb;\n\t\t#endif\n\t\t#ifdef USE_SPECULAR_INTENSITYMAP\n\t\t\tspecularIntensityFactor *= texture2D( specularIntensityMap, vSpecularIntensityMapUv ).a;\n\t\t#endif\n\t\tmaterial.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor );\n\t#else\n\t\tfloat specularIntensityFactor = 1.0;\n\t\tvec3 specularColorFactor = vec3( 1.0 );\n\t\tmaterial.specularF90 = 1.0;\n\t#endif\n\tmaterial.specularColor = mix( min( pow2( ( material.ior - 1.0 ) / ( material.ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor, diffuseColor.rgb, metalnessFactor );\n#else\n\tmaterial.specularColor = mix( vec3( 0.04 ), diffuseColor.rgb, metalnessFactor );\n\tmaterial.specularF90 = 1.0;\n#endif\n#ifdef USE_CLEARCOAT\n\tmaterial.clearcoat = clearcoat;
72\n\tmaterial.clearcoatRoughness = clearcoatRoughness;\n\tmaterial.clearcoatF0 = vec3( 0.04 );\n\tmaterial.clearcoatF90 = 1.0;\n\t#ifdef USE_CLEARCOATMAP\n\t\tmaterial.clearcoat *= texture2D( clearcoatMap, vClearcoatMapUv ).x;\n\t#endif\n\t#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\t\tmaterial.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vClearcoatRoughnessMapUv ).y;\n\t#endif\n\tmaterial.clearcoat = saturate( material.clearcoat );\tmaterial.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 );\n\tmaterial.clearcoatRoughness += geometryRoughness;\n\tmaterial.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 );\n#endif\n#ifdef USE_IRIDESCENCE\n\tmaterial.iridescence = iridescence;\n\tmaterial.iridescenceIOR = iridescenceIOR;\n\t#ifdef USE_IRIDESCENCEMAP\n\t\tmaterial.iridescence *= texture2D( iridescenceMap, vIridescenceMapUv ).r;\n\t#endif\n\t#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\t\tmaterial.iridescenceThickness = (iridescenceThicknessMaximum - iridescenceThicknessMinimum) * texture2D( iridescenceThicknessMap, vIridescenceThicknessMapUv ).g + iridescenceThicknessMinimum;\n\t#else\n\t\tmaterial.iridescenceThickness = iridescenceThicknessMaximum;\n\t#endif\n#endif\n#ifdef USE_SHEEN\n\tmaterial.sheenColor = sheenColor;\n\t#ifdef USE_SHEEN_COLORMAP\n\t\tmaterial.sheenColor *= texture2D( sheenColorMap, vSheenColorMapUv ).rgb;\n\t#endif\n\tmaterial.sheenRoughness = clamp( sheenRoughness, 0.07, 1.0 );\n\t#ifdef USE_SHEEN_ROUGHNESSMAP\n\t\tmaterial.sheenRoughness *= texture2D( sheenRoughnessMap, vSheenRoughnessMapUv ).a;\n\t#endif\n#endif",lights_physical_pars_fragment:"struct PhysicalMaterial {\n\tvec3 diffuseColor;\n\tfloat roughness;\n\tvec3 specularColor;\n\tfloat specularF90;\n\t#ifdef USE_CLEARCOAT\n\t\tfloat clearcoat;\n\t\tfloat clearcoatRoughness;\n\t\tvec3 clearcoatF0;\n\t\tfloat clearcoatF90;\n\t#endif\n\t#ifdef USE_IRIDESCENCE\n\t\tfloat iridescence;\n\t\tfloat iridescenceIOR;\n\t\tfloat iridescenceThickness;\n\t\tvec3 iridescenceFresnel;\n\t\tvec3 iridescenceF0;\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tvec3 sheenColor;\n\t\tfloat sheenRoughness;\n\t#endif\n\t#ifdef IOR\n\t\tfloat ior;\n\t#endif\n\t#ifdef USE_TRANSMISSION\n\t\tfloat transmission;\n\t\tfloat transmissionAlpha;\n\t\tfloat thickness;\n\t\tfloat attenuationDistance;\n\t\tvec3 attenuationColor;\n\t#endif\n};\nvec3 clearcoatSpecular = vec3( 0.0 );\nvec3 sheenSpecular = vec3( 0.0 );\nvec3 Schlick_to_F0( const in vec3 f, const in float f90, const in float dotVH ) {\n    float x = clamp( 1.0 - dotVH, 0.0, 1.0 );\n    float x2 = x * x;\n    float x5 = clamp( x * x2 * x2, 0.0, 0.9999 );\n    return ( f - vec3( f90 ) * x5 ) / ( 1.0 - x5 );\n}\nfloat V_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\tfloat gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\treturn 0.5 / max( gv + gl, EPSILON );\n}\nfloat D_GGX( const in float alpha, const in float dotNH ) {\n\tfloat a2 = pow2( alpha );\n\tfloat denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\n\treturn RECIPROCAL_PI * a2 / pow2( denom );\n}\n#ifdef USE_CLEARCOAT\n\tvec3 BRDF_GGX_Clearcoat( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material) {\n\t\tvec3 f0 = material.clearcoatF0;\n\t\tfloat f90 = material.clearcoatF90;\n\t\tfloat roughness = material.clearcoatRoughness;\n\t\tfloat alpha = pow2( roughness );\n\t\tvec3 halfDir = normalize( lightDir + viewDir );\n\t\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\t\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\t\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\t\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\t\tvec3 F = F_Schlick( f0, f90, dotVH );\n\t\tfloat V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\t\tfloat D = D_GGX( alpha, dotNH );\n\t\treturn F * ( V * D );\n\t}\n#endif\nvec3 BRDF_GGX( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material ) {\n\tvec3 f0 = material.specularColor;\n\tfloat f90 = material.specularF90;\n\tfloat roughness = material.roughness;\n\tfloat alpha = pow2( roughness );\n\tvec3 halfDir = normalize( lightDir + viewDir );
72\n\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\tvec3 F = F_Schlick( f0, f90, dotVH );\n\t#ifdef USE_IRIDESCENCE\n\t\tF = mix( F, material.iridescenceFresnel, material.iridescence );\n\t#endif\n\tfloat V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\tfloat D = D_GGX( alpha, dotNH );
vendor: 5,468 bytes, line 72
72\n\treturn F * ( V * D );\n}\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\n\tconst float LUT_SIZE = 64.0;\n\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\n\tconst float LUT_BIAS = 0.5 / LUT_SIZE;\n\tfloat dotNV = saturate( dot( N, V ) );\n\tvec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\n\tuv = uv * LUT_SCALE + LUT_BIAS;\n\treturn uv;\n}\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\n\tfloat l = length( f );\n\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\n}\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\n\tfloat x = dot( v1, v2 );\n\tfloat y = abs( x );\n\tfloat a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\n\tfloat b = 3.4175940 + ( 4.1616724 + y ) * y;\n\tfloat v = a / b;\n\tfloat theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\n\treturn cross( v1, v2 ) * theta_sintheta;\n}\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\n\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\n\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\n\tvec3 lightNormal = cross( v1, v2 );\n\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\n\tvec3 T1, T2;\n\tT1 = normalize( V - N * dot( V, N ) );\n\tT2 = - cross( N, T1 );\n\tmat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\n\tvec3 coords[ 4 ];\n\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\n\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\n\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\n\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\n\tcoords[ 0 ] = normalize( coords[ 0 ] );\n\tcoords[ 1 ] = normalize( coords[ 1 ] );\n\tcoords[ 2 ] = normalize( coords[ 2 ] );\n\tcoords[ 3 ] = normalize( coords[ 3 ] );\n\tvec3 vectorFormFactor = vec3( 0.0 );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\n\tfloat result = LTC_ClippedSphereFormFactor( vectorFormFactor );\n\treturn vec3( result );\n}\n#if defined( USE_SHEEN )\nfloat D_Charlie( float roughness, float dotNH ) {\n\tfloat alpha = pow2( roughness );\n\tfloat invAlpha = 1.0 / alpha;\n\tfloat cos2h = dotNH * dotNH;\n\tfloat sin2h = max( 1.0 - cos2h, 0.0078125 );\n\treturn ( 2.0 + invAlpha ) * pow( sin2h, invAlpha * 0.5 ) / ( 2.0 * PI );\n}\nfloat V_Neubelt( float dotNV, float dotNL ) {\n\treturn saturate( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) );\n}\nvec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) {\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat D = D_Charlie( sheenRoughness, dotNH );\n\tfloat V = V_Neubelt( dotNV, dotNL );\n\treturn sheenColor * ( D * V );\n}\n#endif\nfloat IBLSheenBRDF( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat r2 = roughness * roughness;\n\tfloat a = roughness < 0.25 ? -339.2 * r2 + 161.4 * roughness - 25.9 : -8.48 * r2 + 14.3 * roughness - 9.95;\n\tfloat b = roughness < 0.25 ? 44.0 * r2 - 23.7 * roughness + 3.26 : 1.97 * r2 - 3.27 * roughness + 0.72;\n\tfloat DG = exp( a * dotNV + b ) + ( roughness < 0.25 ? 0.0 : 0.1 * ( roughness - 0.25 ) );\n\treturn saturate( DG * RECIPROCAL_PI );\n}\nvec2 DFGApprox( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\n\tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\n\tvec4 r = roughness * c0 + c1;\n\tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\n\tvec2 fab = vec2( - 1.04, 1.04 ) * a004 + r.zw;\n\treturn fab;\n}\nvec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) {\n\tvec2 fab = DFGApprox( normal, viewDir, roughness );\n\treturn specularColor * fab.x + specularF90 * fab.y;\n}\n#ifdef USE_IRIDESCENCE\nvoid computeMultiscatteringIridescence( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float iridescence, const in vec3 iridescenceF0, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n#else\nvoid computeMultiscattering( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n#endif\n\tvec2 fab = DFGApprox( normal, viewDir, roughness );\n\t#ifdef USE_IRIDESCENCE\n\t\tvec3 Fr = mix( specularColor, iridescenceF0, iridescence );\n\t#else\n\t\tvec3 Fr = specularColor;\n\t#endif\n\tvec3 FssEss = Fr * fab.x + specularF90 * fab.y;\n\tfloat Ess = fab.x + fab.y;\n\tfloat Ems = 1.0 - Ess;\n\tvec3 Favg = Fr + ( 1.0 - Fr ) * 0.047619;\tvec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );\n\tsingleScatter += FssEss;\n\tmultiScatter += Fms * Ems;\n}\n#if NUM_RECT_AREA_LIGHTS > 0\n\tvoid RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in 
72GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\t\tvec3 normal = geometry.normal;\n\t\tvec3 viewDir = geometry.viewDir;\n\t\tvec3 position = geometry.position;\n\t\tvec3 lightPos = rectAreaLight.position;\n\t\tvec3 halfWidth = rectAreaLight.halfWidth;\n\t\tvec3 halfHeight = rectAreaLight.halfHeight;\n\t\tvec3 lightColor = rectAreaLight.color;\n\t\tfloat roughness = material.roughness;\n\t\tvec3 rectCoords[ 4 ];\n\t\trectCoords[ 0 ] = lightPos + halfWidth - halfHeight;\t\trectCoords[ 1 ] = lightPos - halfWidth - halfHeight;\n\t\trectCoords[ 2 ] = lightPos - halfWidth + halfHeight;\n\t\trectCoords[ 3 ] = lightPos + halfWidth + halfHeight;\n\t\tvec2 uv = LTC_Uv( normal, viewDir, roughness );\n\t\tvec4 t1 = texture2D( ltc_1, uv );\n\t\tvec4 t2 = texture2D( ltc_2, uv );\n\t\tmat3 mInv = mat3(\n\t\t\tvec3( t1.x, 0, t1.y ),\n\t\t\tvec3(    0, 1,    0 ),\n\t\t\tvec3( t1.z, 0, t1.w )\n\t\t);\n\t\tvec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );\n\t\treflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\n\t\treflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\n\t}\n#endif\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNLcc = saturate( dot( geometry.clearcoatNormal, directLight.direction ) );\n\t\tvec3 ccIrradiance = dotNLcc * directLight.color;\n\t\tclearcoatSpecular += ccIrradiance * BRDF_GGX_Clearcoat( directLight.direction, geometry.viewDir, geometry.clearcoatNormal, material );\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tsheenSpecular += irradiance * BRDF_Sheen( directLight.direction, geometry.viewDir, geometry.normal, material.sheenColor, material.sheenRoughness );\n\t#endif\n\treflectedLight.directSpecular += irradiance * BRDF_GGX( directLight.direction, geometry.viewDir, geometry.normal, material );\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) {\n\t#ifdef USE_CLEARCOAT\n\t\tclearcoatSpecular += clearcoatRadiance * EnvironmentBRDF( geometry.clearcoatNormal, geometry.viewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness );\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tsheenSpecular += irradiance * material.sheenColor * IBLSheenBRDF( geometry.normal, geometry.viewDir, material.sheenRoughness );\n\t#endif\n\tvec3 singleScattering = vec3( 0.0 );\n\tvec3 multiScattering = vec3( 0.0 );\n\tvec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;\n\t#ifdef USE_IRIDESCENCE\n\t\tcomputeMultiscatteringIridescence( geometry.normal, geometry.viewDir, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnel, material.roughness, singleScattering, multiScattering );\n\t#else\n\t\tcomputeMultiscattering( geometry.normal, geometry.viewDir, material.specularColor, material.specularF90, material.roughness, singleScattering, multiScattering );\n\t#endif\n\tvec3 totalScattering = singleScattering + multiScattering;\n\tvec3 diffuse = material.diffuseColor * ( 1.0 - max( max( totalScattering.r, totalScattering.g ), totalScattering.b ) );\n\treflectedLight.indirectSpecular += radiance * singleScattering;\n\treflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance;\n\treflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance;\n}\n#define RE_Direct\t\t\t\tRE_Direct_Physical\n#define RE_Direct_RectArea\t\tRE_Direct_RectArea_Physical\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Physical\n#define RE_IndirectSpecular\t\tRE_IndirectSpecular_Physical\nfloat c
72omputeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\n\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\n}",lights_fragment_begin:"\nGeometricContext geometry;\ngeometry.position = - vViewPosition;\ngeometry.normal = normal;\ngeometry.viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );\n#ifdef USE_CLEARCOAT\n\tgeometry.clearcoatNormal = clearcoatNormal;\n#endif\n#ifdef USE_IRIDESCENCE\n\tfloat dotNVi = saturate( dot( normal, geometry.viewDir ) );\n\tif ( material.iridescenceThickness == 0.0 ) {\n\t\tmaterial.iridescence = 0.0;\n\t} else {\n\t\tmaterial.iridescence = saturate( material.iridescence );\n\t}\n\tif ( material.iridescence > 0.0 ) {\n\t\tmaterial.iridescenceFresnel = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.specularColor );\n\t\tmaterial.iridescenceF0 = Schlick_to_F0( material.iridescenceFresnel, 1.0, dotNVi );\n\t}\n#endif\nIncidentLight directLight;\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\n\tPointLight pointLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tgetPointLightInfo( pointLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS )\n\t\tpointLightShadow = pointLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n\tSpotLight spotLight;\n\tvec4 spotColor;\n\tvec3 spotLightCoord;\n\tbool inSpotLightMap;\n\t#if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tgetSpotLightInfo( spotLight, geometry, directLight );\n\t\t#if ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\n\t\t#define SPOT_LIGHT_MAP_INDEX UNROLLED_LOOP_INDEX\n\t\t#elif ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\t#define SPOT_LIGHT_MAP_INDEX NUM_SPOT_LIGHT_MAPS\n\t\t#else\n\t\t#define SPOT_LIGHT_MAP_INDEX ( UNROLLED_LOOP_INDEX - NUM_SPOT_LIGHT_SHADOWS + NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\n\t\t#endif\n\t\t#if ( SPOT_LIGHT_MAP_INDEX < NUM_SPOT_LIGHT_MAPS )\n\t\t\tspotLightCoord = vSpotLightCoord[ i ].xyz / vSpotLightCoord[ i ].w;\n\t\t\tinSpotLightMap = all( lessThan( abs( spotLightCoord * 2. - 1. ), vec3( 1.0 ) ) );\n\t\t\tspotColor = texture2D( spotLightMap[ SPOT_LIGHT_MAP_INDEX ], spotLightCoord.xy );\n\t\t\tdirectLight.color = inSpotLightMap ? directLight.color * spotColor.rgb : directLight.color;\n\t\t#endif\n\t\t#undef SPOT_LIGHT_MAP_INDEX\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\tspotLightShadow = spotLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\n\tDirectionalLight directionalLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tgetDirectionalLightInfo( directionalLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )\n\t\tdirectionalLightShadow = directionalLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\n\tRectAreaLight rectAreaLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\n\t\trectAreaLight = rectAreaLights[ i ];\n\t\tRE_Direct_RectArea( rectAreaLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if defined( RE_IndirectDiffuse )\n\tvec3 iblIrradiance = vec3( 0.0 );\n\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\n\tirradiance += getLightProbeIrradiance( lightProbe, geometry.normal );\n\t#if ( NUM_HEMI_LIGHTS > 0 )\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\t\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry.normal );\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n#endif\n#if defined( RE_IndirectSpecular )\n\tvec3 radiance = vec3( 0.0 );\n\tvec3 clearcoatRadiance = vec3( 0.0 );\n#endif",lights_fragment_maps:"#if defined( RE_IndirectDiffuse )\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\n\t\tvec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;\n\t\tirradiance += lightMapIrradiance;\n\t#endif\n\t#if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV )\n\t\tiblIrradiance += getIBLIrradiance( geometry.normal );\n\t#endif\n#endif\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\n\tradiance += getIBLRadiance( geometry.viewDir, geometry.normal, material.roughness );\n\t#ifdef USE_CLEARCOAT\n\t\tclearcoatRadiance += getIBLRadiance( geometry.viewDir, geometry.clearcoatNormal, material.clearcoatRoughness );\n\t#endif\n#endif",lights_fragment_end:"#if defined( RE_IndirectDiffuse )\n\tRE_IndirectDiffuse( irradiance, geometry, material, reflectedLight );\n#endif\n#if defined( RE_IndirectSpecular )\n\tRE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometry, material, reflectedLight );\n#endif",logdepthbuf_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tgl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;\n#endif",logdepthbuf_pars_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tuniform float logDepthBufFC;\n\tvarying float vFragDepth;\n\tvarying float vIsPerspective;\n#endif",logdepthbuf_pars_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvarying float vFragDepth;\n\t\tvarying float vIsPerspective;\n\t#else\n\t\tuniform float logDepthBufFC;\n\t#endif\n#endif",logdepthbuf_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvFragDepth = 1.0 + gl_Position.w;\n\t\tvIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );\n\t#else\n\t\tif ( isPerspectiveMatrix( projectionMatrix ) ) {\n\t\t\tgl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0;\n\t\t\tgl_Position.z *= gl_Position.w;\n\t\t}\n\t#endif\n#endif",map_fragment:"#ifdef USE_MAP\n\tvec4 sampledDiffuseColor = texture2D( map, vMapUv );\n\t#ifdef DECODE_VIDEO_TEXTURE\n\t\tsampledDiffuseColor = vec4( mix( pow( sampledDiffuseColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), sampledDiffuseColor.rgb * 0.0773993808, vec3( lessThanEqual( sampledDiffuseColor.rgb, vec3( 0.04045 ) ) ) ), sampledDiffuseColor.w );\n\t#endif\n\tdiffuseColor *= sampledDiffuseColor;\n#endif",map_pars_fragment:"#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif",map_particle_fragment:"#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\t#if defined( USE_POINTS_UV )\n\t\tvec2 uv = vUv;\n\t#else\n\t\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\n\t#endif\n#endif\n#ifdef USE_MAP\n\tdiffuseColor *= texture2D( map, uv );\n#endif\n#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, uv ).g;\n#endif",map_particle_pars_fragment:"#if defined( USE_POINTS_UV )\n\tvarying vec2 vUv;\n#else\n\t#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\t\tuniform mat3 uvTransform;\n\t#endif\n#endif\n#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif\n#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif",metalnessmap_fragment:"float metalnessFactor = metalness;\n#ifdef USE_METALNESSMAP\n\tvec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv );\n\tmetalnessFactor *= texelMetalness.b;\n#endif",metalnessmap_pars_fragment:"#ifdef USE_METALNESSMAP\n\tuniform sampler2D metalnessMap;\n#endif",morphcolor_vertex:"#if defined( USE_MORPHCOLORS ) && defined( MORPHTARGETS_TEXTURE )\n\tvColor *= morphTargetBaseInfluence;\n\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t#if defined( USE_COLOR_ALPHA )\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ) * morphTargetInfluences[ i ];\n\t\t#elif defined( USE_COLOR )\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ];\n\t\t#endif\n\t}\n#endif",morphnormal_vertex:"#ifdef USE_MORPHNORMALS\n\tobjectNormal *= morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ];\n\t\t}\n\t#else\n\t\tobjectNormal += morphNormal0 * morphTargetInfluences[ 0 ];\n\t\tobjectNormal += morphNormal1 * morphTargetInfluences[ 1 ];\n\t\tobjectNormal += morphNormal2 * morphTargetInfluences[ 2 ];\n\t\tobjectNormal += morphNormal3 * morphTargetInfluences[ 3 ];\n\t#endif\n#endif",morphtarget_pars_vertex:"#ifdef USE_MORPHTARGETS\n\tuniform float morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tuniform float morphTargetInfluences[ MORPHTARGETS_COUNT ];\n\t\tuniform sampler2DArray morphTargetsTexture;\n\t\tuniform ivec2 morphTargetsTextureSize;\n\t\tvec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) {\n\t\t\tint texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset;\n\t\t\tint y = texelIndex / morphTargetsTextureSize.x;\n\t\t\tint x = texelIndex - y * morphTargetsTextureSize.x;\n\t\t\tivec3 morphUV = ivec3( x, y, morphTargetIndex );\n\t\t\treturn texelFetch( morphTargetsTexture, morphUV, 0 );\n\t\t}\n\t#else\n\t\t#ifndef USE_MORPHNORMALS\n\t\t\tuniform float morphTargetInfluences[ 8 ];\n\t\t#else\n\t\t\tuniform float morphTargetInfluences[ 4 ];\n\t\t#endif\n\t#endif\n#endif",morphtarget_vertex:"#ifdef USE_MORPHTARGETS\n\ttransformed *= morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ];\n\t\t}\n\t#else\n\t\ttransformed += morphTarget0 * morphTargetInfluences[ 0 ];\n\t\ttransformed += morphTarget1 * morphTargetInfluences[ 1 ];\n\t\ttransformed += morphTarget2 * morphTargetInfluences[ 2 ];\n\t\ttransformed += morphTarget3 * morphTargetInfluences[ 3 ];\n\t\t#ifndef USE_MORPHNORMALS\n\t\t\ttransformed += morphTarget4 * morphTargetInfluences[ 4 ];\n\t\t\ttransformed += morphTarget5 * morphTargetInfluences[ 5 ];\n\t\t\ttransformed += morphTarget6 * morphTargetInfluences[ 6 ];\n\t\t\ttransformed += morphTarget7 * morphTargetInfluences[ 7 ];\n\t\t#endif\n\t#endif\n#endif",normal_fragment_begin:"float faceDirection = gl_FrontFacing ? 1.0 : - 1.0;\n#ifdef FLAT_SHADED\n\tvec3 fdx = dFdx( vViewPosition );\n\tvec3 fdy = dFdy( vViewPosition );\n\tvec3 normal = normalize( cross( fdx, fdy ) );\n#else\n\tvec3 normal = normalize( vNormal );\n\t#ifdef DOUBLE_SIDED\n\t\tnormal *= faceDirection;\n\t#endif\n#endif\n#ifdef USE_NORMALMAP_TANGENTSPACE\n\t#ifdef USE_TANGENT\n\t\tmat3 tbn = mat3( normalize( vTangent ), normalize( vBitangent ), normal );\n\t#else\n\t\tmat3 tbn = getTangentFrame( - vViewPosition, normal, vNormalMapUv );\n\t#endif\n\t#if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )\n\t\ttbn[0] *= faceDirection;\n\t\ttbn[1] *= faceDirection;\n\t#endif\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\t#ifdef USE_TANGENT\n\t\tmat3 tbn2 = mat3( normalize( vTangent ), normalize( vBitangent ), normal );\n\t#else\n\t\tmat3 tbn2 = getTangentFrame( - vViewPosition, normal, vClearcoatNormalMapUv );\n\t#endif\n\t#if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )\n\t\ttbn2[0] *= faceDirection;\n\t\ttbn2[1] *= faceDirection;\n\t#endif\n#endif\nvec3 geometryNormal = normal;",normal_fragment_maps:"#ifdef USE_NORMALMAP_OBJECTSPACE\n\tnormal = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;\n\t#ifdef FLIP_SIDED\n\t\tnormal = - normal;\n\t#endif\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * faceDirection;\n\t#endif\n\tnormal = normalize( normalMatrix * normal );\n#elif defined( USE_NORMALMAP_TANGENTSPACE )\n\tvec3 mapN = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;\n\tmapN.xy *= normalScale;\n\tnormal = normalize( tbn * mapN );
72\n#elif defined( USE_BUMPMAP )\n\tnormal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection );\n#endif",normal_pars_fragment:"#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif",normal_pars_vertex:"#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif",normal_vertex:"#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n\t#ifdef USE_TANGENT\n\t\tvTangent = normalize( transformedTangent );\n\t\tvBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\n\t#endif\n#endif",normalmap_pars_fragment:"#ifdef USE_NORMALMAP\n\tuniform sampler2D normalMap;\n\tuniform vec2 normalScale;\n#endif\n#ifdef USE_NORMALMAP_OBJECTSPACE\n\tuniform mat3 normalMatrix;\n#endif\n#if ! defined ( USE_TANGENT ) && ( defined ( USE_NORMALMAP_TANGENTSPACE ) || defined ( USE_CLEARCOAT_NORMALMAP ) )\n\tmat3 getTangentFrame( vec3 eye_pos, vec3 surf_norm, vec2 uv ) {\n\t\tvec3 q0 = dFdx( eye_pos.xyz );\n\t\tvec3 q1 = dFdy( eye_pos.xyz );\n\t\tvec2 st0 = dFdx( uv.st );\n\t\tvec2 st1 = dFdy( uv.st );\n\t\tvec3 N = surf_norm;\n\t\tvec3 q1perp = cross( q1, N );\n\t\tvec3 q0perp = cross( N, q0 );\n\t\tvec3 T = q1perp * st0.x + q0perp * st1.x;\n\t\tvec3 B = q1perp * st0.y + q0perp * st1.y;\n\t\tfloat det = max( dot( T, T ), dot( B, B ) );\n\t\tfloat scale = ( det == 0.0 ) ? 0.0 : inversesqrt( det );\n\t\treturn mat3( T * scale, B * scale, N );\n\t}\n#endif",clearcoat_normal_fragment_begin:"#ifdef USE_CLEARCOAT\n\tvec3 clearcoatNormal = geometryNormal;\n#endif",clearcoat_normal_fragment_maps:"#ifdef USE_CLEARCOAT_NORMALMAP\n\tvec3 clearcoatMapN = texture2D( clearcoatNormalMap, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0;\n\tclearcoatMapN.xy *= clearcoatNormalScale;\n\tclearcoatNormal = normalize( tbn2 * clearcoatMapN );\n#endif",clearcoat_pars_fragment:"#ifdef USE_CLEARCOATMAP\n\tuniform sampler2D clearcoatMap;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tuniform sampler2D clearcoatNormalMap;\n\tuniform vec2 clearcoatNormalScale;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tuniform sampler2D clearcoatRoughnessMap;\n#endif",iridescence_pars_fragment:"#ifdef USE_IRIDESCENCEMAP\n\tuniform sampler2D iridescenceMap;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tuniform sampler2D iridescenceThicknessMap;\n#endif",output_fragment:"#ifdef OPAQUE\ndiffuseColor.a = 1.0;\n#endif\n#ifdef USE_TRANSMISSION\ndiffuseColor.a *= material.transmissionAlpha + 0.1;\n#endif\ngl_FragColor = vec4( outgoingLight, diffuseColor.a );",packing:"vec3 packNormalToRGB( const in vec3 normal ) {\n\treturn normalize( normal ) * 0.5 + 0.5;\n}\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\n\treturn 2.0 * rgb.xyz - 1.0;\n}\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;\nconst vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );\nconst vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );\nconst float ShiftRight8 = 1. / 256.;\nvec4 packDepthToRGBA( const in float v ) {\n\tvec4 r = vec4( fract( v * PackFactors ), v );\n\tr.yzw -= r.xyz * ShiftRight8;\treturn r * PackUpscale;\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n\treturn dot( v, UnpackFactors );\n}\nvec2 packDepthToRG( in highp float v ) {\n\treturn packDepthToRGBA( v ).yx;\n}\nfloat unpackRGToDepth( const in highp vec2 v ) {\n\treturn unpackRGBAToDepth( vec4( v.xy, 0.0, 0.0 ) );\n}\nvec4 pack2HalfToRGBA( vec2 v ) {\n\tvec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ) );\n\treturn vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w );\n}\nvec2 unpackRGBATo2Half( vec4 v ) {\n\treturn vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) );\n}\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( viewZ + near ) / ( near - far );\n}\nfloat orthographicDepthToViewZ( const in float depth, const in float near, const in float far ) {\n\treturn depth * ( near - far ) - near;\n}\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ );\n}\nfloat perspectiveDepthToViewZ( const in float depth, const in float near, const in float far ) {\n\treturn ( near * far ) / ( ( far - near ) * depth - far );\n}",premultiplied_alpha_fragment:"#ifdef PREMULTIPLIED_ALPHA\n\tgl_FragColor.rgb *= gl_FragColor.a;\n#endif",project_vertex:"vec4 mvPosition = vec4( transformed, 1.0 );
vendor: 14,803 bytes, line 72
72\n#ifdef USE_INSTANCING\n\tmvPosition = instanceMatrix * mvPosition;\n#endif\nmvPosition = modelViewMatrix * mvPosition;\ngl_Position = projectionMatrix * mvPosition;",dithering_fragment:"#ifdef DITHERING\n\tgl_FragColor.rgb = dithering( gl_FragColor.rgb );\n#endif",dithering_pars_fragment:"#ifdef DITHERING\n\tvec3 dithering( vec3 color ) {\n\t\tfloat grid_position = rand( gl_FragCoord.xy );\n\t\tvec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\n\t\tdither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\n\t\treturn color + dither_shift_RGB;\n\t}\n#endif",roughnessmap_fragment:"float roughnessFactor = roughness;\n#ifdef USE_ROUGHNESSMAP\n\tvec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv );\n\troughnessFactor *= texelRoughness.g;\n#endif",roughnessmap_pars_fragment:"#ifdef USE_ROUGHNESSMAP\n\tuniform sampler2D roughnessMap;\n#endif",shadowmap_pars_fragment:"#if NUM_SPOT_LIGHT_COORDS > 0\n\tvarying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\n#endif\n#if NUM_SPOT_LIGHT_MAPS > 0\n\tuniform sampler2D spotLightMap[ NUM_SPOT_LIGHT_MAPS ];\n#endif\n#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\n\t\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\n\t}\n\tvec2 texture2DDistribution( sampler2D shadow, vec2 uv ) {\n\t\treturn unpackRGBATo2Half( texture2D( shadow, uv ) );\n\t}\n\tfloat VSMShadow (sampler2D shadow, vec2 uv, float compare ){\n\t\tfloat occlusion = 1.0;\n\t\tvec2 distribution = texture2DDistribution( shadow, uv );\n\t\tfloat hard_shadow = step( compare , distribution.x );\n\t\tif (hard_shadow != 1.0 ) {\n\t\t\tfloat distance = compare - distribution.x ;\n\t\t\tfloat variance = max( 0.00000, distribution.y * distribution.y );\n\t\t\tfloat softness_probability = variance / (variance + distance * distance );\t\t\tsoftness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 );\t\t\tocclusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 );\n\t\t}\n\t\treturn occlusion;\n\t}\n\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n\t\tfloat shadow = 1.0;\n\t\tshadowCoord.xyz /= shadowCoord.w;\n\t\tshadowCoord.z += shadowBias;\n\t\tbool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0;\n\t\tbool frustumTest = inFrustum && shadowCoord.z <= 1.0;\n\t\tif ( frustumTest ) {\n\t\t#if defined( SHADOWMAP_TYPE_PCF )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx0 = - texelSize.x * shadowRadius;\n\t\t\tfloat dy0 = - texelSize.y * shadowRadius;\n\t\t\tfloat dx1 = + texelSize.x * shadowRadius;\n\t\t\tfloat dy1 = + texelSize.y * shadowRadius;\n\t\t\tfloat dx2 = dx0 / 2.0;\n\t\t\tfloat dy2 = dy0 / 2.0;\n\t\t\tfloat dx3 = dx1 / 2.0;\n\t\t\tfloat dy3 = dy1 / 2.0;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n\t\t\t) * ( 1.0 / 17.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx = texelSize.x;\n\t\t\tfloat dy = texelSize.y;\n\t\t\tvec2 uv = shadowCoord.xy;\n\t\t\tvec2 f = fract( uv * shadowMapSize + 0.5 );\n\t\t\tuv -= f * texelSize;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, uv, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t\t  texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t\t  f.x ),\n\t\t\t\t\t mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t\t  texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t\t  f.x ),\n\t\t\t\t\t f.y )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_VSM )\n\t\t\tshadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#else\n\t\t\tshadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#endif\n\t\t}\n\t\treturn shadow;\n\t}\n\tvec2 cubeToUV( vec3 v, float texelSizeY ) {\n\t\tvec3 absV = abs( v );\n\t\tfloat scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\n\t\tabsV *= scaleToCube;\n\t\tv *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\n\t\tvec2 planar = v.xy;\n\t\tfloat almostATexel = 1.5 * texelSizeY;\n\t\tfloat almostOne = 1.0 - almostATexel;\n\t\tif ( absV.z >= almostOne ) {\n\t\t\tif ( v.z > 0.0 )\n\t\t\t\tplanar.x = 4.0 - v.x;\n\t\t} else if ( absV.x >= almostOne ) {\n\t\t\tfloat signX = sign( v.x );\n\t\t\tplanar.x = v.z * signX + 2.0 * signX;\n\t\t} else if ( absV.y >= almostOne ) {\n\t\t\tfloat signY = sign( v.y );\n\t\t\tplanar.x = v.x + 2.0 * signY + 2.0;\n\t\t\tplanar.y = v.z * signY - 2.0;\n\t\t}\n\t\treturn vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\n\t}\n\tfloat getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\n\t\tvec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\n\t\tvec3 lightToPosition = shadowCoord.xyz;\n\t\tfloat dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear );\t\tdp += shadowBias;\n\t\tvec3 bd3D = normalize( lightToPosition );\n\t\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM )\n\t\t\tvec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\n\t\t\treturn (\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#else\n\t\t\treturn texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\n\t\t#endif\n\t}\n#endif",shadowmap_pars_vertex:"#if NUM_SPOT_LIGHT_COORDS > 0\n\tuniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ];\n\tvarying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\n#endif\n#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n#endif",shadowmap_vertex:"#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 )\n\tvec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\tvec4 shadowWorldPosition;\n#endif\n#if defined( USE_SHADOWMAP )\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 );\n\t\t\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 );\n\t\t\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n#endif\n#if NUM_SPOT_LIGHT_COORDS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_COORDS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition;\n\t\t#if ( defined( USE_SHADOWMAP ) && UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\t\tshadowWorldPosition.xyz += shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias;\n\t\t#endif\n\t\tvSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n#endif",shadowmask_pars_fragment:"float getShadowMask() {\n\tfloat shadow = 1.0;\n\t#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\tdirectionalLight = directionalLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n\t\tspotLight = spotLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\tpointLight = pointLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#endif\n\treturn shadow;\n}",skinbase_vertex:"#ifdef USE_SKINNING\n\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\n\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\n\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\n\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\n#endif",skinning_pars_vertex:"#ifdef USE_SKINNING\n\tuniform mat4 bindMatrix;\n\tuniform mat4 bindMatrixInverse;\n\tuniform highp sampler2D boneTexture;\n\t
72uniform int boneTextureSize;\n\tmat4 getBoneMatrix( const in float i ) {\n\t\tfloat j = i * 4.0;\n\t\tfloat x = mod( j, float( boneTextureSize ) );\n\t\tfloat y = floor( j / float( boneTextureSize ) );\n\t\tfloat dx = 1.0 / float( boneTextureSize );\n\t\tfloat dy = 1.0 / float( boneTextureSize );\n\t\ty = dy * ( y + 0.5 );\n\t\tvec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) );\n\t\tvec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) );\n\t\tvec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) );\n\t\tvec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) );\n\t\tmat4 bone = mat4( v1, v2, v3, v4 );\n\t\treturn bone;\n\t}\n#endif",skinning_vertex:"#ifdef USE_SKINNING\n\tvec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\n\tvec4 skinned = vec4( 0.0 );\n\tskinned += boneMatX * skinVertex * skinWeight.x;\n\tskinned += boneMatY * skinVertex * skinWeight.y;\n\tskinned += boneMatZ * skinVertex * skinWeight.z;\n\tskinned += boneMatW * skinVertex * skinWeight.w;\n\ttransformed = ( bindMatrixInverse * skinned ).xyz;\n#endif",skinnormal_vertex:"#ifdef USE_SKINNING\n\tmat4 skinMatrix = mat4( 0.0 );\n\tskinMatrix += skinWeight.x * boneMatX;\n\tskinMatrix += skinWeight.y * boneMatY;\n\tskinMatrix += skinWeight.z * boneMatZ;\n\tskinMatrix += skinWeight.w * boneMatW;\n\tskinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;\n\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\n\t#ifdef USE_TANGENT\n\t\tobjectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\t#endif\n#endif",specularmap_fragment:"float specularStrength;\n#ifdef USE_SPECULARMAP\n\tvec4 texelSpecular = texture2D( specularMap, vSpecularMapUv );\n\tspecularStrength = texelSpecular.r;\n#else\n\tspecularStrength = 1.0;\n#endif",specularmap_pars_fragment:"#ifdef USE_SPECULARMAP\n\tuniform sampler2D specularMap;\n#endif",tonemapping_fragment:"#if defined( TONE_MAPPING )\n\tgl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\n#endif",tonemapping_pars_fragment:"#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\nuniform float toneMappingExposure;\nvec3 LinearToneMapping( vec3 color ) {\n\treturn toneMappingExposure * color;\n}\nvec3 ReinhardToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( color / ( vec3( 1.0 ) + color ) );\n}\nvec3 OptimizedCineonToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\tcolor = max( vec3( 0.0 ), color - 0.004 );\n\treturn pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\n}\nvec3 RRTAndODTFit( vec3 v ) {\n\tvec3 a = v * ( v + 0.0245786 ) - 0.000090537;\n\tvec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081;\n\treturn a / b;\n}\nvec3 ACESFilmicToneMapping( vec3 color ) {\n\tconst mat3 ACESInputMat = mat3(\n\t\tvec3( 0.59719, 0.07600, 0.02840 ),\t\tvec3( 0.35458, 0.90834, 0.13383 ),\n\t\tvec3( 0.04823, 0.01566, 0.83777 )\n\t);\n\tconst mat3 ACESOutputMat = mat3(\n\t\tvec3(  1.60475, -0.10208, -0.00327 ),\t\tvec3( -0.53108,  1.10813, -0.07276 ),\n\t\tvec3( -0.07367, -0.00605,  1.07602 )\n\t);\n\tcolor *= toneMappingExposure / 0.6;\n\tcolor = ACESInputMat * color;\n\tcolor = RRTAndODTFit( color );\n\tcolor = ACESOutputMat * color;\n\treturn saturate( color );\n}\nvec3 CustomToneMapping( vec3 color ) { return color; }",transmission_fragment:"#ifdef USE_TRANSMISSION\n\tmaterial.transmission = transmission;\n\tmaterial.transmissionAlpha = 1.0;\n\tmaterial.thickness = thickness;\n\tmaterial.attenuationDistance = attenuationDistance;\n\tmaterial.attenuationColor = attenuationColor;\n\t#ifdef USE_TRANSMISSIONMAP\n\t\tmaterial.transmission *= texture2D( transmissionMap, vTransmissionMapUv ).r;\n\t#endif\n\t#ifdef USE_THICKNESSMAP\n\t\tmaterial.thickness *= texture2D( thicknessMap, vThicknessMapUv ).g;\n\t#endif\n\tvec3 pos = vWorldPosition;\n\tvec3 v = normalize( cameraPosition - pos );\n\tvec3 n = inverseTransformDirection( normal, viewMatrix );\n\tvec4 transmission = getIBLVolumeRefraction(\n\t\tn, v, material.roughness, material.diffuseColor, material.specularColor, material.specularF90,\n\t\tpos, modelMatrix, viewMatrix, projectionMatrix, material.ior, material.thickness,\n\t\tmaterial.attenuationColor, material.attenuationDistance );\n\tmaterial.transmissionAlpha = mix( material.transmissionAlpha, transmission.a, material.transmission );\n\ttotalDiffuse = mix( totalDiffuse, transmission.rgb, material.transmission );\n#endif",transmission_pars_fragment:"#ifdef USE_TRANSMISSION\n\tuniform float transmission;\n\tuniform float thickness;\n\tuniform float attenuationDistance;\n\tuniform vec3 attenuationColor;\n\t#ifdef USE_TRANSMISSIONMAP\n\t\tuniform sampler2D transmissionMap;\n\t#endif\n\t#ifdef USE_THICKNESSMAP\n\t\tuniform sampler2D thicknessMap;\n\t#endif\n\tuniform vec2 transmissionSamplerSize;\n\tuniform sampler2D transmissionSamplerMap;\n\tuniform mat4 modelMatrix;\n\tuniform mat4 projectionMatrix;\n\tvarying vec3 vWorldPosition;\n\tfloat w0( float a ) {\n\t\treturn ( 1.0 / 6.0 ) * ( a * ( a * ( - a + 3.0 ) - 3.0 ) + 1.0 );\n\t}\n\tfloat w1( float a ) {\n\t\treturn ( 1.0 / 6.0 ) * ( a *  a * ( 3.0 * a - 6.0 ) + 4.0 );\n\t}\n\tfloat w2( float a ){\n\t\treturn ( 1.0 / 6.0 ) * ( a * ( a * ( - 3.0 * a + 3.0 ) + 3.0 ) + 1.0 );\n\t}\n\tfloat w3( float a ) {\n\t\treturn ( 1.0 / 6.0 ) * ( a * a * a );\n\t}\n\tfloat g0( float a ) {\n\t\treturn w0( a ) + w1( a );\n\t}\n\tfloat g1( float a ) {\n\t\treturn w2( a ) + w3( a );\n\t}\n\tfloat h0( float a ) {\n\t\treturn - 1.0 + w1( a ) / ( w0( a ) + w1( a ) );\n\t}\n\tfloat h1( float a ) {\n\t\treturn 1.0 + w3( a ) / ( w2( a ) + w3( a ) );\n\t}\n\tvec4 bicubic( sampler2D tex, vec2 uv, vec4 texelSize, vec2 fullSize, float lod ) {\n\t\tuv = uv * texelSize.zw + 0.5;\n\t\tvec2 iuv = floor( uv );\n\t\tvec2 fuv = fract( uv );\n\t\tfloat g0x = g0( fuv.x );\n\t\tfloat g1x = g1( fuv.x );\n\t\tfloat h0x = h0( fuv.x );\n\t\tfloat h1x = h1( fuv.x );\n\t\tfloat h0y = h0( fuv.y );\n\t\tfloat h1y = h1( fuv.y );\n\t\tvec2 p0 = ( vec2( iuv.x + h0x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p1 = ( vec2( iuv.x + h1x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p2 = ( vec2( iuv.x + h0x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p3 = ( vec2( iuv.x + h1x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;\n\t\t\n\t\tvec2 lodFudge = pow( 1.95, lod ) / fullSize;\n\t\treturn g0( fuv.y ) * ( g0x * textureLod( tex, p0, lod ) + g1x * textureLod( tex, p1, lod ) ) +\n\t\t\tg1( fuv.y ) * ( g0x * textureLod( tex, p2, lod ) + g1x * textureLod( tex, p3, lod ) );\n\t}\n\tvec4 textureBicubic( sampler2D sampler, vec2 uv, float lod ) {\n\t\tvec2 fLodSize = vec2( textureSize( sampler, int( lod ) ) );\n\t\tvec2 cLodSize = vec2( textureSize( sampler, int( lod + 1.0 ) ) );\n\t\tvec2 fLodSizeInv = 1.0 / fLodSize;\n\t\tvec2 cLodSizeInv = 1.0 / cLodSize;\n\t\tvec2 fullSize = vec2( textureSize( sampler, 0 ) );\n\t\tvec4 fSample = bicubic( sampler, uv, vec4( fLodSizeInv, fLodSize ), fullSize, floor( lod ) );\n\t\tvec4 cSample = bicubic( sampler, uv, vec4( cLodSizeInv, cLodSize ), fullSize, ceil( lod ) );\n\t\treturn mix( fSample, cSample, fract( lod ) );\n\t}\n\tvec3 getVolumeTransmissionRay( const in vec3 n, const in vec3 v, const in float thickness, const in float ior, const in mat4 modelMatrix ) {\n\t\tvec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior );\n\t\tvec3 modelScale;\n\t\tmodelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) );\n\t\tmodelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) );\n\t\tmodelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) );\n\t\treturn normalize( refractionVector ) * thickness * modelScale;\n\t}\n\tfloat applyIorToRoughness( const in float roughness, const in float ior ) {\n\t\treturn roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 );\n\t}\n\tvec4 getTransmissionSample( const in vec2 fragCoord, const in float roughness, const in float ior ) {\n\t\tfloat lod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior );\n\t\treturn textureBicubic( transmissionSamplerMap, fragCoord.xy, lod );\n\t}\n\tvec3 applyVolumeAttenuation( const in vec3 radiance, const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tif ( isinf( attenuationDistance ) ) {\n\t\t\treturn radiance;\n\t\t} else {\n\t\t\tvec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance;\n\t\t\tvec3 transmittance = exp( - attenuationCoefficient * transmissionDistance );\t\t\treturn transmittance * radiance;\n\t\t}\n\t}\n\tvec4 getIBLVolumeRefraction( const in vec3 n, const in vec3 v, const in float roughness, const in vec3 diffuseColor,\n\t\tconst in vec3 specularColor, const in float specularF90, const in vec3 position, const in mat4 modelMatrix,\n\t\tconst in mat4 viewMatrix, const in mat4 projMatrix, const in float ior, const in float thickness,\n\t\tconst in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tvec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix );\n\t\tvec3 refractedRayExit = position + transmissionRay;\n\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\trefractionCoords += 1.0;\n\t\trefractionCoords /= 2.0;\n\t\tvec4 transmittedLight = getTransmissionSample( refractionCoords, roughness, ior );\n\t\tvec3 attenuatedColor = applyVolumeAttenuation( transmittedLight.rgb, length( transmissionRay ), attenuationColor, attenuationDistance );\n\t\tvec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness );\n\t\treturn vec4( ( 1.0 - F ) * attenuatedColor * diffuseColor, transmittedLight.a );\n\t}\n#endif",uv_pars_fragment:"#ifdef USE_UV\n\tvarying vec2 vUv;\n#endif\n#ifdef USE_MAP\n\tvarying vec2 vMapUv;
72\n#endif\n#ifdef USE_ALPHAMAP\n\tvarying vec2 vAlphaMapUv;\n#endif\n#ifdef USE_LIGHTMAP\n\tvarying vec2 vLightMapUv;\n#endif\n#ifdef USE_AOMAP\n\tvarying vec2 vAoMapUv;\n#endif\n#ifdef USE_BUMPMAP\n\tvarying vec2 vBumpMapUv;\n#endif\n#ifdef USE_NORMALMAP\n\tvarying vec2 vNormalMapUv;\n#endif\n#ifdef USE_EMISSIVEMAP\n\tvarying vec2 vEmissiveMapUv;\n#endif\n#ifdef USE_METALNESSMAP\n\tvarying vec2 vMetalnessMapUv;\n#endif\n#ifdef USE_ROUGHNESSMAP\n\tvarying vec2 vRoughnessMapUv;\n#endif\n#ifdef USE_CLEARCOATMAP\n\tvarying vec2 vClearcoatMapUv;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tvarying vec2 vClearcoatNormalMapUv;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tvarying vec2 vClearcoatRoughnessMapUv;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\tvarying vec2 vIridescenceMapUv;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tvarying vec2 vIridescenceThicknessMapUv;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\tvarying vec2 vSheenColorMapUv;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\tvarying vec2 vSheenRoughnessMapUv;\n#endif\n#ifdef USE_SPECULARMAP\n\tvarying vec2 vSpecularMapUv;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\tvarying vec2 vSpecularColorMapUv;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\tvarying vec2 vSpecularIntensityMapUv;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\tuniform mat3 transmissionMapTransform;\n\tvarying vec2 vTransmissionMapUv;\n#endif\n#ifdef USE_THICKNESSMAP\n\tuniform mat3 thicknessMapTransform;\n\tvarying vec2 vThicknessMapUv;\n#endif",uv_pars_vertex:"#ifdef USE_UV\n\tvarying vec2 vUv;\n#endif\n#ifdef USE_UV2\n\tattribute vec2 uv2;\n#endif\n#ifdef USE_MAP\n\tuniform mat3 mapTransform;\n\tvarying vec2 vMapUv;\n#endif\n#ifdef USE_ALPHAMAP\n\tuniform mat3 alphaMapTransform;\n\tvarying vec2 vAlphaMapUv;\n#endif\n#ifdef USE_LIGHTMAP\n\tuniform mat3 lightMapTransform;\n\tvarying vec2 vLightMapUv;\n#endif\n#ifdef USE_AOMAP\n\tuniform mat3 aoMapTransform;\n\tvarying vec2 vAoMapUv;\n#endif\n#ifdef USE_BUMPMAP\n\tuniform mat3 bumpMapTransform;\n\tvarying vec2 vBumpMapUv;\n#endif\n#ifdef USE_NORMALMAP\n\tuniform mat3 normalMapTransform;\n\tvarying vec2 vNormalMapUv;\n#endif\n#ifdef USE_DISPLACEMENTMAP\n\tuniform mat3 displacementMapTransform;\n\tvarying vec2 vDisplacementMapUv;\n#endif\n#ifdef USE_EMISSIVEMAP\n\tuniform mat3 emissiveMapTransform;\n\tvarying vec2 vEmissiveMapUv;\n#endif\n#ifdef USE_METALNESSMAP\n\tuniform mat3 metalnessMapTransform;\n\tvarying vec2 vMetalnessMapUv;\n#endif\n#ifdef USE_ROUGHNESSMAP\n\tuniform mat3 roughnessMapTransform;\n\tvarying vec2 vRoughnessMapUv;\n#endif\n#ifdef USE_CLEARCOATMAP\n\tuniform mat3 clearcoatMapTransform;\n\tvarying vec2 vClearcoatMapUv;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tuniform mat3 clearcoatNormalMapTransform;\n\tvarying vec2 vClearcoatNormalMapUv;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tuniform mat3 clearcoatRoughnessMapTransform;\n\tvarying vec2 vClearcoatRoughnessMapUv;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\tuniform mat3 sheenColorMapTransform;\n\tvarying vec2 vSheenColorMapUv;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\tuniform mat3 sheenRoughnessMapTransform;\n\tvarying vec2 vSheenRoughnessMapUv;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\tuniform mat3 iridescenceMapTransform;\n\tvarying vec2 vIridescenceMapUv;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tuniform mat3 iridescenceThicknessMapTransform;\n\tvarying vec2 vIridescenceThicknessMapUv;\n#endif\n#ifdef USE_SPECULARMAP\n\tuniform mat3 specularMapTransform;\n\tvarying vec2 vSpecularMapUv;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\tuniform mat3 specularColorMapTransform;\n\tvarying vec2 vSpecularColorMapUv;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\tuniform mat3 specularIntensityMapTransform;\n\tvarying vec2 vSpecularIntensityMapUv;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\tuniform mat3 transmissionMapTransform;\n\tvarying vec2 vTransmissionMapUv;\n#endif\n#ifdef USE_THICKNESSMAP\n\tuniform mat3 thicknessMapTransform;\n\tvarying vec2 vThicknessMapUv;\n#endif",uv_vertex:"#ifdef USE_UV\n\tvUv = vec3( uv, 1 ).xy;\n#endif\n#ifdef USE_MAP\n\tvMapUv = ( mapTransform * vec3( MAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ALPHAMAP\n\tvAlphaMapUv = ( alphaMapTransform * vec3( ALPHAMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_LIGHTMAP\n\tvLightMapUv = ( lightMapTransform * vec3( LIGHTMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_AOMAP\n\tvAoMapUv = ( aoMapTransform * vec3( AOMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_BUMPMAP\n\tvBumpMapUv = ( bumpMapTransform * vec3( BUMPMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_NORMALMAP\n\tvNormalMapUv = ( normalMapTransform * vec3( NORMALMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_DISPLACEMENTMAP\n\tvDisplacementMapUv = ( displacementMapTransform * vec3( DISPLACEMENTMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_EMISSIVEMAP\n\tvEmissiveMapUv = ( emissiveMapTransform * vec3( EMISSIVEMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_METALNESSMAP\n\tvMetalnessMapUv = ( metalnessMapTransform * vec3( METALNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ROUGHNESSMAP\n\tvRoughnessMapUv = ( roughnessMapTransform * vec3( ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOATMAP\n\tvClearcoatMapUv = ( clearcoatMapTransform * vec3( CLEARCOATMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tvClearcoatNormalMapUv = ( clearcoatNormalMapTransform * vec3( CLEARCOAT_NORMALMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tvClearcoatRoughnessMapUv = ( clearcoatRoughnessMapTransform * vec3( CLEARCOAT_ROUGHNESSMAP_UV, 1 ) ).xy;
72\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\tvIridescenceMapUv = ( iridescenceMapTransform * vec3( IRIDESCENCEMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tvIridescenceThicknessMapUv = ( iridescenceThicknessMapTransform * vec3( IRIDESCENCE_THICKNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\tvSheenColorMapUv = ( sheenColorMapTransform * vec3( SHEEN_COLORMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\tvSheenRoughnessMapUv = ( sheenRoughnessMapTransform * vec3( SHEEN_ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULARMAP\n\tvSpecularMapUv = ( specularMapTransform * vec3( SPECULARMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\tvSpecularColorMapUv = ( specularColorMapTransform * vec3( SPECULAR_COLORMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\tvSpecularIntensityMapUv = ( specularIntensityMapTransform * vec3( SPECULAR_INTENSITYMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\tvTransmissionMapUv = ( transmissionMapTransform * vec3( TRANSMISSIONMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_THICKNESSMAP\n\tvThicknessMapUv = ( thicknessMapTransform * vec3( THICKNESSMAP_UV, 1 ) ).xy;\n#endif",worldpos_vertex:"#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0\n\tvec4 worldPosition = vec4( transformed, 1.0 );\n\t#ifdef USE_INSTANCING\n\t\tworldPosition = instanceMatrix * worldPosition;\n\t#endif\n\tworldPosition = modelMatrix * worldPosition;\n#endif",background_vert:"varying vec2 vUv;\nuniform mat3 uvTransform;\nvoid main() {\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\tgl_Position = vec4( position.xy, 1.0, 1.0 );\n}",background_frag:"uniform sampler2D t2D;\nuniform float backgroundIntensity;\nvarying vec2 vUv;\nvoid main() {\n\tvec4 texColor = texture2D( t2D, vUv );\n\t#ifdef DECODE_VIDEO_TEXTURE\n\t\ttexColor = vec4( mix( pow( texColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), texColor.rgb * 0.0773993808, vec3( lessThanEqual( texColor.rgb, vec3( 0.04045 ) ) ) ), texColor.w );\n\t#endif\n\ttexColor.rgb *= backgroundIntensity;\n\tgl_FragColor = texColor;\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n}",backgroundCube_vert:"varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\tgl_Position.z = gl_Position.w;\n}",backgroundCube_frag:"#ifdef ENVMAP_TYPE_CUBE\n\tuniform samplerCube envMap;\n#elif defined( ENVMAP_TYPE_CUBE_UV )\n\tuniform sampler2D envMap;\n#endif\nuniform float flipEnvMap;\nuniform float backgroundBlurriness;\nuniform float backgroundIntensity;\nvarying vec3 vWorldDirection;\n#include <cube_uv_reflection_fragment>\nvoid main() {\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 texColor = textureCube( envMap, vec3( flipEnvMap * vWorldDirection.x, vWorldDirection.yz ) );\n\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\tvec4 texColor = textureCubeUV( envMap, vWorldDirection, backgroundBlurriness );\n\t#else\n\t\tvec4 texColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\t#endif\n\ttexColor.rgb *= backgroundIntensity;\n\tgl_FragColor = texColor;\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n}",cube_vert:"varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\tgl_Position.z = gl_Position.w;\n}",cube_frag:"uniform samplerCube tCube;\nuniform float tFlip;\nuniform float opacity;\nvarying vec3 vWorldDirection;\nvoid main() {\n\tvec4 texColor = textureCube( tCube, vec3( tFlip * vWorldDirection.x, vWorldDirection.yz ) );\n\tgl_FragColor = texColor;\n\tgl_FragColor.a *= opacity;\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n}",depth_vert:"#include <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include <uv_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvHighPrecisionZW = gl_Position.zw;\n}",depth_frag:"#if DEPTH_PACKING == 3200\n\tuniform float opacity;\n#endif\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#if DEPTH_PACKING == 3200\n\t\tdiffuseColor.a = opacity;\n\t#endif\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <logdepthbuf_fragment>\n\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\n\t#if DEPTH_PACKING == 3200\n\t\tgl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );\n\t#elif DEPTH_PACKING == 3201\n\t\tgl_FragColor = packDepthToRGBA( fragCoordZ );\n\t#endif\n}",distanceRGBA_vert:"#define DISTANCE\nvarying vec3 vWorldPosition;\n#include <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <worldpos_vertex>\n\t#include <clipping_planes_vertex>\n\tvWorldPosition = worldPosition.xyz;\n}",distanceRGBA_frag:"#define DISTANCE\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main () {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\tfloat dist = length( vWorldPosition - referencePosition );\n\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n\tdist = saturate( dist );\n\tgl_FragColor = packDepthToRGBA( dist );\n}",equirect_vert:"varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n}",equirect_frag:"uniform sampler2D tEquirect;\nvarying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvec3 direction = normalize( vWorldDirection );\n\tvec2 sampleUV = equirectUv( direction );\n\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n}",linedashed_vert:"uniform float scale;\nattribute float lineDistance;\nvarying float vLineDistance;\n#include <common>\n#include <uv_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\tvLineDistance = scale * lineDistance;\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphcolor_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n}",linedashed_frag:"uniform vec3 diffuse;\nuniform float opacity;\nuniform float dashSize;\nuniform float totalSize;\nvarying float vLineDistance;\n#include <common>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\n\t\tdiscard;\n\t}\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n}",meshbasic_vert:"#include <common>\n#include <uv_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphcolor_vertex>\n\t#if defined ( USE_ENVMAP ) || defined ( USE_SKINNING )\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinbase_vertex>\n\t\t#include <skinnormal_vertex>\n\t\t#include <defaultnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <fog_vertex>\n}",meshbasic_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\n\t\treflectedLight.indirectDiffuse += lightMapTexel.rgb * lightMapIntensity * RECIPROCAL_PI;\n\t#else\n\t\treflectedLight.indirectDiffuse += vec3( 1.0 );\n\t#endif\n\t#include <aomap_fragment>\n\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\n\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\n\t#include <envmap_fragment>\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshlambert_vert:"#define LAMBERT\nvarying vec3 vViewPosition;\n#include <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphcolor_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",meshlambert_frag:"#define LAMBERT\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_lambert_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_lambert_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include <envmap_fragment>\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshmatcap_vert:"#define MATCAP\nvarying vec3 vViewPosition;\n#include <common>\n#include <uv_pars_vertex>\n#include <color_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphcolor_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n\tvViewPosition = - mvPosition.xyz;\n}",meshmatcap_frag:"#define MATCAP\nuniform vec3 diffuse;\nuniform float opacity;\nuniform sampler2D matcap;\nvarying vec3 vViewPosition;\n#include <common>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <fog_pars_fragment>\n#include <normal_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <m
72ap_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\tvec3 viewDir = normalize( vViewPosition );\n\tvec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) );\n\tvec3 y = cross( viewDir, x );\n\tvec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5;\n\t#ifdef USE_MATCAP\n\t\tvec4 matcapColor = texture2D( matcap, uv );\n\t#else\n\t\tvec4 matcapColor = vec4( vec3( mix( 0.2, 0.8, uv.y ) ), 1.0 );\n\t#endif\n\tvec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb;\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshnormal_vert:"#define NORMAL\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n\tvarying vec3 vViewPosition;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n\tvViewPosition = - mvPosition.xyz;\n#endif\n}",meshnormal_frag:"#define NORMAL\nuniform float opacity;\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n\tvarying vec3 vViewPosition;\n#endif\n#include <packing>\n#include <uv_pars_fragment>\n#include <normal_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\t#include <logdepthbuf_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\tgl_FragColor = vec4( packNormalToRGB( normal ), opacity );\n\t#ifdef OPAQUE\n\t\tgl_FragColor.a = 1.0;\n\t#endif\n}",meshphong_vert:"#define PHONG\nvarying vec3 vViewPosition;\n#include <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphcolor_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",meshphong_frag:"#define PHONG\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform vec3 specular;\nuniform float shininess;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_phong_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_phong_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\t#include <envmap_fragment>\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshphysical_vert:"#define STANDARD\nvarying vec3 vViewPosition;\n#ifdef USE_TRANSMISSION\n\tvarying vec3 vWorldPosition;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphcolor_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n#ifdef USE_TRANSMISSION\n\tvWorldPosition = worldPosition.xyz;\n#endif\n}",meshphysical_frag:"#define STANDARD\n#ifdef PHYSICAL\n\t#define IOR\n\t#define USE_SPECULAR\n#endif\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifdef IOR\n\tuniform float ior;\n#endif\n#ifdef USE_SPECULAR\n\tuniform float specularIntensity;\n\tuniform vec3 specularColor;\n\t#ifdef USE_SPECULAR_COLORMAP\n\t\tuniform sampler2D specularColorMap;\n\t#endif\n\t#ifdef USE_SPECULAR_INTENSITYMAP\n\t\tuniform sampler2D specularIntensityMap;\n\t#endif\n#endif\n#ifdef USE_CLEARCOAT\n\tuniform float clearcoat;
72\n\tuniform float clearcoatRoughness;\n#endif\n#ifdef USE_IRIDESCENCE\n\tuniform float iridescence;\n\tuniform float iridescenceIOR;\n\tuniform float iridescenceThicknessMinimum;\n\tuniform float iridescenceThicknessMaximum;\n#endif\n#ifdef USE_SHEEN\n\tuniform vec3 sheenColor;\n\tuniform float sheenRoughness;\n\t#ifdef USE_SHEEN_COLORMAP\n\t\tuniform sampler2D sheenColorMap;\n\t#endif\n\t#ifdef USE_SHEEN_ROUGHNESSMAP\n\t\tuniform sampler2D sheenRoughnessMap;\n\t#endif\n#endif\nvarying vec3 vViewPosition;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <iridescence_fragment>\n#include <cube_uv_reflection_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_physical_pars_fragment>\n#include <fog_pars_fragment>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_physical_pars_fragment>\n#include <transmission_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <clearcoat_pars_fragment>\n#include <iridescence_pars_fragment>\n#include <roughnessmap_pars_fragment>\n#include <metalnessmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <roughnessmap_fragment>\n\t#include <metalnessmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <clearcoat_normal_fragment_begin>\n\t#include <clearcoat_normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_physical_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse;\n\tvec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular;\n\t#include <transmission_fragment>\n\tvec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance;\n\t#ifdef USE_SHEEN\n\t\tfloat sheenEnergyComp = 1.0 - 0.157 * max3( material.sheenColor );\n\t\toutgoingLight = outgoingLight * sheenEnergyComp + sheenSpecular;\n\t#endif\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNVcc = saturate( dot( geometry.clearcoatNormal, geometry.viewDir ) );\n\t\tvec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc );\n\t\toutgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + clearcoatSpecular * material.clearcoat;
72\n\t#endif\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshtoon_vert:"#define TOON\nvarying vec3 vViewPosition;\n#include <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphcolor_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",meshtoon_frag:"#define TOON\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <gradientmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_toon_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_toon_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",points_vert:"uniform float size;\nuniform float scale;\n#include <common>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\n#ifdef USE_POINTS_UV\n\tvarying vec2 vUv;\n\tuniform mat3 uvTransform;\n#endif\nvoid main() {\n\t#ifdef USE_POINTS_UV\n\t\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\t#endif\n\t#include <color_vertex>\n\t#include <morphcolor_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <project_vertex>\n\tgl_PointSize = size;\n\t#ifdef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z );\n\t#endif\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#include <fog_vertex>\n}",points_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <color_pars_fragment>\n#include <map_particle_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_particle_fragment>\n\t#include <color_fragment>\n\t#include <alphatest_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n}",shadow_vert:"#include <common>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <shadowmap_pars_vertex>\nvoid main() {\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",shadow_frag:"uniform vec3 color;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <logdepthbuf_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <shadowmask_pars_fragment>\nvoid main() {\n\t#include <logdepthbuf_fragment>\n\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}",sprite_vert:"uniform float rotation;\nuniform vec2 center;\n#include <common>\n#include <uv_pars_vertex>\n#include <fog_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\tvec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );\n\tvec2 scale;\n\tscale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) );\n\tscale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) );\n\t#ifndef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) scale *= - mvPosition.z;\n\t#endif\n\tvec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;\n\tvec2 rotatedPosition;\n\trotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;\n\trotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;\n\tmvPosition.xy += rotatedPosition;\n\tgl_Position = projectionMatrix * mvPosition;\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n}",sprite_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}"},yn={common:{diffuse:{value:new An(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new zi}
vendor: 7,889 bytes, line 72
72,alphaMap:{value:null},alphaMapTransform:{value:new zi},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new zi}},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 zi}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new zi}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new zi},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new zi},normalScale:{value:new Rt(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new zi},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new zi}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new zi}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new zi}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new An(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 An(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaTest:{value:0},uvTransform:{value:new zi}},sprite:{diffuse:{value:new An(16777215)},opacity:{value:1},center:{value:new Rt(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new zi},alphaMap:{value:null},alphaTest:{value:0}}},bl={basic:{uniforms:Cs([yn.common,yn.specularmap,yn.envmap,yn.aomap,yn.lightmap,yn.fog]),vertexShader:Pi.meshbasic_vert,fragmentShader:Pi.meshbasic_frag},lambert:{uniforms:Cs([yn.common,yn.specularmap,yn.envmap,yn.aomap,yn.lightmap,yn.emissivemap,yn.bumpmap,yn.normalmap,yn.displacementmap,yn.fog,yn.lights,{emissive:{value:new An(0)}}]),vertexShader:Pi.meshlambert_vert,fragmentShader:Pi.meshlambert_frag},phong:{uniforms:Cs([yn.common,yn.specularmap,yn.envmap,yn.aomap,yn.lightmap,yn.emissivemap,yn.bumpmap,yn.normalmap,yn.displacementmap,yn.fog,yn.lights,{emissive:{value:new An(0)},specular:{value:new An(1118481)},shininess:{value:30}}]),vertexShader:Pi.meshphong_vert,fragmentShader:Pi.meshphong_frag},standard:{uniforms:Cs([yn.common,yn.envmap,yn.aomap,yn.lightmap,yn.emissivemap,yn.bumpmap,yn.normalmap,yn.displacementmap,yn.roughnessmap,yn.metalnessmap,yn.fog,yn.lights,{emissive:{value:new An(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:Pi.meshphysical_vert,fragmentShader:Pi.meshphysical_frag},toon:{uniforms:Cs([yn.common,yn.aomap,yn.lightmap,yn.emissivemap,yn.bumpmap,yn.normalmap,yn.displacementmap,yn.gradientmap,yn.fog,yn.lights,{emissive:{value:new An(0)}}]),vertexShader:Pi.meshtoon_vert,fragmentShader:Pi.meshtoon_frag},matcap:{uniforms:Cs([yn.common,yn.bumpmap,yn.normalmap,yn.displacementmap,yn.fog,{matcap:{value:null}}]),vertexShader:Pi.meshmatcap_vert,fragmentShader:Pi.meshmatcap_frag},points:{uniforms:Cs([yn.points,yn.fog]),vertexShader:Pi.points_vert,fragmentShader:Pi.points_frag},dashed:{uniforms:Cs([yn.common,yn.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:Pi.linedashed_vert,fragmentShader:Pi.linedashed_frag},depth:{uniforms:Cs([yn.common,yn.displacementmap]),vertexShader:Pi.depth_vert,fragmentShader:Pi.depth_frag},normal:{uniforms:Cs([yn.common,yn.bumpmap,yn.normalmap,yn.displacementmap,{opacity:{value:1}}]),vertexShader:Pi.meshnormal_vert,fragmentShader:Pi.meshnormal_frag},sprite:{uniforms:Cs([yn.sprite,yn.fog]),vertexShader:Pi.sprite_vert,fragmentShader:Pi.sprite_frag},background:{uniforms:{uvTransform:{value:new zi},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:Pi.background_vert,fragmentShader:Pi.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1}},vertexShader:Pi.backgroundCube_vert,fragmentShader:Pi.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:Pi.cube_vert,fragmentShader:Pi.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:Pi.equirect_vert,fragmentShader:Pi.equirect_frag},distanceRGBA:{uniforms:Cs([yn.common,yn.displacementmap,{referencePosition:{value:new Me},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:Pi.distanceRGBA_vert,fragmentShader:Pi.distanceRGBA_frag},shadow:{uniforms:Cs([yn.lights,yn.fog,{color:{value:new An(0)},opacity:{value:1}}]),vertexShader:Pi.shadow_vert,fragmentShader:Pi.shadow_frag}};bl.physical={uniforms:Cs([bl.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new zi},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new zi},clearcoatNormalScale:{value:new Rt(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new zi},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new zi},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new zi},sheen:{value:0},sheenColor:{value:new An(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new zi},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new zi},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new zi},transmissionSamplerSize:{value:new Rt},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new zi},attenuationDistance:{value:0},attenuationColor:{value:new An(0)},specularColor:{value:new An(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new zi},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new zi}}]),vertexShader:Pi.meshphysical_vert,fragmentShader:Pi.meshphysical_frag};const Uh={r:0,b:0,g:0};function ts(f,e,t,r,s,l,u){const g=new An(0);let x,M,_=!0===l?0:1,C=null,P=0,R=null;function O(k,L){k.getRGB(Uh,bv(f)),r.buffers.color.setClear(Uh.r,Uh.g,Uh.b,L,u)}return{getClearColor:function(){return g},setClearColor:function(k,L=1){g.set(k),_=L,O(g,_)},getClearAlpha:function(){return _},setClearAlpha:function(k){_=k,O(g,_)},render:function F(k,L){let V=!1,z=!0===L.isScene?L.background:null;z&&z.isTexture&&(z=(L.backgroundBlurriness>0?t:e).get(z));const W=f.xr,ne=W.getSession&&W.getSession();ne&&"additive"===ne.environmentBlendMode&&(z=null),null===z?O(g,_):z&&z.isColor&&(O(z,1),V=!0),(f.autoClear||V)&&f.clear(f.autoClearColor,f.autoClearDepth,f.autoClearStencil),z&&(z.isCubeTexture||z.mapping===wc)?(void 0===M&&(M=new pn(new Qr(1,1,1),new Ts({name:"Backgroun
72dCubeMaterial",uniforms:Ch(bl.backgroundCube.uniforms),vertexShader:bl.backgroundCube.vertexShader,fragmentShader:bl.backgroundCube.fragmentShader,side:1,depthTest:!1,depthWrite:!1,fog:!1})),M.geometry.deleteAttribute("normal"),M.geometry.deleteAttribute("uv"),M.onBeforeRender=function(fe,ge,de){this.matrixWorld.copyPosition(de.matrixWorld)},Object.defineProperty(M.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),s.update(M)),M.material.uniforms.envMap.value=z,M.material.uniforms.flipEnvMap.value=z.isCubeTexture&&!1===z.isRenderTargetTexture?-1:1,M.material.uniforms.backgroundBlurriness.value=L.backgroundBlurriness,M.material.uniforms.backgroundIntensity.value=L.backgroundIntensity,M.material.toneMapped=z.encoding!==Ui,(C!==z||P!==z.version||R!==f.toneMapping)&&(M.material.needsUpdate=!0,C=z,P=z.version,R=f.toneMapping),M.layers.enableAll(),k.unshift(M,M.geometry,M.material,0,0,null)):z&&z.isTexture&&(void 0===x&&(x=new pn(new Th(2,2),new Ts({name:"BackgroundMaterial",uniforms:Ch(bl.background.uniforms),vertexShader:bl.background.vertexShader,fragmentShader:bl.background.fragmentShader,side:0,depthTest:!1,depthWrite:!1,fog:!1})),x.geometry.deleteAttribute("normal"),Object.defineProperty(x.material,"map",{get:function(){return this.uniforms.t2D.value}}),s.update(x)),x.material.uniforms.t2D.value=z,x.material.uniforms.backgroundIntensity.value=L.backgroundIntensity,x.material.toneMapped=z.encoding!==Ui,!0===z.matrixAutoUpdate&&z.updateMatrix(),x.material.uniforms.uvTransform.value.copy(z.matrix),(C!==z||P!==z.version||R!==f.toneMapping)&&(x.material.needsUpdate=!0,C=z,P=z.version,R=f.toneMapping),x.layers.enableAll(),k.unshift(x,x.geometry,x.material,0,0,null))}}}function YE(f,e,t,r){const s=f.getParameter(34921),l=r.isWebGL2?null:e.get("OES_vertex_array_object"),u=r.isWebGL2||null!==l,g={},_=k(null);let x=_,M=!1;function R(Ve){return r.isWebGL2?f.bindVertexArray(Ve):l.bindVertexArrayOES(Ve)}function F(Ve){return r.isWebGL2?f.deleteVertexArray(Ve):l.deleteVertexArrayOES(Ve)}function k(Ve){const We=[],nt=[],et=[];for(let tt=0;tt<s;tt++)We[tt]=0,nt[tt]=0,et[tt]=0;return{geometry:null,program:null,wireframe:!1,newAttributes:We,enabledAttributes:nt,attributeDivisors:et,object:Ve,attributes:{},index:null}}function z(){const Ve=x.newAttributes;for(let We=0,nt=Ve.length;We<nt;We++)Ve[We]=0}function W(Ve){ne(Ve,0)}function ne(Ve,We){const et=x.enabledAttributes,tt=x.attributeDivisors;x.newAttributes[Ve]=1,0===et[Ve]&&(f.enableVertexAttribArray(Ve),et[Ve]=1),tt[Ve]!==We&&((r.isWebGL2?f:e.get("ANGLE_instanced_arrays"))[r.isWebGL2?"vertexAttribDivisor":"vertexAttribDivisorANGLE"](Ve,We),tt[Ve]=We)}function fe(){const Ve=x.newAttributes,We=x.enabledAttributes;for(let nt=0,et=We.length;nt<et;nt++)We[nt]!==Ve[nt]&&(f.disableVertexAttribArray(nt),We[nt]=0)}function ge(Ve,We,nt,et,tt,gt){!0!==r.isWebGL2||5124!==nt&&5125!==nt?f.vertexAttribPointer(Ve,We,nt,et,tt,gt):f.vertexAttribIPointer(Ve,We,nt,tt,gt)}function qe(){Ge(),M=!0,x!==_&&(x=_,R(x.object))}function Ge(){_.geometry=null,_.program=null,_.wireframe=!1}return{setup:function C(Ve,We,nt,et,tt){let gt=!1;if(u){const bt=function O(Ve,We,nt){const et=!0===nt.wireframe;let tt=g[Ve.id];void 0===tt&&(tt={},g[Ve.id]=tt);let gt=tt[We.id];void 0===gt&&(gt={},tt[We.id]=gt);let bt=gt[et];return void 0===bt&&(bt=k(function P(){return r.isWebGL2?f.createVertexArray():l.createVertexArrayOES()}()),gt[et]=bt),bt}(et,nt,We);x!==bt&&(x=bt,R(x.object)),gt=function L(Ve,We,nt,et){const tt=x.attributes,gt=We.attributes;let bt=0;const jt=nt.getAttributes();for(const Qt in jt)if(jt[Qt].location>=0){const At=tt[Qt];let Ut=gt[Qt];if(void 0===Ut&&("instanceMatrix"===Qt&&Ve.instanceMatrix&&(Ut=Ve.instanceMatrix),"instanceColor"===Qt&&Ve.instanceColor&&(Ut=Ve.instanceColor)),void 0===At||At.attribute!==Ut||Ut&&At.data!==Ut.data)return!0;bt++}return x.attributesNum!==bt||x.index!==et}(Ve,et,nt,tt),gt&&function V(Ve,We,nt,et){const tt={},gt=We.attributes;let bt=0;const jt=nt.getAttributes();for(const Qt in jt)if(jt[Qt].location>=0){let At=gt[Qt];void 0===At&&("instanceMatrix"===Qt&&Ve.instanceMatrix&&(At=Ve.instanceMatrix),"instanceColor"===Qt&&Ve.instanceColor&&(At=Ve.instanceColor));const Ut={};Ut.attribute=At,At&&At.data&&(Ut.data=At.data),tt[Qt]=Ut,bt++}x.attributes=tt,x.attributesNum=bt,x.index=et}(Ve,et,nt,tt)}
vendor: 6,519 bytes, line 72
72else{const bt=!0===We.wireframe;(x.geometry!==et.id||x.program!==nt.id||x.wireframe!==bt)&&(x.geometry=et.id,x.program=nt.id,x.wireframe=bt,gt=!0)}null!==tt&&t.update(tt,34963),(gt||M)&&(M=!1,function de(Ve,We,nt,et){if(!1===r.isWebGL2&&(Ve.isInstancedMesh||et.isInstancedBufferGeometry)&&null===e.get("ANGLE_instanced_arrays"))return;z();const tt=et.attributes,gt=nt.getAttributes(),bt=We.defaultAttributeValues;for(const jt in gt){const Qt=gt[jt];if(Qt.location>=0){let ct=tt[jt];if(void 0===ct&&("instanceMatrix"===jt&&Ve.instanceMatrix&&(ct=Ve.instanceMatrix),"instanceColor"===jt&&Ve.instanceColor&&(ct=Ve.instanceColor)),void 0!==ct){const At=ct.normalized,Ut=ct.itemSize,Vt=t.get(ct);if(void 0===Vt)continue;const ut=Vt.buffer,Nn=Vt.type,ni=Vt.bytesPerElement;if(ct.isInterleavedBufferAttribute){const Gt=ct.data,Vn=Gt.stride,$t=ct.offset;if(Gt.isInstancedInterleavedBuffer){for(let Lt=0;Lt<Qt.locationSize;Lt++)ne(Qt.location+Lt,Gt.meshPerAttribute);!0!==Ve.isInstancedMesh&&void 0===et._maxInstanceCount&&(et._maxInstanceCount=Gt.meshPerAttribute*Gt.count)}else for(let Lt=0;Lt<Qt.locationSize;Lt++)W(Qt.location+Lt);f.bindBuffer(34962,ut);for(let Lt=0;Lt<Qt.locationSize;Lt++)ge(Qt.location+Lt,Ut/Qt.locationSize,Nn,At,Vn*ni,($t+Ut/Qt.locationSize*Lt)*ni)}else{if(ct.isInstancedBufferAttribute){for(let Gt=0;Gt<Qt.locationSize;Gt++)ne(Qt.location+Gt,ct.meshPerAttribute);!0!==Ve.isInstancedMesh&&void 0===et._maxInstanceCount&&(et._maxInstanceCount=ct.meshPerAttribute*ct.count)}else for(let Gt=0;Gt<Qt.locationSize;Gt++)W(Qt.location+Gt);f.bindBuffer(34962,ut);for(let Gt=0;Gt<Qt.locationSize;Gt++)ge(Qt.location+Gt,Ut/Qt.locationSize,Nn,At,Ut*ni,Ut/Qt.locationSize*Gt*ni)}}else if(void 0!==bt){const At=bt[jt];if(void 0!==At)switch(At.length){case 2:f.vertexAttrib2fv(Qt.location,At);break;case 3:f.vertexAttrib3fv(Qt.location,At);break;case 4:f.vertexAttrib4fv(Qt.location,At);break;default:f.vertexAttrib1fv(Qt.location,At)}}}}fe()}(Ve,We,nt,et),null!==tt&&f.bindBuffer(34963,t.get(tt).buffer))},reset:qe,resetDefaultState:Ge,dispose:function ie(){qe();for(const Ve in g){const We=g[Ve];for(const nt in We){const et=We[nt];for(const tt in et)F(et[tt].object),delete et[tt];delete We[nt]}delete g[Ve]}},releaseStatesOfGeometry:function ye(Ve){if(void 0===g[Ve.id])return;const We=g[Ve.id];for(const nt in We){const et=We[nt];for(const tt in et)F(et[tt].object),delete et[tt];delete We[nt]}delete g[Ve.id]},releaseStatesOfProgram:function He(Ve){for(const We in g){const nt=g[We];if(void 0===nt[Ve.id])continue;const et=nt[Ve.id];for(const tt in et)F(et[tt].object),delete et[tt];delete nt[Ve.id]}},initAttributes:z,enableAttribute:W,disableUnusedAttributes:fe}}function os(f,e,t,r){const s=r.isWebGL2;let l;this.setMode=function u(x){l=x},this.render=function g(x,M){f.drawArrays(l,x,M),t.update(M,l,1)},this.renderInstances=function _(x,M,C){if(0===C)return;let P,R;if(s)P=f,R="drawArraysInstanced";else if(P=e.get("ANGLE_instanced_arrays"),R="drawArraysInstancedANGLE",null===P)return void console.error("THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");P[R](l,x,M,C),t.update(M,l,C)}}function lm(f,e,t){let r;function l(ge){if("highp"===ge){if(f.getShaderPrecisionFormat(35633,36338).precision>0&&f.getShaderPrecisionFormat(35632,36338).precision>0)return"highp";ge="mediump"}return"mediump"===ge&&f.getShaderPrecisionFormat(35633,36337).precision>0&&f.getShaderPrecisionFormat(35632,36337).precision>0?"mediump":"lowp"}const u=typeof WebGL2RenderingContext<"u"&&"WebGL2RenderingContext"===f.constructor.name;let g=void 0!==t.precision?t.precision:"highp";const _=l(g);_!==g&&(console.warn("THREE.WebGLRenderer:",g,"not supported, using",_,"instead."),g=_);const x=u||e.has("WEBGL_draw_buffers"),M=!0===t.logarithmicDepthBuffer,C=f.getParameter(34930),P=f.getParameter(35660),R=f.getParameter(3379),F=f.getParameter(34076),O=f.getParameter(34921),k=f.getParameter(36347),L=f.getParameter(36348),V=f.getParameter(36349),z=P>0,W=u||e.has("OES_texture_float");return{isWebGL2:u,drawBuffers:x,getMaxAnisotropy:function s(){if(void 0!==r)return r;if(!0===e.has("EXT_texture_filter_anisotropic")){const ge=e.get("EXT_texture_filter_anisotropic");r=f.getParameter(ge.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else r=0;return r},getMaxPrecision:l,precision:g,logarithmicDepthBuffer:M,maxTextures:C,maxVertexTextures:P,maxTextureSize:R,maxCubemapSize:F,maxAttributes:O,maxVertexUniforms:k,maxVaryings:L,maxFragmentUniforms:V,vertexTextures:z,floatFragmentTextures:W,floatVertexTextures:z&&W,maxSamples:u?f.getParameter(36183):0}}function $E(f){const e=this;let t=null,r=0,s=!1,l=!1;const u=new Co,g=new zi,_={value:null,needsUpdate:!1};function M(C,P,R,F){const O=null!==C?C.length:0;let k=null;if(0!==O){if(k=_.value,!0!==F||null===k){const L=R+4*O,V=P.matrixWorldInverse;g.getNormalMatrix(V),(null===k||k.length<L)&&(k=new Float32Array(L));for(let z=0,W=R;z!==O;++z,W+=4)u.copy(C[z]).applyMatrix4(V,g),u.normal.toArray(k,W),k[W+3]=u.constant}_.value=k,_.needsUpdate=!0}return e.numPlanes=O,e.numIntersection=0,k}this.uniform=_,this.numPlanes=0,this.numIntersection=0,this.init=function(C,P){const R=0!==C.length||P||0!==r||s;return s=P,r=C.length,R},this.beginShadows=function(){l=!0,M(null)},this.endShadows=function(){l=!1},this.setGlobalState=function(C,P){t=M(C,P,0)},this.setState=function(C,P,R){const F=C.clippingPlanes,O=C.clipIntersection,k=C.clipShadows,L=f.get(C);if(!s||null===F||0===F.length||l&&!k)l?M(null):function x(){_.value!==t&&(_.value=t,_.needsUpdate=r>0),e.numPlanes=r,e.numIntersection=0}();else{const V=l?0:r,z=4*V;let W=L.clippingState||null;_.value=W,W=M(F,P,z,R);for(let ne=0;ne!==z;++ne)W[ne]=t[ne];L.clippingState=W,this.numIntersection=O?this.numPlanes:0,this.numPlanes+=V}}}function KE(f){let e=new WeakMap;function t(u,g){return 303===g?u.mapping=Iu:304===g&&(u.mapping=bi),u}function s(u){const g=u.target;g.removeEventListener("dispose",s);const _=e.get(g);void 0!==_&&(e.delete(g),_.dispose())}return{get:function r(u){if(u&&u.isTexture&&!1===u.isRenderTargetTexture){const g=u.mapping;if(303===g||304===g){if(e.has(u))return t(e.get(u).texture,u.mapping);{const _=u.image;if(_&&_.height>0){const x=new Sv(_.height/2);return x.fromEquirectangularTexture(f,u),e.set(u,x),u.addEventListener("dispose",s),t(x.texture,u.mapping)}return null}}}return u},dispose:function l(){e=new WeakMap}}}class Md extends l0{constructor(e=-1,t=1,r=1,s=-1,l=.1,u=2e3){super(),this.isOrthographicCamera=!0,this.type="Orthogra
72phicCamera",this.zoom=1,this.view=null,this.left=e,this.right=t,this.top=r,this.bottom=s,this.near=l,this.far=u,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.near=e.near,this.far=e.far,this.zoom=e.zoom,this.view=null===e.view?null:Object.assign({},e.view),this}setViewOffset(e,t,r,s,l,u){null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=r,this.view.offsetY=s,this.view.width=l,this.view.height=u,this.updateProjectionMatrix()}clearViewOffset(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=(this.right-this.left)/(2*this.zoom),t=(this.top-this.bottom)/(2*this.zoom),r=(this.right+this.left)/2,s=(this.top+this.bottom)/2;let l=r-e,u=r+e,g=s+t,_=s-t;if(null!==this.view&&this.view.enabled){const x=(this.right-this.left)/this.view.fullWidth/this.zoom,M=(this.top-this.bottom)/this.view.fullHeight/this.zoom;l+=x*this.view.offsetX,u=l+x*this.view.width,g-=M*this.view.offsetY,_=g-M*this.view.height}this.projectionMatrix.makeOrthographic(l,u,g,_,this.near,this.far),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const t=super.toJSON(e);return t.object.zoom=this.zoom,t.object.left=this.left,t.object.right=this.right,t.object.top=this.top,t.object.bottom=this.bottom,t.object.near=this.near,t.object.far=this.far,null!==this.view&&(t.object.view=Object.assign({},this.view)),t}}const wd=[.125,.215,.35,.446,.526,.582],M0=new Md,ay=new An;let w0=null;const Gh=(1+Math.sqrt(5))/2,af=1/Gh,oy=[new Me(1,1,1),new Me(-1,1,1),new Me(1,1,-1),new Me(-1,1,-1),new Me(0,Gh,af),new Me(0,Gh,-af),new Me(af,0,Gh),new Me(-af,0,Gh),new Me(Gh,af,0),new Me(-Gh,af,0)];class C0{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,r=.1,s=100){w0=this._renderer.getRenderTarget(),this._setSize(256);const l=this._allocateTargets();return l.depthBuffer=!0,this._sceneToCubeUV(e,r,s,l),t>0&&this._blur(l,0,0,t),this._applyPMREM(l),this._cleanup(l),l}fromEquirectangular(e,t=null){return this._fromTexture(e,t)}fromCubemap(e,t=null){return this._fromTexture(e,t)}compileCubemapShader(){null===this._cubemapMaterial&&(this._cubemapMaterial=hy(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){null===this._equirectMaterial&&(this._equirectMaterial=cy(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),null!==this._cubemapMaterial&&this._cubemapMaterial.dispose(),null!==this._equirectMaterial&&this._equirectMaterial.dispose()}_setSize(e){this._lodMax=Math.floor(Math.log2(e)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){null!==this._blurMaterial&&this._blurMaterial.dispose(),null!==this._pingPongRenderTarget&&this._pingPongRenderTarget.dispose();for(let e=0;e<this._lodPlanes.length;e++)this._lodPlanes[e].dispose()}_cleanup(e){this._renderer.setRenderTarget(w0),e.scissorTest=!1,cm(e,0,0,e.width,e.height)}_fromTexture(e,t){this._setSize(e.mapping===Iu||e.mapping===bi?0===e.image.length?16:e.image[0].width||e.image[0].image.width:e.image.width/4),w0=this._renderer.getRenderTarget();const r=t||this._allocateTargets();return this._textureToCubeUV(e,r),this._applyPMREM(r),this._cleanup(r),r}_allocateTargets(){const e=3*Math.max(this._cubeSize,112),t=4*this._cubeSize,r={magFilter:Tr,minFilter:Tr,generateMipmaps:!1,type:Ka,format:Ns,encoding:zo,depthBuffer:!1},s=ly(e,t,r);if(null===this._pingPongRenderTarget||this._pingPongRenderTarget.width!==e||this._pingPongRenderTarget.height!==t){null!==this._pingPongRenderTarget&&this._dispose(),this._pingPongRenderTarget=ly(e,t,r);const{_lodMax:l}=this;({sizeLods:this._sizeLods,lodPlanes:this._lodPlanes,sigmas:this._sigmas}=function ZE(f){const e=[],t=[],r=[];let s=f;const l=f-4+1+wd.length;for(let u=0;u<l;u++){const g=Math.pow(2,s);t.push(g);let _=1/g;u>f-4?_=wd[u-f+4-1]:0===u&&(_=0),r.push(_);const x=1/(g-2),M=-x,C=1+x,P=[M,M,C,M,C,C,M,M,C,C,M,C],R=6,F=6,O=3,k=2,L=1,V=new Float32Array(O*F*R),z=new Float32Array(k*F*R),W=new Float32Array(L*F*R);for(let fe=0;fe<R;fe++){const ge=fe%3*2/3-1,de=fe>2?0:-1;V.set([ge,de,0,ge+2/3,de,0,ge+2/3,de+1,0,ge,de,0,ge+2/3,de+1,0,ge,de+1,0],O*F*fe),z.set(P,k*F*fe),W.set([fe,fe,fe,fe,fe,fe],L*F*fe)}const ne=new Ii;ne.setAttribute("position",new tr(V,O)),ne.setAttribute("uv",new tr(z,k)),ne.setAttribute("faceIndex",new tr(W,L)),e.push(ne),s>4&&s--}return{lodPlanes:e,sizeLods:t,sigmas:r}}(l)),this._blurMaterial=function jE(f,e,t){const r=new Float32Array(20),s=new Me(0,1,0);return new Ts({name:"SphericalGaussianBlur",defines:{n:20,CUBEUV_TEXEL_WIDTH:1/e,CUBEUV_TEXEL_HEIGHT:1/t,CUBEUV_MAX_MIP:`${f}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:r},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:s}},vertexShader:"\n\n\t\tprecision mediump float;\n\t\tprecision mediump int;\n\n\t\tattribute float faceIndex;\n\n\t\tvarying vec3 vOutputDirection;\n\n\t\t// RH coordinate system; PMREM face-indexing convention\n\t\tvec3 getDirection( vec2 uv, float face ) {\n\n\t\t\tuv = 2.0 * uv - 1.0;\n\n\t\t\tvec3 direction = vec3( uv, 1.0 );\n\n\t\t\tif ( face == 0.0 ) {\n\n\t\t\t\tdirection = direction.zyx; // ( 1, v, u ) pos x\n\n\t\t\t} else if ( face == 1.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xz *= -1.0; // ( -u, 1, -v ) pos y\n\n\t\t\t} else if ( face == 2.0 ) {\n\n\t\t\t\tdirection.x *= -1.0; // ( -u, v, 1 ) pos z\n\n\t\t\t} else if ( face == 3.0 ) {\n\n\t\t\t\tdirection = direction.zyx;\n\t\t\t\tdirection.xz *= -1.0; // ( -1, v, -u ) neg x\n\n\t\t\t} else if ( face == 4.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xy *= -1.0; // ( -u, -1, v ) neg y\n\n\t\t\t} else if ( face == 5.0 ) {\n\n\t\t\t\tdirection.z *= -1.0; // ( u, v, -1 ) neg z\n\n\t\t\t}\n\n\t\t\treturn direction;\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tvOutputDirection = getDirection( uv, faceIndex );\n\t\t\tgl_Position = vec4( position, 1.0 );\n\n\t\t}\n\t",fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform sampler2D envMap;\n\t\t\tuniform int samples;\n\t\t\tuniform float weights[ n ];\n\t\t\tuniform bool latitudinal;\n\t\t\tuniform float dTheta;\n\t\t\tuniform float mipInt;\n\t\t\tuniform vec3 poleAxis;\n\n\t\t\t#define ENVMAP_TYPE_CUBE_UV\n\t\t\t#include <cube_uv_reflection_fragment>\n\n\t\t\tvec3 getSample( float theta, vec3 axis ) {\n\n\t\t\t\tfloat cosTheta = cos( theta );\n\t\t\t\t// Rodrigues' axis-angle rotation\n\t\t\t\tvec3 sampleDirection = vOutputDirection * cosTheta\n\t\t\t\t\t+ cross( axis, vOutputDirection ) * sin( theta )\n\t\t\t\t\t+ axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta );\n\n\t\t\t\treturn bilinearCubeUV( envMap, sampleDirection, mipInt );\n\n\t\t\t}\n\n\t\t\tvoid main() {\n\n\t\t\t\tvec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection );\n\n\t\t\t\tif ( all( equal( axis, vec3( 0.0 ) ) ) ) {\n\n\t\t\t\t\taxis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x );\n\n\t\t\t\t}\n\n\t\t\t\taxis = normalize( axis );\n\n\t\t\t\tgl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\t\t\t\tgl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis );\n\n\t\t\t\tfor ( int i = 1; i < n; i++ ) {\n\n\t\t\t\t\tif ( i >= samples ) {\n\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tfloat theta = dTheta * float( i );\n\t\t\t\t\tgl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis );\n\t\t\t\t\tgl_FragColor.rgb += weights[ i ] * getSample( theta, axis );\n\n\t\t\t\t}\n\n\t\t\t}\n\t\t",blending:0,depthTest:!1,depthWrite:!1})}(l,e,t)}return s}_compileMaterial(e){const t=new pn(this._lodPlanes[0],e);this._renderer.compile(t,M0)}_sceneToCubeUV(e,t,r,s){const g=new Wr(90,1,t,r),_=[1,-1,1,1,1,1],x=[1,1,1,-1,-1,-1],M=this._renderer,C=M.autoClear,P=M.toneMapping;M.getClearColor(ay),M.toneMapping=Mc,M.autoClear=!1;
vendor: 4,117 bytes, line 72
72const R=new vs({name:"PMREM.Background",side:1,depthWrite:!1,depthTest:!1}),F=new pn(new Qr,R);let O=!1;const k=e.background;k?k.isColor&&(R.color.copy(k),e.background=null,O=!0):(R.color.copy(ay),O=!0);for(let L=0;L<6;L++){const V=L%3;0===V?(g.up.set(0,_[L],0),g.lookAt(x[L],0,0)):1===V?(g.up.set(0,0,_[L]),g.lookAt(0,x[L],0)):(g.up.set(0,_[L],0),g.lookAt(0,0,x[L]));const z=this._cubeSize;cm(s,V*z,L>2?z:0,z,z),M.setRenderTarget(s),O&&M.render(F,g),M.render(e,g)}F.geometry.dispose(),F.material.dispose(),M.toneMapping=P,M.autoClear=C,e.background=k}_textureToCubeUV(e,t){const r=this._renderer,s=e.mapping===Iu||e.mapping===bi;s?(null===this._cubemapMaterial&&(this._cubemapMaterial=hy()),this._cubemapMaterial.uniforms.flipEnvMap.value=!1===e.isRenderTargetTexture?-1:1):null===this._equirectMaterial&&(this._equirectMaterial=cy());const l=s?this._cubemapMaterial:this._equirectMaterial,u=new pn(this._lodPlanes[0],l);l.uniforms.envMap.value=e;const _=this._cubeSize;cm(t,0,0,3*_,2*_),r.setRenderTarget(t),r.render(u,M0)}_applyPMREM(e){const t=this._renderer,r=t.autoClear;t.autoClear=!1;for(let s=1;s<this._lodPlanes.length;s++){const l=Math.sqrt(this._sigmas[s]*this._sigmas[s]-this._sigmas[s-1]*this._sigmas[s-1]);this._blur(e,s-1,s,l,oy[(s-1)%oy.length])}t.autoClear=r}_blur(e,t,r,s,l){const u=this._pingPongRenderTarget;this._halfBlur(e,u,t,r,s,"latitudinal",l),this._halfBlur(u,e,r,r,s,"longitudinal",l)}_halfBlur(e,t,r,s,l,u,g){const _=this._renderer,x=this._blurMaterial;"latitudinal"!==u&&"longitudinal"!==u&&console.error("blur direction must be either latitudinal or longitudinal!");const C=new pn(this._lodPlanes[s],x),P=x.uniforms,R=this._sizeLods[r]-1,F=isFinite(l)?Math.PI/(2*R):2*Math.PI/39,O=l/F,k=isFinite(l)?1+Math.floor(3*O):20;k>20&&console.warn(`sigmaRadians, ${l}, is too large and will clip, as it requested ${k} samples when the maximum is set to 20`);const L=[];let V=0;for(let ge=0;ge<20;++ge){const de=ge/O,ie=Math.exp(-de*de/2);L.push(ie),0===ge?V+=ie:ge<k&&(V+=2*ie)}for(let ge=0;ge<L.length;ge++)L[ge]=L[ge]/V;P.envMap.value=e.texture,P.samples.value=k,P.weights.value=L,P.latitudinal.value="latitudinal"===u,g&&(P.poleAxis.value=g);const{_lodMax:z}=this;P.dTheta.value=F,P.mipInt.value=z-r;const W=this._sizeLods[s];cm(t,3*W*(s>z-4?s-z+4:0),4*(this._cubeSize-W),3*W,2*W),_.setRenderTarget(t),_.render(C,M0)}}function ly(f,e,t){const r=new Ks(f,e,t);return r.texture.mapping=wc,r.texture.name="PMREM.cubeUv",r.scissorTest=!0,r}function cm(f,e,t,r,s){f.viewport.set(e,t,r,s),f.scissor.set(e,t,r,s)}function cy(){return new Ts({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:"\n\n\t\tprecision mediump float;\n\t\tprecision mediump int;\n\n\t\tattribute float faceIndex;\n\n\t\tvarying vec3 vOutputDirection;\n\n\t\t// RH coordinate system; PMREM face-indexing convention\n\t\tvec3 getDirection( vec2 uv, float face ) {\n\n\t\t\tuv = 2.0 * uv - 1.0;\n\n\t\t\tvec3 direction = vec3( uv, 1.0 );\n\n\t\t\tif ( face == 0.0 ) {\n\n\t\t\t\tdirection = direction.zyx; // ( 1, v, u ) pos x\n\n\t\t\t} else if ( face == 1.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xz *= -1.0; // ( -u, 1, -v ) pos y\n\n\t\t\t} else if ( face == 2.0 ) {\n\n\t\t\t\tdirection.x *= -1.0; // ( -u, v, 1 ) pos z\n\n\t\t\t} else if ( face == 3.0 ) {\n\n\t\t\t\tdirection = direction.zyx;\n\t\t\t\tdirection.xz *= -1.0; // ( -1, v, -u ) neg x\n\n\t\t\t} else if ( face == 4.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xy *= -1.0; // ( -u, -1, v ) neg y\n\n\t\t\t} else if ( face == 5.0 ) {\n\n\t\t\t\tdirection.z *= -1.0; // ( u, v, -1 ) neg z\n\n\t\t\t}\n\n\t\t\treturn direction;\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tvOutputDirection = getDirection( uv, faceIndex );\n\t\t\tgl_Position = vec4( position, 1.0 );\n\n\t\t}\n\t",fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform sampler2D envMap;\n\n\t\t\t#include <common>\n\n\t\t\tvoid main() {\n\n\t\t\t\tvec3 outputDirection = normalize( vOutputDirection );\n\t\t\t\tvec2 uv = equirectUv( outputDirection );
72\n\n\t\t\t\tgl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 );\n\n\t\t\t}\n\t\t",blending:0,depthTest:!1,depthWrite:!1})}function hy(){return new Ts({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:"\n\n\t\tprecision mediump float;\n\t\tprecision mediump int;\n\n\t\tattribute float faceIndex;\n\n\t\tvarying vec3 vOutputDirection;\n\n\t\t// RH coordinate system; PMREM face-indexing convention\n\t\tvec3 getDirection( vec2 uv, float face ) {\n\n\t\t\tuv = 2.0 * uv - 1.0;\n\n\t\t\tvec3 direction = vec3( uv, 1.0 );\n\n\t\t\tif ( face == 0.0 ) {\n\n\t\t\t\tdirection = direction.zyx; // ( 1, v, u ) pos x\n\n\t\t\t} else if ( face == 1.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xz *= -1.0; // ( -u, 1, -v ) pos y\n\n\t\t\t} else if ( face == 2.0 ) {\n\n\t\t\t\tdirection.x *= -1.0; // ( -u, v, 1 ) pos z\n\n\t\t\t} else if ( face == 3.0 ) {\n\n\t\t\t\tdirection = direction.zyx;\n\t\t\t\tdirection.xz *= -1.0; // ( -1, v, -u ) neg x\n\n\t\t\t} else if ( face == 4.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xy *= -1.0; // ( -u, -1, v ) neg y\n\n\t\t\t} else if ( face == 5.0 ) {\n\n\t\t\t\tdirection.z *= -1.0; // ( u, v, -1 ) neg z\n\n\t\t\t}\n\n\t\t\treturn direction;\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tvOutputDirection = getDirection( uv, faceIndex );\n\t\t\tgl_Position = vec4( position, 1.0 );\n\n\t\t}\n\t",fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tuniform float flipEnvMap;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform samplerCube envMap;\n\n\t\t\tvoid main() {\n\n\t\t\t\tgl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) );\n\n\t\t\t}\n\t\t",blending:0,depthTest:!1,depthWrite:!1})}function JE(f){let e=new WeakMap,t=null;function l(g){const _=g.target;_.removeEventListener("dispose",l);const x=e.get(_);void 0!==x&&(e.delete(_),x.dispose())}return{get:function r(g){if(g&&g.isTexture){const _=g.mapping,x=303===_||304===_,M=_===Iu||_===bi;if(x||M){if(g.isRenderTargetTexture&&!0===g.needsPMREMUpdate){g.needsPMREMUpdate=!1;let C=e.get(g);return null===t&&(t=new C0(f)),C=x?t.fromEquirectangular(g,C):t.fromCubemap(g,C),e.set(g,C),C.texture}if(e.has(g))return e.get(g).texture;{const C=g.image;if(x&&C&&C.height>0||M&&C&&function s(g){let _=0;for(let M=0;M<6;M++)void 0!==g[M]&&_++;return 6===_}(C)){null===t&&(t=new C0(f));const P=x?t.fromEquirectangular(g):t.fromCubemap(g);return e.set(g,P),g.addEventListener("dispose",l),P.texture}return null}}}return g},dispose:function u(){e=new WeakMap,null!==t&&(t.dispose(),t=null)}}}function eb(f){const e={};function t(r){if(void 0!==e[r])return e[r];let s;switch(r){case"WEBGL_depth_texture":s=f.getExtension("WEBGL_depth_texture")||f.getExtension("MOZ_WEBGL_depth_texture")||f.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":s=f.getExtension("EXT_texture_filter_anisotropic")||f.getExtension("MOZ_EXT_texture_filter_anisotropic")||f.getExtension("WEBKIT_EXT_texture_filter_anisotropic");break;case"WEBGL_compressed_texture_s3tc":s=f.getExtension("WEBGL_compressed_texture_s3tc")||f.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||f.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");break;case"WEBGL_compressed_texture_pvrtc":s=f.getExtension("WEBGL_compressed_texture_pvrtc")||f.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;default:s=f.getExtension(r)}return e[r]=s,s}return{has:function(r){return null!==t(r)},init:function(r){r.isWebGL2?t("EXT_color_buffer_float"):(t("WEBGL_depth_texture"),t("OES_texture_float"),t("OES_texture_half_float"),t("OES_texture_half_float_linear"),t("OES_standard_derivatives"),t("OES_element_index_uint"),t("OES_vertex_array_object"),t("ANGLE_instanced_arrays")),t("OES_texture_float_linear"),t("EXT_color_buffer_half_float"),t("WEBGL_multisampled_render_to_texture")},get:function(r){const s=t(r);return null===s&&console.warn("THREE.WebGLRenderer: "+r+" extension not supported."),s}}}function tb(f,e,t,r){const s={},l=new WeakMap;function u(C){const P=C.target;null!==P.index&&e.remove(P.index);for(const F in P.attributes)e.remove(P.attributes[F]);P.removeEventListener("dispose",u),delete s[P.id];const R=l.get(P);R&&(e.remove(R),l.delete(P)),r.releaseStatesOfGeometry(P),!0===P.isInstancedBufferGeometry&&delete P._maxInstanceCount,t.memory.geometries--}function x(C){const P=[],R=C.index,F=C.attributes.position;let O=0;if(null!==R){const V=R.array;O=R.version;for(let z=0,W=V.length;z<W;z+=3){const ne=V[z+0],fe=V[z+1],ge=V[z+2];P.push(ne,fe,fe,ge,ge,ne)}}else{O=F.version;for(let z=0,W=F.array.length/3-1;z<W;z+=3){const ne=z+0,fe=z+1,ge=z+2;P.push(ne,fe,fe,ge,ge,ne)}}const k=new(hv(P)?s0:kc)(P,1);k.version=O;const L=l.get(C);L&&e.remove(L),l.set(C,k)}return{get:function g(C,P){return!0===s[P.id]||(P.addEventListener("dispose",u),s[P.id]=!0,t.memory.geometries++),P},update:function _(C){const P=C.attributes;for(const F in P)e.update(P[F],34962);const R=C.morphAttributes;for(const F in R){const O=R[F];for(let k=0,L=O.length;k<L;k++)e.update(O[k],34962)}},getWireframeAttribute:function M(C){const P=l.get(C);if(P){const R=C.index;null!==R&&P.version<R.version&&x(C)}else x(C);return l.get(C)}}}function nb(f,e,t,r){const s=r.isWebGL2;let l,g,_;this.setMode=function u(P){l=P},this.setIndex=function x(P){g=P.type,_=P.bytesPerElement},this.render=function M(P,R){f.drawElements(l,R,g,P*_),t.update(R,l,1)},this.renderInstances=function C(P,R,F){if(0===F)return;let O,k;if(s)O=f,k="drawElementsInstanced";else if(O=e.get("ANGLE_instanced_arrays"),k="drawElementsInstancedANGLE",
vendor: 4,774 bytes, line 72
72null===O)return void console.error("THREE.WebGLIndexedBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");O[k](l,R,g,P*_,F),t.update(R,l,F)}}function ib(f){const t={frame:0,calls:0,triangles:0,points:0,lines:0};return{memory:{geometries:0,textures:0},render:t,programs:null,autoReset:!0,reset:function s(){t.frame++,t.calls=0,t.triangles=0,t.points=0,t.lines=0},update:function r(l,u,g){switch(t.calls++,u){case 4:t.triangles+=g*(l/3);break;case 1:t.lines+=g*(l/2);break;case 3:t.lines+=g*(l-1);break;case 2:t.lines+=g*l;break;case 0:t.points+=g*l;break;default:console.error("THREE.WebGLInfo: Unknown draw mode:",u)}}}}function rb(f,e){return f[0]-e[0]}function sb(f,e){return Math.abs(e[1])-Math.abs(f[1])}function ab(f,e,t){const r={},s=new Float32Array(8),l=new WeakMap,u=new Ar,g=[];for(let x=0;x<8;x++)g[x]=[x,0];return{update:function _(x,M,C){const P=x.morphTargetInfluences;if(!0===e.isWebGL2){const R=M.morphAttributes.position||M.morphAttributes.normal||M.morphAttributes.color,F=void 0!==R?R.length:0;let O=l.get(M);if(void 0===O||O.count!==F){let Ve=function(){qe.dispose(),l.delete(M),M.removeEventListener("dispose",Ve)};void 0!==O&&O.texture.dispose();const V=void 0!==M.morphAttributes.position,z=void 0!==M.morphAttributes.normal,W=void 0!==M.morphAttributes.color,ne=M.morphAttributes.position||[],fe=M.morphAttributes.normal||[],ge=M.morphAttributes.color||[];let de=0;!0===V&&(de=1),!0===z&&(de=2),!0===W&&(de=3);let ie=M.attributes.position.count*de,ye=1;ie>e.maxTextureSize&&(ye=Math.ceil(ie/e.maxTextureSize),ie=e.maxTextureSize);const He=new Float32Array(ie*ye*4*F),qe=new yh(He,ie,ye,F);qe.type=Os,qe.needsUpdate=!0;const Ge=4*de;for(let We=0;We<F;We++){const nt=ne[We],et=fe[We],tt=ge[We],gt=ie*ye*4*We;for(let bt=0;bt<nt.count;bt++){const jt=bt*Ge;!0===V&&(u.fromBufferAttribute(nt,bt),He[gt+jt+0]=u.x,He[gt+jt+1]=u.y,He[gt+jt+2]=u.z,He[gt+jt+3]=0),!0===z&&(u.fromBufferAttribute(et,bt),He[gt+jt+4]=u.x,He[gt+jt+5]=u.y,He[gt+jt+6]=u.z,He[gt+jt+7]=0),!0===W&&(u.fromBufferAttribute(tt,bt),He[gt+jt+8]=u.x,He[gt+jt+9]=u.y,He[gt+jt+10]=u.z,He[gt+jt+11]=4===tt.itemSize?u.w:1)}}O={count:F,texture:qe,size:new Rt(ie,ye)},l.set(M,O),M.addEventListener("dispose",Ve)}let k=0;for(let V=0;V<P.length;V++)k+=P[V];const L=M.morphTargetsRelative?1:1-k;C.getUniforms().setValue(f,"morphTargetBaseInfluence",L),C.getUniforms().setValue(f,"morphTargetInfluences",P),C.getUniforms().setValue(f,"morphTargetsTexture",O.texture,t),C.getUniforms().setValue(f,"morphTargetsTextureSize",O.size)}else{const R=void 0===P?0:P.length;let F=r[M.id];if(void 0===F||F.length!==R){F=[];for(let z=0;z<R;z++)F[z]=[z,0];r[M.id]=F}for(let z=0;z<R;z++){const W=F[z];W[0]=z,W[1]=P[z]}F.sort(sb);for(let z=0;z<8;z++)z<R&&F[z][1]?(g[z][0]=F[z][0],g[z][1]=F[z][1]):(g[z][0]=Number.MAX_SAFE_INTEGER,g[z][1]=0);g.sort(rb);const O=M.morphAttributes.position,k=M.morphAttributes.normal;let L=0;for(let z=0;z<8;z++){const W=g[z],ne=W[0],fe=W[1];ne!==Number.MAX_SAFE_INTEGER&&fe?(O&&M.getAttribute("morphTarget"+z)!==O[ne]&&M.setAttribute("morphTarget"+z,O[ne]),k&&M.getAttribute("morphNormal"+z)!==k[ne]&&M.setAttribute("morphNormal"+z,k[ne]),s[z]=fe,L+=fe):(O&&!0===M.hasAttribute("morphTarget"+z)&&M.deleteAttribute("morphTarget"+z),k&&!0===M.hasAttribute("morphNormal"+z)&&M.deleteAttribute("morphNormal"+z),s[z]=0)}const V=M.morphTargetsRelative?1:1-L;C.getUniforms().setValue(f,"morphTargetBaseInfluence",V),C.getUniforms().setValue(f,"morphTargetInfluences",s)}}}}function b(f,e,t,r){let s=new WeakMap;function g(_){const x=_.target;x.removeEventListener("dispose",g),t.remove(x.instanceMatrix),null!==x.instanceColor&&t.remove(x.instanceColor)}return{update:function l(_){const x=r.render.frame,C=e.get(_,_.geometry);return s.get(C)!==x&&(e.update(C),s.set(C,x)),_.isInstancedMesh&&(!1===_.hasEventListener("dispose",g)&&_.addEventListener("dispose",g),t.update(_.instanceMatrix,34962),null!==_.instanceColor&&t.update(_.instanceColor,34962)),C},dispose:function u(){s=new WeakMap}}}const n=new ws,o=new yh,m=new Wp,A=new Uc,E=[],w=[],T=new Float32Array(16),B=new Float32Array(9),D=new Float32Array(4);function N(f,e,t){const r=f[0];if(r<=0||r>0)return f;const s=e*t;let l=E[s];if(void 0===l&&(l=new Float32Array(s),E[s]=l),0!==e){r.toArray(l,0);for(let u=1,g=0;u!==e;++u)g+=t,f[u].toArray(l,g)}return l}function G(f,e){if(f.length!==e.length)return!1;for(let t=0,r=f.length;t<r;t++)if(f[t]!==e[t])return!1;return!0}function H(f,e){for(let t=0,r=e.length;t<r;t++)f[t]=e[t]}function Q(f,e){let t=w[e];void 0===t&&(t=new Int32Array(e),w[e]=t);for(let r=0;r!==e;++r)t[r]=f.allocateTextureUnit();return t}function Z(f,e){const t=this.cache;t[0]!==e&&(f.uniform1f(this.addr,e),t[0]=e)}function he(f,e){const t=this.cache;
vendor: 6,332 bytes, line 72
72if(void 0!==e.x)(t[0]!==e.x||t[1]!==e.y)&&(f.uniform2f(this.addr,e.x,e.y),t[0]=e.x,t[1]=e.y);else{if(G(t,e))return;f.uniform2fv(this.addr,e),H(t,e)}}function J(f,e){const t=this.cache;if(void 0!==e.x)(t[0]!==e.x||t[1]!==e.y||t[2]!==e.z)&&(f.uniform3f(this.addr,e.x,e.y,e.z),t[0]=e.x,t[1]=e.y,t[2]=e.z);else if(void 0!==e.r)(t[0]!==e.r||t[1]!==e.g||t[2]!==e.b)&&(f.uniform3f(this.addr,e.r,e.g,e.b),t[0]=e.r,t[1]=e.g,t[2]=e.b);else{if(G(t,e))return;f.uniform3fv(this.addr,e),H(t,e)}}function Y(f,e){const t=this.cache;if(void 0!==e.x)(t[0]!==e.x||t[1]!==e.y||t[2]!==e.z||t[3]!==e.w)&&(f.uniform4f(this.addr,e.x,e.y,e.z,e.w),t[0]=e.x,t[1]=e.y,t[2]=e.z,t[3]=e.w);else{if(G(t,e))return;f.uniform4fv(this.addr,e),H(t,e)}}function ve(f,e){const t=this.cache,r=e.elements;if(void 0===r){if(G(t,e))return;f.uniformMatrix2fv(this.addr,!1,e),H(t,e)}else{if(G(t,r))return;D.set(r),f.uniformMatrix2fv(this.addr,!1,D),H(t,r)}}function pe(f,e){const t=this.cache,r=e.elements;if(void 0===r){if(G(t,e))return;f.uniformMatrix3fv(this.addr,!1,e),H(t,e)}else{if(G(t,r))return;B.set(r),f.uniformMatrix3fv(this.addr,!1,B),H(t,r)}}function Ae(f,e){const t=this.cache,r=e.elements;if(void 0===r){if(G(t,e))return;f.uniformMatrix4fv(this.addr,!1,e),H(t,e)}else{if(G(t,r))return;T.set(r),f.uniformMatrix4fv(this.addr,!1,T),H(t,r)}}function Ie(f,e){const t=this.cache;t[0]!==e&&(f.uniform1i(this.addr,e),t[0]=e)}function Ne(f,e){const t=this.cache;if(void 0!==e.x)(t[0]!==e.x||t[1]!==e.y)&&(f.uniform2i(this.addr,e.x,e.y),t[0]=e.x,t[1]=e.y);else{if(G(t,e))return;f.uniform2iv(this.addr,e),H(t,e)}}function Xe(f,e){const t=this.cache;if(void 0!==e.x)(t[0]!==e.x||t[1]!==e.y||t[2]!==e.z)&&(f.uniform3i(this.addr,e.x,e.y,e.z),t[0]=e.x,t[1]=e.y,t[2]=e.z);else{if(G(t,e))return;f.uniform3iv(this.addr,e),H(t,e)}}function Qe(f,e){const t=this.cache;if(void 0!==e.x)(t[0]!==e.x||t[1]!==e.y||t[2]!==e.z||t[3]!==e.w)&&(f.uniform4i(this.addr,e.x,e.y,e.z,e.w),t[0]=e.x,t[1]=e.y,t[2]=e.z,t[3]=e.w);else{if(G(t,e))return;f.uniform4iv(this.addr,e),H(t,e)}}function Se(f,e){const t=this.cache;t[0]!==e&&(f.uniform1ui(this.addr,e),t[0]=e)}function Le(f,e){const t=this.cache;if(void 0!==e.x)(t[0]!==e.x||t[1]!==e.y)&&(f.uniform2ui(this.addr,e.x,e.y),t[0]=e.x,t[1]=e.y);else{if(G(t,e))return;f.uniform2uiv(this.addr,e),H(t,e)}}function vt(f,e){const t=this.cache;if(void 0!==e.x)(t[0]!==e.x||t[1]!==e.y||t[2]!==e.z)&&(f.uniform3ui(this.addr,e.x,e.y,e.z),t[0]=e.x,t[1]=e.y,t[2]=e.z);else{if(G(t,e))return;f.uniform3uiv(this.addr,e),H(t,e)}}function Pt(f,e){const t=this.cache;if(void 0!==e.x)(t[0]!==e.x||t[1]!==e.y||t[2]!==e.z||t[3]!==e.w)&&(f.uniform4ui(this.addr,e.x,e.y,e.z,e.w),t[0]=e.x,t[1]=e.y,t[2]=e.z,t[3]=e.w);else{if(G(t,e))return;f.uniform4uiv(this.addr,e),H(t,e)}}function ot(f,e,t){const r=this.cache,s=t.allocateTextureUnit();r[0]!==s&&(f.uniform1i(this.addr,s),r[0]=s),t.setTexture2D(e||n,s)}function dt(f,e,t){const r=this.cache,s=t.allocateTextureUnit();r[0]!==s&&(f.uniform1i(this.addr,s),r[0]=s),t.setTexture3D(e||m,s)}function Et(f,e,t){const r=this.cache,s=t.allocateTextureUnit();r[0]!==s&&(f.uniform1i(this.addr,s),r[0]=s),t.setTextureCube(e||A,s)}function tn(f,e,t){const r=this.cache,s=t.allocateTextureUnit();r[0]!==s&&(f.uniform1i(this.addr,s),r[0]=s),t.setTexture2DArray(e||o,s)}function Ht(f,e){f.uniform1fv(this.addr,e)}function nn(f,e){const t=N(e,this.size,2);f.uniform2fv(this.addr,t)}function dn(f,e){const t=N(e,this.size,3);f.uniform3fv(this.addr,t)}function Yn(f,e){const t=N(e,this.size,4);f.uniform4fv(this.addr,t)}function In(f,e){const t=N(e,this.size,4);f.uniformMatrix2fv(this.addr,!1,t)}function wt(f,e){const t=N(e,this.size,9);f.uniformMatrix3fv(this.addr,!1,t)}function Zt(f,e){const t=N(e,this.size,16);f.uniformMatrix4fv(this.addr,!1,t)}function En(f,e){f.uniform1iv(this.addr,e)}function Bn(f,e){f.uniform2iv(this.addr,e)}function $e(f,e){f.uniform3iv(this.addr,e)}function Ei(f,e){f.uniform4iv(this.addr,e)}function fi(f,e){f.uniform1uiv(this.addr,e)}function mn(f,e){f.uniform2uiv(this.addr,e)}function jn(f,e){f.uniform3uiv(this.addr,e)}function Jt(f,e){f.uniform4uiv(this.addr,e)}function kt(f,e,t){const r=this.cache,s=e.length,l=Q(t,s);G(r,l)||(f.uniform1iv(this.addr,l),H(r,l));for(let u=0;u!==s;++u)t.setTexture2D(e[u]||n,l[u])}function en(f,e,t){const r=this.cache,s=e.length,l=Q(t,s);G(r,l)||(f.uniform1iv(this.addr,l),H(r,l));for(let u=0;u!==s;++u)t.setTexture3D(e[u]||m,l[u])}function Wn(f,e,t){const r=this.cache,s=e.length,l=Q(t,s);G(r,l)||(f.uniform1iv(this.addr,l),H(r,l));for(let u=0;u!==s;++u)t.setTextureCube(e[u]||A,l[u])}function bn(f,e,t){const r=this.cache,s=e.length,l=Q(t,s);G(r,l)||(f.uniform1iv(this.addr,l),H(r,l));for(let u=0;u!==s;++u)t.setTexture2DArray(e[u]||o,l[u])}class pi{constructor(e,t,r){this.id=e,this.addr=r,this.cache=[],this.setValue=function cn(f){switch(f){case 5126:return Z;case 35664:return he;case 35665:return J;case 35666:return Y;case 35674:return ve;case 35675:return pe;case 35676:return Ae;case 5124:case 35670:return Ie;case 35667:case 35671:return Ne;case 35668:case 35672:return Xe;case 35669:case 35673:return Qe;case 5125:return Se;case 36294:return Le;case 36295:return vt;case 36296:return Pt;case 35678:case 36198:case 36298:case 36306:case 35682:return ot;case 35679:case 36299:case 36307:return dt;case 35680:case 36300:case 36308:case 36293:return Et;case 36289:case 36303:case 36311:case 36292:return tn}}(t.type)}}class ai{constructor(e,t,r){this.id=e,this.addr=r,this.cache=[],this.size=t.size,this.setValue=function di(f){switch(f){case 5126:return Ht;case 35664:return nn;case 35665:return dn;case 35666:return Yn;case 35674:return In;case 35675:return wt;case 35676:return Zt;case 5124:case 35670:return En;case 35667:case 35671:return Bn;case 35668:case 35672:return $e;case 35669:case 35673:return Ei;case 5125:return fi;case 36294:return mn;case 36295:return jn;case 36296:return Jt;case 35678:case 36198:case 36298:case 36306:case 35682:return kt;case 35679:case 36299:case 36307:return en;case 35680:case 36300:case 36308:case 36293:return Wn;case 36289:case 36303:case 36311:case 36292:return bn}}(t.type)}}class Gi{constructor(e){this.id=e,this.seq=[],this.map={}}setValue(e,t,r){const s=this.seq;for(let l=0,u=s.length;l!==u;++l){const g=s[l];g.setValue(e,t[g.id],r)}}}const nr=/(\w+)(\])?(\[|\.)?/g;function Ue(f,e){f.seq.push(e),f.map[e.id]=e}
vendor: 11,788 bytes, line 72
72function Te(f,e,t){const r=f.name,s=r.length;for(nr.lastIndex=0;;){const l=nr.exec(r);let g=l[1];const x=l[3];if("]"===l[2]&&(g|=0),void 0===x||"["===x&&nr.lastIndex+2===s){Ue(t,void 0===x?new pi(g,f,e):new ai(g,f,e));break}{let C=t.map[g];void 0===C&&(C=new Gi(g),Ue(t,C)),t=C}}}class yt{constructor(e,t){this.seq=[],this.map={};const r=e.getProgramParameter(t,35718);for(let s=0;s<r;++s){const l=e.getActiveUniform(t,s);Te(l,e.getUniformLocation(t,l.name),this)}}setValue(e,t,r,s){const l=this.map[t];void 0!==l&&l.setValue(e,r,s)}setOptional(e,t,r){const s=t[r];void 0!==s&&this.setValue(e,r,s)}static upload(e,t,r,s){for(let l=0,u=t.length;l!==u;++l){const g=t[l],_=r[g.id];!1!==_.needsUpdate&&g.setValue(e,_.value,s)}}static seqWithValue(e,t){const r=[];for(let s=0,l=e.length;s!==l;++s){const u=e[s];u.id in t&&r.push(u)}return r}}function an(f,e,t){const r=f.createShader(e);return f.shaderSource(r,t),f.compileShader(r),r}let un=0;function Gn(f,e,t){const r=f.getShaderParameter(e,35713),s=f.getShaderInfoLog(e).trim();if(r&&""===s)return"";const l=/ERROR: 0:(\d+)/.exec(s);if(l){const u=parseInt(l[1]);return t.toUpperCase()+"\n\n"+s+"\n\n"+function wn(f,e){const t=f.split("\n"),r=[],s=Math.max(e-6,0),l=Math.min(e+6,t.length);for(let u=s;u<l;u++){const g=u+1;r.push(`${g===e?">":" "} ${g}: ${t[u]}`)}return r.join("\n")}(f.getShaderSource(e),u)}return s}function Bt(f,e){const t=function yi(f){switch(f){case zo:return["Linear","( value )"];case Ui:return["sRGB","( value )"];default:return console.warn("THREE.WebGLProgram: Unsupported encoding:",f),["Linear","( value )"]}}(e);return"vec4 "+f+"( vec4 value ) { return LinearTo"+t[0]+t[1]+"; }"}function Kn(f,e){let t;switch(e){case M1:t="Linear";break;case dM:t="Reinhard";break;case pM:t="OptimizedCineon";break;case w1:t="ACESFilmic";break;case mM:t="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",e),t="Linear"}return"vec3 "+f+"( vec3 color ) { return "+t+"ToneMapping( color ); }"}function $n(f){return""!==f}function ji(f,e){const t=e.numSpotLightShadows+e.numSpotLightMaps-e.numSpotLightShadowsWithMaps;return f.replace(/NUM_DIR_LIGHTS/g,e.numDirLights).replace(/NUM_SPOT_LIGHTS/g,e.numSpotLights).replace(/NUM_SPOT_LIGHT_MAPS/g,e.numSpotLightMaps).replace(/NUM_SPOT_LIGHT_COORDS/g,t).replace(/NUM_RECT_AREA_LIGHTS/g,e.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g,e.numPointLights).replace(/NUM_HEMI_LIGHTS/g,e.numHemiLights).replace(/NUM_DIR_LIGHT_SHADOWS/g,e.numDirLightShadows).replace(/NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS/g,e.numSpotLightShadowsWithMaps).replace(/NUM_SPOT_LIGHT_SHADOWS/g,e.numSpotLightShadows).replace(/NUM_POINT_LIGHT_SHADOWS/g,e.numPointLightShadows)}function _r(f,e){return f.replace(/NUM_CLIPPING_PLANES/g,e.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,e.numClippingPlanes-e.numClipIntersection)}const ls=/^[ \t]*#include +<([\w\d./]+)>/gm;function Ke(f){return f.replace(ls,It)}function It(f,e){const t=Pi[e];if(void 0===t)throw new Error("Can not resolve #include <"+e+">");return Ke(t)}const hn=/#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;function Ln(f){return f.replace(hn,ti)}function ti(f,e,t,r){let s="";for(let l=parseInt(e);l<parseInt(t);l++)s+=r.replace(/\[\s*i\s*\]/g,"[ "+l+" ]").replace(/UNROLLED_LOOP_INDEX/g,l);return s}function Br(f){let e="precision "+f.precision+" float;\nprecision "+f.precision+" int;";return"highp"===f.precision?e+="\n#define HIGH_PRECISION":"mediump"===f.precision?e+="\n#define MEDIUM_PRECISION":"lowp"===f.precision&&(e+="\n#define LOW_PRECISION"),e}function Sl(f,e,t,r){const s=f.getContext(),l=t.defines;let u=t.vertexShader,g=t.fragmentShader;const _=function Xr(f){let e="SHADOWMAP_TYPE_BASIC";return f.shadowMapType===b_?e="SHADOWMAP_TYPE_PCF":f.shadowMapType===v1?e="SHADOWMAP_TYPE_PCF_SOFT":f.shadowMapType===$f&&(e="SHADOWMAP_TYPE_VSM"),e}(t),x=function ca(f){let e="ENVMAP_TYPE_CUBE";if(f.envMap)switch(f.envMapMode){case Iu:case bi:e="ENVMAP_TYPE_CUBE";break;case wc:e="ENVMAP_TYPE_CUBE_UV"}return e}(t),M=function Gc(f){let e="ENVMAP_MODE_REFLECTION";return f.envMap&&f.envMapMode===bi&&(e="ENVMAP_MODE_REFRACTION"),e}(t),C=function cs(f){let e="ENVMAP_BLENDING_NONE";if(f.envMap)switch(f.combine){case Fg:e="ENVMAP_BLENDING_MULTIPLY";break;case uM:e="ENVMAP_BLENDING_MIX";break;case fM:e="ENVMAP_BLENDING_ADD"}return e}(t),P=function Io(f){const e=f.envMapCubeUVHeight;if(null===e)return null;const t=Math.log2(e)-2,r=1/e;return{texelWidth:1/(3*Math.max(Math.pow(2,t),112)),texelHeight:r,maxMip:t}}(t),R=t.isWebGL2?"":function oi(f){return[f.extensionDerivatives||f.envMapCubeUVHeight||f.bumpMap||f.normalMapTangentSpace||f.clearcoatNormalMap||f.flatShading||"physical"===f.shaderID?"#extension GL_OES_standard_derivatives : enable":"",(f.extensionFragDepth||f.logarithmicDepthBuffer)&&f.rendererExtensionFragDepth?"#extension GL_EXT_frag_depth : enable":"",f.extensionDrawBuffers&&f.rendererExtensionDrawBuffers?"#extension GL_EXT_draw_buffers : require":"",(f.extensionShaderTextureLOD||f.envMap||f.transmission)&&f.rendererExtensionShaderTextureLod?"#extension GL_EXT_shader_texture_lod : enable":""].filter($n).join("\n")}(t),F=function mi(f){const e=[];for(const t in f){const r=f[t];!1!==r&&e.push("#define "+t+" "+r)}return e.join("\n")}(l),O=s.createProgram();let k,L,V=t.glslVersion?"#version "+t.glslVersion+"\n":"";t.isRawShaderMaterial?(k=[F].filter($n).join("\n"),k.length>0&&(k+="\n"),L=[R,F].filter($n).join("\n"),L.length>0&&(L+="\n")):(k=[Br(t),"#define SHADER_NAME "+t.shaderName,F,t.instancing?"#define USE_INSTANCING":"",t.instancingColor?"#define USE_INSTANCING_COLOR":"",t.useFog&&t.fog?"#define USE_FOG":"",t.useFog&&t.fogExp2?"#define FOG_EXP2":"",t.map?"#define USE_MAP":"",t.envMap?"#define USE_ENVMAP":"",t.envMap?"#define "+M:"",t.lightMap?"#define USE_LIGHTMAP":"",t.aoMap?"#define USE_AOMAP":"",t.bumpMap?"#define USE_BUMPMAP":"",t.normalMap?"#define USE_NORMALMAP":"",t.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",t.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",t.displacementMap?"#define USE_DISPLACEMENTMAP":"",t.emissiveMap?"#define USE_EMISSIVEMAP":"",t.clearcoatMap?"#define USE_CLEARCOATMAP":"",t.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",t.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",t.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",t.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",t.specularMap?"#define USE_SPECULARMAP":"",t.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",t.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",t.roughnessMap?"#define USE_ROUGHNESSMAP":"",t.metalnessMap?"#define USE_METALNESSMAP":"",t.alphaMap?"#define USE_ALPHAMAP":"",t.transmission?"#define USE_TRANSMISSION":"",t.transmissionMap?"#define USE_TRANSMISSIONMAP":"",t.thicknessMap?"#define USE_THICKNESSMAP":"",t.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",t.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",t.mapUv?"#define MAP_UV "+t.mapUv:"",t.alphaMapUv?"#define ALPHAMAP_UV "+t.alphaMapUv:"",t.lightMapUv?"#define LIGHTMAP_UV "+t.lightMapUv:"",t.aoMapUv?"#define AOMAP_UV "+t.aoMapUv:"",t.emissiveMapUv?"#define EMISSIVEMAP_UV "+t.emissiveMapUv:"",t.bumpMapUv?"#define BUMPMAP_UV "+t.bumpMapUv:"",t.normalMapUv?"#define NORMALMAP_UV "+t.normalMapUv:"",t.displacementMapUv?"#define DISPLACEMENTMAP_UV "+t.displacementMapUv:"",t.metalnessMapUv?"#define METALNESSMAP_UV "+t.metalnessMapUv:"",t.roughnessMapUv?"#define ROUGHNESSMAP_UV "+t.roughnessMapUv:"",t.clearcoatMapUv?"#define CLEARCOATMAP_UV "+t.clearcoatMapUv:"",t.clearcoatNormalMapUv?"#define CLEARCOAT_NORMALMAP_UV "+t.clearcoatNormalMapUv:"",t.clearcoatRoughnessMapUv?"#define CLEARCOAT_ROUGHNESSMAP_UV "+t.clearcoatRoughnessMapUv:"",t.iridescenceMapUv?"#define IRIDESCENCEMAP_UV "+t.iridescenceMapUv:"",t.iridescenceThicknessMapUv?"#define IRIDESCENCE_THICKNESSMAP_UV "+t.iridescenceThicknessMapUv:"",t.sheenColorMapUv?"#define SHEEN_COLORMAP_UV "+t.sheenColorMapUv:"",t.sheenRoughnessMapUv?"#define SHEEN_ROUGHNESSMAP_UV "+t.sheenRoughnessMapUv:"",t.specularMapUv?"#define SPECULARMAP_UV "+t.specularMapUv:"",t.specularColorMapUv?"#define SPECULAR_COLORMAP_UV "+t.specularColorMapUv:"",t.specularIntensityMapUv?"#define SPECULAR_INTENSITYMAP_UV "+t.specularIntensityMapUv:"",t.transmissionMapUv?"#define TRANSMISSIONMAP_UV "+t.transmissionMapUv:"",t.thicknessMapUv?"#define THICKNESSMAP_UV "+t.thicknessMapUv:"",t.vertexTangents?"#define USE_TANGENT":"",t.vertexColors?"#define USE_COLOR":"",t.vertexAlphas?"#define USE_COLOR_ALPHA":"",t.vertexUvs2?"#define USE_UV2":"",t.pointsUvs?"#define USE_POINTS_UV":"",t.flatShading?"#define FLAT_SHADED":"",t.skinning?"#define USE_SKINNING":"",t.morphTargets?"#define USE_MORPHTARGETS":"",t.morphNormals&&!1===t.flatShading?"#define USE_MORPHNORMALS":"",t.morphColors&&t.isWebGL2?"#define USE_MORPHCOLORS":"",t.morphTargetsCount>0&&t.isWebGL2?"#define MORPHTARGETS_TEXTURE":"",t.morphTargetsCount>0&&t.isWebGL2?"#define MORPHTARGETS_TEXTURE_STRIDE "+t.morphTextureStride:"",t.morphTargetsCount>0&&t.isWebGL2?"#define MORPHTARGETS_COUNT "+t.morphTargetsCount:"",t.doubleSided?"#define DOUBLE_SIDED":"",t.flipSided?"#define FLIP_SIDED":"",t.shadowMapEnabled?"#define USE_SHADOWMAP":"",t.shadowMapEnabled?"#define "+_:"",t.sizeAttenuation?"#define USE_SIZEATTENUATION":"",t.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",t.logarithmicDepthBuffer&&t.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING","\tattribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR","\tattribute vec3 instanceColor;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_TANGENT","\tattribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )","\tattribute vec4 color;","#elif defined( USE_COLOR )","\tattribute vec3 color;","#endif","#if ( defined( USE_MORPHTARGETS ) && ! defined( MORPHTARGETS_TEXTURE ) )","\tattribute vec3 morphTarget0;","\tattribute vec3 morphTarget1;","\tattribute vec3 morphTarget2;","\tattribute vec3 morphTarget3;","\t#ifdef USE_MORPHNORMALS","\t\tattribute vec3 morphNormal0;","\t\tattribute vec3 morphNormal1;","\t\tattribute vec3 morphNormal2;","\t\tattribute vec3 morphNormal3;","\t#else","\t\tattribute vec3 morphTarget4;","\t\tattribute vec3 morphTarget5;","\t\tattribute vec3 morphTarget6;","\t\tattribute vec3 morphTarget7;","\t#endif","#endif","#ifdef USE_SKINNING","\tattribute vec4 skinIndex;","\tattribute vec4 skinWeight;","#endif","\n"].filter($n).join("\n"),L=[R,Br(t),"#define SHADER_NAME "+t.shaderName,F,t.useFog&&t.fog?"#define USE_FOG":"",t.useFog&&t.fogExp2?"#define FOG_EXP2":"",t.map?"#define USE_MAP":"",t.matcap?"#define USE_MATCAP":"",t.envMap?"#define USE_ENVMAP":"",t.envMap?"#define "+x:"",t.envMap?"#define "+M:"",t.envMap?"#define "+C:"",P?"#define CUBEUV_TEXEL_WIDTH "+P.texelWidth:"",P?"#define CUBEUV_TEXEL_HEIGHT "+P.texelHeight:"",P?"#define CUBEUV_MAX_MIP "+P.maxMip+".0":"",t.lightMap?"#define USE_LIGHTMAP":"",t.aoMap?"#define USE_AOMAP":"",t.bumpMap?"#define USE_BUMPMAP":"",t.normalMap?"#define USE_NORMALMAP":"",t.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",t.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",t.emissiveMap?"#define USE_EMISSIVEMAP":"",t.clearcoat?"#define USE_CLEARCOAT":"",t.clearcoatMap?"#define USE_CLEARCOATMAP":"",t.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",t.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",t.iridescence?"#define USE_IR
72IDESCENCE":"",t.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",t.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",t.specularMap?"#define USE_SPECULARMAP":"",t.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",t.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",t.roughnessMap?"#define USE_ROUGHNESSMAP":"",t.metalnessMap?"#define USE_METALNESSMAP":"",t.alphaMap?"#define USE_ALPHAMAP":"",t.alphaTest?"#define USE_ALPHATEST":"",t.sheen?"#define USE_SHEEN":"",t.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",t.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",t.transmission?"#define USE_TRANSMISSION":"",t.transmissionMap?"#define USE_TRANSMISSIONMAP":"",t.thicknessMap?"#define USE_THICKNESSMAP":"",t.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",t.vertexTangents?"#define USE_TANGENT":"",t.vertexColors||t.instancingColor?"#define USE_COLOR":"",t.vertexAlphas?"#define USE_COLOR_ALPHA":"",t.vertexUvs2?"#define USE_UV2":"",t.pointsUvs?"#define USE_POINTS_UV":"",t.gradientMap?"#define USE_GRADIENTMAP":"",t.flatShading?"#define FLAT_SHADED":"",t.doubleSided?"#define DOUBLE_SIDED":"",t.flipSided?"#define FLIP_SIDED":"",t.shadowMapEnabled?"#define USE_SHADOWMAP":"",t.shadowMapEnabled?"#define "+_:"",t.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",t.useLegacyLights?"#define LEGACY_LIGHTS":"",t.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",t.logarithmicDepthBuffer&&t.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",t.toneMapping!==Mc?"#define TONE_MAPPING":"",t.toneMapping!==Mc?Pi.tonemapping_pars_fragment:"",t.toneMapping!==Mc?Kn("toneMapping",t.toneMapping):"",t.dithering?"#define DITHERING":"",t.opaque?"#define OPAQUE":"",Pi.encodings_pars_fragment,Bt("linearToOutputTexel",t.outputEncoding),t.useDepthPacking?"#define DEPTH_PACKING "+t.depthPacking:"","\n"].filter($n).join("\n")),u=Ke(u),u=ji(u,t),u=_r(u,t),g=Ke(g),g=ji(g,t),g=_r(g,t),u=Ln(u),g=Ln(g),t.isWebGL2&&!0!==t.isRawShaderMaterial&&(V="#version 300 es\n",k=["precision mediump sampler2DArray;","#define attribute in","#define varying out","#define texture2D texture"].join("\n")+"\n"+k,L=["#define varying in",t.glslVersion===iv?"":"layout(location = 0) out highp vec4 pc_fragColor;",t.glslVersion===iv?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth","#define texture2D texture","#define textureCube texture","#define texture2DProj textureProj","#define texture2DLodEXT textureLod","#define texture2DProjLodEXT textureProjLod","#define textureCubeLodEXT textureLod","#define texture2DGradEXT textureGrad","#define texture2DProjGradEXT textureProjGrad","#define textureCubeGradEXT textureGrad"].join("\n")+"\n"+L);const W=V+L+g,ne=an(s,35633,V+k+u),fe=an(s,35632,W);if(s.attachShader(O,ne),s.attachShader(O,fe),void 0!==t.index0AttributeName?s.bindAttribLocation(O,0,t.index0AttributeName):!0===t.morphTargets&&s.bindAttribLocation(O,0,"position"),s.linkProgram(O),f.debug.checkShaderErrors){const ie=s.getProgramInfoLog(O).trim(),ye=s.getShaderInfoLog(ne).trim(),He=s.getShaderInfoLog(fe).trim();let qe=!0,Ge=!0;if(!1===s.getProgramParameter(O,35714))if(qe=!1,"function"==typeof f.debug.onShaderError)f.debug.onShaderError(s,O,ne,fe);else{const Ve=Gn(s,ne,"vertex"),We=Gn(s,fe,"fragment");console.error("THREE.WebGLProgram: Shader Error "+s.getError()+" - VALIDATE_STATUS "+s.getProgramParameter(O,35715)+"\n\nProgram Info Log: "+ie+"\n"+Ve+"\n"+We)}else""!==ie?console.warn("THREE.WebGLProgram: Program Info Log:",ie):(""===ye||""===He)&&(Ge=!1);Ge&&(this.diagnostics={runnable:qe,programLog:ie,vertexShader:{log:ye,prefix:k},fragmentShader:{log:He,prefix:L}})}let ge,de;return s.deleteShader(ne),s.deleteShader(fe),this.getUniforms=function(){return void 0===ge&&(ge=new yt(s,O)),ge},this.getAttributes=function(){return void 0===de&&(de=function Xn(f,e){const t={},r=f.getProgramParameter(e,35721);for(let s=0;s<r;s++){const l=f.getActiveAttrib(e,s),u=l.name;let g=1;35674===l.type&&(g=2),35675===l.type&&(g=3),35676===l.type&&(g=4),t[u]={type:l.type,location:f.getAttribLocation(e,u),locationSize:g}}return t}(s,O)),de},this.destroy=function(){r.releaseStatesOfProgram(this),s.deleteProgram(O),this.program=void 0},this.name=t.shaderName,this.id=un++,this.cacheKey=e,this.usedTimes=1,this.program=O,this.vertexShader=ne,this.fragmentShader=fe,this}let hm=0;class uy{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(e){const r=e.fragmentShader,s=this._getShaderStage(e.vertexShader),l=this._getShaderStage(r),u=this._getShaderCacheForMaterial(e);return!1===u.has(s)&&(u.add(s),s.usedTimes++),!1===u.has(l)&&(u.add(l),l.usedTimes++),this}remove(e){const t=this.materialCache.get(e);for(const r of t)r.usedTimes--,0===r.usedTimes&&this.shaderCache.delete(r.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 r=t.get(e);return void 0===r&&(r=new Set,t.set(e,r)),r}_getShaderStage(e){const t=this.shaderCache;let r=t.get(e);return void 0===r&&(r=new lb(e),t.set(e,r)),r}}class lb{constructor(e){this.id=hm++,this.code=e,this.usedTimes=0}}function cb(f,e,t,r,s,l,u){const g=new Zp,_=new uy,x=[],M=s.isWebG
72L2,C=s.logarithmicDepthBuffer,P=s.vertexTextures;let R=s.precision;const F={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"};function O(ie){return 1===ie?"uv2":"uv"}return{getParameters:function k(ie,ye,He,qe,Ge){const Ve=qe.fog,We=Ge.geometry,et=(ie.isMeshStandardMaterial?t:e).get(ie.envMap||(ie.isMeshStandardMaterial?qe.environment:null)),tt=et&&et.mapping===wc?et.image.height:null,gt=F[ie.type];null!==ie.precision&&(R=s.getMaxPrecision(ie.precision),R!==ie.precision&&console.warn("THREE.WebGLProgram.getParameters:",ie.precision,"not supported, using",R,"instead."));const bt=We.morphAttributes.position||We.morphAttributes.normal||We.morphAttributes.color,jt=void 0!==bt?bt.length:0;let ct,At,Ut,Vt,Qt=0;if(void 0!==We.morphAttributes.position&&(Qt=1),void 0!==We.morphAttributes.normal&&(Qt=2),void 0!==We.morphAttributes.color&&(Qt=3),gt){const kn=bl[gt];ct=kn.vertexShader,At=kn.fragmentShader}else ct=ie.vertexShader,At=ie.fragmentShader,_.update(ie),Ut=_.getVertexShaderID(ie),Vt=_.getFragmentShaderID(ie);
72const ut=f.getRenderTarget(),Nn=!0===Ge.isInstancedMesh,ni=!!ie.map,Vn=!!et,$t=!!ie.aoMap,Lt=!!ie.lightMap,Xt=!!ie.bumpMap,Qn=!!ie.normalMap,Sn=!!ie.displacementMap,gi=!!ie.emissiveMap,Ai=!!ie.metalnessMap,ci=!!ie.roughnessMap,Hi=ie.clearcoat>0,cr=ie.iridescence>0,ze=ie.sheen>0,Ce=ie.transmission>0,xt=Hi&&!!ie.clearcoatMap,rn=Hi&&!!ie.clearcoatNormalMap,fn=Hi&&!!ie.clearcoatRoughnessMap,Cn=cr&&!!ie.iridescenceMap,_i=cr&&!!ie.iridescenceThicknessMap,On=ze&&!!ie.sheenColorMap,Dt=ze&&!!ie.sheenRoughnessMap,Zn=!!ie.specularMap,hi=!!ie.specularColorMap,si=!!ie.specularIntensityMap,xn=Ce&&!!ie.transmissionMap,ei=Ce&&!!ie.thicknessMap,Ni=!!ie.alphaMap,je=!!ie.extensions,Ze=!!We.attributes.uv2;return{isWebGL2:M,shaderID:gt,shaderName:ie.type,vertexShader:ct,fragmentShader:At,defines:ie.defines,customVertexShaderID:Ut,customFragmentShaderID:Vt,isRawShaderMaterial:!0===ie.isRawShaderMaterial,glslVersion:ie.glslVersion,precision:R,instancing:Nn,instancingColor:Nn&&null!==Ge.instanceColor,supportsVertexTextures:P,outputEncoding:null===ut?f.outputEncoding:!0===ut.isXRRenderTarget?ut.texture.encoding:zo,map:ni,matcap:!!ie.matcap,envMap:Vn,envMapMode:Vn&&et.mapping,envMapCubeUVHeight:tt,aoMap:$t,lightMap:Lt,bumpMap:Xt,normalMap:Qn,displacementMap:P&&Sn,emissiveMap:gi,normalMapObjectSpace:Qn&&1===ie.normalMapType,normalMapTangentSpace:Qn&&0===ie.normalMapType,decodeVideoTexture:ni&&!0===ie.map.isVideoTexture&&ie.map.encoding===Ui,metalnessMap:Ai,roughnessMap:ci,clearcoat:Hi,clearcoatMap:xt,clearcoatNormalMap:rn,clearcoatRoughnessMap:fn,iridescence:cr,iridescenceMap:Cn,iridescenceThicknessMap:_i,sheen:ze,sheenColorMap:On,sheenRoughnessMap:Dt,specularMap:Zn,specularColorMap:hi,specularIntensityMap:si,transmission:Ce,transmissionMap:xn,thicknessMap:ei,gradientMap:!!ie.gradientMap,opaque:!1===ie.transparent&&1===ie.blending,alphaMap:Ni,alphaTest:ie.alphaTest>0,combine:ie.combine,mapUv:ni&&O(ie.map.channel),aoMapUv:$t&&O(ie.aoMap.channel),lightMapUv:Lt&&O(ie.lightMap.channel),bumpMapUv:Xt&&O(ie.bumpMap.channel),normalMapUv:Qn&&O(ie.normalMap.channel),displacementMapUv:Sn&&O(ie.displacementMap.channel),emissiveMapUv:gi&&O(ie.emissiveMap.channel),metalnessMapUv:Ai&&O(ie.metalnessMap.channel),roughnessMapUv:ci&&O(ie.roughnessMap.channel),clearcoatMapUv:xt&&O(ie.clearcoatMap.channel),clearcoatNormalMapUv:rn&&O(ie.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:fn&&O(ie.clearcoatRoughnessMap.channel),iridescenceMapUv:Cn&&O(ie.iridescenceMap.channel),iridescenceThicknessMapUv:_i&&O(ie.iridescenceThicknessMap.channel),sheenColorMapUv:On&&O(ie.sheenColorMap.channel),sheenRoughnessMapUv:Dt&&O(ie.sheenRoughnessMap.channel),specularMapUv:Zn&&O(ie.specularMap.channel),specularColorMapUv:hi&&O(ie.specularColorMap.channel),specularIntensityMapUv:si&&O(ie.specularIntensityMap.channel),transmissionMapUv:xn&&O(ie.transmissionMap.channel),thicknessMapUv:ei&&O(ie.thicknessMap.channel),alphaMapUv:Ni&&O(ie.alphaMap.channel),vertexTangents:Qn&&!!We.attributes.tangent,vertexColors:ie.vertexColors,vertexAlphas:!0===ie.vertexColors&&!!We.attributes.color&&4===We.attributes.color.itemSize,vertexUvs2:Ze,pointsUvs:!0===Ge.isPoints&&!!We.attributes.uv&&(ni||Ni),fog:!!Ve,useFog:!0===ie.fog,fogExp2:Ve&&Ve.isFogExp2,flatShading:!0===ie.flatShading,sizeAttenuation:!0===ie.sizeAttenuation,logarithmicDepthBuffer:C,skinning:!0===Ge.isSkinnedMesh,morphTargets:void 0!==We.morphAttributes.position,morphNormals:void 0!==We.morphAttributes.normal,morphColors:void 0!==We.morphAttributes.color,morphTargetsCount:jt,morphTextureStride:Qt,numDirLights:ye.directional.length,numPointLights:ye.point.length,numSpotLights:ye.spot.length,numSpotLightMaps:ye.spotLightMap.length,numRectAreaLights:ye.rectArea.length,numHemiLights:ye.hemi.length,numDirLightShadows:ye.directionalShadowMap.length,numPointLightShadows:ye.pointShadowMap.length,numSpotLightShadows:ye.spotShadowMap.length,numSpotLightShadowsWithMaps:ye.numSpotLightShadowsWithMaps,numClippingPlanes:u.numPlanes,numClipIntersection:u.numIntersection,dithering:ie.dithering,shadowMapEnabled:f.shadowMap.enabled&&He.length>0,shadowMapType:f.shadowMap.type,toneMapping:ie.toneMapped?f.toneMapping:Mc,useLegacyLights:f.useLegacyLights,premultipliedAlpha:ie.premultipliedAlpha,doubleSided:2===ie.side,flipSided:1===ie.side,useDepthPacking:ie.depthPacking>=0,depthPacking:ie.depthPacking||0,index0AttributeName:ie.index0AttributeName,extensionDerivatives:je&&!0===ie.extensions.derivatives,extensionFragDepth:je&&!0===ie.extensions.fragDepth,extensionDrawBuffers:je&&!0===ie.extensions.drawBuffers,extensionShaderTextureLOD:je&&!0===ie.extensions.shaderTextureLOD,rendererExtensionFragDepth:M||r.has("EXT_frag_depth"),rendererExtensionDrawBuffers:M||r.has("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:M||r.has("EXT_shader_texture_lod"),customProgramCacheKey:ie.customProgramCacheKey()}},getProgramCacheKey:function L(ie){const ye=[];if(ie.shaderID?ye.push(ie.shaderID):(ye.push(ie.customVertexShaderID),ye.push(ie.customFragmentShaderID)),void 0!==ie.defines)for(const He in ie.defines)ye.push(He),ye.push(ie.defines[He]);return!1===ie.isRawShaderMaterial&&(function V(ie,ye){ie.push(ye.precision),ie.push(ye.outputEncoding),ie.pu
vendor: 4,566 bytes, line 72
72sh(ye.envMapMode),ie.push(ye.envMapCubeUVHeight),ie.push(ye.mapUv),ie.push(ye.alphaMapUv),ie.push(ye.lightMapUv),ie.push(ye.aoMapUv),ie.push(ye.bumpMapUv),ie.push(ye.normalMapUv),ie.push(ye.displacementMapUv),ie.push(ye.emissiveMapUv),ie.push(ye.metalnessMapUv),ie.push(ye.roughnessMapUv),ie.push(ye.clearcoatMapUv),ie.push(ye.clearcoatNormalMapUv),ie.push(ye.clearcoatRoughnessMapUv),ie.push(ye.iridescenceMapUv),ie.push(ye.iridescenceThicknessMapUv),ie.push(ye.sheenColorMapUv),ie.push(ye.sheenRoughnessMapUv),ie.push(ye.specularMapUv),ie.push(ye.specularColorMapUv),ie.push(ye.specularIntensityMapUv),ie.push(ye.transmissionMapUv),ie.push(ye.thicknessMapUv),ie.push(ye.combine),ie.push(ye.fogExp2),ie.push(ye.sizeAttenuation),ie.push(ye.morphTargetsCount),ie.push(ye.morphAttributeCount),ie.push(ye.numDirLights),ie.push(ye.numPointLights),ie.push(ye.numSpotLights),ie.push(ye.numSpotLightMaps),ie.push(ye.numHemiLights),ie.push(ye.numRectAreaLights),ie.push(ye.numDirLightShadows),ie.push(ye.numPointLightShadows),ie.push(ye.numSpotLightShadows),ie.push(ye.numSpotLightShadowsWithMaps),ie.push(ye.shadowMapType),ie.push(ye.toneMapping),ie.push(ye.numClippingPlanes),ie.push(ye.numClipIntersection),ie.push(ye.depthPacking)}(ye,ie),function z(ie,ye){g.disableAll(),ye.isWebGL2&&g.enable(0),ye.supportsVertexTextures&&g.enable(1),ye.instancing&&g.enable(2),ye.instancingColor&&g.enable(3),ye.matcap&&g.enable(4),ye.envMap&&g.enable(5),ye.normalMapObjectSpace&&g.enable(6),ye.normalMapTangentSpace&&g.enable(7),ye.clearcoat&&g.enable(8),ye.iridescence&&g.enable(9),ye.alphaTest&&g.enable(10),ye.vertexColors&&g.enable(11),ye.vertexAlphas&&g.enable(12),ye.vertexUvs2&&g.enable(13),ye.vertexTangents&&g.enable(14),ie.push(g.mask),g.disableAll(),ye.fog&&g.enable(0),ye.useFog&&g.enable(1),ye.flatShading&&g.enable(2),ye.logarithmicDepthBuffer&&g.enable(3),ye.skinning&&g.enable(4),ye.morphTargets&&g.enable(5),ye.morphNormals&&g.enable(6),ye.morphColors&&g.enable(7),ye.premultipliedAlpha&&g.enable(8),ye.shadowMapEnabled&&g.enable(9),ye.useLegacyLights&&g.enable(10),ye.doubleSided&&g.enable(11),ye.flipSided&&g.enable(12),ye.useDepthPacking&&g.enable(13),ye.dithering&&g.enable(14),ye.transmission&&g.enable(15),ye.sheen&&g.enable(16),ye.decodeVideoTexture&&g.enable(17),ye.opaque&&g.enable(18),ye.pointsUvs&&g.enable(19),ie.push(g.mask)}(ye,ie),ye.push(f.outputEncoding)),ye.push(ie.customProgramCacheKey),ye.join()},getUniforms:function W(ie){const ye=F[ie.type];let He;return He=ye?Nc.clone(bl[ye].uniforms):ie.uniforms,He},acquireProgram:function ne(ie,ye){let He;for(let qe=0,Ge=x.length;qe<Ge;qe++){const Ve=x[qe];if(Ve.cacheKey===ye){He=Ve,++He.usedTimes;break}}return void 0===He&&(He=new Sl(f,ye,ie,l),x.push(He)),He},releaseProgram:function fe(ie){if(0==--ie.usedTimes){const ye=x.indexOf(ie);x[ye]=x[x.length-1],x.pop(),ie.destroy()}},releaseShaderCache:function ge(ie){_.remove(ie)},programs:x,dispose:function de(){_.dispose()}}}function hb(){let f=new WeakMap;return{get:function e(l){let u=f.get(l);return void 0===u&&(u={},f.set(l,u)),u},remove:function t(l){f.delete(l)},update:function r(l,u,g){f.get(l)[u]=g},dispose:function s(){f=new WeakMap}}}function Be(f,e){return f.groupOrder!==e.groupOrder?f.groupOrder-e.groupOrder:f.renderOrder!==e.renderOrder?f.renderOrder-e.renderOrder:f.material.id!==e.material.id?f.material.id-e.material.id:f.z!==e.z?f.z-e.z:f.id-e.id}function mt(f,e){return f.groupOrder!==e.groupOrder?f.groupOrder-e.groupOrder:f.renderOrder!==e.renderOrder?f.renderOrder-e.renderOrder:f.z!==e.z?e.z-f.z:f.id-e.id}function Ct(){const f=[];let e=0;const t=[],r=[],s=[];function u(C,P,R,F,O,k){let L=f[e];return void 0===L?(L={id:C.id,object:C,geometry:P,material:R,groupOrder:F,renderOrder:C.renderOrder,z:O,group:k},f[e]=L):(L.id=C.id,L.object=C,L.geometry=P,L.material=R,L.groupOrder=F,L.renderOrder=C.renderOrder,L.z=O,L.group=k),e++,L}return{opaque:t,transmissive:r,transparent:s,init:function l(){e=0,t.length=0,r.length=0,s.length=0},push:function g(C,P,R,F,O,k){const L=u(C,P,R,F,O,k);R.transmission>0?r.push(L):!0===R.transparent?s.push(L):t.push(L)},unshift:function _(C,P,R,F,O,k){const L=u(C,P,R,F,O,k);R.transmission>0?r.unshift(L):!0===R.transparent?s.unshift(L):t.unshift(L)},finish:function M(){for(let C=e,P=f.length;C<P;C++){const R=f[C];if(null===R.id)break;R.id=null,R.object=null,R.geometry=null,R.material=null,R.group=null}},sort:function x(C,P){t.length>1&&t.sort(C||Be),r.length>1&&r.sort(P||mt),s.length>1&&s.sort(P||mt)}}}function lt(){let f=new WeakMap;return{get:function e(r,s){const l=f.get(r);let u;
vendor: 3,684 bytes, line 72
72return void 0===l?(u=new Ct,f.set(r,[u])):s>=l.length?(u=new Ct,l.push(u)):u=l[s],u},dispose:function t(){f=new WeakMap}}}function Nt(){const f={};return{get:function(e){if(void 0!==f[e.id])return f[e.id];let t;switch(e.type){case"DirectionalLight":t={direction:new Me,color:new An};break;case"SpotLight":t={position:new Me,direction:new Me,color:new An,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":t={position:new Me,color:new An,distance:0,decay:0};break;case"HemisphereLight":t={direction:new Me,skyColor:new An,groundColor:new An};break;case"RectAreaLight":t={color:new An,position:new Me,halfWidth:new Me,halfHeight:new Me}}return f[e.id]=t,t}}}let Si=0;function Ci(f,e){return(e.castShadow?2:0)-(f.castShadow?2:0)+(e.map?1:0)-(f.map?1:0)}function ki(f,e){const t=new Nt,r=function li(){const f={};return{get:function(e){if(void 0!==f[e.id])return f[e.id];let t;switch(e.type){case"DirectionalLight":case"SpotLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Rt};break;case"PointLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Rt,shadowCameraNear:1,shadowCameraFar:1e3}}return f[e.id]=t,t}}}(),s={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-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};for(let M=0;M<9;M++)s.probe.push(new Me);const l=new Me,u=new ui,g=new ui;return{setup:function _(M,C){let P=0,R=0,F=0;for(let He=0;He<9;He++)s.probe[He].set(0,0,0);let O=0,k=0,L=0,V=0,z=0,W=0,ne=0,fe=0,ge=0,de=0;M.sort(Ci);const ie=!0===C?Math.PI:1;for(let He=0,qe=M.length;He<qe;He++){const Ge=M[He],Ve=Ge.color,We=Ge.intensity,nt=Ge.distance,et=Ge.shadow&&Ge.shadow.map?Ge.shadow.map.texture:null;if(Ge.isAmbientLight)P+=Ve.r*We*ie,R+=Ve.g*We*ie,F+=Ve.b*We*ie;else if(Ge.isLightProbe)for(let tt=0;tt<9;tt++)s.probe[tt].addScaledVector(Ge.sh.coefficients[tt],We);else if(Ge.isDirectionalLight){const tt=t.get(Ge);if(tt.color.copy(Ge.color).multiplyScalar(Ge.intensity*ie),Ge.castShadow){const gt=Ge.shadow,bt=r.get(Ge);bt.shadowBias=gt.bias,bt.shadowNormalBias=gt.normalBias,bt.shadowRadius=gt.radius,bt.shadowMapSize=gt.mapSize,s.directionalShadow[O]=bt,s.directionalShadowMap[O]=et,s.directionalShadowMatrix[O]=Ge.shadow.matrix,W++}s.directional[O]=tt,O++}else if(Ge.isSpotLight){const tt=t.get(Ge);tt.position.setFromMatrixPosition(Ge.matrixWorld),tt.color.copy(Ve).multiplyScalar(We*ie),tt.distance=nt,tt.coneCos=Math.cos(Ge.angle),tt.penumbraCos=Math.cos(Ge.angle*(1-Ge.penumbra)),tt.decay=Ge.decay,s.spot[L]=tt;const gt=Ge.shadow;if(Ge.map&&(s.spotLightMap[ge]=Ge.map,ge++,gt.updateMatrices(Ge),Ge.castShadow&&de++),s.spotLightMatrix[L]=gt.matrix,Ge.castShadow){const bt=r.get(Ge);bt.shadowBias=gt.bias,bt.shadowNormalBias=gt.normalBias,bt.shadowRadius=gt.radius,bt.shadowMapSize=gt.mapSize,s.spotShadow[L]=bt,s.spotShadowMap[L]=et,fe++}L++}else if(Ge.isRectAreaLight){const tt=t.get(Ge);tt.color.copy(Ve).multiplyScalar(We),tt.halfWidth.set(.5*Ge.width,0,0),tt.halfHeight.set(0,.5*Ge.height,0),s.rectArea[V]=tt,V++}else if(Ge.isPointLight){const tt=t.get(Ge);if(tt.color.copy(Ge.color).multiplyScalar(Ge.intensity*ie),tt.distance=Ge.distance,tt.decay=Ge.decay,Ge.castShadow){const gt=Ge.shadow,bt=r.get(Ge);bt.shadowBias=gt.bias,bt.shadowNormalBias=gt.normalBias,bt.shadowRadius=gt.radiu
72s,bt.shadowMapSize=gt.mapSize,bt.shadowCameraNear=gt.camera.near,bt.shadowCameraFar=gt.camera.far,s.pointShadow[k]=bt,s.pointShadowMap[k]=et,s.pointShadowMatrix[k]=Ge.shadow.matrix,ne++}s.point[k]=tt,k++}else if(Ge.isHemisphereLight){const tt=t.get(Ge);tt.skyColor.copy(Ge.color).multiplyScalar(We*ie),tt.groundColor.copy(Ge.groundColor).multiplyScalar(We*ie),s.hemi[z]=tt,z++}}V>0&&(e.isWebGL2||!0===f.has("OES_texture_float_linear")?(s.rectAreaLTC1=yn.LTC_FLOAT_1,s.rectAreaLTC2=yn.LTC_FLOAT_2):!0===f.has("OES_texture_half_float_linear")?(s.rectAreaLTC1=yn.LTC_HALF_1,s.rectAreaLTC2=yn.LTC_HALF_2):console.error("THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.")),s.ambient[0]=P,s.ambient[1]=R,s.ambient[2]=F;const ye=s.hash;(ye.directionalLength!==O||ye.pointLength!==k||ye.spotLength!==L||ye.rectAreaLength!==V||ye.hemiLength!==z||ye.numDirectionalShadows!==W||ye.numPointShadows!==ne||ye.numSpotShadows!==fe||ye.numSpotMaps!==ge)&&(s.directional.length=O,s.spot.length=L,s.rectArea.length=V,s.point.length=k,s.hemi.length=z,s.directionalShadow.length=W,s.directionalShadowMap.length=W,s.pointShadow.length=ne,s.pointShadowMap.length=ne,s.spotShadow.length=fe,s.spotShadowMap.length=fe,s.directionalShadowMatrix.length=W,s.pointShadowMatrix.length=ne,s.spotLightMatrix.length=fe+ge-de,s.spotLightMap.length=ge,s.numSpotLightShadowsWithMaps=de,ye.directionalLength=O,ye.pointLength=k,ye.spotLength=L,ye.rectAreaLength=V,ye.hemiLength=z,ye.numDirectionalShadows=W,ye.numPointShadows=ne,ye.numSpotShadows=fe,ye.numSpotMaps=ge,s.version=Si++)},setupView:function x(M,C){let P=0,R=0,F=0,O=0,k=0;const L=C.matrixWorldInverse;for(let V=0,z=M.length;V<z;V++){const W=M[V];if(W.isDirectionalLight){const ne=s.directional[P];ne.direction.setFromMatrixPosition(W.matrixWorld),l.setFromMatrixPosition(W.target.matrixWorld),ne.direction.sub(l),ne.direction.transformDirection(L),P++}else if(W.isSpotLight){const ne=s.spot[F];ne.position.setFromMatrixPosition(W.matrixWorld),ne.position.applyMatrix4(L),ne.direction.setFromMatrixPosition(W.matrixWorld),l.setFromMatrixPosition(W.target.matrixWorld),ne.direction.sub(l),ne.direction.transformDirection(L),F++}else if(W.isRectAreaLight){const ne=s.rectArea[O];ne.position.setFromMatrixPosition(W.matrixWorld),ne.position.applyMatrix4(L),g.identity(),u.copy(W.matrixWorld),u.premultiply(L),g.extractRotation(u),ne.halfWidth.set(.5*W.width,0,0),ne.halfHeight.set(0,.5*W.height,0),ne.halfWidth.applyMatrix4(g),ne.halfHeight.applyMatrix4(g),O++}else if(W.isPointLight){const ne=s.point[R];ne.position.setFromMatrixPosition(W.matrixWorld),ne.position.applyMatrix4(L),R++}else if(W.isHemisphereLight){const ne=s.hemi[k];ne.direction.setFromMatrixPosition(W.matrixWorld),ne.direction.transformDirection(L),k++}}},state:s}}function Vi(f,e){const t=new ki(f,e),r=[],s=[];return{init:function l(){r.length=0,s.length=0},state:{lightsArray:r,shadowsArray:s,lights:t},setupLights:function _(C){t.setup(r,C)},setupLightsView:function x(C){t.setupView(r,C)},pushLight:function u(C){r.push(C)},pushShadow:function g(C){s.push(C)}}}function Xi(f,e){let t=new WeakMap;return{get:function r(l,u=0){const g=t.get(l);let _;return void 0===g?(_=new Vi(f,e),t.set(l,[_])):u>=g.length?(_=new Vi(f,e),g.push(_)):_=g[u],_},dispose:function s(){t=new WeakMap}}}class qi extends as{constructor(e){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=3200,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 vr extends as{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}}function Vh(f,e,t){let r=new rm;
vendor: 4,690 bytes, line 72
72const s=new Rt,l=new Rt,u=new Ar,g=new qi({depthPacking:3201}),_=new vr,x={},M=t.maxTextureSize,C={[Kl]:1,[ka]:0,[No]:2},P=new Ts({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new Rt},radius:{value:4}},vertexShader:"void main() {\n\tgl_Position = vec4( position, 1.0 );\n}",fragmentShader:"uniform sampler2D shadow_pass;\nuniform vec2 resolution;\nuniform float radius;\n#include <packing>\nvoid main() {\n\tconst float samples = float( VSM_SAMPLES );\n\tfloat mean = 0.0;\n\tfloat squared_mean = 0.0;\n\tfloat uvStride = samples <= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 );\n\tfloat uvStart = samples <= 1.0 ? 0.0 : - 1.0;\n\tfor ( float i = 0.0; i < samples; i ++ ) {\n\t\tfloat uvOffset = uvStart + i * uvStride;\n\t\t#ifdef HORIZONTAL_PASS\n\t\t\tvec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ) );\n\t\t\tmean += distribution.x;\n\t\t\tsquared_mean += distribution.y * distribution.y + distribution.x * distribution.x;\n\t\t#else\n\t\t\tfloat depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ) );\n\t\t\tmean += depth;\n\t\t\tsquared_mean += depth * depth;\n\t\t#endif\n\t}\n\tmean = mean / samples;\n\tsquared_mean = squared_mean / samples;\n\tfloat std_dev = sqrt( squared_mean - mean * mean );\n\tgl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) );\n}"}),R=P.clone();R.defines.HORIZONTAL_PASS=1;const F=new Ii;F.setAttribute("position",new tr(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const O=new pn(F,P),k=this;function L(W,ne){const fe=e.update(O);P.defines.VSM_SAMPLES!==W.blurSamples&&(P.defines.VSM_SAMPLES=W.blurSamples,R.defines.VSM_SAMPLES=W.blurSamples,P.needsUpdate=!0,R.needsUpdate=!0),null===W.mapPass&&(W.mapPass=new Ks(s.x,s.y)),P.uniforms.shadow_pass.value=W.map.texture,P.uniforms.resolution.value=W.mapSize,P.uniforms.radius.value=W.radius,f.setRenderTarget(W.mapPass),f.clear(),f.renderBufferDirect(ne,null,fe,P,O,null),R.uniforms.shadow_pass.value=W.mapPass.texture,R.uniforms.resolution.value=W.mapSize,R.uniforms.radius.value=W.radius,f.setRenderTarget(W.map),f.clear(),f.renderBufferDirect(ne,null,fe,R,O,null)}function V(W,ne,fe,ge){let de=null;const ie=!0===fe.isPointLight?W.customDistanceMaterial:W.customDepthMaterial;if(void 0!==ie)de=ie;else if(de=!0===fe.isPointLight?_:g,f.localClippingEnabled&&!0===ne.clipShadows&&Array.isArray(ne.clippingPlanes)&&0!==ne.clippingPlanes.length||ne.displacementMap&&0!==ne.displacementScale||ne.alphaMap&&ne.alphaTest>0||ne.map&&ne.alphaTest>0){const ye=de.uuid,He=ne.uuid;let qe=x[ye];void 0===qe&&(qe={},x[ye]=qe);let Ge=qe[He];void 0===Ge&&(Ge=de.clone(),qe[He]=Ge),de=Ge}return de.visible=ne.visible,de.wireframe=ne.wireframe,de.side=ge===$f?null!==ne.shadowSide?ne.shadowSide:ne.side:null!==ne.shadowSide?ne.shadowSide:C[ne.side],de.alphaMap=ne.alphaMap,de.alphaTest=ne.alphaTest,de.map=ne.map,de.clipShadows=ne.clipShadows,de.clippingPlanes=ne.clippingPlanes,de.clipIntersection=ne.clipIntersection,de.displacementMap=ne.displacementMap,de.displacementScale=ne.displacementScale,de.displacementBias=ne.displacementBias,de.wireframeLinewidth=ne.wireframeLinewidth,de.linewidth=ne.linewidth,!0===fe.isPointLight&&!0===de.isMeshDistanceMaterial&&(f.properties.get(de).light=fe),de}function z(W,ne,fe,ge,de){if(!1===W.visible)return;if(W.layers.test(ne.layers)&&(W.isMesh||W.isLine||W.isPoints)&&(W.castShadow||W.receiveShadow&&de===$f)&&(!W.frustumCulled||r.intersectsObject(W))){W.modelViewMatrix.multiplyMatrices(fe.matrixWorldInverse,W.matrixWorld);const He=e.update(W),qe=W.material;if(Array.isArray(qe)){const Ge=He.groups;for(let Ve=0,We=Ge.length;Ve<We;Ve++){const nt=Ge[Ve],et=qe[nt.materialIndex];if(et&&et.visible){const tt=V(W,et,ge,de);f.renderBufferDirect(fe,null,He,tt,W,nt)}}}else if(qe.visible){const Ge=V(W,qe,ge,de);f.renderBufferDirect(fe,null,He,Ge,W,null)}}const ye=W.children;for(let He=0,qe=ye.length;He<qe;He++)z(ye[He],ne,fe,ge,de)}this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=b_,this.render=function(W,ne,fe){if(!1===k.enabled||!1===k.autoUpdate&&!1===k.needsUpdate||0===W.length)return;const ge=f.getRenderTarget(),de=f.getActiveCubeFace(),ie=f.getActiveMipmapLevel(),ye=f.state;ye.setBlending(0),ye.buffers.color.setClear(1,1,1,1),ye.buffers.depth.setTest(!0),ye.setScissorTest(!1);for(let He=0,qe=W.length;He<qe;He++){const Ge=W[He],Ve=Ge.shadow;if(void 0===Ve){console.warn("THREE.WebGLShadowMap:",Ge,"has no shadow.");continue}if(!1===Ve.autoUpdate&&!1===Ve.needsUpdate)continue;s.copy(Ve.mapSize);const We=Ve.getFrameExtents();s.multiply(We),l.copy(Ve.mapSize),(s.x>M||s.y>
72M)&&(s.x>M&&(l.x=Math.floor(M/We.x),s.x=l.x*We.x,Ve.mapSize.x=l.x),s.y>M&&(l.y=Math.floor(M/We.y),s.y=l.y*We.y,Ve.mapSize.y=l.y)),null===Ve.map&&(Ve.map=new Ks(s.x,s.y,this.type!==$f?{minFilter:Hr,magFilter:Hr}:{}),Ve.map.texture.name=Ge.name+".shadowMap",Ve.camera.updateProjectionMatrix()),f.setRenderTarget(Ve.map),f.clear();const nt=Ve.getViewportCount();for(let et=0;et<nt;et++){const tt=Ve.getViewport(et);u.set(l.x*tt.x,l.y*tt.y,l.x*tt.z,l.y*tt.w),ye.viewport(u),Ve.updateMatrices(Ge,et),r=Ve.getFrustum(),z(ne,fe,Ve.camera,Ge,this.type)}!0!==Ve.isPointLightShadow&&this.type===$f&&L(Ve,fe),Ve.needsUpdate=!1}k.needsUpdate=!1,f.setRenderTarget(ge,de,ie)}}function ys(f,e,t){const r=t.isWebGL2,g=new function s(){let je=!1;const Ze=new Ar;let sn=null;const kn=new Ar(0,0,0,0);return{setMask:function(ii){sn!==ii&&!je&&(f.colorMask(ii,ii,ii,ii),sn=ii)},setLocked:function(ii){je=ii},setClear:function(ii,Or,Yr,ua,jc){!0===jc&&(ii*=ua,Or*=ua,Yr*=ua),Ze.set(ii,Or,Yr,ua),!1===kn.equals(Ze)&&(f.clearColor(ii,Or,Yr,ua),kn.copy(Ze))},reset:function(){je=!1,sn=null,kn.set(-1,0,0,0)}}},_=new function l(){let je=!1,Ze=null,sn=null,kn=null;return{setTest:function(ii){ii?ut(2929):Nn(2929)},setMask:function(ii){Ze!==ii&&!je&&(f.depthMask(ii),Ze=ii)},setFunc:function(ii){if(sn!==ii){switch(ii){case 0:f.depthFunc(512);break;case 1:f.depthFunc(519);break;case 2:f.depthFunc(513);break;case 3:default:f.depthFunc(515);break;case 4:f.depthFunc(514);break;case 5:f.depthFunc(518);break;case 6:f.depthFunc(516);break;case 7:f.depthFunc(517)}sn=ii}}
72,setLocked:function(ii){je=ii},setClear:function(ii){kn!==ii&&(f.clearDepth(ii),kn=ii)},reset:function(){je=!1,Ze=null,sn=null,kn=null}}},x=new function u(){let je=!1,Ze=null,sn=null,kn=null,ii=null,Or=null,Yr=null,ua=null,jc=null;return{setTest:function(fs){je||(fs?ut(2960):Nn(2960))},setMask:function(fs){Ze!==fs&&!je&&(f.stencilMask(fs),Ze=fs)},setFunc:function(fs,Lo,Tl){(sn!==fs||kn!==Lo||ii!==Tl)&&(f.stencilFunc(fs,Lo,Tl),sn=fs,kn=Lo,ii=Tl)},setOp:function(fs,Lo,Tl){(Or!==fs||Yr!==Lo||ua!==Tl)&&(f.stencilOp(fs,Lo,Tl),Or=fs,Yr=Lo,ua=Tl)},setLocked:function(fs){je=fs},setClear:function(fs){jc!==fs&&(f.clearStencil(fs),jc=fs)},reset:function(){je=!1,Ze=null,sn=null,kn=null,ii=null,Or=null,Yr=null,ua=null,jc=null}}},M=new WeakMap,C=new WeakMap;let P={},R={},F=new WeakMap,O=[],k=null,L=!1,V=null,z=null,W=null,ne=null,fe=null,ge=null,de=null,ie=!1,ye=null,He=null,qe=null,Ge=null,Ve=null;const We=f.getParameter(35661);let nt=!1,et=0;const tt=f.getParameter(7938);-1!==tt.indexOf("WebGL")?(et=parseFloat(/^WebGL (\d)/.exec(tt)[1]),nt=et>=1):-1!==tt.indexOf("OpenGL ES")&&(et=parseFloat(/^OpenGL ES (\d)/.exec(tt)[1]),nt=et>=2);let gt=null,bt={};const jt=f.getParameter(3088),Qt=f.getParameter(2978),ct=(new Ar).fromArray(jt),At=(new Ar).fromArray(Qt);function Ut(je,Ze,sn){const kn=new Uint8Array(4),ii=f.createTexture();f.bindTexture(je,ii),f.texParameteri(je,10241,9728),f.texParameteri(je,10240,9728);for(let Or=0;Or<sn;Or++)f.texImage2D(Ze+Or,0,6408,1,1,0,6408,5121,kn);return ii}const Vt={};function ut(je){!0!==P[je]&&(f.enable(je),P[je]=!0)}function Nn(je){!1!==P[je]&&(f.disable(je),P[je]=!1)}Vt[3553]=Ut(3553,3553,1),Vt[34067]=Ut(34067,34069,6),g.setClear(0,0,0,1),_.setClear(1),x.setClear(0),ut(2929),_.setFunc(3),Sn(!1),gi(1),ut(2884),Xt(0);const $t={[Tu]:32774,[qS]:32778,[YS]:32779};if(r)$t[103]=32775,$t[104]=32776;else{const je=e.get("EXT_blend_minmax");null!==je&&($t[103]=je.MIN_EXT,$t[104]=je.MAX_EXT)}const Lt={[$S]:0,[KS]:1,[ZS]:768,[b1]:770,[iM]:776,[tM]:774,[JS]:772,[jS]:769,[S1]:771,[nM]:775,[eM]:773};function Xt(je,Ze,sn,kn,ii,Or,Yr,ua){if(0!==je){if(!1===L&&(ut(3042),L=!0),5===je)ii=ii||Ze,Or=Or||sn,Yr=Yr||kn,(Ze!==z||ii!==fe)&&(f.blendEquationSeparate($t[Ze],$t[ii]),z=Ze,fe=ii),(sn!==W||kn!==ne||Or!==ge||Yr!==de)&&(f.blendFuncSeparate(Lt[sn],Lt[kn],Lt[Or],Lt[Yr]),W=sn,ne=kn,ge=Or,de=Yr),V=je,ie=!1;else if(je!==V||ua!==ie){if((100!==z||100!==fe)&&(f.blendEquation(32774),z=100,fe=100),ua)switch(je){case 1:f.blendFuncSeparate(1,771,1,771);break;case 2:f.blendFunc(1,1);break;case 3:f.blendFuncSeparate(0,769,0,1);break;case 4:f.blendFuncSeparate(0,768,0,770);break;default:console.error("THREE.WebGLState: Invalid blending: ",je)}else switch(je){case 1:f.blendFuncSeparate(770,771,1,771);break;case 2:f.blendFunc(770,1);break;case 3:f.blendFuncSeparate(0,769,0,1);break;case 4:f.blendFunc(0,768);break;default:console.error("THREE.WebGLState: Invalid blending: ",je)}W=null,ne=null,ge=null,de=null,V=je,ie=ua}}else!0===L&&(Nn(3042),L=!1)}function Sn(je){ye!==je&&(f.frontFace(je?2304:2305),ye=je)}function gi(je){0!==je?(ut(2884),je!==He&&f.cullFace(1===je?1029:2===je?1028:1032)):Nn(2884),He=je}function ci(je,Ze,sn){je?(ut(32823),(Ge!==Ze||Ve!==sn)&&(f.polygonOffset(Ze,sn),Ge=Ze,Ve=sn)):Nn(32823)}return{buffers:{color:g,depth:_,stencil:x},enable:ut,disable:Nn,bindFramebuffer:function ni(je,Ze){return R[je]!==Ze&&(f.bindFramebuffer(je,Ze),R[je]=Ze,r&&(36009===je&&(R[36160]=Ze),36160===je&&(R[36009]=Ze)),!0)},drawBuffers:function Gt(je,Ze){let sn=O,kn=!1;if(je)if(sn=F.get(Ze),void 0===sn&&(sn=[],F.set(Ze,sn)),je.isWebGLMultipleRenderTargets){const ii=je.texture;if(sn.length!==ii.length||36064!==sn[0]){for(let Or=0,Yr=ii.length;Or<Yr;Or++)sn[Or]=36064+Or;sn.length=ii.length,kn=!0}}else 36064!==sn[0]&&(sn[0]=36064,kn=!0);else 1029!==sn[0]&&(sn[0]=1029,kn=!0);kn&&(t.isWebGL2?f.drawBuffers(sn):e.get("WEBGL_draw_buffers").drawBuffersWEBGL(sn))},useProgram:function Vn(je){return k!==je&&(f.useProgram(je),k=je,!0)},setBlending:Xt,setMaterial:function Qn(je,Ze){2===je.side?Nn(2884):ut(2884);let sn=1===je.side;Ze&&(sn=!sn),Sn(sn),1===je.blending&&!1===je.transparent?Xt(0):Xt(je.blending,je.blendEquation,je.blendSrc,je.blendDst,je.blendEquationAlpha,je.blendSrcAlpha,je.blendDstAlpha,je.premultipliedAlpha),_.setFu
72nc(je.depthFunc),_.setTest(je.depthTest),_.setMask(je.depthWrite),g.setMask(je.colorWrite);const kn=je.stencilWrite;x.setTest(kn),kn&&(x.setMask(je.stencilWriteMask),x.setFunc(je.stencilFunc,je.stencilRef,je.stencilFuncMask),x.setOp(je.stencilFail,je.stencilZFail,je.stencilZPass)),ci(je.polygonOffset,je.polygonOffsetFactor,je.polygonOffsetUnits),!0===je.alphaToCoverage?ut(32926):Nn(32926)},setFlipSided:Sn,setCullFace:gi,setLineWidth:function Ai(je){je!==qe&&(nt&&f.lineWidth(je),qe=je)},setPolygonOffset:ci,setScissorTest:function Hi(je){je?ut(3089):Nn(3089)},activeTexture:function cr(je){void 0===je&&(je=33984+We-1),gt!==je&&(f.activeTexture(je),gt=je)},bindTexture:function ze(je,Ze,sn){void 0===sn&&(sn=null===gt?33984+We-1:gt);let kn=bt[sn];void 0===kn&&(kn={type:void 0,texture:void 0},bt[sn]=kn),(kn.type!==je||kn.texture!==Ze)&&(gt!==sn&&(f.activeTexture(sn),gt=sn),f.bindTexture(je,Ze||Vt[je]),kn.type=je,kn.texture=Ze)},unbindTexture:function Ce(){const je=bt[gt];void 0!==je&&void 0!==je.type&&(f.bindTexture(je.type,null),je.type=void 0,je.texture=void 0)},compressedTexImage2D:function xt(){try{f.compressedTexImage2D.apply(f,arguments)}catch(je){console.error("THREE.WebGLState:",je)}},compressedTexImage3D:function rn(){try{f.compressedTexImage3D.apply(f,arguments)}catch(je){console.error("THREE.WebGLState:",je)}},texImage2D:function hi(){try{f.texImage2D.apply(f,arguments)}catch(je){console.error("THREE.WebGLState:",je)}},texImage3D:function si(){try{f.texImage3D.apply(f,arguments)}catch(je){console.error("THREE.WebGLState:",je)}},updateUBOMapping:function Oi(je,Ze){let sn=C.get(Ze);void 0===sn&&(sn=new WeakMap,C.set(Ze,sn));let kn=sn.get(je);void 0===kn&&(kn=f.getUniformBlockIndex(Ze,je.name),sn.set(je,kn))},uniformBlockBinding:function Ni(je,Ze){const kn=C.get(Ze).get(je);M.get(Ze)!==kn&&(f.uniformBlockBinding(Ze,kn,je.__bindingPointIndex),M.set(Ze,kn))},texStorage2D:function Dt(){try{f.texStorage2D.apply(f,arguments)}catch(je){console.error("THREE.WebGLState:",je)}},texStorage3D:function Zn(){try{f.texStorage3D.apply(f,arguments)}catch(je){console.error("THREE.WebGLState:",je)}},texSubImage2D:function fn(){try{f.texSubImage2D.apply(f,arguments)}catch(je){console.error("THREE.WebGLState:",je)}},texSubImage3D:function Cn(){try{f.texSubImage3D.apply(f,arguments)}catch(je){console.error("THREE.WebGLState:",je)}},compressedTexSubImage2D:function _i(){try{f.compressedTexSubImage2D.apply(f,arguments)}catch(je){console.error("THREE.WebGLState:",je)}},compressedTexSubImage3D:function On(){try{f.compressedTexSubImage3D.apply(f,arguments)}catch(je){console.error("THREE.WebGLState:",je)}},scissor:function xn(je){!1===ct.equals(je)&&(f.scissor(je.x,je.y,je.z,je.w),ct.copy(je))},viewport:function ei(je){!1===At.equals(je)&&(f.viewport(je.x,je.y,je.z,je.w),At.copy(je))},reset:function $i(){f.disable(3042),f.disable(2884),f.disable(2929),f.disable(32823),f.disable(3089),f.disable(2960),f.disable(32926),f.blendEquation(32774),f.blendFunc(1,0),f.blendFuncSeparate(1,0,1,0),f.colorMask(!0,!0,!0,!0),f.clearColor(0,0,0,0),f.depthMask(!0),f.depthFunc(513),f.clearDepth(1),f.stencilMask(4294967295),f.stencilFunc(519,0,4294967295),f.stencilOp(7680,7680,7680),f.clearStencil(0),f.cullFace(1029),f.frontFace(2305),f.polygonOffset(0,0),f.activeTexture(33984),f.bindFramebuffer(36160,null),!0===r&&(f.bindFramebuffer(36009,null),f.bindFramebuffer(36008,null)),f.useProgram(null),f.lineWidth(1),f.scissor(0,0,f.canvas.width,f.canvas.height),f.viewport(0,0,f.canvas.width,f.canvas.height),P={},gt=null,bt={},R={},F=new WeakMap,O=[],k=null,L=!1,V=null,z=null,W=null,ne=null,fe=null,ge=null,de=null,ie=!1,ye=null,He=null,qe=null,Ge=null,Ve=null,ct.set(0,0,f.canvas.width,f.canvas.height),At.set(0,0,f.canvas.width,f.canvas.height),g.reset(),_.reset(),x.reset()}}}function ir(f,e,t,r,s,l,u){const g=s.isWebGL2,_=s.maxTextures,x=s.maxCubemapSize,M=s.maxTextureSize,C=s.maxSamples,P=e.has("WEBGL_multisampled_render_to_texture")?e.get("WEBGL_multisampled_render_to_texture"):null,R=!(typeof navigator>"u")&&/OculusBrowser/g.test(navigator.userAgent),F=new WeakMap;let O;const k=new WeakMap;let L=!1;try{L=typeof OffscreenCanvas<"u"&&null!==new OffscreenCanvas(1,1).getContext("2d")}catch{}function V(ze,Ce){return L?new OffscreenCanvas(ze,Ce):rd("canvas")}function z(ze,Ce,xt,rn){let fn=1;
72if((ze.width>rn||ze.height>rn)&&(fn=rn/Math.max(ze.width,ze.height)),fn<1||!0===Ce){if(typeof HTMLImageElement<"u"&&ze instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&ze instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&ze instanceof ImageBitmap){const Cn=Ce?cv:Math.floor,_i=Cn(fn*ze.width),On=Cn(fn*ze.height);void 0===O&&(O=V(_i,On));const Dt=xt?V(_i,On):O;return Dt.width=_i,Dt.height=On,Dt.getContext("2d").drawImage(ze,0,0,_i,On),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+ze.width+"x"+ze.height+") to ("+_i+"x"+On+")."),Dt}return"data"in ze&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+ze.width+"x"+ze.height+")."),ze}return ze}function W(ze){return Xg(ze.width)&&Xg(ze.height)}function fe(ze,Ce){return ze.generateMipmaps&&Ce&&ze.minFilter!==Hr&&ze.minFilter!==Tr}function ge(ze){f.generateMipmap(ze)}function de(ze,Ce,xt,rn,fn=!1){if(!1===g)return Ce;if(null!==ze){if(void 0!==f[ze])return f[ze];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+ze+"'")}let Cn=Ce;return 6403===Ce&&(5126===xt&&(Cn=33326),5131===xt&&(Cn=33325),5121===xt&&(Cn=33321)),33319===Ce&&(5126===xt&&(Cn=33328),5131===xt&&(Cn=33327),5121===xt&&(Cn=33323)),6408===Ce&&(5126===xt&&(Cn=34836),5131===xt&&(Cn=34842),5121===xt&&(Cn=rn===Ui&&!1===fn?35907:32856),32819===xt&&(Cn=32854),32820===xt&&(Cn=32855)),(33325===Cn||33326===Cn||33327===Cn||33328===Cn||34842===Cn||34836===Cn)&&e.get("EXT_color_buffer_float"),Cn}function ie(ze,Ce,xt){return!0===fe(ze,xt)||ze.isFramebufferTexture&&ze.minFilter!==Hr&&ze.minFilter!==Tr?Math.log2(Math.max(Ce.width,Ce.height))+1:void 0!==ze.mipmaps&&ze.mipmaps.length>0?ze.mipmaps.length:ze.isCompressedTexture&&Array.isArray(ze.image)?Ce.mipmaps.length:1}function ye(ze){return ze===Hr||1004===ze||1005===ze?9728:9729}function He(ze){const Ce=ze.target;Ce.removeEventListener("dispose",He),function Ge(ze){const Ce=r.get(ze);if(void 0===Ce.__webglInit)return;const xt=ze.source,rn=k.get(xt);if(rn){const fn=rn[Ce.__cacheKey];fn.usedTimes--,0===fn.usedTimes&&Ve(ze),0===Object.keys(rn).length&&k.delete(xt)}r.remove(ze)}(Ce),Ce.isVideoTexture&&F.delete(Ce)}function qe(ze){const Ce=ze.target;Ce.removeEventListener("dispose",qe),function We(ze){const Ce=ze.texture,xt=r.get(ze),rn=r.get(Ce);if(void 0!==rn.__webglTexture&&(f.deleteTexture(rn.__webglTexture),u.memory.textures--),ze.depthTexture&&ze.depthTexture.dispose(),ze.isWebGLCubeRenderTarget)for(let fn=0;fn<6;fn++)f.deleteFramebuffer(xt.__webglFramebuffer[fn]),xt.__webglDepthbuffer&&f.deleteRenderbuffer(xt.__webglDepthbuffer[fn]);else{if(f.deleteFramebuffer(xt.__webglFramebuffer),xt.__webglDepthbuffer&&f.deleteRenderbuffer(xt.__webglDepthbuffer),xt.__webglMultisampledFramebuffer&&f.deleteFramebuffer(xt.__webglMultisampledFramebuffer),xt.__webglColorRenderbuffer)for(let fn=0;fn<xt.__webglColorRenderbuffer.length;fn++)xt.__webglColorRenderbuffer[fn]&&f.deleteRenderbuffer(xt.__webglColorRenderbuffer[fn]);xt.__webglDepthRenderbuffer&&f.deleteRenderbuffer(xt.__webglDepthRenderbuffer)}if(ze.isWebGLMultipleRenderTargets)for(let fn=0,Cn=Ce.length;fn<Cn;fn++){const _i=r.get(Ce[fn]);_i.__webglTexture&&(f.deleteTexture(_i.__webglTexture),u.memory.textures--),r.remove(Ce[fn])}r.remove(Ce),r.remove(ze)}(Ce)}function Ve(ze){const Ce=r.get(ze);f.deleteTexture(Ce.__webglTexture),delete k.get(ze.source)[Ce.__cacheKey],u.memory.textures--}let nt=0;function bt(ze,Ce){const xt=r.get(ze);if(ze.isVideoTexture&&function Hi(ze){const Ce=u.render.frame;F.get(ze)!==Ce&&(F.set(ze,Ce),ze.update())}(ze),!1===ze.isRenderTargetTexture&&ze.version>0&&xt.__version!==ze.version){const rn=ze.image;if(null===rn)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else{if(!1!==rn.complete)return void Nn(xt,ze,Ce);console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete")}}t.bindTexture(3553,xt.__webglTexture,33984+Ce)}const At={[Zl]:10497,[aa]:33071,[Kf]:33648},Ut={[Hr]:9728,[Pp]:9984,[Cc]:9986,[Tr]:9729,[jl]:9985,[Uo]:9987};function Vt(ze,Ce,xt){if(xt?(f.texParameteri(ze,10242,At[Ce.wrapS]),f.texParameteri(ze,10243,At[Ce.wrapT]),(32879===ze||35866===ze)&&f.texParameteri(ze,32882,At[Ce.wrapR]),f.texParameteri(ze,10240,Ut[Ce.magFilter]),f.texParameteri(ze,10241,Ut[Ce.minFilter])):(f.texParameteri(ze,10242,33071),f.texParameteri(ze,10243,33071),(32879===ze||35866===ze)&&f.texParameteri(ze,32882,33071),(Ce.wrapS!==aa||Ce.wrapT!==aa)&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),f.texParameteri(ze,10240,ye(Ce.magFilter)),f.texParameteri(ze,10241,ye(Ce.minFilter)),Ce.minFilter!==Hr&&Ce.minFilter!==Tr&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),!0===e.has("EXT_texture_filter_anisotropic")){const rn=e.get("EXT_texture_filter_anisotropic");if(Ce.magFilter===Hr||1005!==Ce.minFilter&&Ce.minFilter!==Uo||Ce.type===Os&&!1===e.has("OES_texture_float_linear")||!1===g&&Ce.type===Ka&&!1===e.has("OES_texture_half_float_linear"))return;(Ce.anisotropy>1||r.get(Ce).__currentAnisotropy)&&(f.texParameterf(ze,rn.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(Ce.anisotropy,s.getMaxAnisotropy())),r.get(Ce).__currentAnisotropy=Ce.anisotropy)}}function ut(ze,Ce){let xt=!1;void 0===ze.__webglInit&&(ze.__webglInit=!0,Ce.addEventListener("dispose",He));const rn=Ce.source;let fn=k.get(rn);void 0===fn&&(fn={},k.set(rn,fn));const Cn=function gt(ze){const Ce=[];return Ce.push(ze.wrapS),Ce.push(ze.wrapT),Ce.push(ze.wrapR||0),Ce.push(ze.magFilter),Ce.push(ze.minFilter),Ce.push(ze.anisotropy),Ce.push(ze.internalFormat),Ce.push(ze.format),Ce.push(ze.type),Ce.push(ze.generateMipmaps),Ce.push(ze.premultiplyAlpha),Ce.push(ze.flipY),Ce.push(ze.unpackAlignment),Ce.push(ze.encoding),Ce.join()}(Ce);if(Cn!==ze.__cacheKey){void 0===fn[Cn]&&(fn[Cn]={texture:f.createTexture(),usedTimes:0},u.memory.textures++,xt=!0),fn[Cn].usedTimes++;const _i=fn[ze.__cacheKey];void 0!==_i&&(fn[ze.__cacheKey].usedTimes--,0===_i.usedTimes&&Ve(Ce)),ze.__cacheKey=Cn,ze.__webglTexture=fn[Cn].texture}return xt}function Nn(ze,Ce,xt){let rn=3553;(Ce.isDataArrayTexture||Ce.isCompressedArrayTexture)&&(rn=35866),Ce.isData3DTexture&&(rn=32879);const fn=ut(ze,Ce),Cn=Ce.source;t.bindTexture(rn,ze.__webglTexture,33984+xt);const _i=r.get(Cn);if(Cn.version!==_i.__version||!0===fn){t.activeTexture(33984+xt),f.pixelStorei(37440,Ce.flipY),f.pixelStorei(37441,Ce.premultiplyAlpha),f.pixelStorei(3317,Ce.unpackAlignment),f.pixelStorei(37443,0);const On=function ne(ze){return!g&&(ze.wrapS!==aa||ze.wrapT!==aa||ze.minFilter!==Hr&&ze.minFilter!==Tr)}(Ce)&&!1===W(Ce.image);let Dt=z(Ce.image,On,!1,M);
vendor: 4,489 bytes, line 72
72Dt=cr(Ce,Dt);const Zn=W(Dt)||g,hi=l.convert(Ce.format,Ce.encoding);let ei,si=l.convert(Ce.type),xn=de(Ce.internalFormat,hi,si,Ce.encoding,Ce.isVideoTexture);Vt(rn,Ce,Zn);const Oi=Ce.mipmaps,Ni=g&&!0!==Ce.isVideoTexture,$i=void 0===_i.__version||!0===fn,je=ie(Ce,Dt,Zn);if(Ce.isDepthTexture)xn=6402,g?xn=Ce.type===Os?36012:Ce.type===Tc?33190:Ce.type===Ic?35056:33189:Ce.type===Os&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),Ce.format===ph&&6402===xn&&1012!==Ce.type&&Ce.type!==Tc&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),Ce.type=Tc,si=l.convert(Ce.type)),Ce.format===Ru&&6402===xn&&(xn=34041,Ce.type!==Ic&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),Ce.type=Ic,si=l.convert(Ce.type))),$i&&(Ni?t.texStorage2D(3553,1,xn,Dt.width,Dt.height):t.texImage2D(3553,0,xn,Dt.width,Dt.height,0,hi,si,null));else if(Ce.isDataTexture)if(Oi.length>0&&Zn){Ni&&$i&&t.texStorage2D(3553,je,xn,Oi[0].width,Oi[0].height);for(let Ze=0,sn=Oi.length;Ze<sn;Ze++)ei=Oi[Ze],Ni?t.texSubImage2D(3553,Ze,0,0,ei.width,ei.height,hi,si,ei.data):t.texImage2D(3553,Ze,xn,ei.width,ei.height,0,hi,si,ei.data);Ce.generateMipmaps=!1}else Ni?($i&&t.texStorage2D(3553,je,xn,Dt.width,Dt.height),t.texSubImage2D(3553,0,0,0,Dt.width,Dt.height,hi,si,Dt.data)):t.texImage2D(3553,0,xn,Dt.width,Dt.height,0,hi,si,Dt.data);else if(Ce.isCompressedTexture)if(Ce.isCompressedArrayTexture){Ni&&$i&&t.texStorage3D(35866,je,xn,Oi[0].width,Oi[0].height,Dt.depth);for(let Ze=0,sn=Oi.length;Ze<sn;Ze++)ei=Oi[Ze],Ce.format!==Ns?null!==hi?Ni?t.compressedTexSubImage3D(35866,Ze,0,0,0,ei.width,ei.height,Dt.depth,hi,ei.data,0,0):t.compressedTexImage3D(35866,Ze,xn,ei.width,ei.height,Dt.depth,0,ei.data,0,0):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):Ni?t.texSubImage3D(35866,Ze,0,0,0,ei.width,ei.height,Dt.depth,hi,si,ei.data):t.texImage3D(35866,Ze,xn,ei.width,ei.height,Dt.depth,0,hi,si,ei.data)}else{Ni&&$i&&t.texStorage2D(3553,je,xn,Oi[0].width,Oi[0].height);for(let Ze=0,sn=Oi.length;Ze<sn;Ze++)ei=Oi[Ze],Ce.format!==Ns?null!==hi?Ni?t.compressedTexSubImage2D(3553,Ze,0,0,ei.width,ei.height,hi,ei.data):t.compressedTexImage2D(3553,Ze,xn,ei.width,ei.height,0,ei.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):Ni?t.texSubImage2D(3553,Ze,0,0,ei.width,ei.height,hi,si,ei.data):t.texImage2D(3553,Ze,xn,ei.width,ei.height,0,hi,si,ei.data)}else if(Ce.isDataArrayTexture)Ni?($i&&t.texStorage3D(35866,je,xn,Dt.width,Dt.height,Dt.depth),t.texSubImage3D(35866,0,0,0,0,Dt.width,Dt.height,Dt.depth,hi,si,Dt.data)):t.texImage3D(35866,0,xn,Dt.width,Dt.height,Dt.depth,0,hi,si,Dt.data);else if(Ce.isData3DTexture)Ni?($i&&t.texStorage3D(32879,je,xn,Dt.width,Dt.height,Dt.depth),t.texSubImage3D(32879,0,0,0,0,Dt.width,Dt.height,Dt.depth,hi,si,Dt.data)):t.texImage3D(32879,0,xn,Dt.width,Dt.height,Dt.depth,0,hi,si,Dt.data);else if(Ce.isFramebufferTexture){if($i)if(Ni)t.texStorage2D(3553,je,xn,Dt.width,Dt.height);else{let Ze=Dt.width,sn=Dt.height;for(let kn=0;kn<je;kn++)t.texImage2D(3553,kn,xn,Ze,sn,0,hi,si,null),Ze>>=1,sn>>=1}}else if(Oi.length>0&&Zn){Ni&&$i&&t.texStorage2D(3553,je,xn,Oi[0].width,Oi[0].height);for(let Ze=0,sn=Oi.length;Ze<sn;Ze++)ei=Oi[Ze],Ni?t.texSubImage2D(3553,Ze,0,0,hi,si,ei):t.texImage2D(3553,Ze,xn,hi,si,ei);Ce.generateMipmaps=!1}else Ni?($i&&t.texStorage2D(3553,je,xn,Dt.width,Dt.height),t.texSubImage2D(3553,0,0,0,hi,si,Dt)):t.texImage2D(3553,0,xn,hi,si,Dt);fe(Ce,Zn)&&ge(rn),_i.__version=Cn.version,Ce.onUpdate&&Ce.onUpdate(Ce)}ze.__version=Ce.version}function Gt(ze,Ce,xt,rn,fn){const Cn=l.convert(xt.format,xt.encoding),_i=l.convert(xt.type),On=de(xt.internalFormat,Cn,_i,xt.encoding);r.get(Ce).__hasExternalTextures||(32879===fn||35866===fn?t.texImage3D(fn,0,On,Ce.width,Ce.height,Ce.depth,0,Cn,_i,null):t.texImage2D(fn,0,On,Ce.width,Ce.height,0,Cn,_i,null)),t.bindFramebuffer(36160,ze),ci(Ce)?P.framebufferTexture2DMultisampleEXT(36160,rn,fn,r.get(xt).__webglTexture,0,Ai(Ce)):(3553===fn||fn>=34069&&fn<=34074)&&f.framebufferTexture2D(36160,rn,fn,r.get(xt).__webglTexture,0),t.bindFramebuffer(36160,null)}function Vn(ze,Ce,xt){if(f.bindRenderbuffer(36161,ze),Ce.depthBuffer&&!Ce.stencilBuffer){let rn=33189;if(xt||ci(Ce)){const fn=Ce.depthTexture;fn&&fn.isDepthTexture&&(fn.type===Os?rn=36012:fn.type===Tc&&(rn=33190));const Cn=Ai(Ce);
72ci(Ce)?P.renderbufferStorageMultisampleEXT(36161,Cn,rn,Ce.width,Ce.height):f.renderbufferStorageMultisample(36161,Cn,rn,Ce.width,Ce.height)}else f.renderbufferStorage(36161,rn,Ce.width,Ce.height);f.framebufferRenderbuffer(36160,36096,36161,ze)}else if(Ce.depthBuffer&&Ce.stencilBuffer){const rn=Ai(Ce);xt&&!1===ci(Ce)?f.renderbufferStorageMultisample(36161,rn,35056,Ce.width,Ce.height):ci(Ce)?P.renderbufferStorageMultisampleEXT(36161,rn,35056,Ce.width,Ce.height):f.renderbufferStorage(36161,34041,Ce.width,Ce.height),f.framebufferRenderbuffer(36160,33306,36161,ze)}else{const rn=!0===Ce.isWebGLMultipleRenderTargets?Ce.texture:[Ce.texture];for(let fn=0;fn<rn.length;fn++){const Cn=rn[fn],_i=l.convert(Cn.format,Cn.encoding),On=l.convert(Cn.type),Dt=de(Cn.internalFormat,_i,On,Cn.encoding),Zn=Ai(Ce);xt&&!1===ci(Ce)?f.renderbufferStorageMultisample(36161,Zn,Dt,Ce.width,Ce.height):ci(Ce)?P.renderbufferStorageMultisampleEXT(36161,Zn,Dt,Ce.width,Ce.height):f.renderbufferStorage(36161,Dt,Ce.width,Ce.height)}}f.bindRenderbuffer(36161,null)}function Lt(ze){const Ce=r.get(ze),xt=!0===ze.isWebGLCubeRenderTarget;if(ze.depthTexture&&!Ce.__autoAllocateDepthBuffer){if(xt)throw new Error("target.depthTexture not supported in Cube render targets");!function $t(ze,Ce){if(Ce&&Ce.isWebGLCubeRenderTarget)throw new Error("Depth Texture with cube render targets is not supported");if(t.bindFramebuffer(36160,ze),!Ce.depthTexture||!Ce.depthTexture.isDepthTexture)throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");(!r.get(Ce.depthTexture).__webglTexture||Ce.depthTexture.image.width!==Ce.width||Ce.depthTexture.image.height!==Ce.height)&&(Ce.depthTexture.image.width=Ce.width,Ce.depthTexture.image.height=Ce.height,Ce.depthTexture.needsUpdate=!0),bt(Ce.depthTexture,0);const rn=r.get(Ce.depthTexture).__webglTexture,fn=Ai(Ce);if(Ce.depthTexture.format===ph)ci(Ce)?P.framebufferTexture2DMultisampleEXT(36160,36096,3553,rn,0,fn):f.framebufferTexture2D(36160,36096,3553,rn,0);else{if(Ce.depthTexture.format!==Ru)throw new Error("Unknown depthTexture format");ci(Ce)?P.framebufferTexture2DMultisampleEXT(36160,33306,3553,rn,0,fn):f.framebufferTexture2D(36160,33306,3553,rn,0)}}(Ce.__webglFramebuffer,ze)}else if(xt){Ce.__webglDepthbuffer=[];for(let rn=0;rn<6;rn++)t.bindFramebuffer(36160,Ce.__webglFramebuffer[rn]),Ce.__webglDepthbuffer[rn]=f.createRenderbuffer(),Vn(Ce.__webglDepthbuffer[rn],ze,!1)}else t.bindFramebuffer(36160,Ce.__webglFramebuffer),Ce.__webglDepthbuffer=f.createRenderbuffer(),Vn(Ce.__webglDepthbuffer,ze,!1);t.bindFramebuffer(36160,null)}function Ai(ze){return Math.min(C,ze.samples)}function ci(ze){const Ce=r.get(ze);return g&&ze.samples>0&&!0===e.has("WEBGL_multisampled_render_to_texture")&&!1!==Ce.__useRenderToTexture}function cr(ze,Ce){const xt=ze.encoding,rn=ze.format,fn=ze.type;return!0===ze.isCompressedTexture||!0===ze.isVideoTexture||1035===ze.format||xt!==zo&&(xt===Ui?!1===g?!0===e.has("EXT_sRGB")&&rn===Ns?(ze.format=1035,ze.minFilter=Tr,ze.generateMipmaps=!1):Ce=zu.sRGBToLinear(Ce):(rn!==Ns||fn!==rs)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture encoding:",xt)),Ce}this.allocateTextureUnit=function tt(){const ze=nt;return ze>=_&&console.warn("THREE.WebGLTextures: Trying to use "+ze+" texture units while this GPU supports only "+_),nt+=1,ze},this.resetTextureUnits=function et(){nt=0},this.setTexture2D=bt,this.setTexture2DArray=function jt(ze,Ce){const xt=r.get(ze);ze.version>0&&xt.__version!==ze.version?Nn(xt,ze,Ce):t.bindTexture(35866,xt.__webglTexture,33984+Ce)},this.setTexture3D=function Qt(ze,Ce){const xt=r.get(ze);ze.version>0&&xt.__version!==ze.version?Nn(xt,ze,Ce):t.bindTexture(32879,xt.__webglTexture,33984+Ce)},this.setTextureCube=function ct(ze,Ce){const xt=r.get(ze);ze.version>0&&xt.__version!==ze.version?function ni(ze,Ce,xt){if(6!==Ce.image.length)return;const rn=ut(ze,Ce),fn=Ce.source;t.bindTexture(34067,ze.__webglTexture,33984+xt);const Cn=r.get(fn);if(fn.version!==Cn.__version||!0===rn){t.activeTexture(33984+xt),f.pixelStorei(37440,Ce.flipY),f.pixelStorei(37441,Ce.premultiplyAlpha),f.pixelStorei(3317,Ce.unpackAlignment),f.pixelStorei(37443,0);const _i=Ce.isCompressedTexture||Ce.image[0].isCompressedTexture,On=Ce.image[0]&&Ce.image[0].isDataTexture,Dt=[];for(let Ze=0;Ze<6;Ze++)Dt[Ze]=_i||On?On?Ce.image[Ze].image:Ce.image[Ze]:z(Ce.image[Ze],!1,!0,x),Dt[Ze]=cr(Ce,Dt[Ze]);const Zn=Dt[0],hi=W(Zn)||g,si=l.convert(Ce.format,Ce.encoding),xn=l.convert(Ce.type),ei=de(Ce.internalFormat,si,xn,Ce.encoding),Oi=g&&!0!==Ce.isVideoTexture,Ni=void 0===Cn.__version||!0===rn;let je,$i=ie(Ce,Zn,hi);
vendor: 4,253 bytes, line 72
72if(Vt(34067,Ce,hi),_i){Oi&&Ni&&t.texStorage2D(34067,$i,ei,Zn.width,Zn.height);for(let Ze=0;Ze<6;Ze++){je=Dt[Ze].mipmaps;for(let sn=0;sn<je.length;sn++){const kn=je[sn];Ce.format!==Ns?null!==si?Oi?t.compressedTexSubImage2D(34069+Ze,sn,0,0,kn.width,kn.height,si,kn.data):t.compressedTexImage2D(34069+Ze,sn,ei,kn.width,kn.height,0,kn.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):Oi?t.texSubImage2D(34069+Ze,sn,0,0,kn.width,kn.height,si,xn,kn.data):t.texImage2D(34069+Ze,sn,ei,kn.width,kn.height,0,si,xn,kn.data)}}}else{je=Ce.mipmaps,Oi&&Ni&&(je.length>0&&$i++,t.texStorage2D(34067,$i,ei,Dt[0].width,Dt[0].height));for(let Ze=0;Ze<6;Ze++)if(On){Oi?t.texSubImage2D(34069+Ze,0,0,0,Dt[Ze].width,Dt[Ze].height,si,xn,Dt[Ze].data):t.texImage2D(34069+Ze,0,ei,Dt[Ze].width,Dt[Ze].height,0,si,xn,Dt[Ze].data);for(let sn=0;sn<je.length;sn++){const ii=je[sn].image[Ze].image;Oi?t.texSubImage2D(34069+Ze,sn+1,0,0,ii.width,ii.height,si,xn,ii.data):t.texImage2D(34069+Ze,sn+1,ei,ii.width,ii.height,0,si,xn,ii.data)}}else{Oi?t.texSubImage2D(34069+Ze,0,0,0,si,xn,Dt[Ze]):t.texImage2D(34069+Ze,0,ei,si,xn,Dt[Ze]);for(let sn=0;sn<je.length;sn++){const kn=je[sn];Oi?t.texSubImage2D(34069+Ze,sn+1,0,0,si,xn,kn.image[Ze]):t.texImage2D(34069+Ze,sn+1,ei,si,xn,kn.image[Ze])}}}fe(Ce,hi)&&ge(34067),Cn.__version=fn.version,Ce.onUpdate&&Ce.onUpdate(Ce)}ze.__version=Ce.version}(xt,ze,Ce):t.bindTexture(34067,xt.__webglTexture,33984+Ce)},this.rebindTextures=function Xt(ze,Ce,xt){const rn=r.get(ze);void 0!==Ce&&Gt(rn.__webglFramebuffer,ze,ze.texture,36064,3553),void 0!==xt&&Lt(ze)},this.setupRenderTarget=function Qn(ze){const Ce=ze.texture,xt=r.get(ze),rn=r.get(Ce);ze.addEventListener("dispose",qe),!0!==ze.isWebGLMultipleRenderTargets&&(void 0===rn.__webglTexture&&(rn.__webglTexture=f.createTexture()),rn.__version=Ce.version,u.memory.textures++);const fn=!0===ze.isWebGLCubeRenderTarget,Cn=!0===ze.isWebGLMultipleRenderTargets,_i=W(ze)||g;if(fn){xt.__webglFramebuffer=[];for(let On=0;On<6;On++)xt.__webglFramebuffer[On]=f.createFramebuffer()}else{if(xt.__webglFramebuffer=f.createFramebuffer(),Cn)if(s.drawBuffers){const On=ze.texture;for(let Dt=0,Zn=On.length;Dt<Zn;Dt++){const hi=r.get(On[Dt]);void 0===hi.__webglTexture&&(hi.__webglTexture=f.createTexture(),u.memory.textures++)}}else console.warn("THREE.WebGLRenderer: WebGLMultipleRenderTargets can only be used with WebGL2 or WEBGL_draw_buffers extension.");if(g&&ze.samples>0&&!1===ci(ze)){const On=Cn?Ce:[Ce];xt.__webglMultisampledFramebuffer=f.createFramebuffer(),xt.__webglColorRenderbuffer=[],t.bindFramebuffer(36160,xt.__webglMultisampledFramebuffer);for(let Dt=0;Dt<On.length;Dt++){const Zn=On[Dt];xt.__webglColorRenderbuffer[Dt]=f.createRenderbuffer(),f.bindRenderbuffer(36161,xt.__webglColorRenderbuffer[Dt]);const hi=l.convert(Zn.format,Zn.encoding),si=l.convert(Zn.type),xn=de(Zn.internalFormat,hi,si,Zn.encoding,!0===ze.isXRRenderTarget),ei=Ai(ze);f.renderbufferStorageMultisample(36161,ei,xn,ze.width,ze.height),f.framebufferRenderbuffer(36160,36064+Dt,36161,xt.__webglColorRenderbuffer[Dt])}f.bindRenderbuffer(36161,null),ze.depthBuffer&&(xt.__webglDepthRenderbuffer=f.createRenderbuffer(),Vn(xt.__webglDepthRenderbuffer,ze,!0)),t.bindFramebuffer(36160,null)}}if(fn){t.bindTexture(34067,rn.__webglTexture),Vt(34067,Ce,_i);for(let On=0;On<6;On++)Gt(xt.__webglFramebuffer[On],ze,Ce,36064,34069+On);fe(Ce,_i)&&ge(34067),t.unbindTexture()}else if(Cn){const On=ze.texture;for(let Dt=0,Zn=On.length;Dt<Zn;Dt++){const hi=On[Dt],si=r.get(hi);t.bindTexture(3553,si.__webglTexture),Vt(3553,hi,_i),Gt(xt.__webglFramebuffer,ze,hi,36064+Dt,3553),fe(hi,_i)&&ge(3553)}t.unbindTexture()}else{let On=3553;(ze.isWebGL3DRenderTarget||ze.isWebGLArrayRenderTarget)&&(g?On=ze.isWebGL3DRenderTarget?32879:35866:console.error("THREE.WebGLTextures: THREE.Data3DTexture and THREE.DataArrayTexture only supported with WebGL2.")),t.bindTexture(On,rn.__webglTexture),Vt(On,Ce,_i),Gt(xt.__webglFramebuffer,ze,Ce,36064,On),fe(Ce,_i)&&ge(On),t.unbindTexture()}ze.depthBuffer&&Lt(ze)},this.updateRenderTargetMipmap=function Sn(ze){const Ce=W(ze)||g,xt=!0===ze.isWebGLMultipleRenderTargets?ze.texture:[ze.texture];for(let rn=0,fn=xt.length;rn<fn;rn++){const Cn=xt[rn];
72if(fe(Cn,Ce)){const _i=ze.isWebGLCubeRenderTarget?34067:3553,On=r.get(Cn).__webglTexture;t.bindTexture(_i,On),ge(_i),t.unbindTexture()}}},this.updateMultisampleRenderTarget=function gi(ze){if(g&&ze.samples>0&&!1===ci(ze)){const Ce=ze.isWebGLMultipleRenderTargets?ze.texture:[ze.texture],xt=ze.width,rn=ze.height;let fn=16384;const Cn=[],_i=ze.stencilBuffer?33306:36096,On=r.get(ze),Dt=!0===ze.isWebGLMultipleRenderTargets;if(Dt)for(let Zn=0;Zn<Ce.length;Zn++)t.bindFramebuffer(36160,On.__webglMultisampledFramebuffer),f.framebufferRenderbuffer(36160,36064+Zn,36161,null),t.bindFramebuffer(36160,On.__webglFramebuffer),f.framebufferTexture2D(36009,36064+Zn,3553,null,0);t.bindFramebuffer(36008,On.__webglMultisampledFramebuffer),t.bindFramebuffer(36009,On.__webglFramebuffer);for(let Zn=0;Zn<Ce.length;Zn++){Cn.push(36064+Zn),ze.depthBuffer&&Cn.push(_i);const hi=void 0!==On.__ignoreDepthValues&&On.__ignoreDepthValues;if(!1===hi&&(ze.depthBuffer&&(fn|=256),ze.stencilBuffer&&(fn|=1024)),Dt&&f.framebufferRenderbuffer(36008,36064,36161,On.__webglColorRenderbuffer[Zn]),!0===hi&&(f.invalidateFramebuffer(36008,[_i]),f.invalidateFramebuffer(36009,[_i])),Dt){const si=r.get(Ce[Zn]).__webglTexture;f.framebufferTexture2D(36009,36064,3553,si,0)}f.blitFramebuffer(0,0,xt,rn,0,0,xt,rn,fn,9728),R&&f.invalidateFramebuffer(36008,Cn)}if(t.bindFramebuffer(36008,null),t.bindFramebuffer(36009,null),Dt)for(let Zn=0;Zn<Ce.length;Zn++){t.bindFramebuffer(36160,On.__webglMultisampledFramebuffer),f.framebufferRenderbuffer(36160,36064+Zn,36161,On.__webglColorRenderbuffer[Zn]);const hi=r.get(Ce[Zn]).__webglTexture;t.bindFramebuffer(36160,On.__webglFramebuffer),f.framebufferTexture2D(36009,36064+Zn,3553,hi,0)}t.bindFramebuffer(36009,On.__webglMultisampledFramebuffer)}},this.setupDepthRenderbuffer=Lt,this.setupFrameBufferTexture=Gt,this.useMultisampledRTT=ci}function I0(f,e,t){const r=t.isWebGL2;return{convert:function s(l,u=null){let g;if(l===rs)return 5121;if(1017===l)return 32819;if(1018===l)return 32820;if(1010===l)return 5120;if(1011===l)return 5122;if(1012===l)return 5123;if(1013===l)return 5124;if(l===Tc)return 5125;if(l===Os)return 5126;if(l===Ka)return r?5131:(g=e.get("OES_texture_half_float"),null!==g?g.HALF_FLOAT_OES:null);if(1021===l)return 6406;if(l===Ns)return 6408;if(1024===l)return 6409;if(1025===l)return 6410;if(l===ph)return 6402;if(l===Ru)return 34041;if(1035===l)return g=e.get("EXT_sRGB"),null!==g?g.SRGB_ALPHA_EXT:null;if(l===Bu)return 6403;if(1029===l)return 36244;if(l===jf)return 33319;if(1031===l)return 33320;if(1033===l)return 36249;if(l===Jf||33777===l||33778===l||l===ed)if(u===Ui){if(g=e.get("WEBGL_compressed_texture_s3tc_srgb"),null===g)return null;if(l===Jf)return g.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(33777===l)return g.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(33778===l)return g.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(l===ed)return g.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else{if(g=e.get("WEBGL_compressed_texture_s3tc"),null===g)return null;if(l===Jf)return g.COMPRESSED_RGB_S3TC_DXT1_EXT;if(33777===l)return g.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(33778===l)return g.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(l===ed)return g.COMPRESSED_RGBA_S3TC_DXT5_EXT}if(35840===l||35841===l||35842===l||35843===l){if(g=e.get("WEBGL_compressed_texture_pvrtc"),null===g)return null;if(35840===l)return g.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(35841===l)return g.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(35842===l)return g.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(35843===l)return g.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}if(36196===l)return g=e.get("WEBGL_compressed_texture_etc1"),null!==g?g.COMPRESSED_RGB_ETC1_WEBGL:null;if(37492===l||37496===l){if(g=e.get("WEBGL_compressed_texture_etc"),null===g)return null;if(37492===l)return u===Ui?g.COMPRESSED_SRGB8_ETC2:g.COMPRESSED_RGB8_ETC2;if(37496===l)return u===Ui?g.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:g.COMPRESSED_RGBA8_ETC2_EAC}if(37808===l||37809===l||37810===l||37811===l||37812===l||37813===l||37814===l||37815===l||37816===l||37817===l||37818===l||37819===l||37820===l||37821===l){if(g=e.get("WEBGL_compressed_texture_astc"),null===g)return null;if(37808===l)return u===Ui?g.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:g.COMPRESSED_RGBA_ASTC_4x4_KHR;if(37809===l)return u===Ui?g.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:g.COMPRESSED_RGBA_ASTC_5x4_KHR;if(37810===l)return u===Ui?g.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:g.COMPRESSED_RGBA_ASTC_5x5_KHR;if(37811===l)return u===Ui?g.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:g.COMPRESSED_RGBA_ASTC_6x5_KHR;if(37812===l)return u===Ui?g.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:g.COMPRESSED_RGBA_ASTC_6x6_KHR;if(37813===l)return u===Ui?g.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:g.COMPRESSED_RGBA_ASTC_8x5_KHR;if(37814===l)return u===Ui?g.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:g.COMPRESSED_RGBA_ASTC_8x6_KHR;if(37815===l)return u===Ui?g.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:g.COMPRESSED_RGBA_ASTC_8x8_KHR;if(37816===l)return u===Ui?g.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:g.COMPRESSED_RGBA_ASTC_10x5_KHR;if(37817===l)return u===Ui?g.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:g.COMPRESSED_RGBA_ASTC_10x6_KHR;if(37818===l)return u===Ui?g.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:g.COMPRESSED_RGBA_ASTC_10x8_KHR;if(37819===l)return u===Ui?g.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:g.COMPRESSED_RGBA_ASTC_10x10_KHR;if(37820===l)return u===Ui?g.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:g.COMPRESSED_RGBA_ASTC_12x10_KHR;if(37821===l)return u===Ui?g.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:g.COMPRESSED_RGBA_ASTC_12x12_KHR}
vendor: 6,829 bytes, line 72
72if(l===kp){if(g=e.get("EXT_texture_compression_bptc"),null===g)return null;if(l===kp)return u===Ui?g.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:g.COMPRESSED_RGBA_BPTC_UNORM_EXT}if(36283===l||36284===l||36285===l||36286===l){if(g=e.get("EXT_texture_compression_rgtc"),null===g)return null;if(l===kp)return g.COMPRESSED_RED_RGTC1_EXT;if(36284===l)return g.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(36285===l)return g.COMPRESSED_RED_GREEN_RGTC2_EXT;if(36286===l)return g.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}return l===Ic?r?34042:(g=e.get("WEBGL_depth_texture"),null!==g?g.UNSIGNED_INT_24_8_WEBGL:null):void 0!==f[l]?f[l]:null}}}class Gs extends Wr{constructor(e=[]){super(),this.isArrayCamera=!0,this.cameras=e}}class Ga extends or{constructor(){super(),this.isGroup=!0,this.type="Group"}}const fy={type:"move"};class Hh{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return null===this._hand&&(this._hand=new Ga,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return null===this._targetRay&&(this._targetRay=new Ga,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new Me,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new Me),this._targetRay}getGripSpace(){return null===this._grip&&(this._grip=new Ga,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new Me,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new Me),this._grip}dispatchEvent(e){return null!==this._targetRay&&this._targetRay.dispatchEvent(e),null!==this._grip&&this._grip.dispatchEvent(e),null!==this._hand&&this._hand.dispatchEvent(e),this}connect(e){if(e&&e.hand){const t=this._hand;if(t)for(const r of e.hand.values())this._getHandJoint(t,r)}return this.dispatchEvent({type:"connected",data:e}),this}disconnect(e){return this.dispatchEvent({type:"disconnected",data:e}),null!==this._targetRay&&(this._targetRay.visible=!1),null!==this._grip&&(this._grip.visible=!1),null!==this._hand&&(this._hand.visible=!1),this}update(e,t,r){let s=null,l=null,u=null;const g=this._targetRay,_=this._grip,x=this._hand;if(e&&"visible-blurred"!==t.session.visibilityState){if(x&&e.hand){u=!0;for(const O of e.hand.values()){const k=t.getJointPose(O,r),L=this._getHandJoint(x,O);null!==k&&(L.matrix.fromArray(k.transform.matrix),L.matrix.decompose(L.position,L.rotation,L.scale),L.jointRadius=k.radius),L.visible=null!==k}const P=x.joints["index-finger-tip"].position.distanceTo(x.joints["thumb-tip"].position),R=.02,F=.005;x.inputState.pinching&&P>R+F?(x.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!x.inputState.pinching&&P<=R-F&&(x.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else null!==_&&e.gripSpace&&(l=t.getPose(e.gripSpace,r),null!==l&&(_.matrix.fromArray(l.transform.matrix),_.matrix.decompose(_.position,_.rotation,_.scale),l.linearVelocity?(_.hasLinearVelocity=!0,_.linearVelocity.copy(l.linearVelocity)):_.hasLinearVelocity=!1,l.angularVelocity?(_.hasAngularVelocity=!0,_.angularVelocity.copy(l.angularVelocity)):_.hasAngularVelocity=!1));null!==g&&(s=t.getPose(e.targetRaySpace,r),null===s&&null!==l&&(s=l),null!==s&&(g.matrix.fromArray(s.transform.matrix),g.matrix.decompose(g.position,g.rotation,g.scale),s.linearVelocity?(g.hasLinearVelocity=!0,g.linearVelocity.copy(s.linearVelocity)):g.hasLinearVelocity=!1,s.angularVelocity?(g.hasAngularVelocity=!0,g.angularVelocity.copy(s.angularVelocity)):g.hasAngularVelocity=!1,this.dispatchEvent(fy)))}return null!==g&&(g.visible=null!==s),null!==_&&(_.visible=null!==l),null!==x&&(x.visible=null!==u),this}_getHandJoint(e,t){if(void 0===e.joints[t.jointName]){const r=new Ga;r.matrixAutoUpdate=!1,r.visible=!1,e.joints[t.jointName]=r,e.add(r)}return e.joints[t.jointName]}}class P0 extends ws{constructor(e,t,r,s,l,u,g,_,x,M){if((M=void 0!==M?M:ph)!==ph&&M!==Ru)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");void 0===r&&M===ph&&(r=Tc),void 0===r&&M===Ru&&(r=Ic),super(null,s,l,u,g,_,M,r,x),this.isDepthTexture=!0,this.image={width:e,height:t},this.magFilter=void 0!==g?g:Hr,this.minFilter=void 0!==_?_:Hr,this.flipY=!1,this.generateMipmaps=!1}}class Ma extends Pc{constructor(e,t){super();const r=this;let s=null,l=1,u=null,g="local-floor",_=1,x=null,M=null,C=null,P=null,R=null,F=null;const O=t.getContextAttributes();let k=null,L=null;const V=[],z=[],W=new Set,ne=new Map,fe=new Wr;fe.layers.enable(1),fe.viewport=new Ar;const ge=new Wr;ge.layers.enable(2),ge.viewport=new Ar;const de=[fe,ge],ie=new Gs;ie.layers.enable(1),ie.layers.enable(2);let ye=null,He=null;function qe(ct){const At=z.indexOf(ct.inputSource);if(-1===At)return;const Ut=V[At];void 0!==Ut&&Ut.dispatchEvent({type:ct.type,data:ct.inputSource})}function Ge(){s.removeEventListener("select",qe),s.removeEventListener("selectstart",qe),s.removeEventListener("selectend",qe),s.removeEventListener("squeeze",qe),s.removeEventListener("squeezestart",qe),s.removeEventListener("squeezeend",qe),s.removeEventListener("end",Ge),s.removeEventListener("inputsourceschange",Ve);for(let ct=0;ct<V.length;ct++){const At=z[ct];null!==At&&(z[ct]=null,V[ct].disconnect(At))}ye=null,He=null,e.setRenderTarget(k),R=null,P=null,C=null,s=null,L=null,Qt.stop(),r.isPresenting=!1,r.dispatchEvent({type:"sessionend"})}function Ve(ct){for(let At=0;At<ct.removed.length;At++){const Ut=ct.removed[At],Vt=z.indexOf(Ut);Vt>=0&&(z[Vt]=null,V[Vt].disconnect(Ut))}for(let At=0;At<ct.added.length;At++){const Ut=ct.added[At];let Vt=z.indexOf(Ut);if(-1===Vt){for(let Nn=0;Nn<V.length;Nn++){if(Nn>=z.length){z.push(Ut),Vt=Nn;break}if(null===z[Nn]){z[Nn]=Ut,Vt=Nn;break}}if(-1===Vt)break}const ut=V[Vt];ut&&ut.connect(Ut)}}this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(ct){let At=V[ct];return void 0===At&&(At=new Hh,V[ct]=At),At.getTargetRaySpace()},this.getControllerGrip=function(ct){let At=V[ct];return void 0===At&&(At=new Hh,V[ct]=At),At.getGripSpace()},this.getHand=function(ct){let At=V[ct];return void 0===At&&(At=new Hh,V[ct]=At),At.getHandSpace()},this.setFramebufferScaleFactor=function(ct){l=ct,!0===r.isPresenting&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(ct){g=ct,!0===r.isPresenting&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return x||u},this.setReferenceSpace=function(ct){x=ct},this.getBaseLayer=function(){return null!==P?P:R},this.getBinding=function(){return C},this.getFrame=function(){return F}
72,this.getSession=function(){return s},this.setSession=function(){var ct=(0,xi.A)(function*(At){if(s=At,null!==s){if(k=e.getRenderTarget(),s.addEventListener("select",qe),s.addEventListener("selectstart",qe),s.addEventListener("selectend",qe),s.addEventListener("squeeze",qe),s.addEventListener("squeezestart",qe),s.addEventListener("squeezeend",qe),s.addEventListener("end",Ge),s.addEventListener("inputsourceschange",Ve),!0!==O.xrCompatible&&(yield t.makeXRCompatible()),void 0===s.renderState.layers||!1===e.capabilities.isWebGL2)R=new XRWebGLLayer(s,t,{antialias:void 0!==s.renderState.layers||O.antialias,alpha:O.alpha,depth:O.depth,stencil:O.stencil,framebufferScaleFactor:l}),s.updateRenderState({baseLayer:R}),L=new Ks(R.framebufferWidth,R.framebufferHeight,{format:Ns,type:rs,encoding:e.outputEncoding,stencilBuffer:O.stencil});else{let Ut=null,Vt=null,ut=null;O.depth&&(ut=O.stencil?35056:33190,Ut=O.stencil?Ru:ph,Vt=O.stencil?Ic:Tc);const Nn={colorFormat:32856,depthFormat:ut,scaleFactor:l};C=new XRWebGLBinding(s,t),P=C.createProjectionLayer(Nn),s.updateRenderState({layers:[P]}),L=new Ks(P.textureWidth,P.textureHeight,{format:Ns,type:rs,depthTexture:new P0(P.textureWidth,P.textureHeight,Vt,void 0,void 0,void 0,void 0,void 0,void 0,Ut),stencilBuffer:O.stencil,encoding:e.outputEncoding,samples:O.antialias?4:0}),e.properties.get(L).__ignoreDepthValues=P.ignoreDepthValues}L.isXRRenderTarget=!0,this.setFoveation(_),x=null,u=yield s.requestReferenceSpace(g),Qt.setContext(s),Qt.start(),r.isPresenting=!0,r.dispatchEvent({type:"sessionstart"})}});return function(At){return ct.apply(this,arguments)}}();const We=new Me,nt=new Me;function tt(ct,At){null===At?ct.matrixWorld.copy(ct.matrix):ct.matrixWorld.multiplyMatrices(At.matrixWorld,ct.matrix),ct.matrixWorldInverse.copy(ct.matrixWorld).invert()}this.updateCamera=function(ct){if(null===s)return;ie.near=ge.near=fe.near=ct.near,ie.far=ge.far=fe.far=ct.far,(ye!==ie.near||He!==ie.far)&&(s.updateRenderState({depthNear:ie.near,depthFar:ie.far}),ye=ie.near,He=ie.far);const At=ct.parent,Ut=ie.cameras;tt(ie,At);for(let Vt=0;Vt<Ut.length;Vt++)tt(Ut[Vt],At);2===Ut.length?function et(ct,At,Ut){We.setFromMatrixPosition(At.matrixWorld),nt.setFromMatrixPosition(Ut.matrixWorld);const Vt=We.distanceTo(nt),ut=At.projectionMatrix.elements,Nn=Ut.projectionMatrix.elements,ni=ut[14]/(ut[10]-1),Gt=ut[14]/(ut[10]+1),Vn=(ut[9]+1)/ut[5],$t=(ut[9]-1)/ut[5],Lt=(ut[8]-1)/ut[0],Xt=(Nn[8]+1)/Nn[0],Qn=ni*Lt,Sn=ni*Xt,gi=Vt/(-Lt+Xt),Ai=gi*-Lt;At.matrixWorld.decompose(ct.position,ct.quaternion,ct.scale),ct.translateX(Ai),ct.translateZ(gi),ct.matrixWorld.compose(ct.position,ct.quaternion,ct.scale),ct.matrixWorldInverse.copy(ct.matrixWorld).invert();const ci=ni+gi,Hi=Gt+gi;ct.projectionMatrix.makePerspective(Qn-Ai,Sn+(Vt-Ai),Vn*Gt/Hi*ci,$t*Gt/Hi*ci,ci,Hi),ct.projectionMatrixInverse.copy(ct.projectionMatrix).invert()}(ie,fe,ge):ie.projectionMatrix.copy(fe.projectionMatrix),function gt(ct,At,Ut){null===Ut?ct.matrix.copy(At.matrixWorld):(ct.matrix.copy(Ut.matrixWorld),ct.matrix.invert(),ct.matrix.multiply(At.matrixWorld)),ct.matrix.decompose(ct.position,ct.quaternion,ct.scale),ct.updateMatrixWorld(!0);const Vt=ct.children;for(let ut=0,Nn=Vt.length;ut<Nn;ut++)Vt[ut].updateMatrixWorld(!0);ct.projectionMatrix.copy(At.projectionMatrix),ct.projectionMatrixInverse.copy(At.projectionMatrixInverse),ct.isPerspectiveCamera&&(ct.fov=2*Nu*Math.atan(1/ct.projectionMatrix.elements[5]),ct.zoom=1)}(ct,ie,At)},this.getCamera=function(){return ie},this.getFoveation=function(){if(null!==P||null!==R)return _},this.setFoveation=function(ct){_=ct,null!==P&&(P.fixedFoveation=ct),null!==R&&void 0!==R.fixedFoveation&&(R.fixedFoveation=ct)},this.getPlanes=function(){return W};let bt=null;const Qt=new c0;Qt.setAnimationLoop(function jt(ct,At){if(M=At.getViewerPose(x||u),F=At,null!==M){const Ut=M.views;null!==R&&(e.setRenderTargetFramebuffer(L,R.framebuffer),e.setRenderTarget(L));let Vt=!1;Ut.length!==ie.cameras.length&&(ie.cameras.length=0,Vt=!0);for(let ut=0;ut<Ut.length;ut++){const Nn=Ut[ut];let ni=null;if(null!==R)ni=R.getViewport(Nn);else{const Vn=C.getViewSubImage(P,Nn);ni=Vn.viewport,0===ut&&(e.setRenderTargetTextures(L,Vn.colorTexture,P.ignoreDepthValues?void 0:Vn.depthStencilTexture),e.setRenderTarget(L))}let Gt=de[ut];void 0===Gt&&(Gt=new Wr,Gt.layers.enable(ut),Gt.viewport=new Ar,de[ut]=Gt),Gt.matrix.fromArray(Nn.transform.matrix),Gt.matrix.decompose(Gt.position,Gt.quaternion,Gt.scale),Gt.projectionMatrix.fromArray(Nn.projectionMatrix),Gt.projectionMatrixInverse.copy(Gt.projectionMatrix).invert(),Gt.viewport.set(ni.x,ni.y,ni.width,ni.height),0===ut&&(ie.matrix.copy(Gt.matrix),ie.matrix.decompose(ie.position,ie.quaternion,ie.scale)),!0===Vt&&ie.cameras.push(Gt)}}for(let Ut=0;Ut<V.length;Ut++){const Vt=z[Ut],ut=V[Ut];null!==Vt&&void 0!==ut&&ut.update(Vt,At,x||u)}
72if(bt&&bt(ct,At),At.detectedPlanes){r.dispatchEvent({type:"planesdetected",data:At.detectedPlanes});let Ut=null;for(const Vt of W)At.detectedPlanes.has(Vt)||(null===Ut&&(Ut=[]),Ut.push(Vt));if(null!==Ut)for(const Vt of Ut)W.delete(Vt),ne.delete(Vt),r.dispatchEvent({type:"planeremoved",data:Vt});for(const Vt of At.detectedPlanes)if(W.has(Vt)){const ut=ne.get(Vt);Vt.lastChangedTime>ut&&(ne.set(Vt,Vt.lastChangedTime),r.dispatchEvent({type:"planechanged",data:Vt}))}else W.add(Vt),ne.set(Vt,At.lastChangedTime),r.dispatchEvent({type:"planeadded",data:Vt})}F=null}),this.setAnimationLoop=function(ct){bt=ct},this.dispose=function(){}}}function Qh(f,e){function t(k,L){!0===k.matrixAutoUpdate&&k.updateMatrix(),L.value.copy(k.matrix)}function l(k,L){k.opacity.value=L.opacity,L.color&&k.diffuse.value.copy(L.color),L.emissive&&k.emissive.value.copy(L.emissive).multiplyScalar(L.emissiveIntensity),L.map&&(k.map.value=L.map,t(L.map,k.mapTransform)),L.alphaMap&&(k.alphaMap.value=L.alphaMap,t(L.alphaMap,k.alphaMapTransform)),L.bumpMap&&(k.bumpMap.value=L.bumpMap,t(L.bumpMap,k.bumpMapTransform),k.bumpScale.value=L.bumpScale,1===L.side&&(k.bumpScale.value*=-1)),L.normalMap&&(k.normalMap.value=L.normalMap,t(L.normalMap,k.normalMapTransform),k.normalScale.value.copy(L.normalScale),1===L.side&&k.normalScale.value.negate()),L.displacementMap&&(k.displacementMap.value=L.displacementMap,t(L.displacementMap,k.displacementMapTransform),k.displacementScale.value=L.displacementScale,k.displacementBias.value=L.displacementBias),L.emissiveMap&&(k.emissiveMap.value=L.emissiveMap,t(L.emissiveMap,k.emissiveMapTransform)),L.specularMap&&(k.specularMap.value=L.specularMap,t(L.specularMap,k.specularMapTransform)),L.alphaTest>0&&(k.alphaTest.value=L.alphaTest);const V=e.get(L).envMap;if(V&&(k.envMap.value=V,k.flipEnvMap.value=V.isCubeTexture&&!1===V.isRenderTargetTexture?-1:1,k.reflectivity.value=L.reflectivity,k.ior.value=L.ior,k.refractionRatio.value=L.refractionRatio),L.lightMap){k.lightMap.value=L.lightMap;const z=!0===f.useLegacyLights?Math.PI:1;k.lightMapIntensity.value=L.lightMapIntensity*z,t(L.lightMap,k.lightMapTransform)}L.aoMap&&(k.aoMap.value=L.aoMap,k.aoMapIntensity.value=L.aoMapIntensity,t(L.aoMap,k.aoMapTransform))}return{refreshFogUniforms:function r(k,L){L.color.getRGB(k.fogColor.value,bv(f)),L.isFog?(k.fogNear.value=L.near,k.fogFar.value=L.far):L.isFogExp2&&(k.fogDensity.value=L.density)},refreshMaterialUniforms:function s(k,L,V,z,W){L.isMeshBasicMaterial||L.isMeshLambertMaterial?l(k,L):L.isMeshToonMaterial?(l(k,L),function C(k,L){L.gradientMap&&(k.gradientMap.value=L.gradientMap)}(k,L)):L.isMeshPhongMaterial?(l(k,L),function M(k,L){k.specular.value.copy(L.specular),k.shininess.value=Math.max(L.shininess,1e-4)}(k,L)):L.isMeshStandardMaterial?(l(k,L),function P(k,L){k.metalness.value=L.metalness,L.metalnessMap&&(k.metalnessMap.value=L.metalnessMap,t(L.metalnessMap,k.metalnessMapTransform)),k.roughness.value=L.roughness,L.roughnessMap&&(k.roughnessMap.value=L.roughnessMap,t(L.roughnessMap,k.roughnessMapTransform)),e.get(L).envMap&&(k.envMapIntensity.value=L.envMapIntensity)}(k,L),L.isMeshPhysicalMaterial&&function R(k,L,V){k.ior.value=L.ior,L.sheen>0&&(k.sheenColor.value.copy(L.sheenColor).multiplyScalar(L.sheen),k.sheenRoughness.value=L.sheenRoughness,L.sheenColorMap&&(k.sheenColorMap.value=L.sheenColorMap,t(L.sheenColorMap,k.sheenColorMapTransform)),L.sheenRoughnessMap&&(k.sheenRoughnessMap.value=L.sheenRoughnessMap,t(L.sheenRoughnessMap,k.sheenRoughnessMapTransform))),L.clearcoat>0&&(k.clearcoat.value=L.clearcoat,k.clearcoatRoughness.value=L.clearcoatRoughness,L.clearcoatMap&&(k.clearcoatMap.value=L.clearcoatMap,t(L.clearcoatMap,k.clearcoatMapTransform)),L.clearcoatRoughnessMap&&(k.clearcoatRoughnessMap.value=L.clearcoatRoughnessMap,t(L.clearcoatRoughnessMap,k.clearcoatRoughnessMapTransform)),L.clearcoatNormalMap&&(k.clearcoatNormalMap.value=L.clearcoatNormalMap,t(L.clearcoatNormalMap,k.clearcoatNormalMapTransform),k.clearcoatNormalScale.value.copy(L.clearcoatNormalScale),1===L.side&&k.clearcoatNormalScale.value.negate())),L.iridescence>0&&(k.iridescence.value=L.iridescence,k.iridescenceIOR.value=L.iridescenceIOR,k.iridescenceThicknessMinimum.value=L.iridescenceThicknessRange[0],k.iridescenceThicknessMaximum.value=L.iridescenceThicknessRange[1],L.iridescenceMap&&(k.iridescenceMap.value=L.iridescenceMap,t(L.iridescenceMap,k.iridescenceMapTransform)),L.iridescenceThicknessMap&&(k.iridescenceThicknessMap.value=L.iridescenceThicknessMap,t(L.iridescenceThicknessMap,k.iridescenceThicknessMapTransform))),L.transmission>0&&(k.transmission.value=L.transmission,k.transmissionSamplerMap.value=V.texture,k.transmissionSamplerSize.value.set(V.width,V.height),L.transmissionMap&&(k.transmissionMap.value=L.transmissionMap,t(L.transmissionMap,k.transmissionMapTransform)),k.thickness.value=L.thickness,L.thicknessMap&&(k.thicknessMap.value=L.thicknessMap,t(L.thicknessMap,k.thicknessMapTransform)),k.attenuationDistance.value=L.attenuationDistance,k.attenuationColor.value.copy(L.attenuationColor)),k.specularIntensity.value=L.specularIntensity,k.specularColor.value.copy(L.specularColor),L.specularColorMap&&(k.specularColorMap.value=L.specularColorMap,t(L.specularColorMap,k.specularColorMapTransform)),L.specularIntensityMap&&(k.specularIntensityMap.value=L.specularIntensityMap,t(L.specularIntensityMap,k.specularIntensityMapTransform))}
72(k,L,W)):L.isMeshMatcapMaterial?(l(k,L),function F(k,L){L.matcap&&(k.matcap.value=L.matcap)}(k,L)):L.isMeshDepthMaterial?l(k,L):L.isMeshDistanceMaterial?(l(k,L),function O(k,L){const V=e.get(L).light;k.referencePosition.value.setFromMatrixPosition(V.matrixWorld),k.nearDistance.value=V.shadow.camera.near,k.farDistance.value=V.shadow.camera.far}(k,L)):L.isMeshNormalMaterial?l(k,L):L.isLineBasicMaterial?(function u(k,L){k.diffuse.value.copy(L.color),k.opacity.value=L.opacity,L.map&&(k.map.value=L.map,t(L.map,k.mapTransform))}(k,L),L.isLineDashedMaterial&&function g(k,L){k.dashSize.value=L.dashSize,k.totalSize.value=L.dashSize+L.gapSize,k.scale.value=L.scale}(k,L)):L.isPointsMaterial?function _(k,L,V,z){k.diffuse.value.copy(L.color),k.opacity.value=L.opacity,k.size.value=L.size*V,k.scale.value=.5*z,L.map&&(k.map.value=L.map,t(L.map,k.uvTransform)),L.alphaMap&&(k.alphaMap.value=L.alphaMap),L.alphaTest>0&&(k.alphaTest.value=L.alphaTest)}(k,L,V,z):L.isSpriteMaterial?function x(k,L){k.diffuse.value.copy(L.color),k.opacity.value=L.opacity,k.rotation.value=L.rotation,L.map&&(k.map.value=L.map,t(L.map,k.mapTransform)),L.alphaMap&&(k.alphaMap.value=L.alphaMap),L.alphaTest>0&&(k.alphaTest.value=L.alphaTest)}(k,L):L.isShadowMaterial?(k.color.value.copy(L.color),k.opacity.value=L.opacity):L.isShaderMaterial&&(L.uniformsNeedUpdate=!1)}}}function R0(f,e,t,r){let s={},l={},u=[];const g=t.isWebGL2?f.getParameter(35375):0;function R(V,z,W){const ne=V.value;if(void 0===W[z]){if("number"==typeof ne)W[z]=ne;else{const fe=Array.isArray(ne)?ne:[ne],ge=[];for(let de=0;de<fe.length;de++)ge.push(fe[de].clone());W[z]=ge}return!0}if("number"==typeof ne){if(W[z]!==ne)return W[z]=ne,!0}else{const fe=Array.isArray(W[z])?W[z]:[W[z]],ge=Array.isArray(ne)?ne:[ne];for(let de=0;de<fe.length;de++){const ie=fe[de];if(!1===ie.equals(ge[de]))return ie.copy(ge[de]),!0}}return!1}function O(V){const z={boundary:0,storage:0};return"number"==typeof V?(z.boundary=4,z.storage=4):V.isVector2?(z.boundary=8,z.storage=8):V.isVector3||V.isColor?(z.boundary=16,z.storage=12):V.isVector4?(z.boundary=16,z.storage=16):V.isMatrix3?(z.boundary=48,z.storage=48):V.isMatrix4?(z.boundary=64,z.storage=64):V.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",V),z}function k(V){const z=V.target;z.removeEventListener("dispose",k);const W=u.indexOf(z.__bindingPointIndex);u.splice(W,1),f.deleteBuffer(s[z.id]),delete s[z.id],delete l[z.id]}return{bind:function _(V,z){r.uniformBlockBinding(V,z.program)},update:function x(V,z){let W=s[V.id];void 0===W&&(function F(V){const z=V.uniforms;let W=0;let fe=0;for(let ge=0,de=z.length;ge<de;ge++){const ie=z[ge],ye={boundary:0,storage:0},He=Array.isArray(ie.value)?ie.value:[ie.value];for(let qe=0,Ge=He.length;qe<Ge;qe++){const We=O(He[qe]);ye.boundary+=We.boundary,ye.storage+=We.storage}ie.__data=new Float32Array(ye.storage/Float32Array.BYTES_PER_ELEMENT),ie.__offset=W,ge>0&&(fe=W%16,0!==fe&&16-fe-ye.boundary<0&&(W+=16-fe,ie.__offset=W)),W+=ye.storage}fe=W%16,fe>0&&(W+=16-fe),V.__size=W,V.__cache={}}(V),W=function M(V){const z=function C(){for(let V=0;V<g;V++)if(-1===u.indexOf(V))return u.push(V),V;return console.error("THREE.WebGLRenderer: Maximum number of simultaneously usable uniforms groups reached."),0}();V.__bindingPointIndex=z;const W=f.createBuffer(),ne=V.__size,fe=V.usage;return f.bindBuffer(35345,W),f.bufferData(35345,ne,fe),f.bindBuffer(35345,null),f.bindBufferBase(35345,z,W),W}(V),s[V.id]=W,V.addEventListener("dispose",k)),r.updateUBOMapping(V,z.program);const fe=e.render.frame;l[V.id]!==fe&&(function P(V){const W=V.uniforms,ne=V.__cache;f.bindBuffer(35345,s[V.id]);for(let fe=0,ge=W.length;fe<ge;fe++){const de=W[fe];if(!0===R(de,fe,ne)){const ie=de.__offset,ye=Array.isArray(de.value)?de.value:[de.value];let He=0;for(let qe=0;qe<ye.length;qe++){const Ge=ye[qe],Ve=O(Ge);"number"==typeof Ge?(de.__data[0]=Ge,f.bufferSubData(35345,ie+He,de.__data)):Ge.isMatrix3?(de.__data[0]=Ge.elements[0],de.__data[1]=Ge.elements[1],de.__data[2]=Ge.elements[2],de.__data[3]=Ge.elements[0],de.__data[4]=Ge.elements[3],de.__data[5]=Ge.elements[4],de.__data[6]=Ge.elements[5],de.__data[7]=Ge.elements[0],de.__data[8]=Ge.elements[6],de.__data[9]=Ge.elements[7],de.__data[10]=Ge.elements[8],de.__data[11]=Ge.elements[0]):(Ge.toArray(de.__data,He),He+=Ve.storage/Float32Array.BYTES_PER_ELEMENT)}f.bufferSubData(35345,ie,de.__data)}}f.bindBuffer(35345,null)}(V),l[V.id]=fe)},dispose:function L(){for(const V in s)f.deleteBuffer(s[V]);u=[],s={},l={}}}}function ro(){const f=rd("canvas");return f.style.display="block",f}class um{constructor(e={}){const{canvas:t=ro(),context:r=null,depth:s=!0,stencil:l=!0,alpha:u=!1,antialias:g=!1,premultipliedAlpha:_=!0,preserveDrawingBuffer:x=!1,powerPreference:M="default",failIfMajorPerformanceCaveat:C=!1}=e;let P;
vendor: 4,410 bytes, line 72
72this.isWebGLRenderer=!0,P=null!==r?r.getContextAttributes().alpha:u;let R=null,F=null;const O=[],k=[];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.outputEncoding=zo,this.useLegacyLights=!0,this.toneMapping=Mc,this.toneMappingExposure=1;const L=this;let V=!1,z=0,W=0,ne=null,fe=-1,ge=null;const de=new Ar,ie=new Ar;let ye=null,He=t.width,qe=t.height,Ge=1,Ve=null,We=null;const nt=new Ar(0,0,He,qe),et=new Ar(0,0,He,qe);let tt=!1;const gt=new rm;let bt=!1,jt=!1,Qt=null;const ct=new ui,At=new Me,Ut={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function Vt(){return null===ne?Ge:1}let ni,Gt,Vn,$t,Lt,Xt,Qn,Sn,gi,Ai,ci,Hi,cr,ze,Ce,xt,rn,fn,Cn,_i,On,Dt,Zn,hi,ut=r;function Nn(Re,Je){for(let Tt=0;Tt<Re.length;Tt++){const te=t.getContext(Re[Tt],Je);if(null!==te)return te}return null}try{const Re={alpha:!0,depth:s,stencil:l,antialias:g,premultipliedAlpha:_,preserveDrawingBuffer:x,powerPreference:M,failIfMajorPerformanceCaveat:C};if("setAttribute"in t&&t.setAttribute("data-engine","three.js r151"),t.addEventListener("webglcontextlost",ei,!1),t.addEventListener("webglcontextrestored",Oi,!1),t.addEventListener("webglcontextcreationerror",Ni,!1),null===ut){const Je=["webgl2","webgl","experimental-webgl"];if(!0===L.isWebGL1Renderer&&Je.shift(),ut=Nn(Je,Re),null===ut)throw Nn(Je)?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.")}void 0===ut.getShaderPrecisionFormat&&(ut.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}})}catch(Re){throw console.error("THREE.WebGLRenderer: "+Re.message),Re}function si(){ni=new eb(ut),Gt=new lm(ut,ni,e),ni.init(Gt),Dt=new I0(ut,ni,Gt),Vn=new ys(ut,ni,Gt),$t=new ib,Lt=new hb,Xt=new ir(ut,ni,Vn,Lt,Gt,Dt,$t),Qn=new KE(L),Sn=new JE(L),gi=new Cv(ut,Gt),Zn=new YE(ut,ni,gi,Gt),Ai=new tb(ut,gi,$t,Zn),ci=new b(ut,Ai,gi,$t),Cn=new ab(ut,Gt,Xt),xt=new $E(Lt),Hi=new cb(L,Qn,Sn,ni,Gt,Zn,xt),cr=new Qh(L,Lt),ze=new lt,Ce=new Xi(ni,Gt),fn=new ts(L,Qn,Sn,Vn,ci,P,_),rn=new Vh(L,ci,Gt),hi=new R0(ut,$t,Gt,Vn),_i=new os(ut,ni,$t,Gt),On=new nb(ut,ni,$t,Gt),$t.programs=Hi.programs,L.capabilities=Gt,L.extensions=ni,L.properties=Lt,L.renderLists=ze,L.shadowMap=rn,L.state=Vn,L.info=$t}si();const xn=new Ma(L,ut);function ei(Re){Re.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),V=!0}function Oi(){console.log("THREE.WebGLRenderer: Context Restored."),V=!1;const Re=$t.autoReset,Je=rn.enabled,Tt=rn.autoUpdate,ht=rn.needsUpdate,te=rn.type;si(),$t.autoReset=Re,rn.enabled=Je,rn.autoUpdate=Tt,rn.needsUpdate=ht,rn.type=te}function Ni(Re){console.error("THREE.WebGLRenderer: A WebGL context could not be created. Reason: ",Re.statusMessage)}function $i(Re){const Je=Re.target;Je.removeEventListener("dispose",$i),function je(Re){(function Ze(Re){const Je=Lt.get(Re).programs;void 0!==Je&&(Je.forEach(function(Tt){Hi.releaseProgram(Tt)}),Re.isShaderMaterial&&Hi.releaseShaderCache(Re))})(Re),Lt.remove(Re)}(Je)}this.xr=xn,this.getContext=function(){return ut},this.getContextAttributes=function(){return ut.getContextAttributes()},this.forceContextLoss=function(){const Re=ni.get("WEBGL_lose_context");Re&&Re.loseContext()},this.forceContextRestore=function(){const Re=ni.get("WEBGL_lose_context");Re&&Re.restoreContext()},this.getPixelRatio=function(){return Ge},this.setPixelRatio=function(Re){void 0!==Re&&(Ge=Re,this.setSize(He,qe,!1))},this.getSize=function(Re){return Re.set(He,qe)},this.setSize=function(Re,Je,Tt=!0){xn.isPresenting?console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting."):(He=Re,qe=Je,t.width=Math.floor(Re*Ge),t.height=Math.floor(Je*Ge),!0===Tt&&(t.style.width=Re+"px",t.style.height=Je+"px"),this.setViewport(0,0,Re,Je))},this.getDrawingBufferSize=function(Re){return Re.set(He*Ge,qe*Ge).floor()},this.setDrawingBufferSize=function(Re,Je,Tt){He=Re,qe=Je,Ge=Tt,t.width=Math.floor(Re*Tt),t.height=Math.floor(Je*Tt),this.setViewport(0,0,Re,Je)},this.getCurrentViewport=function(Re){return Re.copy(de)},this.getViewport=function(Re){return Re.copy(nt)},this.setViewport=function(Re,Je,Tt,ht){Re.isVector4?nt.set(Re.x,Re.y,Re.z,Re.w):nt.set(Re,Je,Tt,ht),Vn.viewport(de.copy(nt).multiplyScalar(Ge).floor())}
72,this.getScissor=function(Re){return Re.copy(et)},this.setScissor=function(Re,Je,Tt,ht){Re.isVector4?et.set(Re.x,Re.y,Re.z,Re.w):et.set(Re,Je,Tt,ht),Vn.scissor(ie.copy(et).multiplyScalar(Ge).floor())},this.getScissorTest=function(){return tt},this.setScissorTest=function(Re){Vn.setScissorTest(tt=Re)},this.setOpaqueSort=function(Re){Ve=Re},this.setTransparentSort=function(Re){We=Re},this.getClearColor=function(Re){return Re.copy(fn.getClearColor())},this.setClearColor=function(){fn.setClearColor.apply(fn,arguments)},this.getClearAlpha=function(){return fn.getClearAlpha()},this.setClearAlpha=function(){fn.setClearAlpha.apply(fn,arguments)},this.clear=function(Re=!0,Je=!0,Tt=!0){let ht=0;Re&&(ht|=16384),Je&&(ht|=256),Tt&&(ht|=1024),ut.clear(ht)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.dispose=function(){t.removeEventListener("webglcontextlost",ei,!1),t.removeEventListener("webglcontextrestored",Oi,!1),t.removeEventListener("webglcontextcreationerror",Ni,!1),ze.dispose(),Ce.dispose(),Lt.dispose(),Qn.dispose(),Sn.dispose(),ci.dispose(),Zn.dispose(),hi.dispose(),Hi.dispose(),xn.dispose(),xn.removeEventListener("sessionstart",ii),xn.removeEventListener("sessionend",Or),Qt&&(Qt.dispose(),Qt=null),Yr.stop()},this.renderBufferDirect=function(Re,Je,Tt,ht,te,Ee){null===Je&&(Je=Ut);const Fe=te.isMesh&&te.matrixWorld.determinant()<0,Ye=function km(Re,Je,Tt,ht,te){!0!==Je.isScene&&(Je=Ut),Xt.resetTextureUnits();const Ee=Je.fog,Ye=null===ne?L.outputEncoding:!0===ne.isXRRenderTarget?ne.texture.encoding:zo,ft=(ht.isMeshStandardMaterial?Sn:Qn).get(ht.envMap||(ht.isMeshStandardMaterial?Je.environment:null)),st=!0===ht.vertexColors&&!!Tt.attributes.color&&4===Tt.attributes.color.itemSize,St=!!ht.normalMap&&!!Tt.attributes.tangent,Ot=!!Tt.morphAttributes.position,Wt=!!Tt.morphAttributes.normal,zt=!!Tt.morphAttributes.color,ln=ht.toneMapped?L.toneMapping:Mc,Un=Tt.morphAttributes.position||Tt.morphAttributes.normal||Tt.morphAttributes.color,_n=void 0!==Un?Un.length:0,vn=Lt.get(ht),Ri=F.state.lights;!0!==bt||!0!==jt&&Re===ge||xt.setState(ht,Re,Re===ge&&ht.id===fe);let Mn=!1;ht.version===vn.__version?(vn.needsLights&&vn.lightsStateVersion!==Ri.state.version||vn.outputEncoding!==Ye||te.isInstancedMesh&&!1===vn.instancing||!te.isInstancedMesh&&!0===vn.instancing||te.isSkinnedMesh&&
72!1===vn.skinning||!te.isSkinnedMesh&&!0===vn.skinning||vn.envMap!==ft||!0===ht.fog&&vn.fog!==Ee||void 0!==vn.numClippingPlanes&&(vn.numClippingPlanes!==xt.numPlanes||vn.numIntersection!==xt.numIntersection)||vn.vertexAlphas!==st||vn.vertexTangents!==St||vn.morphTargets!==Ot||vn.morphNormals!==Wt||vn.morphColors!==zt||vn.toneMapping!==ln||!0===Gt.isWebGL2&&vn.morphTargetsCount!==_n)&&(Mn=!0):(Mn=!0,vn.__version=ht.version);let qn=vn.currentProgram;!0===Mn&&(qn=Fm(ht,Je,te));let Qi=!1,Dr=!1,$r=!1;const Pr=qn.getUniforms(),dr=vn.uniforms;if(Vn.useProgram(qn.program)&&(Qi=!0,Dr=!0,$r=!0),ht.id!==fe&&(fe=ht.id,Dr=!0),Qi||ge!==Re){if(Pr.setValue(ut,"projectionMatrix",Re.projectionMatrix),Gt.logarithmicDepthBuffer&&Pr.setValue(ut,"logDepthBufFC",2/(Math.log(Re.far+1)/Math.LN2)),ge!==Re&&(ge=Re,Dr=!0,$r=!0),ht.isShaderMaterial||ht.isMeshPhongMaterial||ht.isMeshToonMaterial||ht.isMeshStandardMaterial||ht.envMap){const pr=Pr.map.cameraPosition;void 0!==pr&&pr.setValue(ut,At.setFromMatrixPosition(Re.matrixWorld))}(ht.isMeshPhongMaterial||ht.isMeshToonMaterial||ht.isMeshLambertMaterial||ht.isMeshBasicMaterial||ht.isMeshStandardMaterial||ht.isShaderMaterial)&&Pr.setValue(ut,"isOrthographic",!0===Re.isOrthographicCamera),(ht.isMeshPhongMaterial||ht.isMeshToonMaterial||ht.isMeshLambertMaterial||ht.isMeshBasicMaterial||ht.isMeshStandardMaterial||ht.isShaderMaterial||ht.isShadowMaterial||te.isSkinnedMesh)&&Pr.setValue(ut,"viewMatrix",Re.matrixWorldInverse)}if(te.isSkinnedMesh){Pr.setOptional(ut,te,"bindMatrix"),Pr.setOptional(ut,te,"bindMatrixInverse");const pr=te.skeleton;pr&&(Gt.floatVertexTextures?(null===pr.boneTexture&&pr.computeBoneTexture(),Pr.setValue(ut,"boneTexture",pr.boneTexture,Xt),Pr.setValue(ut,"boneTextureSize",pr.boneTextureSize)):console.warn("THREE.WebGLRenderer: SkinnedMesh can only be used with WebGL 2. With WebGL 1 OES_texture_float and vertex textures support is required."))}const Ji=Tt.morphAttributes;if((void 0!==Ji.position||void 0!==Ji.normal||void 0!==Ji.color&&!0===Gt.isWebGL2)&&Cn.update(te,Tt,qn),(Dr||vn.receiveShadow!==te.receiveShadow)&&(vn.receiveShadow=te.receiveShadow,Pr.setValue(ut,"receiveShadow",te.receiveShadow)),ht.isMeshGouraudMaterial&&null!==ht.envMap&&(dr.envMap.value=ft,dr.flipEnvMap.value=ft.isCubeTexture&&!1===ft.isRenderTargetTexture?-1:1),Dr&&(Pr.setValue(ut,"toneMappingExposure",L.toneMappingExposure),vn.needsLights&&function OS(Re,Je){Re.ambientLightColor.needsUpdate=Je,Re.lightProbe.needsUpdate=Je,Re.directionalLights.needsUpdate=Je,Re.directionalLightShadows.needsUpdate=Je,Re.pointLights.needsUpdate=Je,Re.pointLightShadows.needsUpdate=Je,Re.spotLights.needsUpdate=Je,Re.spotLightShadows.needsUpdate=Je,Re.rectAreaLights.needsUpdate=Je,Re.hemisphereLights.needsUpdate=Je}(dr,$r),Ee&&!0===ht.fog&&cr.refreshFogUniforms(dr,Ee),cr.refreshMaterialUniforms(dr,ht,Ge,qe,Qt),yt.upload(ut,vn.uniformsList,dr,Xt)),ht.isShaderMaterial&&!0===ht.uniformsNeedUpdate&&(yt.upload(ut,vn.uniformsList,dr,Xt),ht.uniformsNeedUpdate=!1),ht.isSpriteMaterial&&Pr.setValue(ut,"center",te.center),Pr.setValue(ut,"modelViewMatrix",te.modelViewMatrix),Pr.setValue(ut,"normalMatrix",te.normalMatrix),Pr.setValue(ut,"modelMatrix",te.matrixWorld),ht.isShaderMaterial||ht.isRawShaderMaterial){const pr=ht.uniformsGroups;for(let Qa=0,Hs=pr.length;Qa<Hs;Qa++)if(Gt.isWebGL2){const mr=pr[Qa];hi.update(mr,qn),hi.bind(mr,qn)}else console.warn("THREE.WebGLRenderer: Uniform Buffer Objects can only be used with WebGL 2.")}return qn}(Re,Je,Tt,ht,te);Vn.setMaterial(ht,Fe);let ft=Tt.index,st=1;!0===ht.wireframe&&(ft=Ai.getWireframeAttribute(Tt),st=2);const St=Tt.drawRange,Ot=Tt.attributes.position;let Wt=St.start*st,zt=(St.start+St.count)*st;null!==Ee&&(Wt=Math.max(Wt,Ee.start*st),zt=Math.min(zt,(Ee.start+Ee.count)*st)),null!==ft?(Wt=Math.max(Wt,0),zt=Math.min(zt,ft.count)):null!=Ot&&(Wt=Math.max(Wt,0),zt=Math.min(zt,Ot.count));const ln=zt-Wt;if(ln<0||ln===1/0)return;Zn.setup(te,ht,Ye,Tt,ft);let Un,_n=_i;if(null!==ft&&(Un=gi.get(ft),_n=On,_n.setIndex(Un)),te.isMesh)!0===ht.wireframe?(Vn.setLineWidth(ht.wireframeLinewidth*Vt()),_n.setMode(1)):_n.setMode(4);else if(te.isLine){let vn=ht.linewidth;void 0===vn&&(vn=1),Vn.setLineWidth(vn*Vt()),_n.setMode(te.isLineSegments?1:te.isLineLoop?2:3)}else te.isPoints?_n.setMode(0):te.isSprite&&_n.setMode(4);if(te.isInstancedMesh)_n.renderInstances(Wt,ln,te.count);else if(Tt.isInstancedBufferGeometry){const Ri=Math.min(Tt.instanceCount,void 0!==Tt._maxInstanceCount?Tt._maxInstanceCount:1/0);_n.renderInstances(Wt,ln,Ri)}else _n.render(Wt,ln)},this.compile=function(Re,Je){function Tt(ht,te,Ee){!0===ht.transparent&&2===ht.side&&!1===ht.forceSinglePass?(ht.side=1,ht.needsUpdate=!0,Fm(ht,te,Ee),ht.side=0,ht.needsUpdate=!0,Fm(ht,te,Ee),ht.side=2):Fm(ht,te,Ee)}F=Ce.get(Re),F.init(),k.push(F),Re.traverseVisible(function(ht){ht.isLight&&ht.layers.test(Je.layers)&&(F.pushLight(ht),ht.castShadow&&F.pushShadow(ht))}),F.setupLights(L.useLegacyLights),Re.traverse(function(ht){const te=ht.material;if(te)if(Array.isArray(te))for(let Ee=0;Ee<te.length;Ee++)Tt(te[Ee],Re,ht);else Tt(te,Re,ht)}),k.pop(),F=null};let sn=null;function ii(){Yr.stop()}function Or(){Yr.start()}const Yr=new c0;function ua(Re,Je,Tt,ht){if(!1===Re.visible)return;if(Re.layers.test(Je.layers))if(Re.isGroup)Tt=Re.renderOrder;else if(Re.isLOD)!0===Re.autoUpdate&&Re.update(Je);else if(Re.isLight)F.pushLight(Re),Re.castShadow&&F.pushShadow(Re);else if(Re.isSprite){if(!Re.frustumCulled||gt.intersectsSprite(Re)){ht&&At.setFromMatrixPosition(Re.matrixWorld).applyMatrix4(ct);const Fe=ci.update(Re),Ye=Re.material;Ye.visible&&R.push(Re,Fe,Ye,Tt,At.z,null)}}else if((Re.isMesh||Re.isLine||Re.isPoints)&&(Re.isSkinnedMesh&&Re.skeleton.frame!==$t.render.frame&&(Re.skeleton.update(),Re.skeleton.frame=$t.render.frame),!Re.frustumCulled||gt.intersectsObject(Re))){ht&&At.setFromMatrixPosition(Re.matrixWorld).applyMatrix4(ct);const Fe=ci.update(Re),Ye=Re.material;
72if(Array.isArray(Ye)){const ft=Fe.groups;for(let st=0,St=ft.length;st<St;st++){const Ot=ft[st],Wt=Ye[Ot.materialIndex];Wt&&Wt.visible&&R.push(Re,Fe,Wt,Tt,At.z,Ot)}}else Ye.visible&&R.push(Re,Fe,Ye,Tt,At.z,null)}const Ee=Re.children;for(let Fe=0,Ye=Ee.length;Fe<Ye;Fe++)ua(Ee[Fe],Je,Tt,ht)}function jc(Re,Je,Tt,ht){const te=Re.opaque,Ee=Re.transmissive,Fe=Re.transparent;F.setupLightsView(Tt),!0===bt&&xt.setGlobalState(L.clippingPlanes,Tt),Ee.length>0&&function fs(Re,Je,Tt,ht){if(null===Qt){const Ye=Gt.isWebGL2;Qt=new Ks(1024,1024,{generateMipmaps:!0,type:ni.has("EXT_color_buffer_half_float")?Ka:rs,minFilter:Uo,samples:Ye&&!0===g?4:0})}const te=L.getRenderTarget();L.setRenderTarget(Qt),L.clear();const Ee=L.toneMapping;L.toneMapping=Mc,Lo(Re,Tt,ht),Xt.updateMultisampleRenderTarget(Qt),Xt.updateRenderTargetMipmap(Qt);let Fe=!1;for(let Ye=0,ft=Je.length;Ye<ft;Ye++){const st=Je[Ye],St=st.object,Ot=st.geometry,Wt=st.material,zt=st.group;if(2===Wt.side&&St.layers.test(ht.layers)){const ln=Wt.side;Wt.side=1,Wt.needsUpdate=!0,Tl(St,Tt,ht,Ot,Wt,zt),Wt.side=ln,Wt.needsUpdate=!0,Fe=!0}}!0===Fe&&(Xt.updateMultisampleRenderTarget(Qt),Xt.updateRenderTargetMipmap(Qt)),L.setRenderTarget(te),L.toneMapping=Ee}(te,Ee,Je,Tt),ht&&Vn.viewport(de.copy(ht)),te.length>0&&Lo(te,Je,Tt),Ee.length>0&&Lo(Ee,Je,Tt),Fe.length>0&&Lo(Fe,Je,Tt),Vn.buffers.depth.setTest(!0),Vn.buffers.depth.setMask(!0),Vn.buffers.color.setMask(!0),Vn.setPolygonOffset(!1)}function Lo(Re,Je,Tt){const ht=!0===Je.isScene?Je.overrideMaterial:null;for(let te=0,Ee=Re.length;te<Ee;te++){const Fe=Re[te],Ye=Fe.object,ft=Fe.geometry,st=null===ht?Fe.material:ht,St=Fe.group;Ye.layers.test(Tt.layers)&&Tl(Ye,Je,Tt,ft,st,St)}}function Tl(Re,Je,Tt,ht,te,Ee){Re.onBeforeRender(L,Je,Tt,ht,te,Ee),Re.modelViewMatrix.multiplyMatrices(Tt.matrixWorldInverse,Re.matrixWorld),Re.normalMatrix.getNormalMatrix(Re.modelViewMatrix),te.onBeforeRender(L,Je,Tt,ht,Re,Ee),!0===te.transparent&&2===te.side&&!1===te.forceSinglePass?(te.side=1,te.needsUpdate=!0,L.renderBufferDirect(Tt,Je,ht,te,Re,Ee),te.side=0,te.needsUpdate=!0,L.renderBufferDirect(Tt,Je,ht,te,Re,Ee),te.side=2):L.renderBufferDirect(Tt,Je,ht,te,Re,Ee),Re.onAfterRender(L,Je,Tt,ht,te,Ee)}function Fm(Re,Je,Tt){!0!==Je.isScene&&(Je=Ut);const ht=Lt.get(Re),te=F.state.lights,Fe=te.state.version,Ye=Hi.getParameters(Re,te.state,F.state.shadowsArray,Je,Tt),ft=Hi.getProgramCacheKey(Ye);let st=ht.programs;ht.environment=Re.isMeshStandardMaterial?Je.environment:null,ht.fog=Je.fog,ht.envMap=(Re.isMeshStandardMaterial?Sn:Qn).get(Re.envMap||ht.environment),void 0===st&&(Re.addEventListener("dispose",$i),st=new Map,ht.programs=st);let St=st.get(ft);if(void 0!==St){if(ht.currentProgram===St&&ht.lightsStateVersion===Fe)return bx(Re,Ye),St}else Ye.uniforms=Hi.getUniforms(Re),Re.onBuild(Tt,Ye,L),Re.onBeforeCompile(Ye,L),St=Hi.acquireProgram(Ye,ft),st.set(ft,St),ht.uniforms=Ye.uniforms;const Ot=ht.uniforms;(!Re.isShaderMaterial&&!Re.isRawShaderMaterial||!0===Re.clipping)&&(Ot.clippingPlanes=xt.uniform),bx(Re,Ye),ht.needsLights=function Hd(Re){return Re.isMeshLambertMaterial||Re.isMeshToonMaterial||Re.isMeshPhongMaterial||Re.isMeshStandardMaterial||Re.isShadowMaterial||Re.isShaderMaterial&&!0===Re.lights}(Re),ht.lightsStateVersion=Fe,ht.needsLights&&(Ot.ambientLightColor.value=te.state.ambient,Ot.lightProbe.value=te.state.probe,Ot.directionalLights.value=te.state.directional,Ot.directionalLightShadows.value=te.state.directionalShadow,Ot.spotLights.value=te.state.spot,Ot.spotLightShadows.value=te.state.spotShadow,Ot.rectAreaLights.value=te.state.rectArea,Ot.ltc_1.value=te.state.rectAreaLTC1,Ot.ltc_2.value=te.state.rectAreaLTC2,Ot.pointLights.value=te.state.point,Ot.pointLightShadows.value=te.state.pointShadow,Ot.hemisphereLights.value=te.state.hemi,Ot.directionalShadowMap.value=te.state.directionalShadowMap,Ot.directionalShadowMatrix.value=te.state.directionalShadowMatrix,Ot.spotShadowMap.value=te.state.spotShadowMap,Ot.spotLightMatrix.value=te.state.spotLightMatrix,Ot.spotLightMap.value=te.state.spotLightMap,Ot.pointShadowMap.value=te.state.pointShadowMap,Ot.pointShadowMatrix.value=te.state.pointShadowMatrix);const Wt=St.getUniforms(),zt=yt.seqWithValue(Wt.seq,Ot);return ht.currentProgram=St,ht.uniformsList=zt,St}function bx(Re,Je){const Tt=Lt.get(Re);Tt.outputEncoding=Je.outputEncoding,Tt.instancing=Je.instancing,Tt.skinning=Je.skinning,Tt.morphTargets=Je.morphTargets,Tt.morphNormals=Je.morphNormals,Tt.morphColors=Je.morphColors,Tt.morphTargetsCount=Je.morphTargetsCount,Tt.numClippingPlanes=Je.numClippingPlanes,Tt.numIntersection=Je.numClipIntersection,Tt.vertexAlphas=Je.vertexAlphas,Tt.vertexTangents=Je.vertexTangents,Tt.toneMapping=Je.toneMapping}Yr.setAnimationLoop(function kn(Re){sn&&sn(Re)}),typeof self<"u"&&Yr.setContext(self),this.setAnimationLoop=function(Re){sn=Re,xn.setAnimationLoop(Re),null===Re?Yr.stop():Yr.start()},xn.addEventListener("sessionstart",ii),xn.addEventListener("sessionend",Or),this.render=function(Re,Je){if(void 0===Je||!0===Je.isCamera){if(!0!==V){if(!0===Re.matrixWorldAutoUpdate&&Re.updateMatrixWorld(),null===Je.parent&&!0===Je.matrixWorldAutoUpdate&&Je.updateMatrixWorld(),!0===xn.enabled&&!0===xn.isPresenting&&(!0===xn.cameraAutoUpdate&&xn.updateCamera(Je),Je=xn.getCamera()),!0===Re.isScene&&Re.onBeforeRender(L,Re,Je,ne),F=Ce.get(Re,k.length),F.init(),k.push(F),ct.multiplyMatrices(Je.projectionMatrix,Je.matrixWorldInverse),gt.setFromProjectionMatrix(ct),jt=this.localClippingEnabled,bt=xt.init(this.clippingPlanes,jt),R=ze.get(Re,O.length),R.init(),O.push(R),ua(Re,Je,0,L.sortObjects),R.finish(),!0===L.sortObjects&&R.sort(Ve,We),!0===bt&&xt.beginShadows(),rn.render(F.state.shadowsArray,Re,Je),!0===bt&&xt.endShadows(),!0===this.info.autoReset&&this.info.reset(),fn.render(R,Re),F.setupLights(L.useLegacyLights),Je.isArrayCamera){const ht=Je.cameras;for(let te=0,Ee=ht.length;te<Ee;te++){const Fe=ht[te];jc(R,Re,Fe,Fe.viewport)}}else jc(R,Re,Je);null!==ne&&(Xt.updateMultisampleRenderTarget(ne),Xt.updateRenderTargetMipmap(ne)),!0===Re.isScene&&Re.onAfterRender(L,Re,Je),Zn.resetDefaultState(),fe=-1,ge=null,k.pop(),F=k.length>0?k[k.length-1]:null,O.pop(),R=O.length>0?O[O.length-1]:null}}else console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.")},this.getActiveCubeFace=function(){return z},this.getActiveMipmapLevel=function(){return W},this.getRenderTarget=function(){return ne},this.setRenderTargetTextures=function(Re,Je,Tt){Lt.get(Re.texture).__webglTexture=Je,Lt.get(Re.depthTexture).__webglTexture=Tt;const ht=Lt.get(Re);ht.__hasExternalTextures=!0,ht.__hasExternalTextures&&(ht.__autoAllocateDepthBuffer=void 0===Tt,ht.__autoAllocateDepthBuffer||!0===ni.has("WEBGL_multisampled_render_to_texture")&&(console.warn("THREE.WebGLRenderer: Render-to-texture extension was disabled because an external texture was provided"),ht.__useRenderToTexture=!1))},this.setRenderTargetFramebuffer=function(Re,Je){const Tt=Lt.get(Re);Tt.__webglFramebuffer=Je,Tt.__useDefaultFramebuffer=void 0===Je},this.setRenderTarget=function(Re,Je=0,Tt=0){ne=Re,z=Je,W=Tt;let ht=!0,te=null,Ee=!1,Fe=!1;
vendor: 17,248 bytes, line 72
72if(Re){const ft=Lt.get(Re);void 0!==ft.__useDefaultFramebuffer?(Vn.bindFramebuffer(36160,null),ht=!1):void 0===ft.__webglFramebuffer?Xt.setupRenderTarget(Re):ft.__hasExternalTextures&&Xt.rebindTextures(Re,Lt.get(Re.texture).__webglTexture,Lt.get(Re.depthTexture).__webglTexture);const st=Re.texture;(st.isData3DTexture||st.isDataArrayTexture||st.isCompressedArrayTexture)&&(Fe=!0);const St=Lt.get(Re).__webglFramebuffer;Re.isWebGLCubeRenderTarget?(te=St[Je],Ee=!0):te=Gt.isWebGL2&&Re.samples>0&&!1===Xt.useMultisampledRTT(Re)?Lt.get(Re).__webglMultisampledFramebuffer:St,de.copy(Re.viewport),ie.copy(Re.scissor),ye=Re.scissorTest}else de.copy(nt).multiplyScalar(Ge).floor(),ie.copy(et).multiplyScalar(Ge).floor(),ye=tt;if(Vn.bindFramebuffer(36160,te)&&Gt.drawBuffers&&ht&&Vn.drawBuffers(Re,te),Vn.viewport(de),Vn.scissor(ie),Vn.setScissorTest(ye),Ee){const ft=Lt.get(Re.texture);ut.framebufferTexture2D(36160,36064,34069+Je,ft.__webglTexture,Tt)}else if(Fe){const ft=Lt.get(Re.texture);ut.framebufferTextureLayer(36160,36064,ft.__webglTexture,Tt||0,Je||0)}fe=-1},this.readRenderTargetPixels=function(Re,Je,Tt,ht,te,Ee,Fe){if(!Re||!Re.isWebGLRenderTarget)return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let Ye=Lt.get(Re).__webglFramebuffer;if(Re.isWebGLCubeRenderTarget&&void 0!==Fe&&(Ye=Ye[Fe]),Ye){Vn.bindFramebuffer(36160,Ye);try{const ft=Re.texture,st=ft.format,St=ft.type;if(st!==Ns&&Dt.convert(st)!==ut.getParameter(35739))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");const Ot=St===Ka&&(ni.has("EXT_color_buffer_half_float")||Gt.isWebGL2&&ni.has("EXT_color_buffer_float"));if(!(St===rs||Dt.convert(St)===ut.getParameter(35738)||St===Os&&(Gt.isWebGL2||ni.has("OES_texture_float")||ni.has("WEBGL_color_buffer_float"))||Ot))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");Je>=0&&Je<=Re.width-ht&&Tt>=0&&Tt<=Re.height-te&&ut.readPixels(Je,Tt,ht,te,Dt.convert(st),Dt.convert(St),Ee)}finally{const ft=null!==ne?Lt.get(ne).__webglFramebuffer:null;Vn.bindFramebuffer(36160,ft)}}},this.copyFramebufferToTexture=function(Re,Je,Tt=0){const ht=Math.pow(2,-Tt),te=Math.floor(Je.image.width*ht),Ee=Math.floor(Je.image.height*ht);Xt.setTexture2D(Je,0),ut.copyTexSubImage2D(3553,Tt,0,0,Re.x,Re.y,te,Ee),Vn.unbindTexture()},this.copyTextureToTexture=function(Re,Je,Tt,ht=0){const te=Je.image.width,Ee=Je.image.height,Fe=Dt.convert(Tt.format),Ye=Dt.convert(Tt.type);Xt.setTexture2D(Tt,0),ut.pixelStorei(37440,Tt.flipY),ut.pixelStorei(37441,Tt.premultiplyAlpha),ut.pixelStorei(3317,Tt.unpackAlignment),Je.isDataTexture?ut.texSubImage2D(3553,ht,Re.x,Re.y,te,Ee,Fe,Ye,Je.image.data):Je.isCompressedTexture?ut.compressedTexSubImage2D(3553,ht,Re.x,Re.y,Je.mipmaps[0].width,Je.mipmaps[0].height,Fe,Je.mipmaps[0].data):ut.texSubImage2D(3553,ht,Re.x,Re.y,Fe,Ye,Je.image),0===ht&&Tt.generateMipmaps&&ut.generateMipmap(3553),Vn.unbindTexture()},this.copyTextureToTexture3D=function(Re,Je,Tt,ht,te=0){if(L.isWebGL1Renderer)return void console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");const Ee=Re.max.x-Re.min.x+1,Fe=Re.max.y-Re.min.y+1,Ye=Re.max.z-Re.min.z+1,ft=Dt.convert(ht.format),st=Dt.convert(ht.type);let St;if(ht.isData3DTexture)Xt.setTexture3D(ht,0),St=32879;else{if(!ht.isDataArrayTexture)return void console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");Xt.setTexture2DArray(ht,0),St=35866}ut.pixelStorei(37440,ht.flipY),ut.pixelStorei(37441,ht.premultiplyAlpha),ut.pixelStorei(3317,ht.unpackAlignment);const Ot=ut.getParameter(3314),Wt=ut.getParameter(32878),zt=ut.getParameter(3316),ln=ut.getParameter(3315),Un=ut.getParameter(32877),_n=Tt.isCompressedTexture?Tt.mipmaps[0]:Tt.image;ut.pixelStorei(3314,_n.width),ut.pixelStorei(32878,_n.height),ut.pixelStorei(3316,Re.min.x),ut.pixelStorei(3315,Re.min.y),ut.pixelStorei(32877,Re.min.z),Tt.isDataTexture||Tt.isData3DTexture?ut.texSubImage3D(St,te,Je.x,Je.y,Je.z,Ee,Fe,Ye,ft,st,_n.data):Tt.isCompressedArrayTexture?(console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture."),ut.compressedTexSubImage3D(St,te,Je.x,Je.y,Je.z,Ee,Fe,Ye,ft,_n.data)):ut.texSubImage3D(St,te,Je.x,Je.y,Je.z,Ee,Fe,Ye,ft,st,_n),ut.pixelStorei(3314,Ot),ut.pixelStorei(32878,Wt),ut.pixelStorei(3316,zt),ut.pixelStorei(3315,ln),ut.pixelStorei(32877,Un),0===te&&ht.generateMipmaps&&ut.generateMipmap(St),Vn.unbindTexture()},this.initTexture=function(Re){Re.isCubeTexture?Xt.setTextureCube(Re,0):Re.isData3DTexture?Xt.setTexture3D(Re,0):Re.isDataArrayTexture||Re.isCompressedArrayTexture?Xt.setTexture2DArray(Re,0):Xt.setTexture2D(Re,0),Vn.unbindTexture()},this.resetState=function(){z=0,W=0,ne=null,Vn.reset(),Zn.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get physicallyCorrectLights(){return console.warn("THREE.WebGLRenderer: the property .physicallyCorrectLights has been removed. Set renderer.useLegacyLights instead."),!this.useLegacyLights}set physicallyCorrectLights(e){console.warn("THREE.WebGLRenderer: the property .physicallyCorrectLights has been removed. Set renderer.useLegacyLights instead."),this.useLegacyLights=!e}}(class ub extends um{}).prototype.isWebGL1Renderer=!0;class db extends or{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),null!==e.background&&(this.background=e.background.clone()),null!==e.environment&&(this.environment=e.environment.clone()),null!==e.fog&&(this.fog=e.fog.clone()),this.backgroundBlurriness=e.backgroundBlurriness,this.backgroundIntensity=e.backgroundIntensity,null!==e.overrideMaterial&&(this.overrideMaterial=e.overrideMaterial.clone()),this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){const t=super.toJSON(e);return null!==this.fog&&(t.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(t.object.backgroundBlurriness=this.backgroundBlurriness),1!==this.backgroundIntensity&&(t.object.backgroundIntensity=this.backgroundIntensity),t}get autoUpdate(){return console.warn("THREE.Scene: autoUpdate was renamed to matrixWorldAutoUpdate in r144."),this.matrixWorldAutoUpdate}set autoUpdate(e){console.warn("THREE.Scene: autoUpdate was renamed to matrixWorldAutoUpdate in r144."),this.matrixWorldAutoUpdate=e}}class dy{constructor(e,t){this.isInterleavedBuffer=!0,this.array=e,this.stride=t,this.count=void 0!==e?e.length/t:0,this.usage=35044,this.updateRange={offset:0,count:-1},this.version=0,this.uuid=Za()}onUploadCallback(){}set needsUpdate(e){!0===e&&this.version++}setUsage(e){return this.usage=e,this}copy(e){return this.array=new e.array.constructor(e.array),this.count=e.count,this.stride=e.stride,this.usage=e.usage,this}copyAt(e,t,r){e*=this.stride,r*=t.stride;for(let s=0,l=this.stride;s<l;s++)this.array[e+s]=t.array[r+s];return this}set(e,t=0){return this.array.set(e,t),this}clone(e){void 0===e.arrayBuffers&&(e.arrayBuffers={}),void 0===this.array.buffer._uuid&&(this.array.buffer._uuid=Za()),void 0===e.arrayBuffers[this.array.buffer._uuid]&&(e.arrayBuffers[this.array.buffer._uuid]=this.array.slice(0).buffer);const t=new this.array.constructor(e.arrayBuffers[this.array.buffer._uuid]),r=new this.constructor(t,this.stride);return r.setUsage(this.usage),r}onUpload(e){return this.onUploadCallback=e,this}toJSON(e){return void 0===e.arrayBuffers&&(e.arrayBuffers={}),void 0===this.array.buffer._uuid&&(this.array.buffer._uuid=Za()),void 0===e.arrayBuffers[this.array.buffer._uuid]&&(e.arrayBuffers[this.array.buffer._uuid]=Array.from(new Uint32Array(this.array.buffer))),{uuid:this.uuid,buffer:this.array.buffer._uuid,type:this.array.constructor.name,stride:this.stride}}}const so=new Me;class Cd{constructor(e,t,r,s=!1){this.isInterleavedBufferAttribute=!0,this.name="",this.data=e,this.itemSize=t,this.offset=r,this.normalized=s}get count(){return this.data.count}get array(){return this.data.array}set needsUpdate(e){this.data.needsUpdate=e}applyMatrix4(e){for(let t=0,r=this.data.count;t<r;t++)so.fromBufferAttribute(this,t),so.applyMatrix4(e),this.setXYZ(t,so.x,so.y,so.z);return this}applyNormalMatrix(e){for(let t=0,r=this.count;t<r;t++)so.fromBufferAttribute(this,t),so.applyNormalMatrix(e),this.setXYZ(t,so.x,so.y,so.z);return this}transformDirection(e){for(let t=0,r=this.count;t<r;t++)so.fromBufferAttribute(this,t),so.transformDirection(e),this.setXYZ(t,so.x,so.y,so.z);return this}setX(e,t){return this.normalized&&(t=Bi(t,this.array)),this.data.array[e*this.data.stride+this.offset]=t,this}setY(e,t){return this.normalized&&(t=Bi(t,this.array)),this.data.array[e*this.data.stride+this.offset+1]=t,this}setZ(e,t){return this.normalized&&(t=Bi(t,this.array)),this.data.array[e*this.data.stride+this.offset+2]=t,this}setW(e,t){return this.normalized&&(t=Bi(t,this.array)),this.data.array[e*this.data.stride+this.offset+3]=t,this}getX(e){let t=this.data.array[e*this.data.stride+this.offset];return this.normalized&&(t=Na(t,this.array)),t}getY(e){let t=this.data.array[e*this.data.stride+this.offset+1];return this.normalized&&(t=Na(t,this.array)),t}getZ(e){let t=this.data.array[e*this.data.stride+this.offset+2];return this.normalized&&(t=Na(t,this.array)),t}getW(e){let t=this.data.array[e*this.data.stride+this.offset+3];return this.normalized&&(t=Na(t,this.array)),t}setXY(e,t,r){return e=e*this.data.stride+this.offset,this.normalized&&(t=Bi(t,this.array),r=Bi(r,this.array)),this.data.array[e+0]=t,this.data.array[e+1]=r,this}setXYZ(e,t,r,s){return e=e*this.data.stride+this.offset,this.normalized&&(t=Bi(t,this.array),r=Bi(r,this.array),s=Bi(s,this.array)),this.data.array[e+0]=t,this.data.array[e+1]=r,this.data.array[e+2]=s,this}setXYZW(e,t,r,s,l){return e=e*this.data.stride+this.offset,this.normalized&&(t=Bi(t,this.array),r=Bi(r,this.array),s=Bi(s,this.array),l=Bi(l,this.array)),this.data.array[e+0]=t,this.data.array[e+1]=r,this.data.array[e+2]=s,this.data.array[e+3]=l,this}clone(e){if(void 0===e){console.log("THREE.InterleavedBufferAttribute.clone(): Cloning an interleaved buffer attribute will de-interleave buffer data.");const t=[];for(let r=0;r<this.count;r++){const s=r*this.data.stride+this.offset;for(let l=0;l<this.itemSize;l++)t.push(this.data.array[s+l])}return new tr(new this.array.constructor(t),this.itemSize,this.normalized)}return void 0===e.interleavedBuffers&&(e.interleavedBuffers={}),void 0===e.interleavedBuffers[this.data.uuid]&&(e.interleavedBuffers[this.data.uuid]=this.data.clone(e)),new Cd(e.interleavedBuffers[this.data.uuid],this.itemSize,this.offset,this.normalized)}toJSON(e){if(void 0===e){console.log("THREE.InterleavedBufferAttribute.toJSON(): Serializing an interleaved buffer attribute will de-interleave buffer data.");const t=[];for(let r=0;r<this.count;r++){const s=r*this.data.stride+this.offset;for(let l=0;l<this.itemSize;l++)t.push(this.data.array[s+l])}return{itemSize:this.itemSize,type:this.array.constructor.name,array:t,normalized:this.normalized}}return void 0===e.interleavedBuffers&&(e.interleavedBuffers={}),void 0===e.interleavedBuffers[this.data.uuid]&&(e.interleavedBuffers[this.data.uuid]=this.data.toJSON(e)),{isInterleavedBufferAttribute:!0,itemSize:this.itemSize,data:this.data.uuid,offset:this.offset,normalized:this.normalized}}}const sw=new Me,aw=new Ar,ow=new Ar,aI=new Me,lw=new ui,Am=new Me;class cw extends pn{constructor(e,t){super(e,t),this.isSkinnedMesh=!0,this.type="SkinnedMesh",this.bindMode="attached",this.bindMatrix=new ui,this.bindMatrixInverse=new ui,this.boundingBox=null,this.boundingSphere=null}computeBoundingBox(){const e=this.geometry;null===this.boundingBox&&(this.boundingBox=new xo),this.boundingBox.makeEmpty();const t=e.getAttribute("position");for(let r=0;r<t.count;r++)Am.fromBufferAttribute(t,r),this.applyBoneTransform(r,Am),this.boundingBox.expandByPoint(Am)}computeBoundingSphere(){const e=this.geometry;null===this.boundingSphere&&(this.boundingSphere=new gl),this.boundingSphere.makeEmpty();const t=e.getAttribute("position");for(let r=0;r<t.count;r++)Am.fromBufferAttribute(t,r),this.applyBoneTransform(r,Am),this.boundingSphere.expandByPoint(Am)}copy(e,t){return super.copy(e,t),this.bindMode=e.bindMode,this.bindMatrix.copy(e.bindMatrix),this.bindMatrixInverse.copy(e.bindMatrixInverse),this.skeleton=e.skeleton,this}bind(e,t){this.skeleton=e,void 0===t&&(this.updateMatrixWorld(!0),this.skeleton.calculateInverses(),t=this.matrixWorld),this.bindMatrix.copy(t),this.bindMatrixInverse.copy(t).invert()}pose(){this.skeleton.pose()}normalizeSkinWeights(){const e=new Ar,t=this.geometry.attributes.skinWeight;for(let r=0,s=t.count;r<s;r++){e.fromBufferAttribute(t,r);const l=1/e.manhattanLength();l!==1/0?e.multiplyScalar(l):e.set(1,0,0,0),t.setXYZW(r,e.x,e.y,e.z,e.w)}}updateMatrixWorld(e){super.updateMatrixWorld(e),"attached"===this.bindMode?this.bindMatrixInverse.copy(this.matrixWorld).invert():"detached"===this.bindMode?this.bindMatrixInverse.copy(this.bindMatrix).invert():console.warn("THREE.SkinnedMesh: Unrecognized bindMode: "+this.bindMode)}applyBoneTransform(e,t){const r=this.skeleton,s=this.geometry;aw.fromBufferAttribute(s.attributes.skinIndex,e),ow.fromBufferAttribute(s.attributes.skinWeight,e),sw.copy(t).applyMatrix4(this.bindMatrix),t.set(0,0,0);for(let l=0;l<4;l++){const u=ow.getComponent(l);if(0!==u){const g=aw.getComponent(l);lw.multiplyMatrices(r.bones[g].matrixWorld,r.boneInverses[g]),t.addScaledVector(aI.copy(sw).applyMatrix4(lw),u)}}return t.applyMatrix4(this.bindMatrixInverse)}boneTransform(e,t){return console.warn("THREE.SkinnedMesh: .boneTransform() was renamed to .applyBoneTransform() in r151."),this.applyBoneTransform(e,t)}}class mb extends or{constructor(){super(),this.isBone=!0,this.type="Bone"}}class _m extends ws{constructor(e=null,t=1,r=1,s,l,u,g,_,x=Hr,M=Hr,C,P){super(null,u,g,_,x,M,s,l,C,P),this.isDataTexture=!0,this.image={data:e,width:t,height:r},this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}const hw=new ui,oI=new ui;class _y{constructor(e=[],t=[]){this.uuid=Za(),this.bones=e.slice(0),this.boneInverses=t,this.boneMatrices=null,this.boneTexture=null,this.boneTextureSize=0,this.frame=-1,this.init()}init(){const e=this.bones,t=this.boneInverses;if(this.boneMatrices=new Float32Array(16*e.length),0===t.length)this.calculateInverses();else if(e.length!==t.length){console.warn("THREE.Skeleton: Number of inverse bone matrices does not match amount of bones."),this.boneInverses=[];for(let r=0,s=this.bones.length;r<s;r++)this.boneInverses.push(new ui)}}calculateInverses(){this.boneInverses.length=0;for(let e=0,t=this.bones.length;e<t;e++){const r=new ui;this.bones[e]&&r.copy(this.bones[e].matrixWorld).invert(),this.boneInverses.push(r)}}pose(){for(let e=0,t=this.bones.length;e<t;e++){const r=this.bones[e];r&&r.matrixWorld.copy(this.boneInverses[e]).invert()}for(let e=0,t=this.bones.length;e<t;e++){const r=this.bones[e];r&&(r.parent&&r.parent.isBone?(r.matrix.copy(r.parent.matrixWorld).invert(),r.matrix.multiply(r.matrixWorld)):r.matrix.copy(r.matrixWorld),r.matrix.decompose(r.position,r.quaternion,r.scale))}}update(){const e=this.bones,t=this.boneInverses,r=this.boneMatrices,s=this.boneTexture;for(let l=0,u=e.length;l<u;l++)hw.multiplyMatrices(e[l]?e[l].matrixWorld:oI,t[l]),hw.toArray(r,16*l);null!==s&&(s.needsUpdate=!0)}clone(){return new _y(this.bones,this.boneInverses)}computeBoneTexture(){let e=Math.sqrt(4*this.bones.length);e=lv(e),e=Math.max(e,4);const t=new Float32Array(e*e*4);t.set(this.boneMatrices);const r=new _m(t,e,e,Ns,Os);return r.needsUpdate=!0,this.boneMatrices=t,this.boneTexture=r,this.boneTextureSize=e,this}getBoneByName(e){for(let t=0,r=this.bones.length;t<r;t++){const s=this.bones[t];if(s.name===e)return s}}dispose(){null!==this.boneTexture&&(this.boneTexture.dispose(),this.boneTexture=null)}fromJSON(e,t){this.uuid=e.uuid;for(let r=0,s=e.bones.length;r<s;r++){const l=e.bones[r];let u=t[l];void 0===u&&(console.warn("THREE.Skeleton: No bone found with UUID:",l),u=new mb),this.bones.push(u),this.boneInverses.push((new ui).fromArray(e.boneInverses[r]))}return this.init(),this}toJSON(){const e={metadata:{version:4.5,type:"Skeleton",generator:"Skeleton.toJSON"},bones:[],boneInverses:[]};e.uuid=this.uuid;const t=this.bones,r=this.boneInverses;for(let s=0,l=t.length;s<l;s++)e.bones.push(t[s].uuid),e.boneInverses.push(r[s].toArray());return e}}class F0 extends tr{constructor(e,t,r,s=1){super(e,t,r),this.isInstancedBufferAttribute=!0,this.meshPerAttribute=s}copy(e){return super.copy(e),this.meshPerAttribute=e.meshPerAttribute,this}toJSON(){const e=super.toJSON();return e.meshPerAttribute=this.meshPerAttribute,e.isInstancedBufferAttribute=!0,e}}const vm=new ui,uw=new ui,vy=[],fw=new xo,lI=new ui,k0=new pn,O0=new gl;class dw extends pn{constructor(e,t,r){super(e,t),this.isInstancedMesh=!0,this.instanceMatrix=new F0(new Float32Array(16*r),
vendor: 5,930 bytes, line 72
7216),this.instanceColor=null,this.count=r,this.boundingBox=null,this.boundingSphere=null;for(let s=0;s<r;s++)this.setMatrixAt(s,lI)}computeBoundingBox(){const e=this.geometry,t=this.count;null===this.boundingBox&&(this.boundingBox=new xo),null===e.boundingBox&&e.computeBoundingBox(),this.boundingBox.makeEmpty();for(let r=0;r<t;r++)this.getMatrixAt(r,vm),fw.copy(e.boundingBox).applyMatrix4(vm),this.boundingBox.union(fw)}computeBoundingSphere(){const e=this.geometry,t=this.count;null===this.boundingSphere&&(this.boundingSphere=new gl),null===e.boundingSphere&&e.computeBoundingSphere(),this.boundingSphere.makeEmpty();for(let r=0;r<t;r++)this.getMatrixAt(r,vm),O0.copy(e.boundingSphere).applyMatrix4(vm),this.boundingSphere.union(O0)}copy(e,t){return super.copy(e,t),this.instanceMatrix.copy(e.instanceMatrix),null!==e.instanceColor&&(this.instanceColor=e.instanceColor.clone()),this.count=e.count,this}getColorAt(e,t){t.fromArray(this.instanceColor.array,3*e)}getMatrixAt(e,t){t.fromArray(this.instanceMatrix.array,16*e)}raycast(e,t){const r=this.matrixWorld,s=this.count;if(k0.geometry=this.geometry,k0.material=this.material,void 0!==k0.material&&(null===this.boundingSphere&&this.computeBoundingSphere(),O0.copy(this.boundingSphere),O0.applyMatrix4(r),!1!==e.ray.intersectsSphere(O0)))for(let l=0;l<s;l++){this.getMatrixAt(l,vm),uw.multiplyMatrices(r,vm),k0.matrixWorld=uw,k0.raycast(e,vy);for(let u=0,g=vy.length;u<g;u++){const _=vy[u];_.instanceId=l,_.object=this,t.push(_)}vy.length=0}}setColorAt(e,t){null===this.instanceColor&&(this.instanceColor=new F0(new Float32Array(3*this.instanceMatrix.count),3)),t.toArray(this.instanceColor.array,3*e)}setMatrixAt(e,t){t.toArray(this.instanceMatrix.array,16*e)}updateMorphTargets(){}dispose(){this.dispatchEvent({type:"dispose"})}}class Va extends as{constructor(e){super(),this.isLineBasicMaterial=!0,this.type="LineBasicMaterial",this.color=new An(16777215),this.map=null,this.linewidth=1,this.linecap="round",this.linejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.linewidth=e.linewidth,this.linecap=e.linecap,this.linejoin=e.linejoin,this.fog=e.fog,this}}const pw=new Me,mw=new Me,gw=new ui,gb=new Wu,yy=new gl;class Ha extends or{constructor(e=new Ii,t=new Va){super(),this.isLine=!0,this.type="Line",this.geometry=e,this.material=t,this.updateMorphTargets()}copy(e,t){return super.copy(e,t),this.material=e.material,this.geometry=e.geometry,this}computeLineDistances(){const e=this.geometry;if(null===e.index){const t=e.attributes.position,r=[0];for(let s=1,l=t.count;s<l;s++)pw.fromBufferAttribute(t,s-1),mw.fromBufferAttribute(t,s),r[s]=r[s-1],r[s]+=pw.distanceTo(mw);e.setAttribute("lineDistance",new Fn(r,1))}else console.warn("THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}raycast(e,t){const r=this.geometry,s=this.matrixWorld,l=e.params.Line.threshold,u=r.drawRange;if(null===r.boundingSphere&&r.computeBoundingSphere(),yy.copy(r.boundingSphere),yy.applyMatrix4(s),yy.radius+=l,!1===e.ray.intersectsSphere(yy))return;gw.copy(s).invert(),gb.copy(e.ray).applyMatrix4(gw);const g=l/((this.scale.x+this.scale.y+this.scale.z)/3),_=g*g,x=new Me,M=new Me,C=new Me,P=new Me,R=this.isLineSegments?2:1,F=r.index,k=r.attributes.position;if(null!==F)for(let z=Math.max(0,u.start),W=Math.min(F.count,u.start+u.count)-1;z<W;z+=R){const ne=F.getX(z),fe=F.getX(z+1);if(x.fromBufferAttribute(k,ne),M.fromBufferAttribute(k,fe),gb.distanceSqToSegment(x,M,P,C)>_)continue;P.applyMatrix4(this.matrixWorld);const de=e.ray.origin.distanceTo(P);de<e.near||de>e.far||t.push({distance:de,point:C.clone().applyMatrix4(this.matrixWorld),index:z,face:null,faceIndex:null,object:this})}else for(let z=Math.max(0,u.start),W=Math.min(k.count,u.start+u.count)-1;z<W;z+=R){if(x.fromBufferAttribute(k,z),M.fromBufferAttribute(k,z+1),gb.distanceSqToSegment(x,M,P,C)>_)continue;P.applyMatrix4(this.matrixWorld);const fe=e.ray.origin.distanceTo(P);fe<e.near||fe>e.far||t.push({distance:fe,point:C.clone().applyMatrix4(this.matrixWorld),index:z,face:null,faceIndex:null,object:this})}}updateMorphTargets(){const t=this.geometry.morphAttributes,r=Object.keys(t);if(r.length>0){const s=t[r[0]];if(void 0!==s){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let l=0,u=s.length;l<u;l++){const g=s[l].name||String(l);this.morphTargetInfluences.push(0),this.morphTargetDictionary[g]=l}}}}}const Aw=new Me,_w=new Me;class Vc extends Ha{constructor(e,t){super(e,t),this.isLineSegments=!0,this.type="LineSegments"}computeLineDistances(){const e=this.geometry;if(null===e.index){const t=e.attributes.position,r=[];for(let s=0,l=t.count;s<l;s+=2)Aw.fromBufferAttribute(t,s),_w.fromBufferAttribute(t,s+1),r[s]=0===s?0:r[s-1],r[s+1]=r[s]+Aw.distanceTo(_w);e.setAttribute("lineDistance",new Fn(r,1))}else console.warn("THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}}class vw extends Ha{constructor(e,t){super(e,t),this.isLineLoop=!0,this.type="LineLoop"}}class Ab extends as{constructor(e){super(),this.isPointsMaterial=!0,this.type="PointsMaterial",this.color=new An(16777215),this.map=null,this.alphaMap=null,this.size=1,this.sizeAttenuation=!0,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.alphaMap=e.alphaMap,this.size=e.size,this.sizeAttenuation=e.sizeAttenuation,this.fog=e.fog,this}}const yw=new ui,_b=new Wu,xy=new gl,Ey=new Me;class xw extends or{constructor(e=new Ii,t=new Ab){super(),this.isPoints=!0,this.type="Points",this.geometry=e,this.material=t,this.updateMorphTargets()}copy(e,t){return super.copy(e,t),this.material=e.material,this.geometry=e.geometry,this}raycast(e,t){const r=this.geometry,s=this.matrixWorld,l=e.params.Points.threshold,u=r.drawRange;if(null===r.boundingSphere&&r.computeBoundingSphere(),xy.copy(r.boun
vendor: 5,653 bytes, line 72
72dingSphere),xy.applyMatrix4(s),xy.radius+=l,!1===e.ray.intersectsSphere(xy))return;yw.copy(s).invert(),_b.copy(e.ray).applyMatrix4(yw);const g=l/((this.scale.x+this.scale.y+this.scale.z)/3),_=g*g,x=r.index,C=r.attributes.position;if(null!==x)for(let F=Math.max(0,u.start),O=Math.min(x.count,u.start+u.count);F<O;F++){const k=x.getX(F);Ey.fromBufferAttribute(C,k),Ew(Ey,k,_,s,e,t,this)}else for(let F=Math.max(0,u.start),O=Math.min(C.count,u.start+u.count);F<O;F++)Ey.fromBufferAttribute(C,F),Ew(Ey,F,_,s,e,t,this)}updateMorphTargets(){const t=this.geometry.morphAttributes,r=Object.keys(t);if(r.length>0){const s=t[r[0]];if(void 0!==s){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let l=0,u=s.length;l<u;l++){const g=s[l].name||String(l);this.morphTargetInfluences.push(0),this.morphTargetDictionary[g]=l}}}}}function Ew(f,e,t,r,s,l,u){const g=_b.distanceSqToPoint(f);if(g<t){const _=new Me;_b.closestPointToPoint(f,_),_.applyMatrix4(r);const x=s.ray.origin.distanceTo(_);if(x<s.near||x>s.far)return;l.push({distance:x,distanceToRay:Math.sqrt(g),point:_,index:e,face:null,object:u})}}class vb extends ws{constructor(e,t,r,s,l,u,g,_,x,M,C,P){super(null,u,g,_,x,M,s,l,C,P),this.isCompressedTexture=!0,this.image={width:t,height:r},this.mipmaps=e,this.flipY=!1,this.generateMipmaps=!1}}class cI extends vb{constructor(e,t,r,s,l,u){super(e,t,r,l,u),this.isCompressedArrayTexture=!0,this.image.depth=s,this.wrapR=aa}}class Vs extends Ii{constructor(e=1,t=1,r=1,s=32,l=1,u=!1,g=0,_=2*Math.PI){super(),this.type="CylinderGeometry",this.parameters={radiusTop:e,radiusBottom:t,height:r,radialSegments:s,heightSegments:l,openEnded:u,thetaStart:g,thetaLength:_};const x=this;s=Math.floor(s),l=Math.floor(l);const M=[],C=[],P=[],R=[];let F=0;const O=[],k=r/2;let L=0;function z(W){const ne=F,fe=new Rt,ge=new Me;let de=0;const ie=!0===W?e:t,ye=!0===W?1:-1;for(let qe=1;qe<=s;qe++)C.push(0,k*ye,0),P.push(0,ye,0),R.push(.5,.5),F++;const He=F;for(let qe=0;qe<=s;qe++){const Ve=qe/s*_+g,We=Math.cos(Ve),nt=Math.sin(Ve);ge.x=ie*nt,ge.y=k*ye,ge.z=ie*We,C.push(ge.x,ge.y,ge.z),P.push(0,ye,0),fe.x=.5*We+.5,fe.y=.5*nt*ye+.5,R.push(fe.x,fe.y),F++}for(let qe=0;qe<s;qe++){const Ge=ne+qe,Ve=He+qe;!0===W?M.push(Ve,Ve+1,Ge):M.push(Ve+1,Ve,Ge),de+=3}x.addGroup(L,de,!0===W?1:2),L+=de}(function V(){const W=new Me,ne=new Me;let fe=0;const ge=(t-e)/r;for(let de=0;de<=l;de++){const ie=[],ye=de/l,He=ye*(t-e)+e;for(let qe=0;qe<=s;qe++){const Ge=qe/s,Ve=Ge*_+g,We=Math.sin(Ve),nt=Math.cos(Ve);ne.x=He*We,ne.y=-ye*r+k,ne.z=He*nt,C.push(ne.x,ne.y,ne.z),W.set(We,ge,nt).normalize(),P.push(W.x,W.y,W.z),R.push(Ge,1-ye),ie.push(F++)}O.push(ie)}for(let de=0;de<s;de++)for(let ie=0;ie<l;ie++){const He=O[ie+1][de],qe=O[ie+1][de+1],Ge=O[ie][de+1];M.push(O[ie][de],He,Ge),M.push(He,qe,Ge),fe+=6}x.addGroup(L,fe,0),L+=fe})(),!1===u&&(e>0&&z(!0),t>0&&z(!1)),this.setIndex(M),this.setAttribute("position",new Fn(C,3)),this.setAttribute("normal",new Fn(P,3)),this.setAttribute("uv",new Fn(R,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new Vs(e.radiusTop,e.radiusBottom,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}}class of extends Ii{constructor(e=[],t=[],r=1,s=0){super(),this.type="PolyhedronGeometry",this.parameters={vertices:e,indices:t,radius:r,detail:s};const l=[],u=[];function _(V,z,W,ne){const fe=ne+1,ge=[];for(let de=0;de<=fe;de++){ge[de]=[];const ie=V.clone().lerp(W,de/fe),ye=z.clone().lerp(W,de/fe),He=fe-de;for(let qe=0;qe<=He;qe++)ge[de][qe]=0===qe&&de===fe?ie:ie.clone().lerp(ye,qe/He)}for(let de=0;de<fe;de++)for(let ie=0;ie<2*(fe-de)-1;ie++){const ye=Math.floor(ie/2);ie%2==0?(P(ge[de][ye+1]),P(ge[de+1][ye]),P(ge[de][ye])):(P(ge[de][ye+1]),P(ge[de+1][ye+1]),P(ge[de+1][ye]))}}function P(V){l.push(V.x,V.y,V.z)}function R(V,z){const W=3*V;z.x=e[W+0],z.y=e[W+1],z.z=e[W+2]}function O(V,z,W,ne){ne<0&&1===V.x&&(u[z]=V.x-1),0===W.x&&0===W.z&&(u[z]=ne/2/Math.PI+.5)}function k(V){return Math.atan2(V.z,-V.x)}function L(V){return Math.atan2(-V.y,Math.sqrt(V.x*V.x+V.z*V.z))}(function g(V){const z=new Me,W=new Me,ne=new Me;for(let fe=0;fe<t.length;fe+=3)R(t[fe+0],z),R(t[fe+1],W),R(t[fe+2],ne),_(z,W,ne,V)})(s),function x(V){const z=new Me;for(let W=0;W<l.length;W+=3)z.x=l[W+0],z.y=l[W+1],z.z=l[W+2],z.normalize().multiplyScalar(V),l[W+0]=z.x,l[W+1]=z.y,l[W+2]=z.z}(r),function M(){const V=new Me;for(let z=0;z<l.length;z+=3){V.x=l[z+0],V.y=l[z+1],V.z=l[z+2];const W=k(V)/2/Math.PI+.5,ne=L(V)/Math.PI+.5;u.push(W,1-ne)}(function F(){const V=new Me,z=new Me,W=new Me,ne=new Me,fe=new Rt,ge=new Rt,de=new Rt;for(let ie=0,ye=0;ie<l.length;ie+=9,ye+=6){V.set(l[ie+0],l[ie+1],l[ie+2]),z.set(l[ie+3],l[ie+4],l[ie+5]),W.set(l[ie+6],l[ie+7],l[ie+8]),fe.set(u[ye+0],u[ye+1]),ge.set(u[ye+2],u[ye+3]),de.set(u[ye+4],u[ye+5]),ne.copy(V).add(z).add(W).divideScalar(3);const He=k(ne);O(fe,ye+0,V,He),O(ge,ye+2,z,He),O(de,ye+4,W,He)}})(),function C(){for(let V=0;V<u.length;V+=6){const z=u[V+0],W=u[V+2],ne=u[V+4],fe=Math.max(z,W,ne),ge=Math.min(z,W,ne);fe>.9&&ge<.1&&(z<.2&&(u[V+0]+=1),W<.2&&(u[V+2]+=1),ne<.2&&(u[V+4]+=1))}}()}(),this.setAttribute("position",new Fn(l,3)),this.setAttribute("normal",new Fn(l.slice(),3)),this.setAttribute("uv",new Fn(u,2)),0===s?this.computeVertexNormals():this.normalizeNormals()}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new of(e.vertices,e.indices,e.radius,e.details)}}class Xh extends of{constructor(e=1,t=0){super([1,0,0,-1,0,0,0,1,0,0,-1,0,0,0,1,0,0,-1],[0,2,4,0,4,3,0,3,5,0,5,2,1,2,5,1,5,3,1,3,4,1,4,2],e,t),this.type="OctahedronGeometry",this.parameters={radiu
vendor: 14,474 bytes, line 72
72s:e,detail:t}}static fromJSON(e){return new Xh(e.radius,e.detail)}}class Id extends Ii{constructor(e=1,t=32,r=16,s=0,l=2*Math.PI,u=0,g=Math.PI){super(),this.type="SphereGeometry",this.parameters={radius:e,widthSegments:t,heightSegments:r,phiStart:s,phiLength:l,thetaStart:u,thetaLength:g},t=Math.max(3,Math.floor(t)),r=Math.max(2,Math.floor(r));const _=Math.min(u+g,Math.PI);let x=0;const M=[],C=new Me,P=new Me,R=[],F=[],O=[],k=[];for(let L=0;L<=r;L++){const V=[],z=L/r;let W=0;0===L&&0===u?W=.5/t:L===r&&_===Math.PI&&(W=-.5/t);for(let ne=0;ne<=t;ne++){const fe=ne/t;C.x=-e*Math.cos(s+fe*l)*Math.sin(u+z*g),C.y=e*Math.cos(u+z*g),C.z=e*Math.sin(s+fe*l)*Math.sin(u+z*g),F.push(C.x,C.y,C.z),P.copy(C).normalize(),O.push(P.x,P.y,P.z),k.push(fe+W,1-z),V.push(x++)}M.push(V)}for(let L=0;L<r;L++)for(let V=0;V<t;V++){const W=M[L][V],ne=M[L+1][V],fe=M[L+1][V+1];(0!==L||u>0)&&R.push(M[L][V+1],W,fe),(L!==r-1||_<Math.PI)&&R.push(W,ne,fe)}this.setIndex(R),this.setAttribute("position",new Fn(F,3)),this.setAttribute("normal",new Fn(O,3)),this.setAttribute("uv",new Fn(k,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new Id(e.radius,e.widthSegments,e.heightSegments,e.phiStart,e.phiLength,e.thetaStart,e.thetaLength)}}class qh extends Ii{constructor(e=1,t=.4,r=12,s=48,l=2*Math.PI){super(),this.type="TorusGeometry",this.parameters={radius:e,tube:t,radialSegments:r,tubularSegments:s,arc:l},r=Math.floor(r),s=Math.floor(s);const u=[],g=[],_=[],x=[],M=new Me,C=new Me,P=new Me;for(let R=0;R<=r;R++)for(let F=0;F<=s;F++){const O=F/s*l,k=R/r*Math.PI*2;C.x=(e+t*Math.cos(k))*Math.cos(O),C.y=(e+t*Math.cos(k))*Math.sin(O),C.z=t*Math.sin(k),g.push(C.x,C.y,C.z),M.x=e*Math.cos(O),M.y=e*Math.sin(O),P.subVectors(C,M).normalize(),_.push(P.x,P.y,P.z),x.push(F/s),x.push(R/r)}for(let R=1;R<=r;R++)for(let F=1;F<=s;F++){const k=(s+1)*(R-1)+F-1,L=(s+1)*(R-1)+F,V=(s+1)*R+F;u.push((s+1)*R+F-1,k,V),u.push(k,L,V)}this.setIndex(u),this.setAttribute("position",new Fn(g,3)),this.setAttribute("normal",new Fn(_,3)),this.setAttribute("uv",new Fn(x,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new qh(e.radius,e.tube,e.radialSegments,e.tubularSegments,e.arc)}}class Vy extends as{constructor(e){super(),this.isMeshStandardMaterial=!0,this.defines={STANDARD:""},this.type="MeshStandardMaterial",this.color=new An(16777215),this.roughness=1,this.metalness=0,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new An(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new Rt(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.roughnessMap=null,this.metalnessMap=null,this.alphaMap=null,this.envMap=null,this.envMapIntensity=1,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.defines={STANDARD:""},this.color.copy(e.color),this.roughness=e.roughness,this.metalness=e.metalness,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.roughnessMap=e.roughnessMap,this.metalnessMap=e.metalnessMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapIntensity=e.envMapIntensity,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class lf extends Vy{constructor(e){super(),this.isMeshPhysicalMaterial=!0,this.defines={STANDARD:"",PHYSICAL:""},this.type="MeshPhysicalMaterial",this.clearcoatMap=null,this.clearcoatRoughness=0,this.clearcoatRoughnessMap=null,this.clearcoatNormalScale=new Rt(1,1),this.clearcoatNormalMap=null,this.ior=1.5,Object.defineProperty(this,"reflectivity",{get:function(){return jr(2.5*(this.ior-1)/(this.ior+1),0,1)},set:function(t){this.ior=(1+.4*t)/(1-.4*t)}}),this.iridescenceMap=null,this.iridescenceIOR=1.3,this.iridescenceThicknessRange=[100,400],this.iridescenceThicknessMap=null,this.sheenColor=new An(0),this.sheenColorMap=null,this.sheenRoughness=1,this.sheenRoughnessMap=null,this.transmissionMap=null,this.thickness=0,this.thicknessMap=null,this.attenuationDistance=1/0,this.attenuationColor=new An(1,1,1),this.specularIntensity=1,this.specularIntensityMap=null,this.specularColor=new An(1,1,1),this.specularColorMap=null,this._sheen=0,this._clearcoat=0,this._iridescence=0,this._transmission=0,this.setValues(e)}get sheen(){return this._sheen}set sheen(e){this._sheen>0!=e>0&&this.version++,this._sheen=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 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.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}}function Ml(f,e,t){return Pb(f)?new f.constructor(f.subarray(e,void 0!==t?t:f.length)):f.slice(e,t)}function Pd(f,e,t){return!f||!t&&f.constructor===e?f:"number"==typeof e.BYTES_PER_ELEMENT?new e(f):Array.prototype.slice.call(f)}function Pb(f){return ArrayBuffer.isView(f)&&!(f instanceof DataView)}function kw(f){const t=f.length,r=new Array(t);for(let s=0;s!==t;++s)r[s]=s;return r.sort(function e(s,l){return f[s]-f[l]}),r}function Rb(f,e,t){const r=f.length,s=new f.constructor(r);for(let l=0,u=0;u!==r;++l){const g=t[l]*e;for(let _=0;_!==e;++_)s[u++]=f[g+_]}return s}function Bb(f,e,t,r){let s=1,l=f[0];for(;void 0!==l&&void 0===l[r];)l=f[s++];if(void 0===l)return;let u=l[r];if(void 0!==u)if(Array.isArray(u))do{u=l[r],void 0!==u&&(e.push(l.time),t.push.apply(t,u)),l=f[s++]}while(void 0!==l);else if(void 0!==u.toArray)do{u=l[r],void 0!==u&&(e.push(l.time),u.toArray(t,t.length)),l=f[s++]}while(void 0!==l);else do{u=l[r],void 0!==u&&(e.push(l.time),t.push(u)),l=f[s++]}while(void 0!==l)}class Q0{constructor(e,t,r,s){this.parameterPositions=e,this._cachedIndex=0,this.resultBuffer=void 0!==s?s:new t.constructor(r),this.sampleValues=t,this.valueSize=r,this.settings=null,this.DefaultSettings_={}}evaluate(e){const t=this.parameterPositions;let r=this._cachedIndex,s=t[r],l=t[r-1];e:{t:{let u;n:{i:if(!(e<s)){for(let g=r+2;;){if(void 0===s){if(e<l)break i;return r=t.length,this._cachedIndex=r,this.copySampleValue_(r-1)}if(r===g)break;if(l=s,s=t[++r],e<s)break t}u=t.length;break n}if(e>=l)break e;{const g=t[1];e<g&&(r=2,l=g);for(let _=r-2;;){if(void 0===l)return this._cachedIndex=0,this.copySampleValue_(0);if(r===_)break;if(s=l,l=t[--r-1],e>=l)break t}u=r,r=0}}for(;r<u;){const g=r+u>>>1;e<t[g]?u=g:r=g+1}if(s=t[r],l=t[r-1],void 0===l)return this._cachedIndex=0,this.copySampleValue_(0);if(void 0===s)return r=t.length,this._cachedIndex=r,this.copySampleValue_(r-1)}this._cachedIndex=r,this.intervalChanged_(r,l,s)}return this.interpolate_(r,l,e,s)}getSettings_(){return this.settings||this.DefaultSettings_}copySampleValue_(e){const t=this.resultBuffer,r=this.sampleValues,s=this.valueSize,l=e*s;for(let u=0;u!==s;++u)t[u]=r[l+u];return t}interpolate_(){throw new Error("call to abstract method")}intervalChanged_(){}}class eP extends Q0{constructor(e,t,r,s){super(e,t,r,s),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0,this.DefaultSettings_={endingStart:Fu,endingEnd:Fu}}intervalChanged_(e,t,r){const s=this.parameterPositions;let l=e-2,u=e+1,g=s[l],_=s[u];if(void 0===g)switch(this.getSettings_().endingStart){case ku:l=e,g=2*t-r;break;case 2402:l=s.length-2,g=t+s[l]-s[l+1];break;default:l=e,g=r}if(void 0===_)switch(this.getSettings_().endingEnd){case ku:u=e,_=2*r-t;break;case 2402:u=1,_=r+s[1]-s[0];break;default:u=e-1,_=t}const x=.5*(r-t),M=this.valueSize;this._weightPrev=x/(t-g),this._weightNext=x/(_-r),this._offsetPrev=l*M,this._offsetNext=u*M}interpolate_(e,t,r,s){const l=this.resultBuffer,u=this.sampleValues,g=this.valueSize,_=e*g,x=_-g,M=this._offsetPrev,C=this._offsetNext,P=this._weightPrev,R=this._weightNext,F=(r-t)/(s-t),O=F*F,k=O*F,L=-P*k+2*P*O-P*F,V=(1+P)*k+(-1.5-2*P)*O+(-.5+P)*F+1,z=(-1-R)*k+(1.5+R)*O+.5*F,W=R*k-R*O;for(let ne=0;ne!==g;++ne)l[ne]=L*u[M+ne]+V*u[x+ne]+z*u[_+ne]+W*u[C+ne];return l}}class Ow extends Q0{constructor(e,t,r,s){super(e,t,r,s)}interpolate_(e,t,r,s){const l=this.resultBuffer,u=this.sampleValues,g=this.valueSize,_=e*g,x=_-g,M=(r-t)/(s-t),C=1-M;for(let P=0;P!==g;++P)l[P]=u[x+P]*C+u[_+P]*M;return l}}class tP extends Q0{constructor(e,t,r,s){super(e,t,r,s)}interpolate_(e){return this.copySampleValue_(e-1)}}class Qc{constructor(e,t,r,s){if(void 0===e)throw new Error("THREE.KeyframeTrack: track name is undefined");if(void 0===t||0===t.length)throw new Error("THREE.KeyframeTrack: no keyframes in track named "+e);this.name=e,this.times=Pd(t,this.TimeBufferType),this.values=Pd(r,this.ValueBufferType),this.setInterpolation(s||this.DefaultInterpolation)}static toJSON(e){const t=e.constructor;let r;if(t.toJSON!==this.toJSON)r=t.toJSON(e);else{r={name:e.name,times:Pd(e.times,Array),values:Pd(e.values,Array)};const s=e.getInterpolation();s!==e.DefaultInterpolation&&(r.interpolation=s)}return r.type=e.ValueTypeName,r}InterpolantFactoryMethodDiscrete(e){return new tP(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodLinear(e){return new Ow(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodSmooth(e){return new eP(this.times,this.values,this.getValueSize(),e)}setInterpolation(e){let t;switch(e){case td:t=this.InterpolantFactoryMethodDiscrete;break;case Du:t=this.InterpolantFactoryMethodLinear;break;case 2302:t=this.InterpolantFactoryMethodSmooth}if(void 0===t){const r="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(void 0===this.createInterpolant){if(e===this.DefaultInterpolation)throw new Error(r);this.setInterpolation(this.DefaultInterpolation)}return console.warn("THREE.KeyframeTrack:",r),this}return this.createInterpolant=t,this}getInterpolation(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return td;case this.InterpolantFactoryMethodLinear:return Du;case this.InterpolantFactoryMethodSmooth:return 2302}}getValueSize(){return this.values.length/this.times.length}shift(e){if(0!==e){const t=this.times;for(let r=0,s=t.length;r!==s;++r)t[r]+=e}return this}scale(e){if(1!==e){const t=this.times;for(let r=0,s=t.length;r!==s;++r)t[r]*=e}return this}trim(e,t){const r=this.times,s=r.length;let l=0,u=s-1;for(;l!==s&&r[l]<e;)++l;for(;-1!==u&&r[u]>t;)--u;if(++u,0!==l||u!==s){l>=u&&(u=Math.max(u,1),l=u-1);const g=this.getValueSize();this.times=Ml(r,l,u),this.values=Ml(this.values,l*g,u*g)}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 r=this.times,s=this.values,l=r.length;0===l&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);let u=null;for(let g=0;g!==l;g++){const _=r[g];if("number"==typeof _&&isNaN(_)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,g,_),e=!1;break}if(null!==u&&u>_){console.error("THREE.KeyframeTrack: Out of order keys.",this,g,_,u),e=!1;break}u=_}if(void 0!==s&&Pb(s))for(let g=0,_=s.length;g!==_;++g){const x=s[g];if(isNaN(x)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,g,x),e=!1;break}}return e}optimize(){const e=Ml(this.times),t=Ml(this.values),r=this.getValueSize(),s=2302===this.getInterpolation(),l=e.length-1;let u=1;for(let g=1;g<l;++g){let _=!1;const x=e[g];if(x!==e[g+1]&&(1!==g||x!==e[0]))if(s)_=!0;else{const C=g*r,P=C-r,R=C+r;for(let F=0;F!==r;++F){const O=t[C+F];if(O!==t[P+F]||O!==t[R+F]){_=!0;break}}}if(_){if(g!==u){e[u]=e[g];const C=g*r,P=u*r;for(let R=0;R!==r;++R)t[P+R]=t[C+R]}++u}}if(l>0){e[u]=e[l];for(let g=l*r,_=u*r,x=0;x!==r;++x)t[_+x]=t[g+x];++u}return u!==e.length?(this.times=Ml(e,0,u),this.values=Ml(t,0,u*r)):(this.times=e,this.values=t),this}clone(){const e=Ml(this.times,0),t=Ml(this.values,0),s=new(0,this.constructor)(this.name,e,t);return s.createInterpolant=this.createInterpolant,s}}Qc.prototype.TimeBufferType=Float32Array,Qc.prototype.ValueBufferType=Float32Array,Qc.prototype.DefaultInterpolation=Du;class Em extends Qc{}Em.prototype.ValueTypeName="bool",Em.prototype.ValueBufferType=Array,Em.prototype.DefaultInterpolation=td,Em.prototype.InterpolantFactoryMethodLinear=void 0,Em.prototype.InterpolantFactoryMethodSmooth=void 0;class Nw extends Qc{}Nw.prototype.ValueTypeName="color";class W0 extends Qc{}W0.prototype.ValueTypeName="number";class nP extends Q0{constructor(e,t,r,s){super(e,t,r,s)}interpolate_(e,t,r,s){const l=this.resultBuffer,u=this.sampleValues,g=this.valueSize,_=(r-t)/(s-t);let x=e*g;
vendor: 5,627 bytes, line 72
72for(let M=x+g;x!==M;x+=4)Ir.slerpFlat(l,0,u,x-g,u,x,_);return l}}class Rd extends Qc{InterpolantFactoryMethodLinear(e){return new nP(this.times,this.values,this.getValueSize(),e)}}Rd.prototype.ValueTypeName="quaternion",Rd.prototype.DefaultInterpolation=Du,Rd.prototype.InterpolantFactoryMethodSmooth=void 0;class bm extends Qc{}bm.prototype.ValueTypeName="string",bm.prototype.ValueBufferType=Array,bm.prototype.DefaultInterpolation=td,bm.prototype.InterpolantFactoryMethodLinear=void 0,bm.prototype.InterpolantFactoryMethodSmooth=void 0;class X0 extends Qc{}X0.prototype.ValueTypeName="vector";class Bd{constructor(e,t=-1,r,s=2500){this.name=e,this.tracks=r,this.duration=t,this.blendMode=s,this.uuid=Za(),this.duration<0&&this.resetDuration()}static parse(e){const t=[],r=e.tracks,s=1/(e.fps||1);for(let u=0,g=r.length;u!==g;++u)t.push(rP(r[u]).scale(s));const l=new this(e.name,e.duration,t,e.blendMode);return l.uuid=e.uuid,l}static toJSON(e){const t=[],r=e.tracks,s={name:e.name,duration:e.duration,tracks:t,uuid:e.uuid,blendMode:e.blendMode};for(let l=0,u=r.length;l!==u;++l)t.push(Qc.toJSON(r[l]));return s}static CreateFromMorphTargetSequence(e,t,r,s){const l=t.length,u=[];for(let g=0;g<l;g++){let _=[],x=[];_.push((g+l-1)%l,g,(g+1)%l),x.push(0,1,0);const M=kw(_);_=Rb(_,1,M),x=Rb(x,1,M),!s&&0===_[0]&&(_.push(l),x.push(x[0])),u.push(new W0(".morphTargetInfluences["+t[g].name+"]",_,x).scale(1/r))}return new this(e,-1,u)}static findByName(e,t){let r=e;Array.isArray(e)||(r=e.geometry&&e.geometry.animations||e.animations);for(let s=0;s<r.length;s++)if(r[s].name===t)return r[s];return null}static CreateClipsFromMorphTargetSequences(e,t,r){const s={},l=/^([\w-]*?)([\d]+)$/;for(let g=0,_=e.length;g<_;g++){const x=e[g],M=x.name.match(l);if(M&&M.length>1){const C=M[1];let P=s[C];P||(s[C]=P=[]),P.push(x)}}const u=[];for(const g in s)u.push(this.CreateFromMorphTargetSequence(g,s[g],t,r));return u}static parseAnimation(e,t){if(!e)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;const r=function(C,P,R,F,O){if(0!==R.length){const k=[],L=[];Bb(R,k,L,F),0!==k.length&&O.push(new C(P,k,L))}},s=[],l=e.name||"default",u=e.fps||30,g=e.blendMode;let _=e.length||-1;const x=e.hierarchy||[];for(let C=0;C<x.length;C++){const P=x[C].keys;if(P&&0!==P.length)if(P[0].morphTargets){const R={};let F;for(F=0;F<P.length;F++)if(P[F].morphTargets)for(let O=0;O<P[F].morphTargets.length;O++)R[P[F].morphTargets[O]]=-1;for(const O in R){const k=[],L=[];for(let V=0;V!==P[F].morphTargets.length;++V){const z=P[F];k.push(z.time),L.push(z.morphTarget===O?1:0)}s.push(new W0(".morphTargetInfluence["+O+"]",k,L))}_=R.length*u}else{const R=".bones["+t[C].name+"]";r(X0,R+".position",P,"pos",s),r(Rd,R+".quaternion",P,"rot",s),r(X0,R+".scale",P,"scl",s)}}return 0===s.length?null:new this(l,_,s,g)}resetDuration(){let t=0;for(let r=0,s=this.tracks.length;r!==s;++r){const l=this.tracks[r];t=Math.max(t,l.times[l.times.length-1])}return this.duration=t,this}trim(){for(let e=0;e<this.tracks.length;e++)this.tracks[e].trim(0,this.duration);return this}validate(){let e=!0;for(let t=0;t<this.tracks.length;t++)e=e&&this.tracks[t].validate();return e}optimize(){for(let e=0;e<this.tracks.length;e++)this.tracks[e].optimize();return this}clone(){const e=[];for(let t=0;t<this.tracks.length;t++)e.push(this.tracks[t].clone());return new this.constructor(this.name,this.duration,e,this.blendMode)}toJSON(){return this.constructor.toJSON(this)}}function rP(f){if(void 0===f.type)throw new Error("THREE.KeyframeTrack: track type undefined, can not parse");const e=function iP(f){switch(f.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return W0;case"vector":case"vector2":case"vector3":case"vector4":return X0;case"color":return Nw;case"quaternion":return Rd;case"bool":case"boolean":return Em;case"string":return bm}throw new Error("THREE.KeyframeTrack: Unsupported typeName: "+f)}(f.type);if(void 0===f.times){const t=[],r=[];Bb(f.keys,t,r,"value"),f.times=t,f.values=r}return void 0!==e.parse?e.parse(f):new e(f.name,f.times,f.values,f.interpolation)}const Sm={enabled:!1,files:{},add:function(f,e){!1!==this.enabled&&(this.files[f]=e)},get:function(f){if(!1!==this.enabled)return this.files[f]},remove:function(f){delete this.files[f]},clear:function(){this.files={}}};class Uw{constructor(e,t,r){const s=this;let _,l=!1,u=0,g=0;const x=[];this.onStart=void 0,this.onLoad=e,this.onProgress=t,this.onError=r,this.itemStart=function(M){g++,!1===l&&void 0!==s.onStart&&s.onStart(M,u,g),l=!0},this.itemEnd=function(M){u++,void 0!==s.onProgress&&s.onProgress(M,u,g),u===g&&(l=!1,void 0!==s.onLoad&&s.onLoad())},this.itemError=function(M){void 0!==s.onError&&s.onError(M)},this.resolveURL=function(M){return _?_(M):M},this.setURLModifier=function(M){return _=M,this},this.addHandler=function(M,C){return x.push(M,C),this},this.removeHandler=function(M){const C=x.indexOf(M);return-1!==C&&x.splice(C,2),this},this.getHandler=function(M){for(let C=0,P=x.length;C<P;C+=2){const R=x[C],F=x[C+1];if(R.global&&(R.lastIndex=0),R.test(M))return F}return null}}}const Lb=new Uw;class ao{constructor(e){this.manager=void 0!==e?e:Lb,this.crossOrigin="anonymous",this.withCredentials=!1,this.path="",this.resourcePath="",this.requestHeader={}}load(){}loadAsync(e,t){const r=this;return new Promise(function(s,l){r.load(e,s,t,l)})}parse(){}setCrossOrigin(e){return this.crossOrigin=e,this}setWithCredentials(e){return this.withCredentials=e,this}setPath(e){return this.path=e,this}setResourcePath(e){return this.resourcePath=e,this}setRequestHeader(e){return this.requestHeader=e,this}}const Yh={};
vendor: 8,589 bytes, line 72
72class sP extends Error{constructor(e,t){super(e),this.response=t}}class oo extends ao{constructor(e){super(e)}load(e,t,r,s){void 0===e&&(e=""),void 0!==this.path&&(e=this.path+e),e=this.manager.resolveURL(e);const l=Sm.get(e);if(void 0!==l)return this.manager.itemStart(e),setTimeout(()=>{t&&t(l),this.manager.itemEnd(e)},0),l;if(void 0!==Yh[e])return void Yh[e].push({onLoad:t,onProgress:r,onError:s});Yh[e]=[],Yh[e].push({onLoad:t,onProgress:r,onError:s});const u=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),g=this.mimeType,_=this.responseType;fetch(u).then(x=>{if(200===x.status||0===x.status){if(0===x.status&&console.warn("THREE.FileLoader: HTTP Status 0 received."),typeof ReadableStream>"u"||void 0===x.body||void 0===x.body.getReader)return x;const M=Yh[e],C=x.body.getReader(),P=x.headers.get("Content-Length")||x.headers.get("X-File-Size"),R=P?parseInt(P):0,F=0!==R;let O=0;const k=new ReadableStream({start(L){!function V(){C.read().then(({done:z,value:W})=>{if(z)L.close();else{O+=W.byteLength;const ne=new ProgressEvent("progress",{lengthComputable:F,loaded:O,total:R});for(let fe=0,ge=M.length;fe<ge;fe++){const de=M[fe];de.onProgress&&de.onProgress(ne)}L.enqueue(W),V()}})}()}});return new Response(k)}throw new sP(`fetch for "${x.url}" responded with ${x.status}: ${x.statusText}`,x)}).then(x=>{switch(_){case"arraybuffer":return x.arrayBuffer();case"blob":return x.blob();case"document":return x.text().then(M=>(new DOMParser).parseFromString(M,g));case"json":return x.json();default:if(void 0===g)return x.text();{const C=/charset="?([^;"\s]*)"?/i.exec(g),P=C&&C[1]?C[1].toLowerCase():void 0,R=new TextDecoder(P);return x.arrayBuffer().then(F=>R.decode(F))}}}).then(x=>{Sm.add(e,x);const M=Yh[e];delete Yh[e];for(let C=0,P=M.length;C<P;C++){const R=M[C];R.onLoad&&R.onLoad(x)}}).catch(x=>{const M=Yh[e];if(void 0===M)throw this.manager.itemError(e),x;delete Yh[e];for(let C=0,P=M.length;C<P;C++){const R=M[C];R.onError&&R.onError(x)}this.manager.itemError(e)}).finally(()=>{this.manager.itemEnd(e)}),this.manager.itemStart(e)}setResponseType(e){return this.responseType=e,this}setMimeType(e){return this.mimeType=e,this}}class Hy extends ao{constructor(e){super(e)}load(e,t,r,s){void 0!==this.path&&(e=this.path+e),e=this.manager.resolveURL(e);const l=this,u=Sm.get(e);if(void 0!==u)return l.manager.itemStart(e),setTimeout(function(){t&&t(u),l.manager.itemEnd(e)},0),u;const g=rd("img");function _(){M(),Sm.add(e,this),t&&t(this),l.manager.itemEnd(e)}function x(C){M(),s&&s(C),l.manager.itemError(e),l.manager.itemEnd(e)}function M(){g.removeEventListener("load",_,!1),g.removeEventListener("error",x,!1)}return g.addEventListener("load",_,!1),g.addEventListener("error",x,!1),"data:"!==e.slice(0,5)&&void 0!==this.crossOrigin&&(g.crossOrigin=this.crossOrigin),l.manager.itemStart(e),g.src=e,g}}class aP extends ao{constructor(e){super(e)}load(e,t,r,s){const l=this,u=new _m,g=new oo(this.manager);return g.setResponseType("arraybuffer"),g.setRequestHeader(this.requestHeader),g.setPath(this.path),g.setWithCredentials(l.withCredentials),g.load(e,function(_){const x=l.parse(_);x&&(void 0!==x.image?u.image=x.image:void 0!==x.data&&(u.image.width=x.width,u.image.height=x.height,u.image.data=x.data),u.wrapS=void 0!==x.wrapS?x.wrapS:aa,u.wrapT=void 0!==x.wrapT?x.wrapT:aa,u.magFilter=void 0!==x.magFilter?x.magFilter:Tr,u.minFilter=void 0!==x.minFilter?x.minFilter:Tr,u.anisotropy=void 0!==x.anisotropy?x.anisotropy:1,void 0!==x.encoding&&(u.encoding=x.encoding),void 0!==x.flipY&&(u.flipY=x.flipY),void 0!==x.format&&(u.format=x.format),void 0!==x.type&&(u.type=x.type),void 0!==x.mipmaps&&(u.mipmaps=x.mipmaps,u.minFilter=Uo),1===x.mipmapCount&&(u.minFilter=Tr),void 0!==x.generateMipmaps&&(u.generateMipmaps=x.generateMipmaps),u.needsUpdate=!0,t&&t(u,x))},r,s),u}}class zw extends ao{constructor(e){super(e)}load(e,t,r,s){const l=new ws,u=new Hy(this.manager);return u.setCrossOrigin(this.crossOrigin),u.setPath(this.path),u.load(e,function(g){l.image=g,l.needsUpdate=!0,void 0!==t&&t(l)},r,s),l}}class Ld extends or{constructor(e,t=1){super(),this.isLight=!0,this.type="Light",this.color=new An(e),this.intensity=t}dispose(){}copy(e,t){return super.copy(e,t),this.color.copy(e.color),this.intensity=e.intensity,this}toJSON(e){const t=super.toJSON(e);return t.object.color=this.color.getHex(),t.object.intensity=this.intensity,void 0!==this.groundColor&&(t.object.groundColor=this.groundColor.getHex()),void 0!==this.distance&&(t.object.distance=this.distance),void 0!==this.angle&&(t.object.angle=this.angle),void 0!==this.decay&&(t.object.decay=this.decay),void 0!==this.penumbra&&(t.object.penumbra=this.penumbra),void 0!==this.shadow&&(t.object.shadow=this.shadow.toJSON()),t}}const Db=new ui,Gw=new Me,Vw=new Me;class Fb{constructor(e){this.camera=e,this.bias=0,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new Rt(512,512),this.map=null,this.mapPass=null,this.matrix=new ui,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new rm,this._frameExtents=new Rt(1,1),this._viewportCount=1,this._viewports=[new Ar(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(e){const t=this.camera,r=this.matrix;Gw.setFromMatrixPosition(e.matrixWorld),t.position.copy(Gw),Vw.setFromMatrixPosition(e.target.matrixWorld),t.lookAt(Vw),t.updateMatrixWorld(),Db.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),this._frustum.setFromProjectionMatrix(Db),r.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),r.multiply(Db)}getViewport(e){return this._viewports[e]}getFrameExtents(){return this._frameExtents}dispose(){this.map&&this.map.dispose(),this.mapPass&&this.mapPass.dispose()}copy(e){return this.camera=e.camera.clone(),this.bias=e.bias,this.radius=e.radius,this.mapSize.copy(e.mapSize),this}clone(){return(new this.constructor).copy(this)}toJSON(){const e={};return 0!==this.bias&&(e.bias=this.bias),0!==this.normalBias&&(e.normalBias=this.normalBias),1!==this.radius&&(e.radius=this.radius),(512!==this.mapSize.x||512!==this.mapSize.y)&&(e.mapSize=this.mapSize.toArray()),e.camera=this.camera.toJSON(!1).object,delete e.camera.matrix,e}}class lP extends Fb{constructor(){super(new Wr(50,1,.5,500)),this.isSpotLightShadow=!0,this.focus=1}updateMatrices(e){const t=this.camera,r=2*Nu*e.angle*this.focus,s=this.mapSize.width/this.mapSize.height,l=e.distance||t.far;(r!==t.fov||s!==t.aspect||l!==t.far)&&(t.fov=r,t.aspect=s,t.far=l,t.updateProjectionMatrix()),super.updateMatrices(e)}copy(e){return super.copy(e),this.focus=e.focus,this}}class Hw extends Ld{constructor(e,t,r=0,s=Math.PI/3,l=0,u=2){super(e,t),this.isSpotLight=!0,this.type="SpotLight",this.position.copy(or.DEFAULT_UP),this.updateMatrix(),this.target=new or,this.distance=r,this.angle=s,this.penumbra=l,this.decay=u,this.map=null,this.shadow=new lP}get power(){return this.intensity*Math.PI}set power(e){this.intensity=e/Math.PI}dispose(){this.shadow.dispose()}copy(e,t){return super.copy(e,t),this.distance=e.distance,this.angle=e.angle,this.penumbra=e.penumbra,this.decay=e.decay,this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}const Qw=new ui,q0=new Me,kb=new Me;class cP extends Fb{constructor(){super(new Wr(90,1,.5,500)),this.isPointLightShadow=!0,this._frameExtents=new Rt(4,2),this._viewportCount=6,this._viewports=[new Ar(2,1,1,1),new Ar(0,1,1,1),new Ar(3,1,1,1),new Ar(1,1,1,1),new Ar(3,0,1,1),new Ar(1,0,1,1)],this._cubeDirections=[new Me(1,0,0),new Me(-1,0,0),new Me(0,0,1),new Me(0,0,-1),new Me(0,1,0),new Me(0,-1,0)],this._cubeUps=[new Me(0,1,0),new Me(0,1,0),new Me(0,1,0),new Me(0,1,0),new Me(0,0,1),new Me(0,0,-1)]}updateMatrices(e,t=0){const r=this.camera,s=this.matrix,l=e.distance||r.far;l!==r.far&&(r.far=l,r.updateProjectionMatrix()),q0.setFromMatrixPosition(e.matrixWorld),r.position.copy(q0),kb.copy(r.position),kb.add(this._cubeDirections[t]),r.up.copy(this._cubeUps[t]),r.lookAt(kb),r.updateMatrixWorld(),s.makeTranslation(-q0.x,-q0.y,-q0.z),Qw.multiplyMatrices(r.projectionMatrix,r.matrixWorldInverse),this._frustum.setFromProjectionMatrix(Qw)}}class Ww extends Ld{constructor(e,t,r=0,s=2){super(e,t),this.isPointLight=!0,this.type="PointLight",this.distance=r,this.decay=s,this.shadow=new cP}get power(){return 4*this.intensity*Math.PI}set power(e){this.intensity=e/(4*Math.PI)}dispose(){this.shadow.dispose()}copy(e,t){return super.copy(e,t),this.distance=e.distance,this.decay=e.decay,this.shadow=e.shadow.clone(),this}}class hP extends Fb{constructor(){super(new Md(-5,5,5,-5,.5,500)),this.isDirectionalLightShadow=!0}
72}class Ob extends Ld{constructor(e,t){super(e,t),this.isDirectionalLight=!0,this.type="DirectionalLight",this.position.copy(or.DEFAULT_UP),this.updateMatrix(),this.target=new or,this.shadow=new hP}dispose(){this.shadow.dispose()}copy(e){return super.copy(e),this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}class Xw extends Ld{constructor(e,t){super(e,t),this.isAmbientLight=!0,this.type="AmbientLight"}}class Y0{static decodeText(e){if(typeof TextDecoder<"u")return(new TextDecoder).decode(e);let t="";for(let r=0,s=e.length;r<s;r++)t+=String.fromCharCode(e[r]);try{return decodeURIComponent(escape(t))}catch{return t}}static extractUrlBase(e){const t=e.lastIndexOf("/");return-1===t?"./":e.slice(0,t+1)}static resolveURL(e,t){return"string"!=typeof e||""===e?"":(/^https?:\/\//i.test(t)&&/^\//.test(e)&&(t=t.replace(/(^https?:\/\/[^\/]+).*/i,"$1")),/^(https?:)?\/\//i.test(e)||/^data:.*,.*$/i.test(e)||/^blob:.*$/i.test(e)?e:t+e)}}class gP extends ao{constructor(e){super(e),this.isImageBitmapLoader=!0,typeof createImageBitmap>"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,r,s){void 0===e&&(e=""),void 0!==this.path&&(e=this.path+e),e=this.manager.resolveURL(e);const l=this,u=Sm.get(e);if(void 0!==u)return l.manager.itemStart(e),setTimeout(function(){t&&t(u),l.manager.itemEnd(e)},0),u;const g={};g.credentials="anonymous"===this.crossOrigin?"same-origin":"include",g.headers=this.requestHeader,fetch(e,g).then(function(_){return _.blob()}).then(function(_){return createImageBitmap(_,Object.assign(l.options,{colorSpaceConversion:"none"}))}).then(function(_){Sm.add(e,_),t&&t(_),l.manager.itemEnd(e)}).catch(function(_){s&&s(_),l.manager.itemError(e),l.manager.itemEnd(e)}),l.manager.itemStart(e)}}class zb{constructor(e=!0){this.autoStart=e,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=jw(),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=jw();e=(t-this.oldTime)/1e3,this.oldTime=t,this.elapsedTime+=e}return e}}function jw(){return(typeof performance>"u"?Date:performance).now()}class yP{constructor(e,t,r){let s,l,u;switch(this.binding=e,this.valueSize=r,t){case"quaternion":s=this._slerp,l=this._slerpAdditive,u=this._setAdditiveIdentityQuaternion,this.buffer=new Float64Array(6*r),this._workIndex=5;break;case"string":case"bool":s=this._select,l=this._select,u=this._setAdditiveIdentityOther,this.buffer=new Array(5*r);break;default:s=this._lerp,l=this._lerpAdditive,u=this._setAdditiveIdentityNumeric,this.buffer=new Float64Array(5*r)}this._mixBufferRegion=s,this._mixBufferRegionAdditive=l,this._setIdentity=u,this._origIndex=3,this._addIndex=4,this.cumulativeWeight=0,this.cumulativeWeightAdditive=0,this.useCount=0,this.referenceCount=0}accumulate(e,t){const r=this.buffer,s=this.valueSize,l=e*s+s;let u=this.cumulativeWeight;if(0===u){for(let g=0;g!==s;++g)r[l+g]=r[g];u=t}else u+=t,this._mixBufferRegion(r,l,0,t/u,s);this.cumulativeWeight=u}accumulateAdditive(e){const t=this.buffer,r=this.valueSize,s=r*this._addIndex;0===this.cumulativeWeightAdditive&&this._setIdentity(),this._mixBufferRegionAdditive(t,s,0,e,r),this.cumulativeWeightAdditive+=e}apply(e){const t=this.valueSize,r=this.buffer,s=e*t+t,l=this.cumulativeWeight,u=this.cumulativeWeightAdditive,g=this.binding;this.cumulativeWeight=0,this.cumulativeWeightAdditive=0,l<1&&this._mixBufferRegion(r,s,t*this._origIndex,1-l,t),u>0&&this._mixBufferRegionAdditive(r,s,this._addIndex*t,1,t);for(let _=t,x=t+t;_!==x;++_)if(r[_]!==r[_+t]){g.setValue(r,s);break}}saveOriginalState(){const t=this.buffer,r=this.valueSize,s=r*this._origIndex;this.binding.getValue(t,s);for(let l=r,u=s;l!==u;++l)t[l]=t[s+l%r];this._setIdentity(),this.cumulativeWeight=0,this.cumulativeWeightAdditive=0}restoreOriginalState(){this.binding.setValue(this.buffer,3*this.valueSize)}_setAdditiveIdentityNumeric(){const e=this._addIndex*this.valueSize,t=e+this.valueSize;
vendor: 4,488 bytes, line 72
72for(let r=e;r<t;r++)this.buffer[r]=0}_setAdditiveIdentityQuaternion(){this._setAdditiveIdentityNumeric(),this.buffer[this._addIndex*this.valueSize+3]=1}_setAdditiveIdentityOther(){const e=this._origIndex*this.valueSize,t=this._addIndex*this.valueSize;for(let r=0;r<this.valueSize;r++)this.buffer[t+r]=this.buffer[e+r]}_select(e,t,r,s,l){if(s>=.5)for(let u=0;u!==l;++u)e[t+u]=e[r+u]}_slerp(e,t,r,s){Ir.slerpFlat(e,t,e,t,e,r,s)}_slerpAdditive(e,t,r,s,l){const u=this._workIndex*l;Ir.multiplyQuaternionsFlat(e,u,e,t,e,r),Ir.slerpFlat(e,t,e,t,e,u,s)}_lerp(e,t,r,s,l){const u=1-s;for(let g=0;g!==l;++g){const _=t+g;e[_]=e[_]*u+e[r+g]*s}}_lerpAdditive(e,t,r,s,l){for(let u=0;u!==l;++u){const g=t+u;e[g]=e[g]+e[r+u]*s}}}const Gb="\\[\\]\\.:\\/",xP=new RegExp("["+Gb+"]","g"),Vb="[^"+Gb+"]",EP="[^"+Gb.replace("\\.","")+"]",CP=new RegExp("^"+/((?:WC+[\/:])*)/.source.replace("WC",Vb)+/(WCOD+)?/.source.replace("WCOD",EP)+/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",Vb)+/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",Vb)+"$"),TP=["material","materials","bones","map"];class IP{constructor(e,t,r){const s=r||Ur.parseTrackName(t);this._targetGroup=e,this._bindings=e.subscribe_(t,s)}getValue(e,t){this.bind();const s=this._bindings[this._targetGroup.nCachedObjects_];void 0!==s&&s.getValue(e,t)}setValue(e,t){const r=this._bindings;for(let s=this._targetGroup.nCachedObjects_,l=r.length;s!==l;++s)r[s].setValue(e,t)}bind(){const e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,r=e.length;t!==r;++t)e[t].bind()}unbind(){const e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,r=e.length;t!==r;++t)e[t].unbind()}}let Ur=(()=>{class f{constructor(t,r,s){this.path=r,this.parsedPath=s||f.parseTrackName(r),this.node=f.findNode(t,this.parsedPath.nodeName),this.rootNode=t,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(t,r,s){return t&&t.isAnimationObjectGroup?new f.Composite(t,r,s):new f(t,r,s)}static sanitizeNodeName(t){return t.replace(/\s/g,"_").replace(xP,"")}static parseTrackName(t){const r=CP.exec(t);if(null===r)throw new Error("PropertyBinding: Cannot parse trackName: "+t);const s={nodeName:r[2],objectName:r[3],objectIndex:r[4],propertyName:r[5],propertyIndex:r[6]},l=s.nodeName&&s.nodeName.lastIndexOf(".");if(void 0!==l&&-1!==l){const u=s.nodeName.substring(l+1);-1!==TP.indexOf(u)&&(s.nodeName=s.nodeName.substring(0,l),s.objectName=u)}if(null===s.propertyName||0===s.propertyName.length)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+t);return s}static findNode(t,r){if(void 0===r||""===r||"."===r||-1===r||r===t.name||r===t.uuid)return t;if(t.skeleton){const s=t.skeleton.getBoneByName(r);if(void 0!==s)return s}if(t.children){const s=function(u){for(let g=0;g<u.length;g++){const _=u[g];if(_.name===r||_.uuid===r)return _;const x=s(_.children);if(x)return x}return null},l=s(t.children);if(l)return l}return null}_getValue_unavailable(){}_setValue_unavailable(){}_getValue_direct(t,r){t[r]=this.targetObject[this.propertyName]}_getValue_array(t,r){const s=this.resolvedProperty;for(let l=0,u=s.length;l!==u;++l)t[r++]=s[l]}_getValue_arrayElement(t,r){t[r]=this.resolvedProperty[this.propertyIndex]}_getValue_toArray(t,r){this.resolvedProperty.toArray(t,r)}_setValue_direct(t,r){this.targetObject[this.propertyName]=t[r]}_setValue_direct_setNeedsUpdate(t,r){this.targetObject[this.propertyName]=t[r],this.targetObject.needsUpdate=!0}_setValue_direct_setMatrixWorldNeedsUpdate(t,r){this.targetObject[this.propertyName]=t[r],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_array(t,r){const s=this.resolvedProperty;for(let l=0,u=s.length;l!==u;++l)s[l]=t[r++]}_setValue_array_setNeedsUpdate(t,r){const s=this.resolvedProperty;for(let l=0,u=s.length;l!==u;++l)s[l]=t[r++];this.targetObject.needsUpdate=!0}_setValue_array_setMatrixWorldNeedsUpdate(t,r){const s=this.resolvedProperty;for(let l=0,u=s.length;l!==u;++l)s[l]=t[r++];this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_arrayElement(t,r){this.resolvedProperty[this.propertyIndex]=t[r]}_setValue_arrayElement_setNeedsUpdate(t,r){this.resolvedProperty[this.propertyIndex]=t[r],this.targetObject.needsUpdate=!0}_setValue_arrayElement_setMatrixWorldNeedsUpdate(t,r){this.resolvedProperty[this.propertyIndex]=t[r],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_fromArray(t,r){this.resolvedProperty.fromArray(t,r)}_setValue_fromArray_setNeedsUpdate(t,r){this.resolvedProperty.fromArray(t,r),this.targetObject.needsUpdate=!0}
vendor: 5,480 bytes, line 72
72_setValue_fromArray_setMatrixWorldNeedsUpdate(t,r){this.resolvedProperty.fromArray(t,r),this.targetObject.matrixWorldNeedsUpdate=!0}_getValue_unbound(t,r){this.bind(),this.getValue(t,r)}_setValue_unbound(t,r){this.bind(),this.setValue(t,r)}bind(){let t=this.node;const r=this.parsedPath,s=r.objectName,l=r.propertyName;let u=r.propertyIndex;if(t||(t=f.findNode(this.rootNode,r.nodeName),this.node=t),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,!t)return void console.error("THREE.PropertyBinding: Trying to update node for track: "+this.path+" but it wasn't found.");if(s){let M=r.objectIndex;switch(s){case"materials":if(!t.material)return void console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);if(!t.material.materials)return void console.error("THREE.PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.",this);t=t.material.materials;break;case"bones":if(!t.skeleton)return void console.error("THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.",this);t=t.skeleton.bones;for(let C=0;C<t.length;C++)if(t[C].name===M){M=C;break}break;case"map":if("map"in t){t=t.map;break}if(!t.material)return void console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);if(!t.material.map)return void console.error("THREE.PropertyBinding: Can not bind to material.map as node.material does not have a map.",this);t=t.material.map;break;default:if(void 0===t[s])return void console.error("THREE.PropertyBinding: Can not bind to objectName of node undefined.",this);t=t[s]}if(void 0!==M){if(void 0===t[M])return void console.error("THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,t);t=t[M]}}const g=t[l];if(void 0===g)return void console.error("THREE.PropertyBinding: Trying to update property for track: "+r.nodeName+"."+l+" but it wasn't found.",t);let _=this.Versioning.None;this.targetObject=t,void 0!==t.needsUpdate?_=this.Versioning.NeedsUpdate:void 0!==t.matrixWorldNeedsUpdate&&(_=this.Versioning.MatrixWorldNeedsUpdate);let x=this.BindingType.Direct;if(void 0!==u){if("morphTargetInfluences"===l){if(!t.geometry)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.",this);if(!t.geometry.morphAttributes)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.",this);void 0!==t.morphTargetDictionary[u]&&(u=t.morphTargetDictionary[u])}x=this.BindingType.ArrayElement,this.resolvedProperty=g,this.propertyIndex=u}else void 0!==g.fromArray&&void 0!==g.toArray?(x=this.BindingType.HasFromToArray,this.resolvedProperty=g):Array.isArray(g)?(x=this.BindingType.EntireArray,this.resolvedProperty=g):this.propertyName=l;this.getValue=this.GetterByBindingType[x],this.setValue=this.SetterByBindingTypeAndVersioning[x][_]}unbind(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}}return f.Composite=IP,f})();Ur.prototype.BindingType={Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3},Ur.prototype.Versioning={None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2},Ur.prototype.GetterByBindingType=[Ur.prototype._getValue_direct,Ur.prototype._getValue_array,Ur.prototype._getValue_arrayElement,Ur.prototype._getValue_toArray],Ur.prototype.SetterByBindingTypeAndVersioning=[[Ur.prototype._setValue_direct,Ur.prototype._setValue_direct_setNeedsUpdate,Ur.prototype._setValue_direct_setMatrixWorldNeedsUpdate],[Ur.prototype._setValue_array,Ur.prototype._setValue_array_setNeedsUpdate,Ur.prototype._setValue_array_setMatrixWorldNeedsUpdate],[Ur.prototype._setValue_arrayElement,Ur.prototype._setValue_arrayElement_setNeedsUpdate,Ur.prototype._setValue_arrayElement_setMatrixWorldNeedsUpdate],[Ur.prototype._setValue_fromArray,Ur.prototype._setValue_fromArray_setNeedsUpdate,Ur.prototype._setValue_fromArray_setMatrixWorldNeedsUpdate]];class PP{constructor(e,t,r=null,s=t.blendMode){this._mixer=e,this._clip=t,this._localRoot=r,this.blendMode=s;const l=t.tracks,u=l.length,g=new Array(u),_={endingStart:Fu,endingEnd:Fu};for(let x=0;x!==u;++x){const M=l[x].createInterpolant(null);g[x]=M,M.settings=_}this._interpolantSettings=_,this._interpolants=g,this._propertyBindings=new Array(u),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=2201,this._loopCount=-1,this._startTime=null,this.time=0,this.timeScale=1,this._effectiveTimeScale=1,this.weight=1,this._effectiveWeight=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtStart=!0,this.zeroSlopeAtEnd=!0}play(){return this._mixer._activateAction(this),this}stop(){return this._mixer._deactivateAction(this),this.reset()}reset(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()}isRunning(){return this.enabled&&!this.paused&&0!==this.timeScale&&null===this._startTime&&this._mixer._isActiveAction(this)}isScheduled(){return this._mixer._isActiveAction(this)}startAt(e){return this._startTime=e,this}setLoop(e,t){return this.loop=e,this.repetitions=t,this}setEffectiveWeight(e){return this.weight=e,this._effectiveWeight=this.enabled?e:0,this.stopFading()}getEffectiveWeight(){return this._effectiveWeight}
vendor: 10,396 bytes, line 72
72fadeIn(e){return this._scheduleFading(e,0,1)}fadeOut(e){return this._scheduleFading(e,1,0)}crossFadeFrom(e,t,r){if(e.fadeOut(t),this.fadeIn(t),r){const s=this._clip.duration,l=e._clip.duration,g=s/l;e.warp(1,l/s,t),this.warp(g,1,t)}return this}crossFadeTo(e,t,r){return e.crossFadeFrom(this,t,r)}stopFading(){const e=this._weightInterpolant;return null!==e&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}setEffectiveTimeScale(e){return this.timeScale=e,this._effectiveTimeScale=this.paused?0:e,this.stopWarping()}getEffectiveTimeScale(){return this._effectiveTimeScale}setDuration(e){return this.timeScale=this._clip.duration/e,this.stopWarping()}syncWith(e){return this.time=e.time,this.timeScale=e.timeScale,this.stopWarping()}halt(e){return this.warp(this._effectiveTimeScale,0,e)}warp(e,t,r){const s=this._mixer,l=s.time,u=this.timeScale;let g=this._timeScaleInterpolant;null===g&&(g=s._lendControlInterpolant(),this._timeScaleInterpolant=g);const _=g.parameterPositions,x=g.sampleValues;return _[0]=l,_[1]=l+r,x[0]=e/u,x[1]=t/u,this}stopWarping(){const e=this._timeScaleInterpolant;return null!==e&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}getMixer(){return this._mixer}getClip(){return this._clip}getRoot(){return this._localRoot||this._mixer._root}_update(e,t,r,s){if(!this.enabled)return void this._updateWeight(e);const l=this._startTime;if(null!==l){const _=(e-l)*r;_<0||0===r?t=0:(this._startTime=null,t=r*_)}t*=this._updateTimeScale(e);const u=this._updateTime(t),g=this._updateWeight(e);if(g>0){const _=this._interpolants,x=this._propertyBindings;if(2501===this.blendMode)for(let M=0,C=_.length;M!==C;++M)_[M].evaluate(u),x[M].accumulateAdditive(g);else for(let M=0,C=_.length;M!==C;++M)_[M].evaluate(u),x[M].accumulate(s,g)}}_updateWeight(e){let t=0;if(this.enabled){t=this.weight;const r=this._weightInterpolant;if(null!==r){const s=r.evaluate(e)[0];t*=s,e>r.parameterPositions[1]&&(this.stopFading(),0===s&&(this.enabled=!1))}}return this._effectiveWeight=t,t}_updateTimeScale(e){let t=0;if(!this.paused){t=this.timeScale;const r=this._timeScaleInterpolant;null!==r&&(t*=r.evaluate(e)[0],e>r.parameterPositions[1]&&(this.stopWarping(),0===t?this.paused=!0:this.timeScale=t))}return this._effectiveTimeScale=t,t}_updateTime(e){const t=this._clip.duration,r=this.loop;let s=this.time+e,l=this._loopCount;const u=2202===r;if(0===e)return-1===l||!u||1&~l?s:t-s;if(2200===r){-1===l&&(this._loopCount=0,this._setEndings(!0,!0,!1));e:{if(s>=t)s=t;else{if(!(s<0)){this.time=s;break e}s=0}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=s,this._mixer.dispatchEvent({type:"finished",action:this,direction:e<0?-1:1})}}else{if(-1===l&&(e>=0?(l=0,this._setEndings(!0,0===this.repetitions,u)):this._setEndings(0===this.repetitions,!0,u)),s>=t||s<0){const g=Math.floor(s/t);s-=t*g,l+=Math.abs(g);const _=this.repetitions-l;if(_<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,s=e>0?t:0,this.time=s,this._mixer.dispatchEvent({type:"finished",action:this,direction:e>0?1:-1});else{if(1===_){const x=e<0;this._setEndings(x,!x,u)}else this._setEndings(!1,!1,u);this._loopCount=l,this.time=s,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:g})}}else this.time=s;if(u&&!(1&~l))return t-s}return s}_setEndings(e,t,r){const s=this._interpolantSettings;r?(s.endingStart=ku,s.endingEnd=ku):(s.endingStart=e?this.zeroSlopeAtStart?ku:Fu:2402,s.endingEnd=t?this.zeroSlopeAtEnd?ku:Fu:2402)}_scheduleFading(e,t,r){const s=this._mixer,l=s.time;let u=this._weightInterpolant;null===u&&(u=s._lendControlInterpolant(),this._weightInterpolant=u);const g=u.parameterPositions,_=u.sampleValues;return g[0]=l,_[0]=t,g[1]=l+e,_[1]=r,this}}const RP=new Float32Array(1);class BP extends Pc{constructor(e){super(),this._root=e,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}_bindAction(e,t){const r=e._localRoot||this._root,s=e._clip.tracks,l=s.length,u=e._propertyBindings,g=e._interpolants,_=r.uuid,x=this._bindingsByRootAndName;let M=x[_];void 0===M&&(M={},x[_]=M);for(let C=0;C!==l;++C){const P=s[C],R=P.name;let F=M[R];if(void 0!==F)++F.referenceCount,u[C]=F;else{if(F=u[C],void 0!==F){null===F._cacheIndex&&(++F.referenceCount,this._addInactiveBinding(F,_,R));continue}F=new yP(Ur.create(r,R,t&&t._propertyBindings[C].binding.parsedPath),P.ValueTypeName,P.getValueSize()),++F.referenceCount,this._addInactiveBinding(F,_,R),u[C]=F}g[C].resultBuffer=F.buffer}}_activateAction(e){if(!this._isActiveAction(e)){if(null===e._cacheIndex){const r=(e._localRoot||this._root).uuid,s=e._clip.uuid,l=this._actionsByClip[s];this._bindAction(e,l&&l.knownActions[0]),this._addInactiveAction(e,s,r)}const t=e._propertyBindings;for(let r=0,s=t.length;r!==s;++r){const l=t[r];0==l.useCount++&&(this._lendBinding(l),l.saveOriginalState())}this._lendAction(e)}}_deactivateAction(e){if(this._isActiveAction(e)){const t=e._propertyBindings;for(let r=0,s=t.length;r!==s;++r){const l=t[r];0==--l.useCount&&(l.restoreOriginalState(),this._takeBackBinding(l))}this._takeBackAction(e)}}_initMemoryManager(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;const e=this;this.stats={actions:{get total(){return e._actions.length},get inUse(){return e._nActiveActions}},bindings:{get total(){return e._bindings.length},get inUse(){return e._nActiveBindings}},controlInterpolants:{get total(){return e._controlInterpolants.length},get inUse(){return e._nActiveControlInterpolants}}}}_isActiveAction(e){const t=e._cacheIndex;return null!==t&&t<this._nActiveActions}_addInactiveAction(e,t,r){const s=this._actions,l=this._actionsByClip;let u=l[t];if(void 0===u)u={knownActions:[e],actionByRoot:{}},e._byClipCacheIndex=0,l[t]=u;else{const g=u.knownActions;e._byClipCacheIndex=g.length,g.push(e)}e._cacheIndex=s.length,s.push(e),u.actionByRoot[r]=e}_removeInactiveAction(e){const t=this._actions,r=t[t.length-1],s=e._cacheIndex;r._cacheIndex=s,t[s]=r,t.pop(),e._cacheIndex=null;const l=e._clip.uuid,u=this._actionsByClip,g=u[l],_=g.knownActions,x=_[_.length-1],M=e._byClipCacheIndex;x._byClipCacheIndex=M,_[M]=x,_.pop(),e._byClipCacheIndex=null,delete g.actionByRoot[(e._localRoot||this._root).uuid],0===_.length&&delete u[l],this._removeInactiveBindingsForAction(e)}_removeInactiveBindingsForAction(e){const t=e._propertyBindings;for(let r=0,s=t.length;r!==s;++r){const l=t[r];0==--l.referenceCount&&this._removeInactiveBinding(l)}}_lendAction(e){const t=this._actions,r=e._cacheIndex,s=this._nActiveActions++,l=t[s];e._cacheIndex=s,t[s]=e,l._cacheIndex=r,t[r]=l}_takeBackAction(e){const t=this._actions,r=e._cacheIndex,s=--this._nActiveActions,l=t[s];e._cacheIndex=s,t[s]=e,l._cacheIndex=r,t[r]=l}_addInactiveBinding(e,t,r){const s=this._bindingsByRootAndName,l=this._bindings;let u=s[t];void 0===u&&(u={},s[t]=u),u[r]=e,e._cacheIndex=l.length,l.push(e)}_removeInactiveBinding(e){const t=this._bindings,r=e.binding,s=r.rootNode.uuid,l=r.path,u=this._bindingsByRootAndName,g=u[s],_=t[t.length-1],x=e._cacheIndex;_._cacheIndex=x,t[x]=_,t.pop(),delete g[l],0===Object.keys(g).length&&delete u[s]}_lendBinding(e){const t=this._bindings,r=e._cacheIndex,s=this._nActiveBindings++,l=t[s];e._cacheIndex=s,t[s]=e,l._cacheIndex=r,t[r]=l}_takeBackBinding(e){const t=this._bindings,r=e._cacheIndex,s=--this._nActiveBindings,l=t[s];e._cacheIndex=s,t[s]=e,l._cacheIndex=r,t[r]=l}_lendControlInterpolant(){const e=this._controlInterpolants,t=this._nActiveControlInterpolants++;let r=e[t];return void 0===r&&(r=new Ow(new Float32Array(2),new Float32Array(2),1,RP),r.__cacheIndex=t,e[t]=r),r}_takeBackControlInterpolant(e){const t=this._controlInterpolants,r=e.__cacheIndex,s=--this._nActiveControlInterpolants,l=t[s];e.__cacheIndex=s,t[s]=e,l.__cacheIndex=r,t[r]=l}clipAction(e,t,r){const s=t||this._root,l=s.uuid;let u="string"==typeof e?Bd.findByName(s,e):e;const g=null!==u?u.uuid:e,_=this._actionsByClip[g];let x=null;if(void 0===r&&(r=null!==u?u.blendMode:2500),void 0!==_){const C=_.actionByRoot[l];if(void 0!==C&&C.blendMode===r)return C;x=_.knownActions[0],null===u&&(u=x._clip)}if(null===u)return null;const M=new PP(this,u,t,r);return this._bindAction(M,x),this._addInactiveAction(M,g,l),M}existingAction(e,t){const r=t||this._root,s=r.uuid,l="string"==typeof e?Bd.findByName(r,e):e,g=this._actionsByClip[l?l.uuid:e];return void 0!==g&&g.actionByRoot[s]||null}stopAllAction(){const e=this._actions;for(let r=this._nActiveActions-1;r>=0;--r)e[r].stop();return this}update(e){const t=this._actions,r=this._nActiveActions,s=this.time+=e*=this.timeScale,l=Math.sign(e),u=this._accuIndex^=1;for(let x=0;x!==r;++x)t[x]._update(s,e,l,u);const g=this._bindings,_=this._nActiveBindings;for(let x=0;x!==_;++x)g[x].apply(u);return this}setTime(e){this.time=0;for(let t=0;t<this._actions.length;t++)this._actions[t].time=0;return this.update(e)}getRoot(){return this._root}uncacheClip(e){const t=this._actions,r=e.uuid,s=this._actionsByClip,l=s[r];if(void 0!==l){const u=l.knownActions;for(let g=0,_=u.length;g!==_;++g){const x=u[g];this._deactivateAction(x);const M=x._cacheIndex,C=t[t.length-1];x._cacheIndex=null,x._byClipCacheIndex=null,C._cacheIndex=M,t[M]=C,t.pop(),this._removeInactiveBindingsForAction(x)}delete s[r]}}uncacheRoot(e){const t=e.uuid,r=this._actionsByClip;for(const u in r){const _=r[u].actionByRoot[t];void 0!==_&&(this._deactivateAction(_),this._removeInactiveAction(_))}const l=this._bindingsByRootAndName[t];if(void 0!==l)for(const u in l){const g=l[u];g.restoreOriginalState(),this._removeInactiveBinding(g)}}uncacheAction(e,t){const r=this.existingAction(e,t);null!==r&&(this._deactivateAction(r),this._removeInactiveAction(r))}}class nC{constructor(e,t,r=0,s=1/0){this.ray=new Wu(e,t),this.near=r,this.far=s,this.camera=null,this.layers=new Zp,this.params={Mesh:{},Line:{threshold:1},LOD:{},Points:{threshold:1},Sprite:{}}}set(e,t){this.ray.set(e,t)}setFromCamera(e,t){t.isPerspectiveCamera?(this.ray.origin.setFromMatrixPosition(t.matrixWorld),this.ray.direction.set(e.x,e.y,.5).unproject(t).sub(this.ray.origin).normalize(),this.camera=t):t.isOrthographicCamera?(this.ray.origin.set(e.x,e.y,(t.near+t.far)/(t.near-t.far)).unproject(t),this.ray.direction.set(0,0,-1).transformDirection(t.matrixWorld),this.camera=t):console.error("THREE.Raycaster: 
72Unsupported camera type: "+t.type)}intersectObject(e,t=!0,r=[]){return Hb(e,this,r,t),r.sort(iC),r}intersectObjects(e,t=!0,r=[]){for(let s=0,l=e.length;s<l;s++)Hb(e[s],this,r,t);return r.sort(iC),r}}function iC(f,e){return f.distance-e.distance}function Hb(f,e,t,r){if(f.layers.test(e.layers)&&f.raycast(e,t),!0===r){const s=f.children;for(let l=0,u=s.length;l<u;l++)Hb(s[l],e,t,!0)}}class FP extends Vc{constructor(e=1){const t=[0,0,0,e,0,0,0,0,0,0,e,0,0,0,0,0,0,e],s=new Ii;s.setAttribute("position",new Fn(t,3)),s.setAttribute("color",new Fn([1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],3)),super(s,new Va({vertexColors:!0,toneMapped:!1})),this.type="AxesHelper"}setColors(e,t,r){const s=new An,l=this.geometry.attributes.color.array;return s.set(e),s.toArray(l,0),s.toArray(l,3),s.set(t),s.toArray(l,6),s.toArray(l,9),s.set(r),s.toArray(l,12),s.toArray(l,15),this.geometry.attributes.color.needsUpdate=!0,this}dispose(){this.geometry.dispose(),this.material.dispose()}}typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:"151"}})),typeof window<"u"&&(window.__THREE__?console.warn("WARNING: Multiple instances of Three.js being imported."):window.__THREE__="151");var kP=v(24335),OP=v.n(kP);class $0{constructor(){this.isPass=!0,this.enabled=!0,this.needsSwap=!0,this.clear=!1,this.renderToScreen=!1}setSize(){}render(){console.error("THREE.Pass: .render() must be implemented in derived pass.")}dispose(){}}const NP=new Md(-1,1,1,-1,0,1),Xb=new Ii;Xb.setAttribute("position",new Fn([-1,3,0,-1,-1,0,3,-1,0],3)),Xb.setAttribute("uv",new Fn([0,2,0,0,2,0],2));class dC{constructor(e){this._mesh=new pn(Xb,e)}dispose(){this._mesh.geometry.dispose()}render(e){e.render(this._mesh,NP)}get material(){return this._mesh.material}set material(e){this._mesh.material=e}}class pC extends $0{constructor(e,t,r,s,l){super(),this.scene=e,this.camera=t,this.overrideMaterial=r,this.clearColor=s,this.clearAlpha=void 0!==l?l:0,this.clear=!0,this.clearDepth=!1,this.needsSwap=!1,this._oldClearColor=new An}render(e,t,r){const s=e.autoClear;let l,u;e.autoClear=!1,void 0!==this.overrideMaterial&&(u=this.scene.overrideMaterial,this.scene.overrideMaterial=this.overrideMaterial),this.clearColor&&(e.getClearColor(this._oldClearColor),l=e.getClearAlpha(),e.setClearColor(this.clearColor,this.clearAlpha)),this.clearDepth&&e.clearDepth(),e.setRenderTarget(this.renderToScreen?null:r),this.clear&&e.clear(e.autoClearColor,e.autoClearDepth,e.autoClearStencil),e.render(this.scene,this.camera),this.clearColor&&e.setClearColor(this._oldClearColor,l),void 0!==this.overrideMaterial&&(this.scene.overrideMaterial=u),e.autoClear=s}}const mC={uniforms:{tDiffuse:{value:null},opacity:{value:1}},vertexShader:"\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\tvUv = uv;\n\t\t\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n\t\t}",fragmentShader:"\n\n\t\tuniform float opacity;\n\n\t\tuniform sampler2D tDiffuse;\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\tgl_FragColor = texture2D( tDiffuse, vUv );\n\t\t\tgl_FragColor.a *= opacity;\n\n\n\t\t}"};class UP extends $0{constructor(e,t){super(),this.textureID=void 0!==t?t:"tDiffuse",e instanceof Ts?(this.uniforms=e.uniforms,this.material=e):e&&(this.uniforms=Nc.clone(e.uniforms),this.material=new Ts({defines:Object.assign({},e.defines),uniforms:this.uniforms,vertexShader:e.vertexShader,fragmentShader:e.fragmentShader})),this.fsQuad=new dC(this.material)}render(e,t,r){this.uniforms[this.textureID]&&(this.uniforms[this.textureID].value=r.texture),this.fsQuad.material=this.material,this.renderToScreen?(e.setRenderTarget(null),this.fsQuad.render(e)):(e.setRenderTarget(t),this.clear&&e.clear(e.autoClearColor,e.autoClearDepth,e.autoClearStencil),this.fsQuad.render(e))}dispose(){this.material.dispose(),this.fsQuad.dispose()}}class gC extends $0{constructor(e,t){super(),this.scene=e,this.camera=t,this.clear=!0,this.needsSwap=!1,this.inverse=!1}render(e,t,r){const s=e.getContext(),l=e.state;let u,g;l.buffers.color.setMask(!1),l.buffers.depth.setMask(!1),l.buffers.color.setLocked(!0),l.buffers.depth.setLocked(!0),this.inverse?(u=0,g=1):(u=1,g=0),l.buffers.stencil.setTest(!0),l.buffers.stencil.setOp(s.REPLACE,s.REPLACE,s.REPLACE),l.buffers.stencil.setFunc(s.ALWAYS,u,4294967295),l.buffers.stencil.setClear(g),l.buffers.stencil.setLocked(!0),e.setRenderTarget(r),this.clear&&e.clear(),e.render(this.scene,this.camera),e.setRenderTarget(t),this.clear&&e.clear(),e.render(this.scene,this.camera),l.buffers.color.setLocked(!1),l.buffers.depth.setLocked(!1),l.buffers.stencil.setLocked(!1),l.buffers.stencil.setFunc(s.EQUAL,1,4294967295),l.buffers.stencil.setOp(s.KEEP,s.KEEP,s.KEEP),l.buffers.stencil.setLocked(!0)}}class zP extends $0{constructor(){super(),this.needsSwap=!1}render(e){e.state.buffers.stencil.setLocked(!1),e.state.buffers.stencil.setTest(!1)}}class AC{constructor(e,t){if(this.renderer=e,void 0===t){const r=e.getSize(new Rt);this._pixelRatio=e.getPixelRatio(),this._width=r.width,this._height=r.height,(t=new Ks(this._width*this._pixelRatio,this._height*this._pixelRatio)).texture.name="EffectComposer.rt1"}else this._pixelRatio=1,this._width=t.width,this._height=t.height;this.renderTarget1=t,this.renderTarget2=t.clone(),this.renderTarget2.texture.name="EffectComposer.rt2",this.writeBuffer=this.renderTarget1,this.readBuffer=this.renderTarget2,this.renderToScreen=!0,this.passes=[],this.copyPass=new UP(mC),this.clock=new zb}swapBuffers(){const e=this.readBuffer;this.readBuffer=this.writeBuffer,this.writeBuffer=e}addPass(e){this.passes.push(e),e.setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}insertPass(e,t){this.passes.splice(t,0,e),e.setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}removePass(e){const t=this.passes.indexOf(e);-1!==t&&this.passes.splice(t,1)}isLastEnabledPass(e){for(let t=e+1;t<this.passes.length;t++)if(this.passes[t].enabled)return!1;return!0}render(e){void 0===e&&(e=this.clock.getDelta());const t=this.renderer.getRenderTarget();let r=!1;for(let s=0,l=this.passes.length;s<l;s++){const u=this.passes[s];if(!1!==u.enabled){if(u.renderToScreen=this.renderToScreen&&this.isLastEnabledPass(s),u.render(this.renderer,this.writeBuffer,this.readBuffer,e,r),u.needsSwap){if(r){const g=this.renderer.getContext(),_=this.renderer.state.buffers.stencil;
72_.setFunc(g.NOTEQUAL,1,4294967295),this.copyPass.render(this.renderer,this.writeBuffer,this.readBuffer,e),_.setFunc(g.EQUAL,1,4294967295)}this.swapBuffers()}void 0!==gC&&(u instanceof gC?r=!0:u instanceof zP&&(r=!1))}}this.renderer.setRenderTarget(t)}reset(e){if(void 0===e){const t=this.renderer.getSize(new Rt);this._pixelRatio=this.renderer.getPixelRatio(),this._width=t.width,this._height=t.height,(e=this.renderTarget1.clone()).setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}this.renderTarget1.dispose(),this.renderTarget2.dispose(),this.renderTarget1=e,this.renderTarget2=e.clone(),this.writeBuffer=this.renderTarget1,this.readBuffer=this.renderTarget2}setSize(e,t){this._width=e,this._height=t;const r=this._width*this._pixelRatio,s=this._height*this._pixelRatio;this.renderTarget1.setSize(r,s),this.renderTarget2.setSize(r,s);for(let l=0;l<this.passes.length;l++)this.passes[l].setSize(r,s)}setPixelRatio(e){this._pixelRatio=e,this.setSize(this._width,this._height)}dispose(){this.renderTarget1.dispose(),this.renderTarget2.dispose(),this.copyPass.dispose()}}class VP{constructor(e){this.loader=Lb,this.clock=new zb,this.controls=!1,this.interaction=!0,this.animate=!0;const t=this.initRenderer(e);this.scene=e.scene||new db,this.renderScene=this.scene,this.camera=this.initCamera(e),this.renderer=t,this.composer=new AC(t),this.mixers=[],this.debug=e.debug,this.scale=e.scale??1,this.viewport=this.initViewport(e.viewport),this.cameraModifier=e.cameraModifier,this.scene.background=new An("0x0a0a0a"),la.enabled=!1,this.initAnimation()}initCamera(e){const t=new Wr(25,(e.width||1)/(e.height||1),.1,6e3);return t.fov=25,t.focus=10,t.updateProjectionMatrix(),t}initRenderer(e){const t=new um({antialias:!0});return t.useLegacyLights=!1,t.outputEncoding=Ui,t.toneMapping=M1,t.toneMappingExposure=.4,t.setClearColor(13421772),t.setPixelRatio(window.devicePixelRatio),t.setSize(e.width,e.height),t}initViewport(e){const t={minWidth:760,minHeight:680};return e&&(t.width=e.width,t.height=e.height,t.maxWidth=e.maxWidth,t.maxHeight=e.maxHeight),t}initAnimation(){let e=0,t=1/60,r=0,s=60;const l=()=>{requestAnimationFrame(l);const u=performance.now(),g=(u-r)/1e3;s=1/g,t=(f=>f<60?1/30:f<30?.1:1/60)(s),r=u,e+=g,e>t&&(this.render(),e%=t)};l()}render(){this.controls&&this.controls.update(),this.interaction&&this.interaction?.update&&this.interaction?.update(
72),this.composer?this.composer.render():this.renderer.render(this.scene,this.camera)}}class HP{constructor(e){if(this.animations=[],!e)throw new Error("Invalid gu-animator configuration.");if(!e.container)throw new Error("Invalid gu-animator configuration missing container.");this.config=e,this.container=e.container,this.init()}init(){this.applications=this.initApplications()}initApplications(){return{three:new VP({width:1778,height:1e3,debug:this.config.debug,scale:this.config.scale,scene:this.currentScene,cameraModifier:{position:{x:0,y:0,z:this.config.cameraZ||0}},viewport:{maxWidth:this.config.maxWidth,maxHeight:this.config.maxHeight}}),lottie:this.initLottie()}}initLottie(){return OP()}getThree(){return this.applications.three}getLottie(){return this.applications.lottie}setScene(e,t=!1){this.currentScene=e;const r=this.applications.three;if(r.scene=e,r.renderScene=e,t){e.visible=!0;const s=new pC(r.scene,r.camera);r.composer.passes=[s]}}setAnimations(e){this.animations=[...e],this.rootTimeline=br.timeline({id:"timeline",paused:!0}),e.forEach(t=>{t.instance?.renderer.elements.forEach(r=>{9===r.data.ty&&(r.pivotElement.visible=!0)})})}play(){this.rootTimeline&&this.rootTimeline.play()}}class QP{constructor(e){this.animator=e}error(e){this.animator.dispatchEvent(new CustomEvent("error",{bubbles:!0,composed:!0,detail:{error:e,message:"Error loading",target:this.animator}}))}loaded(){this.animator.dispatchEvent(new CustomEvent("loaded",{bubbles:!0,composed:!0,detail:{date:(new Date).toISOString(),target:this.animator}}))}marker(e,t){this.animator.dispatchEvent(new CustomEvent("marker",{bubbles:!0,composed:!0,detail:{marker:e,animation:t,target:this.animator}}))}loading(){this.animator.dispatchEvent(new CustomEvent("loading",{bubbles:!0,composed:!0,detail:{date:(new Date).toISOString(),target:this.animator}}))}}class WP{constructor(e){this.assetPath=e,this.audio=new qf.Howl({src:[this.assetPath],preload:!0})}get isPlaying(){return!!this.audio&&this.audio.playing()}play(e){return this.audio?this.audio.play(e):(this.audio=new qf.Howl({src:[this.assetPath],autoplay:!0}),0)}pause(e){return!!this.audio&&this.audio.pause(e)}seek(e){return this.audio?this.audio.seek(e):-1}playing(e){return!!this.audio&&this.audio.playing(e)}rate(e){return this.audio?this.audio.rate(e):0}volume(e){return this.audio?this.audio.volume(e):0}setVolume(e){return this.audio?this.audio.volume(e):0}}class XP{constructor(e,t){this.abortController=new AbortController,this.config=e,this.eventEmitter=t}cancel(){var e=this;return(0,xi.A)(function*(){return e.abortController.abort(),e.reset(),Promise.resolve()})()}reset(){this.abortController=new AbortController}loadAnimation(e,t={}){var r=this;return(0,xi.A)(function*(){const l=yield(yield fetch(e,{signal:r.abortController.signal})).json();if(l.contentPath==e)throw console.error("Asset contentPath is the same as the parent path. Please check contentPath given."),new Error(l);return Object.keys(l).includes("timeline")?r.handleIgAnimatorConfig(l,t,e):Object.keys(l).includes("ddd")?r.handleBodyMovingConfig(l,t,e):(console.warn("Unknown JSON to parse",e),Promise.resolve([]))})()}handleIgAnimatorConfig(e,t,r){var s=this;return(0,xi.A)(function*(){return yield Promise.all(e.assets.map(function(){var l=(0,xi.A)(function*(u){let g=u.contentPath||"";return(!g.includes("/")||!g.startsWith("http")&&!g.startsWith("/"))&&(g=`${r.substring(0,r.lastIndexOf("/")+1)}${g}`),s.loadAnimation(g,{...t,...u,contentPath:g})});return function(u){return l.apply(this,arguments)}}())).then(l=>l.reduce((u,g)=>[...u,...g],[]))})()}handleBodyMovingConfig(e,t,r){const s=r.substring(0,r.lastIndexOf("/")+1),l={meta:this.getAnimationMeta(t),totalFrames:0,frameRate:0,play:function(){this.meta.timeline?.play()},stop:()=>this.config.loaders.lottie.stop(),pause:()=>this.config.loaders.lottie.pause(),setSpeed:u=>this.config.loaders.lottie.setSpeed(u),goToAndStop:(u,g)=>this.config.loaders.lottie.goToAndStop(u,g),goToAndPlay:(u,g)=>this.config.loaders.lottie.goToAndPlay(u,g),setDirection:u=>this.config.loaders.lottie.setDirection(u),setSubframe:u=>this.config.loaders.lottie.getRegisteredAnimations(u),destroy:()=>this.config.loaders.lottie.destroy(),unload:()=>this.config.loaders.lottie.unload(),getDuration:u=>this.config.loaders.lottie.getDuration(u),instance:this.getAnimationInstance(r,s)};return this.configureAnimation(l)}getAnimationMeta(e){return{...e,frame:0,timeline:void 0,animation:void 0}}getAnimationInstance(e,t){return this.config.loaders.lottie.loadAnimation({wrapper:this.config.wrapper,animType:"threejs",loop:!0,prerender:!0,autoplay:!1,path:e,rendererSettings:{className:"animation",preserveAspectRatio:"xMidYMid meet",clearCanvas:!0,assetsPath:this.config.assetsPath?.length>0?this.config.assetsPath:t,renderer:this.config.renderer,renderScene:this.config.scene,scene:this.config.scene},audioFactory:r=>new WP(r)})}configureAnimation(e){return new Promise((t,r)=>{this.abortController.signal.addEventListener("abort",()=>{e.instance.stop(),e.instance.destroy()}),e.instance.addEventListener("DOMLoaded",()=>{e.totalFrames=e.instance.totalFrames,e.frameRate=e.instance.frameRate,this.populateAnimationMeta(e),t([e])}),e.instance.addEventListener("data_failed",()=>{r("error failed load")}),e.instance.addEventListener("error",s=>{console.error(s),r("error loading")})})}populateAnimationMeta(e){const t={frame:0},r=this.getTimeline(e,t);this.convertMarkers(e,r),e.meta.animation=t,e.meta.timeline=r}getTimeline(e,t){const r=e.totalFrames/e.frameRate*1e3,s=br.timeline({id:e.meta.id,paused:!0,repeat:e.meta.repeat});return s.to(t,{ease:"Linear.easeNone",duration:r/1e3,frame:e.totalFrames,onStart:()=>e.instance.play(),onUpdateParams:[e],onUpdate:function(l){const u=Math.floor(l.instance.totalFrames*this.progress());
72l.instance.setCurrentRawFrameValue(u),l.instance.gotoFrame()},onCompleteParams:[e],onComplete:function(l){const u=Math.floor(r*this.progress());l.instance.goToAndStop(u)}}),s}convertMarkers(e,t){const r=e.instance.markers;r?.length&&r.forEach(s=>{const l=s.time/e.frameRate;s.payload.time=l,t.addLabel(s.payload.name,l),t.call((g,_)=>{const x=_.meta.timeline?.time()??0,M=Math.floor(10*x)/10;Math.floor(10*g.time)/10===M&&this.eventEmitter.marker(g,_)},[s.payload,e],l)})}}class _C{constructor(e){this.loader=e,this.monitors=[],this.loaded=0,this.total=0,this.hookUp()}hookUp(){this.loader.onStart=this.getOnStartHandler(),this.loader.onLoad=this.getOnLoadHandler(),this.loader.onProgress=this.getOnProgressHandler(),this.loader.onError=e=>{this.monitors.forEach(t=>{})}}getOnStartHandler(){return(e,t,r)=>{this.total=r,this.loaded=t,this.monitors.forEach(s=>{s.total=r-s.initial.total,s.loaded=t-s.initial.loaded,this.emit(s)})}}getOnLoadHandler(){return()=>{this.monitors.forEach(e=>{e.loaded<e.total||(e.resolve(),this.disconnect(e.handler),this.emit(e))})}}getOnProgressHandler(){return(e,t,r)=>{this.loaded=t,this.total=r,this.monitors.forEach(s=>{s.loaded=t-s.initial.loaded,s.total=r-s.initial.total,s.loaded===s.total&&(s.resolve(),this.disconnect(s.handler)),this.emit(s)})}}connect(e){const t={initial:{loaded:this.loaded,total:this.total},complete:new Promise(()=>{}),loaded:0,total:0,error:void 0,handler:e,resolve:r=>{},reject:r=>{}};return t.complete=new Promise((r,s)=>{t.resolve=r,t.reject=s}),this.monitors.push(t),t}disconnect(e){this.monitors=[...this.monitors.filter(t=>t.handler!==e)]}emit(e){e.handler(e.total,e.loaded)}}let ac=class extends Pg.WF{constructor(){super(...arguments),this.src="",this.assetsPath="",this.renderer="threejs",this.debug=!0,this.scale=1,this.cameraZ=0,this.maxWidth=1024,this.maxHeight=768,this.container=new m1,this.currentSrc="",this.currentSceneId="",this.animations={},this.eventEmitter=new QP(this)}set volume(e){qf.Howler.volume(e),Object.keys(this.animations).forEach(t=>{this.animations[t].animations.forEach(r=>{r.instance.setVolume(e)})})}get volume(){return qf.Howler.volume()}static get styles(){return Pg.AH`
73      :host {
74        display: block;
75        background-color: #f2f2f2;
76        color: #5c5c5c;
77      }
78
79      > canvas {
80        position: absolute;
81        top: -10px;
82      }
83    `}loadAnimation(e,t="new",r=()=>{}){var s=this;return(0,xi.A)(function*(){s.progressMonitor=new _C(s.controller.getThree().loader);const l=s.progressMonitor.connect((x,M)=>r(x,M));s.parser.cancel(),s.currentSrc=e;let u=[];const g=s.currentSceneId,_=new db;_.visible=!1,_.name=t,s.controller.setScene(_),yield new Promise(x=>requestAnimationFrame(x)),s.eventEmitter.loading();try{u=yield s.parser.loadAnimation(e)}catch(x){throw s.eventEmitter.error(x),x}return s.controller.setAnimations(u),s.parser.reset(),s.eventEmitter.loaded(),s.animations[t]={scene:_,animations:u,id:t,monitor:l},s.currentSceneId=t,s.controller.setScene(_,!0),g&&g!==s.currentSceneId&&s.unloadPreviousAnimationAssets(g),{id:t,animations:u,loaded:l.complete}})()}firstUpdated(){this.initializeController(),this.initializeParser(),this.initializeProgressMonitor(),this.src&&this.currentSrc!=this.src&&this.loadAnimation(this.src)}initializeController(){this.controller=new HP({container:this.container.value,renderer:this.renderer,debug:this.debug,scale:this.scale,cameraZ:this.cameraZ,maxWidth:this.maxWidth,maxHeight:this.maxHeight})}initializeParser(){this.parser=new XP({loaders:{lottie:this.controller.getLottie()},wrapper:this.container.value,assetsPath:this.assetsPath,renderer:this.controller.getThree()},this.eventEmitter)}initializeProgressMonitor(){this.progressMonitor=new _C(this.controller.getThree().loader)}updated(e){e.has("maxHeight")&&(this.getThree().viewport.maxHeight=this.maxHeight),e.has("maxWidth")&&(this.getThree().viewport.maxWidth=this.maxWidth)}render(){const e=this.animatorStyles||{};return Pg.qy`<div ${g1(this.container)} style=${e}></div>`}getAnimationAsset(e){const t=this.controller?.animations;if(t?.length)return t?.find(r=>r.meta?.id===e)}unloadPreviousAnimationAssets(e){this.animations[e].animations.forEach(t=>{t.meta.timeline?.revert(),t.meta.timeline?.clear(),t.stop(),t.instance?.videoPreloader?.stop(),t.instance?.renderer.elements.forEac
83h(r=>{9===r.data.ty&&(r.pivotElement.visible=!1)})}),this.animations[e].scene.traverse(t=>{if(t.isMesh)if(t.geometry.dispose(),t.material.isMaterial)this.cleanMaterial(t.material);else for(const r of t.material)this.cleanMaterial(r)})}play(e){const t=this.getAnimationAsset(e);return t?(t.meta.timeline?.restart(),t.meta.timeline?.play()??Promise.resolve(!1)):Promise.resolve(!1)}playMarker(e,t){const r=this.getAnimationAsset(e);if(!r)return null;let s;if(r.instance?.markers?.length&&(s=r.instance.markers?.find(u=>u.payload.name===t)),!s||!r.meta.timeline)return null;if(s.duration){const _=r.meta.timeline.tweenFromTo(s.payload.time,s.payload.time+s.duration/r.instance.frameRate);return _.then(()=>{r.instance.pause()}),_}const l=r.meta.timeline.play(s.payload.name);return l.then(()=>{r.instance.pause()}),l}getTimeline(){return this.controller?.rootTimeline||null}getThree(){return this.controller?.getThree()}cleanMaterial(e){e.dispose(),e.map&&e.map.dispose(),e.lightMap&&e.lightMap.dispose(),e.bumpMap&&e.bumpMap.dispose(),e.normalMap&&e.normalMap.dispose(),e.envMap&&e.envMap.dispose()}};(0,ul.Cg)([(0,fl.MZ)()],ac.prototype,"src",void 0),(0,ul.Cg)([(0,fl.MZ)()],ac.prototype,"assetsPath",void 0),(0,ul.Cg)([(0,fl.MZ)()],ac.prototype,"renderer",void 0),(0,ul.Cg)([(0,fl.MZ)()],ac.prototype,"debug",void 0),(0,ul.Cg)([(0,fl.MZ)({type:Number})],ac.prototype,"scale",void 0),(0,ul.Cg)([(0,fl.MZ)({type:Number})],ac.prototype,"cameraZ",void 0),(0,ul.Cg)([(0,fl.MZ)({type:Number})],ac.prototype,"maxWidth",void 0),(0,ul.Cg)([(0,fl.MZ)({type:Number})],ac.prototype,"maxHeight",void 0),(0,ul.Cg)([(0,fl.MZ)()],ac.prototype,"animatorStyles",void 0),ac=(0,ul.Cg)([(0,fl.EM)("ig-animator")],ac);var K0=v(75797),vC=v(73185);let yC=(()=>{class f{constructor(t){this.storage=t,this._currentVolume$=new K0.t(null),this.setInitialVolume()}observeVolume(){return this._currentVolume$.asObservable()}setGlobalVolume(t){qf.Howler.volume(t),this._currentVolume$.next(t),this.storage.set("gu-audioVolume",t)}setInitialVolume(){this.initialVolume=parseFloat(this.storage.get("gu-audioVolume")),isNaN(this.initialVolume)&&(this.initialVolume=.6),this.setGlobalVolume(this.initialVolume)}toggleVolume(){this.setGlobalVolume(this._currentVolume$.value>0?0:.6)}static#t=this.\u0275fac=function(r){return new(r||f)(y.KVO(vC.O))};static#e=this.\u0275prov=y.jDH({token:f,factory:f.\u0275fac,providedIn:"root"})}return f})(),Wc=(()=>{class f{constructor(t){this.environment=t,this.config={isMonitoring:!1,isEditing:!1,isEditingCamera:!1,isDebug:!1,isGrabbing:!1,isFollowing:!0,showCursor:!1,lookAtMouse:!1,animation:"Select",stage:"",opacity:1,glowColor:"#6D1FC4",duration:10,controlPoint1:.262,controlPoint2:1,bloom:{threshold:0,strength:1.5,radius:.4},mouse:{x:0,y:0,z:0,screenX:0,screenY:0},modelRotationX:0,modelRotationY:0,modelRotationZ:0,packX:0,packY:0,packZ:0,packScaleX:0,packScaleY:0,packScaleZ:0,packRotationX:0,packRotationY:0,packRotationZ:0,packVariant:"",packType:"core_core",emissive:0,emissiveColor:16711935,cameraX:0,cameraY:0,cameraZ:0,cameraModifierX:0,cameraModifierY:0,cameraModifierZ:0,viewportOffsetX:0,camera:{fov:32,packPosition:new Me(454,270,200),revealPosition:new Me(454,270,182),singlePosition:new Me(454,270,190),zoomPosition:new Me(454,270,180)},activeCamera:void 0,asset:{god:"",quality:0,type:"",protoId:0,name:"",effect:""},x:0,y:0,z:0,roughness:.2,exposure:1,lightDirect:5,lightAmbient:6,lightGround:8489454,targetItem:void 0,targetPackIndex:0},this.config.isDebug=!this.environment.production}getConfig(){return this.config}static#t=this.\u0275fac=function(r){return new(r||f)(y.KVO(it.CF))};static#e=this.\u0275prov=y.jDH({token:f,factory:f.\u0275fac,providedIn:"root"})}return f})(),$h=(()=>{class f{constructor(t){this.raycaster=new nC,this.screenPlane=new Co(new Me(0,0,1),-160),this.config=t.getConfig()}initialize(t,r){this.three=t,this.animator=r,this.three.camera.fov=this.config.camera.fov,this.three.camera.updateProjectionMatrix(),this.alignCameraToViewport()}updateStageRect(t){this.config.viewportOffsetX=Math.min(0,-1*t.x/10)+12,this.alignCameraToViewport()}initializeCamera(t){this.alignCameraToViewport()}cameraTo({x:t,y:r,z:s},l={}){if(!this.three)return br.to({},{});this.snapshotCamera(),br.killTweensOf(this.config);const u={cameraModifierX:t,cameraModifierY:r,cameraModifierZ:s,duration:.3,...l,onUpdate:()=>{this.renderCameraChange(this.config.cameraModifierX,this.config.cameraModifierY,this.config.cameraModifierZ)}};return br.to(this.config,u)}renderCameraChange(t,r,s){if(!this.three)return;this.three.cameraModifier.position.x=t,this.three.cameraModifier.position.y=r,this.three.cameraModifier.position.z=s;const l=this.getCameraElement(this.animator);l&&(l._isFirstFrame=!0,l.renderFrame())}getCameraElement(t){const r=t.getAnimationAsset("pack");if(r)return r.instance.trackCameraElement("Camera").element;const s=t.getAnimationAsset("bg");return s?s.instance.trackCameraElement("Camera").element:void 0}
83snapshotCamera(){this.three.camera&&(this.config.cameraX=this.three.camera.position.x,this.config.cameraY=this.three.camera.position.y,this.config.cameraZ=this.three.camera.position.z)}alignCameraToViewport(){return this.config.cameraModifierX=this.config.viewportOffsetX,this.config.cameraModifierY=0,this.config.cameraModifierZ=0,this.cameraTo({x:this.config.cameraModifierX,y:this.config.cameraModifierY,z:this.config.cameraModifierZ},{duration:.1})}screenIntersectsObject(t,r,s){if(!s)return null;Array.isArray(s)||(s=[s]);const l=this.normaliseScreenCoordinates(t,r);this.raycaster.setFromCamera(new Rt(l.x,l.y),this.three.camera);const u=this.raycaster.intersectObjects(s);return u.length>0?u[0]:null}lookAt(t){this.three.camera.lookAt(t)}getPosition(){return this.three.camera.position}screenToWorld(t,r,s){const l=this.normaliseScreenCoordinates(t,r);this.raycaster.setFromCamera(new Rt(l.x,l.y),this.three.camera);const u=new Me;return this.raycaster.ray.intersectPlane(s=s||this.screenPlane,u),u}normaliseScreenCoordinates(t,r){const s=new Rt;return this.three.renderer.getSize(s),{x:t/(s.x||this.animator.clientWidth)*2-1,y:1-r/(s.y||this.animator.clientHeight)*2}}handleMouseMove(t,r){if(this.three&&this.config.isFollowing){const s={x:3,y:1,z:this.config.cameraModifierZ},l=this.normaliseScreenCoordinates(t,r);this.cameraTo({x:l.x*s.x+this.config.viewportOffsetX,y:l.y*s.y,z:s.z},{duration:.1})}}static#t=this.\u0275fac=function(r){return new(r||f)(y.KVO(Wc))};static#e=this.\u0275prov=y.jDH({token:f,factory:f.\u0275fac,providedIn:"root"})}return f})();var qb=function(f){return URL.createObjectURL(new Blob([f],{type:"text/javascript"}))};try{URL.revokeObjectURL(qb(""))}catch{qb=function(e){return"data:application/javascript;charset=UTF-8,"+encodeURI(e)}}var Lr=Uint8Array,ha=Uint16Array,hf=Uint32Array,Mm=new Lr([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),wm=new Lr([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),Z0=new Lr([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),bC=function(f,e){for(var t=new ha(31),r=0;r<31;++r)t[r]=e+=1<<f[r-1];var s=new hf(t[30]);for(r=1;r<30;++r)for(var l=t[r];l<t[r+1];++l)s[l]=l-t[r]<<5|r;return[t,s]},SC=bC(Mm,2),Yb=SC[0],Zy=SC[1];Yb[28]=258,Zy[258]=28;for(var wC=bC(wm,0)[0],j0=new ha(32768),qr=0;qr<32768;++qr){var uf=(43690&qr)>>>1|(21845&qr)<<1;j0[qr]=((65280&(uf=(61680&(uf=(52428&uf)>>>2|(13107&uf)<<2))>>>4|(3855&uf)<<4))>>>8|(255&uf)<<8)>>>1}var Xc=function(f,e,t){for(var r=f.length,s=0,l=new ha(e);s<r;++s)++l[f[s]-1];var g,u=new ha(e);for(s=0;s<e;++s)u[s]=u[s-1]+l[s-1]<<1;if(t){g=new ha(1<<e);var _=15-e;for(s=0;s<r;++s)if(f[s])for(var x=s<<4|f[s],M=e-f[s],C=u[f[s]-1]++<<M,P=C|(1<<M)-1;C<=P;++C)g[j0[C]>>>_]=x}else for(g=new ha(r),s=0;s<r;++s)f[s]&&(g[s]=j0[u[f[s]-1]++]>>>15-f[s]);return g},ff=new Lr(288);for(qr=0;qr<144;++qr)ff[qr]=8;for(qr=144;qr<256;++qr)ff[qr]=9;for(qr=256;qr<280;++qr)ff[qr]=7;for(qr=280;qr<288;++qr)ff[qr]=8;var J0=new Lr(32);for(qr=0;qr<32;++qr)J0[qr]=5;var TC=Xc(ff,9,1),PC=Xc(J0,5,1),jy=function(f){for(var e=f[0],t=1;t<f.length;++t)f[t]>e&&(e=f[t]);return e},wl=function(f,e,t){var r=e/8|0;return(f[r]|f[r+1]<<8)>>(7&e)&t},Jy=function(f,e){var t=e/8|0;return(f[t]|f[t+1]<<8|f[t+2]<<16)>>(7&e)},eA=function(f){return(f/8|0)+(7&f&&1)},ex=function(f,e,t){var r=f.length;if(!r||t&&!t.l&&r<5)return e||new Lr(0);var s=!e||t,l=!t||t.i;t||(t={}),e||(e=new Lr(3*r));var u=function(Vt){var ut=e.length;if(Vt>ut){var Nn=new Lr(Math.max(2*ut,Vt));Nn.set(e),e=Nn}},g=t.f||0,_=t.p||0,x=t.b||0,M=t.l,C=t.d,P=t.m,R=t.n,F=8*r;do{if(!M){t.f=g=wl(f,_,1);var O=wl(f,_+1,3);if(_+=3,!O){var L=f[(k=eA(_)+4)-4]|f[k-3]<<8,V=k+L;if(V>r){if(l)throw"unexpected EOF";break}s&&u(x+L),e.set(f.subarray(k,V),x),t.b=x+=L,t.p=_=8*V;continue}if(1==O)M=TC,C=PC,P=9,R=5;else{if(2!=O)throw"invalid block type";var z=wl(f,_,31)+257,W=wl(f,_+10,15)+4,ne=z+wl(f,_+5,31)+1;_+=14;for(var fe=new Lr(ne),ge=new Lr(19),de=0;de<W;++de)ge[Z0[de]]=wl(f,_+3*de,7);_+=3*W;var ie=jy(ge),ye=(1<<ie)-1,He=Xc(ge,ie,1);for(de=0;de<ne;){var k,qe=He[wl(f,_,ye)];if(_+=15&qe,(k=qe>>>4)<16)fe[de++]=k;else{var Ge=0,Ve=0;for(16==k?(Ve=3+wl(f,_,3),_+=2,Ge=fe[de-1]):17==k?(Ve=3+wl(f,_,7),_+=3):18==k&&(Ve=11+wl(f,_,127),_+=7);Ve--;)fe[de++]=Ge}}var We=fe.subarray(0,z),nt=fe.subarray(z);P=jy(We),R=jy(nt),M=Xc(We,P,1),C=Xc(nt,R,1)}if(_>F){if(l)throw"unexpected EOF";break}}s&&u(x+131072);for(var et=(1<<P)-1,tt=(1<<R)-1,gt=_;;gt=_){var bt=(Ge=M[Jy(f,_)&et])>>>4;if((_+=15&Ge)>F){if(l)throw"unexpected EOF";break}if(!Ge)throw"invalid length/literal";if(bt<256)e[x++]=bt;else{if(256==bt){gt=_,M=null;break}var jt=bt-254;bt>264&&(jt=wl(f,_,(1<<(Qt=Mm[de=bt-257]))-1)+Yb[de],_+=Qt);var ct=C[Jy(f,_)&tt],At=ct>>>4;if(!ct)throw"invalid distance";if(_+=15&ct,nt=wC[At],At>3){var Qt=wm[At];nt+=Jy(f,_)&(1<<Qt)-1,_+=Qt}if(_>F){if(l)throw"unexpected EOF";break}s&&u(x+131072);for(var Ut=x+jt;x<Ut;x+=4)e[x]=e[x-nt],e[x+1]=e[x+1-nt],e[x+2]=e[x+2-nt],e[x+3]=e[x+3-nt];x=Ut}}t.l=M,t.p=gt,t.b=x,M&&(g=1,t.m=P,t.d=C,t.n=R)}while(!g);return x==e.length?e:function(f,e,t){(null==e||e<0)&&(e=0),(null==t||t>f.length)&&(t=f.length);var r=new(f instanceof ha?ha:f instanceof hf?hf:Lr)(t-e);return r.set(f.subarray(e,t)),r}(e,0,x)},ix=new Lr(0);function Ud(f,e){return ex((function(f){if(8!=(15&f[0])||f[0]>>>4>7||(f[0]<<8|f[1])%31)throw"invalid zlib data";if(32&f[1])throw"invalid zlib data: preset dictionaries not supported"}(f),f.subarray(2,-4)),e)}var rS=typeof TextDecoder<"u"&&new TextDecoder;try{rS.decode(ix,{stream:!0})}catch{}class o2 extends aP{constructor(e){super(e),this.type=Ka}parse(e){const ie=Math.pow(2.7182818,2.2),qe={l:0,c:0,lc:0};function Ge(te,Ee,Fe,Ye,ft){for(;Fe<te;)Ee=Ee<<8|ei(Ye,ft),Fe+=8;qe.l=Ee>>
vendor: 14,618 bytes, line 83
83(Fe-=te)&(1<<te)-1,qe.c=Ee,qe.lc=Fe}const Ve=new Array(59);function et(te){return 63&te}function tt(te){return te>>6}const bt={c:0,lc:0};function jt(te,Ee,Fe,Ye){te=te<<8|ei(Fe,Ye),Ee+=8,bt.c=te,bt.lc=Ee}const Qt={c:0,lc:0};function ct(te,Ee,Fe,Ye,ft,st,St,Ot,Wt){if(te==Ee){Ye<8&&(jt(Fe,Ye,ft,st),Fe=bt.c,Ye=bt.lc);let zt=Fe>>(Ye-=8);if(zt=new Uint8Array([zt])[0],Ot.value+zt>Wt)return!1;const ln=St[Ot.value-1];for(;zt-- >0;)St[Ot.value++]=ln}else{if(!(Ot.value<Wt))return!1;St[Ot.value++]=te}Qt.c=Fe,Qt.lc=Ye}function At(te){return 65535&te}function Ut(te){const Ee=At(te);return Ee>32767?Ee-65536:Ee}const Vt={a:0,b:0};function ut(te,Ee){const Fe=Ut(te),ft=Ut(Ee),st=Fe+(1&ft)+(ft>>1),Ot=st-ft;Vt.a=st,Vt.b=Ot}function Nn(te,Ee){const Fe=At(te),Ye=At(Ee),ft=Fe-(Ye>>1)&65535;Vt.a=Ye+ft-32768&65535,Vt.b=ft}function ni(te,Ee,Fe,Ye,ft,st,St){const Ot=St<16384,Wt=Fe>ft?ft:Fe;let ln,Un,zt=1;for(;zt<=Wt;)zt<<=1;for(zt>>=1,ln=zt,zt>>=1;zt>=1;){Un=0;const _n=Un+st*(ft-ln),vn=st*zt,Ri=st*ln,Mn=Ye*zt,qn=Ye*ln;let Qi,Dr,$r,Pr;for(;Un<=_n;Un+=Ri){let dr=Un;const Ji=Un+Ye*(Fe-ln);for(;dr<=Ji;dr+=qn){const pr=dr+Mn,Qa=dr+vn,Hs=Qa+Mn;Ot?(ut(te[dr+Ee],te[Qa+Ee]),Qi=Vt.a,$r=Vt.b,ut(te[pr+Ee],te[Hs+Ee]),Dr=Vt.a,Pr=Vt.b,ut(Qi,Dr),te[dr+Ee]=Vt.a,te[pr+Ee]=Vt.b,ut($r,Pr),te[Qa+Ee]=Vt.a,te[Hs+Ee]=Vt.b):(Nn(te[dr+Ee],te[Qa+Ee]),Qi=Vt.a,$r=Vt.b,Nn(te[pr+Ee],te[Hs+Ee]),Dr=Vt.a,Pr=Vt.b,Nn(Qi,Dr),te[dr+Ee]=Vt.a,te[pr+Ee]=Vt.b,Nn($r,Pr),te[Qa+Ee]=Vt.a,te[Hs+Ee]=Vt.b)}if(Fe&zt){const pr=dr+vn;Ot?ut(te[dr+Ee],te[pr+Ee]):Nn(te[dr+Ee],te[pr+Ee]),Qi=Vt.a,te[pr+Ee]=Vt.b,te[dr+Ee]=Qi}}if(ft&zt){let dr=Un;const Ji=Un+Ye*(Fe-ln);for(;dr<=Ji;dr+=qn){const pr=dr+Mn;Ot?ut(te[dr+Ee],te[pr+Ee]):Nn(te[dr+Ee],te[pr+Ee]),Qi=Vt.a,te[pr+Ee]=Vt.b,te[dr+Ee]=Qi}}ln=zt,zt>>=1}return Un}function Vn(te,Ee,Fe,Ye,ft,st){const Ot=Fe.value,Wt=xn(Ee,Fe),zt=xn(Ee,Fe);Fe.value+=4;const ln=xn(Ee,Fe);if(Fe.value+=4,Wt<0||Wt>=65537||zt<0||zt>=65537)throw new Error("Something wrong with HUF_ENCSIZE");const Un=new Array(65537),_n=new Array(16384);if(function He(te){for(let Ee=0;Ee<16384;Ee++)te[Ee]={},te[Ee].len=0,te[Ee].lit=0,te[Ee].p=null}(_n),function nt(te,Ee,Fe,Ye,ft,st){const St=Ee;let Ot=0,Wt=0;for(;Ye<=ft;Ye++){if(St.value-Ee.value>Fe)return!1;Ge(6,Ot,Wt,te,St);const zt=qe.l;if(Ot=qe.c,Wt=qe.lc,st[Ye]=zt,63==zt){if(St.value-Ee.value>Fe)throw new Error("Something wrong with hufUnpackEncTable");Ge(8,Ot,Wt,te,St);let ln=qe.l+6;if(Ot=qe.c,Wt=qe.lc,Ye+ln>ft+1)throw new Error("Something wrong with hufUnpackEncTable");for(;ln--;)st[Ye++]=0;Ye--}else if(zt>=59){let ln=zt-59+2;if(Ye+ln>ft+1)throw new Error("Something wrong with hufUnpackEncTable");for(;ln--;)st[Ye++]=0;Ye--}}!function We(te){for(let Fe=0;Fe<=58;++Fe)Ve[Fe]=0;for(let Fe=0;Fe<65537;++Fe)Ve[te[Fe]]+=1;let Ee=0;for(let Fe=58;Fe>0;--Fe){const Ye=Ee+Ve[Fe]>>1;Ve[Fe]=Ee,Ee=Ye}for(let Fe=0;Fe<65537;++Fe){const Ye=te[Fe];Ye>0&&(te[Fe]=Ye|Ve[Ye]++<<6)}}(st)}(te,Fe,Ye-(Fe.value-Ot),Wt,zt,Un),ln>8*(Ye-(Fe.value-Ot)))throw new Error("Something wrong with hufUncompress");(function gt(te,Ee,Fe,Ye){for(;Ee<=Fe;Ee++){const ft=tt(te[Ee]),st=et(te[Ee]);if(ft>>st)throw new Error("Invalid table entry");if(st>14){const St=Ye[ft>>st-14];if(St.len)throw new Error("Invalid table entry");if(St.lit++,St.p){const Ot=St.p;St.p=new Array(St.lit);for(let Wt=0;Wt<St.lit-1;++Wt)St.p[Wt]=Ot[Wt]}else St.p=new Array(1);St.p[St.lit-1]=Ee}else if(st){let St=0;for(let Ot=1<<14-st;Ot>0;Ot--){const Wt=Ye[(ft<<14-st)+St];if(Wt.len||Wt.p)throw new Error("Invalid table entry");Wt.len=st,Wt.lit=Ee,St++}}}})(Un,Wt,zt,_n),function Gt(te,Ee,Fe,Ye,ft,st,St,Ot,Wt){let zt=0,ln=0;const Un=St,_n=Math.trunc(Ye.value+(ft+7)/8);for(;Ye.value<_n;)for(jt(zt,ln,Fe,Ye),zt=bt.c,ln=bt.lc;ln>=14;){const Mn=Ee[zt>>ln-14&16383];if(Mn.len)ln-=Mn.len,ct(Mn.lit,st,zt,ln,Fe,Ye,Ot,Wt,Un),zt=Qt.c,ln=Qt.lc;else{if(!Mn.p)throw new Error("hufDecode issues");let qn;for(qn=0;qn<Mn.lit;qn++){const Qi=et(te[Mn.p[qn]]);for(;ln<Qi&&Ye.value<_n;)jt(zt,ln,Fe,Ye),zt=bt.c,ln=bt.lc;if(ln>=Qi&&tt(te[Mn.p[qn]])==(zt>>ln-Qi&(1<<Qi)-1)){ln-=Qi,ct(Mn.p[qn],st,zt,ln,Fe,Ye,Ot,Wt,Un),zt=Qt.c,ln=Qt.lc;break}}if(qn==Mn.lit)throw new Error("hufDecode issues")}}const vn=8-ft&7;for(zt>>=vn,ln-=vn;ln>0;){const Ri=Ee[zt<<14-ln&16383];if(!Ri.len)throw new Error("hufDecode issues");ln-=Ri.len,ct(Ri.lit,st,zt,ln,Fe,Ye,Ot,Wt,Un),zt=Qt.c,ln=Qt.lc}}(Un,_n,te,Fe,ln,zt,st,ft,{value:0})}function Lt(te){for(let Ee=1;Ee<te.length;Ee++)te[Ee]=te[Ee-1]+te[Ee]-128}function Xt(te,Ee){let Fe=0,Ye=Math.floor((te.length+1)/2),ft=0;const st=te.length-1;for(;!(ft>st||(Ee[ft++]=te[Fe++],ft>st));)Ee[ft++]=te[Ye++]}function Qn(te){let Ee=te.byteLength;const Fe=new Array;let Ye=0;const ft=new DataView(te);for(;Ee>0;){const st=ft.getInt8(Ye++);if(st<0){const St=-st;Ee-=St+1;for(let Ot=0;Ot<St;Ot++)Fe.push(ft.getUint8(Ye++))}else{const St=st;Ee-=2;const Ot=ft.getUint8(Ye++);for(let Wt=0;Wt<St+1;Wt++)Fe.push(Ot)}}return Fe}function gi(te,Ee,Fe){let Ye,ft=1;for(;ft<64;)Ye=Ee[te.value],65280==Ye?ft=64:Ye>>8==255?ft+=255&Ye:(Fe[ft]=Ye,ft++),te.value++}function Ai(te,Ee){Ee[0]=Ze(te[0]),Ee[1]=Ze(te[1]),Ee[2]=Ze(te[5]),Ee[3]=Ze(te[6]),Ee[4]=Ze(te[14]),Ee[5]=Ze(te[15]),Ee[6]=Ze(te[27]),Ee[7]=Ze(te[28]),Ee[8]=Ze(te[2]),Ee[9]=Ze(te[4]),Ee[10]=Ze(te[7]),Ee[11]=Ze(te[13]),Ee[12]=Ze(te[16]),Ee[13]=Ze(te[26]),Ee[14]=Ze(te[29]),Ee[15]=Ze(te[42]),Ee[16]=Ze(te[3]),Ee[17]=Ze(te[8]),Ee[18]=Ze(te[12]),Ee[19]=Ze(te[17]),Ee[20]=Ze(te[25]),Ee[21]=Ze(te[30]),Ee[22]=Ze(te[41]),Ee[23]=Ze(te[43]),Ee[24]=Ze(te[9]),Ee[25]=Ze(te[11]),Ee[26]=Ze(te[18]),Ee[27]=Ze(te[24]),Ee[28]=Ze(te[31]),Ee[29]=Ze(te[40]),Ee[30]=Ze(te[44]),Ee[31]=Ze(te[53]),Ee[32]=Ze(te[10]),Ee[33]=Ze(te[19]),Ee[34]=Ze(te[23]),Ee[35]=Ze(te[32]),Ee[36]=Ze(te[39]),Ee[37]=Ze(te[45]),Ee[38]=Ze(te[52]),Ee[39]=Ze(te[54]),Ee[40]=Ze(te[20]),Ee[41]=Ze(te[22]),Ee[42]=Ze(te[33]),Ee[43]=Ze(te[38]),Ee[44]=Ze(te[46]),Ee[45]=Ze(te[51]),Ee[46]=Ze(te[55]),Ee[47]=Ze(te[60]),Ee[48]=Ze(te[21]),Ee[49]=Ze(te[34]),Ee[50]=Ze(te[37]),Ee[51]=Ze(te[47]),Ee[52]=Ze(te[50]),Ee[53]=Ze(te[56]),Ee[54]=Ze(te[59]),Ee[55]=Ze(te[61]),Ee[56]=Ze(te[35]),Ee[57]=Ze(te[36]),Ee[58]=Ze(te[48]),Ee[59]=Ze(te[49]),Ee[60]=Ze(te[57]),Ee[61]=Ze(te[58]),Ee[62]=Ze(te[62]),Ee[63]=Ze(te[63])}function ci(te){const Ee=.5*Math.cos(.7853975),Fe=.5*Math.cos(3.14159/16),Ye=.5*Math.cos(3.14159/8),ft=.5*Math.cos(3*3.14159/16),st=.5*Math.cos(.981746875),St=.5*Math.cos(3*3.14159/8),Ot=.5*Math.cos(1.374445625),Wt=new Array(4),zt=new Array(4),ln=new Array(4),Un=new Array(4);for(let _n=0;_n<8;++_n){const vn=8*_n;Wt[0]=Ye*te[vn+2],Wt[1]=St*te[vn+2],Wt[2]=Ye*te[vn+6],Wt[3]=St*te[vn+6],zt[0]=Fe*te[vn+1]+ft*te[vn+3]+st*te[vn+5]+Ot*te[vn+7],zt[1]=ft*te[vn+1]-Ot*te[vn+3]-Fe*te[vn+5]-st*te[vn+7],zt[2]=st*te[vn+1]-Fe*te[vn+3]+Ot*te[vn+5]+ft*te[vn+7],zt[3]=Ot*te[vn+1]-st*te[vn+3]+ft*te[vn+5]-Fe*te[vn+7],ln[0]=Ee*(te[vn+0]+te[vn+4]),ln[3]=Ee*(te[vn+0]-te[vn+4]),ln[1]=Wt[0]+Wt[3],ln[2]=Wt[1]-Wt[2],Un[0]=ln[0]+ln[1],Un[1]=ln[3]+ln[2],Un[2]=ln[3]-ln[2],Un[3]=ln[0]-ln[1],te[vn+0]=Un[0]+zt[0],te[vn+1]=Un[1]+zt[1],te[vn+2]=Un[2]+zt[2],te[vn+3]=Un[3]+zt[3],te[vn+4]=Un[3]-zt[3],te[vn+5]=Un[2]-zt[2],te[vn+6]=Un[1]-zt[1],te[vn+7]=Un[0]-zt[0]}for(let _n=0;_n<8;++_n)Wt[0]=Ye*te[16+_n],Wt[1]=St*te[16+_n],Wt[2]=Ye*te[48+_n],Wt[3]=St*te[48+_n],zt[0]=Fe*te[8+_n]+ft*te[24+_n]+st*te[40+_n]+Ot*te[56+_n],zt[1]=ft*te[8+_n]-Ot*te[24+_n]-Fe*te[40+_n]-st*te[56+_n],zt[2]=st*te[8+_n]-Fe*te[24+_n]+Ot*te[40+_n]+ft*te[56+_n],zt[3]=Ot*te[8+_n]-st*te[24+_n]+ft*te[40+_n]-Fe*te[56+_n],ln[0]=Ee*(te[_n]+te[32+_n]),ln[3]=Ee*(te[_n]-te[32+_n]),ln[1]=Wt[0]+Wt[3],ln[2]=Wt[1]-Wt[2],Un[0]=ln[0]+ln[1],Un[1]=ln[3]+ln[2],Un[2]=ln[3]-ln[2],Un[3]=ln[0]-ln[1],te[0+_n]=Un[0]+zt[0],te[8+_n]=Un[1]+zt[1],te[16+_n]=Un[2]+zt[2],te[24+_n]=Un[3]+zt[3],te[32+_n]=Un[3]-zt[3],te[40+_n]=Un[2]-zt[2],te[48+_n]=Un[1]-zt[1],te[56+_n]=Un[0]-zt[0]}function Hi(te){for(let Ee=0;Ee<64;++Ee){const Fe=te[0][Ee],Ye=te[1][Ee],ft=te[2][Ee];te[0][Ee]=Fe+1.5747*ft,te[1][Ee]=Fe-.1873*Ye-.4682*ft,te[2][Ee]=Fe+1.8556*Ye}}function cr(te,Ee,Fe){for(let Ye=0;Ye<64;++Ye)Ee[Fe+Ye]=Ku.toHalfFloat(ze(te[Ye]))}function ze(te){return te<=1?Math.sign(te)*Math.pow(Math.abs(te),2.2):Math.sign(te)*Math.pow(ie,Math.abs(te)-1)}function Ce(te){return new DataView(te.array.buffer,te.offset.value,te.size)}function xt(te){const Ee=te.viewer.buffer.slice(te.offset.value,te.offset.value+te.size),Fe=new Uint8Array(Qn(Ee)),Ye=new Uint8Array(Fe.length);return Lt(Fe),Xt(Fe,Ye),new DataView(Ye.buffer)}function rn(te){const Fe=Ud(te.array.slice(te.offset.value,te.offset.value+te.size)),Ye=new Uint8Array(Fe.length);return Lt(Fe),Xt(Fe,Ye),new DataView(Ye.buffer)}function fn(te){const Ee=te.viewer,Fe={value:te.offset.value},Ye=new Uint16Array(te.width*te.scanlineBlockSize*(te.channels*te.type)),ft=new Uint8Array(8192);let st=0;const St=new Array(te.channels);for(let Ri=0;Ri<te.channels;Ri++)St[Ri]={},St[Ri].start=st,St[Ri].end=St[Ri].start,St[Ri].nx=te.width,St[Ri].ny=te.lines,St[Ri].size=te.type,st+=St[Ri].nx*St[Ri].ny*St[Ri].size;const Ot=sn(Ee,Fe),Wt=sn(Ee,Fe);if(Wt>=8192)throw new Error("Something is wrong with PIZ_COMPRESSION BITMAP_SIZE");if(Ot<=Wt)for(let Ri=0;Ri<Wt-Ot+1;Ri++)ft[Ri+Ot]=Oi(Ee,Fe);const zt=new Uint16Array(65536),ln=function ye(te,Ee){let Fe=0;for(let ft=0;ft<65536;++ft)(0==ft||te[ft>>3]&1<<(7&ft))&&(Ee[Fe++]=ft);const Ye=Fe-1;for(;Fe<65536;)Ee[Fe++]=0;return Ye}(ft,zt),Un=xn(Ee,Fe);Vn(te.array,Ee,Fe,Un,Ye,st);for(let Ri=0;Ri<te.channels;++Ri){const Mn=St[Ri];for(let qn=0;qn<St[Ri].size;++qn)ni(Ye,Mn.start+qn,Mn.nx,Mn.size,Mn.ny,Mn.nx*Mn.size,ln)}!function $t(te,Ee,Fe){for(let Ye=0;Ye<Fe;++Ye)Ee[Ye]=te[Ee[Ye]]}(zt,Ye,st);let _n=0;const vn=new Uint8Array(Ye.buffer.byteLength);for(let Ri=0;Ri<te.lines;Ri++)for(let Mn=0;Mn<te.channels;Mn++){const qn=St[Mn],Qi=qn.nx*qn.size,Dr=new Uint8Array(Ye.buffer,2*qn.end,2*Qi);vn.set(Dr,_n),_n+=2*Qi,qn.end+=Qi}return new DataView(vn.buffer)}function Cn(te){const Fe=Ud(te.array.slice(te.offset.value,te.offset.value+te.size)),Ye=te.lines*te.channels*te.width,ft=1==te.type?new Uint16Array(Ye):new Uint32Array(Ye);let st=0,St=0;const Ot=new Array(4);for(let Wt=0;Wt<te.lines;Wt++)for(let zt=0;zt<te.channels;zt++){let ln=0;switch(te.type){case 1:Ot[0]=st,Ot[1]=Ot[0]+te.width,st=Ot[1]+te.width;for(let Un=0;Un<te.width;++Un)ln+=Fe[Ot[0]++]<<8|Fe[Ot[1]++],ft[St]=ln,St++;break;case 2:Ot[0]=st,Ot[1]=Ot[0]+te.width,Ot[2]=Ot[1]+te.width,st=Ot[2]+te.width;for(let Un=0;Un<te.width;++Un)ln+=Fe[Ot[0]++]<<24|Fe[Ot[1]++]<<16|Fe[Ot[2]++]<<8,ft[St]=ln,St++}}return new DataView(ft.buffer)}function _i(te){const Ee=te.viewer,Fe={value:te.offset.value},Ye=new Uint8Array(te.width*te.lines*(te.channels*te.type*2)),ft={version:Ni(Ee,Fe),unknownUncompressedSize:Ni(Ee,Fe),unknownCompressedSize:Ni(Ee,Fe),acCompressedSize:Ni(Ee,Fe),dcCompressedSize:Ni(Ee,Fe),rleCompressedSize:Ni(Ee,Fe),rleUncompressedSize:Ni(Ee,Fe),rleRawSize:Ni(Ee,Fe),totalAcUncompressedCount:Ni(Ee,Fe),totalDcUncompressedCount:Ni(Ee,Fe),acCompression:Ni(Ee,Fe)};if(ft.version<2)throw new Error("EXRLoader.parse: "+Re.compression+" version "+ft.version+" is unsupported");const st=new Array;let St=sn(Ee,Fe)-2;for(;St>0;){const Mn=On(Ee.buffer,Fe),qn=Oi(Ee,Fe),Qi=qn>>2&3,$r=new Int8Array([(qn>>4)-1])[0],Pr=Oi(Ee,Fe);st.push({name:Mn,index:$r,type:Pr,compression:Qi}),St-=Mn.length+3}const Ot=Re.channels,Wt=new Array(te.channels);for(let Mn=0;Mn<te.channels;++Mn){const qn=Wt[Mn]={},Qi=Ot[Mn];qn.name=Qi.name,qn.compression=0,qn.decoded=!1,qn.type=Qi.pixelType,qn.pLinear=Qi.pLinear,qn.width=te.width,qn.height=te.lines}const zt={idx:new Array(3)};for(let Mn=0;Mn<te.channels;++Mn){const qn=Wt[Mn];for(let Qi=0;Qi<st.length;++Qi){const Dr=st[Qi];qn.name==Dr.name&&(qn.compression=Dr.compression,Dr.index>=0&&(zt.idx[Dr.index]=Mn),qn.offset=Mn)}}let ln,Un,_n;if(ft.acCompressedSize>0)switch(ft.acCompression){case 0:ln=new Uint16Array(ft.totalAcUncompressedCount),Vn(te.array,Ee,Fe,ft.acCompressedSize,ln,ft.totalAcUncompressedCount);break;case 1:const qn=Ud(te.array.slice(Fe.value,Fe.value+ft.totalAcUncompressedCount));ln=new Uint16Array(qn.buffer),Fe.value+=ft.totalAcUncompressedCount}ft.dcCompressedSize>0&&(Un=new Uint16Array(rn({array:te.array,offset:Fe,size:ft.dcCompressedSize}).buffer),Fe.value+=ft.dcCompressedSize),ft.rleRawSize>0&&(_n=Qn(Ud(te.array.slice(Fe.value,Fe.value+ft.rleCompressedSize)).buffer),Fe.value+=ft.rleCompressedSize);let vn=0;const Ri=new Array(Wt.length);for(let Mn=0;Mn<Ri.length;++Mn)Ri[Mn]=new Array;for(let Mn=0;Mn<te.lines;++Mn)for(let qn=0;qn<Wt.length;++qn)Ri[qn].push(vn),vn+=Wt[qn].width*te.type*2;!function Sn(te,Ee,Fe,Ye,ft,st){let St=new DataView(st.buffer);const Ot=Fe[te.idx[0]].width,Wt=Fe[te.idx[0]].height,ln=Math.floor(Ot/8),Un=Math.ceil(Ot/8),_n=Math.ceil(Wt/8),vn=Ot-8*(Un-1),Ri=Wt-8*(_n-1),Mn={value:0},qn=new Array(3),Qi=new Array(3),Dr=new Array(3),$r=new Array(3),Pr=new Array(3);for(let Ji=0;Ji<3;++Ji)Pr[Ji]=Ee[te.idx[Ji]],qn[Ji]=Ji<1?0:qn[Ji-1]+Un*_n,Qi[Ji]=new Float32Array(64),Dr[Ji]=new Uint16Array(64),$r[Ji]=new Uint16Array(64*Un);for(let Ji=0;Ji<_n;++Ji){let pr=8;Ji==_n-1&&(pr=Ri);let Qa=8;for(let mr=0;mr<Un;++mr){mr==Un-1&&(Qa=vn);for(let zr=0;zr<3;++zr)Dr[zr].fill(0),Dr[zr][0]=ft[qn[zr]++],gi(Mn,Ye,Dr[zr]),Ai(Dr[zr],Qi[zr]),ci(Qi[zr]);Hi(Qi);for(let zr=0;zr<3;++zr)cr(Qi[zr],$r[zr],64*mr)}let Hs=0;for(let mr=0;mr<3;++mr){const zr=Fe[te.idx[mr]].type;for(let jh=8*Ji;jh<8*Ji+pr;++jh){Hs=Pr[mr][jh];for(let vA=0;vA<ln;++vA){const Jc=64*vA+8*(7&jh);St.setUint16(Hs+0*zr,$r[mr][Jc+0],!0),St.setUint16(Hs+2*zr,$r[mr][Jc+1],!0),St.setUint16(Hs+4*zr,$r[mr][Jc+2],!0),St.setUint16(Hs+6*zr,$r[mr][Jc+3],!0),St.setUint16(Hs+8*zr,$r[mr][Jc+4],!0),St.setUint16(Hs+10*zr,$r[mr][Jc+5],!0),St.setUint16(Hs+12*zr,$r[mr][Jc+6],!0),St.setUint16(Hs+14*zr,$r[mr][Jc+7],!0),Hs+=16*zr}}if(ln!=Un)for(let jh=8*Ji;jh<8*Ji+pr;++jh){const vA=Pr[mr][jh]+8*ln*2*zr,Jc=64*ln+8*(7&jh);for(let Sx=0;Sx<Qa;++Sx)St.setUint16(vA+2*Sx*zr,$r[mr][Jc+Sx],!0)}}}const dr=new Uint16Array(Ot);St=new DataView(st.buffer);for(let Ji=0;Ji<3;++Ji){Fe[te.idx[Ji]].decoded=!0;const pr=Fe[te.idx[Ji]].type;if(2==Fe[Ji].type)for(let Qa=0;Qa<Wt;++Qa){const Hs=Pr[Ji][Qa];for(let mr=0;mr<Ot;++mr)dr[mr]=St.getUint16(Hs+2*mr*pr,!0);for(let mr=0;mr<Ot;++mr)St.setFloat32(Hs+2*mr*pr,Ze(dr[mr]),!0)}}}(zt,Ri,Wt,ln,Un,Ye);for(let Mn=0;Mn<Wt.length;++Mn){const qn=Wt[Mn];if(!qn.decoded){if(2!==qn.compression)throw new Error("EXRLoader.parse: unsupported channel compression");{let Qi=0,Dr=0;for(let $r=0;$r<te.lines;++$r){let Pr=Ri[Mn][Qi];for(let dr=0;dr<qn.width;++dr){for(let Ji=0;Ji<2*qn.type;++Ji)Ye[Pr++]=_n[Dr+Ji*qn.width*qn.height];Dr++}Qi++}}}}return new DataView(Ye.buffer)}function On(te,Ee){const Fe=new Uint8Array(te);let Ye=0;for(;0!=Fe[Ee.value+Ye];)Ye+=1;
83const ft=(new TextDecoder).decode(Fe.slice(Ee.value,Ee.value+Ye));return Ee.value=Ee.value+Ye+1,ft}function si(te,Ee){const Fe=te.getInt32(Ee.value,!0);return Ee.value=Ee.value+4,Fe}function xn(te,Ee){const Fe=te.getUint32(Ee.value,!0);return Ee.value=Ee.value+4,Fe}function ei(te,Ee){const Fe=te[Ee.value];return Ee.value=Ee.value+1,Fe}function Oi(te,Ee){const Fe=te.getUint8(Ee.value);return Ee.value=Ee.value+1,Fe}const Ni=function(te,Ee){let Fe;return Fe="getBigInt64"in DataView.prototype?Number(te.getBigInt64(Ee.value,!0)):te.getUint32(Ee.value+4,!0)+Number(te.getUint32(Ee.value,!0)<<32),Ee.value+=8,Fe};function $i(te,Ee){const Fe=te.getFloat32(Ee.value,!0);return Ee.value+=4,Fe}function je(te,Ee){return Ku.toHalfFloat($i(te,Ee))}function Ze(te){const Ee=(31744&te)>>10,Fe=1023&te;return(te>>15?-1:1)*(Ee?31===Ee?Fe?NaN:1/0:Math.pow(2,Ee-15)*(1+Fe/1024):Fe/1024*6103515625e-14)}function sn(te,Ee){const Fe=te.getUint16(Ee.value,!0);return Ee.value+=2,Fe}function kn(te,Ee){return Ze(sn(te,Ee))}function Tl(te,Ee,Fe,Ye,ft){return"string"===Ye||"stringvector"===Ye||"iccProfile"===Ye?function Dt(te,Ee,Fe){const Ye=(new TextDecoder).decode(new Uint8Array(te).slice(Ee.value,Ee.value+Fe));return Ee.value=Ee.value+Fe,Ye}(Ee,Fe,ft):"chlist"===Ye?function ii(te,Ee,Fe,Ye){const ft=Fe.value,st=[];for(;Fe.value<ft+Ye-1;){const St=On(Ee,Fe),Ot=si(te,Fe),Wt=Oi(te,Fe);Fe.value+=3;const zt=si(te,Fe),ln=si(te,Fe);st.push({name:St,pixelType:Ot,pLinear:Wt,xSampling:zt,ySampling:ln})}return Fe.value+=1,st}(te,Ee,Fe,ft):"chromaticities"===Ye?function Or(te,Ee){return{redX:$i(te,Ee),redY:$i(te,Ee),greenX:$i(te,Ee),greenY:$i(te,Ee),blueX:$i(te,Ee),blueY:$i(te,Ee),whiteX:$i(te,Ee),whiteY:$i(te,Ee)}}(te,Fe):"compression"===Ye?function Yr(te,Ee){return["NO_COMPRESSION","RLE_COMPRESSION","ZIPS_COMPRESSION","ZIP_COMPRESSION","PIZ_COMPRESSION","PXR24_COMPRESSION","B44_COMPRESSION","B44A_COMPRESSION","DWAA_COMPRESSION","DWAB_COMPRESSION"][Oi(te,Ee)]}(te,Fe):"box2i"===Ye?function ua(te,Ee){return{xMin:xn(te,Ee),yMin:xn(te,Ee),xMax:xn(te,Ee),yMax:xn(te,Ee)}}(te,Fe):"lineOrder"===Ye?function jc(te,Ee){return["INCREASING_Y"][Oi(te,Ee)]}(te,Fe):"float"===Ye?$i(te,Fe):"v2f"===Ye?function fs(te,Ee){return[$i(te,Ee),$i(te,Ee)]}(te,Fe):"v3f"===Ye?function Lo(te,Ee){return[$i(te,Ee),$i(te,Ee),$i(te,Ee)]}(te,Fe):"int"===Ye?si(te,Fe):"rational"===Ye?function Zn(te,Ee){return[si(te,Ee),xn(te,Ee)]}(te,Fe):"timecode"===Ye?function hi(te,Ee){return[xn(te,Ee),xn(te,Ee)]}(te,Fe):"preview"===Ye?(Fe.value+=ft,"skipped"):void(Fe.value+=ft)}const km=new DataView(e),OS=new Uint8Array(e),Hd={value:0},Re=function Fm(te,Ee,Fe){const Ye={};if(20000630!=te.getUint32(0,!0))throw new Error("THREE.EXRLoader: provided file doesn't appear to be in OpenEXR format.");Ye.version=te.getUint8(4);const ft=te.getUint8(5);Ye.spec={singleTile:!!(2&ft),longName:!!(4&ft),deepFormat:!!(8&ft),multiPart:!!(16&ft)},Fe.value=8;let st=!0;for(;st;){const St=On(Ee,Fe);if(0==St)st=!1;else{const Ot=On(Ee,Fe),zt=Tl(te,Ee,Fe,Ot,xn(te,Fe));void 0===zt?console.warn(`EXRLoader.parse: skipped unknown header attribute type '${Ot}'.`):Ye[St]=zt}}if(-5&ft)throw console.error("EXRHeader:",Ye),new Error("THREE.EXRLoader: provided file is currently unsupported.");return Ye}(km,e,Hd),Je=function bx(te,Ee,Fe,Ye,ft){const st={size:0,viewer:Ee,array:Fe,offset:Ye,width:te.dataWindow.xMax-te.dataWindow.xMin+1,height:te.dataWindow.yMax-te.dataWindow.yMin+1,channels:te.channels.length,bytesPerLine:null,lines:null,inputSize:null,type:te.channels[0].pixelType,uncompress:null,getter:null,format:null,encoding:null};switch(te.compression){case"NO_COMPRESSION":st.lines=1,st.uncompress=Ce;break;case"RLE_COMPRESSION":st.lines=1,st.uncompress=xt;break;case"ZIPS_COMPRESSION":st.lines=1,st.uncompress=rn;break;case"ZIP_COMPRESSION":st.lines=16,st.uncompress=rn;break;case"PIZ_COMPRESSION":st.lines=32,st.uncompress=fn;break;case"PXR24_COMPRESSION":st.lines=16,st.uncompress=Cn;break;case"DWAA_COMPRESSION":st.lines=32,st.uncompress=_i;break;case"DWAB_COMPRESSION":st.lines=256,st.uncompress=_i;break;default:throw new Error("EXRLoader.parse: "+te.compression+" is unsupported")}if(st.scanlineBlockSize=st.lines,1==st.type)switch(ft){case Os:st.getter=kn,st.inputSize=2;break;case Ka:st.getter=sn,st.inputSize=2}else{if(2!=st.type)throw new Error("EXRLoader.parse: unsupported pixelType "+st.type+" for "+te.compression+".");switch(ft){case Os:st.getter=$i,st.inputSize=4;break;case Ka:st.getter=je,st.inputSize=4}}st.blockCount=(te.dataWindow.yMax+1)/st.scanlineBlockSize;for(let Ot=0;Ot<st.blockCount;Ot++)Ni(Ee,Ye);st.outputChannels=3==st.channels?4:st.channels;const St=st.width*st.height*st.outputChannels;switch(ft){case Os:st.byteArray=new Float32Array(St),st.channels<st.outputChannels&&st.byteArray.fill(1,0,St);break;case Ka:st.byteArray=new Uint16Array(St),st.channels<st.outputChannels&&st.byteArray.fill(15360,0,St);break;default:console.error("THREE.EXRLoader: unsupported type: ",ft)}
vendor: 10,408 bytes, line 83
83return st.bytesPerLine=st.width*st.inputSize*st.channels,4==st.outputChannels?(st.format=Ns,st.encoding=zo):(st.format=Bu,st.encoding=zo),st}(Re,km,OS,Hd,this.type),Tt={value:0},ht={R:0,G:1,B:2,A:3,Y:0};for(let te=0;te<Je.height/Je.scanlineBlockSize;te++){const Ee=xn(km,Hd);Je.size=xn(km,Hd),Je.lines=Ee+Je.scanlineBlockSize>Je.height?Je.height-Ee:Je.scanlineBlockSize;const Ye=Je.size<Je.lines*Je.bytesPerLine?Je.uncompress(Je):Ce(Je);Hd.value+=Je.size;for(let ft=0;ft<Je.scanlineBlockSize;ft++){const st=ft+te*Je.scanlineBlockSize;if(st>=Je.height)break;for(let St=0;St<Je.channels;St++){const Ot=ht[Re.channels[St].name];for(let Wt=0;Wt<Je.width;Wt++)Tt.value=(ft*(Je.channels*Je.width)+St*Je.width+Wt)*Je.inputSize,Je.byteArray[Je.width*Je.outputChannels*(Je.height-1-st)+Wt*Je.outputChannels+Ot]=Je.getter(Ye,Tt)}}}return{header:Re,width:Je.width,height:Je.height,data:Je.byteArray,format:Je.format,encoding:Je.encoding,type:this.type}}setDataType(e){return this.type=e,this}load(e,t,r,s){return super.load(e,function l(u,g){u.encoding=g.encoding,u.minFilter=Tr,u.magFilter=Tr,u.generateMipmaps=!1,u.flipY=!1,t&&t(u,g)},r,s)}}const l2={shaderID:"luminosityHighPass",uniforms:{tDiffuse:{value:null},luminosityThreshold:{value:1},smoothWidth:{value:1},defaultColor:{value:new An(0)},defaultOpacity:{value:0}},vertexShader:"\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\tvUv = uv;\n\n\t\t\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n\t\t}",fragmentShader:"\n\n\t\tuniform sampler2D tDiffuse;\n\t\tuniform vec3 defaultColor;\n\t\tuniform float defaultOpacity;\n\t\tuniform float luminosityThreshold;\n\t\tuniform float smoothWidth;\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\tvec4 texel = texture2D( tDiffuse, vUv );\n\n\t\t\tvec3 luma = vec3( 0.299, 0.587, 0.114 );\n\n\t\t\tfloat v = dot( texel.xyz, luma );\n\n\t\t\tvec4 outputColor = vec4( defaultColor.rgb, defaultOpacity );\n\n\t\t\tfloat alpha = smoothstep( luminosityThreshold, luminosityThreshold + smoothWidth, v );\n\n\t\t\tgl_FragColor = mix( outputColor, texel, alpha );\n\n\t\t}"};class Pm extends $0{constructor(e,t,r,s){super(),this.strength=void 0!==t?t:1,this.radius=r,this.threshold=s,this.resolution=void 0!==e?new Rt(e.x,e.y):new Rt(256,256),this.clearColor=new An(0,0,0),this.renderTargetsHorizontal=[],this.renderTargetsVertical=[],this.nMips=5;let l=Math.round(this.resolution.x/2),u=Math.round(this.resolution.y/2);this.renderTargetBright=new Ks(l,u),this.renderTargetBright.texture.name="UnrealBloomPass.bright",this.renderTargetBright.texture.generateMipmaps=!1;for(let C=0;C<this.nMips;C++){const P=new Ks(l,u);P.texture.name="UnrealBloomPass.h"+C,P.texture.generateMipmaps=!1,this.renderTargetsHorizontal.push(P);const R=new Ks(l,u);R.texture.name="UnrealBloomPass.v"+C,R.texture.generateMipmaps=!1,this.renderTargetsVertical.push(R),l=Math.round(l/2),u=Math.round(u/2)}const g=l2;this.highPassUniforms=Nc.clone(g.uniforms),this.highPassUniforms.luminosityThreshold.value=s,this.highPassUniforms.smoothWidth.value=.01,this.materialHighPassFilter=new Ts({uniforms:this.highPassUniforms,vertexShader:g.vertexShader,fragmentShader:g.fragmentShader,defines:{}}),this.separableBlurMaterials=[];const _=[3,5,7,9,11];l=Math.round(this.resolution.x/2),u=Math.round(this.resolution.y/2);for(let C=0;C<this.nMips;C++)this.separableBlurMaterials.push(this.getSeperableBlurMaterial(_[C])),this.separableBlurMaterials[C].uniforms.texSize.value=new Rt(l,u),l=Math.round(l/2),u=Math.round(u/2);this.compositeMaterial=this.getCompositeMaterial(this.nMips),this.compositeMaterial.uniforms.blurTexture1.value=this.renderTargetsVertical[0].texture,this.compositeMaterial.uniforms.blurTexture2.value=this.renderTargetsVertical[1].texture,this.compositeMaterial.uniforms.blurTexture3.value=this.renderTargetsVertical[2].texture,this.compositeMaterial.uniforms.blurTexture4.value=this.renderTargetsVertical[3].texture,this.compositeMaterial.uniforms.blurTexture5.value=this.renderTargetsVertical[4].texture,this.compositeMaterial.uniforms.bloomStrength.value=t,this.compositeMaterial.uniforms.bloomRadius.value=.1,this.compositeMaterial.needsUpdate=!0,this.compositeMaterial.uniforms.bloomFactors.value=[1,.8,.6,.4,.2],this.bloomTintColors=[new Me(1,1,1),new Me(1,1,1),new Me(1,1,1),new Me(1,1,1),new Me(1,1,1)],this.compositeMaterial.uniforms.bloomTintColors.value=this.bloomTintColors;const M=mC;this.copyUniforms=Nc.clone(M.uniforms),this.copyUniforms.opacity.value=1,this.materialCopy=new Ts({uniforms:this.copyUniforms,vertexShader:M.vertexShader,fragmentShader:M.fragmentShader,blending:2,depthTest:!1,depthWrite:!1,transparent:!0}),this.enabled=!0,this.needsSwap=!1,this._oldClearColor=new An,this.oldClearAlpha=1,this.basic=new vs,this.fsQuad=new dC(null)}dispose(){for(let e=0;e<this.renderTargetsHorizontal.length;e++)this.renderTargetsHorizontal[e].dispose();for(let e=0;e<this.renderTargetsVertical.length;e++)this.renderTargetsVertical[e].dispose();this.renderTargetBright.dispose();for(let e=0;e<this.separableBlurMaterials.length;e++)this.separableBlurMaterials[e].dispose();this.compositeMaterial.dispose(),this.materialCopy.dispose(),this.basic.dispose(),this.fsQuad.dispose()}setSize(e,t){let r=Math.round(e/2),s=Math.round(t/2);this.renderTargetBright.setSize(r,s);for(let l=0;l<this.nMips;l++)this.renderTargetsHorizontal[l].setSize(r,s),this.renderTargetsVertical[l].setSize(r,s),this.separableBlurMaterials[l].uniforms.texSize.value=new Rt(r,s),r=Math.round(r/2),s=Math.round(s/2)}render(e,t,r,s,l){e.getClearColor(this._oldClearColor),this.oldClearAlpha=e.getClearAlpha();const u=e.autoClear;e.autoClear=!1,e.setClearColor(this.clearColor,0),l&&e.state.buffers.stencil.setTest(!1),this.renderToScreen&&(this.fsQuad.material=this.basic,this.basic.map=r.texture,e.setRenderTarget(null),e.clear(),this.fsQuad.render(e)),this.highPassUniforms.tDiffuse.value=r.texture,this.highPassUniforms.luminosityThreshold.value=this.threshold,this.fsQuad.material=this.materialHighPassFilter,e.setRenderTarget(this.renderTargetBright),e.clear(),this.fsQuad.render(e);let g=this.renderTargetBright;for(let _=0;_<this.nMips;_++)this.fsQuad.material=this.separableBlurMaterials[_],this.separableBlurMaterials[_].uniforms.colorTexture.value=g.texture,this.separableBlurMaterials[_].uniforms.direction.value=Pm.BlurDirectionX,e.setRenderTarget(this.renderTargetsHorizontal[_]),e.clear(),this.fsQuad.render(e),this.separableBlurMaterials[_].uniforms.colorTexture.value=this.renderTargetsHorizontal[_].texture,this.separableBlurMaterials[_].uniforms.direction.value=Pm.BlurDirectionY,e.setRenderTarget(this.renderTargetsVertical[_]),e.clear(),this.fsQuad.render(e),g=this.renderTargetsVertical[_];this.fsQuad.material=this.compositeMaterial,this.compositeMaterial.uniforms.bloomStrength.value=this.strength,this.compositeMaterial.uniforms.bloomRadius.value=this.radius,this.compositeMaterial.uniforms.bloomTintColors.value=this.bloomTintColors,e.setRenderTarget(this.renderTargetsHorizontal[0]),e.clear(),this.fsQuad.render(e),this.fsQuad.material=this.materialCopy,this.copyUniforms.tDiffuse.value=this.renderTargetsHorizontal[0].texture,l&&e.state.buffers.stencil.setTest(!0),this.renderToScreen?(e.setRenderTarget(null),this.fsQuad.render(e)):(e.setRenderTarget(r),this.fsQuad.render(e)),e.setClearColor(this._oldClearColor,this.oldClearAlpha),e.autoClear=u}getSeperableBlurMaterial(e){return new Ts({defines:{KERNEL_RADIUS:e,SIGMA:e},uniforms:{colorTexture:{value:null},texSize:{value:new Rt(.5,.5)},direction:{value:new Rt(.5,.5)}},vertexShader:"varying vec2 vUv;\n\t\t\t\tvoid main() {\n\t\t\t\t\tvUv = uv;\n\t\t\t\t\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\t\t\t\t}",fragmentShader:"#include <common>\n\t\t\t\tvarying vec2 vUv;\n\t\t\t\tuniform sampler2D colorTexture;\n\t\t\t\tuniform vec2 texSize;\n\t\t\t\tuniform vec2 direction;\n\n\t\t\t\tfloat gaussianPdf(in float x, in float sigma) {\n\t\t\t\t\treturn 0.39894 * exp( -0.5 * x * x/( sigma * sigma))/sigma;\n\t\t\t\t}\n\t\t\t\tvoid main() {\n\t\t\t\t\tvec2 invSize = 1.0 / texSize;\n\t\t\t\t\tfloat fSigma = float(SIGMA);\n\t\t\t\t\tfloat weightSum = gaussianPdf(0.0, fSigma);\n\t\t\t\t\tvec3 diffuseSum = texture2D( colorTexture, vUv).rgb * weightSum;\n\t\t\t\t\tfor( int i = 1; i < KERNEL_RADIUS; i ++ ) {\n\t\t\t\t\t\tfloat x = float(i);\n\t\t\t\t\t\tfloat w = gaussianPdf(x, fSigma);\n\t\t\t\t\t\tvec2 uvOffset = direction * invSize * x;\n\t\t\t\t\t\tvec3 sample1 = texture2D( colorTexture, vUv + uvOffset).rgb;\n\t\t\t\t\t\tvec3 sample2 = texture2D( colorTexture, vUv - uvOffset).rgb;\n\t\t\t\t\t\tdiffuseSum += (sample1 + sample2) * w;\n\t\t\t\t\t\tweightSum += 2.0 * w;\n\t\t\t\t\t}\n\t\t\t\t\tgl_FragColor = vec4(diffuseSum/weightSum, 1.0);\n\t\t\t\t}"})}getCompositeMaterial(e){return new Ts({defines:{NUM_MIPS:e},uniforms:{blurTexture1:{value:null},blurTexture2:{value:null},blurTexture3:{value:null},blurTexture4:{value:null},blurTexture5:{value:null},bloomStrength:{value:1},bloomFactors:{value:null},bloomTintColors:{value:null},bloomRadius:{value:0}},vertexShader:"varying vec2 vUv;\n\t\t\t\tvoid main() {\n\t\t\t\t\tvUv = uv;\n\t\t\t\t\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\t\t\t\t}",fragmentShader:"varying vec2 vUv;\n\t\t\t\tuniform sampler2D blurTexture1;\n\t\t\t\tuniform sampler2D blurTexture2;\n\t\t\t\tuniform sampler2D blurTexture3;\n\t\t\t\tuniform sampler2D blurTexture4;\n\t\t\t\tuniform sampler2D blurTexture5;\n\t\t\t\tuniform float bloomStrength;\n\t\t\t\tuniform float bloomRadius;\n\t\t\t\tuniform float bloomFactors[NUM_MIPS];\n\t\t\t\tuniform vec3 bloomTintColors[NUM_MIPS];\n\n\t\t\t\tfloat lerpBloomFactor(const in float factor) {\n\t\t\t\t\tfloat mirrorFactor = 1.2 - factor;\n\t\t\t\t\treturn mix(factor, mirrorFactor, bloomRadius);\n\t\t\t\t}\n\n\t\t\t\tvoid main() {\n\t\t\t\t\tgl_FragColor = bloomStrength * ( lerpBloomFactor(bloomFactors[0]) * vec4(bloomTintColors[0], 1.0) * texture2D(blurTexture1, vUv) +\n\t\t\t\t\t\tlerpBloomFactor(bloomFactors[1]) * vec4(bloomTintColors[1], 1.0) * texture2D(blurTexture2, vUv) +\n\t\t\t\t\t\tlerpBloomFactor(bloomFactors[2]) * vec4(bloomTintColors[2], 1.0) * texture2D(blurTexture3, vUv) +\n\t\t\t\t\t\tlerpBloomFactor(bloomFactors[3]) * vec4(bloomTintColors[3], 1.0) * texture2D(blurTexture4, vUv) +\n\t\t\t\t\t\tlerpBloomFactor(bloomFactors[4]) * vec4(bloomTintColors[4], 1.0
83) * texture2D(blurTexture5, vUv) );\n\t\t\t\t}"})}}Pm.BlurDirectionX=new Rt(1,0),Pm.BlurDirectionY=new Rt(0,1);let Yc=(()=>{class f{constructor(t){this.resolveAnimator=r=>{},this.resolveThree=r=>{},this.three=new Promise(r=>{this.resolveThree=r}),this.animator=new Promise(r=>{this.resolveAnimator=r}),this.config=t.getConfig()}getAnimator(){return this.animator}getThree(){return this.three}setAnimator(t){this.resolveAnimator(t)}setThree(t){this.resolveThree(t),this.initLighting()}reset(){this.animator=new Promise(t=>{this.resolveAnimator=t}),this.three=new Promise(t=>{this.resolveThree=t})}getBloompass(){return this.bloomPass}getAnimation(t){return this.animator.then(r=>r.getAnimationAsset(t))}enableBloomPass(){var t=this;return(0,xi.A)(function*(){const r=yield t.getThree(),s=new Pm(new Rt(window.innerWidth,window.innerHeight),1.5,.4,.85);s.threshold=t.config.bloom.threshold,s.strength=t.config.bloom.strength,s.radius=t.config.bloom.radius,r.composer||(r.composer=new AC(r.renderer));const l=new pC(r.scene,r.camera);r.composer.addPass(l),r.composer.addPass(s),t.bloomPass=s})()}initLighting(){var t=this;return(0,xi.A)(function*(){const r=yield t.getThree();r.renderer.toneMapping=w1,r.renderer.toneMappingExposure=t.config.exposure,r.renderer.useLegacyLights=!1;const s=new Xw(4210752,t.config.lightAmbient);r.ambientLight=s,r.scene.add(s);const l=new Ob(16777215,t.config.lightDirect);l.position.set(1,1,1).normalize(),r.directionalLight=l,r.scene.add(l),Lb.onLoad=function(){u&&u.dispose()};const u=new C0(r.renderer);u.compileEquirectangularShader();const g=(new o2).load("/assets/pack-opening/textures/city.exr",_=>{_.mapping=303;const x=u.fromEquirectangular(_);r.envMap=x.texture,r.scene.traverse(M=>{if(M instanceof pn){const C=M.material;C&&"envMap"in C&&(C.envMap=r.envMap,C.needsUpdate=!0)}})});r.cubeMap=g,r.scene.environment=g})()}static#t=this.\u0275fac=function(r){return new(r||f)(y.KVO(Wc))};static#e=this.\u0275prov=y.jDH({token:f,factory:f.\u0275fac,providedIn:"root"})}return f})();var Po=v(56042),KC=v(91817);let lc=(()=>{class f{constructor(t,r){this.animationService=t,this.cameraService=r,this.stage$=new K0.t("idle"),this.stageRect$=new Po.m(1),this.cardPlane=new Co(new Me(0,0,1),-170)}setSceneRect(t){this.sceneRect=t,setTimeout(()=>this.cameraService.alignCameraToViewport(),50)}getSceneRect(){return this.sceneRect}
83setStageRect(t){this.stageRect$.next(t),this.cameraService.updateStageRect(t)}observeStageRect(){return this.stageRect$.asObservable()}observeStage(){return this.stage$.pipe((0,KC.F)())}setStage(t){this.stage$.next(t)}foregroundFadeOut(){this.animationService.getAnimation("foreground").then(t=>{try{const r=t?.instance?.renderer?.elements[1];if(!r)return;const s=r.baseElement.children[0].children[0],l={opacity:s.opacity};t.meta.timeline.pause(),br.to(l,{opacity:0,duration:.3,ease:"power1.out",onUpdate:()=>{s.opacity=l.opacity}}).play()}catch(r){console.error(r)}})}foregroundFadeIn(){this.animationService.getAnimation("foreground").then(t=>{try{const r=t?.instance?.renderer?.elements[1];if(!r)return;const s=r.baseElement.children[0].children[0],l={opacity:s.opacity};t.meta.timeline.play(),br.to(l,{opacity:1,duration:.3,ease:"power1.out",onUpdate:()=>{s.opacity=l.opacity}})}catch(r){console.error(r)}})}add(t,r=!1){this.animationService.getThree().then(s=>{s.scene.add(t),r&&s.interaction.add(t)})}remove(t,r=!1){this.animationService.getThree().then(s=>{r&&s.interaction.remove(t),s.scene.remove(t)})}getLeftPosition(){return this.cameraService.screenToWorld(20,this.sceneRect.height/2,this.cardPlane)}getRightPosition(){return this.cameraService.screenToWorld(this.sceneRect.width-20,this.sceneRect.height/2,this.cardPlane)}getGridColumnWidth(t){return(this.getRightPosition().x-this.getLeftPosition().x)/t}static#t=this.\u0275fac=function(r){return new(r||f)(y.KVO(Yc),y.KVO($h))};static#e=this.\u0275prov=y.jDH({token:f,factory:f.\u0275fac,providedIn:"root"})}return f})(),rA=(()=>{class f{constructor(){this.destroyed$=new U.B,this.selectedPack$=new Po.m(1),this.mouseCoords$=new Po.m(1)}ngOnDestroy(){this.destroyed$.next(),this.destroyed$.complete()}observeSelectedPack(){return this.selectedPack$.asObservable()}observeMouseCoords(){return this.mouseCoords$.asObservable()}attachPack(t){this.selectedPack$.next(t)}handleMouseMove(t,r){this.mouseCoords$.next({x:t,y:r})}static#t=this.\u0275fac=function(r){return new(r||f)};static#e=this.\u0275prov=y.jDH({token:f,factory:f.\u0275fac,providedIn:"root"})}return f})();var Ro,JC,jC=v(5236),eT=function(){return Ro||typeof window<"u"&&(Ro=window.gsap)&&Ro.registerPlugin&&Ro},tT=function(){(Ro=eT())?(Ro.registerEase("_CE",fx.create),JC=1):console.warn("Please gsap.registerPlugin(CustomEase)")},ux=function(e){return~~(1e3*e+(e<0?-.5:.5))/1e3},f2=/[-+=\.]*\d+[\.e\-\+]*\d*[e\-\+]*\d*/gi,d2=/[cLlsSaAhHvVtTqQ]/g,g2=function f(e,t,r,s,l,u,g,_,x,M,C){var qe,P=(e+r)/2,R=(t+s)/2,F=(r+l)/2,O=(s+u)/2,k=(l+g)/2,L=(u+_)/2,V=(P+F)/2,z=(R+O)/2,W=(F+k)/2,ne=(O+L)/2,fe=(V+W)/2,ge=(z+ne)/2,de=g-e,ie=_-t,ye=Math.abs((r-g)*ie-(s-_)*de),He=Math.abs((l-g)*ie-(u-_)*de);return M||(M=[{x:e,y:t},{x:g,y:_}],C=1),M.splice(C||M.length-1,0,{x:fe,y:ge}),(ye+He)*(ye+He)>x*(de*de+ie*ie)&&(qe=M.length,f(e,t,P,R,V,z,fe,ge,x,M,C),f(fe,ge,W,ne,k,L,g,_,x,M,C+1+(M.length-qe))),M},fx=function(){function f(t,r,s){JC||tT(),this.id=t,this.setData(r,s)}var e=f.prototype;return e.setData=function(r,s){s=s||{};var C,P,R,F,O,k,L,V,z,l=(r=r||"0,0,1,1").match(f2),u=1,g=[],_=[],x=s.precision||1,M=x<=1;if(this.data=r,(d2.test(r)||~r.indexOf("M")&&r.indexOf("C")<0)&&(l=Vf(r)[0]),4===(C=l.length))l.unshift(0,0),l.push(1,1),C=8;else if((C-2)%6)throw"Invalid CustomEase";for((0!=+l[0]||1!=+l[C-2])&&function(e,t,r){!r&&0!==r&&(r=Math.max(+e[e.length-1],+e[1]));var x,s=-1*+e[0],l=-r,u=e.length,g=1/(+e[u-2]+s),_=-t||(Math.abs(+e[u-1]-+e[1])<.01*(+e[u-2]-+e[0])?function(e){var s,t=e.length,r=1e20;for(s=1;s<t;s+=6)+e[s]<r&&(r=+e[s]);return r}(e)+l:+e[u-1]+l);for(_=_?1/_:-g,x=0;x<u;x+=2)e[x]=(+e[x]+s)*g,e[x+1]=(+e[x+1]+l)*_}(l,s.height,s.originY),this.segment=l,F=2;F<C;F+=6)g.push(P={x:+l[F-2],y:+l[F-1]},R={x:+l[F+4],y:+l[F+5]}),g2(P.x,P.y,+l[F],+l[F+1],+l[F+2],+l[F+3],R.x,R.y,1/(2e5*x),g,g.length-1);for(C=g.length,F=0;F<C;F++)((L=g[F]).x>(V=g[F-1]||L).x||V.y!==L.y&&V.x===L.x||L===V)&&L.x<=1?(V.cx=L.x-V.x,V.cy=L.y-V.y,V.n=L,V.nx=L.x,M&&F>1&&Math.abs(V.cy/V.cx-g[F-2].cy/g[F-2].cx)>2&&(M=0),V.cx<u&&(V.cx?u=V.cx:(V.cx=.001,F===C-1&&(V.x-=.001,u=Math.min(u,.001),M=0)))):(g.splice(F--,1),C--);if(O=1/(C=1/u+1|0),k=0,L=g[0],M){for(F=0;F<C;F++)L.nx<(z=F*O)&&(L=g[++k]),_[F]={x:z,cx:O,y:P=L.y+(z-L.x)/L.cx*L.cy,cy:0,nx:9},F&&(_[F-1].cy=P-_[F-1].y);_[C-1].cy=g[g.length-1].y-P}else{for(F=0;F<C;F++)L.nx<F*O&&(L=g[++k]),_[F]=L;k<g.length-1&&(_[F-1]=g[g.length-2])}return this.ease=function(W){var ne=_[W*C|0]||_[C-1];return ne.nx<W&&(ne=ne.n),ne.y+(W-ne.x)/ne.cx*ne.cy},this.ease.custom=this,this.id&&Ro&&Ro.registerEase(this.id,this.ease),this},e.getSVGData=function(r){return f.getSVGData(this,r)},f.create=function(r,s,l){return new f(r,s,l).ease},f.register=function(r){Ro=r,tT()},f.get=function(r){return Ro.parseEase(r)},f.getSVGData=function(r,s){var M,C,P,R,F,O,k,L,V,z,l=(s=s||{}).width||100,u=s.height||100,g=s.x||0,_=(s.y||0)+u,x=Ro.utils.toArray(s.path)[0];if(s.invert&&(u=-u,_=0),"string"==typeof r&&(r=Ro.parseEase(r)),r.custom&&(r=r.custom),r instanceof f)M=xg(Eu([r.segment],l,0,0,-u,g,_));
83else{for(M=[g,_],R=1/(k=Math.max(5,200*(s.precision||1))),L=5/(k+=2),V=ux(g+R*l),C=((z=ux(_+r(R)*-u))-_)/(V-g),P=2;P<k;P++)F=ux(g+P*R*l),O=ux(_+r(P*R)*-u),(Math.abs((O-z)/(F-V)-C)>L||P===k-1)&&(M.push(V,z),C=(O-z)/(F-V)),V=F,z=O;M="M"+M.join(",")}return x&&x.setAttribute("d",M),M},f}();eT()&&Ro.registerPlugin(fx),fx.version="3.12.1";var $c,sS,sA,nT=function(){return $c||typeof window<"u"&&($c=window.gsap)&&$c.registerPlugin&&$c},Rm={easeOut:"M0,1,C0.7,1,0.6,0,1,0",easeInOut:"M0,0,C0.1,0,0.24,1,0.444,1,0.644,1,0.6,0,1,0",anticipate:"M0,0,C0,0.222,0.024,0.386,0,0.4,0.18,0.455,0.65,0.646,0.7,0.67,0.9,0.76,1,0.846,1,1",uniform:"M0,0,C0,0.95,0,1,0,1,0,1,1,1,1,1,1,1,1,0,1,0"},A2=function(e){return e},iT=function(e){if(!sS)if($c=nT(),sA=$c&&$c.parseEase("_CE")){for(var t in Rm)Rm[t]=sA("",Rm[t]);sS=1,aA("wiggle").config=function(r){return"object"==typeof r?aA("",r):aA("wiggle("+r+")",{wiggles:+r})}}else e&&console.warn("Please gsap.registerPlugin(CustomEase, CustomWiggle)")},rT=function(e,t){return"function"!=typeof e&&(e=$c.parseEase(e)||sA("",e)),e.custom||!t?e:function(r){return 1-e(r)}},aA=function(e,t){sS||iT(1);var M,C,P,R,F,O,k,L,V,r=0|((t=t||{}).wiggles||10),s=1/r,l=s/2,u="anticipate"===t.type,g=Rm[t.type]||Rm.easeOut,_=A2;if(u&&(_=g,g=Rm.easeOut),t.timingEase&&(_=rT(t.timingEase)),t.amplitudeEase&&(g=rT(t.amplitudeEase,!0)),L=[0,0,(O=_(l))/4,0,O/2,k=u?-g(l):g(l),O,k],"random"===t.type){for(L.length=4,M=_(s),C=2*Math.random()-1,V=2;V<r;V++)l=M,k=C,M=_(s*V),C=2*Math.random()-1,P=Math.atan2(C-L[L.length-3],M-L[L.length-4]),R=Math.cos(P)*s,F=Math.sin(P)*s,L.push(l-R,k-F,l,k,l+R,k+F);L.push(M,0,1,0)}else{for(V=1;V<r;V++)L.push(_(l+s/2),k),l+=s,k=(k>0?-1:1)*g(V*s),O=_(l),L.push(_(l-s/2),k,O,k);L.push(_(l+s/4),k,_(l+s/4),0,1,0)}for(V=L.length;--V>-1;)L[V]=~~(1e3*L[V])/1e3;return L[2]="C"+L[2],sA(e,"M"+L.join(","))},aS=function(){function f(e,t){this.ease=aA(e,t)}return f.create=function(t,r){return aA(t,r)},f.register=function(t){$c=t,iT()},f}();nT()&&$c.registerPlugin(aS),aS.version="3.12.1",br.registerPlugin(fx,aS);const oS="Anim Reveal",sT="Anim Open",aT="Anim Idle",oT="No Anim";class E2 extends or{constructor(e,{item:t,envMap:r,onLoaded:s,onProgress:l,onError:u}){super(),this.loader=e,this.type="pack",this.animation={},this.isInit=!1,this.isDisposed=!1,this.listeners={},this.baseScale=1,this.animation={},this.envMap=r,this.item=t,this.onLoaded=s,this.onProgress=l,this.onError=u,this.load()}hasAnimation(e){return this.root?.animations&&!!Bd.findByName(this.root.animations,e)}reveal(){return this.playAnimation(oS)}idle(){return this.playAnimation(aT)}open(){return this.playAnimation(sT)}reset(){return this.playAnimation(oT)}highlight(){return this.animation.scale=this.scale.x,br.to(this.animation,{ease:"back.out(1.7)",duration:.3,scale:this.baseScale+.1,emissiveIntensity:2,onUpdate:()=>{this.scale.set(this.animation.scale,this.animation.scale,this.animation.scale)}})}unhighlight(){return br.to(this.animation,{ease:"back.out(1.7)",duration:.3,scale:this.baseScale,emissiveIntensity:0,onUpdate:()=>{this.scale.set(this.animation.scale,this.animation.scale,this.animation.scale)}})}lookAtPoint(e,t=.2){const r=new Me(0,0,-11);r.applyQuaternion(this.quaternion);let l=function x2(f,e){const t=f.dot(e),r=f.length(),s=e.length();return Math.acos(t/(r*s))}(r,(new Me).subVectors(e,this.position));return(!l||isNaN(l))&&(l=.01),this.animation.lookAt=0,br.to(this.animation,{duration:t,lookAt:l,onUpdateParams:[this,e],onUpdate:function(u,g){!function y2(f,e,t){const r=f.quaternion.clone(),s=new Ir;s.setFromRotationMatrix((new ui).lookAt(f.position,e,f.up)),r.rotateTowards(s,t),f.quaternion.copy(r)}(u,g,u.animation.lookAt)}})}setScale(e){this.baseScale=e,this.scale.set(e,e,e)}dispose(){this.isDisposed=!0,this.item=null,this.onLoaded=null,this.onProgress=null,this.onError=null,this.isInit&&this.model&&(this.mixer.stopAllAction(),br.killTweensOf(this),this.model.traverse(e=>{e instanceof pn&&(Array.isArray(e.material)?e.material.forEach(t=>{t.dispose()}):e.material.dispose(),e.geometry.dispose())}))}playAnimation(e){this.mixer.stopAllAction(),this.resetPreviousTweens();const t=Bd.findByName(this.root.animations,e),r=this.mixer.clipAction(t);return r?this.playOpenAction(r,t):br.set(this,{})}playOpenAction(e,t){return e.time=0,e.clampWhenFinished=!0,e.reset(),e.play(),e.loop=2200,this.mixer._time=0,br.to(this.mixer,{_time:t.duration,duration:t.duration,onStart:()=>this.visible=!0,onUpdateParams:[this.mixer],onUpdate:function(r){r.setTime(t.duration*this.progress())},onComplete:()=>{e.reset(),e.time=0}})}resetPreviousTweens(){const e=br.getTweensOf(this.mixer);e.length>0&&(e[0].revert(),e[0].kill())}load(){var e=this;return(0,xi.A)(function*(){const t="core"===e.item.set&&"neutral"!==e.item.god?e.item.god:e.item.rarity,r=jC.R[`${e.item.set}-pack-${e.item.rarity}`];e.loader.load("pack",r?r.path:`${e.item.set}/${t}
83`,r?r.filename:`${e.item.set}_${t}`,u=>{e.isDisposed||e.onProgress(u)}).then(u=>{e.isDisposed||(e.root=u,e.model=u.scene,e.parser=u.parser,e.mixer=new BP(e.model),e.init(),e.onLoaded(u))},u=>{e.isDisposed||e.onError(u)})})()}init(){this.isInit=!0,this.model.position.set(0,0,0),this.model.scale.set(10,10,10),this.model.name=`${this.item.set}_${this.item.rarity}`,this.add(this.model),this.bounds=(new xo).setFromObject(this.model),this.setupMaterials()}setupMaterials(){this.model.traverse(e=>{if(e instanceof pn){const r=e.material;r.toneMapped=!0,r.envMapIntensity=1,r.envMap=this.envMap,r.needsUpdate=!0}})}addListener(e,t){this.listeners[e]=t,this.addEventListener(e,t)}detachEvents(){Object.keys(this.listeners).forEach(e=>this.removeEventListener(e,this.listeners[e]))}}const lS=new WeakMap;class b2 extends ao{constructor(e){super(e),this.decoderPath="",this.decoderConfig={},this.decoderBinary=null,this.decoderPending=null,this.workerLimit=4,this.workerPool=[],this.workerNextTaskID=1,this.workerSourceURL="",this.defaultAttributeIDs={position:"POSITION",normal:"NORMAL",color:"COLOR",uv:"TEX_COORD"},this.defaultAttributeTypes={position:"Float32Array",normal:"Float32Array",color:"Float32Array",uv:"Float32Array"}}setDecoderPath(e){return this.decoderPath=e,this}setDecoderConfig(e){return this.decoderConfig=e,this}setWorkerLimit(e){return this.workerLimit=e,this}load(e,t,r,s){const l=new oo(this.manager);l.setPath(this.path),l.setResponseType("arraybuffer"),l.setRequestHeader(this.requestHeader),l.setWithCredentials(this.withCredentials),l.load(e,u=>{this.parse(u,t,s)},r,s)}parse(e,t,r){this.decodeDracoFile(e,t,null,null,yo).catch(r)}decodeDracoFile(e,t,r,s,l=Ou){return this.decodeGeometry(e,{attributeIDs:r||this.defaultAttributeIDs,attributeTypes:s||this.defaultAttributeTypes,useUniqueIDs:!!r,vertexColorSpace:l}).then(t)}decodeGeometry(e,t){const r=JSON.stringify(t);if(lS.has(e)){const _=lS.get(e);if(_.key===r)return _.promise;if(0===e.byteLength)throw new Error("THREE.DRACOLoader: Unable to re-decode a buffer with different settings. Buffer has already been transferred.")}let s;const l=this.workerNextTaskID++,g=this._getWorker(l,e.byteLength).then(_=>(s=_,new Promise((x,M)=>{s._callbacks[l]={resolve:x,reject:M},s.postMessage({type:"decode",id:l,taskConfig:t,buffer:e},[e])}))).then(_=>this._createGeometry(_.geometry));return g.catch(()=>!0).then(()=>{s&&l&&this._releaseTask(s,l)}),lS.set(e,{key:r,promise:g}),g}_createGeometry(e){const t=new Ii;e.index&&t.setIndex(new tr(e.index.array,1));for(let r=0;r<e.attributes.length;r++){const s=e.attributes[r],l=s.name,_=new tr(s.array,s.itemSize);"color"===l&&this._assignVertexColorSpace(_,s.vertexColorSpace),t.setAttribute(l,_)}return t}_assignVertexColorSpace(e,t){if(t!==yo)return;const r=new An;for(let s=0,l=e.count;s<l;s++)r.fromBufferAttribute(e,s).convertSRGBToLinear(),e.setXYZ(s,r.r,r.g,r.b)}_loadLibrary(e,t){const r=new oo(this.manager);return r.setPath(this.decoderPath),r.setResponseType(t),r.setWithCredentials(this.withCredentials),new Promise((s,l)=>{r.load(e,s,void 0,l)})}preload(){return this._initDecoder(),this}_initDecoder(){if(this.decoderPending)return this.decoderPending;const e="object"!=typeof WebAssembly||"js"===this.decoderConfig.type,t=[];return e?t.push(this._loadLibrary("draco_decoder.js","text")):(t.push(this._loadLibrary("draco_wasm_wrapper.js","text")),t.push(this._loadLibrary("draco_decoder.wasm","arraybuffer"))),this.decoderPending=Promise.all(t).then(r=>{const s=r[0];e||(this.decoderConfig.wasmBinary=r[1]);const l=S2.toString(),u=["/* draco decoder */",s,"","/* worker */",l.substring(l.indexOf("{")+1,l.lastIndexOf("}"))].join("\n");this.workerSourceURL=URL.createObjectURL(new Blob([u]))}),this.decoderPending}_getWorker(e,t){return this._initDecoder().then(()=>{if(this.workerPool.length<this.workerLimit){const s=new Worker(this.workerSourceURL);s._callbacks={},s._taskCosts={},s._taskLoad=0,s.postMessage({type:"init",decoderConfig:this.decoderConfig}),s.onmessage=function(l){const u=l.data;switch(u.type){case"decode":s._callbacks[u.id].resolve(u);break;case"error":s._callbacks[u.id].reject(u);break;default:console.error('THREE.DRACOLoader: Unexpected message, "'+u.type+'"')}},this.workerPool.push(s)}else this.workerPool.sort(function(s,l){return s._taskLoad>l._taskLoad?-1:1});const r=this.workerPool[this.workerPool.length-1];return r._taskCosts[e]=t,r._taskLoad+=t,r})}_releaseTask(e,t){e._taskLoad-=e._taskCosts[t],delete e._callbacks[t],delete e._taskCosts[t]}debug(){console.log("Task load: ",this.workerPool.map(e=>e._taskLoad))}dispose(){for(let e=0;e<this.workerPool.length;++e)this.workerPool[e].terminate();return this.workerPool.length=0,""!==this.workerSourceURL&&URL.revokeObjectURL(this.workerSourceURL),this}}function S2(){let f,e;
vendor: 17,025 bytes, line 83
83function s(u,g,_,x,M,C){const P=C.num_components(),F=_.num_points()*P,O=F*M.BYTES_PER_ELEMENT,k=function l(u,g){switch(g){case Float32Array:return u.DT_FLOAT32;case Int8Array:return u.DT_INT8;case Int16Array:return u.DT_INT16;case Int32Array:return u.DT_INT32;case Uint8Array:return u.DT_UINT8;case Uint16Array:return u.DT_UINT16;case Uint32Array:return u.DT_UINT32}}(u,M),L=u._malloc(O);g.GetAttributeDataArrayForAllPoints(_,C,k,O,L);const V=new M(u.HEAPF32.buffer,L,F).slice();return u._free(L),{name:x,array:V,itemSize:P}}onmessage=function(u){const g=u.data;switch(g.type){case"init":f=g.decoderConfig,e=new Promise(function(M){f.onModuleLoaded=function(C){M({draco:C})},DracoDecoderModule(f)});break;case"decode":const _=g.buffer,x=g.taskConfig;e.then(M=>{const C=M.draco,P=new C.Decoder;try{const R=function t(u,g,_,x){const M=x.attributeIDs,C=x.attributeTypes;let P,R;const F=g.GetEncodedGeometryType(_);if(F===u.TRIANGULAR_MESH)P=new u.Mesh,R=g.DecodeArrayToMesh(_,_.byteLength,P);else{if(F!==u.POINT_CLOUD)throw new Error("THREE.DRACOLoader: Unexpected geometry type.");P=new u.PointCloud,R=g.DecodeArrayToPointCloud(_,_.byteLength,P)}if(!R.ok()||0===P.ptr)throw new Error("THREE.DRACOLoader: Decoding failed: "+R.error_msg());const O={index:null,attributes:[]};for(const k in M){const L=self[C[k]];let V,z;if(x.useUniqueIDs)z=M[k],V=g.GetAttributeByUniqueId(P,z);else{if(z=g.GetAttributeId(P,u[M[k]]),-1===z)continue;V=g.GetAttribute(P,z)}const W=s(u,g,P,k,L,V);"color"===k&&(W.vertexColorSpace=x.vertexColorSpace),O.attributes.push(W)}return F===u.TRIANGULAR_MESH&&(O.index=function r(u,g,_){const M=3*_.num_faces(),C=4*M,P=u._malloc(C);g.GetTrianglesUInt32Array(_,C,P);const R=new Uint32Array(u.HEAPF32.buffer,P,M).slice();return u._free(P),{array:R,itemSize:1}}(u,g,P)),u.destroy(P),O}(C,P,new Int8Array(_),x),F=R.attributes.map(O=>O.array.buffer);R.index&&F.push(R.index.array.buffer),self.postMessage({type:"decode",id:g.id,geometry:R},F)}catch(R){console.error(R),self.postMessage({type:"error",id:g.id,error:R.message})}finally{C.destroy(P)}})}}}function lT(f,e){if(0===e)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),f;if(2===e||1===e){let t=f.getIndex();if(null===t){const u=[],g=f.getAttribute("position");if(void 0===g)return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),f;for(let _=0;_<g.count;_++)u.push(_);f.setIndex(u),t=f.getIndex()}const r=t.count-2,s=[];if(2===e)for(let u=1;u<=r;u++)s.push(t.getX(0)),s.push(t.getX(u)),s.push(t.getX(u+1));else for(let u=0;u<r;u++)u%2==0?(s.push(t.getX(u)),s.push(t.getX(u+1)),s.push(t.getX(u+2))):(s.push(t.getX(u+2)),s.push(t.getX(u+1)),s.push(t.getX(u)));s.length/3!==r&&console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unable to generate correct amount of triangles.");const l=f.clone();return l.setIndex(s),l.clearGroups(),l}return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unknown draw mode:",e),f}class w2 extends ao{constructor(e){super(e),this.dracoLoader=null,this.ktx2Loader=null,this.meshoptDecoder=null,this.pluginCallbacks=[],this.register(function(t){return new R2(t)}),this.register(function(t){return new N2(t)}),this.register(function(t){return new U2(t)}),this.register(function(t){return new z2(t)}),this.register(function(t){return new L2(t)}),this.register(function(t){return new D2(t)}),this.register(function(t){return new F2(t)}),this.register(function(t){return new k2(t)}),this.register(function(t){return new P2(t)}),this.register(function(t){return new O2(t)}),this.register(function(t){return new B2(t)}),this.register(function(t){return new T2(t)}),this.register(function(t){return new G2(t)}),this.register(function(t){return new V2(t)})}load(e,t,r,s){const l=this;let u;u=""!==this.resourcePath?this.resourcePath:""!==this.path?this.path:Y0.extractUrlBase(e),this.manager.itemStart(e);const g=function(x){s?s(x):console.error(x),l.manager.itemError(e),l.manager.itemEnd(e)},_=new oo(this.manager);_.setPath(this.path),_.setResponseType("arraybuffer"),_.setRequestHeader(this.requestHeader),_.setWithCredentials(this.withCredentials),_.load(e,function(x){try{l.parse(x,u,function(M){t(M),l.manager.itemEnd(e)},g)}catch(M){g(M)}},r,g)}setDRACOLoader(e){return this.dracoLoader=e,this}setDDSLoader(){throw new Error('THREE.GLTFLoader: "MSFT_texture_dds" no longer supported. Please update to "KHR_texture_basisu".')}setKTX2Loader(e){return this.ktx2Loader=e,this}setMeshoptDecoder(e){return this.meshoptDecoder=e,this}register(e){return-1===this.pluginCallbacks.indexOf(e)&&this.pluginCallbacks.push(e),this}unregister(e){return-1!==this.pluginCallbacks.indexOf(e)&&this.pluginCallbacks.splice(this.pluginCallbacks.indexOf(e),1),this}parse(e,t,r,s){let l;const u={},g={},_=new TextDecoder;if("string"==typeof e)l=JSON.parse(e);else if(e instanceof ArrayBuffer)if(_.decode(new Uint8Array(e,0,4))===cT){try{u[lr.KHR_BINARY_GLTF]=new H2(e)}catch(C){return void(s&&s(C))}l=JSON.parse(u[lr.KHR_BINARY_GLTF].content)}else l=JSON.parse(_.decode(e));else l=e;if(void 0===l.asset||l.asset.version[0]<2)return void(s&&s(new Error("THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported.")));const x=new nR(l,{path:t||this.resourcePath||"",crossOrigin:this.crossOrigin,requestHeader:this.requestHeader,manager:this.manager,ktx2Loader:this.ktx2Loader,meshoptDecoder:this.meshoptDecoder});x.fileLoader.setRequestHeader(this.requestHeader);for(let M=0;M<this.pluginCallbacks.length;M++){const C=this.pluginCallbacks[M](x);g[C.name]=C,u[C.name]=!0}if(l.extensionsUsed)for(let M=0;M<l.extensionsUsed.length;++M){const C=l.extensionsUsed[M],P=l.extensionsRequired||[];switch(C){case lr.KHR_MATERIALS_UNLIT:u[C]=new I2;break;case lr.KHR_DRACO_MESH_COMPRESSION:u[C]=new Q2(l,this.dracoLoader);break;case lr.KHR_TEXTURE_TRANSFORM:u[C]=new W2;break;case lr.KHR_MESH_QUANTIZATION:u[C]=new X2;break;default:P.indexOf(C)>=0&&void 0===g[C]&&console.warn('THREE.GLTFLoader: Unknown extension "'+C+'".')}}x.setExtensions(u),x.setPlugins(g),x.parse(r,s)}parseAsync(e,t){const r=this;return new Promise(function(s,l){r.parse(e,t,s,l)})}}function C2(){let f={};return{get:function(e){return f[e]},add:function(e,t){f[e]=t},remove:function(e){delete f[e]},removeAll:function(){f={}}}}const lr={KHR_BINARY_GLTF:"KHR_binary_glTF",KHR_DRACO_MESH_COMPRESSION:"KHR_draco_mesh_compression",KHR_LIGHTS_PUNCTUAL:"KHR_lights_punctual",KHR_MATERIALS_CLEARCOAT:"KHR_materials_clearcoat",KHR_MATERIALS_IOR:"KHR_materials_ior",KHR_MATERIALS_SHEEN:"KHR_materials_sheen",KHR_MATERIALS_SPECULAR:"KHR_materials_specular",KHR_MATERIALS_TRANSMISSION:"KHR_materials_transmission",KHR_MATERIALS_IRIDESCENCE:"KHR_materials_iridescence",KHR_MATERIALS_UNLIT:"KHR_materials_unlit",KHR_MATERIALS_VOLUME:"KHR_materials_volume",KHR_TEXTURE_BASISU:"KHR_texture_basisu",KHR_TEXTURE_TRANSFORM:"KHR_texture_transform",KHR_MESH_QUANTIZATION:"KHR_mesh_quantization",KHR_MATERIALS_EMISSIVE_STRENGTH:"KHR_materials_emissive_strength",EXT_TEXTURE_WEBP:"EXT_texture_webp",EXT_TEXTURE_AVIF:"EXT_texture_avif",EXT_MESHOPT_COMPRESSION:"EXT_meshopt_compression",EXT_MESH_GPU_INSTANCING:"EXT_mesh_gpu_instancing"};class T2{constructor(e){this.parser=e,this.name=lr.KHR_LIGHTS_PUNCTUAL,this.cache={refs:{},uses:{}}}_markDefs(){const e=this.parser,t=this.parser.json.nodes||[];for(let r=0,s=t.length;r<s;r++){const l=t[r];l.extensions&&l.extensions[this.name]&&void 0!==l.extensions[this.name].light&&e._addNodeRef(this.cache,l.extensions[this.name].light)}}_loadLight(e){const t=this.parser,r="light:"+e;let s=t.cache.get(r);if(s)return s;const l=t.json,_=((l.extensions&&l.extensions[this.name]||{}).lights||[])[e];let x;const M=new An(16777215);void 0!==_.color&&M.fromArray(_.color);const C=void 0!==_.range?_.range:0;switch(_.type){case"directional":x=new Ob(M),x.target.position.set(0,0,-1),x.add(x.target);break;case"point":x=new Ww(M),x.distance=C;break;case"spot":x=new Hw(M),x.distance=C,_.spot=_.spot||{},_.spot.innerConeAngle=void 0!==_.spot.innerConeAngle?_.spot.innerConeAngle:0,_.spot.outerConeAngle=void 0!==_.spot.outerConeAngle?_.spot.outerConeAngle:Math.PI/4,x.angle=_.spot.outerConeAngle,x.penumbra=1-_.spot.innerConeAngle/_.spot.outerConeAngle,x.target.position.set(0,0,-1),x.add(x.target);break;default:throw new Error("THREE.GLTFLoader: Unexpected light type: "+_.type)}return x.position.set(0,0,0),x.decay=2,gf(x,_),void 0!==_.intensity&&(x.intensity=_.intensity),x.name=t.createUniqueName(_.name||"light_"+e),s=Promise.resolve(x),t.cache.add(r,s),s}getDependency(e,t){if("light"===e)return this._loadLight(t)}createNodeAttachment(e){const t=this,r=this.parser,l=r.json.nodes[e],g=(l.extensions&&l.extensions[this.name]||{}).light;return void 0===g?null:this._loadLight(g).then(function(_){return r._getNodeRef(t.cache,g,_)})}}class I2{constructor(){this.name=lr.KHR_MATERIALS_UNLIT}getMaterialType(){return vs}extendParams(e,t,r){const s=[];e.color=new An(1,1,1),e.opacity=1;const l=t.pbrMetallicRoughness;if(l){if(Array.isArray(l.baseColorFactor)){const u=l.baseColorFactor;e.color.fromArray(u),e.opacity=u[3]}void 0!==l.baseColorTexture&&s.push(r.assignTexture(e,"map",l.baseColorTexture,Ui))}return Promise.all(s)}}class P2{constructor(e){this.parser=e,this.name=lr.KHR_MATERIALS_EMISSIVE_STRENGTH}extendMaterialParams(e,t){const s=this.parser.json.materials[e];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const l=s.extensions[this.name].emissiveStrength;return void 0!==l&&(t.emissiveIntensity=l),Promise.resolve()}}class R2{constructor(e){this.parser=e,this.name=lr.KHR_MATERIALS_CLEARCOAT}getMaterialType(e){const r=this.parser.json.materials[e];return r.extensions&&r.extensions[this.name]?lf:null}extendMaterialParams(e,t){const r=this.parser,s=r.json.materials[e];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const l=[],u=s.extensions[this.name];if(void 0!==u.clearcoatFactor&&(t.clearcoat=u.clearcoatFactor),void 0!==u.clearcoatTexture&&l.push(r.assignTexture(t,"clearcoatMap",u.clearcoatTexture)),void 0!==u.clearcoatRoughnessFactor&&(t.clearcoatRoughness=u.clearcoatRoughnessFactor),void 0!==u.clearcoatRoughnessTexture&&l.push(r.assignTexture(t,"clearcoatRoughnessMap",u.clearcoatRoughnessTexture)),void 0!==u.clearcoatNormalTexture&&(l.push(r.assignTexture(t,"clearcoatNormalMap",u.clearcoatNormalTexture)),void 0!==u.clearcoatNormalTexture.scale)){const g=u.clearcoatNormalTexture.scale;t.clearcoatNormalScale=new Rt(g,g)}return Promise.all(l)}}class B2{constructor(e){this.parser=e,this.name=lr.KHR_MATERIALS_IRIDESCENCE}getMaterialType(e){const r=this.parser.json.materials[e];return r.extensions&&r.extensions[this.name]?lf:null}extendMaterialParams(e,t){const r=this.parser,s=r.json.materials[e];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const l=[],u=s.extensions[this.name];return void 0!==u.iridescenceFactor&&(t.iridescence=u.iridescenceFactor),void 0!==u.iridescenceTexture&&l.push(r.assignTexture(t,"iridescenceMap",u.iridescenceTexture)),void 0!==u.iridescenceIor&&(t.iridescenceIOR=u.iridescenceIor),void 0===t.iridescenceThicknessRange&&(t.iridescenceThicknessRange=[100,400]),void 0!==u.iridescenceThicknessMinimum&&(t.iridescenceThicknessRange[0]=u.iridescenceThicknessMinimum),void 0!==u.iridescenceThicknessMaximum&&(t.iridescenceThicknessRange[1]=u.iridescenceThicknessMaximum),void 0!==u.iridescenceThicknessTexture&&l.push(r.assignTexture(t,"iridescenceThicknessMap",u.iridescenceThicknessTexture)),Promise.all(l)}}class L2{constructor(e){this.parser=e,this.name=lr.KHR_MATERIALS_SHEEN}getMaterialType(e){const r=this.parser.json.materials[e];return r.extensions&&r.extensions[this.name]?lf:null}extendMaterialParams(e,t){const r=this.parser,s=r.json.materials[e];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const l=[];t.sheenColor=new An(0,0,0),t.sheenRoughness=0,t.sheen=1;const u=s.extensions[this.name];return void 0!==u.sheenColorFactor&&t.sheenColor.fromArray(u.sheenColorFactor),void 0!==u.sheenRoughnessFactor&&(t.sheenRoughness=u.sheenRoughnessFactor),void 0!==u.sheenColorTexture&&l.push(r.assignTexture(t,"sheenColorMap",u.sheenColorTexture,Ui)),void 0!==u.sheenRoughnessTexture&&l.push(r.assignTexture(t,"sheenRoughnessMap",u.sheenRoughnessTexture)),Promise.all(l)}}class D2{constructor(e){this.parser=e,this.name=lr.KHR_MATERIALS_TRANSMISSION}getMaterialType(e){const r=this.parser.json.materials[e];return r.extensions&&r.extensions[this.name]?lf:null}extendMaterialParams(e,t){const r=this.parser,s=r.json.materials[e];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const l=[],u=s.extensions[this.name];return void 0!==u.transmissionFactor&&(t.transmission=u.transmissionFactor),void 0!==u.transmissionTexture&&l.push(r.assignTexture(t,"transmissionMap",u.transmissionTexture)),Promise.all(l)}}class F2{constructor(e){this.parser=e,this.name=lr.KHR_MATERIALS_VOLUME}getMaterialType(e){const r=this.parser.json.materials[e];return r.extensions&&r.extensions[this.name]?lf:null}extendMaterialParams(e,t){const r=this.parser,s=r.json.materials[e];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const l=[],u=s.extensions[this.name];t.thickness=void 0!==u.thicknessFactor?u.thicknessFactor:0,void 0!==u.thicknessTexture&&l.push(r.assignTexture(t,"thicknessMap",u.thicknessTexture)),t.attenuationDistance=u.attenuationDistance||1/0;const g=u.attenuationColor||[1,1,1];return t.attenuationColor=new An(g[0],g[1],g[2]),Promise.all(l)}}class k2{constructor(e){this.parser=e,this.name=lr.KHR_MATERIALS_IOR}getMaterialType(e){const r=this.parser.json.materials[e];return r.extensions&&r.extensions[this.name]?lf:null}extendMaterialParams(e,t){const s=this.parser.json.materials[e];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const l=s.extensions[this.name];return t.ior=void 0!==l.ior?l.ior:1.5,Promise.resolve()}}class O2{constructor(e){this.parser=e,this.name=lr.KHR_MATERIALS_SPECULAR}getMaterialType(e){const r=this.parser.json.materials[e];return r.extensions&&r.extensions[this.name]?lf:null}extendMaterialParams(e,t){const r=this.parser,s=r.json.materials[e];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const l=[],u=s.extensions[this.name];t.specularIntensity=void 0!==u.specularFactor?u.specularFactor:1,void 0!==u.specularTexture&&l.push(r.assignTexture(t,"specularIntensityMap",u.specularTexture));const g=u.specularColorFactor||[1,1,1];return t.specularColor=new An(g[0],g[1],g[2]),void 0!==u.specularColorTexture&&l.push(r.assignTexture(t,"specularColorMap",u.specularColorTexture,Ui)),Promise.all(l)}}class N2{constructor(e){this.parser=e,this.name=lr.KHR_TEXTURE_BASISU}loadTexture(e){const t=this.parser,r=t.json,s=r.textures[e];if(!s.extensions||!s.extensions[this.name])return null;const l=s.extensions[this.name],u=t.options.ktx2Loader;if(!u){if(r.extensionsRequired&&r.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures");return null}return t.loadTextureImage(e,l.source,u)}}class U2{constructor(e){this.parser=e,this.name=lr.EXT_TEXTURE_WEBP,this.isSupported=null}loadTexture(e){const t=this.name,r=this.parser,s=r.json,l=s.textures[e];if(!l.extensions||!l.extensions[t])return null;const u=l.extensions[t],g=s.images[u.source];let _=r.textureLoader;if(g.uri){const x=r.options.manager.getHandler(g.uri);null!==x&&(_=x)}return this.detectSupport().then(function(x){if(x)return r.loadTextureImage(e,u.source,_);if(s.extensionsRequired&&s.extensionsRequired.indexOf(t)>=0)throw new Error("THREE.GLTFLoader: WebP required by asset but unsupported.");return r.loadTexture(e)})}detectSupport(){return this.isSupported||(this.isSupported=new Promise(function(e){const t=new Image;t.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",t.onload=t.onerror=function(){e(1===t.height)}})),this.isSupported}}class z2{constructor(e){this.parser=e,this.name=lr.EXT_TEXTURE_AVIF,this.isSupported=null}loadTexture(e){const t=this.name,r=this.parser,s=r.json,l=s.textures[e];if(!l.extensions||!l.extensions[t])return null;const u=l.extensions[t],g=s.images[u.source];let _=r.textureLoader;if(g.uri){const x=r.options.manager.getHandler(g.uri);null!==x&&(_=x)}return this.detectSupport().then(function(x){if(x)return r.loadTextureImage(e,u.source,_);if(s.extensionsRequired&&s.extensionsRequired.indexOf(t)>=0)throw new Error("THREE.GLTFLoader: AVIF required by asset but unsupported.");return r.loadTexture(e)})}detectSupport(){return this.isSupported||(this.isSupported=new Promise(function(e){const t=new Image;t.src="data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAABcAAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAEAAAABAAAAEHBpeGkAAAAAAwgICAAAAAxhdj
83FDgQAMAAAAABNjb2xybmNseAACAAIABoAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAAB9tZGF0EgAKCBgABogQEDQgMgkQAAAAB8dSLfI=",t.onload=t.onerror=function(){e(1===t.height)}})),this.isSupported}}class G2{constructor(e){this.name=lr.EXT_MESHOPT_COMPRESSION,this.parser=e}loadBufferView(e){const t=this.parser.json,r=t.bufferViews[e];if(r.extensions&&r.extensions[this.name]){const s=r.extensions[this.name],l=this.parser.getDependency("buffer",s.buffer),u=this.parser.options.meshoptDecoder;if(!u||!u.supported){if(t.extensionsRequired&&t.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files");return null}return l.then(function(g){const M=s.count,C=s.byteStride,P=new Uint8Array(g,s.byteOffset||0,s.byteLength||0);return u.decodeGltfBufferAsync?u.decodeGltfBufferAsync(M,C,P,s.mode,s.filter).then(function(R){return R.buffer}):u.ready.then(function(){const R=new ArrayBuffer(M*C);return u.decodeGltfBuffer(new Uint8Array(R),M,C,P,s.mode,s.filter),R})})}return null}}class V2{constructor(e){this.name=lr.EXT_MESH_GPU_INSTANCING,this.parser=e}createNodeMesh(e){const t=this.parser.json,r=t.nodes[e];if(!r.extensions||!r.extensions[this.name]||void 0===r.mesh)return null;const s=t.meshes[r.mesh];for(const x of s.primitives)if(x.mode!==Cl.TRIANGLES&&x.mode!==Cl.TRIANGLE_STRIP&&x.mode!==Cl.TRIANGLE_FAN&&void 0!==x.mode)return null;const u=r.extensions[this.name].attributes,g=[],_={};for(const x in u)g.push(this.parser.getDependency("accessor",u[x]).then(M=>(_[x]=M,_[x])));return g.length<1?null:(g.push(this.parser.createNodeMesh(e)),Promise.all(g).then(x=>{const M=x.pop(),C=M.isGroup?M.children:[M],P=x[0].count,R=[];for(const F of C){const O=new ui,k=new Me,L=new Ir,V=new Me(1,1,1),z=new dw(F.geometry,F.material,P);for(let W=0;W<P;W++)_.TRANSLATION&&k.fromBufferAttribute(_.TRANSLATION,W),_.ROTATION&&L.fromBufferAttribute(_.ROTATION,W),_.SCALE&&V.fromBufferAttribute(_.SCALE,W),z.setMatrixAt(W,O.compose(k,L,V));for(const W in _)"TRANSLATION"!==W&&"ROTATION"!==W&&"SCALE"!==W&&F.geometry.setAttribute(W,_[W]);or.prototype.copy.call(z,F),this.parser.assignFinalMaterial(z),R.push(z)}return M.isGroup?(M.clear(),M.add(...R),M):R[0]}))}}const cT="glTF";class H2{constructor(e){this.name=lr.KHR_BINARY_GLTF,this.content=null,this.body=null;const t=new DataView(e,0,12),r=new TextDecoder;if(this.header={magic:r.decode(new Uint8Array(e.slice(0,4))),version:t.getUint32(4,!0),length:t.getUint32(8,!0)},this.header.magic!==cT)throw new Error("THREE.GLTFLoader: Unsupported glTF-Binary header.");if(this.header.version<2)throw new Error("THREE.GLTFLoader: Legacy binary file detected.");const s=this.header.length-12,l=new DataView(e,12);let u=0;for(;u<s;){const g=l.getUint32(u,!0);u+=4;const _=l.getUint32(u,!0);if(u+=4,1313821514===_){const x=new Uint8Array(e,12+u,g);this.content=r.decode(x)}else if(5130562===_){const x=12+u;this.body=e.slice(x,x+g)}u+=g}if(null===this.content)throw new Error("THREE.GLTFLoader: JSON content not found.")}}class Q2{constructor(e,t){if(!t)throw new Error("THREE.GLTFLoader: No DRACOLoader instance provided.");this.name=lr.KHR_DRACO_MESH_COMPRESSION,this.json=e,this.dracoLoader=t,this.dracoLoader.preload()}decodePrimitive(e,t){const r=this.json,s=this.dracoLoader,l=e.extensions[this.name].bufferView,u=e.extensions[this.name].attributes,g={},_={},x={};for(const M in u){const C=fS[M]||M.toLowerCase();g[C]=u[M]}for(const M in e.attributes){const C=fS[M]||M.toLowerCase();if(void 0!==u[M]){const P=r.accessors[e.attributes[M]];x[C]=Bm[P.componentType].name,_[C]=!0===P.normalized}}return t.getDependency("bufferView",l).then(function(M){return new Promise(function(C){s.decodeDracoFile(M,function(P){for(const R in P.attributes){const O=_[R];void 0!==O&&(P.attributes[R].normalized=O)}C(P)},g,x)})})}}class W2{constructor(){this.name=lr.KHR_TEXTURE_TRANSFORM}extendTexture(e,t){return(void 0===t.texCoord||t.texCoord===e.channel)&&void 0===t.offset&&void 0===t.rotation&&void 0===t.scale||(e=e.clone(),void 0!==t.texCoord&&(e.channel=t.texCoord),void 0!==t.offset&&e.offset.fromArray(t.offset),void 0!==t.rotation&&(e.rotation=t.rotation),void 0!==t.scale&&e.repeat.fromArray(t.scale),e.needsUpdate=!0),e}}class X2{constructor(){this.name=lr.KHR_MESH_QUANTIZATION}}class uT extends Q0{constructor(e,t,r,s){super(e,t,r,s)}copySampleValue_(e){const t=this.resultBuffer,r=this.sampleValues,s=this.valueSize,l=e*s*3+s;for(let u=0;u!==s;u++)t[u]=r[l+u];return t}interpolate_(e,t,r,s){const l=this.resultBuffer,u=this.sampleValues,g=this.valueSize,_=2*g,x=3*g,M=s-t,C=(r-t)/M,P=C*C,R=P*C,F=e*x,O=F-x,
vendor: 23,797 bytes, line 83
83k=-2*R+3*P,L=R-P,V=1-k,z=L-P+C;for(let W=0;W!==g;W++)l[W]=V*u[O+W+g]+z*(u[O+W+_]*M)+k*u[F+W+g]+L*(u[F+W]*M);return l}}const q2=new Ir;class Y2 extends uT{interpolate_(e,t,r,s){const l=super.interpolate_(e,t,r,s);return q2.fromArray(l).normalize().toArray(l),l}}const Cl={FLOAT:5126,FLOAT_MAT3:35675,FLOAT_MAT4:35676,FLOAT_VEC2:35664,FLOAT_VEC3:35665,FLOAT_VEC4:35666,LINEAR:9729,REPEAT:10497,SAMPLER_2D:35678,POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6,UNSIGNED_BYTE:5121,UNSIGNED_SHORT:5123},Bm={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array},fT={9728:Hr,9729:Tr,9984:1004,9985:1007,9986:1005,9987:Uo},dT={33071:aa,33648:1002,10497:Zl},uS={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},fS={POSITION:"position",NORMAL:"normal",TANGENT:"tangent",TEXCOORD_0:"uv",TEXCOORD_1:"uv2",COLOR_0:"color",WEIGHTS_0:"skinWeight",JOINTS_0:"skinIndex"},mf={scale:"scale",translation:"position",rotation:"quaternion",weights:"morphTargetInfluences"},$2={CUBICSPLINE:void 0,LINEAR:Du,STEP:td};function K2(f){return void 0===f.DefaultMaterial&&(f.DefaultMaterial=new Vy({color:16777215,emissive:0,metalness:1,roughness:1,transparent:!1,depthTest:!0,side:0})),f.DefaultMaterial}function lA(f,e,t){for(const r in t.extensions)void 0===f[r]&&(e.userData.gltfExtensions=e.userData.gltfExtensions||{},e.userData.gltfExtensions[r]=t.extensions[r])}function gf(f,e){void 0!==e.extras&&("object"==typeof e.extras?Object.assign(f.userData,e.extras):console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, "+e.extras))}function j2(f,e){if(f.updateMorphTargets(),void 0!==e.weights)for(let t=0,r=e.weights.length;t<r;t++)f.morphTargetInfluences[t]=e.weights[t];if(e.extras&&Array.isArray(e.extras.targetNames)){const t=e.extras.targetNames;if(f.morphTargetInfluences.length===t.length){f.morphTargetDictionary={};for(let r=0,s=t.length;r<s;r++)f.morphTargetDictionary[t[r]]=r}else console.warn("THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.")}}function J2(f){const e=f.extensions&&f.extensions[lr.KHR_DRACO_MESH_COMPRESSION];let t;return t=e?"draco:"+e.bufferView+":"+e.indices+":"+pT(e.attributes):f.indices+":"+pT(f.attributes)+":"+f.mode,t}function pT(f){let e="";const t=Object.keys(f).sort();for(let r=0,s=t.length;r<s;r++)e+=t[r]+":"+f[t[r]]+";";return e}function pS(f){switch(f){case Int8Array:return 1/127;case Uint8Array:return 1/255;case Int16Array:return 1/32767;case Uint16Array:return 1/65535;default:throw new Error("THREE.GLTFLoader: Unsupported normalized accessor component type.")}}const tR=new ui;class nR{constructor(e={},t={}){this.json=e,this.extensions={},this.plugins={},this.options=t,this.cache=new C2,this.associations=new Map,this.primitiveCache={},this.nodeCache={},this.meshCache={refs:{},uses:{}},this.cameraCache={refs:{},uses:{}},this.lightCache={refs:{},uses:{}},this.sourceCache={},this.textureCache={},this.nodeNamesUsed={};let r=!1,s=!1,l=-1;typeof navigator<"u"&&(r=!0===/^((?!chrome|android).)*safari/i.test(navigator.userAgent),s=navigator.userAgent.indexOf("Firefox")>-1,l=s?navigator.userAgent.match(/Firefox\/([0-9]+)\./)[1]:-1),this.textureLoader=typeof createImageBitmap>"u"||r||s&&l<98?new zw(this.options.manager):new gP(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new oo(this.options.manager),this.fileLoader.setResponseType("arraybuffer"),"use-credentials"===this.options.crossOrigin&&this.fileLoader.setWithCredentials(!0)}setExtensions(e){this.extensions=e}setPlugins(e){this.plugins=e}parse(e,t){const r=this,s=this.json,l=this.extensions;this.cache.removeAll(),this.nodeCache={},this._invokeAll(function(u){return u._markDefs&&u._markDefs()}),Promise.all(this._invokeAll(function(u){return u.beforeRoot&&u.beforeRoot()})).then(function(){return Promise.all([r.getDependencies("scene"),r.getDependencies("animation"),r.getDependencies("camera")])}).then(function(u){const g={scene:u[0][s.scene||0],scenes:u[0],animations:u[1],cameras:u[2],asset:s.asset,parser:r,userData:{}};lA(l,g,s),gf(g,s),Promise.all(r._invokeAll(function(_){return _.afterRoot&&_.afterRoot(g)})).then(function(){e(g)})}).catch(t)}_markDefs(){const e=this.json.nodes||[],t=this.json.skins||[],r=this.json.meshes||[];for(let s=0,l=t.length;s<l;s++){const u=t[s].joints;for(let g=0,_=u.length;g<_;g++)e[u[g]].isBone=!0}for(let s=0,l=e.length;s<l;s++){const u=e[s];void 0!==u.mesh&&(this._addNodeRef(this.meshCache,u.mesh),void 0!==u.skin&&(r[u.mesh].isSkinnedMesh=!0)),void 0!==u.camera&&this._addNodeRef(this.cameraCache,u.camera)}}_addNodeRef(e,t){void 0!==t&&(void 0===e.refs[t]&&(e.refs[t]=e.uses[t]=0),e.refs[t]++)}_getNodeRef(e,t,r){if(e.refs[t]<=1)return r;const s=r.clone(),l=(u,g)=>{const _=this.associations.get(u);null!=_&&this.associations.set(g,_);for(const[x,M]of u.children.entries())l(M,g.children[x])};return l(r,s),s.name+="_instance_"+e.uses[t]++,s}_invokeOne(e){const t=Object.values(this.plugins);t.push(this);for(let r=0;r<t.length;r++){const s=e(t[r]);if(s)return s}return null}_invokeAll(e){const t=Object.values(this.plugins);t.unshift(this);const r=[];for(let s=0;s<t.length;s++){const l=e(t[s]);l&&r.push(l)}return r}getDependency(e,t){const r=e+":"+t;let s=this.cache.get(r);if(!s){switch(e){case"scene":s=this.loadScene(t);break;case"node":s=this._invokeOne(function(l){return l.loadNode&&l.loadNode(t)});break;case"mesh":s=this._invokeOne(function(l){return l.loadMesh&&l.loadMesh(t)});break;case"accessor":s=this.loadAccessor(t);break;case"bufferView":s=this._invokeOne(function(l){return l.loadBufferView&&l.loadBufferView(t)});break;case"buffer":s=this.loadBuffer(t);break;case"material":s=this._invokeOne(function(l){return l.loadMaterial&&l.loadMaterial(t)});break;case"texture":s=this._invokeOne(function(l){return l.loadTexture&&l.loadTexture(t)});break;case"skin":s=this.loadSkin(t);break;case"animation":s=this._invokeOne(function(l){return l.loadAnimation&&l.loadAnimation(t)});break;case"camera":s=this.loadCamera(t);break;default:if(s=this._invokeOne(function(l){return l!=this&&l.getDependency&&l.getDependency(e,t)}),!s)throw new Error("Unknown type: "+e)}this.cache.add(r,s)}return s}getDependencies(e){let t=this.cache.get(e);if(!t){const r=this;t=Promise.all((this.json[e+("mesh"===e?"es":"s")]||[]).map(function(l,u){return r.getDependency(e,u)})),this.cache.add(e,t)}return t}loadBuffer(e){const t=this.json.buffers[e],r=this.fileLoader;if(t.type&&"arraybuffer"!==t.type)throw new Error("THREE.GLTFLoader: "+t.type+" buffer type is not supported.");if(void 0===t.uri&&0===e)return Promise.resolve(this.extensions[lr.KHR_BINARY_GLTF].body);const s=this.options;return new Promise(function(l,u){r.load(Y0.resolveURL(t.uri,s.path),l,void 0,function(){u(new Error('THREE.GLTFLoader: Failed to load buffer "'+t.uri+'".'))})})}loadBufferView(e){const t=this.json.bufferViews[e];return this.getDependency("buffer",t.buffer).then(function(r){const l=t.byteOffset||0;return r.slice(l,l+(t.byteLength||0))})}loadAccessor(e){const t=this,r=this.json,s=this.json.accessors[e];if(void 0===s.bufferView&&void 0===s.sparse){const u=uS[s.type],_=!0===s.normalized,x=new(0,Bm[s.componentType])(s.count*u);return Promise.resolve(new tr(x,u,_))}const l=[];return l.push(void 0!==s.bufferView?this.getDependency("bufferView",s.bufferView):null),void 0!==s.sparse&&(l.push(this.getDependency("bufferView",s.sparse.indices.bufferView)),l.push(this.getDependency("bufferView",s.sparse.values.bufferView))),Promise.all(l).then(function(u){const g=u[0],_=uS[s.type],x=Bm[s.componentType],M=x.BYTES_PER_ELEMENT,P=s.byteOffset||0,R=void 0!==s.bufferView?r.bufferViews[s.bufferView].byteStride:void 0,F=!0===s.normalized;let O,k;if(R&&R!==M*_){const L=Math.floor(P/R),V="InterleavedBuffer:"+s.bufferView+":"+s.componentType+":"+L+":"+s.count;let z=t.cache.get(V);z||(O=new x(g,L*R,s.count*R/M),z=new dy(O,R/M),t.cache.add(V,z)),k=new Cd(z,_,P%R/M,F)}else O=null===g?new x(s.count*_):new x(g,P,s.count*_),k=new tr(O,_,F);if(void 0!==s.sparse){const W=s.sparse.values.byteOffset||0,ne=new(0,Bm[s.sparse.indices.componentType])(u[1],s.sparse.indices.byteOffset||0,s.sparse.count*uS.SCALAR),fe=new x(u[2],W,s.sparse.count*_);null!==g&&(k=new tr(k.array.slice(),k.itemSize,k.normalized));for(let ge=0,de=ne.length;ge<de;ge++){const ie=ne[ge];if(k.setX(ie,fe[ge*_]),_>=2&&k.setY(ie,fe[ge*_+1]),_>=3&&k.setZ(ie,fe[ge*_+2]),_>=4&&k.setW(ie,fe[ge*_+3]),_>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}}return k})}loadTexture(e){const t=this.json,l=t.textures[e].source,u=t.images[l];let g=this.textureLoader;if(u.uri){const _=this.options.manager.getHandler(u.uri);null!==_&&(g=_)}return this.loadTextureImage(e,l,g)}loadTextureImage(e,t,r){const s=this,l=this.json,u=l.textures[e],g=l.images[t],_=(g.uri||g.bufferView)+":"+u.sampler;if(this.textureCache[_])return this.textureCache[_];const x=this.loadImageSource(t,r).then(function(M){M.flipY=!1,M.name=u.name||g.name||"",""===M.name&&"string"==typeof g.uri&&!1===g.uri.startsWith("data:image/")&&(M.name=g.uri);const P=(l.samplers||{})[u.sampler]||{};return M.magFilter=fT[P.magFilter]||Tr,M.minFilter=fT[P.minFilter]||Uo,M.wrapS=dT[P.wrapS]||Zl,M.wrapT=dT[P.wrapT]||Zl,s.associations.set(M,{textures:e}),M}).catch(function(){return null});return this.textureCache[_]=x,x}loadImageSource(e,t){const s=this.json,l=this.options;if(void 0!==this.sourceCache[e])return this.sourceCache[e].then(C=>C.clone());const u=s.images[e],g=self.URL||self.webkitURL;let _=u.uri||"",x=!1;if(void 0!==u.bufferView)_=this.getDependency("bufferView",u.bufferView).then(function(C){x=!0;const P=new Blob([C],{type:u.mimeType});return _=g.createObjectURL(P),_});else if(void 0===u.uri)throw new Error("THREE.GLTFLoader: Image "+e+" is missing URI and bufferView");const M=Promise.resolve(_).then(function(C){return new Promise(function(P,R){let F=P;!0===t.isImageBitmapLoader&&(F=function(O){const k=new ws(O);k.needsUpdate=!0,P(k)}),t.load(Y0.resolveURL(C,l.path),F,void 0,R)})}).then(function(C){return!0===x&&g.revokeObjectURL(_),C.userData.mimeType=u.mimeType||function eR(f){return f.search(/\.jpe?g($|\?)/i)>0||0===f.search(/^data\:image\/jpeg/)?"image/jpeg":f.search(/\.webp($|\?)/i)>0||0===f.search(/^data\:image\/webp/)?"image/webp":"image/png"}(u.uri),C}).catch(function(C){throw console.error("THREE.GLTFLoader: Couldn't load texture",_),C});return this.sourceCache[e]=M,M}assignTexture(e,t,r,s){const l=this;return this.getDependency("texture",r.index).then(function(u){if(!u)return null;if(void 0!==r.texCoord&&r.texCoord>0&&((u=u.clone()).channel=r.texCoord),l.extensions[lr.KHR_TEXTURE_TRANSFORM]){const g=void 0!==r.extensions?r.extensions[lr.KHR_TEXTURE_TRANSFORM]:void 0;if(g){const _=l.associations.get(u);u=l.extensions[lr.KHR_TEXTURE_TRANSFORM].extendTexture(u,g),l.associations.set(u,_)}}return void 0!==s&&(u.encoding=s),e[t]=u,u})}assignFinalMaterial(e){const t=e.geometry;let r=e.material;const s=void 0===t.attributes.tangent,l=void 0!==t.attributes.color,u=void 0===t.attributes.normal;if(e.isPoints){const g="PointsMaterial:"+r.uuid;let _=this.cache.get(g);_||(_=new Ab,as.prototype.copy.call(_,r),_.color.copy(r.color),_.map=r.map,_.sizeAttenuation=!1,this.cache.add(g,_)),r=_}else if(e.isLine){const g="LineBasicMaterial:"+r.uuid;let _=this.cache.get(g);_||(_=new Va,as.prototype.copy.call(_,r),_.color.copy(r.color),_.map=r.map,this.cache.add(g,_)),r=_}if(s||l||u){let g="ClonedMaterial:"+r.uuid+":";s&&(g+="derivative-tangents:"),l&&(g+="vertex-colors:"),u&&(g+="flat-shading:");let _=this.cache.get(g);_||(_=r.clone(),l&&(_.vertexColors=!0),u&&(_.flatShading=!0),s&&(_.normalScale&&(_.normalScale.y*=-1),_.clearcoatNormalScale&&(_.clearcoatNormalScale.y*=-1)),this.cache.add(g,_),this.associations.set(_,this.associations.get(r))),r=_}e.material=r}getMaterialType(){return Vy}loadMaterial(e){const t=this,s=this.extensions,l=this.json.materials[e];let u;const g={},x=[];if((l.extensions||{})[lr.KHR_MATERIALS_UNLIT]){const C=s[lr.KHR_MATERIALS_UNLIT];u=C.getMaterialType(),x.push(C.extendParams(g,l,t))}else{const C=l.pbrMetallicRoughness||{};if(g.color=new An(1,1,1),g.opacity=1,Array.isArray(C.baseColorFactor)){const P=C.baseColorFactor;g.color.fromArray(P),g.opacity=P[3]}void 0!==C.baseColorTexture&&x.push(t.assignTexture(g,"map",C.baseColorTexture,Ui)),g.metalness=void 0!==C.metallicFactor?C.metallicFactor:1,g.roughness=void 0!==C.roughnessFactor?C.roughnessFactor:1,void 0!==C.metallicRoughnessTexture&&(x.push(t.assignTexture(g,"metalnessMap",C.metallicRoughnessTexture)),x.push(t.assignTexture(g,"roughnessMap",C.metallicRoughnessTexture))),u=this._invokeOne(function(P){return P.getMaterialType&&P.getMaterialType(e)}),x.push(Promise.all(this._invokeAll(function(P){return P.extendMaterialParams&&P.extendMaterialParams(e,g)})))}!0===l.doubleSided&&(g.side=2);const M=l.alphaMode||"OPAQUE";if("BLEND"===M?(g.transparent=!0,g.depthWrite=!1):(g.transparent=!1,"MASK"===M&&(g.alphaTest=void 0!==l.alphaCutoff?l.alphaCutoff:.5)),void 0!==l.normalTexture&&u!==vs&&(x.push(t.assignTexture(g,"normalMap",l.normalTexture)),g.normalScale=new Rt(1,1),void 0!==l.normalTexture.scale)){const C=l.normalTexture.scale;g.normalScale.set(C,C)}return void 0!==l.occlusionTexture&&u!==vs&&(x.push(t.assignTexture(g,"aoMap",l.occlusionTexture)),void 0!==l.occlusionTexture.strength&&(g.aoMapIntensity=l.occlusionTexture.strength)),void 0!==l.emissiveFactor&&u!==vs&&(g.emissive=(new An).fromArray(l.emissiveFactor)),void 0!==l.emissiveTexture&&u!==vs&&x.push(t.assignTexture(g,"emissiveMap",l.emissiveTexture,Ui)),Promise.all(x).then(function(){const C=new u(g);return l.name&&(C.name=l.name),gf(C,l),t.associations.set(C,{materials:e}),l.extensions&&lA(s,C,l),C})}createUniqueName(e){const t=Ur.sanitizeNodeName(e||"");let r=t;for(let s=1;this.nodeNamesUsed[r];++s)r=t+"_"+s;return this.nodeNamesUsed[r]=!0,r}loadGeometries(e){const t=this,r=this.extensions,s=this.primitiveCache;function l(g){return r[lr.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(g,t).then(function(_){return mT(_,g,t)})}const u=[];for(let g=0,_=e.length;g<_;g++){const x=e[g],M=J2(x),C=s[M];if(C)u.push(C.promise);else{let P;P=x.extensions&&x.extensions[lr.KHR_DRACO_MESH_COMPRESSION]?l(x):mT(new Ii,x,t),s[M]={primitive:x,promise:P},u.push(P)}}return Promise.all(u)}loadMesh(e){const t=this,s=this.extensions,l=this.json.meshes[e],u=l.primitives,g=[];for(let _=0,x=u.length;_<x;_++){const M=void 0===u[_].material?K2(this.cache):this.getDependency("material",u[_].material);g.push(M)}return g.push(t.loadGeometries(u)),Promise.all(g).then(function(_){const x=_.slice(0,_.length-1),M=_[_.length-1],C=[];for(let R=0,F=M.length;R<F;R++){const O=M[R],k=u[R];let L;const V=x[R];if(k.mode===Cl.TRIANGLES||k.mode===Cl.TRIANGLE_STRIP||k.mode===Cl.TRIANGLE_FAN||void 0===k.mode)L=!0===l.isSkinnedMesh?new cw(O,V):new pn(O,V),!0===L.isSkinnedMesh&&L.normalizeSkinWeights(),k.mode===Cl.TRIANGLE_STRIP?L.geometry=lT(L.geometry,1):k.mode===Cl.TRIANGLE_FAN&&(L.geometry=lT(L.geometry,2));else if(k.mode===Cl.LINES)L=new Vc(O,V);else if(k.mode===Cl.LINE_STRIP)L=new Ha(O,V);else if(k.mode===Cl.LINE_LOOP)L=new vw(O,V);else{if(k.mode!==Cl.POINTS)throw new Error("THREE.GLTFLoader: Primitive mode unsupported: "+k.mode);L=new xw(O,V)}Object.keys(L.geometry.morphAttributes).length>0&&j2(L,l),L.name=t.createUniqueName(l.name||"mesh_"+e),gf(L,l),k.extensions&&lA(s,L,k),t.assignFinalMaterial(L),C.push(L)}for(let R=0,F=C.length;R<F;R++)t.associations.set(C[R],{meshes:e,primitives:R});if(1===C.length)return C[0];const P=new Ga;t.associations.set(P,{meshes:e});for(let R=0,F=C.length;R<F;R++)P.add(C[R]);return P})}loadCamera(e){let t;const r=this.json.cameras[e],s=r[r.type];if(s)return"perspective"===r.type?t=new Wr(Jr_radToDeg(s.yfov),s.aspectRatio||1,s.znear||1,s.zfar||2e6):"orthographic"===r.type&&(t=new Md(-s.xmag,s.xmag,s.ymag,-s.ymag,s.znear,s.zfar)),r.name&&(t.name=this.createUniqueName(r.name)),gf(t,r),Promise.resolve(t);console.warn("THREE.GLTFLoader: Missing camera parameters.")}loadSkin(e){const t=this.json.skins[e],r=[];for(let s=0,l=t.joints.length;s<l;s++)r.push(this._loadNodeShallow(t.joints[s]));return r.push(void 0!==t.inverseBindMatrices?this.getDependency("accessor",t.inverseBindMatrices):null),Promise.all(r).then(function(s){const l=s.pop(),u=s,g=[],_=[];for(let x=0,M=u.length;x<M;x++){const C=u[x];if(C){g.push(C);const P=new ui;null!==l&&P.fromArray(l.array,16*x),_.push(P)}else console.warn('THREE.GLTFLoader: Joint "%s" could not be found.',t.joints[x])}return new _y(g,_)})}loadAnimation(e){const r=this.json.animations[e],s=r.name?r.name:"animation_"+e,l=[],u=[],g=[],_=[],x=[];for(let M=0,C=r.channels.length;M<C;M++){const P=r.channels[M],R=r.samplers[P.sampler],F=P.target,k=void 0!==r.parameters?r.parameters[R.input]:R.input,L=void 0!==r.parameters?r.parameters[R.output]:R.output;void 0!==F.node&&(l.push(this.getDependency("node",F.node)),u.push(this.getDependency("accessor",k)),g.push(this.getDependency("accessor",L)),_.push(R),x.push(F))}return Promise.all([Promise.all(l),Promise.all(u),Promise.all(g),Promise.all(_),Promise.all(x)]).then(function(M){const C=M[0],P=M[1],R=M[2],F=M[3],O=M[4],k=[];for(let L=0,V=C.length;L<V;L++){const z=C[L],W=P[L],ne=R[L],fe=F[L],ge=O[L];if(void 0===z)continue;let de;switch(z.updateMatrix(),mf[ge.path]){case mf.weights:de=W0;break;case mf.rotation:de=Rd;break;default:de=X0}const ie=z.name?z.name:z.uuid,ye=void 0!==fe.interpolation?$2[fe.interpolation]:Du,He=[];mf[ge.path]===mf.weights?z.traverse(function(Ge){Ge.morphTargetInfluences&&He.push(Ge.name?Ge.name:Ge.uuid)}):He.push(ie);let qe=ne.array;if(ne.normalized){const Ge=pS(qe.constructor),Ve=new Float32Array(qe.length);for(let We=0,nt=qe.length;We<nt;We++)Ve[We]=qe[We]*Ge;qe=Ve}for(let Ge=0,Ve=He.length;Ge<Ve;Ge++){const We=new de(He[Ge]+"."+mf[ge.path],W.array,qe,ye);"CUBICSPLINE"===fe.interpolation&&(We.createInterpolant=function(et){return new(this instanceof Rd?Y2:uT)(this.times,this.values,this.getValueSize()/3,et)},We.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline=!0),k.push(We)}}return new Bd(s,void 0,k)})}createNodeMesh(e){const r=this,s=this.json.nodes[e];return void 0===s.mesh?null:r.getDependency("mesh",s.mesh).then(function(l){const u=r._getNodeRef(r.meshCache,s.mesh,l);return void 0!==s.weights&&u.traverse(function(g){if(g.isMesh)for(let _=0,x=s.weights.length;_<x;_++)g.morphTargetInfluences[_]=s.weights[_]}),u})}loadNode(e){const r=this,s=this.json.nodes[e],l=r._loadNodeShallow(e),u=[],g=s.children||[];for(let x=0,M=g.length;x<M;x++)u.push(r.getDependency("node",g[x]));const _=void 0===s.skin?Promise.resolve(null):r.getDependency("skin",s.skin);return Promise.all([l,Promise.all(u),_]).then(function(x){const M=x[0],C=x[1],P=x[2];null!==P&&M.traverse(function(R){R.isSkinnedMesh&&R.bind(P,tR)});for(let R=0,F=C.length;R<F;R++)M.add(C[R]);return M})}_loadNodeShallow(e){const r=this.extensions,s=this;if(void 0!==this.nodeCache[e])return this.nodeCache[e];const l=this.json.nodes[e],u=l.name?s.createUniqueName(l.name):"",g=[],_=s._invokeOne(function(x){return x.createNodeMesh&&x.createNodeMesh(e)});return _&&g.push(_),void 0!==l.camera&&g.push(s.getDependency("camera",l.camera).then(function(x){return s._getNodeRef(s.cameraCache,l.camera,x)})),s._invokeAll(function(x){return x.createNodeAttachment&&x.createNodeAttachment(e)}).forEach(function(x){g.push(x)}),this.nodeCache[e]=Promise.all(g).then(function(x){let M;if(M=!0===l.isBone?new mb:x.length>1?new Ga:1===x.length?x[0]:new or,M!==x[0])for(let C=0,P=x.length;C<P;C++)M.add(x[C]);if(l.name&&(M.userData.name=l.name,M.name=u),gf(M,l),l.extensions&&lA(r,M,l),void 0!==l.matrix){const C=new ui;C.fromArray(l.matrix),M.applyMatrix4(C)}else void 0!==l.translation&&M.position.fromArray(l.translation),void 0!==l.rotation&&M.quaternion.fromArray(l.rotation),void 0!==l.scale&&M.scale.fromArray(l.scale);return s.associations.has(M)||s.associations.set(M,{}),s.associations.get(M).nodes=e,M}),this.nodeCache[e]}loadScene(e){const t=this.extensions,r=this.json.scenes[e],s=this,l=new Ga;r.name&&(l.name=s.createUniqueName(r.name)),gf(l,r),r.extensions&&lA(t,l,r);const u=r.nodes||[],g=[];for(let _=0,x=u.length;_<x;_++)g.push(s.getDependency("node",u[_]));return Promise.all(g).then(function(_){for(let M=0,C=_.length;M<C;M++)l.add(_[M]);return s.associations=(M=>{const C=new Map;for(const[P,R]of s.associations)(P instanceof as||P instanceof ws)&&C.set(P,R);return M.traverse(P=>{const R=s.associations.get(P);null!=R&&C.set(P,R)}),C})(l),l})}}function mT(f,e,t){const r=e.attributes,s=[];function l(u,g){return t.getDependency("accessor",u).then(function(_){f.setAttribute(g,_)})}for(const u in r){const g=fS[u]||u.toLowerCase();g in f.attributes||s.push(l(r[u],g))}if(void 0!==e.indices&&!f.index){const u=t.getDependency("accessor",e.indices).then(function(g){f.setIndex(g)});s.push(u)}return gf(f,e),function iR(f,e,t){const r=e.attributes,s=new xo;if(void 0===r.POSITION)return;{const g=t.json.accessors[r.POSITION],_=g.min,x=g.max;if(void 0===_||void 0===x)return void console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.");if(s.set(new Me(_[0],_[1],_[2]),new Me(x[0],x[1],x[2])),g.normalized){const M=pS(Bm[g.componentType]);s.min.multiplyScalar(M),s.max.multiplyScalar(M)}}const l=e.targets;if(void 0!==l){const g=new Me,_=new Me;for(let x=0,M=l.length;x<M;x++){const C=l[x];if(void 0!==C.POSITION){const P=t.json.accessors[C.POSITION],R=P.min,F=P.max;if(void 0!==R&&void 0!==F){if(_.setX(Math.max(Math.abs(R[0]),Math.abs(F[0]))),_.setY(Math.max(Math.abs(R[1]),Math.abs(F[1]))),_.setZ(Math.max(Math.abs(R[2]),Math.abs(F[2]))),P.normalized){const O=pS(Bm[P.componentType]);_.multiplyScalar(O)}g.max(_)}else console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.")}}s.expandByVector(g)}f.boundingBox=s;const u=new gl;s.getCenter(u.center),u.radius=s.min.distanceTo(s.max)/2,f.boundingSphere=u}(f,e,t),Promise.all(s).then(function(){return void 0!==e.targets?function Z2(f,e,t){let r=!1,s=!1,l=!1;for(let x=0,M=e.length;x<M;x++){const C=e[x];if(void 0!==C.POSITION&&(r=!0),void 0!==C.NORMAL&&(s=!0),void 0!==C.COLOR_0&&(l=!0),r&&s&&l)break}if(!r&&!s&&!l)return Promise.resolve(f);const u=[],g=[],_=[];for(let x=0,M=e.length;x<M;x++){const C=e[x];if(r){const P=void 0!==C.POSITION?t.getDependency("accessor",C.POSITION):f.attributes.position;u.push(P)}if(s){const P=void 0!==C.NORMAL?t.getDependency("accessor",C.NORMAL):f.attributes.normal;g.push(P)}if(l){const P=void 0!==C.COLOR_0?t.getDependency("accessor",C.COLOR_0):f.attributes.color;_.push(P)}}return Promise.all([Promise.all(u),Promise.all(g),Promise.all(_)]).then(function(x){const C=x[1],P=x[2];return r&&(f.morphAttributes.position=x[0]),s&&(f.morphAttributes.normal=C),l&&(f.morphAttributes.color=P),f.morphTargetsRelative=!0,f})}(f,e.targets,t):f})}class rR{constructor(e=4){this.pool=e,this.queue=[],this.workers=[],this.workersResolve=[],this.workerStatus=0}_initWorker(e){if(!this.workers[e]){const t=this.workerCreator();t.addEventListener("message",this._onMessage.bind(this,e)),this.workers[e]=t}}_getIdleWorker(){for(let e=0;e<this.pool;e++)if(!(this.workerStatus&1<<e))return e;return-1}_onMessage(e,t){const r=this.workersResolve[e];if(r&&r(t),this.queue.length){const{resolve:s,msg:l,transfer:u}=this.queue.shift();this.workersResolve[e]=s,this.workers[e].postMessage(l,u)}else this.workerStatus^=1<<e}setWorkerCreator(e){this.workerCreator=e}setWorkerLimit(e){this.pool=e}postMessage(e,t){return new Promise(r=>{const s=this._getIdleWorker();-1!==s?(this._initWorker(s),this.workerStatus|=1<<s,this.workersResolve[s]=r,this.workers[s].postMessage(e,t)):this.queue.push({resolve:r,msg:e,transfer:t})})}
83dispose(){this.workers.forEach(e=>e.terminate()),this.workersResolve.length=0,this.workers.length=0,this.queue.length=0,this.workerStatus=0}}var gT=v(163).Buffer;const AT=9,mS=15,_T=16,gS=22,vT=37,AS=43,yT=76,xT=83,ET=97,bT=100,ST=103,MT=109;class hR{constructor(){this.vkFormat=0,this.typeSize=1,this.pixelWidth=0,this.pixelHeight=0,this.pixelDepth=0,this.layerCount=0,this.faceCount=1,this.supercompressionScheme=0,this.levels=[],this.dataFormatDescriptor=[{vendorId:0,descriptorType:0,descriptorBlockSize:0,versionNumber:2,colorModel:0,colorPrimaries:1,transferFunction:2,flags:0,texelBlockDimension:[0,0,0,0],bytesPlane:[0,0,0,0,0,0,0,0],samples:[]}],this.keyValue={},this.globalData=null}}class cA{constructor(e,t,r,s){this._dataView=new DataView(e.buffer,e.byteOffset+t,r),this._littleEndian=s,this._offset=0}_nextUint8(){const e=this._dataView.getUint8(this._offset);return this._offset+=1,e}_nextUint16(){const e=this._dataView.getUint16(this._offset,this._littleEndian);return this._offset+=2,e}_nextUint32(){const e=this._dataView.getUint32(this._offset,this._littleEndian);return this._offset+=4,e}_nextUint64(){const e=this._dataView.getUint32(this._offset,this._littleEndian)+4294967296*this._dataView.getUint32(this._offset+4,this._littleEndian);return this._offset+=8,e}_nextInt32(){const e=this._dataView.getInt32(this._offset,this._littleEndian);return this._offset+=4,e}_skip(e){return this._offset+=e,this}_scan(e,t=0){const r=this._offset;let s=0;for(;this._dataView.getUint8(this._offset)!==t&&s<e;)s++,this._offset++;return s<e&&this._offset++,new Uint8Array(this._dataView.buffer,this._dataView.byteOffset+r,s)}}new Uint8Array([0]);const Ca=[171,75,84,88,32,50,48,187,13,10,26,10];function TT(f){return typeof TextDecoder<"u"?(new TextDecoder).decode(f):gT.from(f).toString("utf8")}var dR=v(163).Buffer;let vS,Kh,yS;const xS={env:{emscripten_notify_memory_growth:function(f){yS=new Uint8Array(Kh.exports.memory.buffer)}}};class pR{init(){return vS||(vS=typeof fetch<"u"?fetch("data:application/wasm;base64,"+IT).then(e=>e.arrayBuffer()).then(e=>WebAssembly.instantiate(e,xS)).then(this._init):WebAssembly.instantiate(dR.from(IT,"base64"),xS).then(this._init),vS)}_init(e){Kh=e.instance,xS.env.emscripten_notify_memory_growth(0)}decode(e,t=0){if(!Kh)throw new Error("ZSTDDecoder: Await .init() before decoding.");const r=e.byteLength,s=Kh.exports.malloc(r);yS.set(e,s),t=t||Number(Kh.exports.ZSTD_findDecompressedSize(s,r));const l=Kh.exports.malloc(t),u=Kh.exports.ZSTD_decompress(l,t,s,r),g=yS.slice(l,l+u);return Kh.exports.free(s),Kh.exports.free(l),g}}const IT="
vendor: 19,971 bytes, line 83
83AGFzbQEAAAABpQEVYAF/AX9gAn9/AGADf39/AX9gBX9/f39/AX9gAX8AYAJ/fwF/YAR/f39/AX9gA39/fwBgBn9/f39/fwF/YAd/f39/f39/AX9gAn9/AX5gAn5+AX5gAABgBX9/f39/AGAGf39/f39/AGAIf39/f39/f38AYAl/f39/f39/f38AYAABf2AIf39/f39/f38Bf2ANf39/f39/f39/f39/fwF/YAF/AX4CJwEDZW52H2Vtc2NyaXB0ZW5fbm90aWZ5X21lbW9yeV9ncm93dGgABANpaAEFAAAFAgEFCwACAQABAgIFBQcAAwABDgsBAQcAEhMHAAUBDAQEAAANBwQCAgYCBAgDAwMDBgEACQkHBgICAAYGAgQUBwYGAwIGAAMCAQgBBwUGCgoEEQAEBAEIAwgDBQgDEA8IAAcABAUBcAECAgUEAQCAAgYJAX8BQaCgwAILB2AHBm1lbW9yeQIABm1hbGxvYwAoBGZyZWUAJgxaU1REX2lzRXJyb3IAaBlaU1REX2ZpbmREZWNvbXByZXNzZWRTaXplAFQPWlNURF9kZWNvbXByZXNzAEoGX3N0YXJ0ACQJBwEAQQELASQKussBaA8AIAAgACgCBCABajYCBAsZACAAKAIAIAAoAgRBH3F0QQAgAWtBH3F2CwgAIABBiH9LC34BBH9BAyEBIAAoAgQiA0EgTQRAIAAoAggiASAAKAIQTwRAIAAQDQ8LIAAoAgwiAiABRgRAQQFBAiADQSBJGw8LIAAgASABIAJrIANBA3YiBCABIARrIAJJIgEbIgJrIgQ2AgggACADIAJBA3RrNgIEIAAgBCgAADYCAAsgAQsUAQF/IAAgARACIQIgACABEAEgAgv3AQECfyACRQRAIABCADcCACAAQQA2AhAgAEIANwIIQbh/DwsgACABNgIMIAAgAUEEajYCECACQQRPBEAgACABIAJqIgFBfGoiAzYCCCAAIAMoAAA2AgAgAUF/ai0AACIBBEAgAEEIIAEQFGs2AgQgAg8LIABBADYCBEF/DwsgACABNgIIIAAgAS0AACIDNgIAIAJBfmoiBEEBTQRAIARBAWtFBEAgACABLQACQRB0IANyIgM2AgALIAAgAS0AAUEIdCADajYCAAsgASACakF/ai0AACIBRQRAIABBADYCBEFsDwsgAEEoIAEQFCACQQN0ams2AgQgAgsWACAAIAEpAAA3AAAgACABKQAINwAICy8BAX8gAUECdEGgHWooAgAgACgCAEEgIAEgACgCBGprQR9xdnEhAiAAIAEQASACCyEAIAFCz9bTvtLHq9lCfiAAfEIfiUKHla+vmLbem55/fgsdAQF/IAAoAgggACgCDEYEfyAAKAIEQSBGBUEACwuCBAEDfyACQYDAAE8EQCAAIAEgAhBnIAAPCyAAIAJqIQMCQCAAIAFzQQNxRQRAAkAgAkEBSARAIAAhAgwBCyAAQQNxRQRAIAAhAgwBCyAAIQIDQCACIAEtAAA6AAAgAUEBaiEBIAJBAWoiAiADTw0BIAJBA3ENAAsLAkAgA0F8cSIEQcAASQ0AIAIgBEFAaiIFSw0AA0AgAiABKAIANgIAIAIgASgCBDYCBCACIAEoAgg2AgggAiABKAIMNgIMIAIgASgCEDYCECACIAEoAhQ2AhQgAiABKAIYNgIYIAIgASgCHDYCHCACIAEoAiA2AiAgAiABKAIkNgIkIAIgASgCKDYCKCACIAEoAiw2AiwgAiABKAIwNgIwIAIgASgCNDYCNCACIAEoAjg2AjggAiABKAI8NgI8IAFBQGshASACQUBrIgIgBU0NAAsLIAIgBE8NAQNAIAIgASgCADYCACABQQRqIQEgAkEEaiICIARJDQALDAELIANBBEkEQCAAIQIMAQsgA0F8aiIEIABJBEAgACECDAELIAAhAgNAIAIgAS0AADoAACACIAEtAAE6AAEgAiABLQACOgACIAIgAS0AAzoAAyABQQRqIQEgAkEEaiICIARNDQALCyACIANJBEADQCACIAEtAAA6AAAgAUEBaiEBIAJBAWoiAiADRw0ACwsgAAsMACAAIAEpAAA3AAALQQECfyAAKAIIIgEgACgCEEkEQEEDDwsgACAAKAIEIgJBB3E2AgQgACABIAJBA3ZrIgE2AgggACABKAAANgIAQQALDAAgACABKAIANgAAC/cCAQJ/AkAgACABRg0AAkAgASACaiAASwRAIAAgAmoiBCABSw0BCyAAIAEgAhALDwsgACABc0EDcSEDAkACQCAAIAFJBEAgAwRAIAAhAwwDCyAAQQNxRQRAIAAhAwwCCyAAIQMDQCACRQ0EIAMgAS0AADoAACABQQFqIQEgAkF/aiECIANBAWoiA0EDcQ0ACwwBCwJAIAMNACAEQQNxBEADQCACRQ0FIAAgAkF/aiICaiIDIAEgAmotAAA6AAAgA0EDcQ0ACwsgAkEDTQ0AA0AgACACQXxqIgJqIAEgAmooAgA2AgAgAkEDSw0ACwsgAkUNAgNAIAAgAkF/aiICaiABIAJqLQAAOgAAIAINAAsMAgsgAkEDTQ0AIAIhBANAIAMgASgCADYCACABQQRqIQEgA0EEaiEDIARBfGoiBEEDSw0ACyACQQNxIQILIAJFDQADQCADIAEtAAA6AAAgA0EBaiEDIAFBAWohASACQX9qIgINAAsLIAAL8wICAn8BfgJAIAJFDQAgACACaiIDQX9qIAE6AAAgACABOgAAIAJBA0kNACADQX5qIAE6AAAgACABOgABIANBfWogAToAACAAIAE6AAIgAkEHSQ0AIANBfGogAToAACAAIAE6AAMgAkEJSQ0AIABBACAAa0EDcSIEaiIDIAFB/wFxQYGChAhsIgE2AgAgAyACIARrQXxxIgRqIgJBfGogATYCACAEQQlJDQAgAyABNgIIIAMgATYCBCACQXhqIAE2AgAgAkF0aiABNgIAIARBGUkNACADIAE2AhggAyABNgIUIAMgATYCECADIAE2AgwgAkFwaiABNgIAIAJBbGogATYCACACQWhqIAE2AgAgAkFkaiABNgIAIAQgA0EEcUEYciIEayICQSBJDQAgAa0iBUIghiAFhCEFIAMgBGohAQNAIAEgBTcDGCABIAU3AxAgASAFNwMIIAEgBTcDACABQSBqIQEgAkFgaiICQR9LDQALCyAACy8BAn8gACgCBCAAKAIAQQJ0aiICLQACIQMgACACLwEAIAEgAi0AAxAIajYCACADCy8BAn8gACgCBCAAKAIAQQJ0aiICLQACIQMgACACLwEAIAEgAi0AAxAFajYCACADCx8AIAAgASACKAIEEAg2AgAgARAEGiAAIAJBCGo2AgQLCAAgAGdBH3MLugUBDX8jAEEQayIKJAACfyAEQQNNBEAgCkEANgIMIApBDGogAyAEEAsaIAAgASACIApBDGpBBBAVIgBBbCAAEAMbIAAgACAESxsMAQsgAEEAIAEoAgBBAXRBAmoQECENQVQgAygAACIGQQ9xIgBBCksNABogAiAAQQVqNgIAIAMgBGoiAkF8aiEMIAJBeWohDiACQXtqIRAgAEEGaiELQQQhBSAGQQR2IQRBICAAdCIAQQFyIQkgASgCACEPQQAhAiADIQYCQANAIAlBAkggAiAPS3JFBEAgAiEHAkAgCARAA0AgBEH//wNxQf//A0YEQCAHQRhqIQcgBiAQSQR/IAZBAmoiBigAACAFdgUgBUEQaiEFIARBEHYLIQQMAQsLA0AgBEEDcSIIQQNGBEAgBUECaiEFIARBAnYhBCAHQQNqIQcMAQsLIAcgCGoiByAPSw0EIAVBAmohBQNAIAIgB0kEQCANIAJBAXRqQQA7AQAgAkEBaiECDAELCyAGIA5LQQAgBiAFQQN1aiIHIAxLG0UEQCAHKAAAIAVBB3EiBXYhBAwCCyAEQQJ2IQQLIAYhBwsCfyALQX9qIAQgAEF/anEiBiAAQQF0QX9qIgggCWsiEUkNABogBCAIcSIEQQAgESAEIABIG2shBiALCyEIIA0gAkEBdGogBkF/aiIEOwEAIAlBASAGayAEIAZBAUgbayEJA0AgCSAASARAIABBAXUhACALQX9qIQsMAQsLAn8gByAOS0EAIAcgBSAIaiIFQQN1aiIGIAxLG0UEQCAFQQdxDAELIAUgDCIGIAdrQQN0awshBSACQQFqIQIgBEUhCCAGKAAAIAVBH3F2IQQMAQsLQWwgCUEBRyAFQSBKcg0BGiABIAJBf2o2AgAgBiAFQQdqQQN1aiADawwBC0FQCyEAIApBEGokACAACwkAQQFBBSAAGwsMACAAIAEoAAA2AAALqgMBCn8jAEHwAGsiCiQAIAJBAWohDiAAQQhqIQtBgIAEIAVBf2p0QRB1IQxBACECQQEhBkEBIAV0IglBf2oiDyEIA0AgAiAORkUEQAJAIAEgAkEBdCINai8BACIHQf//A0YEQCALIAhBA3RqIAI2AgQgCEF/aiEIQQEhBwwBCyAGQQAgDCAHQRB0QRB1ShshBgsgCiANaiAHOwEAIAJBAWohAgwBCwsgACAFNgIEIAAgBjYCACAJQQN2IAlBAXZqQQNqIQxBACEAQQAhBkEAIQIDQCAGIA5GBEADQAJAIAAgCUYNACAKIAsgAEEDdGoiASgCBCIGQQF0aiICIAIvAQAiAkEBajsBACABIAUgAhAUayIIOgADIAEgAiAIQf8BcXQgCWs7AQAgASAEIAZBAnQiAmooAgA6AAIgASACIANqKAIANgIEIABBAWohAAwBCwsFIAEgBkEBdGouAQAhDUEAIQcDQCAHIA1ORQRAIAsgAkEDdGogBjYCBANAIAIgDGogD3EiAiAISw0ACyAHQQFqIQcMAQsLIAZBAWohBgwBCwsgCkHwAGokAAsjAEIAIAEQCSAAhUKHla+vmLbem55/fkLj3MqV/M7y9YV/fAsQACAAQn43AwggACABNgIACyQBAX8gAARAIAEoAgQiAgRAIAEoAgggACACEQEADwsgABAmCwsfACAAIAEgAi8BABAINgIAIAEQBBogACACQQRqNgIEC0oBAX9BoCAoAgAiASAAaiIAQX9MBEBBiCBBMDYCAEF/DwsCQCAAPwBBEHRNDQAgABBmDQBBiCBBMDYCAEF/DwtBoCAgADYCACABC9cBAQh/Qbp/IQoCQCACKAIEIgggAigCACIJaiIOIAEgAGtLDQBBbCEKIAkgBCADKAIAIgtrSw0AIAAgCWoiBCACKAIIIgxrIQ0gACABQWBqIg8gCyAJQQAQKSADIAkgC2o2AgACQAJAIAwgBCAFa00EQCANIQUMAQsgDCAEIAZrSw0CIAcgDSAFayIAaiIBIAhqIAdNBEAgBCABIAgQDxoMAgsgBCABQQAgAGsQDyEBIAIgACAIaiIINgIEIAEgAGshBAsgBCAPIAUgCEEBECkLIA4hCgsgCgubAgEBfyMAQYABayINJAAgDSADNgJ8AkAgAkEDSwRAQX8hCQwBCwJAAkACQAJAIAJBAWsOAwADAgELIAZFBEBBuH8hCQwEC0FsIQkgBS0AACICIANLDQMgACAHIAJBAnQiAmooAgAgAiAIaigCABA7IAEgADYCAEEBIQkMAwsgASAJNgIAQQAhCQwCCyAKRQRAQWwhCQwCC0EAIQkgC0UgDEEZSHINAUEIIAR0QQhqIQBBACECA0AgAiAATw0CIAJBQGshAgwAAAsAC0FsIQkgDSANQfwAaiANQfgAaiAFIAYQFSICEAMNACANKAJ4IgMgBEsNACAAIA0gDSgCfCAHIAggAxAYIAEgADYCACACIQkLIA1BgAFqJAAgCQsLACAAIAEgAhALGgsQACAALwAAIAAtAAJBEHRyCy8AAn9BuH8gAUEISQ0AGkFyIAAoAAQiAEF3Sw0AGkG4fyAAQQhqIgAgACABSxsLCwkAIAAgATsAAAsDAAELigYBBX8gACAAKAIAIgVBfnE2AgBBACAAIAVBAXZqQYQgKAIAIgQgAEYbIQECQAJAIAAoAgQiAkUNACACKAIAIgNBAXENACACQQhqIgUgA0EBdkF4aiIDQQggA0EISxtnQR9zQQJ0QYAfaiIDKAIARgRAIAMgAigCDDYCAAsgAigCCCIDBEAgAyACKAIMNgIECyACKAIMIgMEQCADIAIoAgg2AgALIAIgAigCACAAKAIAQX5xajYCAEGEICEAAkACQCABRQ0AIAEgAjYCBCABKAIAIgNBAXENASADQQF2QXhqIgNBCCADQQhLG2dBH3NBAnRBgB9qIgMoAgAgAUEIakYEQCADIAEoAgw2AgALIAEoAggiAwRAIAMgASgCDDYCBAsgASgCDCIDBEAgAyABKAIINgIAQYQgKAIAIQQLIAIgAigCACABKAIAQX5xajYCACABIARGDQAgASABKAIAQQF2akEEaiEACyAAIAI2AgALIAIoAgBBAXZBeGoiAEEIIABBCEsbZ0Efc0ECdEGAH2oiASgCACEAIAEgBTYCACACIAA2AgwgAkEANgIIIABFDQEgACAFNgIADwsCQCABRQ0AIAEoAgAiAkEBcQ0AIAJBAXZBeGoiAkEIIAJBCEsbZ0Efc0ECdEGAH2oiAigCACABQQhqRgRAIAIgASgCDDYCAAsgASgCCCICBEAgAiABKAIMNgIECyABKAIMIgIEQCACIAEoAgg2AgBBhCAoAgAhBAsgACAAKAIAIAEoAgBBfnFqIgI2AgACQCABIARHBEAgASABKAIAQQF2aiAANgIEIAAoAgAhAgwBC0GEICAANgIACyACQQF2QXhqIgFBCCABQQhLG2dBH3NBAnRBgB9qIgIoAgAhASACIABBCGoiAjYCACAAIAE2AgwgAEEANgIIIAFFDQEgASACNgIADwsgBUEBdkF4aiIBQQggAUEISxtnQR9zQQJ0QYAfaiICKAIAIQEgAiAAQQhqIgI2AgAgACABNgIMIABBADYCCCABRQ0AIAEgAjYCAAsLDgAgAARAIABBeGoQJQsLgAIBA38CQCAAQQ9qQXhxQYQgKAIAKAIAQQF2ayICEB1Bf0YNAAJAQYQgKAIAIgAoAgAiAUEBcQ0AIAFBAXZBeGoiAUEIIAFBCEsbZ0Efc0ECdEGAH2oiASgCACAAQQhqRgRAIAEgACgCDDYCAAsgACgCCCIBBEAgASAAKAIMNgIECyAAKAIMIgFFDQAgASAAKAIINgIAC0EBIQEgACAAKAIAIAJBAXRqIgI2AgAgAkEBcQ0AIAJBAXZBeGoiAkEIIAJBCEsbZ0Efc0ECdEGAH2oiAygCACECIAMgAEEIaiIDNgIAIAAgAjYCDCAAQQA2AgggAkUNACACIAM2AgALIAELtwIBA38CQAJAIABBASAAGyICEDgiAA0AAkACQEGEICgCACIARQ0AIAAoAgAiA0EBcQ0AIAAgA0EBcjYCACADQQF2QXhqIgFBCCABQQhLG2dBH3NBAnRBgB9qIgEoAgAgAEEIakYEQCABIAAoAgw2AgALIAAoAggiAQRAIAEgACgCDDYCBAsgACgCDCIBBEAgASAAKAIINgIACyACECchAkEAIQFBhCAoAgAhACACDQEgACAAKAIAQX5xNgIAQQAPCyACQQ9qQXhxIgMQHSICQX9GDQIgAkEHakF4cSIAIAJHBEAgACACaxAdQX9GDQMLAkBBhCAoAgAiAUUEQEGAICAANgIADAELIAAgATYCBAtBhCAgADYCACAAIANBAXRBAXI2AgAMAQsgAEUNAQsgAEEIaiEBCyABC7kDAQJ/IAAgA2ohBQJAIANBB0wEQANAIAAgBU8NAiAAIAItAAA6AAAgAEEBaiEAIAJBAWohAgwAAAsACyAEQQFGBEACQCAAIAJrIgZBB00EQCAAIAItAAA6AAAgACACLQABOgABIAAgAi0AAjoAAiAAIAItAAM6AAMgAEEEaiACIAZBAnQiBkHAHmooAgBqIgIQFyACIAZB4B5qKAIAayECDAELIAAgAhAMCyACQQhqIQIgAEEIaiEACwJAAkACQAJAIAUgAU0EQCAAIANqIQEgBEEBRyAAIAJrQQ9Kcg0BA0AgACACEAwgAkEIaiECIABBCGoiACABSQ0ACwwFCyAAIAFLBEAgACEBDAQLIARBAUcgACACa0EPSnINASAAIQMgAiEEA0AgAyAEEAwgBEEIaiEEIANBCGoiAyABSQ0ACwwCCwNAIAAgAhAHIAJBEGohAiAAQRBqIgAgAUkNAAsMAwsgACEDIAIhBANAIAMgBBAHIARBEGohBCADQRBqIgMgAUkNAAsLIAIgASAAa2ohAgsDQCABIAVPDQEgASACLQAAOgAAIAFBAWohASACQQFqIQIMAAALAAsLQQECfyAAIAAoArjgASIDNgLE4AEgACgCvOABIQQgACABNgK84AEgACABIAJqNgK44AEgACABIAQgA2tqNgLA4AELpgEBAX8gACAAKALs4QEQFjYCyOABIABCADcD+OABIABCADcDuOABIABBwOABakIANwMAIABBqNAAaiIBQYyAgOAANgIAIABBADYCmOIBIABCADcDiOEBIABCAzcDgOEBIABBrNABakHgEikCADcCACAAQbTQAWpB6BIoAgA2AgAgACABNgIMIAAgAEGYIGo2AgggACAAQaAwajYCBCAAIABBEGo2AgALYQEBf0G4fyEDAkAgAUEDSQ0AIAIgABAhIgFBA3YiADYCCCACIAFBAXE2AgQgAiABQQF2QQNxIgM2AgACQCADQX9qIgFBAksNAAJAIAFBAWsOAgEAAgtBbA8LIAAhAwsgAwsMACAAIAEgAkEAEC4LiAQCA38CfiADEBYhBCAAQQBBKBAQIQAgBCACSwRAIAQPCyABRQRAQX8PCwJAAkAgA0EBRg0AIAEoAAAiBkGo6r5pRg0AQXYhAyAGQXBxQdDUtMIBRw0BQQghAyACQQhJDQEgAEEAQSgQECEAIAEoAAQhASAAQQE2AhQgACABrTcDAEEADwsgASACIAMQLyIDIAJLDQAgACADNgIYQXIhAyABIARqIgVBf2otAAAiAkEIcQ0AIAJBIHEiBkUEQEFwIQMgBS0AACIFQacBSw0BIAVBB3GtQgEgBUEDdkEKaq2GIgdCA4h+IAd8IQggBEEBaiEECyACQQZ2IQMgAkECdiEFAkAgAkEDcUF/aiICQQJLBEBBACECDAELAkACQAJAIAJBAWsOAgECAAsgASAEai0AACECIARBAWohBAwCCyABIARqLwAAIQIgBEECaiEEDAELIAEgBGooAAAhAiAEQQRqIQQLIAVBAXEhBQJ+AkACQAJAIANBf2oiA0ECTQRAIANBAWsOAgIDAQtCfyAGRQ0DGiABIARqMQAADAMLIAEgBGovAACtQoACfAwCCyABIARqKAAArQwBCyABIARqKQAACyEHIAAgBTYCICAAIAI2AhwgACAHNwMAQQAhAyAAQQA2AhQgACAHIAggBhsiBzcDCCAAIAdCgIAIIAdCgIAIVBs+AhALIAMLWwEBf0G4fyEDIAIQFiICIAFNBH8gACACakF/ai0AACIAQQNxQQJ0QaAeaigCACACaiAAQQZ2IgFBAnRBsB5qKAIAaiAAQSBxIgBFaiABRSAAQQV2cWoFQbh/CwsdACAAKAKQ4gEQWiAAQQA2AqDiASAAQgA3A5DiAQu1AwEFfyMAQZACayIKJABBuH8hBgJAIAVFDQAgBCwAACIIQf8BcSEHAkAgCEF/TARAIAdBgn9qQQF2IgggBU8NAkFsIQYgB0GBf2oiBUGAAk8NAiAEQQFqIQdBACEGA0AgBiAFTwRAIAUhBiAIIQcMAwUgACAGaiAHIAZBAXZqIgQtAABBBHY6AAAgACAGQQFyaiAELQAAQQ9xOgAAIAZBAmohBgwBCwAACwALIAcgBU8NASAAIARBAWogByAKEFMiBhADDQELIAYhBEEAIQYgAUEAQTQQECEJQQAhBQNAIAQgBkcEQCAAIAZqIggtAAAiAUELSwRAQWwhBgwDBSAJIAFBAnRqIgEgASgCAEEBajYCACAGQQFqIQZBASAILQAAdEEBdSAFaiEFDAILAAsLQWwhBiAFRQ0AIAUQFEEBaiIBQQxLDQAgAyABNgIAQQFBASABdCAFayIDEBQiAXQgA0cNACAAIARqIAFBAWoiADoAACAJIABBAnRqIgAgACgCAEEBajYCACAJKAIEIgBBAkkgAEEBcXINACACIARBAWo2AgAgB0EBaiEGCyAKQZACaiQAIAYLxhEBDH8jAEHwAGsiBSQAQWwhCwJAIANBCkkNACACLwAAIQogAi8AAiEJIAIvAAQhByAFQQhqIAQQDgJAIAMgByAJIApqakEGaiIMSQ0AIAUtAAohCCAFQdgAaiACQQZqIgIgChAGIgsQAw0BIAVBQGsgAiAKaiICIAkQBiILEAMNASAFQShqIAIgCWoiAiAHEAYiCxADDQEgBUEQaiACIAdqIAMgDGsQBiILEAMNASAAIAFqIg9BfWohECAEQQRqIQZBASELIAAgAUEDakECdiIDaiIMIANqIgIgA2oiDiEDIAIhBCAMIQcDQCALIAMgEElxBEAgACAGIAVB2ABqIAgQAkECdGoiCS8BADsAACAFQdgAaiAJLQACEAEgCS0AAyELIAcgBiAFQUBrIAgQAkECdGoiCS8BADsAACAFQUBrIAktAAIQASAJLQADIQogBCAGIAVBKGogCBACQQJ0aiIJLwEAOwAAIAVBKGogCS0AAhABIAktAAMhCSADIAYgBUEQaiAIEAJBAnRqIg0vAQA7AAAgBUEQaiANLQACEAEgDS0AAyENIAAgC2oiCyAGIAVB2ABqIAgQAkECdGoiAC8BADsAACAFQdgAaiAALQACEAEgAC0AAyEAIAcgCmoiCiAGIAVBQGsgCBACQQJ0aiIHLwEAOwAAIAVBQGsgBy0AAhABIActAAMhByAEIAlqIgkgBiAFQShqIAgQAkECdGoiBC8BADsAACAFQShqIAQtAAIQASAELQADIQQgAyANaiIDIAYgBUEQaiAIEAJBAnRqIg0vAQA7AAAgBUEQaiANLQACEAEgACALaiEAIAcgCmohByAEIAlqIQQgAyANLQADaiEDIAVB2ABqEA0gBUFAaxANciAFQShqEA1yIAVBEGoQDXJFIQsMAQsLIAQgDksgByACS3INAEFsIQsgACAMSw0BIAxBfWohCQNAQQAgACAJSSAFQdgAahAEGwRAIAAgBiAFQdgAaiAIEAJBAnRqIgovAQA7AAAgBUHYAGogCi0AAhABIAAgCi0AA2oiACAGIAVB2ABqIAgQAkECdGoiCi8BADsAACAFQdgAaiAKLQACEAEgACAKLQADaiEADAEFIAxBfmohCgNAIAVB2ABqEAQgACAKS3JFBEAgACAGIAVB2ABqIAgQAkECdGoiCS8BADsAACAFQdgAaiAJLQACEAEgACAJLQADaiEADAELCwNAIAAgCk0EQCAAIAYgBUHYAGogCBACQQJ0aiIJLwEAOwAAIAVB2ABqIAktAAIQASAAIAktAANqIQAMAQsLAkAgACAMTw0AIAAgBiAFQdgAaiAIEAIiAEECdGoiDC0AADoAACAMLQADQQFGBEAgBUHYAGogDC0AAhABDAELIAUoAlxBH0sNACAFQdgAaiAGIABBAnRqLQACEAEgBSgCXEEhSQ0AIAVBIDYCXAsgAkF9aiEMA0BBACAHIAxJIAVBQGsQBBsEQCAHIAYgBUFAayAIEAJBAnRqIgAvAQA7AAAgBUFAayAALQACEAEgByAALQADaiIAIAYgBUFAayAIEAJBAnRqIgcvAQA7AAAgBUFAayAHLQACEAEgACAHLQADaiEHDAEFIAJBfmohDANAIAVBQGsQBCAHIAxLckUEQCAHIAYgBUFAayAIEAJBAnRqIgAvAQA7AAAgBUFAayAALQACEAEgByAALQADaiEHDAELCwNAIAcgDE0EQCAHIAYgBUFAayAIEAJBAnRqIgAvAQA7AAAgBUFAayAALQACEAEgByAALQADaiEHDAELCwJAIAcgAk8NACAHIAYgBUFAayAIEAIiAEECdGoiAi0AADoAACACLQADQQFGBEAgBUFAayACLQACEAEMAQsgBSgCREEfSw0AIAVBQGsgBiAAQQJ0ai0AAhABIAUoAkRBIUkNACAFQSA2AkQLIA5BfWohAgNAQQAgBCACSSAFQShqEAQbBEAgBCAGIAVBKGogCBACQQJ0aiIALwEAOwAAIAVBKGogAC0AAhABIAQgAC0AA2oiACAGIAVBKGogCBACQQJ0aiIELwEAOwAAIAVBKGogBC0AAhABIAAgBC0AA2ohBAwBBSAOQX5qIQIDQCAFQShqEAQgBCACS3JFBEAgBCAGIAVBKGogCBACQQJ0aiIALwEAOwAAIAVBKGogAC0AAhABIAQgAC0AA2ohBAwBCwsDQCAEIAJNBEAgBCAGIAVBKGogCBACQQJ0aiIALwEAOwAAIAVBKGogAC0AAhABIAQgAC0AA2ohBAwBCwsCQCAEIA5PDQAgBCAGIAVBKGogCBACIgBBAnRqIgItAAA6AAAgAi0AA0EBRgRAIAVBKGogAi0AAhABDAELIAUoAixBH0sNACAFQShqIAYgAEECdGotAAIQASAFKAIsQSFJDQAgBUEgNgIsCwNAQQAgAyAQSSAFQRBqEAQbBEAgAyAGIAVBEGogCBACQQJ0aiIALwEAOwAAIAVBEGogAC0AAhABIAMgAC0AA2oiACAGIAVBEGogCBACQQJ0aiICLwEAOwAAIAVBEGogAi0AAhABIAAgAi0AA2ohAwwBBSAPQX5qIQIDQCAFQRBqEAQgAyACS3JFBEAgAyAGIAVBEGogCBACQQJ0aiIALwEAOwAAIAVBEGogAC0AAhABIAMgAC0AA2ohAwwBCwsDQCADIAJNBEAgAyAGIAVBEGogCBACQQJ0aiIALwEAOwAAIAVBEGogAC0AAhABIAMgAC0AA2ohAwwBCwsCQCADIA9PDQAgAyAGIAVBEGogCBACIgBBAnRqIgItAAA6AAAgAi0AA0EBRgRAIAVBEGogAi0AAhABDAELIAUoAhRBH0sNACAFQRBqIAYgAEECdGotAAIQASAFKAIUQSFJDQAgBUEgNgIUCyABQWwgBUHYAGoQCiAFQUBrEApxIAVBKGoQCnEgBUEQahAKcRshCwwJCwAACwALAAALAAsAAAsACwAACwALQWwhCwsgBUHwAGokACALC7UEAQ5/IwBBEGsiBiQAIAZBBGogABAOQVQhBQJAIARB3AtJDQAgBi0ABCEHIANB8ARqQQBB7AAQECEIIAdBDEsNACADQdwJaiIJIAggBkEIaiAGQQxqIAEgAhAxIhAQA0UEQCAGKAIMIgQgB0sNASADQdwFaiEPIANBpAVqIREgAEEEaiESIANBqAVqIQEgBCEFA0AgBSICQX9qIQUgCCACQQJ0aigCAEUNAAsgAkEBaiEOQQEhBQNAIAUgDk9FBEAgCCAFQQJ0IgtqKAIAIQwgASALaiAKNgIAIAVBAWohBSAKIAxqIQoMAQsLIAEgCjYCAEEAIQUgBigCCCELA0AgBSALRkUEQCABIAUgCWotAAAiDEECdGoiDSANKAIAIg1BAWo2AgAgDyANQQF0aiINIAw6AAEgDSAFOgAAIAVBAWohBQwBCwtBACEBIANBADYCqAUgBEF/cyAHaiEJQQEhBQNAIAUgDk9FBEAgCCAFQQJ0IgtqKAIAIQwgAyALaiABNgIAIAwgBSAJanQgAWohASAFQQFqIQUMAQsLIAcgBEEBaiIBIAJrIgRrQQFqIQgDQEEBIQUgBCAIT0UEQANAIAUgDk9FBEAgBUECdCIJIAMgBEE0bGpqIAMgCWooAgAgBHY2AgAgBUEBaiEFDAELCyAEQQFqIQQMAQsLIBIgByAPIAogESADIAIgARBkIAZBAToABSAGIAc6AAYgACAGKAIENgIACyAQIQULIAZBEGokACAFC8ENAQt/IwBB8ABrIgUkAEFsIQkCQCADQQpJDQAgAi8AACEKIAIvAAIhDCACLwAEIQYgBUEIaiAEEA4CQCADIAYgCiAMampBBmoiDUkNACAFLQAKIQcgBUHYAGogAkEGaiICIAoQBiIJEAMNASAFQUBrIAIgCmoiAiAMEAYiCRADDQEgBUEoaiACIAxqIgIgBhAGIgkQAw0BIAVBEGogAiAGaiADIA1rEAYiCRADDQEgACABaiIOQX1qIQ8gBEEEaiEGQQEhCSAAIAFBA2pBAnYiAmoiCiACaiIMIAJqIg0hAyAMIQQgCiECA0AgCSADIA9JcQRAIAYgBUHYAGogBxACQQF0aiIILQAAIQsgBUHYAGogCC0AARABIAAgCzoAACAGIAVBQGsgBxACQQF0aiIILQAAIQsgBUFAayAILQABEAEgAiALOgAAIAYgBUEoaiAHEAJBAXRqIggtAAAhCyAFQShqIAgtAAEQASAEIAs6AAAgBiAFQRBqIAcQAkEBdGoiCC0AACELIAVBEGogCC0AARABIAMgCzoAACAGIAVB2ABqIAcQAkEBdGoiCC0AACELIAVB2ABqIAgtAAEQASAAIAs6AAEgBiAFQUBrIAcQAkEBdGoiCC0AACELIAVBQGsgCC0AARABIAIgCzoAASAGIAVBKGogBxACQQF0aiIILQAAIQsgBUEoaiAILQABEAEgBCALOgABIAYgBUEQaiAHEAJBAXRqIggtAAAhCyAFQRBqIAgtAAEQASADIAs6AAEgA0ECaiEDIARBAmohBCACQQJqIQIgAEECaiEAIAkgBUHYAGoQDUVxIAVBQGsQDUVxIAVBKGoQDUVxIAVBEGoQDUVxIQkMAQsLIAQgDUsgAiAMS3INAEFsIQkgACAKSw0BIApBfWohCQNAIAVB2ABqEAQgACAJT3JFBEAgBiAFQdgAaiAHEAJBAXRqIggtAAAhCyAFQdgAaiAILQABEAEgACALOgAAIAYgBUHYAGogBxACQQF0aiIILQAAIQsgBUHYAGogCC0AARABIAAgCzoAASAAQQJqIQAMAQsLA0AgBUHYAGoQBCAAIApPckUEQCAGIAVB2ABqIAcQAkEBdGoiCS0AACEIIAVB2ABqIAktAAEQASAAIAg6AAAgAEEBaiEADAELCwNAIAAgCkkEQCAGIAVB2ABqIAcQAkEBdGoiCS0AACEIIAVB2ABqIAktAAEQASAAIAg6AAAgAEEBaiEADAELCyAMQX1qIQADQCAFQUBrEAQgAiAAT3JFBEAgBiAFQUBrIAcQAkEBdGoiCi0AACEJIAVBQGsgCi0AARABIAIgCToAACAGIAVBQGsgBxACQQF0aiIKLQAAIQkgBUFAayAKLQABEAEgAiAJOgABIAJBAmohAgwBCwsDQCAFQUBrEAQgAiAMT3JFBEAgBiAFQUBrIAcQAkEBdGoiAC0AACEKIAVBQGsgAC0AARABIAIgCjoAACACQQFqIQIMAQsLA0AgAiAMSQRAIAYgBUFAayAHEAJBAXRqIgAtAAAhCiAFQUBrIAAtAAEQASACIAo6AAAgAkEBaiECDAELCyANQX1qIQADQCAFQShqEAQgBCAAT3JFBEAgBiAFQShqIAcQAkEBdGoiAi0AACEKIAVBKGogAi0AARABIAQgCjoAACAGIAVBKGogBxACQQF0aiICLQAAIQogBUEoaiACLQABEAEgBCAKOgABIARBAmohBAwBCwsDQCAFQShqEAQgBCANT3JFBEAgBiAFQShqIAcQAkEBdGoiAC0AACECIAVBKGogAC0AARABIAQgAjoAACAEQQFqIQQMAQsLA0AgBCANSQRAIAYgBUEoaiAHEAJBAXRqIgAtAAAhAiAFQShqIAAtAAEQASAEIAI6AAAgBEEBaiEEDAELCwNAIAVBEGoQBCADIA9PckUEQCAGIAVBEGogBxACQQF0aiIALQAAIQIgBUEQaiAALQABEAEgAyACOgAAIAYgBUEQaiAHEAJBAXRqIgAtAAAhAiAFQRBqIAAtAAEQASADIAI6AAEgA0ECaiEDDAELCwNAIAVBEGoQBCADIA5PckUEQCAGIAVBEGogBxACQQF0aiIALQAAIQIgBUEQaiAALQABEAEgAyACOgAAIANBAWohAwwBCwsDQCADIA5JBEAgBiAFQRBqIAcQAkEBdGoiAC0AACECIAVBEGogAC0AARABIAMgAjoAACADQQFqIQMMAQsLIAFBbCAFQdgAahAKIAVBQGsQCnEgBUEoahAKcSAFQRBqEApxGyEJDAELQWwhCQsgBUHwAGokACAJC8oCAQR/IwBBIGsiBSQAIAUgBBAOIAUtAAIhByAFQQhqIAIgAxAGIgIQA0UEQCAEQQRqIQIgACABaiIDQX1qIQQDQCAFQQhqEAQgACAET3JFBEAgAiAFQQhqIAcQAkEBdGoiBi0AACEIIAVBCGogBi0AARABIAAgCDoAACACIAVBCGogBxACQQF0aiIGLQAAIQggBUEIaiAGLQABEAEgACAIOgABIABBAmohAAwBCwsDQCAFQQhqEAQgACADT3JFBEAgAiAFQQhqIAcQAkEBdGoiBC0AACEGIAVBCGogBC0AARABIAAgBjoAACAAQQFqIQAMAQsLA0AgACADT0UEQCACIAVBCGogBxACQQF0aiIELQAAIQYgBUEIaiAELQABEAEgACAGOgAAIABBAWohAAwBCwsgAUFsIAVBCGoQChshAgsgBUEgaiQAIAILtgMBCX8jAEEQayIGJAAgBkEANgIMIAZBADYCCEFUIQQCQAJAIANBQGsiDCADIAZBCGogBkEMaiABIAIQMSICEAMNACAGQQRqIAAQDiAGKAIMIgcgBi0ABEEBaksNASAAQQRqIQogBkEAOgAFIAYgBzoABiAAIAYoAgQ2AgAgB0EBaiEJQQEhBANAIAQgCUkEQCADIARBAnRqIgEoAgAhACABIAU2AgAgACAEQX9qdCAFaiEFIARBAWohBAwBCwsgB0EBaiEHQQAhBSAGKAIIIQkDQCAFIAlGDQEgAyAFIAxqLQAAIgRBAnRqIgBBASAEdEEBdSILIAAoAgAiAWoiADYCACAHIARrIQhBACEEAkAgC0EDTQRAA0AgBCALRg0CIAogASAEakEBdGoiACAIOgABIAAgBToAACAEQQFqIQQMAAALAAsDQCABIABPDQEgCiABQQF0aiIEIAg6AAEgBCAFOgAAIAQgCDoAAyAEIAU6AAIgBCAIOgAFIAQgBToABCAEIAg6AAcgBCAFOgAGIAFBBGohAQwAAAsACyAFQQFqIQUMAAALAAsgAiEECyAGQRBqJAAgBAutAQECfwJAQYQgKAIAIABHIAAoAgBBAXYiAyABa0F4aiICQXhxQQhHcgR/IAIFIAMQJ0UNASACQQhqC0EQSQ0AIAAgACgCACICQQFxIAAgAWpBD2pBeHEiASAAa0EBdHI2AgAgASAANgIEIAEgASgCAEEBcSAAIAJBAXZqIAFrIgJBAXRyNgIAQYQgIAEgAkH/////B3FqQQRqQYQgKAIAIABGGyABNgIAIAEQJQsLygIBBX8CQAJAAkAgAEEIIABBCEsbZ0EfcyAAaUEBR2oiAUEESSAAIAF2cg0AIAFBAnRB/B5qKAIAIgJFDQADQCACQXhqIgMoAgBBAXZBeGoiBSAATwRAIAIgBUEIIAVBCEsbZ0Efc0ECdEGAH2oiASgCAEYEQCABIAIoAgQ2AgALDAMLIARBHksNASAEQQFqIQQgAigCBCICDQALC0EAIQMgAUEgTw0BA0AgAUECdEGAH2ooAgAiAkUEQCABQR5LIQIgAUEBaiEBIAJFDQEMAwsLIAIgAkF4aiIDKAIAQQF2QXhqIgFBCCABQQhLG2dBH3NBAnRBgB9qIgEoAgBGBEAgASACKAIENgIACwsgAigCACIBBEAgASACKAIENgIECyACKAIEIgEEQCABIAIoAgA2AgALIAMgAygCAEEBcjYCACADIAAQNwsgAwvhCwINfwV+IwBB8ABrIgckACAHIAAoAvDhASIINgJcIAEgAmohDSAIIAAoAoDiAWohDwJAAkAgBUUEQCABIQQMAQsgACgCxOABIRAgACgCwOABIREgACgCvOABIQ4gAEEBNgKM4QFBACEIA0AgCEEDRwRAIAcgCEECdCICaiAAIAJqQazQAWooAgA2AkQgCEEBaiEIDAELC0FsIQwgB0EYaiADIAQQBhADDQEgB0EsaiAHQRhqIAAoAgAQEyAHQTRqIAdBGGogACgCCBATIAdBPGogB0EYaiAAKAIEEBMgDUFgaiESIAEhBEEAIQwDQCAHKAIwIAcoAixBA3RqKQIAIhRCEIinQf8BcSEIIAcoAkAgBygCPEEDdGopAgAiFUIQiKdB/wFxIQsgBygCOCAHKAI0QQN0aikCACIWQiCIpyEJIBVCIIghFyAUQiCIpyECAkAgFkIQiKdB/wFxIgNBAk8EQAJAIAZFIANBGUlyRQRAIAkgB0EYaiADQSAgBygCHGsiCiAKIANLGyIKEAUgAyAKayIDdGohCSAHQRhqEAQaIANFDQEgB0EYaiADEAUgCWohCQwBCyAHQRhqIAMQBSAJaiEJIAdBGGoQBBoLIAcpAkQhGCAHIAk2AkQgByAYNwNIDAELAkAgA0UEQCACBEAgBygCRCEJDAMLIAcoAkghCQwBCwJAAkAgB0EYakEBEAUgCSACRWpqIgNBA0YEQCAHKAJEQX9qIgMgA0VqIQkMAQsgA0ECdCAHaigCRCIJIAlFaiEJIANBAUYNAQsgByAHKAJINgJMCwsgByAHKAJENgJIIAcgCTYCRAsgF6chAyALBEAgB0EYaiALEAUgA2ohAwsgCCALakEUTwRAIAdBGGoQBBoLIAgEQCAHQRhqIAgQBSACaiECCyAHQRhqEAQaIAcgB0EYaiAUQhiIp0H/AXEQCCAUp0H//wNxajYCLCAHIAdBGGogFUIYiKdB/wFxEAggFadB//8DcWo2AjwgB0EYahAEGiAHIAdBGGogFkIYiKdB/wFxEAggFqdB//8DcWo2AjQgByACNgJgIAcoAlwhCiAHIAk2AmggByADNgJkAkACQAJAIAQgAiADaiILaiASSw0AIAIgCmoiEyAPSw0AIA0gBGsgC0Egak8NAQsgByAHKQNoNwMQIAcgBykDYDcDCCAEIA0gB0EIaiAHQdwAaiAPIA4gESAQEB4hCwwBCyACIARqIQggBCAKEAcgAkERTwRAIARBEGohAgNAIAIgCkEQaiIKEAcgAkEQaiICIAhJDQALCyAIIAlrIQIgByATNgJcIAkgCCAOa0sEQCAJIAggEWtLBEBBbCELDAILIBAgAiAOayICaiIKIANqIBBNBEAgCCAKIAMQDxoMAgsgCCAKQQAgAmsQDyEIIAcgAiADaiIDNgJkIAggAmshCCAOIQILIAlBEE8EQCADIAhqIQMDQCAIIAIQByACQRBqIQIgCEEQaiIIIANJDQALDAELAkAgCUEHTQRAIAggAi0AADoAACAIIAItAAE6AAEgCCACLQACOgACIAggAi0AAzoAAyAIQQRqIAIgCUECdCIDQcAeaigCAGoiAhAXIAIgA0HgHmooAgBrIQIgBygCZCEDDAELIAggAhAMCyADQQlJDQAgAyAIaiEDIAhBCGoiCCACQQhqIgJrQQ9MBEADQCAIIAIQDCACQQhqIQIgCEEIaiIIIANJDQAMAgALAAsDQCAIIAIQByACQRBqIQIgCEEQaiIIIANJDQALCyAHQRhqEAQaIAsgDCALEAMiAhshDCAEIAQgC2ogAhshBCAFQX9qIgUNAAsgDBADDQFBbCEMIAdBGGoQBEECSQ0BQQAhCANAIAhBA0cEQCAAIAhBAnQiAmpBrNABaiACIAdqKAJENgIAIAhBAWo
vendor: 19,007 bytes, line 83
83hCAwBCwsgBygCXCEIC0G6fyEMIA8gCGsiACANIARrSw0AIAQEfyAEIAggABALIABqBUEACyABayEMCyAHQfAAaiQAIAwLkRcCFn8FfiMAQdABayIHJAAgByAAKALw4QEiCDYCvAEgASACaiESIAggACgCgOIBaiETAkACQCAFRQRAIAEhAwwBCyAAKALE4AEhESAAKALA4AEhFSAAKAK84AEhDyAAQQE2AozhAUEAIQgDQCAIQQNHBEAgByAIQQJ0IgJqIAAgAmpBrNABaigCADYCVCAIQQFqIQgMAQsLIAcgETYCZCAHIA82AmAgByABIA9rNgJoQWwhECAHQShqIAMgBBAGEAMNASAFQQQgBUEESBshFyAHQTxqIAdBKGogACgCABATIAdBxABqIAdBKGogACgCCBATIAdBzABqIAdBKGogACgCBBATQQAhBCAHQeAAaiEMIAdB5ABqIQoDQCAHQShqEARBAksgBCAXTnJFBEAgBygCQCAHKAI8QQN0aikCACIdQhCIp0H/AXEhCyAHKAJQIAcoAkxBA3RqKQIAIh5CEIinQf8BcSEJIAcoAkggBygCREEDdGopAgAiH0IgiKchCCAeQiCIISAgHUIgiKchAgJAIB9CEIinQf8BcSIDQQJPBEACQCAGRSADQRlJckUEQCAIIAdBKGogA0EgIAcoAixrIg0gDSADSxsiDRAFIAMgDWsiA3RqIQggB0EoahAEGiADRQ0BIAdBKGogAxAFIAhqIQgMAQsgB0EoaiADEAUgCGohCCAHQShqEAQaCyAHKQJUISEgByAINgJUIAcgITcDWAwBCwJAIANFBEAgAgRAIAcoAlQhCAwDCyAHKAJYIQgMAQsCQAJAIAdBKGpBARAFIAggAkVqaiIDQQNGBEAgBygCVEF/aiIDIANFaiEIDAELIANBAnQgB2ooAlQiCCAIRWohCCADQQFGDQELIAcgBygCWDYCXAsLIAcgBygCVDYCWCAHIAg2AlQLICCnIQMgCQRAIAdBKGogCRAFIANqIQMLIAkgC2pBFE8EQCAHQShqEAQaCyALBEAgB0EoaiALEAUgAmohAgsgB0EoahAEGiAHIAcoAmggAmoiCSADajYCaCAKIAwgCCAJSxsoAgAhDSAHIAdBKGogHUIYiKdB/wFxEAggHadB//8DcWo2AjwgByAHQShqIB5CGIinQf8BcRAIIB6nQf//A3FqNgJMIAdBKGoQBBogB0EoaiAfQhiIp0H/AXEQCCEOIAdB8ABqIARBBHRqIgsgCSANaiAIazYCDCALIAg2AgggCyADNgIEIAsgAjYCACAHIA4gH6dB//8DcWo2AkQgBEEBaiEEDAELCyAEIBdIDQEgEkFgaiEYIAdB4ABqIRogB0HkAGohGyABIQMDQCAHQShqEARBAksgBCAFTnJFBEAgBygCQCAHKAI8QQN0aikCACIdQhCIp0H/AXEhCyAHKAJQIAcoAkxBA3RqKQIAIh5CEIinQf8BcSEIIAcoAkggBygCREEDdGopAgAiH0IgiKchCSAeQiCIISAgHUIgiKchDAJAIB9CEIinQf8BcSICQQJPBEACQCAGRSACQRlJckUEQCAJIAdBKGogAkEgIAcoAixrIgogCiACSxsiChAFIAIgCmsiAnRqIQkgB0EoahAEGiACRQ0BIAdBKGogAhAFIAlqIQkMAQsgB0EoaiACEAUgCWohCSAHQShqEAQaCyAHKQJUISEgByAJNgJUIAcgITcDWAwBCwJAIAJFBEAgDARAIAcoAlQhCQwDCyAHKAJYIQkMAQsCQAJAIAdBKGpBARAFIAkgDEVqaiICQQNGBEAgBygCVEF/aiICIAJFaiEJDAELIAJBAnQgB2ooAlQiCSAJRWohCSACQQFGDQELIAcgBygCWDYCXAsLIAcgBygCVDYCWCAHIAk2AlQLICCnIRQgCARAIAdBKGogCBAFIBRqIRQLIAggC2pBFE8EQCAHQShqEAQaCyALBEAgB0EoaiALEAUgDGohDAsgB0EoahAEGiAHIAcoAmggDGoiGSAUajYCaCAbIBogCSAZSxsoAgAhHCAHIAdBKGogHUIYiKdB/wFxEAggHadB//8DcWo2AjwgByAHQShqIB5CGIinQf8BcRAIIB6nQf//A3FqNgJMIAdBKGoQBBogByAHQShqIB9CGIinQf8BcRAIIB+nQf//A3FqNgJEIAcgB0HwAGogBEEDcUEEdGoiDSkDCCIdNwPIASAHIA0pAwAiHjcDwAECQAJAAkAgBygCvAEiDiAepyICaiIWIBNLDQAgAyAHKALEASIKIAJqIgtqIBhLDQAgEiADayALQSBqTw0BCyAHIAcpA8gBNwMQIAcgBykDwAE3AwggAyASIAdBCGogB0G8AWogEyAPIBUgERAeIQsMAQsgAiADaiEIIAMgDhAHIAJBEU8EQCADQRBqIQIDQCACIA5BEGoiDhAHIAJBEGoiAiAISQ0ACwsgCCAdpyIOayECIAcgFjYCvAEgDiAIIA9rSwRAIA4gCCAVa0sEQEFsIQsMAgsgESACIA9rIgJqIhYgCmogEU0EQCAIIBYgChAPGgwCCyAIIBZBACACaxAPIQggByACIApqIgo2AsQBIAggAmshCCAPIQILIA5BEE8EQCAIIApqIQoDQCAIIAIQByACQRBqIQIgCEEQaiIIIApJDQALDAELAkAgDkEHTQRAIAggAi0AADoAACAIIAItAAE6AAEgCCACLQACOgACIAggAi0AAzoAAyAIQQRqIAIgDkECdCIKQcAeaigCAGoiAhAXIAIgCkHgHmooAgBrIQIgBygCxAEhCgwBCyAIIAIQDAsgCkEJSQ0AIAggCmohCiAIQQhqIgggAkEIaiICa0EPTARAA0AgCCACEAwgAkEIaiECIAhBCGoiCCAKSQ0ADAIACwALA0AgCCACEAcgAkEQaiECIAhBEGoiCCAKSQ0ACwsgCxADBEAgCyEQDAQFIA0gDDYCACANIBkgHGogCWs2AgwgDSAJNgIIIA0gFDYCBCAEQQFqIQQgAyALaiEDDAILAAsLIAQgBUgNASAEIBdrIQtBACEEA0AgCyAFSARAIAcgB0HwAGogC0EDcUEEdGoiAikDCCIdNwPIASAHIAIpAwAiHjcDwAECQAJAAkAgBygCvAEiDCAepyICaiIKIBNLDQAgAyAHKALEASIJIAJqIhBqIBhLDQAgEiADayAQQSBqTw0BCyAHIAcpA8gBNwMgIAcgBykDwAE3AxggAyASIAdBGGogB0G8AWogEyAPIBUgERAeIRAMAQsgAiADaiEIIAMgDBAHIAJBEU8EQCADQRBqIQIDQCACIAxBEGoiDBAHIAJBEGoiAiAISQ0ACwsgCCAdpyIGayECIAcgCjYCvAEgBiAIIA9rSwRAIAYgCCAVa0sEQEFsIRAMAgsgESACIA9rIgJqIgwgCWogEU0EQCAIIAwgCRAPGgwCCyAIIAxBACACaxAPIQggByACIAlqIgk2AsQBIAggAmshCCAPIQILIAZBEE8EQCAIIAlqIQYDQCAIIAIQByACQRBqIQIgCEEQaiIIIAZJDQALDAELAkAgBkEHTQRAIAggAi0AADoAACAIIAItAAE6AAEgCCACLQACOgACIAggAi0AAzoAAyAIQQRqIAIgBkECdCIGQcAeaigCAGoiAhAXIAIgBkHgHmooAgBrIQIgBygCxAEhCQwBCyAIIAIQDAsgCUEJSQ0AIAggCWohBiAIQQhqIgggAkEIaiICa0EPTARAA0AgCCACEAwgAkEIaiECIAhBCGoiCCAGSQ0ADAIACwALA0AgCCACEAcgAkEQaiECIAhBEGoiCCAGSQ0ACwsgEBADDQMgC0EBaiELIAMgEGohAwwBCwsDQCAEQQNHBEAgACAEQQJ0IgJqQazQAWogAiAHaigCVDYCACAEQQFqIQQMAQsLIAcoArwBIQgLQbp/IRAgEyAIayIAIBIgA2tLDQAgAwR/IAMgCCAAEAsgAGoFQQALIAFrIRALIAdB0AFqJAAgEAslACAAQgA3AgAgAEEAOwEIIABBADoACyAAIAE2AgwgACACOgAKC7QFAQN/IwBBMGsiBCQAIABB/wFqIgVBfWohBgJAIAMvAQIEQCAEQRhqIAEgAhAGIgIQAw0BIARBEGogBEEYaiADEBwgBEEIaiAEQRhqIAMQHCAAIQMDQAJAIARBGGoQBCADIAZPckUEQCADIARBEGogBEEYahASOgAAIAMgBEEIaiAEQRhqEBI6AAEgBEEYahAERQ0BIANBAmohAwsgBUF+aiEFAn8DQEG6fyECIAMiASAFSw0FIAEgBEEQaiAEQRhqEBI6AAAgAUEBaiEDIARBGGoQBEEDRgRAQQIhAiAEQQhqDAILIAMgBUsNBSABIARBCGogBEEYahASOgABIAFBAmohA0EDIQIgBEEYahAEQQNHDQALIARBEGoLIQUgAyAFIARBGGoQEjoAACABIAJqIABrIQIMAwsgAyAEQRBqIARBGGoQEjoAAiADIARBCGogBEEYahASOgADIANBBGohAwwAAAsACyAEQRhqIAEgAhAGIgIQAw0AIARBEGogBEEYaiADEBwgBEEIaiAEQRhqIAMQHCAAIQMDQAJAIARBGGoQBCADIAZPckUEQCADIARBEGogBEEYahAROgAAIAMgBEEIaiAEQRhqEBE6AAEgBEEYahAERQ0BIANBAmohAwsgBUF+aiEFAn8DQEG6fyECIAMiASAFSw0EIAEgBEEQaiAEQRhqEBE6AAAgAUEBaiEDIARBGGoQBEEDRgRAQQIhAiAEQQhqDAILIAMgBUsNBCABIARBCGogBEEYahAROgABIAFBAmohA0EDIQIgBEEYahAEQQNHDQALIARBEGoLIQUgAyAFIARBGGoQEToAACABIAJqIABrIQIMAgsgAyAEQRBqIARBGGoQEToAAiADIARBCGogBEEYahAROgADIANBBGohAwwAAAsACyAEQTBqJAAgAgtpAQF/An8CQAJAIAJBB00NACABKAAAQbfIwuF+Rw0AIAAgASgABDYCmOIBQWIgAEEQaiABIAIQPiIDEAMNAhogAEKBgICAEDcDiOEBIAAgASADaiACIANrECoMAQsgACABIAIQKgtBAAsLrQMBBn8jAEGAAWsiAyQAQWIhCAJAIAJBCUkNACAAQZjQAGogAUEIaiIEIAJBeGogAEGY0AAQMyIFEAMiBg0AIANBHzYCfCADIANB/ABqIANB+ABqIAQgBCAFaiAGGyIEIAEgAmoiAiAEaxAVIgUQAw0AIAMoAnwiBkEfSw0AIAMoAngiB0EJTw0AIABBiCBqIAMgBkGAC0GADCAHEBggA0E0NgJ8IAMgA0H8AGogA0H4AGogBCAFaiIEIAIgBGsQFSIFEAMNACADKAJ8IgZBNEsNACADKAJ4IgdBCk8NACAAQZAwaiADIAZBgA1B4A4gBxAYIANBIzYCfCADIANB/ABqIANB+ABqIAQgBWoiBCACIARrEBUiBRADDQAgAygCfCIGQSNLDQAgAygCeCIHQQpPDQAgACADIAZBwBBB0BEgBxAYIAQgBWoiBEEMaiIFIAJLDQAgAiAFayEFQQAhAgNAIAJBA0cEQCAEKAAAIgZBf2ogBU8NAiAAIAJBAnRqQZzQAWogBjYCACACQQFqIQIgBEEEaiEEDAELCyAEIAFrIQgLIANBgAFqJAAgCAtGAQN/IABBCGohAyAAKAIEIQJBACEAA0AgACACdkUEQCABIAMgAEEDdGotAAJBFktqIQEgAEEBaiEADAELCyABQQggAmt0C4YDAQV/Qbh/IQcCQCADRQ0AIAItAAAiBEUEQCABQQA2AgBBAUG4fyADQQFGGw8LAn8gAkEBaiIFIARBGHRBGHUiBkF/Sg0AGiAGQX9GBEAgA0EDSA0CIAUvAABBgP4BaiEEIAJBA2oMAQsgA0ECSA0BIAItAAEgBEEIdHJBgIB+aiEEIAJBAmoLIQUgASAENgIAIAVBAWoiASACIANqIgNLDQBBbCEHIABBEGogACAFLQAAIgVBBnZBI0EJIAEgAyABa0HAEEHQEUHwEiAAKAKM4QEgACgCnOIBIAQQHyIGEAMiCA0AIABBmCBqIABBCGogBUEEdkEDcUEfQQggASABIAZqIAgbIgEgAyABa0GAC0GADEGAFyAAKAKM4QEgACgCnOIBIAQQHyIGEAMiCA0AIABBoDBqIABBBGogBUECdkEDcUE0QQkgASABIAZqIAgbIgEgAyABa0GADUHgDkGQGSAAKAKM4QEgACgCnOIBIAQQHyIAEAMNACAAIAFqIAJrIQcLIAcLrQMBCn8jAEGABGsiCCQAAn9BUiACQf8BSw0AGkFUIANBDEsNABogAkEBaiELIABBBGohCUGAgAQgA0F/anRBEHUhCkEAIQJBASEEQQEgA3QiB0F/aiIMIQUDQCACIAtGRQRAAkAgASACQQF0Ig1qLwEAIgZB//8DRgRAIAkgBUECdGogAjoAAiAFQX9qIQVBASEGDAELIARBACAKIAZBEHRBEHVKGyEECyAIIA1qIAY7AQAgAkEBaiECDAELCyAAIAQ7AQIgACADOwEAIAdBA3YgB0EBdmpBA2ohBkEAIQRBACECA0AgBCALRkUEQCABIARBAXRqLgEAIQpBACEAA0AgACAKTkUEQCAJIAJBAnRqIAQ6AAIDQCACIAZqIAxxIgIgBUsNAAsgAEEBaiEADAELCyAEQQFqIQQMAQsLQX8gAg0AGkEAIQIDfyACIAdGBH9BAAUgCCAJIAJBAnRqIgAtAAJBAXRqIgEgAS8BACIBQQFqOwEAIAAgAyABEBRrIgU6AAMgACABIAVB/wFxdCAHazsBACACQQFqIQIMAQsLCyEFIAhBgARqJAAgBQvjBgEIf0FsIQcCQCACQQNJDQACQAJAAkACQCABLQAAIgNBA3EiCUEBaw4DAwEAAgsgACgCiOEBDQBBYg8LIAJBBUkNAkEDIQYgASgAACEFAn8CQAJAIANBAnZBA3EiCEF+aiIEQQFNBEAgBEEBaw0BDAILIAVBDnZB/wdxIQQgBUEEdkH/B3EhAyAIRQwCCyAFQRJ2IQRBBCEGIAVBBHZB//8AcSEDQQAMAQsgBUEEdkH//w9xIgNBgIAISw0DIAEtAARBCnQgBUEWdnIhBEEFIQZBAAshBSAEIAZqIgogAksNAgJAIANBgQZJDQAgACgCnOIBRQ0AQQAhAgNAIAJBg4ABSw0BIAJBQGshAgwAAAsACwJ/IAlBA0YEQCABIAZqIQEgAEHw4gFqIQIgACgCDCEGIAUEQCACIAMgASAEIAYQXwwCCyACIAMgASAEIAYQXQwBCyAAQbjQAWohAiABIAZqIQEgAEHw4gFqIQYgAEGo0ABqIQggBQRAIAggBiADIAEgBCACEF4MAQsgCCAGIAMgASAEIAIQXAsQAw0CIAAgAzYCgOIBIABBATYCiOEBIAAgAEHw4gFqNgLw4QEgCUECRgRAIAAgAEGo0ABqNgIMCyAAIANqIgBBiOMBakIANwAAIABBgOMBakIANwAAIABB+OIBakIANwAAIABB8OIBakIANwAAIAoPCwJ/AkACQAJAIANBAnZBA3FBf2oiBEECSw0AIARBAWsOAgACAQtBASEEIANBA3YMAgtBAiEEIAEvAABBBHYMAQtBAyEEIAEQIUEEdgsiAyAEaiIFQSBqIAJLBEAgBSACSw0CIABB8OIBaiABIARqIAMQCyEBIAAgAzYCgOIBIAAgATYC8OEBIAEgA2oiAEIANwAYIABCADcAECAAQgA3AAggAEIANwAAIAUPCyAAIAM2AoDiASAAIAEgBGo2AvDhASAFDwsCfwJAAkACQCADQQJ2QQNxQX9qIgRBAksNACAEQQFrDgIAAgELQQEhByADQQN2DAILQQIhByABLwAAQQR2DAELIAJBBEkgARAhIgJBj4CAAUtyDQFBAyEHIAJBBHYLIQIgAEHw4gFqIAEgB2otAAAgAkEgahAQIQEgACACNgKA4gEgACABNgLw4QEgB0EBaiEHCyAHC0sAIABC+erQ0OfJoeThADcDICAAQgA3AxggAELP1tO+0ser2UI3AxAgAELW64Lu6v2J9eAANwMIIABCADcDACAAQShqQQBBKBAQGgviAgICfwV+IABBKGoiASAAKAJIaiECAn4gACkDACIDQiBaBEAgACkDECIEQgeJIAApAwgiBUIBiXwgACkDGCIGQgyJfCAAKQMgIgdCEol8IAUQGSAEEBkgBhAZIAcQGQwBCyAAKQMYQsXP2bLx5brqJ3wLIAN8IQMDQCABQQhqIgAgAk0EQEIAIAEpAAAQCSADhUIbiUKHla+vmLbem55/fkLj3MqV/M7y9YV/fCEDIAAhAQwBCwsCQCABQQRqIgAgAksEQCABIQAMAQsgASgAAK1Ch5Wvr5i23puef34gA4VCF4lCz9bTvtLHq9lCfkL5893xmfaZqxZ8IQMLA0AgACACSQRAIAAxAABCxc/ZsvHluuonfiADhUILiUKHla+vmLbem55/fiEDIABBAWohAAwBCwsgA0IhiCADhULP1tO+0ser2UJ+IgNCHYggA4VC+fPd8Zn2masWfiIDQiCIIAOFC+8CAgJ/BH4gACAAKQMAIAKtfDcDAAJAAkAgACgCSCIDIAJqIgRBH00EQCABRQ0BIAAgA2pBKGogASACECAgACgCSCACaiEEDAELIAEgAmohAgJ/IAMEQCAAQShqIgQgA2ogAUEgIANrECAgACAAKQMIIAQpAAAQCTcDCCAAIAApAxAgACkAMBAJNwMQIAAgACkDGCAAKQA4EAk3AxggACAAKQMgIABBQGspAAAQCTcDICAAKAJIIQMgAEEANgJIIAEgA2tBIGohAQsgAUEgaiACTQsEQCACQWBqIQMgACkDICEFIAApAxghBiAAKQMQIQcgACkDCCEIA0AgCCABKQAAEAkhCCAHIAEpAAgQCSEHIAYgASkAEBAJIQYgBSABKQAYEAkhBSABQSBqIgEgA00NAAsgACAFNwMgIAAgBjcDGCAAIAc3AxAgACAINwMICyABIAJPDQEgAEEoaiABIAIgAWsiBBAgCyAAIAQ2AkgLCy8BAX8gAEUEQEG2f0EAIAMbDwtBun8hBCADIAFNBH8gACACIAMQEBogAwVBun8LCy8BAX8gAEUEQEG2f0EAIAMbDwtBun8hBCADIAFNBH8gACACIAMQCxogAwVBun8LC6gCAQZ/IwBBEGsiByQAIABB2OABaikDAEKAgIAQViEIQbh/IQUCQCAEQf//B0sNACAAIAMgBBBCIgUQAyIGDQAgACgCnOIBIQkgACAHQQxqIAMgAyAFaiAGGyIKIARBACAFIAYbayIGEEAiAxADBEAgAyEFDAELIAcoAgwhBCABRQRAQbp/IQUgBEEASg0BCyAGIANrIQUgAyAKaiEDAkAgCQRAIABBADYCnOIBDAELAkACQAJAIARBBUgNACAAQdjgAWopAwBCgICACFgNAAwBCyAAQQA2ApziAQwBCyAAKAIIED8hBiAAQQA2ApziASAGQRRPDQELIAAgASACIAMgBSAEIAgQOSEFDAELIAAgASACIAMgBSAEIAgQOiEFCyAHQRBqJAAgBQtnACAAQdDgAWogASACIAAoAuzhARAuIgEQAwRAIAEPC0G4fyECAkAgAQ0AIABB7OABaigCACIBBEBBYCECIAAoApjiASABRw0BC0EAIQIgAEHw4AFqKAIARQ0AIABBkOEBahBDCyACCycBAX8QVyIERQRAQUAPCyAEIAAgASACIAMgBBBLEE8hACAEEFYgAAs/AQF/AkACQAJAIAAoAqDiAUEBaiIBQQJLDQAgAUEBaw4CAAECCyAAEDBBAA8LIABBADYCoOIBCyAAKAKU4gELvAMCB38BfiMAQRBrIgkkAEG4fyEGAkAgBCgCACIIQQVBCSAAKALs4QEiBRtJDQAgAygCACIHQQFBBSAFGyAFEC8iBRADBEAgBSEGDAELIAggBUEDakkNACAAIAcgBRBJIgYQAw0AIAEgAmohCiAAQZDhAWohCyAIIAVrIQIgBSAHaiEHIAEhBQNAIAcgAiAJECwiBhADDQEgAkF9aiICIAZJBEBBuH8hBgwCCyAJKAIAIghBAksEQEFsIQYMAgsgB0EDaiEHAn8CQAJAAkAgCEEBaw4CAgABCyAAIAUgCiAFayAHIAYQSAwCCyAFIAogBWsgByAGEEcMAQsgBSAKIAVrIActAAAgCSgCCBBGCyIIEAMEQCAIIQYMAgsgACgC8OABBEAgCyAFIAgQRQsgAiAGayECIAYgB2ohByAFIAhqIQUgCSgCBEUNAAsgACkD0OABIgxCf1IEQEFsIQYgDCAFIAFrrFINAQsgACgC8OABBEBBaiEGIAJBBEkNASALEEQhDCAHKAAAIAynRw0BIAdBBGohByACQXxqIQILIAMgBzYCACAEIAI2AgAgBSABayEGCyAJQRBqJAAgBgsuACAAECsCf0EAQQAQAw0AGiABRSACRXJFBEBBYiAAIAEgAhA9EAMNARoLQQALCzcAIAEEQCAAIAAoAsTgASABKAIEIAEoAghqRzYCnOIBCyAAECtBABADIAFFckUEQCAAIAEQWwsL0QIBB38jAEEQayIGJAAgBiAENgIIIAYgAzYCDCAFBEAgBSgCBCEKIAUoAgghCQsgASEIAkACQANAIAAoAuzhARAWIQsCQANAIAQgC0kNASADKAAAQXBxQdDUtMIBRgRAIAMgBBAiIgcQAw0EIAQgB2shBCADIAdqIQMMAQsLIAYgAzYCDCAGIAQ2AggCQCAFBEAgACAFEE5BACEHQQAQA0UNAQwFCyAAIAogCRBNIgcQAw0ECyAAIAgQUCAMQQFHQQAgACAIIAIgBkEMaiAGQQhqEEwiByIDa0EAIAMQAxtBCkdyRQRAQbh/IQcMBAsgBxADDQMgAiAHayECIAcgCGohCEEBIQwgBigCDCEDIAYoAgghBAwBCwsgBiADNgIMIAYgBDYCCEG4fyEHIAQNASAIIAFrIQcMAQsgBiADNgIMIAYgBDYCCAsgBkEQaiQAIAcLRgECfyABIAAoArjgASICRwRAIAAgAjYCxOABIAAgATYCuOABIAAoArzgASEDIAAgATYCvOABIAAgASADIAJrajYCwOABCwutAgIEfwF+IwBBQGoiBCQAAkACQCACQQhJDQAgASgAAEFwcUHQ1LTCAUcNACABIAIQIiEBIABCADcDCCAAQQA2AgQgACABNgIADAELIARBGGogASACEC0iAxADBEAgACADEBoMAQsgAwRAIABBuH8QGgwBCyACIAQoAjAiA2shAiABIANqIQMDQAJAIAAgAyACIARBCGoQLCIFEAMEfyAFBSACIAVBA2oiBU8NAUG4fwsQGgwCCyAGQQFqIQYgAiAFayECIAMgBWohAyAEKAIMRQ0ACyAEKAI4BEAgAkEDTQRAIABBuH8QGgwCCyADQQRqIQMLIAQoAighAiAEKQMYIQcgAEEANgIEIAAgAyABazYCACAAIAIgBmytIAcgB0J/URs3AwgLIARBQGskAAslAQF/IwBBEGsiAiQAIAIgACABEFEgAigCACEAIAJBEGokACAAC30BBH8jAEGQBGsiBCQAIARB/wE2AggCQCAEQRBqIARBCGogBEEMaiABIAIQFSIGEAMEQCAGIQUMAQtBVCEFIAQoAgwiB0EGSw0AIAMgBEEQaiAEKAIIIAcQQSIFEAMNACAAIAEgBmogAiAGayADEDwhBQsgBEGQBGokACAFC4cBAgJ/An5BABAWIQMCQANAIAEgA08EQAJAIAAoAABBcHFB0NS0wgFGBEAgACABECIiAhADRQ0BQn4PCyAAIAEQVSIEQn1WDQMgBCAFfCIFIARUIQJCfiEEIAINAyAAIAEQUiICEAMNAwsgASACayEBIAAgAmohAAwBCwtCfiAFIAEbIQQLIAQLPwIBfwF+IwBBMGsiAiQAAn5CfiACQQhqIAAgARAtDQAaQgAgAigCHEEBRg0AGiACKQMICyEDIAJBMGokACADC40BAQJ/IwBBMGsiASQAAkAgAEUNACAAKAKI4gENACABIABB/OEBaigCADYCKCABIAApAvThATcDICAAEDAgACgCqOIBIQIgASABKAIoNgIYIAEgASkDIDcDECACIAFBEGoQGyAAQQA2AqjiASABIAEoAig2AgggASABKQMgNwMAIAAgARAbCyABQTBqJAALKgECfyMAQRBrIgAkACAAQQA2AgggAEIANwMAIAAQWCEBIABBEGokACABC4cBAQN/IwBBEGsiAiQAAkAgACgCAEUgACgCBEVzDQAgAiAAKAIINgIIIAIgACkCADcDAAJ/IAIoAgAiAQRAIAIoAghBqOMJIAERBQAMAQtBqOMJECgLIgFFDQAgASAAKQIANwL04QEgAUH84QFqIAAoAgg2AgAgARBZIAEhAwsgAkEQaiQAIAMLywEBAn8jAEEgayIBJAAgAEGBgIDAADYCtOIBIABBADYCiOIBIABBADYC7OEBIABCADcDkOIBIABBADYCpOMJIABBADYC3OIBIABCADcCzOIBIABBADYCvOIBIABBADYCxOABIABCADcCnOIBIABBpOIBakIANwIAIABBrOIBakEANgIAIAFCADcCECABQgA3AhggASABKQMYNwMIIAEgASkDEDcDACABKAIIQQh2QQFxIQIgAEEANgLg4gEgACACNgKM4gEgAUEgaiQAC3YBA38jAEEwayIBJAAgAARAIAEgAEHE0AFqIgIoAgA2AiggASAAKQK80AE3AyAgACgCACEDIAEgAigCADYCGCABIAApArzQATcDECADIAFBEGoQGyABIAEoAig2AgggASABKQMgNwMAIAAgARAbCyABQTBqJAALzAEBAX8gACABKAK00AE2ApjiASAAIAEoAgQiAjYCwOABIAAgAjYCvOABIAAgAiABKAIIaiICNgK44AEgACACNgLE4AEgASgCuNABBEAgAEKBgICAEDcDiOEBIAAgAUGk0ABqNgIMIAAgAUGUIGo2AgggACABQZwwajYCBCAAIAFBDGo2AgAgAEGs0AFqIAFBqNABaigCADYCACAAQbDQAWogAUGs0AFqKAIANgIAIABBtNABaiABQbDQAWooAgA2AgAPCyAAQgA3A4jhAQs7ACACRQRAQbp/DwsgBEUEQEFsDwsgAiAEEGAEQCAAIAEgAiADIAQgBRBhDwsgACABIAIgAyAEIAUQZQtGAQF/IwBBEGsiBSQAIAVBCGogBBAOAn8gBS0ACQRAIAAgASACIAMgBBAyDAELIAAgASACIAMgBBA0CyEAIAVBEGokACAACzQAIAAgAyAEIAUQNiIFEAMEQCAFDwsgBSAESQR/IAEgAiADIAVqIAQgBWsgABA1BUG4fwsLRgEBfyMAQRBrIgUkACAFQQhqIAQQDgJ/IAUtAAkEQCAAIAEgAiADIAQQYgwBCyAAIAEgAiADIAQQNQshACAFQRBqJAAgAAtZAQF/QQ8hAiABIABJBEAgAUEEdCAAbiECCyAAQQh2IgEgAkEYbCIAQYwIaigCAGwgAEGICGooAgBqIgJBA3YgAmogAEGACGooAgAgAEGECGooAgAgAWxqSQs3ACAAIAMgBCAFQYAQEDMiBRADBEAgBQ8LIAUgBEkEfyABIAIgAyAFaiAEIAVrIAAQMgVBuH8LC78DAQN/IwBBIGsiBSQAIAVBCGogAiADEAYiAhADRQRAIAAgAWoiB0F9aiEGIAUgBBAOIARBBGohAiAFLQACIQMDQEEAIAAgBkkgBUEIahAEGwRAIAAgAiAFQQhqIAMQAkECdGoiBC8BADsAACAFQQhqIAQtAAIQASAAIAQtAANqIgQgAiAFQQhqIAMQAkECdGoiAC8BADsAACAFQQhqIAAtAAIQASAEIAAtAANqIQAMAQUgB0F+aiEEA0AgBUEIahAEIAAgBEtyRQRAIAAgAiAFQQhqIAMQAkECdGoiBi8BADsAACAFQQhqIAYtAAIQASAAIAYtAANqIQAMAQsLA0AgACAES0UEQCAAIAIgBUEIaiADEAJBAnRqIgYvAQA7AAAgBUEIaiAGLQACEAEgACAGLQADaiEADAELCwJAIAAgB08NACAAIAIgBUEIaiADEAIiA0ECdGoiAC0AADoAACAALQADQQFGBEAgBUEIaiAALQACEAEMAQsgBSgCDEEfSw0AIAVBCGogAiADQQJ0ai0AAhABIAUoAgxBIUkNACAFQSA2AgwLIAFBbCAFQQhqEAobIQILCwsgBUEgaiQAIAILkgIBBH8jAEFAaiIJJAAgCSADQTQQCyEDAkAgBEECSA0AIAMgBEECdGooAgAhCSADQTxqIAgQIyADQQE6AD8gAyACOgA+QQAhBCADKAI8IQoDQCAEIAlGDQEgACAEQQJ0aiAKNgEAIARBAWohBAwAAAsAC0EAIQkDQCAGIAlGRQRAIAMgBSAJQQF0aiIKLQABIgtBAnRqIgwoAgAhBCADQTxqIAotAABBCHQgCGpB//8DcRAjIANBAjoAPyADIAcgC2siCiACajoAPiAEQQEgASAKa3RqIQogAygCPCELA0AgACAEQQJ0aiALNgEAIARBAWoiBCAKSQ0ACyAMIAo2AgAgCUEBaiEJDAELCyADQUBrJAALowIBCX8jAEHQAGsiCSQAIAlBEGogBUE0EAsaIAcgBmshDyAHIAFrIRADQAJAIAMgCkcEQEEBIAEgByACIApBAXRqIgYtAAEiDGsiCGsiC3QhDSAGLQAAIQ4gCUEQaiAMQQJ0aiIMKAIAIQYgCyAPTwRAIAAgBkECdGogCyAIIAUgCEE0bGogCCAQaiIIQQEgCEEBShsiCCACIAQgCEECdGooAgAiCEEBdGogAyAIayAHIA4QYyAGIA1qIQgMAgsgCUEMaiAOECMgCUEBOgAPIAkgCDoADiAGIA1qIQggCSgCDCELA0AgBiAITw0CIAAgBkECdGogCzYBACAGQQFqIQYMAAALAAsgCUHQAGokAA8LIAwgCDYCACAKQQFqIQoMAAALAAs0ACAAIAMgBCAFEDYiBRADBEAgBQ8LIAUgBEkEfyABIAIgAyAFaiAEIAVrIAAQNAVBuH8LCyMAIAA/AEEQdGtB//8DakEQdkAAQX9GBEBBAA8LQQAQAEEBCzsBAX8gAgRAA0AgACABIAJBgCAgAkGAIEkbIgMQCyEAIAFBgCBqIQEgAEGAIGohACACIANrIgINAAsLCwYAIAAQAwsLqBUJAEGICAsNAQAAAAEAAAACAAAAAgBBoAgLswYBAAAAAQAAAAIAAAACAAAAJgAAAIIAAAAhBQAASgAAAGcIAAAmAAAAwAEAAIAAAABJBQAASgAAAL4IAAApAAAALAIAAIAAAABJBQAASgAAAL4IAAAvAAAAygIAAIAAAACKBQAASgAAAIQJAAA1AAAAcwMAAIAAAACdBQAASgAAAKAJAAA9AAAAgQMAAIAAAADrBQAASwAAAD4KAABEAAAAngMAAIAAAABNBgAASwAAAKoKAABLAAAAswMAAIAAAADBBgAATQAAAB8NAABNAAAAUwQAAIAAAAAjCAAAUQAAAKYPAABUAAAAmQQAAIAAAABLCQAAVwAAALESAABYAAAA2gQAAIAAAABvCQAAXQAAACMUAABUAAAARQUAAIAAAABUCgAAagAAAIwUAABqAAAArwUAAIAAAAB2CQAAfAAAAE4QAAB8AAAA0gIAAIAAAABjBwAAkQAAAJAHAACSAAAAAAAAAAEAAAABAAAABQAAAA0AAAAdAAAAPQAAAH0AAAD9AAAA/QEAAP0DAAD9BwAA/Q8AAP0fAAD9PwAA/X8AAP3/AAD9/wEA/f8DAP3/BwD9/w8A/f8fAP3/PwD9/38A/f//AP3//wH9//8D/f//B/3//w/9//8f/f//P/3//38AAAAAAQAAAAIAAAADAAAABAAAAAUAAAAGAAAABwAAAAgAAAAJAAAACgAAAAsAAAAMAAAADQAAAA4AAAAPAAAAEAAAABEAAAASAAAAEwAAABQAAAAVAAAAFgAAABcAAAAYAAAAGQAAABoAAAAbAAAAHAAAAB0AAAAeAAAAHwAAAAMAAAAEAAAABQAAAAYAAAAHAAAACAAAAAkAAAAKAAAACwAAAAwAAAANAAAADgAAAA8AAAAQAAAAEQAAABIAAAATAAAAFAAAABUAAAAWAAAAFwAAABgAAAAZAAAAGgAAABsAAAAcAAAAHQAAAB4AAAAfAAAAIAAAACEAAAAiAAAAIwAAACUAAAAnAAAAKQAAACsAAAAvAAAAMwAAADsAAABDAAAAUwAAAGMAAACDAAAAAwEAAAMCAAADBAAAAwgAAAMQAAADIAAAA0AAAAOAAAADAAEAQeAPC1EBAAAAAQAAAAEAAAABAAAAAgAAAAIAAAADAAAAAwAAAAQAAAAEAAAABQAAAAcAAAAIAAAACQAAAAoAAAALAAAADAAAAA0AAAAOAAAADwAAABAAQcQQC4sBAQAAAAIAAAADAAAABAAAAAUAAAAGAAAABwAAAAgAAAAJAAAACgAAAAsAAAAMAAAADQAAAA4AAAAPAAAAEAAAABIAAAAUAAAAFgAAABgAAAAcAAAAIAAAACgAAAAwAAAAQAAAAIAAAAAAAQAAAAIAAAAEAAAACAAAABAAAAAgAAAAQAAAAIAAAAAAAQBBkBIL5gQBAAAAAQAAAAEAAAABAAAAAgAAAAIAAAADAAAAAwAAAAQAAAAGAAAABwAAAAgAAAAJAAAACgAAAAsAAAAMAAAADQAAAA4AAAAPAAAAEAAAAAEAAAAEAAAACAAAAAAAAAABAAEBBgAAAAAAAAQAAAAAEAAABAAAAAAgAAAFAQAAAAAAAAUDAAAAAAAABQQAAAAAAAAFBgAAAAAAAAUHAAAAAAAABQkAAAAAAAAFCgAAAAAAAAUMAAAAAAAABg4AAAAAAAEFEAAAAAAAAQUUAAAAAAABBRYAAAAAAAIFHAAAAAAAAwUgAAAAAAAEBTAAAAAgAAYFQAAAAAAABwWAAAAAAAAIBgABAAAAAAoGAAQAAAAADAYAEAAAIAAABAAAAAAAAAAEAQAAAAAAAAUCAAAAIAAABQQAAAAAAAAFBQAAACAAAAUHAAAAAAAABQgAAAAgAAAFCgAAAAAAAAULAAAAAAAABg0AAAAgAAEFEAAAAAAAAQUSAAAAIAABBRYAAAAAAAIFGAAAACAAAwUgAAAAAAADBSgAAAAAAAYEQAAAABAABgRAAAAAIAAHBYAAAAAAAAkGAAIAAAAACwYACAAAMAAABAAAAAAQAAAEAQAAACAAAAUCAAAAIAAABQMAAAAgAAAFBQAAACAAAAUGAAAAIAAABQgAAAAgAAAFCQAAACAAAAULAAAAIAAABQwAAAAAAAAGDwAAACAAAQUSAAAAIAABBRQAAAAgAAIFGAAAACAAAgUcAAAAIAADBSgAAAAgAAQFMAAAAAAAEAYAAAEAAAAPBgCAAAAAAA4GAEAAAAAADQYAIABBgBcLhwIBAAEBBQAAAAAAAAUAAAAAAAAGBD0AAAAAAAkF/QEAAAAADwX9fwAAAAAVBf3/HwAAAAMFBQAAAAAABwR9AAAAAAAMBf0PAAAAABIF/f8DAAAAFwX9/38AAAAFBR0AAAAAAAgE/QAAAAAADgX9PwAAAAAUBf3/DwAAAAIFAQAAABAABwR9AAAAAAALBf0HAAAAABEF/f8BAAAAFgX9/z8AAAAEBQ0AAAAQAAgE/QAAAAAADQX9HwAAAAATBf3/BwAAAAEFAQAAABAABgQ9AAAAAAAKBf0DAAAAABAF/f8AAAAAHAX9//8PAAAbBf3//wcAABoF/f//AwAAGQX9//8BAAAYBf3//wBBkBkLhgQBAAEBBgAAAAAAAAYDAAAAAAAABAQAAAAgAAAFBQAAAAAAAAUGAAAAAAAABQgAAAAAAAAFCQAAAAAAAAULAAAAAAAABg0AAAAAAAAGEAAAAAAAAAYTAAAAAAAABhYAAAAAAAAGGQAAAAAAAAYcAAAAAAAABh8AAAAAAAAGIgAAAAAAAQYlAAAAAAABBikAAAAAAAIGLwAAAAAAAwY7AAAAAAAEBlMAAAAAAAcGgwAAAAAACQYDAgAAEAAABAQAAAAAAAAEBQAAACAAAAUGAAAAAAAABQcAAAAgAAAFCQAAAAAAAAUKAAAAAAAABgwAAAAAAAAGDwAAAAAAAAYSAAAAAAAABhUAAAAAAAAGGAAAAAAAAAYbAAAAAAAABh4AAAAAAAAGIQAAAAAAAQYjAAAAAAABBicAAAAAAAIGKwAAAAAAAwYzAAAAAAAEBkMAAAAAAAUGYwAAAAAACAYDAQAAIAAABAQAAAAwAAAEBAAAABAAAAQFAAAAIAAABQcAAAAgAAAFCAAAACAAAAUKAAAAIAAABQsAAAAAAAAGDgAAAAAAAAYRAAAAAAAABhQAAAAAAAAGFwAAAAAAAAYaAAAAAAAABh0AAAAAAAAGIAAAAAAAEAYDAAEAAAAPBgOAAAAAAA4GA0AAAAAADQYDIAAAAAAMBgMQAAAAAAsGAwgAAAAACgYDBABBpB0L2QEBAAAAAwAAAAcAAAAPAAAAHwAAAD8AAAB/AAAA/wAAAP8BAAD/AwAA/wcAAP8PAAD/HwAA/z8AAP9/AAD//wAA//8BAP//AwD//wcA//8PAP//HwD//z8A//9/AP///wD///8B////A////wf///8P////H////z////9/AAAAAAEAAAACAAAABAAAAAAAAAACAAAABAAAAAgAAAAAAAAAAQAAAAIAAAABAAAABAAAAAQAAAAEAAAABAAAAAgAAAAIAAAACAAAAAcAAAAIAAAACQAAAAoAAAALAEGgIAsDwBBQ",
vendor: 2,463 bytes, line 83
83ES=new WeakMap;let SS,bS=0,mR=(()=>{class f extends ao{constructor(t){super(t),this.transcoderPath="",this.transcoderBinary=null,this.transcoderPending=null,this.workerPool=new rR,this.workerSourceURL="",this.workerConfig=null,typeof MSC_TRANSCODER<"u"&&console.warn('THREE.KTX2Loader: Please update to latest "basis_transcoder". "msc_basis_transcoder" is no longer supported in three.js r125+.')}setTranscoderPath(t){return this.transcoderPath=t,this}setWorkerLimit(t){return this.workerPool.setWorkerLimit(t),this}detectSupport(t){return this.workerConfig={astcSupported:t.extensions.has("WEBGL_compressed_texture_astc"),etc1Supported:t.extensions.has("WEBGL_compressed_texture_etc1"),etc2Supported:t.extensions.has("WEBGL_compressed_texture_etc"),dxtSupported:t.extensions.has("WEBGL_compressed_texture_s3tc"),bptcSupported:t.extensions.has("EXT_texture_compression_bptc"),pvrtcSupported:t.extensions.has("WEBGL_compressed_texture_pvrtc")||t.extensions.has("WEBKIT_WEBGL_compressed_texture_pvrtc")},t.capabilities.isWebGL2&&(this.workerConfig.etc1Supported=!1),this}init(){if(!this.transcoderPending){const t=new oo(this.manager);t.setPath(this.transcoderPath),t.setWithCredentials(this.withCredentials);const r=t.loadAsync("basis_transcoder.js"),s=new oo(this.manager);s.setPath(this.transcoderPath),s.setResponseType("arraybuffer"),s.setWithCredentials(this.withCredentials);const l=s.loadAsync("basis_transcoder.wasm");this.transcoderPending=Promise.all([r,l]).then(([u,g])=>{const _=f.BasisWorker.toString(),x=["/* constants */","let _EngineFormat = "+JSON.stringify(f.EngineFormat),"let _TranscoderFormat = "+JSON.stringify(f.TranscoderFormat),"let _BasisFormat = "+JSON.stringify(f.BasisFormat),"/* basis_transcoder.js */",u,"/* worker */",_.substring(_.indexOf("{")+1,_.lastIndexOf("}"))].join("\n");this.workerSourceURL=URL.createObjectURL(new Blob([x])),this.transcoderBinary=g,this.workerPool.setWorkerCreator(()=>{const M=new Worker(this.workerSourceURL),C=this.transcoderBinary.slice(0);return M.postMessage({type:"init",config:this.workerConfig,transcoderBinary:C},[C]),M})}),bS>0&&console.warn("THREE.KTX2Loader: Multiple active KTX2 loaders may cause performance issues. Use a single KTX2Loader instance, or call .dispose() on old instances."),bS++}return this.transcoderPending}load(t,r,s,l){if(null===this.workerConfig)throw new Error("THREE.KTX2Loader: Missing initialization with `.detectSupport( renderer )`.");const u=new oo(this.manager);
83u.setResponseType("arraybuffer"),u.setWithCredentials(this.withCredentials),u.load(t,g=>{if(ES.has(g))return ES.get(g).promise.then(r).catch(l);this._createTexture(g).then(_=>r?r(_):null).catch(l)},s,l)}_createTextureFrom(t,r){const{mipmaps:s,width:l,height:u,format:g,type:_,error:x,dfdTransferFn:M,dfdFlags:C}=t;if("error"===_)return Promise.reject(x);const P=r.layerCount>1?new cI(s,l,u,r.layerCount,g,rs):new vb(s,l,u,g,rs);return P.minFilter=1===s.length?Tr:Uo,P.magFilter=Tr,P.generateMipmaps=!1,P.needsUpdate=!0,P.encoding=2===M?Ui:zo,P.premultiplyAlpha=!!(1&C),P}_createTexture(t,r={}){var s=this;return(0,xi.A)(function*(){const l=function uR(f){const e=new Uint8Array(f.buffer,f.byteOffset,Ca.length);if(e[0]!==Ca[0]||e[1]!==Ca[1]||e[2]!==Ca[2]||e[3]!==Ca[3]||e[4]!==Ca[4]||e[5]!==Ca[5]||e[6]!==Ca[6]||e[7]!==Ca[7]||e[8]!==Ca[8]||e[9]!==Ca[9]||e[10]!==Ca[10]||e[11]!==Ca[11])throw new Error("Missing KTX 2.0 identifier.");const t=new hR,r=17*Uint32Array.BYTES_PER_ELEMENT,s=new cA(f,Ca.length,r,!0);t.vkFormat=s._nextUint32(),t.typeSize=s._nextUint32(),t.pixelWidth=s._nextUint32(),t.pixelHeight=s._nextUint32(),t.pixelDepth=s._nextUint32(),t.layerCount=s._nextUint32(),t.faceCount=s._nextUint32();const l=s._nextUint32();t.supercompressionScheme=s._nextUint32();const u=s._nextUint32(),g=s._nextUint32(),_=s._nextUint32(),x=s._nextUint32(),M=s._nextUint64(),C=s._nextUint64(),P=new cA(f,Ca.length+r,3*l*8,!0);for(let et=0;et<l;et++)t.levels.push({levelData:new Uint8Array(f.buffer,f.byteOffset+P._nextUint64(),P._nextUint64()),uncompressedByteLength:P._nextUint64()});const R=new cA(f,u,g,!0),F={vendorId:R._skip(4)._nextUint16(),descriptorType:R._nextUint16(),versionNumber:R._nextUint16(),descriptorBlockSize:R._nextUint16(),colorModel:R._nextUint8(),colorPrimaries:R._nextUint8(),transferFunction:R._nextUint8(),flags:R._nextUint8(),texelBlockDimension:[R._nextUint8(),R._nextUint8(),R._nextUint8(),R._nextUint8()],bytesPlane:[R._nextUint8(),R._nextUint8(),R._nextUint8(),R._nextUint8(),R._nextUint8(),R._nextUint8(),R._nextUint8(),R._nextUint8()],samples:[]},O=(F.descriptorBlockSize/4-6)/4;for(let et=0;et<O;et++){const tt={bitOffset:R._nextUint16(),bitLength:R._nextUint8(),channelType:R._nextUint8(),samplePosition:[R._nextUint8(),R._nextUint8(),R._nextUint8(),R._nextUint8()],sampleLower:-1/0,sampleUpper:1/0};64&tt.channelType?(tt.sampleLower=R._nextInt32(),tt.sampleUpper=R._nextInt32()):(tt.sampleLower=R._nextUint32(),tt.sampleUpper=R._nextUint32()),F.samples[et]=tt}t.dataFormatDescriptor.length=0,t.dataFormatDescriptor.push(F);const k=new cA(f,_,x,!0);for(;k._offset<x;){const et=k._nextUint32(),tt=k._scan(et),gt=TT(tt),bt=k._scan(et-tt.byteLength);t.keyValue[gt]=gt.match(/^ktx/i)?TT(bt):bt,k._offset%4&&k._skip(4-k._offset%4)}if(C<=0)return t;const L=new cA(f,M,C,!0),V=L._nextUint16(),z=L._nextUint16(),W=L._nextUint32(),ne=L._nextUint32(),fe=L._nextUint32(),ge=L._nextUint32(),de=[];for(let et=0;et<l;et++)de.push({imageFlags:L._nextUint32(),rgbSliceByteOffset:L._nextUint32(),rgbSliceByteLength:L._nextUint32(),alphaSliceByteOffset:L._nextUint32(),alphaSliceByteLength:L._nextUint32()});const ie=M+L._offset,ye=ie+W,He=ye+ne,qe=He+fe,Ge=new Uint8Array(f.buffer,f.byteOffset+ie,W),Ve=new Uint8Array(f.buffer,f.byteOffset+ye,ne),We=new Uint8Array(f.buffer,f.byteOffset+He,fe),nt=new Uint8Array(f.buffer,f.byteOffset+qe,ge);return t.globalData={endpointCount:V,selectorCount:z,imageDescs:de,endpointsData:Ge,selectorsData:Ve,tablesData:We,extendedData:nt},t}(new Uint8Array(t));if(0!==l.vkFormat)return function AR(f){return wS.apply(this,arguments)}(l);const u=r,g=s.init().then(()=>s.workerPool.postMessage({type:"transcode",buffer:t,taskConfig:u},[t])).then(_=>s._createTextureFrom(_.data,l));return ES.set(t,{promise:g}),g})()}dispose(){return this.workerPool.dispose(),this.workerSourceURL&&URL.revokeObjectURL(this.workerSourceURL),bS--,this}}return f.BasisFormat={ETC1S:0,UASTC_4x4:1},f.TranscoderFormat={ETC1:0,ETC2:1,BC1:2,BC3:3,BC4:4,BC5:5,BC7_M6_OPAQUE_ONLY:6,BC7_M5:7,PVRTC1_4_RGB:8,PVRTC1_4_RGBA:9,ASTC_4x4:10,ATC_RGB:11,ATC_RGBA_INTERPOLATED_ALPHA:12,RGBA32:13,RGB565:14,BGR565:15,RGBA4444:16},f.EngineFormat={RGBAFormat:Ns,RGBA_ASTC_4x4_Format:37808,RGBA_BPTC_Format:kp,RGBA_ETC2_EAC_Format:37496,RGBA_PVRTC_4BPPV1_Format:35842,RGBA_S3TC_DXT5_Format:ed,RGB_ETC1_Format:36196,RGB_
83ETC2_Format:37492,RGB_PVRTC_4BPPV1_Format:35840,RGB_S3TC_DXT1_Format:Jf},f.BasisWorker=function(){let e,t,r;const s=_EngineFormat,l=_TranscoderFormat,u=_BasisFormat;self.addEventListener("message",function(O){const k=O.data;switch(k.type){case"init":e=k.config,function g(O){t=new Promise(k=>{r={wasmBinary:O,onRuntimeInitialized:k},BASIS(r)}).then(()=>{r.initializeBasis(),void 0===r.KTX2File&&console.warn("THREE.KTX2Loader: Please update Basis Universal transcoder.")})}(k.transcoderBinary);break;case"transcode":t.then(()=>{try{const{width:L,height:V,hasAlpha:z,mipmaps:W,format:ne,dfdTransferFn:fe,dfdFlags:ge}=function _(O){const k=new r.KTX2File(new Uint8Array(O));function L(){k.close(),k.delete()}if(!k.isValid())throw L(),new Error("THREE.KTX2Loader:\tInvalid or unsupported .ktx2 file");const V=k.isUASTC()?u.UASTC_4x4:u.ETC1S,z=k.getWidth(),W=k.getHeight(),ne=k.getLayers()||1,fe=k.getLevels(),ge=k.getHasAlpha(),de=k.getDFDTransferFunc(),ie=k.getDFDFlags(),{transcoderFormat:ye,engineFormat:He}=function P(O,k,L,V){let z,W;const ne=O===u.ETC1S?M:C;for(let fe=0;fe<ne.length;fe++){const ge=ne[fe];if(e[ge.if]&&ge.basisFormat.includes(O)&&!(V&&ge.transcoderFormat.length<2)&&(!ge.needsPowerOfTwo||R(k)&&R(L)))return z=ge.transcoderFormat[V?1:0],W=ge.engineFormat[V?1:0],{transcoderFormat:z,engineFormat:W}}return console.warn("THREE.KTX2Loader: No suitable compressed texture format found. Decoding to RGBA32."),z=l.RGBA32,W=s.RGBAFormat,{transcoderFormat:z,engineFormat:W}}(V,z,W,ge);if(!z||!W||!fe)throw L(),new Error("THREE.KTX2Loader:\tInvalid texture");if(!k.startTranscoding())throw L(),new Error("THREE.KTX2Loader: .startTranscoding failed");const qe=[];for(let Ge=0;Ge<fe;Ge++){const Ve=[];let We,nt;for(let et=0;et<ne;et++){const tt=k.getImageLevelInfo(Ge,et,0);We=tt.origWidth<4?tt.origWidth:tt.width,nt=tt.origHeight<4?tt.origHeight:tt.height;const gt=new Uint8Array(k.getImageTranscodedSizeInBytes(Ge,et,0,ye));if(!k.transcodeImage(gt,Ge,et,0,ye,0,-1,-1))throw L(),new Error("THREE.KTX2Loader: .transcodeImage failed.");Ve.push(gt)}qe.push({data:F(Ve),width:We,height:nt})}return L(),{width:z,height:W,hasAlpha:ge,mipmaps:qe,format:He,dfdTransferFn:de,dfdFlags:ie}}(k.buffer),de=[];for(let ie=0;ie<W.length;++ie)de.push(W[ie].data.buffer);self.postMessage({type:"transcode",id:k.id,width:L,height:V,hasAlpha:z,mipmaps:W,format:ne,dfdTransferFn:fe,dfdFlags:ge},de)}catch(L){console.error(L),self.postMessage({type:"error",id:k.id,error:L.message})}})}});const x=[{if:"astcSupported",basisFormat:[u.UASTC_4x4],transcoderFormat:[l.ASTC_4x4,l.ASTC_4x4],engineFormat:[s.RGBA_ASTC_4x4_Format,s.RGBA_ASTC_4x4_Format],priorityETC1S:1/0,priorityUASTC:1,needsPowerOfTwo:!1},{if:"bptcSupported",basisFormat:[u.ETC1S,u.UASTC_4x4],transcoderFormat:[l.BC7_M5,l.BC7_M5],engineFormat:[s.RGBA_BPTC_Format,s.RGBA_BPTC_Format],priorityETC1S:3,priorityUASTC:2,needsPowerOfTwo:!1},{if:"dxtSupported",basisFormat:[u.ETC1S,u.UASTC_4x4],transcoderFormat:[l.BC1,l.BC3],engineFormat:[s.RGB_S3TC_DXT1_Format,s.RGBA_S3TC_DXT5_Format],priorityETC1S:4,priorityUASTC:5,needsPowerOfTwo:!1},{if:"etc2Supported",basisFormat:[u.ETC1S,u.UASTC_4x4],transcoderFormat:[l.ETC1,l.ETC2],engineFormat:[s.RGB_ETC2_Format,s.RGBA_ETC2_EAC_Format],priorityETC1S:1,priorityUASTC:3,needsPowerOfTwo:!1},{if:"etc1Supported",basisFormat:[u.ETC1S,u.UASTC_4x4],transcoderFormat:[l.ETC1],engineFormat:[s.RGB_ETC1_Format],priorityETC1S:2,priorityUASTC:4,needsPowerOfTwo:!1},{if:"pvrtcSupported",basisFormat:[u.ETC1S,u.UASTC_4x4],transcoderFormat:[l.PVRTC1_4_RGB,l.PVRTC1_4_RGBA],engineFormat:[s.RGB_PVRTC_4BPPV1_Format,s.RGBA_PVRTC_4BPPV1_Format],priorityETC1S:5,priorityUASTC:6,needsPowerOfTwo:!0}],M=x.sort(function(O,k){return O.priorityETC1S-k.priorityETC1S}),C=x.sort(function(O,k){return O.priorityUASTC-k.priorityUASTC});function R(O){return O<=2||!(O&O-1)&&0!==O}function F(O){let k=0;for(const z of O)k+=z.byteLength;const L=new Uint8Array(k);let V=0;for(const z of O)L.set(z,V),V+=z.byteLength;return L}},f})();const PT={[MT]:Ns,[ET]:Ns,[vT]:Ns,[AS]:Ns,[ST]:jf,[xT]:jf,[_T]:jf,[gS]:jf,[bT]:Bu,[yT]:Bu,[mS]:Bu,[AT]:Bu},MS={[MT]:Os,[ET]:Ka,[vT]:rs,[AS]:rs,[ST]:Os,[xT]:Ka,[_T]:rs,[gS]:rs,[bT]:Os,[yT]:Ka,[mS]:rs,[AT]:rs},gR={[AS]:Ui,[gS]:Ui,[mS]:Ui};function wS(){return wS=(0,xi.A)(function*(f){const{vkFormat:e,pixelWidth:t,pixelHeight:r,pixelDepth:s}=f;if(void 0===PT[e])throw new Error("THREE.KTX2Loader: Unsupported vkFormat.");const l=f.levels[0];let u,g;if(0===f.supercompressionScheme)u=l.levelData;else{if(2!==f.supercompressionScheme)throw new Error("THREE.KTX2Loader: Unsupported supercompressionScheme.");SS||(SS=new Promise(function(){var x=(0,xi.A)(function*(M){const C=new pR;yield C.init(),M(C)});return function(M){return x.apply(this,arguments)}}())),u=(yield SS).decode(l.levelData,l.uncompressedByteLength)}g=MS[e]===Os?new Float32Array(u.buffer,u.byteOffset,u.byteLength/Float32Array.BYTES_PER_ELEMENT):MS[e]===Ka?new Uint16Array(u.buffer,u.byteOffset,u.byteLength/Uint16Array.BYTES_PER_ELEMENT):u;const _=0===s?new _m(g,t,r):new Wp(g,t,r,s);return _.type=MS[e],_.format=PT[e],_.encoding=gR[e]||zo,_.needsUpdate=!0,Promise.resolve(_)}),wS.apply(this,arguments)}let _R=(()=>{class f{constructor(t){this.animationService=t,this.models={},this.textures={};const r=new b2;r.setDecoderPath(this.getLoaderPath("draco")),this.loaders={draco:Promise.resolve(r),ktx2:this.animationService.getThree().then(s=>(new mR).setTranscoderPath(this.getLoaderPath("ktx2")).detectSupport(s.renderer)),standard:Promise.resolve(new zw)},this.preloadShadows()}getLoader(t){return this.loaders[t]}getLoaderPath(t){const r="/assets/pack-opening";return{draco:`${r}/libs/draco/`,ktx2:`${r}/libs/basis/`}[t]}getPath(t){const r="/assets/pack-opening";return{card:`${r}/cards/`,cardShadow:`${r}/cards/shadow/`,cardback:`${r}/cardbacks/`,trinket:`${r}/trinkets/`,board:`${r}/boards/`,pack:`${r}/packs/`}[t]}load(t,r,s,l=()=>{}){const u=`model.${t}.${r}.${s}`;return this.models[u]||(this.models[u]=Promise.all([this.getLoader("ktx2"),this.getLoader("draco")]).then(([g,_])=>{const x=(new w2).setPath(`${this.getPath(t)}${r}/`.replace("//","/"));return x.setDRACOLoader(_),x.setKTX2Loader(g),x.loadAsync(`${s}.gltf`,l)})),this.models[u]}loadTexture(t,r,s=!0){const l=`texture.${t}.${r}`;return this.textures[l]||(this.textures[l]=this.doLoadTexture(`${this.getPath(t)}${r}`,s).then(u=>(u.encoding=Ui,u.flipY=!1,u))),this.textures[l]}doLoadTexture(t,r=!0){return r?this.getLoader("ktx2").then(s=>s.loadAsync(`${t.replace("//","/")}.ktx2`)):this.getLoader("standard").then(s=>s.loadAsync(`${t.replace("//","/")}.png`))}loadArt(t){const r=`art.${t}`;return this.textures[r]||(this.textures[r]=this.getLoader("standard").then(s=>s.loadAsync(t)).then(s=>(s.anisotropy=0,s.magFilter=Hr,s.minFilter=Hr,s.encoding=Ui,s.flipY=!1,s))),this.textures[r]}loadShadow(t,r){const s=`shadow.${t}.${r}`;return this.textures[s]||(this.textures[s]=this.getLoader("standard").then(l=>l.loadAsync(`${this.getPath(t)}${r||""}.png`.replace("//","/"))).then(l=>(l.flipY=!1,l))),this.textures[s]}loadHighlight(){const t="highlight";return this.textures[t]||(this.textures[t]=this.doLoadTexture(`${this.getPath("card")}highlight/Tex_Noise_Electro`.replace("//","/")).then(r=>(r.encoding=Ui,r.wrapS=Zl,r.wrapT=Zl,r.flipY=!1,r))),this.textures[t]}preloadShadows(){["advantage","creature","hero","power","spell","weapon"].forEach(r=>{this.loadShadow("cardShadow",`card_${r}_shadow`).catch(s=>{console.error(`Failure preloading shadow for ${r}`,s)})})}static#t=this.\u0275fac=function(r){return new(r||f)(y.KVO(Yc))};static#e=this.\u0275prov=y.jDH({token:f,factory:f.\u0275fac,providedIn:"root"})}return f})(),hA=(()=>{class f{constructor(t,r,s,l,u){this.animationService=t,this.modelLoader=r,this.cameraService=s,this.debugService=l,this.destroyed$=new U.B,this.progress$=new Po.m(1),this.packClicked$=new U.B,this.config=u.getConfig()}ngOnDestroy(){this.destroyed$.next(),this.destroyed$.complete()}observeProgress(){return this.progress$.asObservable()}observePackClicks(){return this.packClicked$.asObservable()}preparePack(t){var r=this;return(0,xi.A)(function*(){let s;r.progress$.next({id:t.id,percentage:0}),r.destroySelectedPack();const l=yield r.animationService.getThree();return performance.mark("pack:model-load-start"),yield new Promise((u,g)=>{s=r.createAsset(t,u,g,l)}),performance.mark("pack:model-load-end"),performance.measure("pack \xb7 model load","pack:model-load-start","pack:model-load-end"),r.selectedPack=s,s})()}destroySelectedPack(){var t=this;return(0,xi.A)(function*(){const r=t.selectedPack,s=yield t.animationService.getAnimation("pack");
83s&&(s.instance.videoPreloader.stop(),s.instance.renderer.elements.forEach(l=>{9===l.data.ty&&(l.pivotElement.visible=!1)})),r&&(r.visible=!1,t.removeInteraction(r),r.parent&&r.parent.remove(r),t.animationService.getThree().then(l=>l.scene.remove(r)),r.dispose(),t.selectedPack=void 0)})()}removeInteraction(t){var r=this;return(0,xi.A)(function*(){t.detachEvents(),(yield r.animationService.getThree()).interaction.remove(t)})()}handleMouseMove(t,r){if(this.selectedPack&&this.config.lookAtMouse){const s=new Co(new Me(0,0,1),1270),l=this.cameraService.screenToWorld(t,r,s);this.selectedPack.lookAtPoint(l)}}createAsset(t,r,s,l){const u=new E2(this.modelLoader,{item:t,envMap:l.envMap,onLoaded:()=>{this.progress$.next({id:t.id,percentage:100}),r()},onProgress:g=>{this.progress$.next({id:t.id,percentage:Math.max(0,Math.min(80,g.loaded/g.total*80))})},onError:g=>s(g)});return u.visible=!1,u}getMouseoverHandler(t){var r=this;return(0,xi.A)(function*(){(yield r.animationService.getAnimator()).style.cursor="pointer",t.highlight(),r.config.lookAtMouse=!0,r.debugService.attachPack(t)})}getMouseoutHandler(t){var r=this;return(0,xi.A)(function*(){r.config.lookAtMouse=!1,(yield r.animationService.getAnimator()).style.cursor="default",t.unhighlight()})}addPackInteraction(t){var r=this;return(0,xi.A)(function*(){(yield r.animationService.getThree()).interaction.add(t),t.addListener("click",()=>{r.config.isEditing||r.packClicked$.next(t)}),t.addListener("mouseover",r.getMouseoverHandler(t)),t.addListener("mouseout",r.getMouseoutHandler(t))})()}static#t=this.\u0275fac=function(r){return new(r||f)(y.KVO(Yc),y.KVO(_R),y.KVO($h),y.KVO(rA),y.KVO(Wc))};static#e=this.\u0275prov=y.jDH({token:f,factory:f.\u0275fac,providedIn:"root"})}return f})(),vR=(()=>{class f{constructor(t,r,s,l){this.cameraService=t,this.debugService=r,this.packLoadingService=s,this.destroyed$=new U.B,this.animatorDestroyed$=new U.B,this.config=l.getConfig()}ngOnDestroy(){this.destroyed$.next(),this.destroyed$.complete()}destroy(){this.animatorDestroyed$.next()}initialize(t){const r=this.getMouseMoveHandler();t.addEventListener("mousemove",r),this.animatorDestroyed$.pipe((0,Kt.s)(1)).subscribe(()=>{t.removeEventListener("mousemove",r)})}getMouseMoveHandler(){let t=!1,r=0,s=0;return l=>{r=l.offsetX,s=l.offsetY,t||(t=!0,requestAnimationFrame(()=>{t=!1,this.cameraService.handleMouseMove(r,s),this.packLoadingService.handleMouseMove(r,s),this.debugService.handleMouseMove(r,s)}))}}static#t=this.\u0275fac=function(r){return new(r||f)(y.KVO($h),y.KVO(rA),y.KVO(hA),y.KVO(Wc))};static#e=this.\u0275prov=y.jDH({token:f,factory:f.\u0275fac,providedIn:"root"})}return f})();var Lm=v(47128),Zh=v(19999),cc=v(59452),CS=v(61318),RT=v(79439),uA=v(14600),yR=v(77919),px=v(56196),xR=v(68534),BT=v(46443);let TS=(()=>{class f{constructor(t,r,s){this.animationService=t,this.cameraService=r,this.http=s,this.destroyed$=new U.B,this.isAnimationLoading=!1,this.animations$=new Po.m(1),this.selectedAnimation$=new K0.t(""),this.animationLoaded$=new Po.m(1),this.progress$=new Po.m(1),(0,Zh.z)({animations:this.animations$,id:this.selectedAnimation$.pipe((0,KC.F)(),(0,ce.p)(l=>""!==l))}).pipe((0,K.Q)(this.destroyed$),(0,le.T)(({animations:l,id:u})=>{const g=l.find(_=>_.id===u);return g||l[0]})).subscribe(l=>this.loadAnimation(l)),this.loadAnimations().pipe((0,Kt.s)(1)).subscribe(l=>{this.animations$.next(l.animations)})}ngOnDestroy(){this.destroyed$.next(),this.destroyed$.complete()}observeAnimationLoaded(){return this.animationLoaded$.asObservable()}observeProgress(){return this.progress$.asObservable()}initialize(){this.selectedAnimation$.next("default")}reset(){this.selectedAnimation$.next(""),this.animationService.getAnimator().then(t=>{["bg","foreground","pack"].forEach(r=>{const s=t.getAnimationAsset(r);s&&(s.pause(),s.instance.pause())})})}getPaths(){const t="/assets/pack-opening";return{animation:`${t}/animations/`,pack:`${t}/packs/`}}loadAnimations(){return this.http.get("/assets/pack-opening/animations/animations-config.json",{context:(new BT._y).set(xR.t,!0)})}loadAnimation(t){this.isAnimationLoading=!0,this.animationService.getAnimator().then(r=>{const s=`${this.getPaths().animation}${t.animation}`;return this.resetPackAnimation(),this.progress$.next({id:t.id,percentage:0}),r.loadAnimation(s,t.id,(l,u)=>this.progress$.next({id:t.id,percentage:Math.max(0,Math.min(80,u/l*80))})).then(l=>
83{this.isAnimationLoading=!1,this.initializeBackgroundAnimation(r),this.initializeForegroundAnimation(r),this.cameraService.initializeCamera(r),this.animationLoaded$.next(t),l.loaded.then(()=>{this.progress$.next({id:t.id,percentage:100})})},l=>{this.isAnimationLoading=!1,this.progress$.next({id:t.id,percentage:0}),console.error("OpenPacks::Animation failed to load",l)})})}resetPackAnimation(){var t=this;return(0,xi.A)(function*(){const r=yield t.animationService.getAnimation("pack");r&&(r.pause(),r.instance.pause())})()}initializeBackgroundAnimation(t){const r=t.getAnimationAsset("bg");r&&(r.instance.resetCameraElement(),t.play("bg"))}initializeForegroundAnimation(t){const r=t.getAnimationAsset("foreground");r&&(r.instance.resetCameraElement(),t.play("foreground"))}selectAnimation(t=""){this.selectedAnimation$.next(t)}static#t=this.\u0275fac=function(r){return new(r||f)(y.KVO(Yc),y.KVO($h),y.KVO(BT.Qq))};static#e=this.\u0275prov=y.jDH({token:f,factory:f.\u0275fac,providedIn:"root"})}return f})(),ER=(()=>{class f{constructor(t,r,s,l,u){this.cameraService=t,this.animationService=r,this.debugService=s,this.sceneService=l,this.packLoadingService=u,this.destroyed$=new U.B,this.packPosition={x:0,y:0},this.packPlane=new Co(new Me(0,0,1),-60),this.initialize()}ngOnDestroy(){this.destroyed$.next(),this.destroyed$.complete()}initialize(){this.sceneService.observeStageRect().pipe((0,K.Q)(this.destroyed$)).subscribe(t=>{this.retakePackPosition(t)})}retakePackPosition(t){this.packPosition={x:t.left+t.width/2,y:t.height/2+80}}showPack(t,r=!1){var s=this;return(0,xi.A)(function*(){const l=yield s.animationService.getAnimator();return l.style.cursor="default",s.preparePackRevealing(t,l).then(u=>(s.sceneService.foregroundFadeIn(),u)).then(u=>s.revealPack(u,r)).then(u=>u)})()}preparePackRevealing(t,r){return this.resetPackPosition(t,r),this.packLoadingService.addPackInteraction(t),Promise.resolve(t)}resetPackPosition(t,r){const s=this.cameraService.screenToWorld(this.packPosition.x,this.packPosition.y,this.packPlane);t.position.copy(s);const l=r.getAnimationAsset("pack");l&&l.instance.renderer.elements.forEach(u=>{9===u.data.ty&&(u.pivotElement.visible=!0)})}revealPack(t,r){var s=this;return(0,xi.A)(function*(){const l=yield s.animationService.getAnimator(),u=yield s.animationService.getAnimation("pack"),g=s.getTimeline(t,l,u);return r&&g.progress(1,!1),g.play().then().then(()=>t)})()}getTimeline(t,r,s){const l=br.timeline({paused:!0}),u=t.hasAnimation(oS)?t.reveal():this.getDefaultPackAnimation(t).play();if(s){s.pause(),s.meta.timeline.pause(),this.injectPackIntoScene(t,s);const g=r.playMarker("pack","reveal");u.duration(g.duration()),u.revert(),l.add(u,0),l.add(g,0)}else this.sceneService.add(t),l.add(u,0);return l}injectPackIntoScene(t,r){r.instance.renderer.layerElement.position.set(-12,5,0);const s=r.instance.renderer.elements.find(l=>"Card Pack"===l.data.nm);if(s){this.debugService.attachPack(s.baseElement),s.baseElement.visible=!0;const l=s.baseElement.children[0];l.children.forEach(u=>l.remove(u)),l.add(t),t.position.set(10,10,this.packPlane.constant),t.setScale(12)}else this.sceneService.add(t)}getDefaultPackAnimation(t){return t.animation.rotateX=Jr_radToDeg(t.rotation.x),t.animation.rotateY=Jr_radToDeg(t.rotation.y),t.animation.rotateZ=Jr_radToDeg(t.rotation.z),br.killTweensOf(t.animation),br.to(t.animation,{rotateX:-12.84,rotateY:-34.61,rotateZ:-7.08,duration:.7,ease:"back.out(1.7)",onUpdate:()=>{t.rotation.set(Jr_degToRad(t.animation.rotateX),Jr_degToRad(t.animation.rotateY),Jr_degToRad(t.animation.rotateZ))}})}static#t=this.\u0275fac=function(r){return new(r||f)(y.KVO($h),y.KVO(Yc),y.KVO(rA),y.KVO(lc),y.KVO(hA))};static#e=this.\u0275prov=y.jDH({token:f,factory:f.\u0275fac,providedIn:"root"})}return f})(),bR=(()=>{class f{constructor(t,r,s){this.cameraService=t,this.animationService=r,this.config=s.getConfig()}processOpen(t,r){var s=this;return this.config.viewportOffsetX=0,this.config.isFollowing=!1,this.cameraService.cameraTo({x:0,y:0,z:0}).then().then((0,xi.A)(function*(){const l=yield s.animationService.getAnimator();if(!(yield s.animationService.getAnimation("pack")))return t;const g=s.createTimeline(t,l);return r&&g.progress(1,!1),s.playUntilMarkerOrEnd(g,l).then(()=>t)}))}createTimeline(t,r){const s=br.timeline({paused:!0}),l=t.open();l.revert(),s.add(l,0),s.add(r.playMarker("pack","open"),0);const u=this.cameraService.cameraTo({x:-.14,y:0,z:0},{duration:l.duration()});return s.add(u,0),s}playUntilMarkerOrEnd(t,r){return(0,xi.A)(function*(){return new Promise(s=>{const l=()=>{r.removeEventListener("marker",u),s()},u=g=>{"contents"===g.detail.marker.name&&l()};r.addEventListener("marker",u),t.play().then(()=>{l()})})})()}static#t=this.\u0275fac=function(r){return new(r||f)(y.KVO($h),y.KVO(Yc),y.KVO(Wc))};static#e=this.\u0275prov=y.jDH({token:f,factory:f.\u0275fac,providedIn:"root"})}return f})();
83var fA=v(74515),SR=v(73754),LT=v(44173),IS=v(70170),MR=v(10704),PS=v(71065),wR=v(17879);let IR=(()=>{class f{constructor(t,r,s){this.metamaskService=t,this.modalService=r,this.passportService=s,this.approved=new Set}ensureApprovedForAll(t,r,s){var l=this;return(0,xi.A)(function*(){const u=l.cacheKey(t,r,s);if(l.approved.has(u))return!0;const g=yield l.passportService.includesWallet(r);let _;try{_=yield l.isApprovedForAll(g,t,r,s)}catch(C){return console.warn("failed to read approval status",C),l.showError("We could not check your wallet permissions. Please try again."),!1}return _?(l.approved.add(u),!0):!!(yield l.requestApproval(g,t,r,s))&&((yield l.waitForApproval(g,t,r,s))?(l.approved.add(u),!0):(l.showError("Your wallet permission is taking longer than usual to confirm. Please try again in a moment \u2014 you will not be charged twice."),!1))})()}requestApproval(t,r,s,l){var u=this;return(0,xi.A)(function*(){const g=new IS.AU(new IS.Cs("Please approve access to your packs. This is a one-off permission for this collection."));u.modalService.open(LT.S,{progress$:g.asObservable(),title:t?"Waiting for Passport...":"Waiting for Metamask..."});const _={contract_address:r,wallet_address:s,function_name:"setApprovalForAll",params:[l,!0]};let x;try{x=t?yield u.passportService.transact("asset-approve",_):yield u.metamaskService.transact("asset-approve",_)}catch{return g.complete(),u.showError("Your wallet connection was interrupted before the permission was granted. Please reconnect and try again."),!1}return g.complete(),!(!x.txn||0==x.txn.length)||(console.warn(x),u.showError(u.approvalErrorMessage(x.error)),!1)})()}approvalErrorMessage(t){return t?4001===t.code?"Packs are burned as part of opening them, so the permission is required to open. Nothing has been charged.":"We could not grant access to your packs: "+(t.data?t.data.message??t.reason:t):"We could not grant access to your packs. Please try again."}waitForApproval(t,r,s,l){var u=this;return(0,xi.A)(function*(){for(let g=0;g<20;g++){yield new Promise(_=>setTimeout(_,2e3));try{if(yield u.isApprovedForAll(t,r,s,l))return!0}catch(_){console.warn("failed to read approval status while waiting",_)}}return!1})()}isApprovedForAll(t,r,s,l){var u=this;return(0,xi.A)(function*(){return t?yield u.passportService.isApprovedForAll(r,s,l):yield u.metamaskService.isApprovedForAll(r,s,l)})()}showError(t){this.modalService.open(fA.Z,{type:"error",title:"Wallet Permission Required",message:t})}cacheKey(t,r,s){return[t,r,s].map(l=>l.toLowerCase()).join(":")}static#t=this.\u0275fac=function(r){return new(r||f)(y.KVO(MR.r),y.KVO(PS.B),y.KVO(wR.ws))};static#e=this.\u0275prov=y.jDH({token:f,factory:f.\u0275fac,providedIn:"root"})}return f})();var DT=v(39692),PR=v(19678),FT=v(71135),RR=v(95229);const BR=f=>({id:f.asset_id,cards:[],set:f.set,god:"all"!==f.god&&"core"!==f.god&&f.god?f.god:"neutral",rarity:f.rarity,source:"paid",inventoryItems:[],nft:{tokenId:f.token_id,contract:f.contract,owner:f.owner,openable:f.openable}});let OT=(()=>{class f{constructor(t,r,s){this.userId$=t,this.api=r,this.featureFlags=s,this.destroyed$=new U.B,this.refresh$=(0,DT.a)(this.destroyed$),this.packs$=new Po.m(1),this.mintPollDelay=5e3,this.mintPollStartedAt=0,this.gone=new Set,this.refresh$.observe().pipe((0,_t.n)(()=>this.featureFlags.get(FT.iI.nftPackOpening)),(0,_t.n)(l=>l?this.fetch():(0,cc.of)([]))).subscribe(l=>{this.packs$.next(l),this.scheduleMintPoll(l)})}ngOnDestroy(){this.clearMintPoll(),this.destroyed$.next(),this.destroyed$.complete()}observeNftPacks(){return this.refresh$.ensureTriggered(),this.packs$.asObservable()}refresh(){this.refresh$.trigger()}markGone(t){this.gone.add(t),this.refresh()}isGone(t){return this.gone.has(t)}scheduleMintPoll(t){if(this.clearMintPoll(),!t.some(s=>s.nft&&!s.nft.openable))return this.mintPollStartedAt=0,void(this.mintPollDelay=5e3);const r=Date.now();if(this.mintPollStartedAt){if(r-this.mintPollStartedAt>=3e5)return}else this.mintPollStartedAt=r;this.mintPollTimer=setTimeout(()=>{this.mintPollDelay=Math.min(2*this.mintPollDelay,3e4),this.refresh()},this.mintPollDelay)}clearMintPoll(){this.mintPollTimer&&(clearTimeout(this.mintPollTimer),this.mintPollTimer=void 0)}fetch(){return this.userId$.pipe((0,_t.n)(t=>this.api.fetchNftPacks(t)),(0,CS.W)(()=>(0,cc.of)([])),(0,le.T)(t=>t.filter(r=>!this.gone.has(r.token_id))),(0,le.T)(t=>t.map(BR)))}static#t=this.\u0275fac=function(r){return new(r||f)(y.KVO(PR.ir),y.KVO(RR.e),y.KVO(FT.fW))};static#e=this.\u0275prov=y.jDH({token:f,factory:f.\u0275fac,providedIn:"root"})}return f})();var NT=v(67035);let UT=(()=>{class f{constructor(t,r,s,l,u){this.api=t,this.approvalService=r,this.modalService=s,this.nftPacksService=l,this.audienceService=u,this.inFlight=new Map}open(t){var r=this;return(0,xi.A)(function*(){if(!t.nft)throw new Error(`pack ${t.id} is not an NFT pack`);if(!t.nft.openable)return r.showError("Still Minting","This pack is still being minted and cannot be opened yet. It should be ready in a few minutes."),{status:"abandoned"};const s=r.inFlight.get(t.nft.tokenId);if(s)return s;const l=r.runOpen(t);r.inFlight.set(t.nft.tokenId,l);try{return yield l}finally{r.inFlight.delete(t.nft.tokenId)}})()}runOpen(t){var r=this;return(0,xi.A)(function*(){const s=yield r.attempt(t);if("approval_required"!==s.status)return s.result;if(!(yield r.approvalService.ensureApprovedForAll(s.approval.pack_contract,s.approval.wallet,s.approval.multicaller)))return{status:"abandoned"};const u=yield r.attempt(t);return"approval_required"===u.status?(r.showError("Wallet Permission Required","Your wallet permission has not taken effect yet. Please wait a moment and try again."),{status:"failed"}):u.result})()}attempt(t){var r=this;return(0,xi.A)(function*(){const s=t.nft.tokenId;try{const l=yield(0,px._)(r.api.openPack({pack_token_id:s}));return r.trackPackOpened(t,l),{status:"done",result:r.revealed(s,l)}}catch(l){const u=l,g=r.approvalRequired(u);return g?{status:"approval_required",approval:g}:{status:"done",result:r.explainFailure(s,u)}}})()}trackPackOpened(t,r){const s=r.cards??[];this.audienceService.track("pack_opened",{pack_type:[t.set,t.god,t.rarity].filter(
83Boolean).join("-"),source:t.source,card_count:s.length,cards_received:s.map(l=>l.asset_id),is_nft:!0})}revealed(t,r){this.nftPacksService.markGone(t);const s=(r.cards??[]).map(l=>l.asset_id);return s.length?{status:"opened",assetIds:s}:(this.showError("Cards Minted","Your pack was opened and the cards are yours, but we could not load them to show you. They will appear in your collection shortly."),{status:"failed"})}approvalRequired(t){if(409!==t.status)return;const r=t.error;return"approval_required"===r?.status&&r.pack_contract&&r.multicaller&&r.wallet?r:void 0}explainFailure(t,r){switch(r.status){case 409:return this.showError("Already Opening","This pack is already being opened. Please wait a moment and check your collection."),{status:"failed"};case 403:case 404:return this.nftPacksService.markGone(t),this.showError("Pack Unavailable","We could not find this pack in your wallet. If you have just bought or transferred it, give it a minute and refresh."),{status:"abandoned"};case 422:return this.showError("Not Ready","This pack cannot be opened just yet \u2014 its set has nothing left to give right now. Please try again later."),{status:"abandoned"};case 504:return this.nftPacksService.markGone(t),this.showError("Still Opening","Your pack is taking longer than usual to open. Do not try again \u2014 it will finish on its own, and your cards will appear in your collection shortly."),{status:"failed"};case 502:return console.warn("failed to open NFT pack",r),this.showError("Open Failed","Something went wrong opening this pack. Your pack is untouched \u2014 please try again."),{status:"failed"};default:return console.warn("failed to open NFT pack",r),this.showError("Open Failed","Something went wrong opening this pack. Check your collection in a few minutes \u2014 if the pack is still there, you can try again."),{status:"failed"}}}showError(t,r){this.modalService.open(fA.Z,{type:"error",title:t,message:r})}static#t=this.\u0275fac=function(r){return new(r||f)(y.KVO(SR.K),y.KVO(IR),y.KVO(PS.B),y.KVO(OT),y.KVO(NT.s4))};static#e=this.\u0275prov=y.jDH({token:f,factory:f.\u0275fac,providedIn:"root"})}return f})();var RS=v(81684);const zT=["cosmetic","cosmetic-seven-wins","promo","common","regular","rare","epic","premium","legendary","mythic","crafting","booster","crystal-booster","crystal-super-booster","crystal-shiny","crystal-super-shiny","fate-booster","fate-super-booster","fate-mega-booster","fate-shiny","shiny","shiny-legendary","super-shiny","mega-shiny","death","deception","light","magic","nature","war","bp2-promo-pack","promo pack","battle pack","whale pack","spoils pack","conquest common","conquest rare","conquest epic","conquest legendary"],GT=["domain","genesis","core","order","trial","wander","mortal","m2","battle-pass","sealed-base","base","a1","tides","a2","dread","m3","tower","fallen","m4","guardians","goe","ascent","m5","roots","m6","plague","m7","m8","conquest"],mx=f=>"core"===f.set&&"neutral"!==f.god?"domain":f.set,gx=f=>"core"===f.set&&"neutral"!==f.god?f.god:f.overrideGroup??f.rarity;let dA=(()=>{class f{constructor(t,r,s){this.packsService=t,this.nftPacksService=r,this.audienceService=s,this.destroyed$=new U.B,this.trigger=(0,DT.a)(this.destroyed$),this.sets$=new Po.m(1),this.packs$=new Po.m(1),this.packs$.pipe((0,K.Q)(this.destroyed$),(0,le.T)(l=>this.groupIntoSets(l)),(0,Yt.M)(l=>this.validateSelected(l))).subscribe(l=>{this.sets$.next(Object.values(l))}),this.trigger.observe().pipe((0,_t.n)(()=>(0,Zh.z)([this.packsService.observeUnopenedPacks(),this.nftPacksService.observeNftPacks()])),(0,K.Q)(this.destroyed$),(0,le.T)(([l,u])=>[...l,...u]),(0,le.T)(l=>this.remapPacks(l)),(0,le.T)(l=>this.sortPacks(l))).subscribe(l=>{this.packs$.next(l)})}ngOnDestroy(){this.destroyed$.next(),this.destroyed$.complete()}observeSets(){return this.trigger.ensureTriggered(),this.sets$.asObservable()}observePacks(){return this.packs$.asObservable()}groupIntoSets(t){const r={};return t.forEach(s=>{const l=mx(s);r[l]||(r[l]={set:l,groups:{},items:[]});const u=gx(s);r[l].groups[u]||(r[l].groups[u]={set:l,group:u,items:[]},r[l].items.push(r[l].groups[u])),r[l].groups[u].items.push(s)}),r}remapPacks(t){return t.map(r=>{const s=jC.R[`${r.set}-pack-${r.rarity}`];return s?{...r,set:s.set,rarity:s.rarity,overrideGroup:s.overrideGroup}:r})}sortPacks(t){return[...t].sort((r,s)=>{const l=GT.indexOf(mx(r)),u=GT.indexOf(mx(s));return l===u?zT.indexOf(gx(r))-zT.indexOf(gx(s)):u-l})}select(t){this.selected=t}validateSelected(t){this.selected=t[this.selected?.set]?.groups[this.selected?.group]?t[this.selected.set].groups[this.selected.group]:void 0}markOpened(t,r=!1){this.removeFromShelf(t),r?this.packsService.refresh():this.packsService.openPack(t).subscribe(s=>{"Success"===s&&this.trackPackOpened(t)})}trackPackOpened(t){const r=t.cards??[],s=r.flatMap(u=>u.rarity?[String(u.rarity)]:[]),l=s.reduce((u,g)=>(u[g]=(u[g]??0)+1,u),{});this.audienceService.track("pack_opened",{pack_type:[t.set,t.god,t.rarity].filter(
83Boolean).join("-"),source:t.source,card_count:r.length,cards_received:r.map(u=>u.proto),...s.length?{rarity_distribution:l}:{}})}removeOpenedNftPack(t){this.removeFromShelf(t),this.nftPacksService.markGone(t.nft.tokenId)}removeFromShelf(t){this.packs$.pipe((0,Lm.h)()).subscribe(r=>{this.packs$.next(r.filter(s=>s.id!==t.id))})}observeHasOpenablePacks(){return this.packs$.pipe((0,le.T)(t=>t.some(r=>!r.nft||r.nft.openable)))}observeNextPack(t){const r=mx(t),s=gx(t),l=u=>u.id!==t.id&&!(u.nft&&this.nftPacksService.isGone(u.nft.tokenId));return this.sets$.pipe((0,Lm.h)(),(0,_t.n)(u=>{const g=u.find(_=>_.set===r);if(g){const _=g.items.find(M=>M.set===r&&M.group===s),x=_?_.items.find(l):void 0;if(x)return(0,cc.of)(x)}return this.packs$.pipe((0,Lm.h)(),(0,le.T)(_=>_.find(l)))}))}static#t=this.\u0275fac=function(r){return new(r||f)(y.KVO(RS.u),y.KVO(OT),y.KVO(NT.s4))};static#e=this.\u0275prov=y.jDH({token:f,factory:f.\u0275fac,providedIn:"root"})}return f})(),VT=(()=>{class f{constructor(t){this.storage=t,this._skip$=new K0.t(!1),this.initSkip()}observeSkip(){return this._skip$.asObservable()}setSkip(t){this._skip$.next(t),this.storage.set("gu-animationSkip",t)}toggleSkip(){this.setSkip(!0!==this._skip$.value)}initSkip(){const t=!!this.storage.get("gu-animationSkip");this.setSkip(t)}static#t=this.\u0275fac=function(r){return new(r||f)(y.KVO(vC.O))};static#e=this.\u0275prov=y.jDH({token:f,factory:f.\u0275fac,providedIn:"root"})}return f})();var FR=v(67611),kR=v(74235),OR=v(14072),NR=v(55782),UR=v(65592);const Ax=(f,e)=>f.filter(t=>t.type===e).map(t=>t.id);let HT=(()=>{class f{constructor(t,r,s,l,u,g){this.assetsService=t,this.inventory=r,this.cardbacksService=s,this.trinketsService=l,this.boardsService=u,this.environment=g,this.packs={}}forget(t){delete this.packs[t]}observePackContents(t){return this.packs[t.id]||(this.packs[t.id]=new Po.m(1),this.fetchContents(t,this.packs[t.id])),this.packs[t.id].asObservable()}fetchContents(t,r){const s=t.inventoryItems??[],l=this.environment.battlepass.specialIconBaseURL,u=(C,P)=>{let R;return"emote"===C.itemType?R=`${l}/inventory/1024/emote-${C.identifier}.webp`:"god-portrait"===C.itemType&&(R=`${l}/inventory/1024/god-portrait-${C.identifier}.webp`),{...C,id:`${C.itemType}-${C.identifier}-${P}`,imageUrl:R}},g=s.filter(C=>"emote"===C.itemType).map(u),_=s.filter(C=>"god-portrait"===C.itemType).map(u),x=s.filter(C=>"title"===C.itemType).map(u),M=t.cards.map(C=>C.id);0!==M.length?this.assetsService.fetchAssets(...M).pipe((0,_t.n)(C=>(0,Zh.z)({cards:this.inventory.fetchCards(...Ax(C,"card")).pipe((0,Kt.s)(1)),cardbacks:this.cardbacksService.fetchCardbacks(...Ax(C,"cardback")).pipe((0,Kt.s)(1)),trinkets:this.trinketsService.fetchTrinkets(...Ax(C,"trinket")).pipe((0,Kt.s)(1)),boards:this.boardsService.fetchBoards(...Ax(C,"board")).pipe((0,Kt.s)(1)),packs:(0,cc.of)([]),emotes:(0,cc.of)(g),portraits:(0,cc.of)(_),titles:(0,cc.of)(x)}))).subscribe(C=>r.next(C)):r.next({cards:[],cardbacks:[],trinkets:[],boards:[],packs:[],emotes:g,portraits:_,titles:x})}static#t=this.\u0275fac=function(r){return new(r||f)(y.KVO(FR.T),y.KVO(kR.c),y.KVO(OR.c),y.KVO(NR._),y.KVO(UR.j),y.KVO(it.CF))};static#e=this.\u0275prov=y.jDH({token:f,factory:f.\u0275fac,providedIn:"root"})}return f})(),Dm=(()=>{class f{constructor(t,r){this.packResolver=t,this.sceneService=r,this.destroyed$=new U.B,this.contents$=new Po.m(1),this.hidden$=new Po.m(1),this.focused$=new K0.t(void 0)}observeHidden(){return this.hidden$.asObservable()}observeContents(){return this.contents$.asObservable()}observeAssetIds(){return this.contents$.pipe((0,le.T)(t=>this.getAssetIds(t)))}observeFocused(){return this.focused$.asObservable()}setPack(t){return new Promise(r=>{this.packResolver.observePackContents(t).pipe((0,K.Q)(this.destroyed$)).subscribe(s=>{this.contents$.next(s),this.hidden$.next(this.getAssetIds(s)),r()})})}reveal(t){this.hidden$.pipe((0,Lm.h)()).subscribe(r=>{this.hidden$.next(r.filter(s=>s!==t))})}focus(t){this.focused$.next(t),this.sceneService.setStage("contents.zoomed")}revealAll(){this.hidden$.next([])}showAll(){this.focused$.next(void 0),this.sceneService.setStage("contents.all")}getAssetIds(t){return[...t.cards.map(r=>r.id),...t.cardbacks.map(r=>r.id),...t.trinkets.map(r=>r.id),...t.boards.map(r=>r.id),...t.packs.map(r=>r.id),...t.emotes.map(r=>r.id),...t.portraits.map(r=>r.id),...t.titles.map(r=>r.id)]}reset(){this.hidden$.next([]),this.contents$.next({cards:[],trinkets:[],boards:[],cardbacks:[],packs:[],emotes:[],portraits:[],titles:[]})}static#t=this.\u0275fac=function(r){return new(r||f)(y.KVO(HT),y.KVO(lc))};static#e=this.\u0275prov=y.jDH({token:f,factory:f.\u0275fac,providedIn:"root"})}return f})(),QT=(()=>{class f{constructor(t,r,s,l,u,g,_,x,M,C,P){this.loaderService=t,this.sceneService=r,this.packLoadingService=s,this.revealPackService=l,this.openPackService=u,this.nftPackOpenService=g,this.packGroupsService=_,this.skipControlService=x,this.assetsService=M,this.packResolver=C,this.destroyed$=new U.B,this.skip=!1,this.autoOpen=!1,this.processes$=new U.B,this.openPack$=new Po.m(1),this.cancel$=new U.B,this.debouncedShowPack=(0,sr.sg)(R=>{this.processes$.next(R)},500),this.config=P.getConfig(),this.packLoadingService.observePackClicks().pipe((0,K.Q)(this.destroyed$)).subscribe(R=>{this.openPack$.next(R.item)}),this.skipControlService.observeSkip().pipe((0,K.Q)(this.destroyed$)).subscribe(R=>{this.skip=R}),this.initPipe()}initPipe(){this.processes$.pipe((0,_t.n)(t=>(0,cc.of)(t).pipe((0,_t.n)(r=>this.revealPack(r)),(0,_t.n)(r=>this.waitForPackOpeningTrigger(r)),(0,_t.n)(r=>this.settleIfNft(r)),(0,_t.n)(r=>this.openPack(r)),(0,_t.n)(r=>this.revealContents(r)),(0,K.Q)(this.destroyed$),(0,K.Q)(this.processes$.pipe((0,ce.p)(r=>r.id!==t.id))),(0,K.Q)(this.cancel$),(0,CS.W)(r=>(console.error(r),RT.t)))),(0,K.Q)(this.destroyed$)).subscribe()}waitForPackOpeningTrigger(t){return this.autoOpen&&this.openPack$.next(t.item),this.openPack$.pipe((0,ce.p)(r=>t.item.id===r.id),(0,Kt.s)(1),(0,le.T)(()=>t))}cancel(){this.cancel$.next()}setAutoOpen(t=!0){this.autoOpen=t}settleIfNft(t){return t.item.nft?(this.sceneService.setStage("pack.opening"),(0,uA.H)(this.nftPackOpenService.open(t.item)).pipe((0,_t.n)(r=>{if("opened"!==r.status)return this.abandonNftOpen(),RT.t;const s={...t.item,cards:r.assetIds.map(l=>({id:l}))};return t.item=s,this.packResolver.forget(s.id),(0,uA.H)(this.assetsService.setPack(s)).pipe((0,Yt.M)(()=>this.markNftPackOpened(s)),(0,le.T)(()=>t))}))):(0,cc.of)(t)}abandonNftOpen(){this.sceneService.setStage("pack.revealed"),this.loaderService.resetPackAnimation()}markNftPackOpened(t){this.packGroupsService.removeOpenedNftPack(t)}
83revealPack(t){return this.sceneService.setStage("pack.revealing"),performance.mark("pack:reveal-start"),t.nft||this.assetsService.setPack(t).then(()=>{this.markPackOpenedWhenFullyRevealed(t)}),(0,Zh.z)({asset:(0,uA.H)(this.packLoadingService.preparePack(t)),pack:this.loadPackAnimation(t)}).pipe((0,_t.n)(({asset:r})=>(0,uA.H)(this.revealPackService.showPack(r,this.skip)).pipe((0,Yt.M)(()=>{performance.mark("pack:reveal-end"),performance.measure("pack \xb7 reveal animation","pack:reveal-start","pack:reveal-end"),this.sceneService.setStage("pack.revealed")}))),(0,CS.W)(r=>(console.error(r),this.sceneService.setStage("pack.error"),(0,yR.$)(()=>r))))}loadPackAnimation(t){var r=this;return(0,xi.A)(function*(){return r.loaderService.selectAnimation(t.set),(0,px._)(r.loaderService.observeAnimationLoaded().pipe((0,ce.p)(s=>s.id===t.set),(0,Kt.s)(1),(0,le.T)(()=>t)))})()}packOpenHandler(t){this.openPack$.next(t)}openPack(t){return this.loaderService.resetPackAnimation(),this.packLoadingService.removeInteraction(t),this.sceneService.setStage("pack.opening"),performance.mark("pack:open-start"),(0,uA.H)(this.openPackService.processOpen(t,this.skip)).pipe((0,Yt.M)(()=>{performance.mark("pack:open-end"),performance.measure("pack \xb7 open animation","pack:open-start","pack:open-end")}))}revealContents(t){return performance.mark("pack:contents-visible"),performance.measure("pack \xb7 total (reveal \u2192 contents)","pack:reveal-start","pack:contents-visible"),this.sceneService.setStage("contents.all"),(0,cc.of)(t)}markPackOpenedWhenFullyRevealed(t){this.assetsService.observeHidden().pipe((0,K.Q)(this.destroyed$),(0,K.Q)(this.processes$.pipe((0,ce.p)(r=>r.id!==t.id))),(0,K.Q)(this.cancel$),(0,ce.p)(r=>!r.length),(0,Kt.s)(1)).subscribe(()=>{this.packGroupsService.markOpened(t,this.config.isDebug)})}continue(){this.setAutoOpen(!1),this.sceneService.setStage("idle"),this.assetsService.reset(),this.loaderService.resetPackAnimation(),this.autoOpen=!1,this.config.isFollowing=!0}static#t=this.\u0275fac=function(r){return new(r||f)(y.KVO(TS),y.KVO(lc),y.KVO(hA),y.KVO(ER),y.KVO(bR),y.KVO(UT),y.KVO(dA),y.KVO(VT),y.KVO(Dm),y.KVO(HT),y.KVO(Wc))};static#e=this.\u0275prov=y.jDH({token:f,factory:f.\u0275fac,providedIn:"root"})}return f})(),zR=(()=>{class f{constructor(t,r,s,l){this.sceneService=t,this.flowService=r,this.packLoadingService=s,this.assetsService=l,this.destroyed$=new U.B,this.reset$=new U.B}ngOnDestroy(){this.destroyed$.next(),this.destroyed$.complete()}initialize(){const t=this.getCardStageListener(),r=this.getPackStageListener();this.sceneService.observeStage().pipe((0,K.Q)(this.destroyed$),(0,K.Q)(this.reset$)).subscribe(s=>{switch(s){case"pack.revealed":this.connect(r);break;case"contents.all":case"contents.single":case"contents.zoomed":this.connect(t),this.disconnect(r);break;default:this.disconnect(t),this.disconnect(r)}}),this.reset$.pipe((0,Kt.s)(1)).subscribe(()=>this.disconnect(t)),this.reset$.pipe((0,Kt.s)(1)).subscribe(()=>this.disconnect(r))}connect(t){this.disconnect(t),window.addEventListener("keydown",t)}destroy(){this.reset$.next()}disconnect(t){window.removeEventListener("keydown",t)}getPackStageListener(){return t=>{"Escape"===t.key&&(this.packLoadingService.destroySelectedPack(),this.flowService.continue())}}getCardStageListener(){let t=!1,r=0;return s=>{(0,Zh.z)({assetIds:this.assetsService.observeAssetIds().pipe((0,Lm.h)()),focused:this.assetsService.observeFocused().pipe((0,Kt.s)(1)),stage:this.sceneService.observeStage().pipe((0,Lm.h)())}).pipe((0,Kt.s)(1)).subscribe(({assetIds:l,focused:u,stage:g})=>{u&&(r=l.findIndex(_=>_===u),t=!0),this.handleKey(s.key,l,u,g,t,r)})}}handleKey(t,r,s,l,u,g){const _=r[g],x=r[g+1],M=r[g-1],C={Escape:()=>this.handleEscape(_,l),ArrowUp:()=>this.handleUpArrow(_,l),ArrowDown:()=>this.handleDownArrow(_,l),ArrowLeft:()=>this.handleArrow(u?M:r[r.length-1],_,l),ArrowRight:()=>this.handleArrow(u?x:_,_,l)};C[t]&&C[t]()}handleEscape(t,r){switch(r){case"contents.all":this.flowService.continue();break;case"contents.single":this.assetsService.showAll();break;case"contents.zoomed":this.assetsService.focus(t)}}handleUpArrow(t,r){switch(r){case"contents.all":this.assetsService.focus(t),this.assetsService.reveal(t);break;case"contents.single":case"contents.zoomed":this.assetsService.focus(t)}}handleDownArrow(t,r){switch(r){case"contents.single":case"contents.zoomed":this.assetsService.showAll()}}handleArrow(t,r,s){if(t)switch(s){case"contents.all":case"contents.single":case"contents.zoomed":this.assetsService.focus(t),this.assetsService.reveal(t)}else this.assetsService.showAll()}static#t=this.\u0275fac=function(r){return new(r||f)(y.KVO(lc),y.KVO(QT),y.KVO(hA),y.KVO(Dm))};static#e=this.\u0275prov=y.jDH({token:f,factory:f.\u0275fac,providedIn:"root"})}return f})();var GR=v(73329),_x=(v(65263),v(47385),v(75954)),WT=(v(14779),v(20777));let VR=(()=>{class f{constructor(t){this.controller=t}cancel(){this.controller.dismiss()}confirm(){this.controller.close()}static#t=this.\u0275fac=function(r){return new(r||f)(y.rXU(WT.WN))};static#e=this.\u0275cmp=y.VBU({type:f,selectors:[["cerberus-open-all-packs-confirmation-modal"]],decls:14,vars:0,consts:()=>{let t,r,s,l,u;return t="Open all packs?",r=" Confirming means you will skip the pack opening experience for all packs. ",s=" All cards from these packs will be discoverable on the 'Collections' page. ",l="Cancel",u="Confirm",[t,r,s,l,u,["type","info"],["size","large","fontWeight","extra-bold"],[1,"mt-3"],[1,"mb-6"],["layout","centered",1,"px-12"],["size","large","type","secondary","expand","true",3,"click"],["size","2x-small"],["size","large","type","primary","expand","true",3,"click"]]},template:function(r,s){1&r&&(y.j41(0,"gu-modal-dialog",5)(1,"gu-body-text",6),y.pXf(2,0),y.k0s(),y.j41(3,"gu-paragraph",7),y.pXf(4,1),y.k0s(),y.j41(5,"gu-paragraph",8),y.pXf(6,2),y.k0s(),y.j41(7,"gu-button-group",9)(8,"gu-hex-button",10),y.bIt("click",function(){return s.cancel()}),y.j41(9,"gu-heading-text",11),y.pXf(10,3),y.k0s()(),y.j41(11,"gu-hex-button",12),y.bIt("click",function(){return s.confirm()}),y.j41(12,"gu-heading-text",11),y.pXf(13,4),y.k0s()()()())}})}return f})();var HR=v(89033);const QR=f=>
83({"open-all-success-modal__inventory-link":!0,"open-all-success-modal__inventory-link--visible":f});let WR=(()=>{class f{constructor(t,r,s){this.controller=t,this.userWalletService=r,this.env=s,this.destroyed$=new U.B,this.hasWallet=!1}get inventoryUrl(){return`${this.env.marketplace.inventory.url}?time=week&tab=activity&filledType=bought`}ngOnInit(){this.userWalletService.observeUserWallet().pipe((0,le.T)(t=>0!=t.length),(0,K.Q)(this.destroyed$)).subscribe(t=>this.hasWallet=t)}ngOnDestroy(){this.destroyed$.next(),this.destroyed$.complete()}close(){this.controller.dismiss()}goToCollection(){this.controller.close()}static#t=this.\u0275fac=function(r){return new(r||f)(y.rXU(WT.WN),y.rXU(HR.S),y.rXU(it.CF))};static#e=this.\u0275cmp=y.VBU({type:f,selectors:[["cerberus-open-all-packs-success-modal"]],decls:20,vars:4,consts:()=>{let t,r,s,l,u;return t="You opened all of your packs",r="You can find the cards from these packs in your 'Collection'.",s="Close",l="Collection",u="View a summary of your newly minted cards",[t,r,s,l,u,["size","auto"],[1,"columns"],[1,"column","is-half"],["src","https://images.godsunchained.com/misc/720/bulk-open-success-image.webp",1,"open-all-success-modal__image"],[1,"column","is-half","open-all-success-modal__content"],["size","large","align","center","fillGradient","gradients.gold.simple",1,"open-all-success-modal__heading"],[1,"open-all-success-modal__cards","my-12"],["src","https://images.godsunchained.com/misc/1280/cards-array.webp",1,"open-all-success-modal__card"],["layout","balanced",1,"open-all-success-modal__ctas","px-16"],["type","secondary",1,"mr-2",3,"click"],["type","primary",1,"ml-2",3,"click"],["data-test-id","open.success.inventory-link","theme","light","target","_blank",3,"ngClass","href"],["iconLigature","leave_website","fillColor","colors.light.100"]]},template:function(r,s){1&r&&(y.j41(0,"gu-modal-window",5)(1,"div",6)(2,"div",7),y.nrm(3,"img",8),y.k0s(),y.j41(4,"div",9)(5,"gu-heading-text",10),y.pXf(6,0),y.k0s(),y.j41(7,"div",11),y.nrm(8,"img",12),y.k0s(),y.j41(9,"gu-paragraph"),y.pXf(10,1),y.k0s(),y.j41(11,"gu-button-group",13)(12,"gu-hex-button",14),y.bIt("click",function(){return s.close()}),y.pXf(13,2),y.k0s(),y.j41(14,"gu-hex-button",15),y.bIt("click",function(){return s.goToCollection()}),y.pXf(15,3),y.k0s()(),y.j41(16,"gu-link",16)(17,"gu-body-text"),y.pXf(18,4),y.k0s(),y.nrm(19,"gu-icon",17),y.k0s()()()()),2&r&&(y.R7$(16),y.Y8G("ngClass",y.eq3(2,QR,s.hasWallet))("href",s.inventoryUrl))},dependencies:[S.YU],styles:[".form-row[_ngcontent-%COMP%]{margin-bottom:16px}.form-row--with-validation[_ngcontent-%COMP%]{min-height:90px}[_nghost-%COMP%]{background-color:#0f1b27;overflow:hidden;width:85vw;max-width:1440px}.open-all-success-modal__image[_ngcontent-%COMP%]{width:100%;height:100%}.open-all-success-modal__content[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:24px 8px 64px}.open-all-success-modal__heading[_ngcontent-%COMP%]{max-width:500px}.open-all-success-modal__card[_ngcontent-%COMP%]{width:100%}.open-all-success-modal__ctas[_ngcontent-%COMP%]{align-self:stretch;margin-top:auto}.open-all-success-modal__inventory-link[_ngcontent-%COMP%]{margin-top:50px;visibility:hidden}.open-all-success-modal__inventory-link--visible[_ngcontent-%COMP%]{visibility:visible}"]})}return f})(),qR=(()=>{class f{constructor(t,r,s){this.packsService=t,this.nftPackOpenService=r,this.packGroupsService=s,this.cancelled=!1}cancel(){this.cancelled=!0}openAll(t,r){var s=this;return(0,xi.A)(function*(){s.cancelled=!1;const l=t.filter(k=>!k.nft),u=t.filter(k=>k.nft),g=u.filter(k=>k.nft?.openable),_=u.length-g.length,x=(l.length?1:0)+g.length;let M=0;const C=()=>r?.({completed:M,total:x});C();const P=l.length>0;let R=!1;P&&(R=yield s.openLegacyPacks(),M++,C());const F=yield s.openNftPacks(g,()=>{M++,C()}),O=F.nftOpened+F.nftFailed+F.nftAbandoned;return{legacyRequested:P,legacyOpened:R,nftTotal:g.length,...F,nftInterrupted:g.length-O,nftNotYetMintable:_}})()}openLegacyPacks(){var t=this;return(0,xi.A)(function*(){try{return"Success"===(yield(0,px._)(t.packsService.openAllPacks()))}catch{return!1}})()}openNftPacks(t,r){var s=this;return(0,xi.A)(function*(){let l=0,u=0,g=0,_=!1;const x=function(){var C=(0,xi.A)(function*(P){switch((yield s.nftPackOpenService.open(P)).status){case"opened":l++,_=!0,s.packGroupsService.removeOpenedNftPack(P);break;case"failed":u++;break;case"abandoned":g++}r()});return function(R){return C.apply(this,arguments)}}();let M=0;for(;M<t.length&&!_&&!s.cancelled;)yield x(t[M++]);return yield s.runPool(t.slice(M),3,x),{nftOpened:l,nftFailed:u,nftAbandoned:g}})()}runPool(t,r,s){var l=this;return(0,xi.A)(function*(){let u=0;const g=Array.from({length:Math.min(r,t.length)},(0,xi.A)(function*(){for(;u<t.length&&!l.cancelled;){const _=t[u++];yield s(_)}}));yield Promise.all(g)})()}static#t=this.\u0275fac=function(r){return new(r||f)(y.KVO(RS.u),y.KVO(UT),y.KVO(dA))};static#e=this.\u0275prov=y.jDH({token:f,factory:f.\u0275fac,providedIn:"root"})}return f})();const XT={core:"Core",domain:"Domain",mortal:"Mortal Judgement",order:"Devine Order",trial:"Trial of the Gods","sealed-base":"Sealed",m1:"Winter Wanderlands",wander:"Winter Wanderlands",m2:"Band of the Wolf",band:"Band of the Wolf",a1:"Tides of Fate",ti
83des:"Tides of Fate",a2:"Dread Awakening",dread:"Dread Awakening",m3:"Tower of Dread",tower:"Tower of Dread",fallen:"Fallen Age",m4:"Fallen Age",base:"Battle Pass",goe:"Guardians of Elderym",guardians:"Guardians of Elderym",revival:"Revival",m5:"Age of Ascent",ascent:"Age of Ascent",m6:"Roots of Ruin",roots:"Roots of Ruin",m7:"The Waking Plague",plague:"The Waking Plague",spoils:"Spoils",m8:"Reckoning",reckoning:"Reckoning"};let qT=(()=>{class f{transform(t){return XT[t]?XT[t]:`${t.substring(0,1).toUpperCase()}${t.substring(1)}`}static#t=this.\u0275fac=function(r){return new(r||f)};static#e=this.\u0275pipe=y.EJ8({name:"setName",type:f,pure:!0})}return f})(),YR=(()=>{class f{transform(t){let r="cards_stack";switch(t){case"core":case"genesis":case"trial":case"order":case"mortal":case"tides":case"wander":case"fallen":case"guardians":case"revival":case"dread":case"tower":case"ascent":case"roots":case"plague":case"reckoning":r=`set_${t}`;break;case"m1":r="set_wander";break;case"m2":r="set_band";break;case"a1":r="set_tides";break;case"a2":r="set_dread";break;case"m3":r="set_tower";break;
83case"m4":r="set_fallen";break;case"m5":r="set_ascent";break;case"m6":r="set_roots";break;case"m7":r="set_plague";break;case"m8":r="set_reckoning";break;case"goe":r="set_guardians";break;case"domain":r="filter_god"}return r}static#t=this.\u0275fac=function(r){return new(r||f)};static#e=this.\u0275pipe=y.EJ8({name:"setIcon",type:f,pure:!0})}return f})();function $R(f,e){1&f&&(y.j41(0,"div",17),y.nrm(1,"gu-rectangular-spinner",18),y.k0s())}function KR(f,e){if(1&f){const t=y.RV6();y.j41(0,"div",29),y.bIt("click",function(){const s=y.eBV(t).$implicit,l=y.XpG(3);return y.Njj(l.selectAssetGroup(s))}),y.j41(1,"div",30),y.qSk(),y.j41(2,"svg",31),y.nrm(3,"path",32)(4,"path",33),y.j41(5,"g",34),y.nrm(6,"path",35)(7,"path",36),y.k0s(),y.j41(8,"g",34),y.nrm(9,"path",37)(10,"path",38),y.k0s(),y.j41(11,"g",34),y.nrm(12,"path",39)(13,"path",40),y.k0s(),y.j41(14,"g",34),y.nrm(15,"path",41)(16,"path",42),y.k0s(),y.j41(17,"mask",43),y.nrm(18,"path",44),y.k0s(),y.j41(19,"g",45),y.nrm(20,"path",46)(21,"path",47),y.k0s(),y.nrm(22,"path",48)(23,"path",49)(24,"path",50)(25,"path",51),y.j41(26,"defs")(27,"linearGradient",52),y.nrm(28,"stop",53)(29,"stop",54)(30,"stop",55)(31,"stop",56)(32,"stop",57),y.k0s()()(),y.j41(33,"svg",58),y.nrm(34,"path",32)(35,"path",59),y.j41(36,"g",34),y.nrm(37,"path",35)(38,"path",36),y.k0s(),y.j41(39,"g",34),y.nrm(40,"path",37)(41,"path",38),y.k0s(),y.j41(42,"g",34),y.nrm(43,"path",60)(44,"path",40),y.k0s(),y.j41(45,"g",34),y.nrm(46,"path",61)(47,"path",42),y.k0s(),y.j41(48,"mask",62),y.nrm(49,"path",44),y.k0s(),y.j41(50,"g",63),y.nrm(51,"path",64)(52,"path",65),y.k0s(),y.nrm(53,"path",66)(54,"path",67)(55,"path",68)(56,"path",69),y.j41(57,"defs")(58,"linearGradient",70),y.nrm(59,"stop",53)(60,"stop",54)(61,"stop",55)(62,"stop",56)(63,"stop",57),y.k0s()()(),y.j41(64,"svg",71),y.nrm(65,"path",32)(66,"path",72),y.j41(67,"g",34),y.nrm(68,"path",35)(69,"path",36),y.k0s(),y.j41(70,"g",34),y.nrm(71,"path",37)(72,"path",38),y.k0s(),y.j41(73,"g",34),y.nrm(74,"path",60)(75,"path",40),y.k0s(),y.j41(76,"g",34),y.nrm(77,"path",61)(78,"path",42),y.k0s(),y.j41(79,"mask",73),y.nrm(80,"path",44),y.k0s(),y.j41(81,"g",74),y.nrm(82,"path",75)(83,"path",76),y.k0s(),y.nrm(84,"path",77)(85,"path",78)(86,"path",79)(87,"path",80),y.j41(88,"defs")(89,"linearGradient",81),y.nrm(90,"stop",53)(91,"stop",54)(92,"stop",55)(93,"stop",56)(94,"stop",57),y.k0s()()()(),y.joV(),y.j41(95,"div",82),y.qSk(),y.j41(96,"svg",83),y.nrm(97,"path",84)(98,"path",85)(99,"path",86)(100,"path",87),y.k0s(),y.j41(101,"svg",88),y.nrm(102,"path",89)(103,"path",90)(104,"path",91)(105,"path",92),y.k0s(),y.j41(106,"svg",93),y.nrm(107,"path",89)(108,"path",94)(109,"path",95)(110,"path",96),y.k0s(),y.joV(),y.j41(111,"gu-body-text",97),y.EFF(112),y.k0s()(),y.nrm(113,"gu-card-pack-picture",98),y.j41(114,"div",99)(115,"gu-body-text",100),y.EFF(116),y.k0s()()()}if(2&f){const t=e.$implicit,r=y.XpG(3);y.AVh("is-selected",r.isSelectedGroup(t)),y.R7$(112),y.SpI(" ",t.items.length," "),y.R7$(),y.FS9("rarity","neutral"===t.items[0].god?t.items[0].rarity:"rare"),y.FS9("god",t.items[0].god),y.FS9("set",t.items[0].set),y.R7$(3),y.SpI(" ",t.group," ")}}function ZR(f,e){if(1&f&&(y.qex(0),y.j41(1,"div",21),y.nrm(2,"gu-icon",22),y.nI1(3,"setIcon"),y.j41(4,"gu-body-text",23),y.EFF(5),y.nI1(6,"setName"),y.k0s(),y.j41(7,"div",24),y.qSk(),y.j41(8,"svg",25),y.nrm(9,"path",26),y.k0s(),y.j41(10,"svg",27),y.nrm(11,"path",26),y.k0s()()(),y.DNE(12,KR,117,7,"div",28),y.bVm()),2&f){const t=e.$implicit,r=y.XpG(2);y.R7$(2),y.FS9("iconLigature",y.bMT(3,4,t.set)),y.R7$(3),y.SpI(" ",y.bMT(6,6,t.set)," "),y.R7$(7),y.Y8G("ngForOf",t.items)("ngForTrackBy",r.trackByAssetGroup)}}function jR(f,e){if(1&f&&(y.j41(0,"div",19),y.DNE(1,ZR,13,8,"ng-container",20),y.k0s()),2&f){const t=y.XpG();y.R7$(),y.Y8G("ngForOf",t.groupedAssets)("ngForTrackBy",t.trackBySet)}}function JR(f,e){if(1&f){const t=y.RV6();y.j41(0,"gu-hex-button",101),y.bIt("click",function(){y.eBV(t);const s=y.XpG();return y.Njj(s.openAllPacks())}),y.pXf(1,4),y.k0s()}if(2&f){const t=y.XpG();y.AVh("hidden",t.isLoading),y.Y8G("disabled",!t.idle||t.isOpeningAll)}}function eB(f,e){if(1&f){const t=y.RV6();y.j41(0,"gu-hex-button",102),y.bIt("click",function(){y.eBV(t);const s=y.XpG();return y.Njj(s.openBuyPacks())}),y.pXf(1,5),y.k0s()}if(2&f){const t=y.XpG();y.AVh("hidden",t.isLoading)}}let YT=(()=>{class f{constructor(t,r,s,l,u,g,_,x,M,C){this.packsService=t,this.packGroupsService=r,this.openAllPacksService=s,this.changeDetector=l,this.modalService=u,this.audioService=g,this.animationService=_,this.router=x,this.sceneService=M,this.environment=C,this.groupedAssets=[],this.assets=[],this.isOpeningAll=!1,this.isLoading=!0,this.hasOpenablePacks=!1,this.isMuted=!1,this.isSkip=!1,this.visible=!1,this.idle=!0,this.selectPack=new y.bkB,this.panelShown=new y.bkB,this.destroyed$=new U.B}ngOnDestroy(){this.destroyed$.next(),this.destroyed$.complete(),this.openAllPacksService.cancel()}ngOnInit(){this.packsService.refresh(),this.initSettings(),this.initAssets(),this.sceneService.observeStage().pipe((0,K.Q)(this.destroyed$)).subscribe(t=>{switch(t){case"idle":case"pack.error":this.idle=!0,this.visible=!0;break;
83case"pack.revealing":this.idle=!1;break;case"pack.revealed":this.idle=!0;break;default:this.idle=!1,this.visible=!1}this.changeDetector.detectChanges()})}initAssets(){this.packGroupsService.observeSets().pipe((0,K.Q)(this.destroyed$)).subscribe(t=>{this.isLoading=!1,this.groupedAssets=t,this.changeDetector.markForCheck()}),this.packGroupsService.observeHasOpenablePacks().pipe((0,K.Q)(this.destroyed$)).subscribe(t=>{this.hasOpenablePacks=t,this.changeDetector.markForCheck()})}trackBySet(t,r){return r.set}trackByAssetGroup(t,r){return`${r.set}-${r.group}`}openBuyPacks(){"website"===this.environment.app?this.router.navigate([_x.s.buyPacks.path]):window.open(`${this.environment.website.url}/${_x.s.buyPacks.path}`)}openAllPacks(){this.isOpeningAll=!0,this.changeDetector.detectChanges(),this.modalService.open(VR).then(()=>{this.runOpenAll().catch(t=>{console.error("failed to open all packs",t),this.isOpeningAll=!1,this.changeDetector.detectChanges(),this.showOpenAllErrorModal()})},()=>{this.isOpeningAll=!1,this.changeDetector.detectChanges()})}runOpenAll(){var t=this;return(0,xi.A)(function*(){const r=yield(0,px._)(t.packGroupsService.observePacks().pipe((0,Kt.s)(1))),s=new U.B,l=t.modalService.open(LT.S,{progress$:s.asObservable(),title:"Opening Packs"}).catch(()=>{});let u;try{u=yield t.openAllPacksService.openAll(r,({completed:g,total:_})=>{const x=new IS.Cs(_?`Opening pack ${g} of ${_}...`:"Opening your packs...");x.progress=_?Math.round(g/_*100):100,s.next(x)})}finally{s.complete()}yield l,t.isOpeningAll=!1,t.changeDetector.detectChanges(),t.showOpenAllResultModal(u)})()}showOpenAllResultModal(t){t.legacyRequested||0!==t.nftTotal?t.legacyRequested&&!t.legacyOpened||0!==t.nftFailed||0!==t.nftAbandoned||0!==t.nftInterrupted?this.modalService.open(fA.Z,{type:"info",title:"Some Packs Were Not Opened",message:this.buildPartialResultMessage(t),action:"Close"}):this.showOpenAllSuccessModal():this.modalService.open(fA.Z,{type:"info",title:"Nothing to Open Yet",message:"Your packs are still being minted. Check back in a few minutes.",action:"Close"})}buildPartialResultMessage(t){const r=[];return t.legacyRequested&&r.push(t.legacyOpened?"Your legacy packs were opened.":"Your legacy packs could not be opened \u2014 please try again."),t.nftTotal>0&&r.push(`${t.nftOpened} of ${t.nftTotal} NFT packs were opened.`),(t.nftFailed>0||t.nftAbandoned>0||t.nftInterrupted>0)&&r.push("The rest are still in your collection \u2014 you can try opening them again."),t.nftNotYetMintable>0&&r.push(1===t.nftNotYetMintable?"1 pack is still being minted and will be ready soon.":`${t.nftNotYetMintable} packs are still being minted and will be ready soon.`),r.join(" ")}toggleSound(){this.audioService.toggleVolume()}toggleSkip(){this.animationService.toggleSkip()}isSelectedGroup(t){return this.selected?.group===t.group&&this.selected?.set===t.set}selectAssetGroup(t){this.selected=t,this.packGroupsService.select(t),this.selectPack.next(t.items[0])}initSettings(){this.audioService.observeVolume().pipe((0,K.Q)(this.destroyed$)).subscribe(t=>{this.isMuted=t<=0,this.changeDetector.detectChanges()}),this.animationService.observeSkip().pipe((0,K.Q)(this.destroyed$)).subscribe(t=>{this.isSkip=t,this.changeDetector.detectChanges()})}showOpenAllSuccessModal(){this.modalService.open(WR).then(()=>{this.isOpeningAll=!1,this.changeDetector.detectChanges(),this.router.navigate([this.getCollectionRoute()])},()=>{this.isOpeningAll=!1,this.changeDetector.detectChanges()})}getCollectionRoute(){switch(this.environment.app){case"desktop":return _x.J.collections.path;case"website":return _x.s.collections.path}}showOpenAllErrorModal(){this.modalService.open(fA.Z,{title:"Error",type:"error",message:"We couldn't open your packs. Please try again",action:"Close"})}static#t=this.\u0275fac=function(r){return new(r||f)(y.rXU(RS.u),y.rXU(dA),y.rXU(qR),y.rXU(y.gRc),y.rXU(PS.B),y.rXU(yC),y.rXU(VT),y.rXU(Ps.Ix),y.rXU(lc),y.rXU(it.CF))};static#e=this.\u0275cmp=y.VBU({type:f,selectors:[["cerberus-asset-panel"]],hostVars:2,hostBindings:function(r,s){2&r&&y.AVh("visible",s.visible)},outputs:{selectPack:"selectPack",panelShown:"panelShown"},decls:20,vars:9,consts:()=>{let t,r,s,l;return t="" + "\ufffd0\ufffd" + " Sound",r="" + "\ufffd0\ufffd" + " Animations",s="Open All Packs",l="Buy Packs",[["assetContent",""],["buyPacks",""],t,r,s,l,[1,"assetPanel",3,"mousedown","mouseup"],["class","assetPanel__loader",4,"ngIf","ngIfElse"],[1,"assetPanel__footer","pl-5"],[1,"assetPanel_controls"],["theme","gunmetal","size","normal","icononly","true",1,"assetPanel__toggle","mr-2",3,"click","icon"],["size","small","position","top"],["theme","gunmetal","size","normal","icononly","true",1,"assetPanel__toggle",3,"click","disabled","icon"],["type","secondary","class","assetPanel__openAll",3,"disabled","hidden","click",4,"ngIf","ngIfElse"],[1,"assetPanel__close"],["width","16","height","32","viewBox","0 0 16 32","fill","none","xmlns","http://www.w3.org/2000/svg"],["fill-rule","evenodd","clip-rule","evenodd","d","M16 -0.
8300012207L6.99382e-07 15.9999L16 31.9999L16 29.1103L2.88958 15.9999L16 2.88946L16 -0.00012207ZM7.99952 15.9999L15.9995 23.9999L15.9995 7.99988L7.99952 15.9999Z","fill","#F6F6F6"],[1,"assetPanel__loader"],["color","apocyan"],[1,"assetPanel__body","pt-5","pb-5","pl-6","pr-0"],[4,"ngFor","ngForOf","ngForTrackBy"],[1,"assetItem__set","mb-2","mr-6"],["fillcolor","#C6A052",1,"assetItem__icon","mr-2",3,"iconLigature"],["texttransform","uppercase","fillcolor","#C6A052","size","large",1,"assetItem__setLabel","mr-2"],[1,"assetItem__divider"],["width","6","height","6","fill","none","xmlns","http://www.w3.org/2000/svg",1,"assetItem__dividerLeft"],["d","M0 3.38232L2.5 0.882324L5 3.38232L2.5 5.88232L0 3.38232Z","fill","#C6A052"],["width","6","height","6","fill","none","xmlns","http://www.w3.org/2000/svg",1,"assetItem__dividerRight"],["class","assetItem__group mb-6 mr-3",3,"is-selected","click",4,"ngFor","ngForOf","ngForTrackBy"],[1,"assetItem__group","mb-6","mr-3",3,"click"],[1,"assetItem__bg"],["width","146","height","146","viewBox","0 0 146 146","fill","none","xmlns","http://www.w3.org/2000/svg",1,"assetItem__bg--base"],["d","M0 0H146V146H0V0Z","fill","#0F1B27"],["d","M5 5H141V141H5V5Z","fill","url(#paint0_linear_94_12215)"],["opacity","0.5"],["d","M5 40.0005V41.4147L41.4147 5H40.0005L5 40.0005Z","fill","#1D2F41"],["d","M31 5H5V31L31 5Z","fill","#1D2F41"],["d","M5 106.414V105L41.4147 141.415H40.0005L5 106.414Z","fill","#1D2F41"],["d","M31 141.415H5V115.415L31 141.415Z","fill","#1D2F41"],["d","M141 40.0005V41.4147L104.585 5H106L141 40.0005Z","fill","#1D2F41"],["d","M115 5H141V31L115 5Z","fill","#1D2F41"],["d","M141 106.414V105L104.585 141.415H106L141 106.414Z","fill","#1D2F41"],["d","M115 141.415H141V115.415L115 141.415Z","fill","#1D2F41"],["id","mask0_94_12215","maskUnits","userSpaceOnUse","x","0","y","0","width","146","height","146",2,"mask-type","alpha"],["fill-rule","evenodd","clip-rule","evenodd","d","M50.076 0H0V39L10 49V97L0 107V146H146V107L136 97V49L146 39V0H95.924L73 22.924L50.076 0Z","fill","#3D5A74"],["mask","url(#mask0_94_12215)"],["d","M1 1H145V145H1V1Z","stroke","#3D5A74","stroke-width","2"],["d","M4.5 4.5H141.5V141.5H4.5V4.5Z","stroke","#3D5A74"],["d","M0.5 95.7929V50.2071L9.5 59.2071V86.7929L0.5 95.7929Z","fill","#1D2F41","stroke","#3D5A74"],["d","M0.5 105.793V40.2071L9.5 49.2071V96.7929L0.5 105.793Z","stroke","#3D5A74"],["d","M145.5 95.7929V50.2071L136.5 59.2071V86.7929L145.5 95.7929Z","fill","#1D2F41","stroke","#3D5A74"],["d","M145.5 105.793V40.2071L136.5 49.2071V96.7929L145.5 105.793Z","stroke","#3D5A74"],["id","paint0_linear_94_12215","x1","5","y1","73","x2","141","y2","73","gradientUnits","userSpaceOnUse"],["stop-color","#0F1B27"],["offset","0.1153","stop-color","#0F1B27"],["offset","0.5005","stop-color","#1D2F41"],["offset","0.8869","stop-color","#0F1B27"],["offset","1","stop-color","#0F1B27"],["width","146","height","146","viewBox","0 0 146 146","fill","none","xmlns","http://www.w3.org/2000/svg",1,"assetItem__bg--hover"],["d","M5 5H141V141H5V5Z","fill","url(#paint0_linear_2651_31276)"],["d","M141 40.0005V41.4147L104.585 5H105.999L141 40.0005Z","fill","#1D2F41"],["d","M141 106.414V105L104.585 141.415H105.999L141 106.414Z","fill","#1D2F41"],["id","mask0_2651_31276","maskUnits","userSpaceOnUse","x","0","y","0","width","146","height","146",2,"mask-type","alpha"],["mask","url(#mask0_2651_31276)"],["d","M1 1H145V145H1V1Z","stroke","#7192B0","stroke-width","2"],["d","M4.5 4.5H141.5V141.5H4.5V4.5Z","stroke","#7192B0"],["d","M0.5 95.7929V50.2071L9.5 59.2071V86.7929L0.5 95.7929Z","fill","#1D2F41","stroke","#7192B0"],["d","M0.5 105.793V40.2071L9.5 49.2071V96.7929L0.5 105.793Z","stroke","#7192B0"],["d","M145.5 95.7929V50.2071L136.5 59.2071V86.7929L145.5 95.7929Z","fill","#1D2F41","stroke","#7192B0"],["d","M145.5 105.793V40.2071L136.5 49.2071V96.7929L145.5 105.793Z","stroke","#7192B0"],["id","paint0_linear_2651_31276","x1","5","y1","73","x2","141","y2","73","gradientUnits","userSpaceOnUse"],["width","146","height","146","viewBox","0 0 146 146","fill","none","xmlns","http://www.w3.org/2000/svg",1,"assetItem__bg--selected"],["d","M5 5H141V141H5V5Z","fill","url(#paint0_linear_2651_31326)"],["id","mask0_2651_31326","maskUnits","userSpaceOnUse","x","0","y","0","width","146","height","146",2,"mask-type","alpha"],["mask","url(#mask0_2651_31326)"],["d","M1 1H145V145H1V1Z","stroke","#8BE1E0","stroke-width","2"],["d","M4.5 4.5H141.5V141.5H4.5V4.5Z","stroke","#54BBCD"],["d","M0.5 95.7929V50.2071L9.5 59.2071V86.7929L0.5 95.7929Z","fill","#1D2F4
831","stroke","#54BBCD"],["d","M0.5 105.793V40.2071L9.5 49.2071V96.7929L0.5 105.793Z","stroke","#8BE1E0"],["d","M145.5 95.7929V50.2071L136.5 59.2071V86.7929L145.5 95.7929Z","fill","#1D2F41","stroke","#54BBCD"],["d","M145.5 105.793V40.2071L136.5 49.2071V96.7929L145.5 105.793Z","stroke","#8BE1E0"],["id","paint0_linear_2651_31326","x1","5","y1","73","x2","141","y2","73","gradientUnits","userSpaceOnUse"],[1,"assetItem__count"],["width","50","height","38","viewBox","0 0 50 38","fill","none","xmlns","http://www.w3.org/2000/svg",1,"assetItem__count--base"],["d","M-0.000366211 18H49.9996L38.9996 29H10.9996L-0.000366211 18Z","fill","#0F1B27"],["fill-rule","evenodd","clip-rule","evenodd","d","M12.9996 27H11.8281L2.82806 18H-0.000366211L10.9996 29H14.9996L12.9996 27ZM34.9996 29H38.9996L49.9996 18H47.1712L38.1712 27H36.9996L34.9996 29Z","fill","#3D5A74"],["d","M41.9408 17.0003L41.9409 19.9706L24.9704 36.9411L7.99979 19.9706L7.99979 17L41.9408 17.0003Z","fill","#3D5A74"],["d","M24.9703 0.707107L41.2338 16.9706L24.9703 33.234L8.70688 16.9706L24.9703 0.707107Z","fill","#1D2F41","stroke","#3D5A74"],["width","50","height","37","viewBox","0 0 50 37","fill","none","xmlns","http://www.w3.org/2000/svg",1,"assetItem__count--hover"],["d","M-0.000244141 18H49.9998L38.9998 29H10.9998L-0.000244141 18Z","fill","#0F1B27"],["fill-rule","evenodd","clip-rule","evenodd","d","M12.9998 27H11.8282L2.82818 18H-0.000244141L10.9998 29H14.9998L12.9998 27ZM34.9998 29H38.9998L49.9998 18H47.1713L38.1713 27H36.9998L34.9998 29Z","fill","#7192B0"],["d","M41.941 17.0003L41.9411 19.9706L24.9705 36.9411L7.99996 19.9706L8.0001 17.0001L41.941 17.0003Z","fill","#7192B0"],["d","M24.9705 0.707105L41.2339 16.9706L24.9705 33.234L8.707 16.9706L24.9705 0.707105Z","fill","#1D2F41","stroke","#7192B0"],["width","50","height","37","viewBox","0 0 50 37","fill","none","xmlns","http://www.w3.org/2000/svg",1,"assetItem__count--selected"],["fill-rule","evenodd","clip-rule","evenodd","d","M12.9998 27H11.8282L2.82818 18H-0.000244141L10.9998 29H14.9998L12.9998 27ZM34.9998 29H38.9998L49.9998 18H47.1713L38.1713 27H36.9998L34.9998 29Z","fill","#8BE1E0"],["d","M41.941 17.0003L41.9411 19.9706L24.9705 36.9411L7.99996 19.9706L8.0001 17.0001L41.941 17.0003Z","fill","#54BBCD"],["d","M24.9705 0.707105L41.2339 16.9706L24.9705 33.234L8.707 16.9706L24.9705 0.707105Z","fill","#1D2F41","stroke","#8BE1E0"],["size","small","fontweight","regular","fillcolor","colors.light.100","fontstyle","regular","align","center",1,"assetCount__label"],["type","temple","imageSize","250",1,"assetGroup__picture",3,"rarity","god","set"],[1,"assetGroup__label"],["size","medium","fontweight","regular","fillcolor","colors.light.100","fontstyle","regular","align","center"],["type","secondary",1,"assetPanel__openAll",3,"click","disabled"],["type","secondary",1,"assetPanel__openAll",3,"click"]]},template:function(r,s){if(1&r){const l=y.RV6();y.j41(0,"div",6),y.bIt("mousedown",function(g){return y.eBV(l),y.Njj(g.stopPropagation())})("mouseup",function(g){return y.eBV(l),y.Njj(g.stopPropagation())}),y.DNE(1,$R,2,0,"div",7)(2,jR,2,2,"ng-template",null,0,y.C5r),y.j41(4,"div",8)(5,"div",9)(6,"span")(7,"gu-standard-button",10),y.bIt("click",function(){return y.eBV(l),y.Njj(s.toggleSound())}),y.k0s(),y.j41(8,"gu-tooltip",11),y.pXf(9,2),y.k0s()(),y.j41(10,"span")(11,"gu-standard-button",12),y.bIt("click",function(){return y.eBV(l),y.Njj(s.toggleSkip())}),y.k0s(),y.j41(12,"gu-tooltip",11),y.pXf(13,3),y.k0s()()(),y.DNE(14,JR,2,3,"gu-hex-button",13)(15,eB,2,2,"ng-template",null,1,y.C5r),y.j41(17,"div",14),y.qSk(),y.j41(18,"svg",15),y.nrm(19,"path",16),y.k0s()()()()}if(2&r){const l=y.sdS(3),u=y.sdS(16);y.R7$(),y.Y8G("ngIf",s.isLoading)("ngIfElse",l),y.R7$(6),y.Y8G("icon",s.isMuted?"action_mute":"action_unmute"),y.R7$(2),y.uP7(s.isMuted?"Unmute":"Mute"),y.nnv(9),y.R7$(2),y.Y8G("disabled",!s.idle)("icon",s.isSkip?"action_disableAnimation":"action_enableAnimation"),y.R7$(2),y.uP7(s.isSkip?"Enable":"Disable"),y.nnv(13),y.R7$(),y.Y8G("ngIf",(null==s.groupedAssets?null:s.groupedAssets.length)&&s.hasOpenablePacks)("ngIfElse",u)}},dependencies:[S.Sq,S.bT,qT,YR],styles:['[_nghost-%COMP%]{position:relative;display:flex;transition:max-width .3s ease-out;height:100%;width:512px;max-width:0}.visible[_nghost-%COMP%]{max-width:512px}.assetPanel[_ngcontent-%COMP%]{position:absolute;display:flex;flex-direction:column;width:512px;height:100%;background:#0009;box-shadow:5px 0 5px #0000004d;pointer-events:all;top:0;right:0}.assetPanel__body[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;flex-grow:1;height:100%;overflow:auto;align-content:flex-start}.assetPanel__loader[_ngcontent-%COMP%]{width:100%;height:100%;align-items:center;display:flex;justify-content:center}.assetPanel__footer[_ngcontent-%COMP%]{align-items:center;border-top:solid 2px #3D5A74;display:flex;justify-content:space-between;width:100%;height:77px;background:linear-gradient(90deg,#1d2f41,#0f1b27)}.assetPanel__close[_ngcontent-%COMP%]{background-color:#3d5a74;height:100%;display:flex;align-items:center;width:40px;justify-content:center;opacity:0}
83.assetItem[_ngcontent-%COMP%]{display:flex;width:30%}.assetItem__bg--hover[_ngcontent-%COMP%], .assetItem__bg--selected[_ngcontent-%COMP%]{position:absolute;top:0;z-index:1;display:none;opacity:0;transition:all .3s ease-out}.assetItem__group[_ngcontent-%COMP%]{width:100%;cursor:pointer}.assetItem__group[_ngcontent-%COMP%]   .assetItem__bg--base[_ngcontent-%COMP%]{display:block}.assetItem__group[_ngcontent-%COMP%]   .assetItem__bg--selected[_ngcontent-%COMP%], .assetItem__group[_ngcontent-%COMP%]   .assetItem__bg--hover[_ngcontent-%COMP%]{display:block;opacity:0}.assetItem__group[_ngcontent-%COMP%]:hover:not(.assetItem__group.is-selected)   .assetGroup__picture[_ngcontent-%COMP%]{transform:scale(.9)}.assetItem__group[_ngcontent-%COMP%]:hover:not(.assetItem__group.is-selected)   .assetItem__count--hover[_ngcontent-%COMP%], .assetItem__group[_ngcontent-%COMP%]:hover:not(.assetItem__group.is-selected)   .assetItem__bg--hover[_ngcontent-%COMP%]{opacity:1}.assetItem__group[_ngcontent-%COMP%]:hover:not(.assetItem__group.is-selected)   .assetItem__bg--selected[_ngcontent-%COMP%], .assetItem__group[_ngcontent-%COMP%]:hover:not(.assetItem__group.is-selected)   .assetItem__count--selected[_ngcontent-%COMP%]{opacity:0}.assetItem__group.is-selected[_ngcontent-%COMP%]   .assetGroup__picture[_ngcontent-%COMP%]{transform:scale(.9)}.assetItem__group.is-selected[_ngcontent-%COMP%]   .assetItem__count--hover[_ngcontent-%COMP%], .assetItem__group.is-selected[_ngcontent-%COMP%]   .assetItem__bg--hover[_ngcontent-%COMP%]{opacity:0}.assetItem__group.is-selected[_ngcontent-%COMP%]   .assetItem__bg--selected[_ngcontent-%COMP%], .assetItem__group.is-selected[_ngcontent-%COMP%]   .assetItem__count--selected[_ngcontent-%COMP%]{opacity:1}.assetItem__group[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{pointer-events:none}.assetItem__group[_ngcontent-%COMP%]{padding-top:18px;position:relative;display:flex;width:146px;flex-direction:column}.assetItem__bg[_ngcontent-%COMP%]{position:absolute;z-index:0;background:#0f1b27;border:solid 2px #0F1B27;border-bottom:0px;width:100%;top:14px;bottom:0}.assetItem__bg[_ngcontent-%COMP%] > svg[_ngcontent-%COMP%]{width:100%}.assetItem__count[_ngcontent-%COMP%]{position:absolute;z-index:1;top:0;left:48px;width:50px}.assetItem__count--base[_ngcontent-%COMP%]{position:absolute;top:0;z-index:1}.assetItem__count--hover[_ngcontent-%COMP%], .assetItem__count--selected[_ngcontent-%COMP%]{position:absolute;top:0;z-index:1;opacity:0}.assetItem__set[_ngcontent-%COMP%]{display:flex;width:100%}.assetItem__setLabel[_ngcontent-%COMP%]{display:flex}.assetItem__icon[_ngcontent-%COMP%]{font-size:22px;color:#c6a052}.assetItem__divider[_ngcontent-%COMP%]{position:relative;flex-grow:1}.assetItem__dividerLeft[_ngcontent-%COMP%]{position:absolute;left:0;top:50%;transform:translateY(-50%)}.assetItem__dividerRight[_ngcontent-%COMP%]{position:absolute;right:0;top:50%;transform:translateY(-50%)}.assetItem__divider[_ngcontent-%COMP%]:after{content:"";position:absolute;top:50%;transform:translateY(-50%);height:2px;left:7px;right:8px;border-bottom:1px solid #C6A052}.assetCount__label[_ngcontent-%COMP%]{position:absolute;z-index:1;top:5px;left:50%;transform:translate(-50%)}.assetGroup__label[_ngcontent-%COMP%]{border:2px solid #1D2F41;background-color:#0f1b27;padding:2px 4px;display:flex;justify-content:center;flex-grow:1;will-change:true;z-index:1;margin:0 2px 2px;align-items:center;text-transform:capitalize}.assetGroup__picture[_ngcontent-%COMP%]{height:144px;transform:scale(85%);transition:all .3s ease-out}@media screen and (max-width: 1279px){[_nghost-%COMP%]{width:204px}.visible[_nghost-%COMP%]{max-width:204px}.assetPanel[_ngcontent-%COMP%]{width:204px}.assetItem__setLabel[_ngcontent-%COMP%], .assetPanel__openAll[_ngcontent-%COMP%]{display:none}}@media screen and (max-width: 1023px){[_nghost-%COMP%], .visible[_nghost-%COMP%]{max-width:100%;width:100%;background:#000000e6;height:40%}.assetPanel[_ngcontent-%COMP%]{width:100%}.assetItem__setLabel[_ngcontent-%COMP%], .assetPanel__openAll[_ngcontent-%COMP%]{display:flex}}'],changeDetection:0})}return f})();const tB=["tooltip"],nB=["tooltipBox"];let iB=(()=>{class f{constructor(t,r,s,l,u){this.changeDetector=t,this.cameraService=r,this.assetsService=s,this.sceneService=l,this.destroyed$=new U.B,this.type="",this.name="",this.rarity="",this.config=u.getConfig()}ngOnInit(){this.listener=this.tooltipMousemove.bind(this),(0,Zh.z)({assetIds:this.assetsService.observeAssetIds(),assetId:(0,cc.of)(void 0),stage:this.sceneService.observeStage()}).pipe((0,K.Q)(this.destroyed$)).subscribe(({assetIds:t,assetId:r,stage:s})=>{"contents.all"===s&&r&&!t.includes(r)?this.showTooltip(r):this.hideTooltip()})}ngOnDestroy(){this.destroyed$.next(),this.destroyed$.complete(),window.removeEventListener("mousemove",this.listener)}showTooltip(t){if(!t||t.rarity?.length<=0)return void this.hideTooltip();this.type=`${t.type.substring(0,1).toUpperCase()}${t.type.substring(1)}`,this.name=t.name.trim(),this.rarity=t.rarity?`(${t.rarity.trim()})`:"",this.changeDetector.detectChanges(),window.addEventListener("mousemove",this.listener);const r=window.scrollX||window.pageXOffset,s=window.scrollY||window.pageYOffset;br.set(this.tooltipRef.nativeElement,{x:this.config.mouse.screenX+r,y:this.config.mouse.screenY+s-80-70});const l=this.tooltipBoxRef.nativeElement;br.to(l,{opacity:1,duration:.3,ease:"power1.out"}),br.fromTo(l,{y:"-50%"},{y:"-100%",duration:.3,ease:"power1.out"})}hideTooltip(){const t=this.tooltipBoxRef.nativeElement;br.killTweensOf(t),br.set(t,{opacity:0}
83),window.removeEventListener("mousemove",this.listener)}tooltipMousemove(t){const s=window.scrollX||window.pageXOffset,l=window.scrollY||window.pageYOffset;br.set(this.tooltipRef.nativeElement,{x:(t.clientX||t.pageX)+s,y:(t.clientY||t.pageY)+l-80-70}),this.cameraService.screenIntersectsObject(this.config.mouse.screenX,this.config.mouse.screenY,this.config.targetItem)||this.hideTooltip()}static#t=this.\u0275fac=function(r){return new(r||f)(y.rXU(y.gRc),y.rXU($h),y.rXU(Dm),y.rXU(lc),y.rXU(Wc))};static#e=this.\u0275cmp=y.VBU({type:f,selectors:[["cerberus-tooltip"]],viewQuery:function(r,s){if(1&r&&(y.GBs(tB,7),y.GBs(nB,7)),2&r){let l;y.mGM(l=y.lsd())&&(s.tooltipRef=l.first),y.mGM(l=y.lsd())&&(s.tooltipBoxRef=l.first)}},decls:12,vars:3,consts:[["tooltip",""],["tooltipBox",""],[1,"openPacks__tooltip"],["data-placement","top","data-size","small",1,"tippy-box"],[1,"tippy-content"],["fontWeight","bold","align","center","size","x-small","fillColor","colors.light.100","fillGradient","gradients.gold.simple","fillGradientTarget","bottom",1,"type"],["fontWeight","bold","align","center","size","small","fillColor","colors.light.100",1,"name"],["align","center","size","x-small","fillColor","colors.light.100",1,"rarity"],[1,"tippy-arrow"]],template:function(r,s){1&r&&(y.j41(0,"div",2,0)(2,"div",3,1)(4,"div",4)(5,"gu-paragraph",5),y.EFF(6),y.k0s(),y.j41(7,"gu-paragraph",6),y.EFF(8),y.k0s(),y.j41(9,"gu-paragraph",7),y.EFF(10),y.k0s()(),y.nrm(11,"div",8),y.k0s()()),2&r&&(y.R7$(6),y.SpI(" ",s.type," "),y.R7$(2),y.SpI(" ",s.name," "),y.R7$(2),y.SpI(" ",s.rarity," "))},styles:['[_nghost-%COMP%]{position:absolute;left:0;top:0;pointer-events:none;-webkit-user-select:none;user-select:none}.openPacks__tooltip[_ngcontent-%COMP%]{pointer-events:none;-webkit-user-select:none;user-select:none;position:absolute;display:block}.openPacks__tooltip[_ngcontent-%COMP%]   .tippy-content[_ngcontent-%COMP%]{padding:5px 9px}.openPacks__tooltip[_ngcontent-%COMP%]   .tippy-box[_ngcontent-%COMP%]{transform:translate(-50%) translateY(-100%);--standardBorderSize: 2px;--arrowSideLength: 18px;--arrowOffset: -9px;display:block;text-align:center;background:#0f1b27;border-width:var(--standardBorderSize);border-style:solid;border-color:#527493;border-radius:4px;white-space:break-spaces;z-index:-1}.openPacks__tooltip[_ngcontent-%COMP%]   .tippy-box[data-size=small][_ngcontent-%COMP%] > .tippy-content[_ngcontent-%COMP%]{padding:12px 24px}.openPacks__tooltip[_ngcontent-%COMP%]   .tippy-box[data-size=large][_ngcontent-%COMP%] > .tippy-content[_ngcontent-%COMP%]{padding:28px}.openPacks__tooltip[_ngcontent-%COMP%]   .tippy-arrow[_ngcontent-%COMP%]{width:var(--arrowSideLength);height:var(--arrowSideLength);background:transparent;position:absolute;left:50%;transform:translate(-50%);z-index:1}.openPacks__tooltip[_ngcontent-%COMP%]   .tippy-arrow[_ngcontent-%COMP%]:before{content:"";position:absolute;left:0;width:100%;height:100%;background-color:#0f1b27;border-bottom:var(--standardBorderSize) solid #527493;border-right:var(--standardBorderSize) solid #527493;border-top:var(--standardBorderSize) solid transparent;border-left:var(--standardBorderSize) solid transparent;border-radius:2px}.openPacks__tooltip[_ngcontent-%COMP%]   .tippy-box[data-placement^=top][_ngcontent-%COMP%] > .tippy-arrow[_ngcontent-%COMP%]{bottom:var(--arrowOffset)}.openPacks__tooltip[_ngcontent-%COMP%]   .tippy-box[data-placement^=top][_ngcontent-%COMP%] > .tippy-arrow[_ngcontent-%COMP%]:before{transform:rotate(45deg)}.type[_ngcontent-%COMP%], .name[_ngcontent-%COMP%], .rarity[_ngcontent-%COMP%]{white-space:nowrap;text-align:center}'],changeDetection:0})}return f})();const rB=["nextButton"],sB=["revealAllButton"],aB=["backButton"];function oB(f,e){if(1&f){const t=y.RV6();y.j41(0,"gu-hex-button",10,0),y.bIt("click",function(){y.eBV(t);const s=y.XpG();return y.Njj(s.handleRevealAll())})("mousedown",function(s){return y.eBV(t),y.Njj(s.stopPropagation())})("mouseup",function(s){return y.eBV(t),y.Njj(s.stopPropagation())}),y.pXf(2,3),y.k0s()}if(2&f){const t=y.XpG();y.Y8G("disabled",!t.visible)}}function lB(f,e){if(1&f){const t=y.RV6();y.j41(0,"gu-hex-button",14,2),y.bIt("click",function(){y.eBV(t);const s=y.XpG(2);return y.Njj(s.handleNextPack())})("mousedown",function(s){return y.eBV(t),y.Njj(s.stopPropagation())})("mouseup",function(s){return y.eBV(t),y.Njj(s.stopPropagation())}),y.pXf(2,6),y.k0s()}if(2&f){const t=y.XpG(2);y.Y8G("disabled",!t.visible)}}function cB(f,e){if(1&f){const t=y.RV6();y.qex(0),y.DNE(1,lB,3,1,"gu-hex-button",11),y.j41(2,"gu-hex-button",12,1),y.bIt("click",function(){y.eBV(t);const s=y.XpG();return y.Njj(s.handleContinue())})("mousedown",function(s){return y.eBV(t),y.Njj(s.stopPropagation())})("mouseup",function(s){return y.eBV(t),y.Njj(s.stopPropagation())}),y.pXf(4,4),y.k0s(),y.j41(5,"gu-body-text",13),y.pXf(6,5),y.k0s(),y.bVm()}if(2&f){const t=y.XpG();y.R7$(),y.Y8G("ngIf",t.packsLeft>0),y.R7$(),y.Y8G("disabled",!t.visible),y.R7$(4),y.uP7(t.packsLeft),y.nnv(6)}}let hB=(()=>{class f{constructor(t,r,s,l){this.sceneService=t,this.packGroupsService=r,this.assetsService=s,this.changeDetector=l,this.destroyed$=new U.B,this.visible=!1,this.complete=!1,this.packsLeft=0,this.continue=new y.bkB,this.next=new y.bkB}ngOnInit(){this.packGroupsService.observePacks().pipe((0,K.Q)(this.destroyed$)).subscribe(t=>this.packsLeft=t.length),(0,Zh.z)({stage:this.sceneService.observeStage(),hiddenAssetIds:this.assetsService.observeHidden()}).pipe((0,K.Q)(this.destroyed$)).subscribe(({stage:t,hiddenAssetIds:r})=>{this.handleStageChange(t,r),this.changeDetector.detectChanges()})}handleStageChange(t,r){switch(t){case"contents.all":this.handleContentsAllStage(r);break;case"contents.zoomed":case"contents.single":this.complete=!r.length,this.visible=!1;break;default:this.complete=!0,this.visible=!1}}handleContentsAllStage(t){t.length?setTimeout(()=>this.revealAllButton?.nativeElement?.focus(),10):this.packsLeft>0?this.nextButton?.nativeElement?.focus():this.backButton.nativeElement?.focus(),this.complete=!t.length,this.visible=!0}ngOnDestroy(){this.destroyed$.next(),this.destroyed$.complete()}handleRevealAll(){this.assetsService.revealAll()}handleNextPack(){this.next.emit()}handleContinue(){this.continue.emit()}static#t=this.\u0275fac=function(r){return new(r||f)(y.rXU(lc),y.rXU(dA),y.rXU(Dm),y.rXU(y.gRc))};static#e=this.\u0275cmp=y.VBU({type:f,selectors:[["cerberus-pack-content-footer"]],viewQuery:function(r,s){if(1&r&&(y.GBs(rB,5),y.GBs(sB,5),y.GBs(aB,5)),2&r){let l;y.mGM(l=y.lsd())&&(s.nextButton=l.first),y.mGM(l=y.lsd())&&(s.revealAllButton=l.first),y.mGM(l=y.lsd())&&(s.backButton=l.first)}},inputs:{packsLeft:"packsLeft"},outputs:{continue:"continue",next:"next"},decls:3,vars:4,consts:()=>{let t,r,s,l;return t=" Reveal all cards ",r=" Back ",s=" " + "\ufffd0\ufffd" + " packs left ",l=" Next Pack ",[["revealAllButton",""],["backButton",""],["nextButton",""],t,r,s,l,[1,"openPacks__footer"],["size","large","type","primary",3,"disabled","click","mousedown","mouseup",4,"ngIf"],[4,"ngIf"],["size","large","type","primary",3,"click","mousedown","mouseup","disabled"],["size","large","type","primary","class","openPacks__cta mb-3",3,"disabled","click","mousedown","mouseup",4,"ngIf"],["size","large","type","secondary",1,"openPacks__cta","mb-3",3,"click","mousedown","mouseup","disabled"],["fillColor","colors.light.100",1,"mb-5"],["size","large","type","primary",1,"openPacks__cta","mb-3",3,"click","mousedown","mouseup","disabled"]]},template:function(r,s){1&r&&(y.j41(0,"div",7),y.DNE(1,oB,3,1,"gu-hex-button",8)(2,cB,7,3,"ng-container",9),y.k0s()),2&r&&(y.AVh("hidden",!s.visible),y.R7$(),y.Y8G("ngIf",!s.complete),y.R7$(),y.Y8G("ngIf",s.complete))},dependencies:[S.bT],styles:[".openPacks__footer[_ngcontent-%COMP%]{position:absolute;
83left:0;bottom:0;width:100%;height:30%;display:flex;align-items:center;justify-content:center;flex-direction:column;opacity:1;transition:opacity .5s ease,bottom .5s ease;z-index:1}.openPacks__footer.hidden[_ngcontent-%COMP%]{pointer-events:none;opacity:0;bottom:-20px}"],changeDetection:0})}return f})();v(81607);const uB=["openButton"],fB=f=>({visible:f});function dB(f,e){if(1&f){const t=y.RV6();y.j41(0,"div",4)(1,"gu-heading-text",5),y.pXf(2,1),y.k0s(),y.j41(3,"gu-body-text",6),y.EFF(4),y.nI1(5,"setName"),y.k0s(),y.nrm(6,"gu-progress-bar",7),y.j41(7,"gu-hex-button",8,0),y.bIt("click",function(){y.eBV(t);const s=y.XpG();return y.Njj(s.handleOpenPack())})("mousedown",function(s){return y.eBV(t),y.Njj(s.stopPropagation())})("mouseup",function(s){return y.eBV(t),y.Njj(s.stopPropagation())}),y.pXf(9,2),y.k0s()()}if(2&f){const t=y.XpG();y.R7$(2),y.uP7(t.pack.rarity),y.nnv(2),y.R7$(2),y.SpI(" ",y.bMT(5,7,t.pack.set)," "),y.R7$(2),y.Y8G("ngClass",y.eq3(9,fB,t.progressVisible))("progress",t.percentage),y.R7$(),y.Y8G("loading",!t.interacting)("disabled",!t.interacting),y.R7$(2),y.uP7(t.error?"Pack Error":"Open Pack"),y.nnv(9)}}let pB=(()=>{class f{constructor(t,r,s,l,u){this.sceneService=t,this.loaderService=r,this.packLoadingService=s,this.changeDetector=l,this.destroyed$=new U.B,this.openPack=new y.bkB,this.visible=!1,this.interacting=!1,this.error=!1,this.percentage=0,this.progressVisible=!1,this.nativeElement=u.nativeElement}ngOnInit(){this.sceneService.observeStage().pipe((0,K.Q)(this.destroyed$)).subscribe(t=>this.handleStageChange(t)),(0,Zh.z)({stage:this.sceneService.observeStage(),animationProgress:this.loaderService.observeProgress(),packProgress:this.packLoadingService.observeProgress()}).pipe((0,K.Q)(this.destroyed$)).subscribe(({stage:t,animationProgress:r,packProgress:s})=>{const l=.6*r.percentage+.4*s.percentage;this.progressVisible="pack.revealing"===t&&l<100,this.percentage=l,this.changeDetector.detectChanges()})}handleStageChange(t){switch(t){case"pack.revealing":case"pack.opening":this.interacting=!1,this.error=!1,this.visible=!0;break;case"pack.revealed":setTimeout(()=>this.openButton?.nativeElement?.focus(),10),this.interacting=!0,this.error=!1,this.visible=!0;break;case"pack.error":this.interacting=!1,this.error=!0,this.visible=!0;break;default:this.error=!1,this.interacting=!1,this.visible=!1}this.changeDetector.detectChanges()}ngOnDestroy(){this.destroyed$.next(),this.destroyed$.complete()}handleOpenPack(){this.openPack.emit(this.pack)}static#t=this.\u0275fac=function(r){return new(r||f)(y.rXU(lc),y.rXU(TS),y.rXU(hA),y.rXU(y.gRc),y.rXU(y.aKT))};static#e=this.\u0275cmp=y.VBU({type:f,selectors:[["cerberus-pack-footer"]],viewQuery:function(r,s){if(1&r&&y.GBs(uB,5),2&r){let l;y.mGM(l=y.lsd())&&(s.openButton=l.first)}},inputs:{pack:"pack"},outputs:{openPack:"openPack"},decls:1,vars:1,consts:()=>{let t,r;return t="" + "\ufffd0\ufffd" + " Pack",r=" " + "\ufffd0\ufffd" + " ",[["openButton",""],t,r,["class","openPacks__selected",4,"ngIf"],[1,"openPacks__selected"],["fillGradient","gradients.gold.simple",1,"openPacks__selectedTitle"],["fillColor","colors.light.100","fontWeight","bold",1,"openPacks__selectedSubtitle","mb-2"],[1,"progress","mb-4",3,"ngClass","progress"],["size","large","type","primary",1,"openPacks__cta",3,"click","mousedown","mouseup","loading","disabled"]]},template:function(r,s){1&r&&y.DNE(0,dB,10,11,"div",3),2&r&&y.Y8G("ngIf",s.pack&&s.visible)},dependencies:[S.YU,S.bT,qT],styles:[".openPacks__selected[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;padding-bottom:54px;justify-content:end;height:100%}.openPacks__selectedTitle[_ngcontent-%COMP%]{filter:drop-shadow(0px 2px 1px rgba(0,0,0,.6));-webkit-text-stroke:.5px rgba(255,255,255,.3);position:absolute;bottom:180px;pointer-events:none;text-align:center}.openPacks__selectedSubtitle[_ngcontent-%COMP%]{text-shadow:2px 2px 4px rgba(0,0,0,.3);text-transform:uppercase;position:absolute;bottom:130px;flex:0 0 auto;text-align:center}
83.openPacks__cta[_ngcontent-%COMP%]{min-width:200px;pointer-events:all}.progress[_ngcontent-%COMP%]{width:300px;opacity:0;transition:opacity .3s linear;flex:0 0 auto}.progress.visible[_ngcontent-%COMP%]{opacity:1}"]})}return f})();const mB=["*"];let gB=(()=>{class f{constructor(t){this.elementRef=t,this.resized=new y.bkB,this.observer=new ResizeObserver((0,sr.sg)(r=>this.resized.emit(this.elementRef.nativeElement.getBoundingClientRect()),50))}ngAfterViewInit(){this.observer.observe(this.elementRef.nativeElement),this.resized.emit(this.elementRef.nativeElement.getBoundingClientRect())}ngOnDestroy(){this.elementRef?.nativeElement&&this.observer.unobserve(this.elementRef.nativeElement)}static#t=this.\u0275fac=function(r){return new(r||f)(y.rXU(y.aKT))};static#e=this.\u0275cmp=y.VBU({type:f,selectors:[["cerberus-open-packs-stage"]],outputs:{resized:"resized"},ngContentSelectors:mB,decls:1,vars:0,template:function(r,s){1&r&&(y.NAR(),y.SdG(0))},styles:["[_nghost-%COMP%]{position:relative;display:block;flex:1 1 auto;pointer-events:none;-webkit-user-select:none;user-select:none;z-index:10}"]})}return f})();class Kc{constructor(e,t,r,s,l="div"){this.parent=e,this.object=t,this.property=r,this._disabled=!1,this._hidden=!1,this.initialValue=this.getValue(),this.domElement=document.createElement("div"),this.domElement.classList.add("controller"),this.domElement.classList.add(s),this.$name=document.createElement("div"),this.$name.classList.add("name"),Kc.nextNameID=Kc.nextNameID||0,this.$name.id="lil-gui-name-"+ ++Kc.nextNameID,this.$widget=document.createElement(l),this.$widget.classList.add("widget"),this.$disable=this.$widget,this.domElement.appendChild(this.$name),this.domElement.appendChild(this.$widget),this.domElement.addEventListener("keydown",u=>u.stopPropagation()),this.domElement.addEventListener("keyup",u=>u.stopPropagation()),this.parent.children.push(this),this.parent.controllers.push(this),this.parent.$children.appendChild(this.domElement),this._listenCallback=this._listenCallback.bind(this),this.name(r)}name(e){return this._name=e,this.$name.innerHTML=e,this}onChange(e){return this._onChange=e,this}_callOnChange(){this.parent._callOnChange(this),void 0!==this._onChange&&this._onChange.call(this,this.getValue()),this._changed=!0}onFinishChange(e){return this._onFinishChange=e,this}_callOnFinishChange(){this._changed&&(this.parent._callOnFinishChange(this),void 0!==this._onFinishChange&&this._onFinishChange.call(this,this.getValue())),this._changed=!1}reset(){return this.setValue(this.initialValue),this._callOnFinishChange(),this}enable(e=!0){return this.disable(!e)}disable(e=!0){return e===this._disabled||(this._disabled=e,this.domElement.classList.toggle("disabled",e),this.$disable.toggleAttribute("disabled",e)),this}show(e=!0){return this._hidden=!e,this.domElement.style.display=this._hidden?"none":"",this}hide(){return this.show(!1)}options(e){const t=this.parent.add(this.object,this.property,e);return t.name(this._name),this.destroy(),t}min(e){return this}max(e){return this}step(e){return this}decimals(e){return this}listen(e=!0){return this._listening=e,void 0!==this._listenCallbackID&&(cancelAnimationFrame(this._listenCallbackID),this._listenCallbackID=void 0),this._listening&&this._listenCallback(),this}_listenCallback(){this._listenCallbackID=requestAnimationFrame(this._listenCallback);const e=this.save();e!==this._listenPrevValue&&this.updateDisplay(),this._listenPrevValue=e}getValue(){return this.object[this.property]}setValue(e){return this.object[this.property]=e,this._callOnChange(),this.updateDisplay(),this}updateDisplay(){return this}load(e){return this.setValue(e),this._callOnFinishChange(),this}save(){return this.getValue()}destroy(){this.listen(!1),this.parent.children.splice(this.parent.children.indexOf(this),1),this.parent.controllers.splice(this.parent.controllers.indexOf(this),1),this.parent.$children.removeChild(this.domElement)}}class AB extends Kc{constructor(e,t,r){super(e,t,r,"boolean","label"),this.$input=document.createElement("input"),this.$input.setAttribute("type","checkbox"),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$widget.appendChild(this.$input),this.$input.addEventListener("change",()=>{this.setValue(this.$input.checked),this._callOnFinishChange()}),this.$disable=this.$input,this.updateDisplay()}updateDisplay(){return this.$input.checked=this.getValue(),this}}function BS(f){let e,t;return(e=f.match(/(#|0x)?([a-f0-9]{6})/i))?t=e[2]:(e=f.match(/rgb\(\s*(\d*)\s*,\s*(\d*)\s*,\s*(\d*)\s*\)/))?t=parseInt(e[1]).toString(16).padStart(2,0)+parseInt(e[2]).toString(16).padStart(2,0)+parseInt(e[3]).toString(16).padStart(2,0):(e=f.match(/^#?([a-f0-9])([a-f0-9])([a-f0-9])$/i))&&(t=e[1]+e[1]+e[2]+e[2]+e[3]+e[3]),!!t&&"#"+t}const _B={isPrimitive:!0,match:f=>"string"==typeof f,fromHexString:BS,toHexString:BS},pA={isPrimitive:!0,match:f=>"number"==typeof f,fromHexString:f=>parseInt(f.substring(1),16),toHexString:f=>"#"+f.toString(16).padStart(6,0)},vB=[_B,pA,{isPrimitive:!1,match:f=>Array.isArray(f),fromHexString(f,e,t=1){const r=pA.fromHexString(f);e[0]=(r>>16&255)/255*t,e[1]=(r>>8&255)/255*t,e[2]=(255&r)/255*t},toHexString:([f,e,t],r=1)=>pA.toHexString(f*(r=255/r)<<16^e*r<<8^t*r)},{isPrimitive:!1,match:f=>Object(f)===f,fromHexString(f,e,t=1){const r=pA.fromHexString(f);e.r=(r>>16&255)/255*t,e.g=(r>>8&255)/255*t,e.b=(255&r)/255*t},toHexString:({r:f,g:e,b:t},r=1)=>pA.toHexString(f*(r=255/r)<<16^e*r<<8^t*r)}];class xB extends Kc{constructor(e,t,r,s){super(e,t,r,"color"),this.$input
vendor: 14,272 bytes, line 83
83=document.createElement("input"),this.$input.setAttribute("type","color"),this.$input.setAttribute("tabindex",-1),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$text=document.createElement("input"),this.$text.setAttribute("type","text"),this.$text.setAttribute("spellcheck","false"),this.$text.setAttribute("aria-labelledby",this.$name.id),this.$display=document.createElement("div"),this.$display.classList.add("display"),this.$display.appendChild(this.$input),this.$widget.appendChild(this.$display),this.$widget.appendChild(this.$text),this._format=function yB(f){return vB.find(e=>e.match(f))}(this.initialValue),this._rgbScale=s,this._initialValueHexString=this.save(),this._textFocused=!1,this.$input.addEventListener("input",()=>{this._setValueFromHexString(this.$input.value)}),this.$input.addEventListener("blur",()=>{this._callOnFinishChange()}),this.$text.addEventListener("input",()=>{const l=BS(this.$text.value);l&&this._setValueFromHexString(l)}),this.$text.addEventListener("focus",()=>{this._textFocused=!0,this.$text.select()}),this.$text.addEventListener("blur",()=>{this._textFocused=!1,this.updateDisplay(),this._callOnFinishChange()}),this.$disable=this.$text,this.updateDisplay()}reset(){return this._setValueFromHexString(this._initialValueHexString),this}_setValueFromHexString(e){if(this._format.isPrimitive){const t=this._format.fromHexString(e);this.setValue(t)}else this._format.fromHexString(e,this.getValue(),this._rgbScale),this._callOnChange(),this.updateDisplay()}save(){return this._format.toHexString(this.getValue(),this._rgbScale)}load(e){return this._setValueFromHexString(e),this._callOnFinishChange(),this}updateDisplay(){return this.$input.value=this._format.toHexString(this.getValue(),this._rgbScale),this._textFocused||(this.$text.value=this.$input.value.substring(1)),this.$display.style.backgroundColor=this.$input.value,this}}class LS extends Kc{constructor(e,t,r){super(e,t,r,"function"),this.$button=document.createElement("button"),this.$button.appendChild(this.$name),this.$widget.appendChild(this.$button),this.$button.addEventListener("click",s=>{s.preventDefault(),this.getValue().call(this.object),this._callOnChange()}),this.$button.addEventListener("touchstart",()=>{},{passive:!0}),this.$disable=this.$button}}class EB extends Kc{constructor(e,t,r,s,l,u){super(e,t,r,"number"),this._initInput(),this.min(s),this.max(l);const g=void 0!==u;this.step(g?u:this._getImplicitStep(),g),this.updateDisplay()}decimals(e){return this._decimals=e,this.updateDisplay(),this}min(e){return this._min=e,this._onUpdateMinMax(),this}max(e){return this._max=e,this._onUpdateMinMax(),this}step(e,t=!0){return this._step=e,this._stepExplicit=t,this}updateDisplay(){const e=this.getValue();if(this._hasSlider){let t=(e-this._min)/(this._max-this._min);t=Math.max(0,Math.min(t,1)),this.$fill.style.width=100*t+"%"}return this._inputFocused||(this.$input.value=void 0===this._decimals?e:e.toFixed(this._decimals)),this}_initInput(){this.$input=document.createElement("input"),this.$input.setAttribute("type","text"),this.$input.setAttribute("aria-labelledby",this.$name.id),window.matchMedia("(pointer: coarse)").matches&&(this.$input.setAttribute("type","number"),this.$input.setAttribute("step","any")),this.$widget.appendChild(this.$input),this.$disable=this.$input;const r=V=>{const z=parseFloat(this.$input.value);isNaN(z)||(this._snapClampSetValue(z+V),this.$input.value=this.getValue())};let g,_,x,M,C,u=!1;const F=V=>{if(u){const z=V.clientX-g;Math.abs(V.clientY-_)>5?(V.preventDefault(),this.$input.blur(),u=!1,this._setDraggingStyle(!0,"vertical")):Math.abs(z)>5&&O()}u||(C-=(V.clientY-x)*this._step*this._arrowKeyMultiplier(V),M+C>this._max?C=this._max-M:M+C<this._min&&(C=this._min-M),this._snapClampSetValue(M+C)),x=V.clientY},O=()=>{this._setDraggingStyle(!1,"vertical"),this._callOnFinishChange(),window.removeEventListener("mousemove",F),window.removeEventListener("mouseup",O)};this.$input.addEventListener("input",()=>{let V=parseFloat(this.$input.value);isNaN(V)||(this._stepExplicit&&(V=this._snap(V)),this.setValue(this._clamp(V)))}),this.$input.addEventListener("keydown",V=>{"Enter"===V.key&&this.$input.blur(),"ArrowUp"===V.code&&(V.preventDefault(),r(this._step*this._arrowKeyMultiplier(V))),"ArrowDown"===V.code&&(V.preventDefault(),r(this._step*this._arrowKeyMultiplier(V)*-1))}),this.$input.addEventListener("wheel",V=>{this._inputFocused&&(V.preventDefault(),r(this._step*this._normalizeMouseWheel(V)))},{passive:!1}),this.$input.addEventListener("mousedown",V=>{g=V.clientX,_=x=V.clientY,u=!0,M=this.getValue(),C=0,window.addEventListener("mousemove",F),window.addEventListener("mouseup",O)}),this.$input.addEventListener("focus",()=>{this._inputFocused=!0}),this.$input.addEventListener("blur",()=>{this._inputFocused=!1,this.updateDisplay(),this._callOnFinishChange()})}_initSlider(){this._hasSlider=!0,this.$slider=document.createElement("div"),this.$slider.classList.add("slider"),this.$fill=document.createElement("div"),this.$fill.classList.add("fill"),this.$slider.appendChild(this.$fill),this.$widget.insertBefore(this.$slider,this.$input),this.domElement.classList.add("hasSlider");const t=L=>{const V=this.$slider.getBoundingClientRect();let z=((L,V,z,W)=>(L-V)/(z-V)*(this._max-W)+W)(L,V.left,V.right,this._min);this._snapClampSetValue(z)},s=L=>{t(L.clientX)},l=()=>{this._callOnFinishChange(),this._setDraggingStyle(!1),window.removeEventListener("mousemove",s),window.removeEventListener("mouseup",l)};let g,_,u=!1;const x=L=>{L.preventDefault(),this._setDraggingStyle(!0),t(L.touches[0].clientX),u=!1},C=L=>{if(u){const z=L.touches[0].clientY-_;Math.abs(L.touches[0].clientX-g)>Math.abs(z)?x(L):(window.removeEventListener("touchmove",C),window.removeEventListener("touchend",P))}else L.preventDefault(),t(L.touches[0].clientX)},P=()=>{this._callOnFinishChange(),this._setDraggingStyle(!1),window.removeEventListener("touchmove",C),window.removeEventListener("touchend",P)},R=this._callOnFinishChange.bind(this);let O;this.$slider.addEventListener("mousedown",L=>{this._setDraggingStyle(!0),t(L.clientX),window.addEventListener("mousemove",s),window.addEventListener("mouseup",l)}),this.$slider.addEventListener("touchstart",L=>{L.touches.length>1||(this._hasScrollBar?(g=L.touches[0].clientX,_=L.touches[0].clientY,u=!0):x(L),window.addEventListener("touchmove",C,{passive:!1}),window.addEventListener("touchend",P))},{passive:!1}),this.$slider.addEventListener("wheel",L=>{if(Math.abs(L.deltaX)<Math.abs(L.deltaY)&&this._hasScrollBar)return;L.preventDefault();const z=this._normalizeMouseWheel(L)*this._step;this._snapClampSetValue(this.getValue()+z),this.$input.value=this.getValue(),clearTimeout(O),O=setTimeout(R,400)},{passive:!1})}_setDraggingStyle(e,t="horizontal"){this.$slider&&this.$slider.classList.toggle("active",e),document.body.classList.toggle("lil-gui-dragging",e),document.body.classList.toggle(`lil-gui-${t}`,e)}_getImplicitStep(){return this._hasMin&&this._hasMax?(this._max-this._min)/1e3:.1}_onUpdateMinMax(){!this._hasSlider&&this._hasMin&&this._hasMax&&(this._stepExplicit||this.step(this._getImplicitStep(),!1),this._initSlider(),this.updateDisplay())}_normalizeMouseWheel(e){let{deltaX:t,deltaY:r}=e;return Math.floor(e.deltaY)!==e.deltaY&&e.wheelDelta&&(t=0,r=-e.wheelDelta/120,r*=this._stepExplicit?1:10),t+-r}_arrowKeyMultiplier(e){let t=this._stepExplicit?1:10;return e.shiftKey?t*=10:e.altKey&&(t/=10),t}_snap(e){const t=Math.round(e/this._step)*this._step;return parseFloat(t.toPrecision(15))}_clamp(e){return e<this._min&&(e=this._min),e>this._max&&(e=this._max),e}_snapClampSetValue(e){this.setValue(this._clamp(this._snap(e)))}get _hasScrollBar(){const e=this.parent.root.$children;return e.scrollHeight>e.clientHeight}get _hasMin(){return void 0!==this._min}get _hasMax(){return void 0!==this._max}}class bB extends Kc{constructor(e,t,r,s){super(e,t,r,"option"),this.$select=document.createElement("select"),this.$select.setAttribute("aria-labelledby",this.$name.id),this.$display=document.createElement("div"),this.$display.classList.add("display"),this._values=Array.isArray(s)?s:Object.values(s),this._names=Array.isArray(s)?s:Object.keys(s),this._names.forEach(l=>{const u=document.createElement("option");u.innerHTML=l,this.$select.appendChild(u)}),this.$select.addEventListener("change",()=>{this.setValue(this._values[this.$select.selectedIndex]),this._callOnFinishChange()}),this.$select.addEventListener("focus",()=>{this.$display.classList.add("focus")}),this.$select.addEventListener("blur",()=>{this.$display.classList.remove("focus")}),this.$widget.appendChild(this.$select),this.$widget.appendChild(this.$display),this.$disable=this.$select,this.updateDisplay()}updateDisplay(){const e=this.getValue(),t=this._values.indexOf(e);return this.$select.selectedIndex=t,this.$display.innerHTML=-1===t?e:this._names[t],this}}class SB extends Kc{constructor(e,t,r){super(e,t,r,"string"),this.$input=document.createElement("input"),this.$input.setAttribute("type","text"),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$input.addEventListener("input",()=>{this.setValue(this.$input.value)}),this.$input.addEventListener("keydown",s=>{"Enter"===s.code&&this.$input.blur()}),this.$input.addEventListener("blur",()=>{this._callOnFinishChange()}),this.$widget.appendChild(this.$input),this.$disable=this.$input,this.updateDisplay()}updateDisplay(){return this.$input.value=this.getValue(),this}}let $T=!1;class DS{constructor({parent:e,autoPlace:t=void 0===e,container:r,width:s,title:l="Controls",closeFolders:u=!1,injectStyles:g=!0,touchStyles:_=!0}={}){if(this.parent=e,this.root=e?e.root:this,this.children=[],this.controllers=[],this.folders=[],this._closed=!1,this._hidden=!1,this.domElement=document.createElement("div"),this.domElement.classList.add("lil-gui"),this.$title=document.createElement("div"),this.$title.classList.add("title"),this.$title.setAttribute("role","button"),this.$title.setAttribute("aria-expanded",!0),this.$title.setAttribute("tabindex",0),this.$title.addEventListener("click",()=>this.openAnimated(this._closed)),this.$title.addEventListener("keydown",x=>{("Enter"===x.code||"Space"===x.code)&&(x.preventDefault(),this.$title.click())}),this.$title.addEventListener("touchstart",()=>{},{passive:!0}),this.$children=document.createElement("div"),this.$children.classList.add("children"),this.domElement.appendChild(this.$title),this.domElement.appendChild(this.$children),this.title(l),this.parent)return this.parent.children.push(this),this.parent.folders.push(this),void this.parent.$children.appendChild(this.domElement);this.domElement.classList.add("root"),_&&this.domElement.classList.add("allow-touch-styles"),!$T&&g&&(function wB(f){const e=document.createElement("style");e.innerHTML=f;const t=document.querySelector("head link[rel=stylesheet], head style");t?document.head.insertBefore(e,t):document.head.appendChild(e)}('.lil-gui {\n  font-family: var(--font-family);\n  font-size: var(--font-size);\n  line-height: 1;\n  font-weight: normal;\n  font-style: normal;\n  text-align: left;\n  background-color: var(--background-color);\n  color: var(--text-color);\n  user-select: none;\n  -webkit-user-select: none;\n  touch-action: manipulation;\n  --background-color: #1f1f1f;\n  --text-color: #ebebeb;\n  --title-background-color: #111111;\n  --title-text-color: #ebebeb;\n  --widget-color: #424242;\n  --hover-color: #4f4f4f;\n  --focus-color: #595959;\n  --number-color: #2cc9ff;\n  --string-color: #a2db3c;\n  --font-size: 11px;\n  --input-font-size: 11px;\n  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;\n  --font-family-mono: Menlo, Monaco, Consolas, "Droid Sans Mono", monospace;\n  --padding: 4px;\n  --spacing: 4px;\n  --widget-height: 20px;\n  --title-height: calc(var(--widget-height) + var(--spacing) * 1.25);\n  --name-width: 45%;\n  --slider-knob-width: 2px;\n  --slider-input-width: 27%;\n  --color-input-width: 27%;\n  --slider-input-min-width: 45px;\n  --color-input-min-width: 45px;\n  --folder-indent: 7px;\n  --widget-padding: 0 0 0 3px;\n  --widget-border-radius: 2px;\n  --checkbox-size: calc(0.75 * var(--widget-height));\n  --scrollbar-width: 5px;\n}\n.lil-gui, .lil-gui * {\n  box-sizing: border-box;\n  margin: 0;\n  padding: 0;\n}\n.lil-gui.root {\n  width: var(--width, 245px);\n  display: flex;\n  flex-direction: column;\n}\n.lil-gui.root > .title {\n  background: var(--title-background-color);\n  color: var(--title-text-color);\n}\n.lil-gui.root > .children {\n  overflow-x: hidden;\n  overflow-y: auto;\n}\n.lil-gui.root > .children::-webkit-scrollbar {\n  width: var(--scrollbar-width);\n  height: var(--scrollbar-width);\n  background: var(--background-color);\n}\n.lil-gui.root > .children::-webkit-scrollbar-thumb {\n  border-radius: var(--scrollbar-width);\n  background: var(--focus-color);\n}\n@media (pointer: coarse) {\n  .lil-gui.allow-touch-styles, .lil-gui.allow-touch-styles .lil-gui {\n    --widget-height: 28px;\n    --padding: 6px;\n    --spacing: 6px;\n    --font-size: 13px;\n    --input-font-size: 16px;\n    --folder-indent: 10px;\n    --scrollbar-width: 7px;\n    --slider-input-min-width: 50px;\n    --color-input-min-width: 65px;\n  }\n}\n.lil-gui.force-touch-styles, .lil-gui.force-touch-styles .lil-gui {\n  --widget-height: 28px;\n  --padding: 6px;\n  --spacing: 6px;\n  --font-size: 13px;\n  --input-font-size: 16px;\n  --folder-indent: 10px;\n  --scrollbar-width: 7px;\n  --slider-input-min-width: 50px;\n  --color-input-min-width: 65px;\n}\n.lil-gui.autoPlace {\n  max-height: 100%;\n  position: fixed;\n  top: 0;\n  right: 15px;\n  z-index: 1001;\n}\n\n.lil-gui .controller {\n  display: flex;\n  align-items: center;\n  padding: 0 var(--padding);\n  margin: var(--spacing) 0;\n}\n.lil-gui .controller.disabled {\n  opacity: 0.5;\n}\n.lil-gui .controller.disabled, .lil-gui .controller.disabled * {\n  pointer-events: none !important;\n}\n.lil-gui .controller > .name {\n  min-width: var(--name-width);\n  flex-shrink: 0;\n  white-space: pre;\n  padding-right: var(--spacing);\n  line-height: var(--widget-height);\n}\n.lil-gui .controller .widget {\n  position: relative;\n  display: flex;\n  align-items: center;\n  width: 100%;\n  min-height: var(--widget-height);\n}
83\n.lil-gui .controller.string input {\n  color: var(--string-color);\n}\n.lil-gui .controller.boolean .widget {\n  cursor: pointer;\n}\n.lil-gui .controller.color .display {\n  width: 100%;\n  height: var(--widget-height);\n  border-radius: var(--widget-border-radius);\n  position: relative;\n}\n@media (hover: hover) {\n  .lil-gui .controller.color .display:hover:before {\n    content: " ";\n    display: block;\n    position: absolute;\n    border-radius: var(--widget-border-radius);\n    border: 1px solid #fff9;\n    top: 0;\n    right: 0;\n    bottom: 0;\n    left: 0;\n  }\n}\n.lil-gui .controller.color input[type=color] {\n  opacity: 0;\n  width: 100%;\n  height: 100%;\n  cursor: pointer;\n}\n.lil-gui .controller.color input[type=text] {\n  margin-left: var(--spacing);\n  font-family: var(--font-family-mono);\n  min-width: var(--color-input-min-width);\n  width: var(--color-input-width);\n  flex-shrink: 0;\n}\n.lil-gui .controller.option select {\n  opacity: 0;\n  position: absolute;\n  width: 100%;\n  max-width: 100%;\n}\n.lil-gui .controller.option .display {\n  position: relative;\n  pointer-events: none;\n  border-radius: var(--widget-border-radius);\n  height: var(--widget-height);\n  line-height: var(--widget-height);\n  max-width: 100%;\n  overflow: hidden;\n  word-break: break-all;\n  padding-left: 0.55em;\n  padding-right: 1.75em;\n  background: var(--widget-color);\n}\n@media (hover: hover) {\n  .lil-gui .controller.option .display.focus {\n    background: var(--focus-color);\n  }\n}\n.lil-gui .controller.option .display.active {\n  background: var(--focus-color);\n}\n.lil-gui .controller.option .display:after {\n  font-family: "lil-gui";\n  content: "\u2195";\n  position: absolute;\n  top: 0;\n  right: 0;\n  bottom: 0;\n  padding-right: 0.375em;\n}\n.lil-gui .controller.option .widget,\n.lil-gui .controller.option select {\n  cursor: pointer;\n}\n@media (hover: hover) {\n  .lil-gui .controller.option .widget:hover .display {\n    background: var(--hover-color);\n  }\n}\n.lil-gui .controller.number input {\n  color: var(--number-color);\n}\n.lil-gui .controller.number.hasSlider input {\n  margin-left: var(--spacing);\n  width: var(--slider-input-width);\n  min-width: var(--slider-input-min-width);\n  flex-shrink: 0;\n}\n.lil-gui .controller.number .slider {\n  width: 100%;\n  height: var(--widget-height);\n  background-color: var(--widget-color);\n  border-radius: var(--widget-border-radius);\n  padding-right: var(--slider-knob-width);\n  overflow: hidden;\n  cursor: ew-resize;\n  touch-action: pan-y;\n}\n@media (hover: hover) {\n  .lil-gui .controller.number .slider:hover {\n    background-color: var(--hover-color);\n  }\n}\n.lil-gui .controller.number .slider.active {\n  background-color: var(--focus-color);\n}\n.lil-gui .controller.number .slider.active .fill {\n  opacity: 0.95;\n}\n.lil-gui .controller.number .fill {\n  height: 100%;\n  border-right: var(--slider-knob-width) solid var(--number-color);\n  box-sizing: content-box;\n}\n\n.lil-gui-dragging .lil-gui {\n  --hover-color: var(--widget-color);\n}\n.lil-gui-dragging * {\n  cursor: ew-resize !important;\n}\n\n.lil-gui-dragging.lil-gui-vertical * {\n  cursor: ns-resize !important;\n}\n\n.lil-gui .title {\n  height: var(--title-height);\n  line-height: calc(var(--title-height) - 4px);\n  font-weight: 600;\n  padding: 0 var(--padding);\n  -webkit-tap-highlight-color: transparent;\n  cursor: pointer;\n  outline: none;\n  text-decoration-skip: objects;\n}\n.lil-gui .title:before {\n  font-family: "lil-gui";\n  content: "\u25be";\n  padding-right: 2px;\n  display: inline-block;\n}\n.lil-gui .title:active {\n  background: var(--title-background-color);\n  opacity: 0.75;\n}\n@media (hover: hover) {\n  body:not(.lil-gui-dragging) .lil-gui .title:hover {\n    background: var(--title-background-color);\n    opacity: 0.85;\n  }\n  .lil-gui .title:focus {\n    text-decoration: underline var(--focus-color);\n  }\n}\n.lil-gui.root > .title:focus {\n  text-decoration: none !important;\n}\n.lil-gui.closed > .title:before {\n  content: "\u25b8";\n}\n.lil-gui.closed > .children {\n  transform: translateY(-7px);\n  opacity: 0;\n}\n.lil-gui.closed:not(.transition) > .children {\n  display: none;\n}\n.lil-gui.transition > .children {\n  transition-duration: 300ms;\n  transition-property: height, opacity, transform;\n  transition-timing-function: cubic-bezier(0.2, 0.6, 0.35, 1);\n  overflow: hidden;\n  pointer-events: none;\n}\n.lil-gui .children:empty:before {\n  content: "Empty";\n  padding: 0 var(--padding);\n  margin: var(--spacing) 0;\n  display: block;\n  height: var(--widget-height);\n  font-style: italic;\n  line-height: var(--widget-height);\n  opacity: 0.5;\n}\n.lil-gui.root > .children > .lil-gui > .title {\n  border: 0 solid var(--widget-color);\n  border-width: 1px 0;\n  transition: border-color 300ms;\n}\n.lil-gui.root > .children > .lil-gui.closed > .title {\n  border-bottom-color: transparent;\n}\n.lil-gui + .controller {\n  border-top: 1px solid var(--widget-color);\n  margin-top: 0;\n  padding-top: var(--spacing);\n}\n.lil-gui .lil-gui .lil-gui > .title {\n  border: none;\n}\n.lil-gui .lil-gui .lil-gui > .children {\n  border: none;\n  margin-left: var(--folder-indent);\n  border-left: 2px solid var(--widget-color);\n}\n.lil-gui .lil-gui .controller {\n  border: none;\n}\n\n.lil-gui input {\n  -webkit-tap-highlight-color: transparent;\n  border: 0;\n  outline: none;\n  font-family: var(--font-family);\n  font-size: var(--input-font-size);\n  border-radius: var(--widget-border-radius);\n  height: var(--widget-height);\n  background: var(--widget-color);\n  color: var(--text-color);\n  width: 100%;\n}\n@media (hover: hover) {\n  .lil-gui input:hover {\n    background: var(--hover-color);\n  }\n  .lil-gui input:active {\n    background: var(--focus-color);\n  }\n}\n.lil-gui input:disabled {\n  opacity: 1;\n}\n.lil-gui input[type=text],\n.lil-gui input[type=number] {\n  padding: var(--widget-padding);\n}\n.lil-gui input[type=text]:focus,\n.lil-gui input[type=number]:focus {\n  background: var(--focus-color);\n}\n.lil-gui input::-webkit-outer-spin-button,\n.lil-gui input::-webkit-inner-spin-button {\n  -webkit-appearance: none;\n  margin: 0;\n}\n.lil-gui input[type=number] {\n  -moz-appearance: textfield;\n}\n.lil-gui input[type=checkbox] {\n  appearance: none;\n  -webkit-appearance: none;\n  height: var(--checkbox-size);\n  width: var(--checkbox-size);\n  border-radius: var(--widget-border-radius);\n  text-align: center;
83\n  cursor: pointer;\n}\n.lil-gui input[type=checkbox]:checked:before {\n  font-family: "lil-gui";\n  content: "\u2713";\n  font-size: var(--checkbox-size);\n  line-height: var(--checkbox-size);\n}\n@media (hover: hover) {\n  .lil-gui input[type=checkbox]:focus {\n    box-shadow: inset 0 0 0 1px var(--focus-color);\n  }\n}\n.lil-gui button {\n  -webkit-tap-highlight-color: transparent;\n  outline: none;\n  cursor: pointer;\n  font-family: var(--font-family);\n  font-size: var(--font-size);\n  color: var(--text-color);\n  width: 100%;\n  height: var(--widget-height);\n  text-transform: none;\n  background: var(--widget-color);\n  border-radius: var(--widget-border-radius);\n  border: 1px solid var(--widget-color);\n  text-align: center;\n  line-height: calc(var(--widget-height) - 4px);\n}\n@media (hover: hover) {\n  .lil-gui button:hover {\n    background: var(--hover-color);\n    border-color: var(--hover-color);\n  }\n  .lil-gui button:focus {\n    border-color: var(--focus-color);\n  }\n}\n.lil-gui button:active {\n  background: var(--focus-color);\n}\n\n@font-face {\n  font-family: "lil-gui";\n  src: url("data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAAAUsAAsAAAAACJwAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAAH4AAADAImwmYE9TLzIAAAGIAAAAPwAAAGBKqH5SY21hcAAAAcgAAAD0AAACrukyyJBnbHlmAAACvAAAAF8AAACEIZpWH2hlYWQAAAMcAAAAJwAAADZfcj2zaGhlYQAAA0QAAAAYAAAAJAC5AHhobXR4AAADXAAAABAAAABMAZAAAGxvY2EAAANsAAAAFAAAACgCEgIybWF4cAAAA4AAAAAeAAAAIAEfABJuYW1lAAADoAAAASIAAAIK9SUU/XBvc3QAAATEAAAAZgAAAJCTcMc2eJxVjbEOgjAURU+hFRBK1dGRL+ALnAiToyMLEzFpnPz/eAshwSa97517c/MwwJmeB9kwPl+0cf5+uGPZXsqPu4nvZabcSZldZ6kfyWnomFY/eScKqZNWupKJO6kXN3K9uCVoL7iInPr1X5baXs3tjuMqCtzEuagm/AAlzQgPAAB4nGNgYRBlnMDAysDAYM/gBiT5oLQBAwuDJAMDEwMrMwNWEJDmmsJwgCFeXZghBcjlZMgFCzOiKOIFAB71Bb8AeJy1kjFuwkAQRZ+DwRAwBtNQRUGKQ8OdKCAWUhAgKLhIuAsVSpWz5Bbkj3dEgYiUIszqWdpZe+Z7/wB1oCYmIoboiwiLT2WjKl/jscrHfGg/pKdMkyklC5Zs2LEfHYpjcRoPzme9MWWmk3dWbK9ObkWkikOetJ554fWyoEsmdSlt+uR0pCJR34b6t/TVg1SY3sYvdf8vuiKrpyaDXDISiegp17p7579Gp3p++y7HPAiY9pmTibljrr85qSidtlg4+l25GLCaS8e6rRxNBmsnERunKbaOObRz7N72ju5vdAjYpBXHgJylOAVsMseDAPEP8LYoUHicY2BiAAEfhiAGJgZWBgZ7RnFRdnVJELCQlBSRlATJMoLV2DK4glSYs6ubq5vbKrJLSbGrgEmovDuDJVhe3VzcXFwNLCOILB/C4IuQ1xTn5FPilBTj5FPmBAB4WwoqAHicY2BkYGAA4sk1sR/j+W2+MnAzpDBgAyEMQUCSg4EJxAEAwUgFHgB4nGNgZGBgSGFggJMhDIwMqEAYAByHATJ4nGNgAIIUNEwmAABl3AGReJxjYAACIQYlBiMGJ3wQAEcQBEV4nGNgZGBgEGZgY2BiAAEQyQWEDAz/wXwGAAsPATIAAHicXdBNSsNAHAXwl35iA0UQXYnMShfS9GPZA7T7LgIu03SSpkwzYTIt1BN4Ak
83/gKTyAeCxfw39jZkjymzcvAwmAW/wgwHUEGDb36+jQQ3GXGot79L24jxCP4gHzF/EIr4jEIe7wxhOC3g2TMYy4Q7+Lu/SHuEd/ivt4wJd4wPxbPEKMX3GI5+DJFGaSn4qNzk8mcbKSR6xdXdhSzaOZJGtdapd4vVPbi6rP+cL7TGXOHtXKll4bY1Xl7EGnPtp7Xy2n00zyKLVHfkHBa4IcJ2oD3cgggWvt/V/FbDrUlEUJhTn/0azVWbNTNr0Ens8de1tceK9xZmfB1CPjOmPH4kitmvOubcNpmVTN3oFJyjzCvnmrwhJTzqzVj9jiSX911FjeAAB4nG3HMRKCMBBA0f0giiKi4DU8k0V2GWbIZDOh4PoWWvq6J5V8If9NVNQcaDhyouXMhY4rPTcG7jwYmXhKq8Wz+p762aNaeYXom2n3m2dLTVgsrCgFJ7OTmIkYbwIbC6vIB7WmFfAAAA==") format("woff");\n}'),$T=!0),r?r.appendChild(this.domElement):t&&(this.domElement.classList.add("autoPlace"),document.body.appendChild(this.domElement)),s&&this.domElement.style.setProperty("--width",s+"px"),this._closeFolders=u}add(e,t,r,s,l){if(Object(r)===r)return new bB(this,e,t,r);const u=e[t];switch(typeof u){case"number":return new EB(this,e,t,r,s,l);case"boolean":return new AB(this,e,t);case"string":return new SB(this,e,t);case"function":return new LS(this,e,t)}console.error("gui.add failed\n\tproperty:",t,"\n\tobject:",e,"\n\tvalue:",u)}addColor(e,t,r=1){return new xB(this,e,t,r)}addFolder(e){const t=new DS({parent:this,title:e});return this.root._closeFolders&&t.close(),t}load(e,t=!0){return e.controllers&&this.controllers.forEach(r=>{r instanceof LS||r._name in e.controllers&&r.load(e.controllers[r._name])}),t&&e.folders&&this.folders.forEach(r=>{r._title in e.folders&&r.load(e.folders[r._title])}),this}save(e=!0){const t={controllers:{},folders:{}};return this.controllers.forEach(r=>{if(!(r instanceof LS)){if(r._name in t.controllers)throw new Error(`Cannot save GUI with duplicate property "${r._name}"`);t.controllers[r._name]=r.save()}}),e&&this.folders.forEach(r=>{if(r._title in t.folders)throw new Error(`Cannot save GUI with duplicate folder "${r._title}"`);t.folders[r._title]=r.save()}),t}open(e=!0){return this._setClosed(!e),this.$title.setAttribute("aria-expanded",!this._closed),this.domElement.classList.toggle("closed",this._closed),this}close(){return this.open(!1)}_setClosed(e){this._closed!==e&&(this._closed=e,this._callOnOpenClose(this))}show(e=!0){return this._hidden=!e,this.domElement.style.display=this._hidden?"none":"",this}hide(){return this.show(!1)}openAnimated(e=!0){return this._setClosed(!e),this.$title.setAttribute("aria-expanded",!this._closed),requestAnimationFrame(()=>{this.$children.style.height=this.$children.clientHeight+"px",this.domElement.classList.add("transition");const r=l=>{l.target===this.$children&&(this.$children.style.height="",this.domElement.classList.remove("transition"),this.$children.removeEventListener("transitionend",r))};this.$children.addEventListener("transitionend",r);const s=e?this.$children.scrollHeight:0;this.domElement.classList.toggle("closed",!e),requestAnimationFrame(()=>{this.$children.style.height=s+"px"})}),this}title(e){return this._title=e,this.$title.innerHTML=e,this}reset(e=!0){return(e?this.controllersRecursive():this.controllers).forEach(r=>r.reset()),this}onChange(e){return this._onChange=e,this}_callOnChange(e){this.parent&&this.parent._callOnChange(e),void 0!==this._onChange&&this._onChange.call(this,{object:e.object,property:e.property,value:e.getValue(),controller:e})}onFinishChange(e){return this._onFinishChange=e,this}_callOnFinishChange(e){this.parent&&this.parent._callOnFinishChange(e),void 0!==this._onFinishChange&&this._onFinishChange.call(this,{object:e.object,property:e.property,value:e.getValue(),controller:e})}onOpenClose(e){return this._onOpenClose=e,this}_callOnOpenClose(e){this.parent&&this.parent._callOnOpenClose(e),void 0!==this._onOpenClose&&this._onOpenClose.call(this,e)}destroy(){this.parent&&(this.parent.children.splice(this.parent.children.indexOf(this),1),this.parent.folders.splice(this.parent.folders.indexOf(this),1)),this.domElement.parentElement&&this.domElement.parentElement.removeChild(this.domElement),Array.from(this.children).forEach(e=>e.destroy())}controllersRecursive(){let e=Array.from(this.controllers);return this.folders.forEach(t=>{e=e.concat(t.controllersRecursive())}),e}foldersRecursive(){let e=Array.from(this.folders);
83return this.folders.forEach(t=>{e=e.concat(t.foldersRecursive())}),e}}const CB=DS,zd=new nC,Bo=new Me,Af=new Me,ns=new Ir,KT={X:new Me(1,0,0),Y:new Me(0,1,0),Z:new Me(0,0,1)},FS={type:"change"},ZT={type:"mouseDown"},jT={type:"mouseUp",mode:null},JT={type:"objectChange"};class TB extends or{constructor(e,t){super(),void 0===t&&(console.warn('THREE.TransformControls: The second parameter "domElement" is now mandatory.'),t=document),this.isTransformControls=!0,this.visible=!1,this.domElement=t,this.domElement.style.touchAction="none";const r=new DB;this._gizmo=r,this.add(r);const s=new FB;this._plane=s,this.add(s);const l=this;function u(V,z){let W=z;Object.defineProperty(l,V,{get:function(){return void 0!==W?W:z},set:function(ne){W!==ne&&(W=ne,s[V]=ne,r[V]=ne,l.dispatchEvent({type:V+"-changed",value:ne}),l.dispatchEvent(FS))}}),l[V]=z,s[V]=z,r[V]=z}u("camera",e),u("object",void 0),u("enabled",!0),u("axis",null),u("mode","translate"),u("translationSnap",null),u("rotationSnap",null),u("scaleSnap",null),u("space","world"),u("size",1),u("dragging",!1),u("showX",!0),u("showY",!0),u("showZ",!0);const g=new Me,_=new Me,x=new Ir,M=new Ir,C=new Me,P=new Ir,R=new Me,F=new Me,O=new Me,L=new Me;u("worldPosition",g),u("worldPositionStart",_),u("worldQuaternion",x),u("worldQuaternionStart",M),u("cameraPosition",C),u("cameraQuaternion",P),u("pointStart",R),u("pointEnd",F),u("rotationAxis",O),u("rotationAngle",0),u("eye",L),this._offset=new Me,this._startNorm=new Me,this._endNorm=new Me,this._cameraScale=new Me,this._parentPosition=new Me,this._parentQuaternion=new Ir,this._parentQuaternionInv=new Ir,this._parentScale=new Me,this._worldScaleStart=new Me,this._worldQuaternionInv=new Ir,this._worldScale=new Me,this._positionStart=new Me,this._quaternionStart=new Ir,this._scaleStart=new Me,this._getPointer=IB.bind(this),this._onPointerDown=RB.bind(this),this._onPointerHover=PB.bind(this),this._onPointerMove=BB.bind(this),this._onPointerUp=LB.bind(this),this.domElement.addEventListener("pointerdown",this._onPointerDown),this.domElement.addEventListener("pointermove",this._onPointerHover),this.domElement.addEventListener("pointerup",this._onPointerUp)}updateMatrixWorld(){void 0!==this.object&&(this.object.updateMatrixWorld(),null===this.object.parent?console.error("TransformControls: The attached 3D object must be a part of the scene graph."):this.object.parent.matrixWorld.decompose(this._parentPosition,this._parentQuaternion,this._parentScale),this.object.matrixWorld.decompose(this.worldPosition,this.worldQuaternion,this._worldScale),this._parentQuaternionInv.copy(this._parentQuaternion).invert(),this._worldQuaternionInv.copy(this.worldQuaternion).invert()),this.camera.updateMatrixWorld(),this.camera.matrixWorld.decompose(this.cameraPosition,this.cameraQuaternion,this._cameraScale),this.camera.isOrthographicCamera?this.camera.getWorldDirection(this.eye).negate():this.eye.copy(this.cameraPosition).sub(this.worldPosition).normalize(),super.updateMatrixWorld(this)}pointerHover(e){if(void 0===this.object||!0===this.dragging)return;zd.setFromCamera(e,this.camera);const t=kS(this._gizmo.picker[this.mode],zd);this.axis=t?t.object.name:null}pointerDown(e){if(void 0!==this.object&&!0!==this.dragging&&0===e.button&&null!==this.axis){zd.setFromCamera(e,this.camera);const t=kS(this._plane,zd,!0);t&&(this.object.updateMatrixWorld(),this.object.parent.updateMatrixWorld(),this._positionStart.copy(this.object.position),this._quaternionStart.copy(this.object.quaternion),this._scaleStart.copy(this.object.scale),this.object.matrixWorld.decompose(this.worldPositionStart,this.worldQuaternionStart,this._worldScaleStart),this.pointStart.copy(t.point).sub(this.worldPositionStart)),this.dragging=!0,ZT.mode=this.mode,this.dispatchEvent(ZT)}}pointerMove(e){const t=this.axis,r=this.mode,s=this.object;let l=this.space;if("scale"===r?l="local":("E"===t||"XYZE"===t||"XYZ"===t)&&(l="world"),void 0===s||null===t||!1===this.dragging||-1!==e.button)return;zd.setFromCamera(e,this.camera);const u=kS(this._plane,zd,!0);if(u){if(this.pointEnd.copy(u.point).sub(this.worldPositionStart),"translate"===r)this._offset.copy(this.pointEnd).sub(this.pointStart),"local"===l&&"XYZ"!==t&&this._offset.applyQuaternion(this._worldQuaternionInv),-1===t.indexOf("X")&&(this._offset.x=0),-1===t.indexOf("Y")&&(this._offset.y=0),-1===t.indexOf("Z")&&(this._offset.z=0),"local"===l&&"XYZ"!==t?this._offset.applyQuaternion(this._quaternionStart).divide(this._parentScale):this._offset.applyQuaternion(this._parentQuaternionInv).divide(this._parentScale),s.position.copy(this._offset).add(this._positionStart),this.translationSnap&&("local"===l&&(s.position.applyQuaternion(ns.copy(this._quaternionStart).invert()),-1!==t.search("X")&&(s.position.x=Math.round(s.position.x/this.translationSnap)*this.translationSnap),-1!==t.search("Y")&&(s.position.y=Math.round(s.position.y/this.translationSnap)*this.translationSnap),-1!==t.search("Z")&&(s.position.z=Math.round(s.position.z/this.translationSnap)*this.translationSnap),s.position.applyQuaternion(this._quaternionStart)),"world"===l&&(s.parent&&s.position.add(Bo.setFromMatrixPosition(s.parent.matrixWorld)),-1!==t.search("X")&&(s.position.x=Math.round(s.position.x/this.translationSnap)*this.translationSnap),-1!==t.search("Y")&&(s.position.y=Math.round(s.position.y/this.translationSnap)*this.translationSnap),-1!==t.search("Z")&&(s.position.z=Math.round(s.position.z/this.translationSnap)*this.translationSnap),s.parent&&s.position.sub(Bo.setFromMatrixPosition(s.parent.matrixWorld))));else if("scale"===r){if(-1!==t.search("XYZ")){let g=this.pointEnd.length()/this.pointStart.length();this.pointEnd.dot(this.pointStart)<0&&(g*=-1),Af.set(g,g,g)}else Bo.copy(this.pointStart),Af.copy(this.pointEnd),Bo.applyQuaternion(this._worldQuaternionInv),Af.applyQuaternion(this._worldQuaternionInv),Af.divide(Bo),-1===t.search("X")&&(Af.x=1),-1===t.search("Y")&&(Af.y=1),-1===t.search("Z")&&(Af.z=1);s.scale.copy(this._scaleStart).multiply(Af),this.scaleSnap&&(-1!==t.search("X")&&(s.scale.x=Math.round(s.scale.x/this.scaleSnap)*this.scaleSnap||this.scaleSnap),-1!==t.search("Y")&&(s.scale.y=Math.round(s.scale.y/this.scaleSnap)*this.scaleSnap||this.scaleSnap),-1!==t.search("Z")&&(s.scale.z=Math.round(s.scale.z/this.scaleSnap)*this.scaleSnap||this.scaleSnap))}else if("rotate"===r){this._offset.copy(this.pointEnd).sub(this.pointStart);const g=20/this.worldPosition.distanceTo(Bo.setFromMatrixPosition(this.camera.matrixWorld));"E"===t?(this.rotationAxis.copy(this.eye),this.rotationAngle=this.pointEnd.angleTo(this.pointStart),this._startNorm.copy(this.pointStart).normalize(),this._endNorm.copy(this.pointEnd).normalize(),this.rotationAngle*=this._endNorm.cross(this._startNorm).dot(this.eye)<0?1:-1):"XYZE"===t?(this.rotationAxis.copy(this._offset).cross(this.eye).normalize(),this.rotationAngle=this._offset.dot(Bo.copy(this.rotationAxis).cross(this.eye))*g):("X"===t||"Y"===t||"Z"===t)&&(this.rotationAxis.copy(KT[t]),Bo.c
83opy(KT[t]),"local"===l&&Bo.applyQuaternion(this.worldQuaternion),this.rotationAngle=this._offset.dot(Bo.cross(this.eye).normalize())*g),this.rotationSnap&&(this.rotationAngle=Math.round(this.rotationAngle/this.rotationSnap)*this.rotationSnap),"local"===l&&"E"!==t&&"XYZE"!==t?(s.quaternion.copy(this._quaternionStart),s.quaternion.multiply(ns.setFromAxisAngle(this.rotationAxis,this.rotationAngle)).normalize()):(this.rotationAxis.applyQuaternion(this._parentQuaternionInv),s.quaternion.copy(ns.setFromAxisAngle(this.rotationAxis,this.rotationAngle)),s.quaternion.multiply(this._quaternionStart).normalize())}this.dispatchEvent(FS),this.dispatchEvent(JT)}}pointerUp(e){0===e.button&&(this.dragging&&null!==this.axis&&(jT.mode=this.mode,this.dispatchEvent(jT)),this.dragging=!1,this.axis=null)}dispose(){this.domElement.removeEventListener("pointerdown",this._onPointerDown),this.domElement.removeEventListener("pointermove",this._onPointerHover),this.domElement.removeEventListener("pointermove",this._onPointerMove),this.domElement.removeEventListener("pointerup",this._onPointerUp),this.traverse(function(e){e.geometry&&e.geometry.dispose(),e.material&&e.material.dispose()})}attach(e){return this.object=e,this.visible=!0,this}detach(){return this.object=void 0,this.visible=!1,this.axis=null,this}reset(){this.enabled&&this.dragging&&(this.object.position.copy(this._positionStart),this.object.quaternion.copy(this._quaternionStart),this.object.scale.copy(this._scaleStart),this.dispatchEvent(FS),this.dispatchEvent(JT),this.pointStart.copy(this.pointEnd))}getRaycaster(){return zd}getMode(){return this.mode}setMode(e){this.mode=e}setTranslationSnap(e){this.translationSnap=e}setRotationSnap(e){this.rotationSnap=e}setScaleSnap(e){this.scaleSnap=e}setSize(e){this.size=e}setSpace(e){this.space=e}}function IB(f){if(this.domElement.ownerDocument.pointerLockElement)return{x:0,y:0,button:f.button};{const e=this.domElement.getBoundingClientRect();return{x:(f.clientX-e.left)/e.width*2-1,y:-(f.clientY-e.top)/e.height*2+1,button:f.button}}}function PB(f){if(this.enabled)switch(f.pointerType){case"mouse":case"pen":this.pointerHover(this._getPointer(f))}}function RB(f){this.enabled&&(document.pointerLockElement||this.domElement.setPointerCapture(f.pointerId),this.domElement.addEventListener("pointermove",this._onPointerMove),this.pointerHover(this._getPointer(f)),this.pointerDown(this._getPointer(f)))}function BB(f){this.enabled&&this.pointerMove(this._getPointer(f))}function LB(f){this.enabled&&(this.domElement.releasePointerCapture(f.pointerId),this.domElement.removeEventListener("pointermove",this._onPointerMove),this.pointerUp(this._getPointer(f)))}function kS(f,e,t){const r=e.intersectObject(f,!0);for(let s=0;s<r.length;s++)if(r[s].object.visible||t)return r[s];return!1}const vx=new ld,kr=new Me(0,1,0),eI=new Me(0,0,0),tI=new ui,yx=new Ir,xx=new Ir,Zc=new Me,nI=new ui,mA=new Me(1,0,0),Gd=new Me(0,1,0),gA=new Me(0,0,1),Ex=new Me,AA=new Me,_A=new Me;class DB extends or{constructor(){super(),this.isTransformControlsGizmo=!0,this.type="TransformControlsGizmo";const e=new vs({depthTest:!1,depthWrite:!1,fog:!1,toneMapped:!1,transparent:!0}),t=new Va({depthTest:!1,depthWrite:!1,fog:!1,toneMapped:!1,transparent:!0}),r=e.clone();r.opacity=.15;const s=t.clone();s.opacity=.5;const l=e.clone();l.color.setHex(16711680);const u=e.clone();u.color.setHex(65280);const g=e.clone();g.color.setHex(255);const _=e.clone();_.color.setHex(16711680),_.opacity=.5;const x=e.clone();x.color.setHex(65280),x.opacity=.5;const M=e.clone();M.color.setHex(255),M.opacity=.5;const C=e.clone();C.opacity=.25;const P=e.clone();P.color.setHex(16776960),P.opacity=.25,e.clone().color.setHex(16776960);const F=e.clone();F.color.setHex(7895160);const O=new Vs(0,.04,.1,12);O.translate(0,.05,0);const k=new Qr(.08,.08,.08);k.translate(0,.04,0);const L=new Ii;L.setAttribute("position",new Fn([0,0,0,1,0,0],3));const V=new Vs(.0075,.0075,.5,3);function z(We,nt){const et=new qh(We,.0075,3,64,nt*Math.PI*2);return et.rotateY(Math.PI/2),et.rotateX(Math.PI/2),et}V.translate(0,.25,0);const ne={X:[[new pn(O,l),[.5,0,0],[0,0,-Math.PI/2]],[new pn(O,l),[-.5,0,0],[0,0,Math.PI/2]],[new pn(V,l),[0,0,0],[0,0,-Math.PI/2]]],Y:[[new pn(O,u),[0,.5,0]],[new pn(O,u),[0,-.5,0],[Math.PI,0,0]],[new pn(V,u)]],Z:[[new pn(O,g),[0,0,.5],[Math.PI/2,0,0]],[new pn(O,g),[0,0,-.5],[-Math.PI/2,0,0]],[new pn(V,g),null,[Math.PI/2,0,0]]],XYZ:[[new pn(new Xh(.1,0),C.clone()),[0,0,0]]],XY:[[new pn(new Qr(.15,.15,.01),M.clone()),[.15,.15,0]]],YZ:[[new pn(new Qr(.15,.15,.01),_.clone()),[0,.15,.15],[0,Math.PI/2,0]]],XZ:[[new pn(new Qr(.15,.15,.01),x.clone()),[.15,0,.15],[-Math.PI/2,0,0]]]},fe={X:[[new pn(new Vs(.2,0,.6,4),r),[.3,0,0],[0,0,-Math.PI/2]],[new pn(new Vs(.2,0,.6,4),r),[-.3,0,0],[0,0,Math.PI/2]]],Y:[[new pn(new Vs(.2,0,.6,4),r),[0,.3,0]],[new pn(new Vs(.2,0,.6,4),r),[0,-.3,0],[0,0,Math.PI]]],Z:[[new pn(new Vs(.2,0,.6,4),r),[0,0,.3],[Math.PI/2,0,0]],[new pn(new Vs(.2,0,.6,4),r),[0,0,-.3],[-Math.PI/2,0,0]]],XYZ:[[new pn(new Xh(.2,0),r)]],XY:[[new pn(new Qr(.2,.2,.01),r),[.15,.15,0]]],YZ:[[new pn(new Qr(.2,.2,.01),r),[0,.15,.15],[0,Math.PI/2,0]]],XZ:[[new pn(new Qr(.2,.2,.01),r),[.15,0,.15],[-Math.PI/2,0,0]]]},ge={START:[[new pn(new Xh(.01,2),s),null,null,null,"helper"]],END:[[new pn(new Xh(.01,2),s),null,null,null,"helper"]],DELTA:[[new Ha(function W(){const We=new Ii;return We.setAttribute("position",new Fn([0,0,0,1,1,1],3)),We}(),s),null,null,null,"helper"]],X:[[new Ha(L,s.clone()),[-1e3,0,0],null,[1e6,1,1],"helper"]],Y:[[new Ha(L,s.clone()),[0,-1e3,0],[0,0,Math.PI/2],[1e6,1,1],"helper"]],Z:[[new Ha(L,s.clone()),[0,0,-1e3],[0,-Math.PI/2,0],[1e6,1,1],"helper"]]},de={XYZE:[[new pn(z(.5,1),F),null,[0,Math.PI/2,0]]],X:[[new pn(z(.5,.5),l)]],Y:[[new pn(z(.5,.5),u),null,[0,0,-Math.PI/2]]],Z:[[new pn(z(.5,.5),g),null,[0,Math.PI/2,0]]],E:[[new pn(z(.75,1),P),null,[0,Math.PI/2,0]]]},ie={AXIS:[[new Ha(L,s.clone()),[-1e3,0,0],null,[1e6,1,1],"helper"]]},ye={XYZE:[[new pn(new Id(.25,10,8),r)]],X:[[new pn(new qh(.5,.1,4,24),r),[0,0,0],[0,-Math.PI/2,-Math.PI/2]]],Y:[[new pn(new qh(.5,.1,4,24),r),[0,0,0],[Math.PI/2,0,0]]],Z:[[new pn(new qh(.5,.1,4,24),r),[0,0,0],[0,0,-Math.PI/2]]],E:[[new pn(new qh(.75,.1,2,24),r)]]},He={X:[[new pn(k,l),[.5,0,0],[0,0,-Math.PI/2]],[new pn(V,l),[0,0,0],[0,0,-Math.PI/2]],[new pn(k,l),[-.5,0,0],[0,0,Math.PI/2]]],Y:[[new pn(k,u),[0,.5,0]],[new pn(V,u)],[new pn(k,u),[0,-.5,0],[0,0,Math.PI]]],Z:[[new pn(k,g),[0,0,.5],[Math.PI/2,0,0]],[new pn(V,g),[0,0,0],[Math.PI/2,0,0]],[new pn(k,g),[0,0,-.5],[-Math.PI/2,0,0]]],XY:[[new pn(new Qr(.15,.15,.01),M),[.15,.15,0]]],YZ:[[new pn(new Qr(.15,.15,.01),_),[0,.15,.15],[0,Math.PI/2,0]]],XZ:[[new pn(new Qr(.15,.15,.01),x),[.15,0,.15],[-Math.PI/2,0,0]]],XYZ:[[new pn(new Qr(.1,.1,.1),C.clone())]]},qe={X:[[new pn(new Vs(.2,0,.6,4),r),[.3,0,0],[0,0,-Math.PI/2]],[new pn(new Vs(.2,0,.6,4),r),[-.3,0,0],[0,0,Math.PI/2]]],Y:[[new pn(new Vs(.2,0,.6,4),r),[0,.3,0]],[new pn(new Vs(.2,0,.6,4),r),[0,-.3,0],[0,0,Math.PI]]],Z:[[new pn(new Vs(.2,0,.6,4),r),[0,0,.3],[Math.PI/2,0,0]],[new pn(new Vs(.2,0,.6,4),r),[0,0,-.3],[-Math.PI/2,0,0]]],XY:[[new pn(new Qr(.2,.2,.01),r),[.15,.15,0]]],YZ:[[new pn(new Qr(.2,.2,.01),r),[0,.15,.15],[0,Math.PI/2,0]]],XZ:[[new pn(new Qr(.2,.2,.01),r),[.15,0,.15],[-Math.PI/2,0,0]]],XYZ:[[new pn(new Qr(.2,.2,.2),r),[0,0,0]]]},Ge={X:[[new Ha(L,s.clone()),[-1e3,0,0],null,[1e6,1,1],"helper"]],Y:[[new Ha(L,s.clone()),[0,-1e3,0],[0,0,Math.PI/2],[1e6,1,1],"helper"]],Z:[[new Ha(L,s.clone()),[0,0,-1e3],[0,-Math.PI/2,0],[1e6,1,1],"helper"]]};function Ve(We){const nt=new or;for(const et in We)for(let tt=We[et].length;tt--;){const gt=We[et][tt][0].clone(),bt=We[et][tt][1],jt=We[et][tt][2],Qt=We[et][tt][3],ct=We[et][tt][4];gt.name=et,gt.tag=ct,bt&&gt.position.set(bt[0],bt[1],bt[2]),jt&&gt.rotation.set(jt[0],jt[1],jt[2]),Qt&&gt.scale.set(Qt[0],Qt[1],Qt[2]),gt.updateMatrix();const At=gt.geometry.clone();
83At.applyMatrix4(gt.matrix),gt.geometry=At,gt.renderOrder=1/0,gt.position.set(0,0,0),gt.rotation.set(0,0,0),gt.scale.set(1,1,1),nt.add(gt)}return nt}this.gizmo={},this.picker={},this.helper={},this.add(this.gizmo.translate=Ve(ne)),this.add(this.gizmo.rotate=Ve(de)),this.add(this.gizmo.scale=Ve(He)),this.add(this.picker.translate=Ve(fe)),this.add(this.picker.rotate=Ve(ye)),this.add(this.picker.scale=Ve(qe)),this.add(this.helper.translate=Ve(ge)),this.add(this.helper.rotate=Ve(ie)),this.add(this.helper.scale=Ve(Ge)),this.picker.translate.visible=!1,this.picker.rotate.visible=!1,this.picker.scale.visible=!1}updateMatrixWorld(e){const r="local"===("scale"===this.mode?"local":this.space)?this.worldQuaternion:xx;this.gizmo.translate.visible="translate"===this.mode,this.gizmo.rotate.visible="rotate"===this.mode,this.gizmo.scale.visible="scale"===this.mode,this.helper.translate.visible="translate"===this.mode,this.helper.rotate.visible="rotate"===this.mode,this.helper.scale.visible="scale"===this.mode;let s=[];s=s.concat(this.picker[this.mode].children),s=s.concat(this.gizmo[this.mode].children),s=s.concat(this.helper[this.mode].children);for(let l=0;l<s.length;l++){const u=s[l];let g;u.visible=!0,u.rotation.set(0,0,0),u.position.copy(this.worldPosition),g=this.camera.isOrthographicCamera?(this.camera.top-this.camera.bottom)/this.camera.zoom:this.worldPosition.distanceTo(this.cameraPosition)*Math.min(1.9*Math.tan(Math.PI*this.camera.fov/360)/this.camera.zoom,7),u.scale.set(1,1,1).multiplyScalar(g*this.size/4),"helper"!==u.tag?(u.quaternion.copy(r),"translate"===this.mode||"scale"===this.mode?("X"===u.name&&Math.abs(kr.copy(mA).applyQuaternion(r).dot(this.eye))>
83.99&&(u.scale.set(1e-10,1e-10,1e-10),u.visible=!1),"Y"===u.name&&Math.abs(kr.copy(Gd).applyQuaternion(r).dot(this.eye))>.99&&(u.scale.set(1e-10,1e-10,1e-10),u.visible=!1),"Z"===u.name&&Math.abs(kr.copy(gA).applyQuaternion(r).dot(this.eye))>.99&&(u.scale.set(1e-10,1e-10,1e-10),u.visible=!1),"XY"===u.name&&Math.abs(kr.copy(gA).applyQuaternion(r).dot(this.eye))<.2&&(u.scale.set(1e-10,1e-10,1e-10),u.visible=!1),"YZ"===u.name&&Math.abs(kr.copy(mA).applyQuaternion(r).dot(this.eye))<.2&&(u.scale.set(1e-10,1e-10,1e-10),u.visible=!1),"XZ"===u.name&&Math.abs(kr.copy(Gd).applyQuaternion(r).dot(this.eye))<.2&&(u.scale.set(1e-10,1e-10,1e-10),u.visible=!1)):"rotate"===this.mode&&(yx.copy(r),kr.copy(this.eye).applyQuaternion(ns.copy(r).invert()),-1!==u.name.search("E")&&u.quaternion.setFromRotationMatrix(tI.lookAt(this.eye,eI,Gd)),"X"===u.name&&(ns.setFromAxisAngle(mA,Math.atan2(-kr.y,kr.z)),ns.multiplyQuaternions(yx,ns),u.quaternion.copy(ns)),"Y"===u.name&&(ns.setFromAxisAngle(Gd,Math.atan2(kr.x,kr.z)),ns.multiplyQuaternions(yx,ns),u.quaternion.copy(ns)),"Z"===u.name&&(ns.setFromAxisAngle(gA,Math.atan2(kr.y,kr.x)),ns.multiplyQuaternions(yx,ns),u.quaternion.copy(ns))),u.visible=u.visible&&(-1===u.name.indexOf("X")||this.showX),u.visible=u.visible&&(-1===u.name.indexOf("Y")||this.showY),u.visible=u.visible&&(-1===u.name.indexOf("Z")||this.showZ),u.visible=u.visible&&(-1===u.name.indexOf("E")||this.showX&&this.showY&&this.showZ),u.material._color=u.material._color||u.material.color.clone(),u.material._opacity=u.material._opacity||u.material.opacity,u.material.color.copy(u.material._color),u.material.opacity=u.material._opacity,this.enabled&&this.axis&&(u.name===this.axis||this.axis.split("").some(function(_){return u.name===_}))&&(u.material.color.setHex(16776960),u.material.opacity=1)):(u.visible=!1,"AXIS"===u.name?(u.visible=!!this.axis,"X"===this.axis&&(ns.setFromEuler(vx.set(0,0,0)),u.quaternion.copy(r).multiply(ns),Math.abs(kr.copy(mA).applyQuaternion(r).dot(this.eye))>.9&&(u.visible=!1)),"Y"===this.axis&&(ns.setFromEuler(vx.set(0,0,Math.PI/2)),u.quaternion.copy(r).multiply(ns),Math.abs(kr.copy(Gd).applyQuaternion(r).dot(this.eye))>.9&&(u.visible=!1)),"Z"===this.axis&&(ns.setFromEuler(vx.set(0,Math.PI/2,0)),u.quaternion.copy(r).multiply(ns),Math.abs(kr.copy(gA).applyQuaternion(r).dot(this.eye))>.9&&(u.visible=!1)),"XYZE"===this.axis&&(ns.setFromEuler(vx.set(0,Math.PI/2,0)),kr.copy(this.rotationAxis),u.quaternion.setFromRotationMatrix(tI.lookAt(eI,kr,Gd)),u.quaternion.multiply(ns),u.visible=this.dragging),"E"===this.axis&&(u.visible=!1)):"START"===u.name?(u.position.copy(this.worldPositionStart),u.visible=this.dragging):"END"===u.name?(u.position.copy(this.worldPosition),u.visible=this.dragging):"DELTA"===u.name?(u.position.copy(this.worldPositionStart),u.quaternion.copy(this.worldQuaternionStart),Bo.set(1e-10,1e-10,1e-10).add(this.worldPositionStart).sub(this.worldPosition).multiplyScalar(-1),Bo.applyQuaternion(this.worldQuaternionStart.clone().invert()),u.scale.copy(Bo),u.visible=this.dragging):(u.quaternion.copy(r),u.position.copy(this.dragging?this.worldPositionStart:this.worldPosition),this.axis&&(u.visible=-1!==this.axis.search(u.name))))}super.updateMatrixWorld(e)}}class FB extends pn{constructor(){super(new Th(1e5,1e5,2,2),new vs({visible:!1,wireframe:!0,side:2,transparent:!0,opacity:.1,toneMapped:!1})),this.isTransformControlsPlane=!0,this.type="TransformControlsPlane"}updateMatrixWorld(e){let t=this.space;switch(this.position.copy(this.worldPosition),"scale"===this.mode&&(t="local"),Ex.copy(mA).applyQuaternion("local"===t?this.worldQuaternion:xx),AA.copy(Gd).applyQuaternion("local"===t?this.worldQuaternion:xx),_A.copy(gA).applyQuaternion("local"===t?this.worldQuaternion:xx),kr.copy(AA),this.mode){case"translate":case"scale":switch(this.axis){case"X":kr.copy(this.eye).cross(Ex),Zc.copy(Ex).cross(kr);break;case"Y":kr.copy(this.eye).cross(AA),Zc.copy(AA).cross(kr);break;case"Z":kr.copy(this.eye).cross(_A),Zc.copy(_A).cross(kr);break;case"XY":Zc.copy(_A);break;case"YZ":Zc.copy(Ex);break;case"XZ":kr.copy(_A),Zc.copy(AA);break;case"XYZ":case"E":Zc.set(0,0,0)}break;default:Zc.set(0,0,0)}0===Zc.length()?this.quaternion.copy(this.cameraQuaternion):(nI.lookAt(Bo.set(0,0,0),Zc,kr),this.quaternion.setFromRotationMatrix(nI)),super.updateMatrixWorld(e)}}let OB=(()=>{class f{constructor(t){this.window=t}initialize(t,r,s){const l=((f,e)=>({81:()=>f.setSpace("local"===f.space?"world":"local"),16:()=>{f.setTranslationSnap(100),f.setRotationSnap(Jr_degToRad(15)),f.setScaleSnap(.25)},87:()=>f.setMode("translate"),69:()=>f.setMode("rotate"),82:()=>f.setMode("scale"),86:()=>{const t=Math.random()+.1,r=Math.random()+.1;e.camera.fov=160*t,e.camera.zoom=5*r},187:()=>f.setSize(f.size+.1),107:()=>f.setSize(f.size+.1),189:()=>f.setSize(Math.max(f.size-.1,.1)),109:()=>f.setSize(Math.max(f.size-.1,.1)),88:()=>f.showX=!f.showX,89:()=>f.showY=!f.showY,90:()=>f.showZ=!f.showZ,32:()=>f.enabled=!f.enabled,27:()=>f.reset()}))(t,r),u=_=>{l[`${_.keyCode}`]&&l[`${_.keyCode}`]()},g=_=>
83{16===_.keyCode&&(t.setTranslationSnap(null),t.setRotationSnap(null),t.setScaleSnap(null))};this.window.addEventListener("keydown",u),this.window.addEventListener("keyup",g),s.subscribe(()=>{this.window.removeEventListener("keydown",u),this.window.removeEventListener("keyup",g)})}static#t=this.\u0275fac=function(r){return new(r||f)(y.KVO(Window))};static#e=this.\u0275prov=y.jDH({token:f,factory:f.\u0275fac,providedIn:"root"})}return f})(),NB=(()=>{class f{constructor(t,r,s,l,u){var g=this;this.debugService=t,this.animationService=r,this.sceneService=s,this.cameraService=l,this.destroyed$=new U.B,this.operations={detachCamera:function(){var _=(0,xi.A)(function*(){const x=yield g.animationService.getThree();g.config.activeCamera=x.camera,x.camera=void 0});return function(){return _.apply(this,arguments)}}()},this.config=u.getConfig(),this.debugService.observeMouseCoords().pipe((0,K.Q)(this.destroyed$)).subscribe(_=>{this.updateWorldCursor(_.x,_.y)})}ngOnDestroy(){this.destroyed$.next(),this.destroyed$.complete()}initializeControl(t){this.control=t}initializeBloomFolder(t,r){const s=t.addFolder("Bloom");s.add(this.config.bloom,"threshold",0,1).onChange(l=>{r.threshold=Number(l)}),s.add(this.config.bloom,"strength",0,3).onChange(l=>{r.strength=Number(l)}),s.add(this.config.bloom,"radius",0,1).step(.01).onChange(l=>{r.radius=Number(l)})}initializeMouseFolder(t){const r=t.addFolder("Mouse");r.open(!1),r.add(this.config,"isFollowing"),r.add(this.config,"showCursor").onChange(l=>{this.toggleCursorVisibility(l)}),r.add(this.config.mouse,"x").listen(),r.add(this.config.mouse,"y").listen(),r.add(this.config.mouse,"z").listen(),r.add(this.config.mouse,"screenX").listen(),r.add(this.config.mouse,"screenY").listen(),r.close()}initializeLightingFolder(t,r){const s=t.addFolder("Lighting");s.add(this.config,"exposure",0,2).onChange(_=>{r.renderer.toneMappingExposure=_}),s.add(this.config,"lightDirect").name("Direct").onChange(_=>{r.directionalLight&&(r.directionalLight.intensity=_)}),s.add(this.config,"lightAmbient").name("Ambient").onChange(_=>{r.ambientLight&&(r.ambientLight.intensity=_)}),this.initializeBloomFolder(s,this.animationService.getBloompass()),s.close()}initializeCameraFolder(t){const r=t.addFolder("Camera");r.add(this.config,"isEditingCamera"),r.add(this.config,"cameraX",-1e3,1e3).listen(),r.add(this.config,"cameraY",-1e3,1e3).listen(),r.add(this.config,"cameraZ",-1e3,1500).listen(),r.add(this.config,"cameraModifierX",-80,80).listen(),r.add(this.config,"cameraModifierY",-80,80).listen(),r.add(this.config,"cameraModifierZ",-80,80).listen(),r.add(this.config,"viewportOffsetX",-200,200).listen(),r.add(this.config.camera,"fov").listen(),r.add(this.operations,"detachCamera"),r.close()}initCursor(){const t=new Id,r=new pn(t,new vs({color:16711680}));r.scale.set(1,1,1),r.position.z=5,r.visible=this.config.showCursor;const s=new FP(50);r.add(s),this.sceneService.add(r),this.worldCursor=r}updateWorldCursor(t,r){try{const s=this.cameraService.screenToWorld(t,r);s&&(this.config.mouse.x=s.x,this.config.mouse.y=s.y,this.config.mouse.z=s.z,this.config.mouse.screenX=t,this.config.mouse.screenY=r,this.worldCursor.position.copy(s))}catch{}}toggleCursorVisibility(t){this.worldCursor.visible=t}handleChanges(t,r){"isEditingCamera"===t.property&&this.handleCameraEditingChange(t,r),this.applyCameraPosition(r),["cameraModifierX","cameraModifierZ","cameraModifierY"].includes(t.property)&&this.applyCameraModifier(t,r),"fov"===t.property&&(r.camera.fov=this.config.camera.fov,r.camera.updateProjectionMatrix())}applyCameraPosition(t){t.camera?t.camera.position.set(this.config.cameraX,this.config.cameraY,this.config.cameraZ):this.config.activeCamera&&this.config.activeCamera.position.set(this.config.cameraX,this.config.cameraY,this.config.cameraZ)}applyCameraModifier(t,r){const s={...r.cameraModifier.position};"cameraModifierX"===t.property?s.x=t.value:"cameraModifierY"===t.property?s.y=t.value:"cameraModifierZ"===t.property&&(s.z=t.value),this.cameraService.renderCameraChange(s.x,s.y,s.z)}handleCameraEditingChange(t,r){!0===t.value?(this.config.cameraModifierX=r.cameraModifier.position.x,this.config.cameraModifierY=r.cameraModifier.position.y,this.config.cameraModifierZ=r.cameraModifier.position.z,this.config.cameraX=r.camera.position.x,this.config.cameraY=r.camera.position.y,this.config.cameraZ=r.camera.position.z,this.config.targetItem&&this.config.isEditing&&this.control.attach(this.config.targetItem)):this.control?.detach()}static#t=this.\u0275fac=function(r){return new(r||f)(y.KVO(rA),y.KVO(Yc),y.KVO(lc),y.KVO($h),y.KVO(Wc))};static#e=this.\u0275prov=y.jDH({token:f,factory:f.\u0275fac,providedIn:"root"})}return f})();const UB=["Select","core_core","core_death","core_deception","core_light","core_magic","core_nature","core_war","core_common","core_rare","core_epic","core_legendary","genesis_rare","genesis_epic","genesis_legendary","genesis_shiny-legendary","trial_common","trial_order","trial_disorder","trial_rare","trial_epic","trial_legendary","trial_shiny-legendary","order_rare","order_epic","order_legendary","order_shiny-legendary","mortal_rare","mortal_epic","mortal_legendary","mortal_shiny-legendary","wander_booster","wander_shiny-legendary","wander_promo","sealed-base_common","sealed-base_rare","sealed-base_epic","sealed-base_legendary","sealed-base_cosmetic","m2_booster","m2_crafting","m2_shiny-legendary","m2_super-shiny","cosmetics_basic","a1_crystal-booster","a1_crystal-super-booster","a1_crystal-shiny","a1_crystal-super-shiny","a1_fate-booster","a1_fate-super-booster","a1_fate-mega-booster","a1_fate-shiny","goe_regular","goe_shiny","goe_premium","m5_regular","m5_shiny","m5_premium","m6_regular","m6_shiny","m6_premium","m7_regular","m7_shiny","m7_premium","m8_regular","m8_shiny","m8_premium","m8_mega-shiny"];let zB=(()=>{class f{constructor(t,r,s){var l=this;this.debugService=t,this.animationService=r,this.destroyed$=new U.B,this.operations={nextPack:()=>{},playOpen:function(){var u=(0,xi.A)(function*(){(yield l.animationService.getAnimator()).playMarker("pack","open")});return function(){return u.apply(this,arguments)}}(),playReveal:function(){var u=(0,xi.A)(function*(){(yield l.animationService.getAnimator()).playMarker("pack","reveal")});return function(){return u.apply(this,arguments)}}(),detachCamera:function(){var u=(0,xi.A)(function*(){const g=yield l.animationService.getThree();l.config.activeCamera=g.camera,g.camera=void 0});return function(){return u.apply(this,arguments)}}()},this.config=s.getConfig(),this.debugService.observeSelectedPack().pipe((0,K.Q)(this.destroyed$)).subscribe(u=>{this.selectedPack=u,this.attachPack(u)})}ngOnDestroy(){this.destroyed$.next(),this.destroyed$.complete()}initializeControl(t){this.control=t}initializePackFolder(t){const r=t.addFolder("Selected Object");r.open(!1),r.add(this.config,"isEditing").onChange(s=>this.applyIsEditing(s)),r.add(this.config,"packX").listen(),r.add(this.config,"packY").listen(),r.add(this.config,"packZ").listen(),r.add(this.config,"packScaleX").listen(),r.add(this.config,"packScaleY").listen(),r.add(this.config,"packScaleZ").listen(),r.add(this.config,"packRotationX",0,350).listen(),r.add(this.config,"packRotationY",0,360).listen(),r.add(this.config,"packRotationZ",0,360).listen(),r.add(this.operations,"playOpen"),r.add(this.operations,"playReveal"),r.add(this.config,"emissive",-5,5).onChange(s=>
83this.applyEmissiveIntensity(s)),r.addColor(this.config,"emissiveColor").onChange(s=>this.applyEmissiveColor(s)),r.close()}applyIsEditing(t){!t||!this.config.targetItem||(this.config.packX=this.config.targetItem.position.x,this.config.packY=this.config.targetItem.position.y,this.config.packZ=this.config.targetItem.position.z,this.config.packScaleX=this.config.targetItem.scale.x,this.config.packScaleY=this.config.targetItem.scale.y,this.config.packScaleZ=this.config.targetItem.scale.z,this.config.packRotationX=Jr_radToDeg(this.config.targetItem.rotation.x),this.config.packRotationY=Jr_radToDeg(this.config.targetItem.rotation.y),this.config.packRotationZ=Jr_radToDeg(this.config.targetItem.rotation.z))}applyEmissiveIntensity(t){this.config.targetItem?.model&&this.config.targetItem.model.traverse(r=>{if(r instanceof pn&&r.name.startsWith("rarity_")){const s=r.material;s.emissiveIntensity=t,s.needsUpdate=!0}})}applyEmissiveColor(t){this.config.targetItem.model&&this.config.targetItem.model.traverse(r=>{if(r instanceof pn&&r.name.startsWith("rarity_")){const s=r.material;s.emissive.set(new An(t)),s.needsUpdate=!0}})}initializeSelectedPackFolder(t){const r=t.addFolder("Selected Pack");r.add(this.config,"packType",UB).name("Pack Asset").listen().onChange(l=>{}),this.initializeAnimationController(r),r.add(this.config,"targetPackIndex").name("Force pack index"),r.add(this.operations,"nextPack"),r.close()}initializeAnimationController(t){t.add(this.config,"animation",["Select","Anim Reveal","Anim Idle","Anim Open","No Anim"]).name("Play Animation").onFinishChange(s=>{this.selectedPack&&(s===oS?this.selectedPack.reveal():s===sT?this.selectedPack.open():s===aT?this.selectedPack.idle():s===oT&&this.selectedPack.reset(),this.config.animation="Select")})}attachPack(t){this.config.isEditing?this.control.attach(t):this.control?.detach()}static#t=this.\u0275fac=function(r){return new(r||f)(y.KVO(rA),y.KVO(Yc),y.KVO(Wc))};static#e=this.\u0275prov=y.jDH({token:f,factory:f.\u0275fac,providedIn:"root"})}return f})();const GB=["packX","packY","packZ","packScaleX","packScaleY","packScaleZ","packRotationX","packRotationY","packRotationZ"];let VB=(()=>{class f{constructor(t,r,s,l,u,g){this.environment=t,this.animationService=r,this.keysService=s,this.sceneService=l,this.packService=u,this.destroyed$=new U.B,this.config=g.getConfig()}ngOnInit(){this.initializeDebugInterface(),this.sceneService.initCursor()}ngOnDestroy(){this.gui&&this.gui.destroy(),this.destroyed$.next(),this.destroyed$.complete()}initializeDebugInterface(){var t=this;return(0,xi.A)(function*(){if(t.environment.production)return;const r=yield t.animationService.getThree(),s=new CB;s.title("Pack Opening Controls"),s.close(),t.gui=s,s.add(t.config,"isDebug").name("Fake opening"),s.add(t.config,"isMonitoring").onChange(u=>{u&&console.log("Monitoring",u,r)}),t.initializeControl(r),t.sceneService.initializeMouseFolder(s),t.packService.initializePackFolder(s),t.packService.initializeSelectedPackFolder(s),t.sceneService.initializeCameraFolder(s),t.sceneService.initializeLightingFolder(s,r),t.initializeChangeHandler(s,r)})()}initializeChangeHandler(t,r){t.onChange(s=>{this.config.isEditingCamera&&this.sceneService.handleChanges(s,r),this.config.isEditing&&this.config.targetItem&&GB.includes(s.property)&&(this.config.targetItem.position.set(this.config.packX,this.config.packY,this.config.packZ),this.config.targetItem.scale.set(this.config.packScaleX,this.config.packScaleY,this.config.packScaleZ),this.config.targetItem.rotation.set(Jr_degToRad(this.config.packRotationX),Jr_degToRad(this.config.packRotationY),Jr_degToRad(this.config.packRotationZ)))})}initializeControl(t){const r=new TB(t.camera,t.renderer.domElement);r.addEventListener("change",()=>{t.renderer.render(t.scene,t.camera),this.config.targetItem&&(this.config.packX=this.config.targetItem.position.x,this.config.packY=this.config.targetItem.position.y,this.config.packZ=this.config.targetItem.position.z,this.config.packScaleX=this.config.targetItem.scale.x,this.config.packScaleY=this.config.targetItem.scale.y,this.config.packScaleZ=this.config.targetItem.scale.z,this.config.packRotationX=Jr_radToDeg(this.config.targetItem.rotation.x),this.config.packRotationY=Jr_radToDeg(this.config.targetItem.rotation.y),this.config.packRotationZ=Jr_radToDeg(this.config.targetItem.rotation.z))}),t.scene.add(r),this.keysService.initialize(r,t,this.destroyed$),this.packService.initializeControl(r),this.sceneService.initializeControl(r)}static#t=this.\u0275fac=function(r){return new(r||f)(y.rXU(it.CF),y.rXU(Yc),y.rXU(OB),y.rXU(NB),y.rXU(zB),y.rXU(Wc))};static#e=this.\u0275cmp=y.VBU({type:f,selectors:[["cerberus-pack-opening-inspector"]],decls:0,vars:0,template:function(r,s){},styles:["[_nghost-%COMP%]{display:none}"]})}return f})();const HB={id:0,protoId:0,name:"Default",type:"cardback",rarity:"",owned:!0,god:"neutral"};v(71038),v(75850),v(32463);const Vd=(f,e)=>({zoomed:f,revealed:e});function QB(f,e){if(1&f){const t=y.RV6();y.j41(0,"div",14),y.bIt("click",function(s){const l=y.eBV(t).$implicit;return y.XpG(2).selectAsset(l),y.Njj(s.stopPropagation())}),y.nrm(1,"gu-cardback",15),y.j41(2,"gu-card-image",16),y.nrm(3,"gu-rectangular-spinner",17),y.k0s()()}if(2&f){const t=e.$implicit,r=y.XpG(2);y.Y8G("ngClass",y.l_i(7,Vd,r.selected===t.id,r.isRevealed(t))),y.R7$(),y.Y8G("cardback",r.defaultCardback),y.R7$(),y.ZvI("card asset rarity-",t.rarity.toLowerCase(),""),y.Y8G("protoId",t.protoId)("quality",t.quality)}}function WB(f,e){if(1&f){const t=y.RV6();y.j41(0,"div",14),y.bIt("click",function(s){const l=y.eBV(t).$implicit;return y.XpG(2).selectAsset(l),y.Njj(s.stopPropagation())}),y.nrm(1,"gu-cardback",15)(2,"gu-loadout-part",18)(3,"gu-cardback",19),y.k0s()}if(2&f){const t=e.$implicit,r=y.XpG(2);y.Y8G("ngClass",y.l_i(10,Vd,r.selected===t.id,r.isRevealed(t))),y.R7$(),y.Y8G("cardback",r.defaultCardback),y.R7$(),y.ZvI("cardback asset rarity-",t.rarity.toLowerCase(),""),y.Y8G("asset",t)("owned",t.owned)("hideCount",!0)("hideBorder",!0),y.R7$(),y.Y8G("cardback",t)}}function XB(f,e){if(1&f){const t=y.RV6();y.j41(0,"div",14),y.bIt("click",function(s){const l=y.eBV(t).$implicit;return y.XpG(2).selectAsset(l),y.Njj(s.stopPropagation())}),y.nrm(1,"gu-cardback",15)(2,"gu-loadout-part",18),y.k0s()}if(2&f){const t=e.$implicit,r=y.XpG(2);y.Y8G("ngClass",y.l_i(9,Vd,r.selected===t.id,r.isRevealed(t))),y.R7$(),y.Y8G("cardback",r.defaultCardback),y.R7$(),y.ZvI("trinket asset rarity-",t.rarity.toLowerCase(),""),y.Y8G("asset",t)("owned",t.owned)("hideCount",!0)("hideBorder",!0)}}function qB(f,e){if(1&f){const t=y.RV6();y.j41(0,"div",14),y.bIt("click",function(s){const l=y.eBV(t).$implicit;return y.XpG(2).selectAsset(l),y.Njj(s.stopPropagation())}),y.nrm(1,"gu-cardback",15)(2,"gu-loadout-part",18),y.k0s()}if(2&f){const t=e.$implicit,r=y.XpG(2);y.Y8G("ngClass",y.l_i(9,Vd,r.selected===t.id,r.isRevealed(t))),y.R7$(),y.Y8G("cardback",r.defaultCardback),y.R7$(),y.ZvI("board asset rarity-",t.rarity.toLowerCase(),""),y.Y8G("asset",t)("owned",t.owned)("hideCount",!0)("hideBorder",!0)}}function YB(f,e){1&f&&y.nrm(0,"div",20)}function $B(f,e){if(1&f&&y.nrm(0,"img",36),2&f){const t=y.XpG().$implicit;y.Y8G("src",t.imageUrl,y.B4B)("alt",t.identifier)}}function KB(f,e){if(1&f){const t=y.RV6();y.j41(0,"div",21),y.bIt("click",function(s){const l=y.eBV(t).$implicit;return y.XpG(2).selectInventoryItem(l),y.Njj(s.stopPropagation())}),y.nrm(1,"gu-cardback",15),y.j41(2,"div",22)(3,"div",23),y.nrm(4,"img",24)(5,"img",25)(6,"img",26),y.j41(7,"div",27),y.nrm(8,"img",28)(9,"img",29)(10,"img",30)(11,"img",31)(12,"img",32),y.k0s()(),y.j41(13,"span",33),y.pXf(14,0),y.k0s(),y.DNE(15,$B,1,2,"img",34),y.j41(16,"span",35),y.EFF(17),y.k0s()()()}if(2&f){const t=e.$implicit,r=y.XpG(2);y.Y8G("ngClass",y.l_i(4,Vd,r.selected===t.id,r.isRevealed(t))),y.R7$(),y.Y8G("cardback",r.defaultCardback),y.R7$(14),y.Y8G("ngIf",t.imageUrl),y.R7$(2),y.JRh(r.formatIdentifier(t.identifier))}}function ZB(f,e){if(1&f&&y.nrm(0,"img",36),2&f){const t=y.XpG().$implicit;y.Y8G("src",t.imageUrl,y.B4B)("alt",t.identifier)}}function jB(f,e){if(1&f){const t=y.RV6();y.j41(0,"div",21),y.bIt("click",function(s){const l=y.eBV(t).$implicit;return y.XpG(2).selectInventoryItem(l),y.Njj(s.stopPropagation())}),y.nrm(1,"gu-cardback",15),y.j41(2,"div",37)(3,"div",23),y.nrm(4,"img",24)(5,"img",25)(6,"img",26),y.j41(7,"div",27),y.nrm(8,"img",28)(9,"img",29)(10,"img",30)(11,"img",31)(12,"img",32),y.k0s()(),y.j41(13,"span",33),y.pXf(14,1),y.k0s(),y.DNE(15,ZB,1,2,"img",34),y.j41(16,"span",35),y.EFF(17),y.k0s()()()}if(2&f){const t=e.$implicit,r=y.XpG(2);y.Y8G("ngClass",y.l_i(4,Vd,r.selected===t.id,r.isRevealed(t))),y.R7$(),y.Y8G("cardback",r.defaultCardback),y.R7$(14),y.Y8G("ngIf",t.imageUrl),y.R7$(2),y.JRh(r.formatIdentifier(t.identifier))}}function JB(f,e){if(1&f){const t=y.RV6();y.j41(0,"div",38),y.bIt("click",function(s){const l=y.eBV(t).$implicit;return y.XpG(2).selectInventoryItem(l),y.Njj(s.stopPropagation())}),y.nrm(1,"gu-cardback",15),y.j41(2,"div",39)(3,"div",23),y.nrm(4,"img",40)(5,"img",41)(6,"img",42),y.j41(7,"div",27),y.nrm(8,"img",43)(9,"img",44)(10,"img",45)(11,"img",46)(12,"img",47),y.k0s()(),y.j41(13,"span",33),y.pXf(14,2),y.k0s(),y.j41(15,"span",35),y.EFF(16),y.k0s()()()}if(2&f){const t=e.$implicit,r=y.XpG(2);y.Y8G("ngClass",y.l_i(3,Vd,r.selected===t.id,r.isRevealed(t))),y.R7$(),y.Y8G("cardback",r.defaultCardback),y.R7$(15),y.JRh(r.formatTitle(t.identifier))}}function eL(f,e){if(1&f&&(y.qex(0),y.j41(1,"div",4),y.DNE(2,QB,4,10,"div",5)(3,WB,4,13,"div",5)(4,XB,3,12,"div",5)(5,qB,3,12,"div",5)(6,YB,1,0,"div",6)(7,KB,18,7,"div",7)(8,jB,18,7,"div",7)(9,JB,17,6,"div",8),y.k0s(),y.qSk(),y.j41(10,"svg",9)(11,"filter",10)(12,"feTurbulence",11),y.nrm(13,"animate",12),y.k0s(),y.nrm(14,"feDisplacementMap",13),y.k0s()(),y.bVm()),2&f){const t=y.XpG();y.R7$(2),y.Y8G("ngForOf",t.contents.cards),y.R7$(),y.Y8G("ngForOf",t.contents.cardbacks),y.R7$(),y.Y8G("ngForOf",t.contents.trinkets),y.R7$(),y.Y8G("ngForOf",t.contents.boards),y.R7$(),y.Y8G("ngForOf",t.contents.packs),y.R7$(),y.Y8G("ngForOf",t.contents.emotes),y.R7$(),y.Y8G("ngForOf",t.contents.portraits),y.R7$(),y.Y8G("ngForOf",t.contents.titles)}}let tL=(()=>{class f{constructor(t,r,s,l){this.sceneService=t,this.assetsService=r,this.window=s,this.changeDetector=l,this.destroyed$=new U.B,this.contents={cards:[],trinkets:[],boards:[],cardbacks:[],packs:[],emotes:[],portraits:[],titles:[]},this.active=!1,this.defaultCardback=HB,this.hiddenAssetIds=[]}ngOnInit(){(0,Zh.z)({contents:this.assetsService.observeContents(),stage:this.sceneService.observeStage()}).pipe((0,K.Q)(this.destroyed$)).subscribe(({contents:t,stage:r})=>{this.contents=t,this.active=!("contents"!==r.substring(0,8)||!(t.cards.length||t.trinkets.length||t.boards.length||t.cardbacks.length||t.emotes.length||t.portraits.length||t.titles.length))}),this.assetsService.observeHidden().pipe((0,K.Q)(this.destroyed$)).subscribe(t=>{this.hiddenAssetIds=t}),this.assetsService.observeFocused().pipe((0,K.Q)(this.destroyed$)).subscribe(t=>{this.selected=t}),this.attachEventHandler()}attachEventHandler(){const t=()=>{this.active&&this.selected&&this.assetsService.showAll()};this.window.addEventListener("click",t),this.destroyed$.pipe((0,Kt.s)(1)).subscribe(()=>{this.window.removeEventListener("click",t)})}selectAsset(t){if(!this.selected)return this.hiddenAssetIds.includes(t.id)?(this.assetsService.reveal(t.id),void this.changeDetector.detectChanges()):void this.assetsService.focus(t.id);this.assetsService.showAll()}selectInventoryItem(t){if(this.selected)return void this.assetsService.showAll();const r=t.id;if(this.hiddenAssetIds.includes(r))return this.assetsService.reveal(r),void this.changeDetector.detectChanges();this.assetsService.focus(r)}isRevealed(t){return!this.hiddenAssetIds.includes(t.id)}formatIdentifier(t){return t.split("-").map(r=>r.charAt(0).toUpperCase()+r.slice(1)).join(" ")}formatTitle(t){return t.charAt(0).toUpperCase()+t.slice(1)}static#t=this.\u0275fac=function(r){return new(r||f)(y.rXU(lc),y.rXU(Dm),y.rXU(Window),y.rXU(y.gRc))};static#e=this.\u0275cmp=y.VBU({type:f,selectors:[["cerberus-assets"]],hostVars:2,hostBindings:function(r,s){2&r&&y.AVh("active",s.active)},decls:1,vars:1,consts:()=>{let t,r,s;return t="Emote",r="God portrait",s="Title",[t,r,s,[4,"ngIf"],[1,"assets"],["class","item",3,"ngClass","click",4,"ngFor","ngForOf"],["class","item",4,"ngFor","ngForOf"],["class","item inventory-item",3,"ngClass","click",4,"ngFor","ngForOf"],["class","item inventory-item title-item",3,"ngClass","click",4,"ngFor","ngForOf"],[1,"filter-svg"],["id","wavy"],["x","0","y","0","baseFrequency","0.009","numOctaves","5","speed","2"],["attributeName","baseFrequency","dur","60s","values","0.02; 0.005;
83 0.02","repeatCount","indefinite"],["in","SourceGraphic","scale","25"],[1,"item",3,"click","ngClass"],[1,"cover",3,"cardback"],[3,"protoId","quality"],[1,"spinner"],[3,"asset","owned","hideCount","hideBorder"],[1,"cardback",3,"cardback"],[1,"item"],[1,"item","inventory-item",3,"click","ngClass"],[1,"inventory-drop","emote","asset"],["aria-hidden","true",1,"inventory-drop__frame"],["src","assets/pack-opening/inventory-drop-frame/frame-0.svg","alt",""],["src","assets/pack-opening/inventory-drop-frame/frame-1.svg","alt",""],["src","assets/pack-opening/inventory-drop-frame/frame-2.svg","alt",""],[1,"inventory-drop__frame-inner"],["src","assets/pack-opening/inventory-drop-frame/base.svg","alt",""],["src","assets/pack-opening/inventory-drop-frame/stroke-3.svg","alt",""],["src","assets/pack-opening/inventory-drop-frame/stroke-2.svg","alt",""],["src","assets/pack-opening/inventory-drop-frame/stroke-1.svg","alt",""],["src","assets/pack-opening/inventory-drop-frame/stroke-0.svg","alt",""],[1,"inventory-drop__type"],["class","inventory-drop__image",3,"src","alt",4,"ngIf"],[1,"inventory-drop__name"],[1,"inventory-drop__image",3,"src","alt"],[1,"inventory-drop","portrait","asset"],[1,"item","inventory-item","title-item",3,"click","ngClass"],[1,"inventory-drop","title","asset"],["src","assets/pack-opening/inventory-drop-frame/title-frame-0.svg","alt",""],["src","assets/pack-opening/inventory-drop-frame/title-frame-1.svg","alt",""],["src","assets/pack-opening/inventory-drop-frame/title-frame-2.svg","alt",""],["src","assets/pack-opening/inventory-drop-frame/title-base.svg","alt",""],["src","assets/pack-opening/inventory-drop-frame/title-stroke-3.svg","alt",""],["src","assets/pack-opening/inventory-drop-frame/title-stroke-2.svg","alt",""],["src","assets/pack-opening/inventory-drop-frame/title-stroke-1.svg","alt",""],["src","assets/pack-opening/inventory-drop-frame/title-stroke-0.svg","alt",""]]},template:function(r,s){1&r&&y.DNE(0,eL,15,8,"ng-container",3),2&r&&y.Y8G("ngIf",s.active)},dependencies:[S.YU,S.Sq,S.bT],styles:['[_nghost-%COMP%]{width:100%;height:100%;display:flex;flex-direction:column;z-index:10;place-content:center;place-items:center}.active[_nghost-%COMP%]{pointer-events:all}.assets[_ngcontent-%COMP%]{display:flex;place-content:center;place-items:center;gap:8px;animation:_ngcontent-%COMP%_reveal .5s ease-in-out forwards;width:100%}.item[_ngcontent-%COMP%]{position:relative;flex:1 1 auto;max-width:35.7142857143vh;transition:scale .2s ease-in-out,transform .2s ease-in-out,filter .2s ease-in-out;aspect-ratio:1/1.4;cursor:pointer}.item.title-item[_ngcontent-%COMP%]{aspect-ratio:210/113}.item[_ngcontent-%COMP%]:before{content:"";display:block;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);border-radius:50%;width:25px;height:25px;z-index:10;filter:url(#wavy) brightness(2000%)}.item[_ngcontent-%COMP%]:hover{scale:1.05;z-index:10}.item.revealed[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_shake .2s linear 0s 1}.item.zoomed[_ngcontent-%COMP%]{scale:1.6;z-index:100;transform:translateY(5%);filter:drop-shadow(0 0 100px black)}.item.zoomed[_ngcontent-%COMP%]:first-child:not(:last-child){transform:translate(25%,5%)}.item.zoomed[_ngcontent-%COMP%]:last-child:not(:first-child){transform:translate(-25%,5%)}.item[_ngcontent-%COMP%]   .asset[_ngcontent-%COMP%]{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:100%;opacity:0;transition:opacity .3s ease-in-out}.item.revealed[_ngcontent-%COMP%]   .asset[_ngcontent-%COMP%]{opacity:1}.item[_ngcontent-%COMP%]   .cover[_ngcontent-%COMP%]{display:block;position:absolute;top:50%;left:50%;transform:translate(-50%,-47.5%) scale(.74);width:100%;opacity:1;transition:opacity .3s ease-in-out}.item.revealed[_ngcontent-%COMP%]   .cover[_ngcontent-%COMP%]{opacity:0}.item[_ngcontent-%COMP%]   .board[_ngcontent-%COMP%], .item[_ngcontent-%COMP%]   .trinket[_ngcontent-%COMP%], .item[_ngcontent-%COMP%]   .cardback[_ngcontent-%COMP%]{transform:translate(-50%,-47.5%) scale(.74);border:2px solid #ebc98b;border-radius:8px;overflow:hidden}.spinner[_ngcontent-%COMP%]{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}@keyframes _ngcontent-%COMP%_reveal{0%{opacity:0;scale:.1}to{opacity:1;scale:1}}@keyframes _ngcontent-%COMP%_shake{0%{transform:translate(1px,1px) rotate(0)}10%{transform:translate(-1px,-2px) rotate(-1deg)}20%{transform:translate(-3px) rotate(1deg)}30%{transform:translate(3px,2px) rotate(0)}40%{transform:translate(1px,-1px) rotate(1deg)}50%{transform:translate(-1px,2px) rotate(-1deg)}60%{transform:translate(-3px,1px) rotate(0)}70%{transform:translate(3px,1px) rotate(-1deg)}80%{transform:translate(-1px,-1px) rotate(1deg)}90%{transform:translate(1px,2px) rotate(0)}to{transform:translate(1px,-2px) rotate(-1deg)}}@keyframes _ngcontent-%COMP%_glow{0%{width:5px;height:5px;opacity:.5;
83box-shadow:inset 0 0 25px #ffffff80,inset 0 0 25px #006eb3,inset 0 0 50px #ffffff80,inset 0 0 50px #006eb3,0 0 50px 10px #006eb3,0 0 25px 10px #ffffff80,0 0 50px 10px #006eb3}33%{width:100px;height:100px;opacity:1;box-shadow:inset 0 0 25px 10px #ffffff80,inset 0 0 100px 30px #006eb3bf,inset 0 0 50px 40px #ffffff80,inset 0 0 100px 50px #006eb3,0 0 30px 30px #006eb3,0 0 40px 40px #ffffff80,0 0 50px 50px #006eb3bf}66%{width:300px;height:300px;opacity:1;box-shadow:inset 0 0 25px 25px #fff3,inset 0 0 5px 100px #006eb333,inset 0 0 10px 200px #fff3,inset 0 0 20px 200px #006eb333,0 0 50px 100px #006eb333,0 0 75px 200px #fff3,0 0 100px 300px #006eb333}to{width:500px;height:500px;box-shadow:inset 0 0 50px 100px #fff0,inset 0 0 50px 200px #006eb300,inset 0 0 50px 300px #fff0,inset 0 0 50px 400px #006eb300,0 0 10px 200px #006eb300,0 0 10px 300px #fff0,0 0 10px 500px #006eb300}}.item[_ngcontent-%COMP%]   .inventory-drop.asset[_ngcontent-%COMP%]{height:100%}.inventory-drop[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:space-between;clip-path:polygon(8.05% 0%,91.9% 0%,100% 5.56%,100% 94.3%,91.7% 100%,8.24% 100%,0% 94.3%,0% 5.56%);padding:6%;height:100%;box-sizing:border-box;position:relative}.inventory-drop__frame[_ngcontent-%COMP%]{position:absolute;inset:0;pointer-events:none;z-index:0}.inventory-drop__frame[_ngcontent-%COMP%] > img[_ngcontent-%COMP%]{position:absolute;inset:0;width:100%;height:100%;display:block}.inventory-drop__frame-inner[_ngcontent-%COMP%]{position:absolute;inset:1.43% 2.38% 1.75%}.inventory-drop__frame-inner[_ngcontent-%COMP%] > img[_ngcontent-%COMP%]{position:absolute;inset:0;width:100%;height:100%;display:block}.inventory-drop__type[_ngcontent-%COMP%]{font-size:2.5vh;font-weight:700;text-align:center;letter-spacing:.04em;color:#d7d7d7;flex-shrink:0;position:relative;z-index:1}.inventory-drop__image[_ngcontent-%COMP%]{width:88%;aspect-ratio:1/1;object-fit:contain;align-self:center;flex-shrink:0;position:relative;z-index:1}.inventory-drop__name[_ngcontent-%COMP%]{font-size:3.5vh;font-weight:700;text-align:center;background:linear-gradient(to bottom,#fff2d8,#ebc98b 50.34%,#c6a052);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text;word-break:break-word;line-height:1.3;flex-shrink:0;position:relative;z-index:1}.inventory-drop.title[_ngcontent-%COMP%]{clip-path:polygon(8.05% 0%,91.9% 0%,100% 15.47%,100% 84.17%,91.73% 100%,8.23% 100%,0% 84.25%,0% 15.39%);justify-content:center;gap:2%}.inventory-drop.title[_ngcontent-%COMP%]   .inventory-drop__frame-inner[_ngcontent-%COMP%]{inset:3.98% 2.38% 4.87%}.inventory-drop.title[_ngcontent-%COMP%]   .inventory-drop__type[_ngcontent-%COMP%]{font-size:2.7vh}.inventory-drop.title[_ngcontent-%COMP%]   .inventory-drop__name[_ngcontent-%COMP%]{font-size:4vh;font-weight:700;background:linear-gradient(to bottom,#fff2d8,#ebc98b 50.34%,#c6a052);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text;text-align:center;word-break:break-word;line-height:1.2;flex-shrink:0;position:relative;z-index:1}.asset.rarity-rare[_ngcontent-%COMP%]{filter:drop-shadow(0 0 10px #006eb3)}.asset.rarity-epic[_ngcontent-%COMP%]{filter:drop-shadow(0 0 10px #6D1FC4)}.asset.rarity-legendary[_ngcontent-%COMP%]{filter:drop-shadow(0 0 10px #f5d400)}.asset.rarity-mythic[_ngcontent-%COMP%]{filter:drop-shadow(0 0 10px #D02C3A)}.filter-svg[_ngcontent-%COMP%]{position:absolute;visibility:hidden}']})}return f})();const nL=["animator"],iL=f=>({hidden:f});br.registerPlugin(v_);let iI=(()=>{class f{constructor(t,r,s,l,u,g,_,x,M,C,P,R,F){this.environment=t,this.changeDetectorRef=r,this.audioService=s,this.cameraService=l,this.animationService=u,this.sceneService=g,this.mouseEventsService=_,this.keyboardService=x,this.loaderService=M,this.flowService=C,this.packGroupsService=P,this.assetsService=R,this.sentryService=F,this.isLoaded=!1,this.destroyed$=new U.B,this.resizeObserver=new ResizeObserver((0,sr.sg)(()=>this.resizeAnimator(),50))}resizeAnimator(){if(!this.guAnimatorRef?.nativeElement)return;const t=this.guAnimatorRef.nativeElement.getBoundingClientRect();this.maxHeight=t.height,this.maxWidth=t.width,this.sceneService.setSceneRect(t),this.changeDetectorRef.detectChanges()}handleStageResized(t){this.isLoaded?this.sceneService.setStageRect
83(t):this.stageRect=t}ngOnInit(){this.sceneService.setStage("idle"),this.loaderService.initialize()}ngAfterViewInit(){const t=this.guAnimatorRef.nativeElement;this.initAudio(),this.resizeAnimator(),this.animationService.setAnimator(t),this.resizeObserver.observe(t),this.mouseEventsService.initialize(t),this.keyboardService.initialize(),this.sentryService.showFeedbackWidget()}ngOnDestroy(){this.sentryService.hideFeedbackWidget(),this.flowService.cancel(),this.loaderService.reset(),this.destroyed$.next(),this.destroyed$.complete(),this.mouseEventsService.destroy(),this.keyboardService.destroy(),this.guAnimatorRef?.nativeElement&&this.resizeObserver.unobserve(this.guAnimatorRef.nativeElement),this.sceneService.setStage("idle"),this.animationService.reset()}initAudio(){this.audioService.observeVolume().pipe((0,K.Q)(this.destroyed$)).subscribe(t=>{this.guAnimatorRef.nativeElement.volume=t})}selectPack(t){(!this.selectedPack||this.selectedPack.id!==t.id)&&(this.selectedPack=t,this.flowService.debouncedShowPack(t))}onAnimationLoaded(t){const r=t.detail.target,s=r.controller.applications.three;this.isLoaded||(s.viewport.minWidth=200,s.viewport.minHeight=400,this.isLoaded=!0,this.animationService.setThree(s),this.cameraService.initialize(s,r),this.stageRect&&this.sceneService.setStageRect(this.stageRect))}onAnimationError(t){console.error(`Error while loading animation: ${t?.detail?.error??"Unknown error"}`)}openCurrentPack(t){this.flowService.packOpenHandler(t)}continue(){this.selectedPack=void 0,this.flowService.continue()}nextPack(){const t=this.selectedPack;this.selectedPack=void 0,this.assetsService.reset(),this.packGroupsService.observeNextPack(t).pipe((0,Kt.s)(1)).subscribe(r=>{r?(this.sceneService.setStage("pack.revealing"),this.flowService.setAutoOpen(!0),this.selectPack(r)):this.continue()})}static#t=this.\u0275fac=function(r){return new(r||f)(y.rXU(it.CF),y.rXU(y.gRc),y.rXU(yC),y.rXU($h),y.rXU(Yc),y.rXU(lc),y.rXU(vR),y.rXU(zR),y.rXU(TS),y.rXU(QT),y.rXU(dA),y.rXU(Dm),y.rXU(GR.lC))};static#e=this.\u0275cmp=y.VBU({type:f,selectors:[["cerberus-open-packs"]],viewQuery:function(r,s){if(1&r&&y.GBs(nL,7),2&r){let l;y.mGM(l=y.lsd())&&(s.guAnimatorRef=l.first)}},decls:14,vars:6,consts:[["animator",""],["overlay",""],["id","animator","debug","false","animatorStyles","position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);","scale","0.5","cameraZ","8",1,"openPacks__animator",3,"loaded","error","maxWidth","maxHeight"],[1,"openPacks__loader",3,"ngClass"],["color","apocyan"],[1,"openPacks__overlay"],[1,"openPacks__left",3,"selectPack"],[1,"open-packs-right"],[3,"resized"],[1,"openPacks__right",3,"openPack","pack"],[3,"continue","next"]],template:function(r,s){if(1&r){const l=y.RV6();y.j41(0,"ig-animator",2,0),y.bIt("loaded",function(g){return y.eBV(l),y.Njj(s.onAnimationLoaded(g))})("error",function(g){return y.eBV(l),y.Njj(s.onAnimationError(g))}),y.k0s(),y.nrm(2,"cerberus-tooltip")(3,"cerberus-pack-opening-inspector"),y.j41(4,"div",3),y.nrm(5,"gu-rectangular-spinner",4),y.k0s(),y.j41(6,"div",5,1)(8,"cerberus-asset-panel",6),y.bIt("selectPack",function(g){return y.eBV(l),y.Njj(s.selectPack(g))}),y.k0s(),y.j41(9,"div",7)(10,"cerberus-open-packs-stage",8),y.bIt("resized",function(g){return y.eBV(l),y.Njj(s.handleStageResized(g))}),y.nrm(11,"cerberus-assets"),y.k0s(),y.j41(12,"cerberus-pack-footer",9),y.bIt("openPack",function(g){return y.eBV(l),y.Njj(s.openCurrentPack(g))}),y.k0s()()(),y.j41(13,"cerberus-pack-content-footer",10),y.bIt("continue",function(){return y.eBV(l),y.Njj(s.continue())})("next",function(){return y.eBV(l),y.Njj(s.nextPack())}),y.k0s()}2&r&&(y.Y8G("maxWidth",s.maxWidth)("maxHeight",s.maxHeight),y.R7$(4),y.Y8G("ngClass",y.eq3(4,iL,s.isLoaded)),y.R7$(8),y.Y8G("pack",s.selectedPack))},dependencies:[S.YU,YT,iB,hB,pB,gB,VB,tL],styles:["[_nghost-%COMP%]{display:flex;position:relative;overflow:hidden;height:calc(100vh - 68px);min-height:400px;place-content:center}.openPacks__animator[_ngcontent-%COMP%]{display:flex;background:transparent;overflow:hidden;margin:0 auto;width:100%;height:100%;max-width:230vh;position:relative}.openPacks__overlay[_ngcontent-%COMP%]{display:flex;position:absolute;z-index:1;inset:0;pointer-events:none}.openPacks__loader[_ngcontent-%COMP%]{display:flex;position:absolute;z-index:2;inset:0;align-items:center;flex-direction:column;justify-content:center;background-color:#0a0a0a;pointer-events:none;transition:opacity .3s linear}.openPacks__loader.hidden[_ngcontent-%COMP%]{opacity:0}
83.openPacks__list[_ngcontent-%COMP%]{flex-direction:column;min-width:300px;height:100%;display:flex;align-items:center;justify-content:center;background-color:#0003;margin:16px}.openPacks__right[_ngcontent-%COMP%]{height:204px;align-self:flex-end;width:100%}@media screen and (max-width: 1023px){.openPacks__overlay[_ngcontent-%COMP%]{width:100%}}.open-packs-right[_ngcontent-%COMP%]{flex:1 1 auto;display:flex;flex-direction:column;pointer-events:none;-webkit-user-select:none;user-select:none}@media screen and (max-width: 1023px){[_nghost-%COMP%]{flex-direction:column;place-content:center flex-end}.openPacks__overlay[_ngcontent-%COMP%]{flex-direction:column}.openPacks__animator[_ngcontent-%COMP%]{height:60%}}"]})}return f})();const rL=[{path:"",component:iI}];let sL=(()=>{class f{static#t=this.\u0275fac=function(r){return new(r||f)};static#e=this.\u0275mod=y.$C({type:f});static#n=this.\u0275inj=y.G2t({imports:[Ps.iI.forChild(rL),Ps.iI]})}return f})(),aL=(()=>{class f{static#t=this.\u0275fac=function(r){return new(r||f)};static#e=this.\u0275mod=y.$C({type:f});static#n=this.\u0275inj=y.G2t({imports:[S.MD,Tn,sr.jd,sL]})}return f})()},10704:(d,p,v)=>{"use strict";v.d(p,{r:()=>X});var S=v(89204),I=v(25984),y=v(84205),U=v(69072),q=v(68559);let X=(()=>{class ee{constructor(me,K){this.environment=me,this.window=K,this.destroyed$=new y.B,this.addresses=[]}ngOnDestroy(){this.destroyed$.next(),this.destroyed$.complete()}connect(){var me=this;return(0,S.A)(function*(){try{const K=yield me.window.ethereum.request({method:"eth_requestAccounts"});return me.addresses=K,K}catch{return me.addresses=[],[]}})()}ensureConnected(){var me=this;return(0,S.A)(function*(){return me.addresses.length?me.addresses:yield me.connect()})()}revokePermissions(){var me=this;return(0,S.A)(function*(){try{return yield me.window.ethereum.request({method:"wallet_revokePermissions",params:[{eth_accounts:{}}]})}catch{return}})()}selectWallet(){var me=this;return(0,S.A)(function*(){try{return yield me.window.ethereum.request({method:"wallet_requestPermissions",params:[{eth_accounts:{}}]}).then(()=>me.connect())}catch{return[]}})()}sign(me,K){var le=this;return(0,S.A)(function*(){return yield le.window.ethereum.request({method:"personal_sign",params:[me,K]})})()}includesWallet(me){var K=this;return(0,S.A)(function*(){return(yield K.userWallets()).includes(me)})()}userWallets(){var me=this;return(0,S.A)(function*(){return me.window.ethereum?yield me.window.ethereum.request({method:"eth_requestAccounts"}):[]})()}isApprovedForAll(me,K,le){var ce=this;return(0,S.A)(function*(){const se=new I.KA(["function isApprovedForAll(address owner, address operator) view returns (bool)"]),be=yield ce.window.ethereum.request({method:"eth_call",params:[{to:me,data:se.encodeFunctionData("isApprovedForAll",[K,le])},"latest"]}),[ae]=se.decodeFunctionResult("isApprovedForAll",be);return!0===ae})()}transact(me,K){var le=this;return(0,S.A)(function*(){if(!(yield le.validChain()))return{txn:"",error:`Metamask requesting transaction on incorrect network (${yield le.chainId()}) but need to be on (${le.requiredChain()})`};const se=yield le.userWallets();if(!se.includes(K.wallet_address))return{txn:"",error:"Metamask requesting transaction from wallet address ("+se[0]+") but need: "+K.wallet_address};const be=le.generateTxnParams(K.wallet_address,me,K);0==be.length&&console.warn("got error generating contract params");try{yield le.window.ethereum.request({method:"eth_call",params:be})}catch(j){return{txn:"",error:j}}let ae;try{ae=yield le.window.ethereum.request({method:"eth_sendTransaction",params:be})}catch(j){return{txn:"",error:j}}return console.warn("waiting for txn: "+ae),{txn:ae,error:ae.length>0?"":"txn failed"}})()}generateTxnParams(me,K,le){const ce={from:me};let se={functionName:""};switch(K){case"asset-burn":se={functionName:"burnBatch",abi:"function burnBatch(uint256[] tokenIds)"};break;case"asset-transfer":se={functionName:"safeTransferFromBatch",abi:{type:"function",inputs:[{name:"tr",internalType:"struct ERC721Hybrid.TransferRequest",type:"tuple",components:[{name:"from",internalType:"address",type:"address"},{name:"tos",internalType:"address[]",type:"address[]"},{name:"tokenIds",internalType:"uint256[]",type:"uint256[]"}]}],name:"safeTransferFromBatch",outputs:[],stateMutability:"nonpayable"}};break;case"token-transfer":if(0==le.contract_address.length){const ae=BigInt(le.params[1]);ce.to=le.params[0],ce.value="0x"+ae.toString(16)}else se={functionName:"transfer",abi:"function transfer(address _to, uint256 _value)"};break;case"asset-approve":se={functionName:"setApprovalForAll",abi:"function setApprovalForAll(address operator, bool approved)"};break;default:return""}if(se.functionName.length>0){const ae=new I.KA([se.abi]);let re="";try{re=ae.encodeFunctionData(se.functionName,le.params)}catch(j){return console.warn(j),""}ce.to=le.contract_address,ce.data=re}return[ce,"latest"]}waitForTxn(me){var K=this;return(0,S.A)(function*(){let le=0;for(;le<15;){if((yield K.window.ethereum.request({method:"eth_getTransactionByHash",params:[me]})).blockNumber)return"0x1"==(yield K.window.ethereum.request({method:"eth_getTransactionReceipt",params:[me]})).status;le++,yield new Promise(se=>setTimeout(se,1e3))}return!1})()}validChain(){var me=this;return(0,S.A)(function*(){return(yield me.chainId())==me.requiredChain()})()}requiredChain(){return this.environment.production?13371:13473}chainId(){var me=this;return(0,S.A)(function*(){return yield me.window.ethereum.request({method:"eth_chainId"}).then(K=>parseInt(K,16)).catch(()=>0)})()}static#t=this.\u0275fac=function(K){return new(K||ee)(q.KVO(U.CF),q.KVO(Window))};static#e=this.\u0275prov=q.jDH({token:ee,factory:ee.\u0275fac,providedIn:"root"})}return ee})()},24335:function(module,exports,__webpack_require__){var p;typeof navigator<"u"&&(p=function(three){"use strict";var svgNS="http://www.w3.org/2000/svg",locationHref="",_useWebWorker=!1,initialDefaultFrame=-999999,setWebWorker=function(p){_useWebWorker=!!p},getWebWorker=function(){return _useWebWorker},setLocationHref=function(p){locationHref=p},getLocationHref=function(){return locationHref};function createTag(d){return document.createElement(d)}function extendPrototype(d,p){var v,I,S=d.length;for(v=0;v<S;v+=1)for(var y in I=d[v].prototype)Object.prototype.hasOwnProperty.call(I,y)&&(p.prototype[y]=I[y])}function getDescriptor(d,p){return Object.getOwnPropertyDescriptor(d,p)}function createProxyFunction(d){function p(){}return p.prototype=d,p}var audioControllerFactory=function(){function d(p){this.audios=[],this.audioFactory=p,this._volume=1,this._isMuted=!1}return d.prototype={addAudio:function(v){this.audios.push(v)},pause:function(){var v,S=this.audios.length;for(v=0;v<S;v+=1)this.audios[v].pause()},resume:function(){var v,S=this.audios.length;for(v=0;v<S;v+=1)this.audios[v].resume()},setRate:function(v){var S,I=this.audios.length;for(S=0;S<I;S+=1)this.audios[S].setRate(v)},createAudio:function(v){return this.audioFactory?this.audioFactory(v):window.Howl?new window.Howl({src:[v]}):{isPlaying:!1,play:function(){this.isPlaying=!0},seek:function(){this.isPlaying=!1},playing:function(){},rate:function(){},setVolume:function(){}}},setAudioFactory:function(v){this.audioFactory=v},setVolume:function(v){this._volume=v,this._updateVolume()},mute:function(){this._isMuted=!0,this._updateVolume()},unmute:function(){this._isMuted=!1,this._updateVolume()},getVolume:function(){return this._volume},_updateVolume:function(){var v,S=this.audios.length;for(v=0;v<S;v+=1)this.audios[v].volume(this._volume*(this._isMuted?0:1))}},function(){return new d}}(),createTypedArray=function(){function d(v,S){var U,I=0,y=[];
vendor: 5,120 bytes, line 83
83switch(v){case"int16":case"uint8c":U=1;break;default:U=1.1}for(I=0;I<S;I+=1)y.push(U);return y}return"function"==typeof Uint8ClampedArray&&"function"==typeof Float32Array?function p(v,S){return"float32"===v?new Float32Array(S):"int16"===v?new Int16Array(S):"uint8c"===v?new Uint8ClampedArray(S):d(v,S)}:d}();function createSizedArray(d){return Array.apply(null,{length:d})}function _typeof$6(d){return(_typeof$6="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(p){return typeof p}:function(p){return p&&"function"==typeof Symbol&&p.constructor===Symbol&&p!==Symbol.prototype?"symbol":typeof p})(d)}var subframeEnabled=!0,expressionsPlugin=null,expressionsInterfaces=null,idPrefix$1="",isSafari=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),_shouldRoundValues=!1,bmPow=Math.pow,bmSqrt=Math.sqrt,bmFloor=Math.floor,bmMax=Math.max,bmMin=Math.min,BMMath={};function ProjectInterface$1(){return{}}!function(){var p,d=["abs","acos","acosh","asin","asinh","atan","atanh","atan2","ceil","cbrt","expm1","clz32","cos","cosh","exp","floor","fround","hypot","imul","log","log1p","log2","log10","max","min","pow","random","round","sign","sin","sinh","sqrt","tan","tanh","trunc","E","LN10","LN2","LOG10E","LOG2E","PI","SQRT1_2","SQRT2"],v=d.length;for(p=0;p<v;p+=1)BMMath[d[p]]=Math[d[p]]}(),BMMath.random=Math.random,BMMath.abs=function(d){if("object"===_typeof$6(d)&&d.length){var S,v=createSizedArray(d.length),I=d.length;for(S=0;S<I;S+=1)v[S]=Math.abs(d[S]);return v}return Math.abs(d)};var defaultCurveSegments=150,degToRads=Math.PI/180,roundCorner=.5519;function roundValues(d){_shouldRoundValues=!!d}function bmRnd(d){return _shouldRoundValues?Math.round(d):d}function styleDiv(d){d.style.position="absolute",d.style.top=0,d.style.left=0,d.style.display="block",d.style.transformOrigin="0 0",d.style.webkitTransformOrigin="0 0",d.style.backfaceVisibility="visible",d.style.webkitBackfaceVisibility="visible",d.style.transformStyle="preserve-3d",d.style.webkitTransformStyle="preserve-3d",d.style.mozTransformStyle="preserve-3d"}function BMEnterFrameEvent(d,p,v,S){this.type=d,this.currentTime=p,this.totalTime=v,this.direction=S<0?-1:1}function BMCompleteEvent(d,p){this.type=d,this.direction=p<0?-1:1}function BMCompleteLoopEvent(d,p,v,S){this.type=d,this.currentLoop=v,this.totalLoops=p,this.direction=S<0?-1:1}function BMSegmentStartEvent(d,p,v){this.type=d,this.firstFrame=p,this.totalFrames=v}function BMDestroyEvent(d,p){this.type=d,this.target=p}function BMRenderFrameErrorEvent(d,p){this.type="renderFrameError",this.nativeError=d,this.currentTime=p}function BMConfigErrorEvent(d){this.type="configError",this.nativeError=d}function BMAnimationConfigErrorEvent(d,p){this.type=d,this.nativeError=p}var createElementID=function(){var d=0;return function(){return idPrefix$1+"__lottie_element_"+(d+=1)}}();function HSVtoRGB(d,p,v){var S,I,y,U,q,X,ee,oe;switch(X=v*(1-p),ee=v*(1-(q=6*d-(U=Math.floor(6*d)))*p),oe=v*(1-(1-q)*p),U%6){case 0:S=v,I=oe,y=X;break;case 1:S=ee,I=v,y=X;break;case 2:S=X,I=v,y=oe;break;case 3:S=X,I=ee,y=v;break;case 4:S=oe,I=X,y=v;break;case 5:S=v,I=X,y=ee}return[S,I,y]}function RGBtoHSV(d,p,v){var U,S=Math.max(d,p,v),I=Math.min(d,p,v),y=S-I,q=0===S?0:y/S,X=S/255;switch(S){case I:U=0;break;case d:U=p-v+y*(p<v?6:0),U/=6*y;break;case p:U=v-d+2*y,U/=6*y;break;case v:U=d-p+4*y,U/=6*y}return[U,q,X]}function addSaturationToRGB(d,p){var v=RGBtoHSV(255*d[0],255*d[1],255*d[2]);return v[1]+=p,v[1]>1?v[1]=1:v[1]<=0&&(v[1]=0),HSVtoRGB(v[0],v[1],v[2])}function addBrightnessToRGB(d,p){var v=RGBtoHSV(255*d[0],255*d[1],255*d[2]);return v[2]+=p,v[2]>1?v[2]=1:v[2]<0&&(v[2]=0),HSVtoRGB(v[0],v[1],v[2])}function addHueToRGB(d,p){var v=RGBtoHSV(255*d[0],255*d[1],255*d[2]);return v[0]+=p/360,v[0]>1?v[0]-=1:v[0]<0&&(v[0]+=1),HSVtoRGB(v[0],v[1],v[2])}var rgbToHex=function(){var p,v,d=[];for(p=0;p<256;p+=1)v=p.toString(16),d[p]=1===v.length?"0"+v:v;return function(S,I,y){return S<0&&(S=0),I<0&&(I=0),y<0&&(y=0),"#"+d[S]+d[I]+d[y]}}(),setSubframeEnabled=function(p){subframeEnabled=!!p},getSubframeEnabled=function(){return subframeEnabled},setExpressionsPlugin=function(p){expressionsPlugin=p},getExpressionsPlugin=function(){return expressionsPlugin},setExpressionInterfaces=function(p){expressionsInterfaces=p},getExpressionInterfaces=function(){return expressionsInterfaces},setDefaultCurveSegments=function(p){defaultCurveSegments=p},getDefaultCurveSegments=function(){return defaultCurveSegments},setIdPrefix=function(p){idPrefix$1=p},getIdPrefix=function(){return idPrefix$1};function createNS(d){return document.createElementNS(svgNS,d)}function _typeof$5(d){return(_typeof$5="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(p){return typeof p}:function(p){return p&&"function"==typeof Symbol&&p.constructor===Symbol&&p!==Symbol.prototype?"symbol":typeof p})(d)}var dataManager=function(){var v,S,d=1,p=[],I={onmessage:function(){},postMessage:function(le){v({data:le})}},y={postMessage:function(le){I.onmessage({data:le})}};function q(){S||((S=function U(K){if(window.Worker&&window.Blob&&getWebWorker()){var le=new Blob(["var _workerSelf = self;
83 self.onmessage = ",K.toString()],{type:"text/javascript"}),ce=URL.createObjectURL(le);return new Worker(ce)}return v=K,I}(function(le){if(y.dataManager||(y.dataManager=function ce(){function be(Mt,rt){var ke,xe,Ft,pt,Hn,Li,Pe=Mt.length;for(xe=0;xe<Pe;xe+=1)if("ks"in(ke=Mt[xe])&&!ke.completed){if(ke.completed=!0,ke.hasMask){var ri=ke.masksProperties;for(pt=ri.length,Ft=0;Ft<pt;Ft+=1)if(ri[Ft].pt.k.i)ue(ri[Ft].pt.k);else for(Li=ri[Ft].pt.k.length,Hn=0;Hn<Li;Hn+=1)ri[Ft].pt.k[Hn].s&&ue(ri[Ft].pt.k[Hn].s[0]),ri[Ft].pt.k[Hn].e&&ue(ri[Ft].pt.k[Hn].e[0])}0===ke.ty?(ke.layers=j(ke.refId,rt),be(ke.layers,rt)):4===ke.ty&&$(ke.shapes)}}function j(Mt,rt){var ke=function re(Mt,rt){for(var ke=0,xe=rt.length;ke<xe;){if(rt[ke].id===Mt)return rt[ke];ke+=1}return null}(Mt,rt);return ke?ke.layers.__used?JSON.parse(JSON.stringify(ke.layers)):(ke.layers.__used=!0,ke.layers):null}function $(Mt){var rt,xe,Pe;for(rt=Mt.length-1;rt>=0;rt-=1)if("sh"===Mt[rt].ty)if(Mt[rt].ks.k.i)ue(Mt[rt].ks.k);else for(Pe=Mt[rt].ks.k.length,xe=0;xe<Pe;xe+=1)Mt[rt].ks.k[xe].s&&ue(Mt[rt].ks.k[xe].s[0]),Mt[rt].ks.k[xe].e&&ue(Mt[rt].ks.k[xe].e[0]);else"gr"===Mt[rt].ty&&$(Mt[rt].it)}function ue(Mt){var rt,ke=Mt.i.length;for(rt=0;rt<ke;rt+=1)Mt.i[rt][0]+=Mt.v[rt][0],Mt.i[rt][1]+=Mt.v[rt][1],Mt.o[rt][0]+=Mt.v[rt][0],Mt.o[rt][1]+=Mt.v[rt][1]}function _e(Mt,rt){var ke=rt?rt.split("."):[100,100,100];return Mt[0]>ke[0]||!(ke[0]>Mt[0])&&(Mt[1]>ke[1]||!(ke[1]>Mt[1])&&(Mt[2]>ke[2]||!(ke[2]>Mt[2])&&null))}var we=function(){var Mt=[4,4,14];function rt(xe){xe.t.d={k:[{s:xe.t.d,t:0}]}}function ke(xe){var Pe,Ft=xe.length;for(Pe=0;Pe<Ft;Pe+=1)5===xe[Pe].ty&&rt(xe[Pe])}return function(xe){if(_e(Mt,xe.v)&&(ke(xe.layers),xe.assets)){var Pe,Ft=xe.assets.length;for(Pe=0;Pe<Ft;Pe+=1)xe.assets[Pe].layers&&ke(xe.assets[Pe].layers)}}}(),Oe=function(){var Mt=[4,7,99];return function(rt){if(rt.chars&&!_e(Mt,rt.v)){var ke,xe=rt.chars.length;for(ke=0;ke<xe;ke+=1){var Pe=rt.chars[ke];Pe.data&&Pe.data.shapes&&($(Pe.data.shapes),Pe.data.ip=0,Pe.data.op=99999,Pe.data.st=0,Pe.data.sr=1,Pe.data.ks={p:{k:[0,0],a:0},s:{k:[100,100],a:0},a:{k:[0,0],a:0},r:{k:0,a:0},o:{k:100,a:0}},rt.chars[ke].t||(Pe.data.shapes.push({ty:"no"}),Pe.data.shapes[0].it.push({p:{k:[0,0],a:0},s:{k:[100,100],a:0},a:{k:[0,0],a:0},r:{k:0,a:0},o:{k:100,a:0},sk:{k:0,a:0},sa:{k:0,a:0},ty:"tr"})))}}}}(),it=function(){var Mt=[5,7,15];function rt(xe){var Pe=xe.t.p;"number"==typeof Pe.a&&(Pe.a={a:0,k:Pe.a}),"number"==typeof Pe.p&&(Pe.p={a:0,k:Pe.p}),"number"==typeof Pe.r&&(Pe.r={a:0,k:Pe.r})}function ke(xe){var Pe,Ft=xe.length;for(Pe=0;Pe<Ft;Pe+=1)5===xe[Pe].ty&&rt(xe[Pe])}return function(xe){if(_e(Mt,xe.v)&&(ke(xe.layers),xe.assets)){var Pe,Ft=xe.assets.length;for(Pe=0;Pe<Ft;Pe+=1)xe.assets[Pe].layers&&ke(xe.assets[Pe].layers)}}}(),on=function(){var Mt=[4,1,9];function rt(xe){var Pe,pt,Hn,Ft=xe.length;for(Pe=0;Pe<Ft;Pe+=1)if("gr"===xe[Pe].ty)rt(xe[Pe].it);else if("fl"===xe[Pe].ty||"st"===xe[Pe].ty)if(xe[Pe].c.k&&xe[Pe].c.k[0].i)for(Hn=xe[Pe].c.k.length,pt=0;pt<Hn;pt+=1)xe[Pe].c.k[pt].s&&(xe[Pe].c.k[pt].s[0]/=255,xe[Pe].c.k[pt].s[1]/=255,xe[Pe].c.k[pt].s[2]/=255,xe[Pe].c.k[pt].s[3]/=255),xe[Pe].c.k[pt].e&&(xe[Pe].c.k[pt].e[0]/=255,xe[Pe].c.k[pt].e[1]/=255,xe[Pe].c.k[pt].e[2]/=255,xe[Pe].c.k[pt].e[3]/=255);else xe[Pe].c.k[0]/=255,xe[Pe].c.k[1]/=255,xe[Pe].c.k[2]/=255,xe[Pe].c.k[3]/=255}function ke(xe){var Pe,Ft=xe.length;for(Pe=0;Pe<Ft;Pe+=1)4===xe[Pe].ty&&rt(xe[Pe].shapes)}return function(xe){if(_e(Mt,xe.v)&&(ke(xe.layers),xe.assets)){var Pe,Ft=xe.assets.length;for(Pe=0;Pe<Ft;Pe+=1)xe.assets[Pe].layers&&ke(xe.assets[Pe].layers)}}}(),Yt=function(){var Mt=[4,4,18];function rt(xe){var Pe,pt,Hn;for(Pe=xe.length-1;Pe>=0;Pe-=1)if("sh"===xe[Pe].ty)if(xe[Pe].ks.k.i)xe[Pe].ks.k.c=xe[Pe].closed;else for(Hn=xe[Pe].ks.k.length,pt=0;pt<Hn;pt+=1)xe[Pe].ks.k[pt].s&&(xe[Pe].ks.k[pt].s[0].c=xe[Pe].closed),xe[Pe].ks.k[pt].e&&(xe[Pe].ks.k[pt].e[0].c=xe[Pe].closed);else"gr"===xe[Pe].ty&&rt(xe[Pe].it)}function ke(xe){var Pe,Ft,Hn,Li,ri,Gr,pt=xe.length;for(Ft=0;Ft<pt;Ft+=1){if((Pe=xe[Ft]).hasMask){var hr=Pe.masksProperties;for(Li=hr.length,Hn=0;Hn<Li;
83Hn+=1)if(hr[Hn].pt.k.i)hr[Hn].pt.k.c=hr[Hn].cl;else for(Gr=hr[Hn].pt.k.length,ri=0;ri<Gr;ri+=1)hr[Hn].pt.k[ri].s&&(hr[Hn].pt.k[ri].s[0].c=hr[Hn].cl),hr[Hn].pt.k[ri].e&&(hr[Hn].pt.k[ri].e[0].c=hr[Hn].cl)}4===Pe.ty&&rt(Pe.shapes)}}return function(xe){if(_e(Mt,xe.v)&&(ke(xe.layers),xe.assets)){var Pe,Ft=xe.assets.length;for(Pe=0;Pe<Ft;Pe+=1)xe.assets[Pe].layers&&ke(xe.assets[Pe].layers)}}}(),Rn={completeData:function _t(Mt){Mt.__complete||(on(Mt),we(Mt),Oe(Mt),it(Mt),Yt(Mt),be(Mt.layers,Mt.assets),function ae(Mt,rt){if(Mt){var ke=0,xe=Mt.length;for(ke=0;ke<xe;ke+=1)1===Mt[ke].t&&(Mt[ke].data.layers=j(Mt[ke].data.refId,rt),be(Mt[ke].data.layers,rt))}}(Mt.chars,Mt.assets),Mt.__complete=!0)}};return Rn.checkColors=on,Rn.checkChars=Oe,Rn.checkPathProperties=it,Rn.checkShapes=Yt,Rn.completeLayers=be,Rn}()),y.assetLoader||(y.assetLoader=function(){function be(re){var j=re.getResponseHeader("content-type");return j&&"json"===re.responseType&&-1!==j.indexOf("json")||re.response&&"object"===_typeof$5(re.response)?re.response:re.response&&"string"==typeof re.response?JSON.parse(re.response):re.responseText?JSON.parse(re.responseText):null}return{load:function ae(re,j,$,ue){var _e,we=new XMLHttpRequest;try{we.responseType="json"}catch{}we.onreadystatechange=function(){if(4===we.readyState)if(200===we.status)_e=be(we),$(_e);else try{_e=be(we),$(_e)}catch(Oe){ue&&ue(Oe)}};try{we.open(["G","E","T"].join(""),re,!0)}catch{we.open(["G","E","T"].join(""),j+"/"+re,!0)}we.send()}}}()),"loadAnimation"===le.data.type)y.assetLoader.load(le.data.path,le.data.fullPath,function(be){y.dataManager.completeData(be),y.postMessage({id:le.data.id,payload:be,status:"success"})},function(){y.postMessage({id:le.data.id,status:"error"})});else if("complete"===le.data.type){var se=le.data.animation;y.dataManager.completeData(se),y.postMessage({id:le.data.id,payload:se,status:"success"})}else"loadData"===le.data.type&&y.assetLoader.load(le.data.path,le.data.fullPath,function(be){y.postMessage({id:le.data.id,payload:be,status:"success"})},function(){y.postMessage({id:le.data.id,status:"error"})})})).onmessage=function(K){var le=K.data,ce=le.id,se=p[ce];p[ce]=null,"success"===le.status?se.onComplete(le.payload):se.onError&&se.onError()})}function X(K,le){var ce="processId_"+(d+=1);return p[ce]={onComplete:K,onError:le},ce}return{loadAnimation:function ee(K,le,ce){q();var se=X(le,ce);S.postMessage({type:"loadAnimation",path:K,fullPath:window.location.origin+window.location.pathname,id:se})},loadData:function oe(K,le,ce){q();var se=X(le,ce);S.postMessage({type:"loadData",path:K,fullPath:window.location.origin+window.location.pathname,id:se})},completeAnimation:function me(K,le,ce){q();var se=X(le,ce);S.postMessage({type:"complete",animation:K,id:se})}}}(),ImagePreloader=function(){var d=function(){var re=createTag("canvas");re.width=1,re.height=1;var j=re.getContext("2d");return j.fillStyle="rgba(0,0,0,0)",j.fillRect(0,0,1,1),re}();function p(){this.loadedAssets+=1,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages&&this.imagesLoadedCb&&this.imagesLoadedCb(null)}function v(){this.loadedFootagesCount+=1,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages&&this.imagesLoadedCb&&this.imagesLoadedCb(null)}function S(re,j,$){var ue="";if(re.e)ue=re.p;else if(j){var _e=re.p;-1!==_e.indexOf("images/")&&(_e=_e.split("/")[1]),ue=j+_e}else ue=$,ue+=re.u?re.u:"",ue+=re.p;return ue}function I(re){var j=0,$=setInterval(function(){(re.getBBox().width||j>500)&&(this._imageLoaded(),clearInterval($)),j+=1}.bind(this),50)}function q(re){var j={assetData:re},$=S(re,this.assetsPath,this.path);return dataManager.loadData($,function(ue){j.img=ue,this._footageLoaded()}.bind(this),function(){j.img={},this._footageLoaded()}.bind(this)),j}function X(re){return/\.(jpe?g|png|gif|bmp|webp|tiff|apng?)$/i.test(re)}function ae(){this._imageLoaded=p.bind(this),this._footageLoaded=v.bind(this),this.testImageLoaded=I.bind(this),this.createFootageData=q.bind(this),this.assetsPath="",this.path="",this.totalImages=0,this.totalFootages=0,this.loadedAssets=0,this.loadedFootagesCount=0,this.imagesLoadedCb=null,this.images=[]}return ae.prototype={loadAssets:function ee(re,j){this.imagesLoadedCb=j;var $,ue=re.length;for($=0;$<ue;$+=1)re[$].layers||X(re[$].p)&&(re[$].t&&"seq"!==re[$].t?3===re[$].t&&(this.totalFootages+=1,this.images.push(this.createFootageData(re[$]))):(this.totalImages+=1,this.images.push(this._createImageData(re[$]))))},setAssetsPath:function me(re){this.assetsPath=re||""},setPath:function oe(re){this.path=re||""},loadedImages:function ce(){return this.totalImages===this.loadedAssets},loadedFootages:function se(){return this.totalFootages===this.loadedFootagesCount},destroy:function le(){this.imagesLoadedCb=null,this.images.length=0},getAsset:function K(re){for(var j=0,$=this.images.length;j<$;){if(this.images[j].assetData===re)return this.images[j].img;j+=1}return null},createImgData:function U(re){var j=S(re,this.assetsPath,this.path),$=createTag("img");$.crossOrigin="anonymous",$.addEventListener("load",this._imageLoaded,!1),$.addEventListener("error",function(){ue.img=d,this._imageLoaded()}.bind(this),!1),$.src=j;var ue={img:$,assetData:re};return ue},createImageData:function y(re){var j=S(re,this.assetsPath,this.path),$=createNS("image");isSafari?this.testImageLoaded($):$.addEventListener("load",this._imageLoaded,!1),$.addEventListener("error",function(){ue.img=d,this._imageLoaded()}.bind(this),!1),$.setAttributeNS("http://www.w3.org/1999/xlink","href",j),this._elementHelper.append?this._elementHelper.append($):this._elementHelper.appendChild($);var ue={img:$,assetData:re};return ue},imageLoaded:p,footageLoaded:v,setCacheType:function be(re,j){"svg"===re?(this._elementHelper=j,this._createImageData=this.createImageData.bind(this)):this._createImageData=this.createImgData.bind(this)},isValid:X},ae}();function _createForOfIteratorHelper(d,p){var v=typeof Symbol<"u"&&d[Symbol.iterator]||d["@@iterator"];
83if(!v){if(Array.isArray(d)||(v=_unsupportedIterableToArray(d))||p&&d&&"number"==typeof d.length){v&&(d=v);var S=0,I=function(){};return{s:I,n:function(){return S>=d.length?{done:!0}:{done:!1,value:d[S++]}},e:function(ee){throw ee},f:I}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var q,y=!0,U=!1;return{s:function(){v=v.call(d)},n:function(){var ee=v.next();return y=ee.done,ee},e:function(ee){U=!0,q=ee},f:function(){try{!y&&null!=v.return&&v.return()}finally{if(U)throw q}}}}function _unsupportedIterableToArray(d,p){if(d){if("string"==typeof d)return _arrayLikeToArray(d,p);var v=Object.prototype.toString.call(d).slice(8,-1);if("Object"===v&&d.constructor&&(v=d.constructor.name),"Map"===v||"Set"===v)return Array.from(d);if("Arguments"===v||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(v))return _arrayLikeToArray(d,p)}}function _arrayLikeToArray(d,p){(null==p||p>d.length)&&(p=d.length);for(var v=0,S=new Array(p);v<p;v++)S[v]=d[v];return S}var VideoPreloader=function(){var d=function(){var j=createTag("canvas");j.width=1,j.height=1;var $=j.getContext("2d");return $.fillStyle="rgba(0,0,0,0)",$.fillRect(0,0,1,1),j}();function p(){this.loadedAssets+=1,this.loadedAssets===this.totalVideos&&this.loadedFootagesCount===this.totalFootages&&(this._emit("videoLoaded",{loaded:this.loadedAssets}),this.videosLoadedCb&&this.videosLoadedCb(null))}function v(j){j.target&&j.target.pause()}function S(){}function I(j){j.target&&(this.videos.find(function(ue){return ue.video===j.target}).video=d,this._videoLoaded())}function U(j){var $=function y(j,$,ue){var _e="";if(j.e)_e=j.p;else if($){var we=j.p;-1!==we.indexOf("images/")&&(we=we.split("/")[1]),_e=$+we}else _e=ue,_e+=j.u?j.u:"",_e+=j.p;return _e}(j,this.assetsPath,this.path),ue=document.createElement("video");return ue.crossOrigin="anonymous",ue.autoplay="autoplay",ue.preload="auto",ue.muted=this.isMuted,ue.addEventListener("canplaythrough",this._videoLoaded,!1),ue.addEventListener("canplay",this._videoLoaded,!1),ue.addEventListener("load",this._videoLoaded,!1),ue.addEventListener("error",this._videoErrorEvent,!1),ue.addEventListener("loadedmetadata",this._videoLoadedMetadata,!1),ue.src=$,ue.load(),ue.pause(),{video:ue,assetData:j}}function q(j){return/\.(mp4|mov|ogg|mpg|webm)$/i.test(j)}function ce(){this.videos.forEach(function(j){j.video.pause()})}function se(){this.videos.forEach(function(j){j.video.currentTime=0,j.video.pause()})}function be(j){var $=this;this.isMuted=j<=0,this.videos.forEach(function(ue){ue.video.mute=$.isMuted})}function re(){this._videoLoadedMetadata=v.bind(this),this._videoLoaded=p.bind(this),this._videoEvent=S.bind(this),this._videoErrorEvent=I.bind(this),this._eventListeners=[],this.assetsPath="",this.path="",this.totalVideos=0,this.loadedAssets=0,this.videosLoadedCb=null,this.videos=[],this.isMuted=!1,this.stop=se.bind(this),this.pause=ce.bind(this),this.setVolume=be.bind(this)}return(re.prototype={loadAssets:function X(j,$){this.videosLoadedCb=$;var ue,_e=j.length;for(ue=0;ue<_e;ue+=1)j[ue].layers||q(j[ue].p)&&(!j[ue].t||"seq"===j[ue].t)&&this.videos.push(this._createVideoData(j[ue]));this.totalVideos=this.videos.length},setAssetsPath:function oe(j){this.assetsPath=j||""},setPath:function ee(j){this.path=j||""},loadedVideos:function le(){return this.totalVideos===this.loadedAssets},destroy:function K(){var j=this;this.pause(),this.videosLoadedCb=null,this.videos.forEach(function($){if($.video){var ue=$.video;ue.removeEventListener("canplaythrough",j._videoLoaded),ue.removeEventListener("canplay",j._videoEvent),ue.removeEventListener("load",j._videoLoaded),ue.removeEventListener("error",j._videoErrorEvent),ue.removeEventListener("loadedmetadata",j._videoLoadedMetadata)}}),this.videos.length=0},getAsset:function me(j){for(var $=0,ue=this.videos.length;$<ue;){if(this.videos[$].assetData===j)return this.videos[$].video;$+=1}return null},videoLoaded:p,setCacheType:function ae(j,$){this._elementHelper=$,this._createVideoData=U.bind(this)},isValid:q}).addEventListener=function(j,$){this._eventListeners[j]||(this._eventListeners[j]=[]),this._eventListeners[j].push($)},re.prototype.removeEventListener=function(j,$){if(this._eventListeners[j]){var ue=this._eventListeners[j].indexOf($);-1!==ue&&this._eventListeners[j].splice(ue,1)}},re.prototype._emit=function(j,$){if(this._eventListeners[j]){var _e,ue=_createForOfIteratorHelper(this._eventListeners[j]);try{for(ue.s();!(_e=ue.n()).done;)(0,_e.value)($)}catch(Oe){ue.e(Oe)}finally{ue.f()}}},re}();function BaseEvent(){}BaseEvent.prototype={triggerEvent:function(p,v){if(this._cbs[p])for(var S=this._cbs[p],I=0;I<S.length;I+=1)S[I](v)},addEventListener:function(p,v){return this._cbs[p]||(this._cbs[p]=[]),this._cbs[p].push(v),function(){this.removeEventListener(p,v)}.bind(this)},removeEventListener:function(p,v){if(v){if(this._cbs[p]){for(var S=0,I=this._cbs[p].length;S<I;)this._cbs[p][S]===v&&(this._cbs[p].splice(S,1),S-=1,I-=1),S+=1;this._cbs[p].length||(this._cbs[p]=null)}}else this._cbs[p]=null}};var markerParser=function(){function d(p){for(var I,v=p.split("\r\n"),S={},y=0,U=0;U<v.length;U+=1)2===(I=v[U].split(":")).length&&(S[I[0]]=I[1].trim(),y+=1);if(0===y)throw new Error;return S}return function(p){for(var v=[],S=0;S<p.length;S+=1){var I=p[S],y={time:I.tm,duration:I.dr};try{y.payload=JSON.parse(p[S].cm)}catch{try{y.payload=d(p[S].cm)}catch{y.payload={name:p[S].cm}}}v.push(y)}return v}}(),ProjectInterface=function(){function d(p){this.compositions.push(p)}return function(){function p(v){for(var S=0,I=this.compositions.length;S<I;){if(this.compositions[S].data&&this.compositions[S].data.nm===v)return this.compositions[S].prepareFrame&&this.compositions[S].data.xt&&this.compositions[S].prepareFrame(this.currentFrame),this.compositions[S].compInterface;S+=1}return null}return p.compositions=[],p.currentFrame=0,p.registerComposition=d,p}}(),renderers={},registerRenderer=function(p,v){renderers[p]=v};function getRenderer(d){return renderers[d]}function getRegisteredRenderer(){if(renderers.canvas)return"canvas";for(var d in renderers)if(renderers[d])return d;return""}var CameraManager=function(){function me(){this.activeCameraElement=null,this.activeCamera=null,this.cameras=[]}return me.prototype={setActiveCamera:function U(K){this.activeCamera=K},getCameras:function d(){return this.cameras},getActiveCamera:function q(){return this.activeCamera},getActiveCameraElement:function X(){return this.activeCameraElement},isTracking:function y(K){return this.activeCameraElement===K},addCameraElement:function I(K,le){this.cameras.push({layer:K,element:le}),1===this.cameras.length&&this.trackCameraElementByLayer(K)},updateCameraAspect:function ee(K){if(this.activeCamera){var le=this.activeCamera;le.aspect=K,le.updateProjectionMatrix()}},resetCameraElement:function p(){this.activeCameraElement=null},trackCameraElement:function v(K){var le=this.cameras.find(function(ce){return ce.layer.nm===K});return le&&(this.activeCameraElement=le.element,this.activeCameraElement.refresh(),this.activeCameraElement.renderFrame()),le},trackCameraElementByLayer:function S(K){var le=this.cameras.find(function(ce){return ce.layer===K});le&&(this.activeCameraElement=le.element,this.activeCameraElement.refresh(),this.activeCameraElement.renderFrame())},destroy:function oe(){this.cameras.length=0}},me}();function _typeof$4(d){return(_typeof$4="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(p){return typeof p}:function(p){return p&&"function"==typeof Symbol&&p.constructor===Symbol&&p!==Symbol.prototype?"symbol":typeof p})(d)}var AnimationItem=function(){this._cbs=[],this.name="",this.path="",this.isLoaded=!1,this.currentFrame=0,this.currentRawFrame=0,this.firstFrame=0,this.totalFrames=0,this.frameRate=0,this.frameMult=0,this.playSpeed=1,this.playDirection=1,this.playCount=0,this.animationData={},this.assets=[],this.isPaused=!0,this.autoplay=!1,this.loop=!0,this.renderer=null,this.animationID=createElementID(),this.assetsPath="",this.timeCompleted=0,this.segmentPos=0,this.isSubframeEnabled=getSubframeEnabled(),this.segments=[],this._idle=!0,this._completedLoop=!1,this.projectInterface=ProjectInterface(),this.imagePreloader=new ImagePreloader,this.videoPreloader=new VideoPreloader,this.cameraManager=new CameraManager,this.audioController=audioControllerFactory(),this.markers=[],this.configAnimation=this.configAnimation.bind(this),this.onSetupError=this.onSetupError.bind(this),this.onSegmentComplete=this.onSegmentComplete.bind(this),this.drawnFrameEvent=ne
83w BMEnterFrameEvent("drawnFrame",0,0,0)};extendPrototype([BaseEvent],AnimationItem),AnimationItem.prototype.setParams=function(d){(d.wrapper||d.container)&&(this.wrapper=d.wrapper||d.container);var p="svg";d.animType?p=d.animType:d.renderer&&(p=d.renderer);var v=getRenderer(p);this.renderer=new v(this,d.rendererSettings),this.imagePreloader.setCacheType(p,this.renderer.globalData.defs),this.videoPreloader.setCacheType(p,this.renderer.globalData.defs),this.renderer.setProjectInterface(this.projectInterface),this.animType=p,this.loop=""===d.loop||null==d.loop||!0===d.loop||!1!==d.loop&&parseInt(d.loop,10),this.autoplay=!("autoplay"in d)||d.autoplay,this.name=d.name?d.name:"",this.autoloadSegments=!Object.prototype.hasOwnProperty.call(d,"autoloadSegments")||d.autoloadSegments,this.assetsPath=d.assetsPath,this.initialSegment=d.initialSegment,d.audioFactory&&this.audioController.setAudioFactory(d.audioFactory),d.animationData?this.setupAnimation(d.animationData):d.path&&(this.path=-1!==d.path.lastIndexOf("\\")?d.path.substr(0,d.path.lastIndexOf("\\")+1):d.path.substr(0,d.path.lastIndexOf("/")+1),this.fileName=d.path.substr(d.path.lastIndexOf("/")+1),this.fileName=this.fileName.substr(0,this.fileName.lastIndexOf(".json")),dataManager.loadAnimation(d.path,this.configAnimation,this.onSetupError))},AnimationItem.prototype.onSetupError=function(){this.trigger("data_failed")},AnimationItem.prototype.setupAnimation=function(d){dataManager.completeAnimation(d,this.configAnimation)},AnimationItem.prototype.setData=function(d,p){p&&"object"!==_typeof$4(p)&&(p=JSON.parse(p));var v={wrapper:d,animationData:p},S=d.attributes;v.path=S.getNamedItem("data-animation-path")?S.getNamedItem("data-animation-path").value:S.getNamedItem("data-bm-path")?S.getNamedItem("data-bm-path").value:S.getNamedItem("bm-path")?S.getNamedItem("bm-path").value:"",v.animType=S.getNamedItem("data-anim-type")?S.getNamedItem("data-anim-type").value:S.getNamedItem("data-bm-type")?S.getNamedItem("data-bm-type").value:S.getNamedItem("bm-type")?S.getNamedItem("bm-type").value:S.getNamedItem("data-bm-renderer")?S.getNamedItem("data-bm-renderer").value:S.getNamedItem("bm-renderer")?S.getNamedItem("bm-renderer").value:getRegisteredRenderer()||"canvas";var I=S.getNamedItem("data-anim-loop")?S.getNamedItem("data-anim-loop").value:S.getNamedItem("data-bm-loop")?S.getNamedItem("data-bm-loop").value:S.getNamedItem("bm-loop")?S.getNamedItem("bm-loop").value:"";"false"===I?v.loop=!1:"true"===I?v.loop=!0:""!==I&&(v.loop=parseInt(I,10));
vendor: 5,163 bytes, line 83
83var y=S.getNamedItem("data-anim-autoplay")?S.getNamedItem("data-anim-autoplay").value:S.getNamedItem("data-bm-autoplay")?S.getNamedItem("data-bm-autoplay").value:!S.getNamedItem("bm-autoplay")||S.getNamedItem("bm-autoplay").value;v.autoplay="false"!==y,v.name=S.getNamedItem("data-name")?S.getNamedItem("data-name").value:S.getNamedItem("data-bm-name")?S.getNamedItem("data-bm-name").value:S.getNamedItem("bm-name")?S.getNamedItem("bm-name").value:"","false"===(S.getNamedItem("data-anim-prerender")?S.getNamedItem("data-anim-prerender").value:S.getNamedItem("data-bm-prerender")?S.getNamedItem("data-bm-prerender").value:S.getNamedItem("bm-prerender")?S.getNamedItem("bm-prerender").value:"")&&(v.prerender=!1),v.path?this.setParams(v):this.trigger("destroy")},AnimationItem.prototype.includeLayers=function(d){d.op>this.animationData.op&&(this.animationData.op=d.op,this.totalFrames=Math.floor(d.op-this.animationData.ip));var v,y,p=this.animationData.layers,S=p.length,I=d.layers,U=I.length;for(y=0;y<U;y+=1)for(v=0;v<S;){if(p[v].id===I[y].id){p[v]=I[y];break}v+=1}if((d.chars||d.fonts)&&(this.renderer.globalData.fontManager.addChars(d.chars),this.renderer.globalData.fontManager.addFonts(d.fonts,this.renderer.globalData.defs)),d.assets)for(S=d.assets.length,v=0;v<S;v+=1)this.animationData.assets.push(d.assets[v]);this.animationData.__complete=!1,dataManager.completeAnimation(this.animationData,this.onSegmentComplete)},AnimationItem.prototype.onSegmentComplete=function(d){this.animationData=d;var p=getExpressionsPlugin();p&&p.initExpressions(this),this.loadNextSegment()},AnimationItem.prototype.loadNextSegment=function(){var d=this.animationData.segments;if(!d||0===d.length||!this.autoloadSegments)return this.trigger("data_ready"),void(this.timeCompleted=this.totalFrames);var p=d.shift();this.timeCompleted=p.time*this.frameRate;var v=this.path+this.fileName+"_"+this.segmentPos+".json";this.segmentPos+=1,dataManager.loadData(v,this.includeLayers.bind(this),function(){this.trigger("data_failed")}.bind(this))},AnimationItem.prototype.loadSegments=function(){this.animationData.segments||(this.timeCompleted=this.totalFrames),this.loadNextSegment()},AnimationItem.prototype.imagesLoaded=function(){this.trigger("loaded_images"),this.checkLoaded()},AnimationItem.prototype.preloadImages=function(){this.imagePreloader.setAssetsPath(this.assetsPath),this.imagePreloader.setPath(this.path),this.imagePreloader.loadAssets(this.animationData.assets,this.imagesLoaded.bind(this))},AnimationItem.prototype.videosLoaded=function(){this.trigger("loaded_videos"),this.checkLoaded()},AnimationItem.prototype.preloadVideos=function(){this.videoPreloader.setAssetsPath(this.assetsPath),this.videoPreloader.setPath(this.path),this.videoPreloader.loadAssets(this.animationData.assets,this.videosLoaded.bind(this))},AnimationItem.prototype.configAnimation=function(d){if(this.renderer)try{this.animationData=d,this.initialSegment?(this.totalFrames=Math.floor(this.initialSegment[1]-this.initialSegment[0]),this.firstFrame=Math.round(this.initialSegment[0])):(this.totalFrames=Math.floor(this.animationData.op-this.animationData.ip),this.firstFrame=Math.round(this.animationData.ip)),this.renderer.configAnimation(d),d.assets||(d.assets=[]),this.assets=this.animationData.assets,this.frameRate=this.animationData.fr,this.frameMult=this.animationData.fr/1e3,this.renderer.searchExtraCompositions(d.assets),this.markers=markerParser(d.markers||[]),this.trigger("config_ready"),this.preloadImages(),this.preloadVideos(),this.loadSegments(),this.updaFrameModifier(),this.waitForFontsLoaded(),this.isPaused&&(this.audioController.pause(),this.videoPreloader.pause())}catch(p){console.error("AnimationItem::configAnimation failed",p),this.triggerConfigError(p)}},AnimationItem.prototype.waitForFontsLoaded=function(){this.renderer&&(this.renderer.globalData.fontManager.isLoaded?this.checkLoaded():setTimeout(this.waitForFontsLoaded.bind(this),20))},AnimationItem.prototype.checkLoaded=function(){if(!this.isLoaded&&this.renderer.globalData.fontManager.isLoaded&&(this.imagePreloader.loadedImages()||"canvas"!==this.renderer.rendererType)&&this.imagePreloader.loadedFootages()&&this.videoPreloader.loadedVideos()){this.isLoaded=!0;var d=getExpressionsPlugin();d&&d.initExpressions(this),this.renderer.initItems(),setTimeout(function(){this.trigger("DOMLoaded")}.bind(this),0),this.gotoFrame(),this.autoplay&&this.play()}else console.log("AnimationItem::checkLoaded() still loading...")},AnimationItem.prototype.resize=function(d,p){this.renderer.updateContainerSize("number"==typeof d?d:void 0,"number"==typeof p?p:void 0)},AnimationItem.prototype.setSubframe=function(d){this.isSubframeEnabled=!!d},AnimationItem.prototype.gotoFrame=function(){this.currentFrame=this.isSubframeEnabled?this.currentRawFrame:~~this.currentRawFrame,this.timeCompleted!==this.totalFrames&&this.currentFrame>this.timeCompleted&&(this.currentFrame=this.timeCompleted),this.trigger("enterFrame"),this.renderFrame(),this.trigger("drawnFrame")},AnimationItem.prototype.renderFrame=function(){if(!1!==this.isLoaded&&this.renderer)try{this.renderer.renderFrame(this.currentFrame+this.firstFrame)}
vendor: 4,376 bytes, line 83
83catch(d){this.triggerRenderFrameError(d)}},AnimationItem.prototype.play=function(d){d&&this.name!==d||!0===this.isPaused&&(this.isPaused=!1,this.trigger("_pause"),this.audioController.resume(),this._idle&&(this._idle=!1,this.trigger("_active")))},AnimationItem.prototype.pause=function(d){d&&this.name!==d||!1===this.isPaused&&(this.isPaused=!0,this.trigger("_play"),this._idle=!0,this.trigger("_idle"),this.audioController.pause(),this.videoPreloader.pause())},AnimationItem.prototype.togglePause=function(d){d&&this.name!==d||(!0===this.isPaused?this.play():this.pause())},AnimationItem.prototype.stop=function(d){d&&this.name!==d||(this.pause(),this.playCount=0,this._completedLoop=!1,this.setCurrentRawFrameValue(0))},AnimationItem.prototype.getMarkerData=function(d){for(var p,v=0;v<this.markers.length;v+=1)if((p=this.markers[v]).payload&&p.payload.name===d)return p;return null},AnimationItem.prototype.goTo=function(d,p,v){if(!v||this.name===v){var S=Number(d);if(isNaN(S)){var I=this.getMarkerData(d);I&&this.goTo(I.time,!0)}else this.setCurrentRawFrameValue(p?d:d*this.frameModifier)}},AnimationItem.prototype.goToAndStop=function(d,p,v){if(!v||this.name===v){var S=Number(d);if(isNaN(S)){var I=this.getMarkerData(d);I&&this.goToAndStop(I.time,!0)}else this.setCurrentRawFrameValue(p?d:d*this.frameModifier);this.pause()}},AnimationItem.prototype.goToAndPlay=function(d,p,v){if(!v||this.name===v){var S=Number(d);if(isNaN(S)){var I=this.getMarkerData(d);I&&(I.duration?this.playSegments([I.time,I.time+I.duration],!0):this.goToAndStop(I.time,!0))}else this.goToAndStop(S,p,v);this.play()}},AnimationItem.prototype.advanceTime=function(d){if(!0!==this.isPaused&&!1!==this.isLoaded){var p=this.currentRawFrame+d*this.frameModifier,v=!1;p>=this.totalFrames-1&&this.frameModifier>0?this.loop&&this.playCount!==this.loop?p>=this.totalFrames?(this.playCount+=1,this.checkSegments(p%this.totalFrames)||(this.setCurrentRawFrameValue(p%this.totalFrames),this._completedLoop=!0,this.trigger("loopComplete"))):this.setCurrentRawFrameValue(p):this.checkSegments(p>this.totalFrames?p%this.totalFrames:0)||(v=!0,p=this.totalFrames-1):p<0?this.checkSegments(p%this.totalFrames)||(!this.loop||this.playCount--<=0&&!0!==this.loop?(v=!0,p=0):(this.setCurrentRawFrameValue(this.totalFrames+p%this.totalFrames),this._completedLoop?this.trigger("loopComplete"):this._completedLoop=!0)):this.setCurrentRawFrameValue(p),v&&(this.setCurrentRawFrameValue(p),this.pause(),this.trigger("complete"))}},AnimationItem.prototype.adjustSegment=function(d,p){this.playCount=0,d[1]<d[0]?(this.frameModifier>0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(-1)),this.totalFrames=d[0]-d[1],this.timeCompleted=this.totalFrames,this.firstFrame=d[1],this.setCurrentRawFrameValue(this.totalFrames-.001-p)):d[1]>d[0]&&(this.frameModifier<0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(1)),this.totalFrames=d[1]-d[0],this.timeCompleted=this.totalFrames,this.firstFrame=d[0],this.setCurrentRawFrameValue(.001+p)),this.trigger("segmentStart")},AnimationItem.prototype.setSegment=function(d,p){var v=-1;this.isPaused&&(this.currentRawFrame+this.firstFrame<d?v=d:this.currentRawFrame+this.firstFrame>p&&(v=p-d)),this.firstFrame=d,this.totalFrames=p-d,this.timeCompleted=this.totalFrames,-1!==v&&this.goToAndStop(v,!0)},AnimationItem.prototype.playSegments=function(d,p){if(p&&(this.segments.length=0),"object"===_typeof$4(d[0])){var v,S=d.length;for(v=0;v<S;v+=1)this.segments.push(d[v])}else this.segments.push(d);this.segments.length&&p&&this.adjustSegment(this.segments.shift(),0),this.isPaused&&this.play()},AnimationItem.prototype.resetSegments=function(d){this.segments.length=0,this.segments.push([this.animationData.ip,this.animationData.op]),d&&this.checkSegments(0)},AnimationItem.prototype.checkSegments=function(d){return!!this.segments.length&&(this.adjustSegment(this.segments.shift(),d),!0)},AnimationItem.prototype.destroy=function(d){d&&this.name!==d||!this.renderer||(this.renderer.destroy(),this.imagePreloader.destroy(),this.videoPreloader.destroy(),this.cameraManager.destroy(),this.trigger("destroy"),this._cbs=null,this.onEnterFrame=null,this.onLoopComplete=null,this.onComplete=null,this.onSegmentStart=null,this.onDestroy=null,this.renderer=null,this.renderer=null,this.imagePreloader=null,this.videoPreloader=null,this.projectInterface=null)}
vendor: 11,579 bytes, line 83
83,AnimationItem.prototype.setCurrentRawFrameValue=function(d){this.currentRawFrame=d,this.gotoFrame()},AnimationItem.prototype.setSpeed=function(d){this.playSpeed=d,this.updaFrameModifier()},AnimationItem.prototype.setDirection=function(d){this.playDirection=d<0?-1:1,this.updaFrameModifier()},AnimationItem.prototype.setLoop=function(d){this.loop=d},AnimationItem.prototype.setVolume=function(d,p){p&&this.name!==p||(this.audioController.setVolume(d),this.videoPreloader.setVolume(d))},AnimationItem.prototype.getVolume=function(){return this.audioController.getVolume()},AnimationItem.prototype.mute=function(d){d&&this.name!==d||this.audioController.mute()},AnimationItem.prototype.unmute=function(d){d&&this.name!==d||this.audioController.unmute()},AnimationItem.prototype.updaFrameModifier=function(){this.frameModifier=this.frameMult*this.playSpeed*this.playDirection,this.audioController.setRate(this.playSpeed*this.playDirection)},AnimationItem.prototype.getPath=function(){return this.path},AnimationItem.prototype.getAssetsPath=function(d){var p="";if(d.e)p=d.p;else if(this.assetsPath){var v=d.p;-1!==v.indexOf("images/")&&(v=v.split("/")[1]),p=this.assetsPath+v}else p=this.path,p+=d.u?d.u:"",p+=d.p;return p},AnimationItem.prototype.getAssetData=function(d){for(var p=0,v=this.assets.length;p<v;){if(d===this.assets[p].id)return this.assets[p];p+=1}return null},AnimationItem.prototype.getCameras=function(){return this.cameraManager.getCameras()},AnimationItem.prototype.trackCameraElement=function(d){return this.cameraManager.trackCameraElement(d)},AnimationItem.prototype.getActiveCameraElement=function(){return this.cameraManager.getActiveCameraElement()},AnimationItem.prototype.getActiveCamera=function(){return this.cameraManager.getActiveCamera()},AnimationItem.prototype.resetCameraElement=function(){return this.cameraManager.resetCameraElement()},AnimationItem.prototype.hide=function(){this.renderer.hide()},AnimationItem.prototype.show=function(){this.renderer.show()},AnimationItem.prototype.getDuration=function(d){return d?this.totalFrames:this.totalFrames/this.frameRate},AnimationItem.prototype.updateDocumentData=function(d,p,v){try{this.renderer.getElementByPath(d).updateDocumentData(p,v)}catch{}},AnimationItem.prototype.trigger=function(d){if(this._cbs&&this._cbs[d])switch(d){case"enterFrame":this.triggerEvent(d,new BMEnterFrameEvent(d,this.currentFrame,this.totalFrames,this.frameModifier));break;case"drawnFrame":this.drawnFrameEvent.currentTime=this.currentFrame,this.drawnFrameEvent.totalTime=this.totalFrames,this.drawnFrameEvent.direction=this.frameModifier,this.triggerEvent(d,this.drawnFrameEvent);break;case"loopComplete":this.triggerEvent(d,new BMCompleteLoopEvent(d,this.loop,this.playCount,this.frameMult));break;case"complete":this.triggerEvent(d,new BMCompleteEvent(d,this.frameMult));break;case"segmentStart":this.triggerEvent(d,new BMSegmentStartEvent(d,this.firstFrame,this.totalFrames));break;case"destroy":this.triggerEvent(d,new BMDestroyEvent(d,this));break;default:this.triggerEvent(d)}"enterFrame"===d&&this.onEnterFrame&&this.onEnterFrame.call(this,new BMEnterFrameEvent(d,this.currentFrame,this.totalFrames,this.frameMult)),"loopComplete"===d&&this.onLoopComplete&&this.onLoopComplete.call(this,new BMCompleteLoopEvent(d,this.loop,this.playCount,this.frameMult)),"complete"===d&&this.onComplete&&this.onComplete.call(this,new BMCompleteEvent(d,this.frameMult)),"segmentStart"===d&&this.onSegmentStart&&this.onSegmentStart.call(this,new BMSegmentStartEvent(d,this.firstFrame,this.totalFrames)),"destroy"===d&&this.onDestroy&&this.onDestroy.call(this,new BMDestroyEvent(d,this))},AnimationItem.prototype.triggerRenderFrameError=function(d){var p=new BMRenderFrameErrorEvent(d,this.currentFrame);this.triggerEvent("error",p),this.onError&&this.onError.call(this,p)},AnimationItem.prototype.triggerConfigError=function(d){var p=new BMConfigErrorEvent(d,this.currentFrame);this.triggerEvent("error",p),this.onError&&this.onError.call(this,p)};var animationManager=function(){var d={},p=[],v=0,S=0,I=0,y=!0,U=!1;function q(ke){for(var xe=0,Pe=ke.target;xe<S;)p[xe].animation===Pe&&(p.splice(xe,1),xe-=1,S-=1,Pe.isPaused||me()),xe+=1}function X(ke,xe){if(!ke)return null;for(var Pe=0;Pe<S;){if(p[Pe].elem===ke&&null!==p[Pe].elem)return p[Pe].animation;Pe+=1}var Ft=new AnimationItem;return K(Ft,ke),Ft.setData(ke,xe),Ft}function oe(){I+=1,Yt()}function me(){I-=1}function K(ke,xe){ke.addEventListener("destroy",q),ke.addEventListener("_active",oe),ke.addEventListener("_idle",me),p.push({elem:xe,animation:ke}),S+=1}function ae(ke){var Pe,xe=ke-v;for(Pe=0;Pe<S;Pe+=1)p[Pe].animation.advanceTime(xe);v=ke,I&&!U?window.requestAnimationFrame(ae):y=!0}function re(ke){v=ke,window.requestAnimationFrame(ae)}function Yt(){!U&&I&&y&&(window.requestAnimationFrame(re),y=!1)}return d.registerAnimation=X,d.loadAnimation=function le(ke){var xe=new AnimationItem;return K(xe,null),xe.setParams(ke),xe},d.setSpeed=function ce(ke,xe){var Pe;for(Pe=0;Pe<S;Pe+=1)p[Pe].animation.setSpeed(ke,xe)},d.setDirection=function se(ke,xe){var Pe;for(Pe=0;Pe<S;Pe+=1)p[Pe].animation.setDirection(ke,xe)},d.play=function be(ke){var xe;for(xe=0;xe<S;xe+=1)p[xe].animation.play(ke)},d.pause=function j(ke){var xe;for(xe=0;xe<S;xe+=1)p[xe].animation.pause(ke)},d.stop=function _e(ke){var xe;for(xe=0;xe<S;xe+=1)p[xe].animation.stop(ke)},d.togglePause=function we(ke){var xe;for(xe=0;xe<S;xe+=1)p[xe].animation.togglePause(ke)},d.searchAnimations=function it(ke,xe,Pe){var pt,Ft=[].concat([].slice.call(document.getElementsByClassName("lottie")),[].slice.call(document.getElementsByClassName("bodymovin"))),Hn=Ft.length;for(pt=0;pt<Hn;pt+=1)Pe&&Ft[pt].setAttribute("data-bm-type",Pe),X(Ft[pt],ke);if(xe&&0===Hn){Pe||(Pe="svg");var Li=document.getElementsByTagName("body")[0];Li.innerText="";var ri=createTag("div");ri.style.width="100%",ri.style.height="100%",ri.setAttribute("data-bm-type",Pe),Li.appendChild(ri),X(ri,ke)}},d.resize=function on(){var ke;for(ke=0;ke<S;ke+=1)p[ke].animation.resize()},d.goTo=function $(ke,xe,Pe){var Ft;for(Ft=0;Ft<S;Ft+=1)p[Ft].animation.goTo(ke,xe,Pe)},d.goToAndStop=function ue(ke,xe,Pe){var Ft;for(Ft=0;Ft<S;Ft+=1)p[Ft].animation.goToAndStop(ke,xe,Pe)},d.destroy=function Oe(ke){var xe;for(xe=S-1;xe>=0;xe-=1)p[xe].animation.destroy(ke)},d.freeze=function _t(){U=!0},d.unfreeze=function Kt(){U=!1,Yt()},d.setVolume=function Rn(ke,xe){var Pe;for(Pe=0;Pe<S;Pe+=1)p[Pe].animation.setVolume(ke,xe)},d.mute=function Mt(ke){var xe;for(xe=0;xe<S;xe+=1)p[xe].animation.mute(ke)},d.unmute=function rt(ke){var xe;for(xe=0;xe<S;xe+=1)p[xe].animation.unmute(ke)},d.getRegisteredAnimations=function ee(){var ke,xe=p.length,Pe=[];for(ke=0;ke<xe;ke+=1)Pe.push(p[ke].animation);return Pe},d}(),BezierFactory=function(){var d={getBezierEasing:function v(re,j,$,ue,_e){var we=_e||("bez_"+re+"_"+j+"_"+$+"_"+ue).replace(/\./g,"p");if(p[we])return p[we];var Oe=new ae([re,j,$,ue]);return p[we]=Oe,Oe}},p={},q=11,X=1/(q-1),ee="function"==typeof Float32Array;function oe(re,j){return 1-3*j+3*re}function me(re,j){return 3*j-6*re}function K(re){return 3*re}function le(re,j,$){return((oe(j,$)*re+me(j,$))*re+K(j))*re}function ce(re,j,$){return 3*oe(j,$)*re*re+2*me(j,$)*re+K(j)}function ae(re){this._p=re,this._mSampleValues=ee?new Float32Array(q):new Array(q),this._precomputed=!1,this.get=this.get.bind(this)}return ae.prototype={get:function(j){var $=this._p[0],ue=this._p[1],_e=this._p[2],we=this._p[3];return this._precomputed||this._precompute(),$===ue&&_e===we?j:0===j?0:1===j?1:le(this._getTForX(j),ue,we)},_precompute:function(){var j=this._p[0],$=this._p[1],ue=this._p[2],_e=this._p[3];this._precomputed=!0,(j!==$||ue!==_e)&&this._calcSampleValues()},_calcSampleValues:function(){for(var j=this._p[0],$=this._p[2],ue=0;ue<q;++ue)this._mSampleValues[ue]=le(ue*X,j,$)},_getTForX:function(j){for(var $=this._p[0],ue=this._p[2],_e=this._mSampleValues,we=0,Oe=1,it=q-1;Oe!==it&&_e[Oe]<=j;++Oe)we+=X;var Yt=we+(j-_e[--Oe])/(_e[Oe+1]-_e[Oe])*X,_t=ce(Yt,$,ue);return _t>=.001?function be(re,j,$,ue){for(var _e=0;_e<4;++_e){var we=ce(j,$,ue);if(0===we)return j;j-=(le(j,$,ue)-re)/we}return j}(j,Yt,$,ue):0===_t?Yt:function se(re,j,$,ue,_e){var we,Oe,it=0;do{(we=le(Oe=j+($-j)/2,ue,_e)-re)>0?$=Oe:j=Oe}while(Math.abs(we)>1e-7&&++it<10);return Oe}(j,we,we+X,$,ue)}},d}(),pooling=function(){return{double:function d(p){return p.concat(createSizedArray(p.length))}}}(),poolFactory=function(){return function(d,p,v){var S=0,I=d,y=createSizedArray(I);return{newElement:function q(){return S?y[S-=1]:p()},release:function X(ee){S===I&&(y=pooling.double(y),I*=2),v&&v(ee),y[S]=ee,S+=1}}}}(),bezierLengthPool=poolFactory(8,function d(){return{addedLength:0,percents:createTypedArray("float32",getDefaultCurveSegments()),lengths:createTypedArray("float32",getDefaultCurveSegments())}}),segmentsLengthPool=poolFactory(8,function d(){return{lengths:[],totalLength:0}},function p(v){var S,I=v.lengths.length;for(S=0;S<I;S+=1)bezierLengthPool.release(v.lengths[S]);v.lengths.length=0});function bezFunction(){var d=Math;function p(K,le,ce,se,be,ae){var re=K*se+le*be+ce*ae-be*se-ae*K-ce*le;return re>-.001&&re<.001}var S=function(){return function(K,le,ce,se){var ae,re,j,$,ue,we,be=getDefaultCurveSegments(),_e=0,Oe=[],it=[],on=bezierLengthPool.newElement();for(j=ce.length,ae=0;ae<be;ae+=1){for(ue=ae/(be-1),we=0,re=0;re<j;re+=1)$=bmPow(1-ue,3)*K[re]+3*bmPow(1-ue,2)*ue*ce[re]+3*(1-ue)*bmPow(ue,2)*se[re]+bmPow(ue,3)*le[re],Oe[re]=$,null!==it[re]&&(we+=bmPow(Oe[re]-it[re],2)),it[re]=Oe[re];we&&(_e+=we=bmSqrt(we)),on.percents[ae]=ue,on.lengths[ae]=_e}return on.addedLength=_e,on}}();function y(K){this.segmentLength=0,this.points=new Array(K)}function U(K,le){this.partialLength=K,this.point=le}var q=function(){var K={};return function(le,ce,se,be){var ae=(le[0]+"_"+le[1]+"_"+ce[0]+"_"+ce[1]+"_"+se[0]+"_"+se[1]+"_"+be[0]+"_"+be[1]).replace(/\./g,"p");if(!K[ae]){var j,$,ue,_e,we,it,on,re=getDefaultCurveSegments(),Oe=0,Yt=null;2===le.length&&(le[0]!==ce[0]||le[1]!==ce[1])&&p(le[0],le[1],ce[0],ce[1],le[0]+se[0],le[1]+se[1])&&p(le[0],le[1],ce[0],ce[1],ce[0]+be[0],ce[1]+be[1])&&(re=2);var _t=new y(re);for(ue=se.length,j=0;j<re;j+=1){for(on=createSizedArray(ue),we=j/(re-1),it=0,$=0;$<ue;$+=1)_e=bmPow(1-we,3)*le[$]+3*bmPow(1-we,2)*we*(le[$]+se[$])+3*(1-we)*bmPow(we,2)*(ce[$]+be[$])+bmPow(we,3)*ce[$],on[$]=_e,null!==Yt&&(it+=bmPow(on[$]-Yt[$],2));Oe+=it=bmSqrt(it),_t.points[j]=new U(it,on),Yt=on}_t.segmentLength=Oe,K[ae]=_t}return K[ae]}}();function X(K,le){var ce=le.percents,se=le.lengths,be=ce.length,ae=bmFloor((be-1)*K),re=K*le.addedLength,j=0;if(ae===be-1||0===ae||re===se[ae])return ce[ae];for(var $=se[ae]>re?-1:1,ue=!0;ue;)if(se[ae]<=re&&se[ae+1]>re?(j=(re-se[ae])/(se[ae+1]-se[ae]),ue=!1):ae+=$,ae<0||ae>=be-1){if(ae===be-1)return ce[ae];ue=!1}return ce[ae]+(ce[ae+1]-ce[ae])*j}var oe=createTypedArray("float32",8);return{getSegmentsLength:function I(K){var re,le=segmentsLengthPool.newElement(),ce=K.c,se=K.v,be=K.o,ae=K.i,j=K._length,$=le.lengths,ue=0;for(re=0;re<j-1;re+=1)$[re]=S(se[re],se[re+1],be[re],ae[re+1]),ue+=$[re].addedLength;return ce&&j&&($[re]=S(se[re],se[0],be[re],ae[0]),ue+=$[re].addedLength),le.totalLength=ue,le},getNewSegment:function me(K,le,ce,se,be,ae,re){be<0?be=0:be>1&&(be=1);var ue,j=X(be,re),$=X(ae=ae>1?1:ae,re),_e=K.length,we=1-j,Oe=1-$,it=we*we*we,on=j*we*we*3,Yt=j*j*we*3,_t=j*j*j,Kt=we*we*Oe,Rn=j*we*Oe+we*j*Oe+we*we*$,Mt=j*j*Oe+we*j*$+j*we*$,rt=j*j*$,ke=we*Oe*Oe,xe=j*Oe*Oe+we*$*Oe+we*Oe*$,Pe=j*$*Oe+we*$*$+j*Oe*$,Ft=j*$*$,pt=Oe*Oe*Oe,Hn=$*Oe*Oe+Oe*$*Oe+Oe*Oe*$,Li=$*$*Oe+Oe*$*$+$*Oe*$,ri=$*$*$;
vendor: 4,219 bytes, line 83
83for(ue=0;ue<_e;ue+=1)oe[4*ue]=d.round(1e3*(it*K[ue]+on*ce[ue]+Yt*se[ue]+_t*le[ue]))/1e3,oe[4*ue+1]=d.round(1e3*(Kt*K[ue]+Rn*ce[ue]+Mt*se[ue]+rt*le[ue]))/1e3,oe[4*ue+2]=d.round(1e3*(ke*K[ue]+xe*ce[ue]+Pe*se[ue]+Ft*le[ue]))/1e3,oe[4*ue+3]=d.round(1e3*(pt*K[ue]+Hn*ce[ue]+Li*se[ue]+ri*le[ue]))/1e3;return oe},getPointInSegment:function ee(K,le,ce,se,be,ae){var re=X(be,ae),j=1-re;return[d.round(1e3*(j*j*j*K[0]+(re*j*j+j*re*j+j*j*re)*ce[0]+(re*re*j+j*re*re+re*j*re)*se[0]+re*re*re*le[0]))/1e3,d.round(1e3*(j*j*j*K[1]+(re*j*j+j*re*j+j*j*re)*ce[1]+(re*re*j+j*re*re+re*j*re)*se[1]+re*re*re*le[1]))/1e3]},buildBezierData:q,pointOnLine2D:p,pointOnLine3D:function v(K,le,ce,se,be,ae,re,j,$){if(0===ce&&0===ae&&0===$)return p(K,le,se,be,re,j);var Oe,ue=d.sqrt(d.pow(se-K,2)+d.pow(be-le,2)+d.pow(ae-ce,2)),_e=d.sqrt(d.pow(re-K,2)+d.pow(j-le,2)+d.pow($-ce,2)),we=d.sqrt(d.pow(re-se,2)+d.pow(j-be,2)+d.pow($-ae,2));return(Oe=ue>_e?ue>we?ue-_e-we:we-_e-ue:we>_e?we-_e-ue:_e-ue-we)>-1e-4&&Oe<1e-4}}}var bez=bezFunction(),initFrame=initialDefaultFrame,mathAbs=Math.abs;function interpolateValue(d,p){var S,v=this.offsetTime;"multidimensional"===this.propType&&(S=createTypedArray("float32",this.pv.length));for(var X,ee,oe,I=p.lastIndex,y=I,U=this.keyframes.length-1,q=!0;q;){if(X=this.keyframes[y],ee=this.keyframes[y+1],y===U-1&&d>=ee.t-v){X.h&&(X=ee),I=0;break}if(ee.t-v>d){I=y;break}y<U-1?y+=1:(I=0,q=!1)}oe=this.keyframesMetadata[y]||{};var me,K,le,ce,se,be,j,ae=ee.t-v,re=X.t-v;if(X.to){oe.bezierData||(oe.bezierData=bez.buildBezierData(X.s,ee.s||X.e,X.to,X.ti));var $=oe.bezierData;if(d>=ae||d<re){var ue=d>=ae?$.points.length-1:0;for(K=$.points[ue].point.length,me=0;me<K;me+=1)S[me]=$.points[ue].point[me]}else{oe.__fnct?be=oe.__fnct:(be=BezierFactory.getBezierEasing(X.o.x,X.o.y,X.i.x,X.i.y,X.n).get,oe.__fnct=be),le=be((d-re)/(ae-re));var we,_e=$.segmentLength*le,Oe=p.lastFrame<d&&p._lastKeyframeIndex===y?p._lastAddedLength:0;for(se=p.lastFrame<d&&p._lastKeyframeIndex===y?p._lastPoint:0,q=!0,ce=$.points.length;q;){if(Oe+=$.points[se].partialLength,0===_e||0===le||se===$.points.length-1){for(K=$.points[se].point.length,me=0;me<K;me+=1)S[me]=$.points[se].point[me];break}if(_e>=Oe&&_e<Oe+$.points[se+1].partialLength){for(we=(_e-Oe)/$.points[se+1].partialLength,K=$.points[se].point.length,me=0;me<K;me+=1)S[me]=$.points[se].point[me]+($.points[se+1].point[me]-$.points[se].point[me])*we;break}se<ce-1?se+=1:q=!1}p._lastPoint=se,p._lastAddedLength=Oe-$.points[se].partialLength,p._lastKeyframeIndex=y}}else{var Kt;if(U=X.s.length,j=ee.s||X.e,this.sh&&1!==X.h)d>=ae?(S[0]=j[0],S[1]=j[1],S[2]=j[2]):d<=re?(S[0]=X.s[0],S[1]=X.s[1],S[2]=X.s[2]):quaternionToEuler(S,slerp(createQuaternion(X.s),createQuaternion(j),(d-re)/(ae-re)));else for(y=0;y<U;y+=1)1!==X.h&&(d>=ae?le=1:d<re?le=0:(X.o.x.constructor===Array?(oe.__fnct||(oe.__fnct=[]),oe.__fnct[y]?be=oe.__fnct[y]:(be=BezierFactory.getBezierEasing(void 0===X.o.x[y]?X.o.x[0]:X.o.x[y],void 0===X.o.y[y]?X.o.y[0]:X.o.y[y],void 0===X.i.x[y]?X.i.x[0]:X.i.x[y],void 0===X.i.y[y]?X.i.y[0]:X.i.y[y]).get,oe.__fnct[y]=be)):oe.__fnct?be=oe.__fnct:(be=BezierFactory.getBezierEasing(X.o.x,X.o.y,X.i.x,X.i.y).get,X.keyframeMetadata=be),le=be((d-re)/(ae-re)))),j=ee.s||X.e,Kt=1===X.h?X.s[y]:X.s[y]+(j[y]-X.s[y])*le,"multidimensional"===this.propType?S[y]=Kt:S=Kt}return p.lastIndex=I,S}function slerp(d,p,v){var K,le,ce,se,be,S=[],I=d[0],y=d[1],U=d[2],q=d[3],X=p[0],ee=p[1],oe=p[2],me=p[3];return(le=I*X+y*ee+U*oe+q*me)<0&&(le=-le,X=-X,ee=-ee,oe=-oe,me=-me),1-le>1e-6?(K=Math.acos(le),ce=Math.sin(K),se=Math.sin((1-v)*K)/ce,be=Math.sin(v*K)/ce):(se=1-v,be=v),S[0]=se*I+be*X,S[1]=se*y+be*ee,S[2]=se*U+be*oe,S[3]=se*q+be*me,S}function quaternionToEuler(d,p){var v=p[0],S=p[1],I=p[2],y=p[3],U=Math.atan2(2*S*y-2*v*I,1-2*S*S-2*I*I),q=Math.asin(2*v*S+2*I*y),X=Math.atan2(2*v*y-2*S*I,1-2*v*v-2*I*I);d[0]=U/degToRads,d[1]=q/degToRads,d[2]=X/degToRads}function createQuaternion(d){var p=d[0]*degToRads,v=d[1]*degToRads,S=d[2]*degToRads,I=Math.cos(p/2),y=Math.cos(v/2),U=Math.cos(S/2),q=Math.sin(p/2),X=Math.sin(v/2),ee=Math.sin(S/2);return[q*X*U+I*y*ee,q*y*U+I*X*ee,I*X*U-q*y*ee,I*y*U-q*X*ee]}function getValueAtCurrentTime(){var d=this.comp.renderedFrame-this.offsetTime,p=this.keyframes[0].t
vendor: 4,335 bytes, line 83
83-this.offsetTime,v=this.keyframes[this.keyframes.length-1].t-this.offsetTime;if(!(d===this._caching.lastFrame||this._caching.lastFrame!==initFrame&&(this._caching.lastFrame>=v&&d>=v||this._caching.lastFrame<p&&d<p))){this._caching.lastFrame>=d&&(this._caching._lastKeyframeIndex=-1,this._caching.lastIndex=0);var S=this.interpolateValue(d,this._caching);this.pv=S}return this._caching.lastFrame=d,this.pv}function setVValue(d){var p;if("unidimensional"===this.propType)mathAbs(this.v-(p=d*this.mult))>1e-5&&(this.v=p,this._mdf=!0);else for(var v=0,S=this.v.length;v<S;)mathAbs(this.v[v]-(p=d[v]*this.mult))>1e-5&&(this.v[v]=p,this._mdf=!0),v+=1}function processEffectsSequence(){if(this.elem.globalData.frameId!==this.frameId&&this.effectsSequence.length){if(this.lock)return void this.setVValue(this.pv);this.lock=!0,this._mdf=this._isFirstFrame;var d,p=this.effectsSequence.length,v=this.kf?this.pv:this.data.k;for(d=0;d<p;d+=1)v=this.effectsSequence[d](v);this.setVValue(v),this._isFirstFrame=!1,this.lock=!1,this.frameId=this.elem.globalData.frameId}}function addEffect(d){this.effectsSequence.push(d),this.container.addDynamicProperty(this)}function ValueProperty(d,p,v,S){this.propType="unidimensional",this.mult=v||1,this.data=p,this.v=v?p.k*v:p.k,this.pv=p.k,this._mdf=!1,this.elem=d,this.container=S,this.comp=d.comp,this.k=!1,this.kf=!1,this.vel=0,this.effectsSequence=[],this._isFirstFrame=!0,this.getValue=processEffectsSequence,this.setVValue=setVValue,this.addEffect=addEffect}function MultiDimensionalProperty(d,p,v,S){this.propType="multidimensional",this.mult=v||1,this.data=p,this._mdf=!1,this.elem=d,this.container=S,this.comp=d.comp,this.k=!1,this.kf=!1,this.frameId=-1;var I,y=p.k.length;for(this.v=createTypedArray("float32",y),this.pv=createTypedArray("float32",y),this.vel=createTypedArray("float32",y),I=0;I<y;I+=1)this.v[I]=p.k[I]*this.mult,this.pv[I]=p.k[I];this._isFirstFrame=!0,this.effectsSequence=[],this.getValue=processEffectsSequence,this.setVValue=setVValue,this.addEffect=addEffect}function KeyframedValueProperty(d,p,v,S){this.propType="unidimensional",this.keyframes=p.k,this.keyframesMetadata=[],this.offsetTime=d.data.st,this.frameId=-1,this._caching={lastFrame:initFrame,lastIndex:0,value:0,_lastKeyframeIndex:-1},this.k=!0,this.kf=!0,this.data=p,this.mult=v||1,this.elem=d,this.container=S,this.comp=d.comp,this.v=initFrame,this.pv=initFrame,this._isFirstFrame=!0,this.getValue=processEffectsSequence,this.setVValue=setVValue,this.interpolateValue=interpolateValue,this.effectsSequence=[getValueAtCurrentTime.bind(this)],this.addEffect=addEffect}function KeyframedMultidimensionalProperty(d,p,v,S){this.propType="multidimensional";var I,U,q,X,ee,y=p.k.length;for(I=0;I<y-1;I+=1)p.k[I].to&&p.k[I].s&&p.k[I+1]&&p.k[I+1].s&&(q=p.k[I+1].s,X=p.k[I].to,ee=p.k[I].ti,(2===(U=p.k[I].s).length&&!(U[0]===q[0]&&U[1]===q[1])&&bez.pointOnLine2D(U[0],U[1],q[0],q[1],U[0]+X[0],U[1]+X[1])&&bez.pointOnLine2D(U[0],U[1],q[0],q[1],q[0]+ee[0],q[1]+ee[1])||3===U.length&&!(U[0]===q[0]&&U[1]===q[1]&&U[2]===q[2])&&bez.pointOnLine3D(U[0],U[1],U[2],q[0],q[1],q[2],U[0]+X[0],U[1]+X[1],U[2]+X[2])&&bez.pointOnLine3D(U[0],U[1],U[2],q[0],q[1],q[2],q[0]+ee[0],q[1]+ee[1],q[2]+ee[2]))&&(p.k[I].to=null,p.k[I].ti=null),U[0]===q[0]&&U[1]===q[1]&&0===X[0]&&0===X[1]&&0===ee[0]&&0===ee[1]&&(2===U.length||U[2]===q[2]&&0===X[2]&&0===ee[2])&&(p.k[I].to=null,p.k[I].ti=null));this.effectsSequence=[getValueAtCurrentTime.bind(this)],this.data=p,this.keyframes=p.k,this.keyframesMetadata=[],this.offsetTime=d.data.st,this.k=!0,this.kf=!0,this._isFirstFrame=!0,this.mult=v||1,this.elem=d,this.container=S,this.comp=d.comp,this.getValue=processEffectsSequence,this.setVValue=setVValue,this.interpolateValue=interpolateValue,this.frameId=-1;var oe=p.k[0].s.length;for(this.v=createTypedArray("float32",oe),this.pv=createTypedArray("float32",oe),I=0;I<oe;I+=1)this.v[I]=initFrame,this.pv[I]=initFrame;this._caching={lastFrame:initFrame,lastIndex:0,value:createTypedArray("float32",oe)},this.addEffect=addEffect}var PropertyFactory=function(){return{getProp:function d(v,S,I,y,U){var q;if(S.sid&&(S=v.globalData.slotManager.getProp(S)),S.k.length)if("number"==typeof S.k[0])q=new MultiDimensionalProperty(v,S,y,U);else switch(I){case 0:q=new KeyframedValueProperty(v,S,y,U);break;case 1:q=new KeyframedMultidimensionalProperty(v,S,y,U)}
83else q=new ValueProperty(v,S,y,U);return q.effectsSequence.length&&U.addDynamicProperty(q),q}}}();function DynamicPropertyContainer(){}DynamicPropertyContainer.prototype={addDynamicProperty:function(p){-1===this.dynamicProperties.indexOf(p)&&(this.dynamicProperties.push(p),this.container.addDynamicProperty(this),this._isAnimated=!0)},iterateDynamicProperties:function(){this._mdf=!1;var p,v=this.dynamicProperties.length;for(p=0;p<v;p+=1)this.dynamicProperties[p].getValue(),this.dynamicProperties[p]._mdf&&(this._mdf=!0)},initDynamicPropertyContainer:function(p){this.container=p,this.dynamicProperties=[],this._mdf=!1,this._isAnimated=!1}};var pointPool=poolFactory(8,function d(){return createTypedArray("float32",2)});function ShapePath(){this.c=!1,this._length=0,this._maxLength=8,this.v=createSizedArray(this._maxLength),this.o=createSizedArray(this._maxLength),this.i=createSizedArray(this._maxLength)}ShapePath.prototype.setPathData=function(d,p){this.c=d,this.setLength(p);for(var v=0;v<p;)this.v[v]=pointPool.newElement(),this.o[v]=pointPool.newElement(),this.i[v]=pointPool.newElement(),v+=1},ShapePath.prototype.setLength=function(d){for(;this._maxLength<d;
vendor: 4,326 bytes, line 83
83)this.doubleArrayLength();this._length=d},ShapePath.prototype.doubleArrayLength=function(){this.v=this.v.concat(createSizedArray(this._maxLength)),this.i=this.i.concat(createSizedArray(this._maxLength)),this.o=this.o.concat(createSizedArray(this._maxLength)),this._maxLength*=2},ShapePath.prototype.setXYAt=function(d,p,v,S,I){var y;switch(this._length=Math.max(this._length,S+1),this._length>=this._maxLength&&this.doubleArrayLength(),v){case"v":y=this.v;break;case"i":y=this.i;break;case"o":y=this.o;break;default:y=[]}(!y[S]||y[S]&&!I)&&(y[S]=pointPool.newElement()),y[S][0]=d,y[S][1]=p},ShapePath.prototype.setTripleAt=function(d,p,v,S,I,y,U,q){this.setXYAt(d,p,"v",U,q),this.setXYAt(v,S,"o",U,q),this.setXYAt(I,y,"i",U,q)},ShapePath.prototype.reverse=function(){var d=new ShapePath;d.setPathData(this.c,this._length);var p=this.v,v=this.o,S=this.i,I=0;this.c&&(d.setTripleAt(p[0][0],p[0][1],S[0][0],S[0][1],v[0][0],v[0][1],0,!1),I=1);var q,y=this._length-1,U=this._length;for(q=I;q<U;q+=1)d.setTripleAt(p[y][0],p[y][1],S[y][0],S[y][1],v[y][0],v[y][1],q,!1),y-=1;return d},ShapePath.prototype.length=function(){return this._length};var shapePool=(S=poolFactory(4,function d(){return new ShapePath},function p(I){var U,y=I._length;for(U=0;U<y;U+=1)pointPool.release(I.v[U]),pointPool.release(I.i[U]),pointPool.release(I.o[U]),I.v[U]=null,I.i[U]=null,I.o[U]=null;I._length=0,I.c=!1}),S.clone=function v(I){var U,y=S.newElement(),q=void 0===I._length?I.v.length:I._length;for(y.setLength(q),y.c=I.c,U=0;U<q;U+=1)y.setTripleAt(I.v[U][0],I.v[U][1],I.o[U][0],I.o[U][1],I.i[U][0],I.i[U][1],U);return y},S),S;function ShapeCollection(){this._length=0,this._maxLength=4,this.shapes=createSizedArray(this._maxLength)}ShapeCollection.prototype.addShape=function(d){this._length===this._maxLength&&(this.shapes=this.shapes.concat(createSizedArray(this._maxLength)),this._maxLength*=2),this.shapes[this._length]=d,this._length+=1},ShapeCollection.prototype.releaseShapes=function(){var d;for(d=0;d<this._length;d+=1)shapePool.release(this.shapes[d]);this._length=0};var shapeCollectionPool=function(){var d={newShapeCollection:function I(){return p?S[p-=1]:new ShapeCollection},release:function y(U){var q,X=U._length;for(q=0;q<X;q+=1)shapePool.release(U.shapes[q]);U._length=0,p===v&&(S=pooling.double(S),v*=2),S[p]=U,p+=1}},p=0,v=4,S=createSizedArray(v);return d}(),ShapePropertyFactory=function(){var d=-999999;function p(ae,re,j){var ue,_e,we,Oe,it,on,Yt,_t,$=j.lastIndex,Rn=this.keyframes;if(ae<Rn[0].t-this.offsetTime)ue=Rn[0].s[0],we=!0,$=0;else if(ae>=Rn[Rn.length-1].t-this.offsetTime)ue=Rn[Rn.length-1].s?Rn[Rn.length-1].s[0]:Rn[Rn.length-2].e[0],we=!0;else{for(var xe,Pe,Ft,Mt=$,rt=Rn.length-1,ke=!0;ke&&(xe=Rn[Mt],!((Pe=Rn[Mt+1]).t-this.offsetTime>ae));)Mt<rt-1?Mt+=1:ke=!1;if(Ft=this.keyframesMetadata[Mt]||{},$=Mt,!(we=1===xe.h)){if(ae>=Pe.t-this.offsetTime)_t=1;else if(ae<xe.t-this.offsetTime)_t=0;else{var pt;Ft.__fnct?pt=Ft.__fnct:(pt=BezierFactory.getBezierEasing(xe.o.x,xe.o.y,xe.i.x,xe.i.y).get,Ft.__fnct=pt),_t=pt((ae-(xe.t-this.offsetTime))/(Pe.t-this.offsetTime-(xe.t-this.offsetTime)))}_e=Pe.s?Pe.s[0]:xe.e[0]}ue=xe.s[0]}for(on=re._length,Yt=ue.i[0].length,j.lastIndex=$,Oe=0;Oe<on;Oe+=1)for(it=0;it<Yt;it+=1)re.i[Oe][it]=we?ue.i[Oe][it]:ue.i[Oe][it]+(_e.i[Oe][it]-ue.i[Oe][it])*_t,re.o[Oe][it]=we?ue.o[Oe][it]:ue.o[Oe][it]+(_e.o[Oe][it]-ue.o[Oe][it])*_t,re.v[Oe][it]=we?ue.v[Oe][it]:ue.v[Oe][it]+(_e.v[Oe][it]-ue.v[Oe][it])*_t}function v(){var ae=this.comp.renderedFrame-this.offsetTime,re=this.keyframes[0].t-this.offsetTime,j=this.keyframes[this.keyframes.length-1].t-this.offsetTime,$=this._caching.lastFrame;return $!==d&&($<re&&ae<re||$>j&&ae>j)||(this._caching.lastIndex=$<ae?this._caching.lastIndex:0,this.interpolateShape(ae,this.pv,this._caching)),this._caching.lastFrame=ae,this.pv}function S(){this.paths=this.localShapeCollection}function y(ae){(function I(ae,re){if(ae._length!==re._length||ae.c!==re.c)return!1;var j,$=ae._length;for(j=0;j<$;j+=1)if(ae.v[j][0]!==re.v[j][0]||ae.v[j][1]!==re.v[j][1]||ae.o[j][0]!==re.o[j][0]||ae.o[j][1]!==re.o[j][1]||ae.i[j][0]!==re.i[j][0]||ae.i[j][1]!==re.i[j][1])return!1;return!0})(this.v,ae)||(this.v=shapePool.clone(ae),this.localShapeCollection.releaseShapes(),this.localShapeCollection.addShape(this.v),this._mdf=!0,this.paths=this.localShapeCollection)}
vendor: 7,691 bytes, line 83
83function U(){if(this.elem.globalData.frameId!==this.frameId){if(!this.effectsSequence.length)return void(this._mdf=!1);if(this.lock)return void this.setVValue(this.pv);var ae;this.lock=!0,this._mdf=!1,ae=this.kf?this.pv:this.data.ks?this.data.ks.k:this.data.pt.k;var re,j=this.effectsSequence.length;for(re=0;re<j;re+=1)ae=this.effectsSequence[re](ae);this.setVValue(ae),this.lock=!1,this.frameId=this.elem.globalData.frameId}}function q(ae,re,j){this.propType="shape",this.comp=ae.comp,this.container=ae,this.elem=ae,this.data=re,this.k=!1,this.kf=!1,this._mdf=!1,this.v=shapePool.clone(3===j?re.pt.k:re.ks.k),this.pv=shapePool.clone(this.v),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.paths.addShape(this.v),this.reset=S,this.effectsSequence=[]}function X(ae){this.effectsSequence.push(ae),this.container.addDynamicProperty(this)}function ee(ae,re,j){this.propType="shape",this.comp=ae.comp,this.elem=ae,this.container=ae,this.offsetTime=ae.data.st,this.keyframes=3===j?re.pt.k:re.ks.k,this.keyframesMetadata=[],this.k=!0,this.kf=!0;var $=this.keyframes[0].s[0].i.length;this.v=shapePool.newElement(),this.v.setPathData(this.keyframes[0].s[0].c,$),this.pv=shapePool.clone(this.v),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.paths.addShape(this.v),this.lastFrame=d,this.reset=S,this._caching={lastFrame:d,lastIndex:0},this.effectsSequence=[v.bind(this)]}q.prototype.interpolateShape=p,q.prototype.getValue=U,q.prototype.setVValue=y,q.prototype.addEffect=X,ee.prototype.getValue=U,ee.prototype.interpolateShape=p,ee.prototype.setVValue=y,ee.prototype.addEffect=X;var oe=function(){var ae=roundCorner;function re(j,$){this.v=shapePool.newElement(),this.v.setPathData(!0,4),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.localShapeCollection.addShape(this.v),this.d=$.d,this.elem=j,this.comp=j.comp,this.frameId=-1,this.initDynamicPropertyContainer(j),this.p=PropertyFactory.getProp(j,$.p,1,0,this),this.s=PropertyFactory.getProp(j,$.s,1,0,this),this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertEllToPath())}return re.prototype={reset:S,getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertEllToPath())},convertEllToPath:function(){var $=this.p.v[0],ue=this.p.v[1],_e=this.s.v[0]/2,we=this.s.v[1]/2,Oe=3!==this.d,it=this.v;it.v[0][0]=$,it.v[0][1]=ue-we,it.v[1][0]=Oe?$+_e:$-_e,it.v[1][1]=ue,it.v[2][0]=$,it.v[2][1]=ue+we,it.v[3][0]=Oe?$-_e:$+_e,it.v[3][1]=ue,it.i[0][0]=Oe?$-_e*ae:$+_e*ae,it.i[0][1]=ue-we,it.i[1][0]=Oe?$+_e:$-_e,it.i[1][1]=ue-we*ae,it.i[2][0]=Oe?$+_e*ae:$-_e*ae,it.i[2][1]=ue+we,it.i[3][0]=Oe?$-_e:$+_e,it.i[3][1]=ue+we*ae,it.o[0][0]=Oe?$+_e*ae:$-_e*ae,it.o[0][1]=ue-we,it.o[1][0]=Oe?$+_e:$-_e,it.o[1][1]=ue+we*ae,it.o[2][0]=Oe?$-_e*ae:$+_e*ae,it.o[2][1]=ue+we,it.o[3][0]=Oe?$-_e:$+_e,it.o[3][1]=ue-we*ae}},extendPrototype([DynamicPropertyContainer],re),re}(),me=function(){function ae(re,j){this.v=shapePool.newElement(),this.v.setPathData(!0,0),this.elem=re,this.comp=re.comp,this.data=j,this.frameId=-1,this.d=j.d,this.initDynamicPropertyContainer(re),1===j.sy?(this.ir=PropertyFactory.getProp(re,j.ir,0,0,this),this.is=PropertyFactory.getProp(re,j.is,0,.01,this),this.convertToPath=this.convertStarToPath):this.convertToPath=this.convertPolygonToPath,this.pt=PropertyFactory.getProp(re,j.pt,0,0,this),this.p=PropertyFactory.getProp(re,j.p,1,0,this),this.r=PropertyFactory.getProp(re,j.r,0,degToRads,this),this.or=PropertyFactory.getProp(re,j.or,0,0,this),this.os=PropertyFactory.getProp(re,j.os,0,.01,this),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.localShapeCollection.addShape(this.v),this.paths=this.localShapeCollection,this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertToPath())}return ae.prototype={reset:S,getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertToPath())},convertStarToPath:function(){var _t,Kt,Rn,Mt,j=2*Math.floor(this.pt.v),$=2*Math.PI/j,ue=!0,_e=this.or.v,we=this.ir.v,Oe=this.os.v,it=this.is.v,on=2*Math.PI*_e/(2*j),Yt=2*Math.PI*we/(2*j),rt=-Math.PI/2;rt+=this.r.v;var ke=3===this.data.d?-1:1;for(this.v._length=0,_t=0;_t<j;_t+=1){Rn=ue?Oe:it,Mt=ue?on:Yt;var xe=(Kt=ue?_e:we)*Math.cos(rt),Pe=Kt*Math.sin(rt),Ft=0===xe&&0===Pe?0:Pe/Math.sqrt(xe*xe+Pe*Pe),pt=0===xe&&0===Pe?0:-xe/Math.sqrt(xe*xe+Pe*Pe);this.v.setTripleAt(xe+=+this.p.v[0],Pe+=+this.p.v[1],xe-Ft*Mt*Rn*ke,Pe-pt*Mt*Rn*ke,xe+Ft*Mt*Rn*ke,Pe+pt*Mt*Rn*ke,_t,!0),ue=!ue,rt+=$*ke}},convertPolygonToPath:function(){var Oe,j=Math.floor(this.pt.v),$=2*Math.PI/j,ue=this.or.v,_e=this.os.v,we=2*Math.PI*ue/(4*j),it=.5*-Math.PI,on=3===this.data.d?-1:1;for(it+=this.r.v,this.v._length=0,Oe=0;Oe<j;Oe+=1){var Yt=ue*Math.cos(it),_t=ue*Math.sin(it),Kt=0===Yt&&0===_t?0:_t/Math.sqrt(Yt*Yt+_t*_t),Rn=0===Yt&&0===_t?0:-Yt/Math.sqrt(Yt*Yt+_t*_t);this.v.setTripleAt(Yt+=+this.p.v[0],_t+=+this.p.v[1],Yt-Kt*we*_e*on,_t-Rn*we*_e*on,Yt+Kt*we*_e*on,_t+Rn*we*_e*on,Oe,!0),it+=$*on}this.paths.length=0,this.paths[0]=this.v}},extendPrototype([DynamicPropertyContainer],ae),ae}(),K=function(){function ae(re,j){this.v=shapePool.newElement(),this.v.c=!0,this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.localShapeCollection.addShape(this.v),this.paths=this.localShapeCollection,this.elem=re,this.comp=re.comp,this.frameId=-1,this.d=j.d,this.initDynamicPropertyContainer(re),this.p=PropertyFactory.getProp(re,j.p,1,0,this),this.s=PropertyFactory.getProp(re,j.s,1,0,this),this.r=PropertyFactory.getProp(re,j.r,0,0,this),this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertRectToPath())}return ae.prototype={convertRectToPath:function(){var j=this.p.v[0],$=this.p.v[1],ue=this.s.v[0]/2,_e=this.s.v[1]/2,we=bmMin(ue,_e,this.r.v),Oe=we*(1-roundCorner);this.v._length=0,2===this.d||1===this.d?(this.v.setTripleAt(j+ue,$-_e+we,j+ue,$-_e+we,j+ue,$-_e+Oe,0,!0),this.v.setTripleAt(j+ue,$+_e-we,j+ue,$+_e-Oe,j+ue,$+_e-we,1,!0),0!==we?(this.v.setTripleAt(j+ue-we,$+_e,j+ue-we,$+_e,j+ue-Oe,$+_e,2,!0),this.v.setTripleAt(j-ue+we,$+_e,j-ue+Oe,$+_e,j-ue+we,$+_e,3,!0),this.v.setTripleAt(j-ue,$+_e-we,j-ue,$+_e-we,j-ue,$+_e-Oe,4,!0),this.v.setTripleAt(j-ue,$-_e+we,j-ue,$-_e+Oe,j-ue,$-_e+we,5,!0),this.v.setTripleAt(j-ue+we,$-_e,j-ue+we,$-_e,j-ue+Oe,$-_e,6,!0),this.v.setTripleAt(j+ue-we,$-_e,j+ue-Oe,$-_e,j+ue-we,$-_e,7,!0)):(this.v.setTripleAt(j-ue,$+_e,j-ue+Oe,$+_e,j-ue,$+_e,2),this.v.setTripleAt(j-ue,$-_e,j-ue,$-_e+Oe,j-ue,$-_e,3))):(this.v.setTripleAt(j+ue,$-_e+we,j+ue,$-_e+Oe,j+ue,$-_e+we,0,!0),0!==we?(this.v.setTripleAt(j+ue-we,$-_e,j+ue-we,$-_e,j+ue-Oe,$-_e,1,!0),this.v.setTripleAt(j-ue+we,$-_e,j-ue+Oe,$-_e,j-ue+we,$-_e,2,!0),this.v.setTripleAt(j-ue,$-_e+we,j-ue,$-_e+we,j-ue,$-_e+Oe,3,!0),this.v.setTripleAt(j-ue,$+_e-we,j-ue,$+_e-Oe,j-ue,$+_e-we,4,!0),this.v.setTripleAt(j-ue+we,$+_e,j-ue+we,$+_e,j-ue+Oe,$+_e,5,!0),this.v.setTripleAt(j+ue-we,$+_e,j+ue-Oe,$+_e,j+ue-we,$+_e,6,!0),this.v.setTripleAt(j+ue,$+_e-we,j+ue,$+_e-we,j+ue,$+_e-Oe,7,!0)):(this.v.setTripleAt(j-ue,$-_e,j-ue+Oe,$-_e,j-ue,$-_e,1,!0),this.v.setTripleAt(j-ue,$+_e,j-ue,$+_e-Oe,j-ue,$+_e,2,!0),this.v.setTripleAt(j+ue,$+_e,j+ue-Oe,$+_e,j+ue,$+_e,3,!0)))},getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertRectToPath())},reset:S},extendPrototype([DynamicPropertyContainer],ae),ae}();return{getShapeProp:function le(ae,re,j){var $;
vendor: 10,883 bytes, line 83
83return 3===j||4===j?$=(3===j?re.pt:re.ks).k.length?new ee(ae,re,j):new q(ae,re,j):5===j?$=new K(ae,re):6===j?$=new oe(ae,re):7===j&&($=new me(ae,re)),$.k&&ae.addDynamicProperty($),$},getConstructorFunction:function ce(){return q},getKeyframedConstructorFunction:function se(){return ee}}}(),Matrix=function(){var d=Math.cos,p=Math.sin,v=Math.tan,S=Math.round;function I(){return this.props[0]=1,this.props[1]=0,this.props[2]=0,this.props[3]=0,this.props[4]=0,this.props[5]=1,this.props[6]=0,this.props[7]=0,this.props[8]=0,this.props[9]=0,this.props[10]=1,this.props[11]=0,this.props[12]=0,this.props[13]=0,this.props[14]=0,this.props[15]=1,this}function y(ke){if(0===ke)return this;var xe=d(ke),Pe=p(ke);return this._t(xe,-Pe,0,0,Pe,xe,0,0,0,0,1,0,0,0,0,1)}function U(ke){if(0===ke)return this;var xe=d(ke),Pe=p(ke);return this._t(1,0,0,0,0,xe,-Pe,0,0,Pe,xe,0,0,0,0,1)}function q(ke){if(0===ke)return this;var xe=d(ke),Pe=p(ke);return this._t(xe,0,Pe,0,0,1,0,0,-Pe,0,xe,0,0,0,0,1)}function X(ke){if(0===ke)return this;var xe=d(ke),Pe=p(ke);return this._t(xe,-Pe,0,0,Pe,xe,0,0,0,0,1,0,0,0,0,1)}function ee(ke,xe){return this._t(1,xe,ke,1,0,0)}function oe(ke,xe){return this.shear(v(ke),v(xe))}function me(ke,xe){var Pe=d(xe),Ft=p(xe);return this._t(Pe,Ft,0,0,-Ft,Pe,0,0,0,0,1,0,0,0,0,1)._t(1,0,0,0,v(ke),1,0,0,0,0,1,0,0,0,0,1)._t(Pe,-Ft,0,0,Ft,Pe,0,0,0,0,1,0,0,0,0,1)}function K(ke,xe,Pe){return!Pe&&0!==Pe&&(Pe=1),1===ke&&1===xe&&1===Pe?this:this._t(ke,0,0,0,0,xe,0,0,0,0,Pe,0,0,0,0,1)}function le(ke,xe,Pe,Ft,pt,Hn,Li,ri,Gr,hr,Ta,fa,da,Es,Kr,Qs){return this.props[0]=ke,this.props[1]=xe,this.props[2]=Pe,this.props[3]=Ft,this.props[4]=pt,this.props[5]=Hn,this.props[6]=Li,this.props[7]=ri,this.props[8]=Gr,this.props[9]=hr,this.props[10]=Ta,this.props[11]=fa,this.props[12]=da,this.props[13]=Es,this.props[14]=Kr,this.props[15]=Qs,this}function ce(ke,xe,Pe){return Pe=Pe||0,0!==ke||0!==xe||0!==Pe?this._t(1,0,0,0,0,1,0,0,0,0,1,0,ke,xe,Pe,1):this}function se(ke,xe,Pe,Ft,pt,Hn,Li,ri,Gr,hr,Ta,fa,da,Es,Kr,Qs){var Tn=this.props;if(1===ke&&0===xe&&0===Pe&&0===Ft&&0===pt&&1===Hn&&0===Li&&0===ri&&0===Gr&&0===hr&&1===Ta&&0===fa)return Tn[12]=Tn[12]*ke+Tn[15]*da,Tn[13]=Tn[13]*Hn+Tn[15]*Es,Tn[14]=Tn[14]*Ta+Tn[15]*Kr,Tn[15]*=Qs,this._identityCalculated=!1,this;var sr=Tn[0],Ps=Tn[1],rr=Tn[2],pa=Tn[3],wr=Tn[4],ds=Tn[5],Rs=Tn[6],er=Tn[7],Yi=Tn[8],ur=Tn[9],vi=Tn[10],Bs=Tn[11],ps=Tn[12],Ls=Tn[13],at=Tn[14],Pn=Tn[15];return Tn[0]=sr*ke+Ps*pt+rr*Gr+pa*da,Tn[1]=sr*xe+Ps*Hn+rr*hr+pa*Es,Tn[2]=sr*Pe+Ps*Li+rr*Ta+pa*Kr,Tn[3]=sr*Ft+Ps*ri+rr*fa+pa*Qs,Tn[4]=wr*ke+ds*pt+Rs*Gr+er*da,Tn[5]=wr*xe+ds*Hn+Rs*hr+er*Es,Tn[6]=wr*Pe+ds*Li+Rs*Ta+er*Kr,Tn[7]=wr*Ft+ds*ri+Rs*fa+er*Qs,Tn[8]=Yi*ke+ur*pt+vi*Gr+Bs*da,Tn[9]=Yi*xe+ur*Hn+vi*hr+Bs*Es,Tn[10]=Yi*Pe+ur*Li+vi*Ta+Bs*Kr,Tn[11]=Yi*Ft+ur*ri+vi*fa+Bs*Qs,Tn[12]=ps*ke+Ls*pt+at*Gr+Pn*da,Tn[13]=ps*xe+Ls*Hn+at*hr+Pn*Es,Tn[14]=ps*Pe+Ls*Li+at*Ta+Pn*Kr,Tn[15]=ps*Ft+Ls*ri+at*fa+Pn*Qs,this._identityCalculated=!1,this}function be(){return this._identityCalculated||(this._identity=!(1!==this.props[0]||0!==this.props[1]||0!==this.props[2]||0!==this.props[3]||0!==this.props[4]||1!==this.props[5]||0!==this.props[6]||0!==this.props[7]||0!==this.props[8]||0!==this.props[9]||1!==this.props[10]||0!==this.props[11]||0!==this.props[12]||0!==this.props[13]||0!==this.props[14]||1!==this.props[15]),this._identityCalculated=!0),this._identity}function ae(ke){for(var xe=0;xe<16;){if(ke.props[xe]!==this.props[xe])return!1;xe+=1}return!0}function re(ke){var xe;for(xe=0;xe<16;xe+=1)ke.props[xe]=this.props[xe];return ke}function j(ke){var xe;for(xe=0;xe<16;xe+=1)this.props[xe]=ke[xe]}function $(ke,xe,Pe){return{x:ke*this.props[0]+xe*this.props[4]+Pe*this.props[8]+this.props[12],y:ke*this.props[1]+xe*this.props[5]+Pe*this.props[9]+this.props[13],z:ke*this.props[2]+xe*this.props[6]+Pe*this.props[10]+this.props[14]}}function ue(ke,xe,Pe){return ke*this.props[0]+xe*this.props[4]+Pe*this.props[8]+this.props[12]}function _e(ke,xe,Pe){return ke*this.props[1]+xe*this.props[5]+Pe*this.props[9]+this.props[13]}function we(ke,xe,Pe){return ke*this.props[2]+xe*this.props[6]+Pe*this.props[10]+this.props[14]}function Oe(){var ke=this.props[0]*this.props[5]-this.props[1]*this.props[4],xe=this.props[5]/ke,Pe=-this.props[1]/ke,Ft=-this.props[4]/ke,pt=this.props[0]/ke,Hn=(this.props[4]*this.props[13]-this.props[5]*this.props[12])/ke,Li=-(this.props[0]*this.props[13]-this.props[1]*this.props[12])/ke,ri=new Matrix;return ri.props[0]=xe,ri.props[1]=Pe,ri.props[4]=Ft,ri.props[5]=pt,ri.props[12]=Hn,ri.props[13]=Li,ri}function it(ke){return this.getInverseMatrix().applyToPointArray(ke[0],ke[1],ke[2]||0)}function on(ke){var xe,Pe=ke.length,Ft=[];for(xe=0;xe<Pe;xe+=1)Ft[xe]=it(ke[xe]);return Ft}function Yt(ke,xe,Pe){var Ft=createTypedArray("float32",6);if(this.isIdentity())Ft[0]=ke[0],Ft[1]=ke[1],Ft[2]=xe[0],Ft[3]=xe[1],Ft[4]=Pe[0],Ft[5]=Pe[1];else{var pt=this.props[0],Hn=this.props[1],Li=this.props[4],ri=this.props[5],Gr=this.props[12],hr=this.props[13];Ft[0]=ke[0]*pt+ke[1]*Li+Gr,Ft[1]=ke[0]*Hn+ke[1]*ri+hr,Ft[2]=xe[0]*pt+xe[1]*Li+Gr,Ft[3]=xe[0]*Hn+xe[1]*ri+hr,Ft[4]=Pe[0]*pt+Pe[1]*Li+Gr,Ft[5]=Pe[0]*Hn+Pe[1]*ri+hr}return Ft}function _t(ke,xe,Pe){return this.isIdentity()?[ke,xe,Pe]:[ke*this.props[0]+xe*this.props[4]+Pe*this.props[8]+this.props[12],ke*this.props[1]+xe*this.props[5]+Pe*this.props[9]+this.props[13],ke*this.props[2]+xe*this.props[6]+Pe*this.props[10]+this.props[14]]}function Kt(ke,xe){if(this.isIdentity())return ke+","+xe;var Pe=this.props;return Math.round(100*(ke*Pe[0]+xe*Pe[4]+Pe[12]))/100+","+Math.round(100*(ke*Pe[1]+xe*Pe[5]+Pe[13]))/100}function Rn(){for(var ke=0,xe=this.props,Pe="matrix3d(";ke<16;)Pe+=S(1e4*xe[ke])/1e4,Pe+=15===ke?")":",",ke+=1;return Pe}function Mt(ke){return ke<1e-6&&ke>0||ke>-1e-6&&ke<0?S(1e4*ke)/1e4:ke}function rt(){var ke=this.props;return"matrix("+Mt(ke[0])+","+Mt(ke[1])+","+Mt(ke[4])+","+Mt(ke[5])+","+Mt(ke[12])+","+Mt(ke[13])+")"}return function(){this.reset=I,this.rotate=y,this.rotateX=U,this.rotateY=q,this.rotateZ=X,this.skew=oe,this.skewFromAxis=me,this.shear=ee,this.scale=K,this.setTransform=le,this.translate=ce,this.transform=se,this.applyToPoint=$,this.applyToX=ue,this.applyToY=_e,this.applyToZ=we,this.applyToPointArray=_t,this.applyToTriplePoints=Yt,this.applyToPointStringified=Kt,this.toCSS=Rn,this.to2dCSS=rt,this.clone=re,this.cloneFromProps=j,this.equals=ae,this.inversePoints=on,this.inversePoint=it,this.getInverseMatrix=Oe,this._t=this.transform,this.isIdentity=be,this._identity=!0,this._identityCalculated=!1,this.props=createTypedArray("float32",16),this.reset()}}();function _typeof$3(d){return(_typeof$3="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(p){return typeof p}:function(p){return p&&"function"==typeof Symbol&&p.constructor===Symbol&&p!==Symbol.prototype?"symbol":typeof p})(d)}var lottie={},standalone="__[STANDALONE]__",animationData="__[ANIMATIONDATA]__",renderer="";function setLocation(d){setLocationHref(d)}function searchAnimations(){!0===standalone?animationManager.searchAnimations(animationData,standalone,renderer):animationManager.searchAnimations()}function setSubframeRendering(d){setSubframeEnabled(d)}function setPrefix(d){setIdPrefix(d)}function loadAnimation(d){return!0===standalone&&(d.animationData=JSON.parse(animationData)),animationManager.loadAnimation(d)}function setQuality(d){if("string"==typeof d)switch(d){case"high":setDefaultCurveSegments(200);break;default:case"medium":setDefaultCurveSegments(50);break;case"low":setDefaultCurveSegments(10)}else!isNaN(d)&&d>1&&setDefaultCurveSegments(d);getDefaultCurveSegments()>=50?roundValues(!1):roundValues(!0)}function inBrowser(){return typeof navigator<"u"}function installPlugin(d,p){"expressions"===d&&setExpressionsPlugin(p)}function getFactory(d){switch(d){case"propertyFactory":return PropertyFactory;case"shapePropertyFactory":return ShapePropertyFactory;case"matrix":return Matrix;default:return null}}function checkReady(){"complete"===document.readyState&&(clearInterval(readyStateCheckInterval),searchAnimations())}function getQueryVariable(d){for(var p=queryString.split("&"),v=0;v<p.length;v+=1){var S=p[v].split("=");if(decodeURIComponent(S[0])==d)return decodeURIComponent(S[1])}return null}lottie.play=animationManager.play,lottie.pause=animationManager.pause,lottie.setLocationHref=setLocation,lottie.togglePause=animationManager.togglePause,lottie.setSpeed=animationManager.setSpeed,lottie.setDirection=animationManager.setDirection,lottie.stop=animationManager.stop,lottie.searchAnimations=searchAnimations,lottie.registerAnimation=animationManager.registerAnimation,lottie.loadAnimation=loadAnimation,lottie.setSubframeRendering=setSubframeRendering,lottie.resize=animationManager.resize,lottie.goToAndStop=animationManager.goToAndStop,lottie.destroy=animationManager.destroy,lottie.setQuality=setQuality,lottie.inBrowser=inBrowser,lottie.installPlugin=installPlugin,lottie.freeze=animationManager.freeze,lottie.unfreeze=animationManager.unfreeze,lottie.setVolume=animationManager.setVolume,lottie.mute=animationManager.mute,lottie.unmute=animationManager.unmute,lottie.getRegisteredAnimations=animationManager.getRegisteredAnimations,lottie.useWebWorker=setWebWorker,lottie.setIDPrefix=setPrefix,lottie.__getFactory=getFactory,lottie.version="5.11.0";var queryString="";if(standalone){var scripts=document.getElementsByTagName("script"),index=scripts.length-1,myScript=scripts[index]||{src:""};queryString=myScript.src?myScript.src.replace(/^[^\?]+\??/,""):"",renderer=getQueryVariable("renderer")}var readyStateCheckInterval=setInterval(checkReady,100);try{_typeof$3(exports)}catch(d){}var ShapeModifiers=(d={},p={},d.registerModifier=function v(I,y){p[I]||(p[I]=y)},d.getModifier=function S(I,y,U){return new p[I](y,U)},d),d,p;function ShapeModifier(){}function TrimModifier(){}function PuckerAndBloatModifier(){}ShapeModifier.prototype.initModifierProperties=function(){},ShapeModifier.prototype.addShapeToModifier=function(){},ShapeModifier.prototype.addShape=function(d){if(!this.closed){d.sh.container.addDynamicProperty(d.sh);var p={shape:d.sh,data:d,localShapeCollection:shapeCollectionPool.newShapeCollection()};this.shapes.push(p),this.addShapeToModifier(p),this._isAnimated&&d.setAsAnimated()}},ShapeModifier.prototype.init=function(d,p){this.shapes=[],this.elem=d,this.initDynamicPropertyContainer(d),this.initModifierProperties(d,p),this.frameId=initialDefaultFrame,this.closed=!1,this.k=!1,this.dynamicProperties.length?this.k=!0:this.getValue(!0)},ShapeModifier.prototype.processKeys=function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties())},extendPrototype([DynamicPropertyContainer],ShapeModifier),extendPrototype([ShapeModifier],TrimModifier),TrimModifier.prototype.initModifierProperties=function(d,p){this.s=PropertyFactory.getProp(d,p.s,0,.01,this),this.e=Pro
vendor: 9,601 bytes, line 83
83pertyFactory.getProp(d,p.e,0,.01,this),this.o=PropertyFactory.getProp(d,p.o,0,0,this),this.sValue=0,this.eValue=0,this.getValue=this.processKeys,this.m=p.m,this._isAnimated=!!this.s.effectsSequence.length||!!this.e.effectsSequence.length||!!this.o.effectsSequence.length},TrimModifier.prototype.addShapeToModifier=function(d){d.pathsData=[]},TrimModifier.prototype.calculateShapeEdges=function(d,p,v,S,I){var y=[];p<=1?y.push({s:d,e:p}):d>=1?y.push({s:d-1,e:p-1}):(y.push({s:d,e:1}),y.push({s:0,e:p-1}));var q,ee,U=[],X=y.length;for(q=0;q<X;q+=1)(ee=y[q]).e*I<S||ee.s*I>S+v||U.push([ee.s*I<=S?0:(ee.s*I-S)/v,ee.e*I>=S+v?1:(ee.e*I-S)/v]);return U.length||U.push([0,0]),U},TrimModifier.prototype.releasePathsData=function(d){var p,v=d.length;for(p=0;p<v;p+=1)segmentsLengthPool.release(d[p]);return d.length=0,d},TrimModifier.prototype.processShapes=function(d){var p,v;if(this._mdf||d){var S=this.o.v%360/360;if(S<0&&(S+=1),(p=this.s.v>1?1+S:this.s.v<0?0+S:this.s.v+S)>(v=this.e.v>1?1+S:this.e.v<0?0+S:this.e.v+S)){var I=p;p=v,v=I}p=1e-4*Math.round(1e4*p),v=1e-4*Math.round(1e4*v),this.sValue=p,this.eValue=v}else p=this.sValue,v=this.eValue;var y,U,X,ee,oe,me,K,q=this.shapes.length,le=0;if(v===p)for(U=0;U<q;U+=1)this.shapes[U].localShapeCollection.releaseShapes(),this.shapes[U].shape._mdf=!0,this.shapes[U].shape.paths=this.shapes[U].localShapeCollection,this._mdf&&(this.shapes[U].pathsData.length=0);else if(1===v&&0===p||0===v&&1===p){if(this._mdf)for(U=0;U<q;U+=1)this.shapes[U].pathsData.length=0,this.shapes[U].shape._mdf=!0}else{var se,be,ce=[];for(U=0;U<q;U+=1)if((se=this.shapes[U]).shape._mdf||this._mdf||d||2===this.m){if(ee=(y=se.shape.paths)._length,K=0,!se.shape._mdf&&se.pathsData.length)K=se.totalShapeLength;else{for(oe=this.releasePathsData(se.pathsData),X=0;X<ee;X+=1)me=bez.getSegmentsLength(y.shapes[X]),oe.push(me),K+=me.totalLength;se.totalShapeLength=K,se.pathsData=oe}le+=K,se.shape._mdf=!0}else se.shape.paths=se.localShapeCollection;var $,ae=p,re=v,j=0;for(U=q-1;U>=0;U-=1)if((se=this.shapes[U]).shape._mdf){for((be=se.localShapeCollection).releaseShapes(),2===this.m&&q>1?($=this.calculateShapeEdges(p,v,se.totalShapeLength,j,le),j+=se.totalShapeLength):$=[[ae,re]],ee=$.length,X=0;X<ee;X+=1){ae=$[X][0],re=$[X][1],ce.length=0,re<=1?ce.push({s:se.totalShapeLength*ae,e:se.totalShapeLength*re}):ae>=1?ce.push({s:se.totalShapeLength*(ae-1),e:se.totalShapeLength*(re-1)}):(ce.push({s:se.totalShapeLength*ae,e:se.totalShapeLength}),ce.push({s:0,e:se.totalShapeLength*(re-1)}));var ue=this.addShapes(se,ce[0]);if(ce[0].s!==ce[0].e){if(ce.length>1)if(se.shape.paths.shapes[se.shape.paths._length-1].c){var we=ue.pop();this.addPaths(ue,be),ue=this.addShapes(se,ce[1],we)}else this.addPaths(ue,be),ue=this.addShapes(se,ce[1]);this.addPaths(ue,be)}}se.shape.paths=be}}},TrimModifier.prototype.addPaths=function(d,p){var v,S=d.length;for(v=0;v<S;v+=1)p.addShape(d[v])},TrimModifier.prototype.addSegment=function(d,p,v,S,I,y,U){I.setXYAt(p[0],p[1],"o",y),I.setXYAt(v[0],v[1],"i",y+1),U&&I.setXYAt(d[0],d[1],"v",y),I.setXYAt(S[0],S[1],"v",y+1)},TrimModifier.prototype.addSegmentFromArray=function(d,p,v,S){p.setXYAt(d[1],d[5],"o",v),p.setXYAt(d[2],d[6],"i",v+1),S&&p.setXYAt(d[0],d[4],"v",v),p.setXYAt(d[3],d[7],"v",v+1)},TrimModifier.prototype.addShapes=function(d,p,v){var y,q,X,oe,me,K,le,se,S=d.pathsData,I=d.shape.paths.shapes,U=d.shape.paths._length,ee=0,ce=[],be=!0;for(v?(me=v._length,se=v._length):(v=shapePool.newElement(),me=0,se=0),ce.push(v),y=0;y<U;y+=1){for(K=S[y].lengths,v.c=I[y].c,X=I[y].c?K.length:K.length+1,q=1;q<X;q+=1)if(ee+(oe=K[q-1]).addedLength<p.s)ee+=oe.addedLength,v.c=!1;else{if(ee>p.e){v.c=!1;break}p.s<=ee&&p.e>=ee+oe.addedLength?(this.addSegment(I[y].v[q-1],I[y].o[q-1],I[y].i[q],I[y].v[q],v,me,be),be=!1):(le=bez.getNewSegment(I[y].v[q-1],I[y].v[q],I[y].o[q-1],I[y].i[q],(p.s-ee)/oe.addedLength,(p.e-ee)/oe.addedLength,K[q-1]),this.addSegmentFromArray(le,v,me,be),be=!1,v.c=!1),ee+=oe.addedLength,me+=1}if(I[y].c&&K.length){if(oe=K[q-1],ee<=p.e){var ae=K[q-1].addedLength;p.s<=ee&&p.e>=ee+ae?(this.addSegment(I[y].v[q-1],I[y].o[q-1],I[y].i[0],I[y].v[0],v,me,be),be=!1):(le=bez.getNewSegment(I[y].v[q-1],I[y].v[0],I[y].o[q-1],I[y].i[0],(p.s-ee)/ae,(p.e-ee)/ae,K[q-1]),this.addSegmentFromArray(le,v,me,be),be=!1,v.c=!1)}else v.c=!1;ee+=oe.addedLength,me+=1}if(v._length&&(v.setXYAt(v.v[se][0],v.v[se][1],"i",se),v.setXYAt(v.v[v._length-1][0],v.v[v._length-1][1],"o",v._length-1)),ee>p.e)break;y<U-1&&(v=shapePool.newElement(),be=!0,ce.push(v),me=0)}return ce},extendPrototype([ShapeModifier],PuckerAndBloatModifier),PuckerAndBloatModifier.prototype.initModifierProperties=function(d,p){this.getValue=this.processKeys,this.amount=PropertyFactory.getProp(d,p.a,0,null,this),this._isAnimated=!!this.amount.effectsSequence.length},PuckerAndBloatModifier.prototype.processPath=function(d,p){var v=p/100,S=[0,0],I=d._length,y=0;for(y=0;y<I;y+=1)S[0]+=d.v[y][0],S[1]+=d.v[y][1];S[0]/=I,S[1]/=I;var U=shapePool.newElement();for(U.c=d.c,y=0;y<I;y+=1)U.setTripleAt(d.v[y][0]+(S[0]-d.v[y][0])*v,d.v[y][1]+(S[1]-d.v[y][1])*v,d.o[y][0]+(S[0]-d.o[y][0])*-v,d.o[y][1]+(S[1]-d.o[y][1])*-v,d.i[y][0]+(S[0]-d.i[y][0])*-v,d.i[y][1]+(S[1]-d.i[y][1])*-v,y);return U},PuckerAndBloatModifier.prototype.processShapes=function(d){var p,v,I,y,q,X,S=this.shapes.length,U=this.amount.v;if(0!==U)for(v=0;v<S;v+=1){if(X=(q=this.shapes[v]).localShapeCollection,q.shape._mdf||this._mdf||d)for(X.releaseShapes(),q.shape._mdf=!0,p=q.shape.paths.shapes,y=q.shape.paths._length,I=0;I<y;I+=1)X.addShape(this.processPath(p[I],U));q.shape.paths=q.localShapeCollection}this.dynamicProperties.length||(this._mdf=!1)};var TransformPropertyFactory=function(){var d=[0,0];function U(X,ee,oe){if(this.elem=X,this.frameId=-1,this.propType="transform",this.data=ee,this.v=new Matrix,this.pre=new Matrix,this.appliedTransformations=0,this.initDynamicPropertyContainer(oe||X),ee.p&&ee.p.s?(this.px=PropertyFactory.getProp(X,ee.p.x,0,0,this),this.py=PropertyFactory.getProp(X,ee.p.y,0,0,this),ee.p.z&&(this.pz=PropertyFactory.getProp(X,ee.p.z,0,0,this))):this.p=PropertyFactory.getProp(X,ee.p||{k:[0,0,0]},1,0,this),ee.rx){if(this.rx=PropertyFactory.getProp(X,ee.rx,0,degToRads,this),this.ry=PropertyFactory.getProp(X,ee.ry,0,degToRads,this),this.rz=PropertyFactory.getProp(X,ee.rz,0,degToRads,this),ee.or.k[0].ti){var me,K=ee.or.k.length;for(me=0;me<K;me+=1)ee.or.k[me].to=null,ee.or.k[me].ti=null}this.or=PropertyFactory.getProp(X,ee.or,1,degToRads,this),this.or.sh=!0}else this.r=PropertyFactory.getProp(X,ee.r||{k:0},0,degToRads,this);ee.sk&&(this.sk=PropertyFactory.getProp(X,ee.sk,0,degToRads,this),this.sa=PropertyFactory.getProp(X,ee.sa,0,degToRads,this)),this.a=PropertyFactory.getProp(X,ee.a||{k:[0,0,0]},1,0,this),this.s=PropertyFactory.getProp(X,ee.s||{k:[100,100,100]},1,.01,this),this.o=ee.o?PropertyFactory.getProp(X,ee.o,0,.01,X):{_mdf:!1,v:1},this._isDirty=!0,this.dynamicProperties.length||this.getValue(!0)}return U.prototype={applyToMatrix:function p(X){var ee=this._mdf;this.iterateDynamicProperties(),this._mdf=this._mdf||ee,this.a&&X.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.s&&X.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.sk&&X.skewFromAxis(-this.sk.v,this.sa.v),this.r?X.rotate(-this.r.v):X.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]),this.data.p.s?X.translate(this.px.v,this.py.v,this.data.p.z?-this.pz.v:0):X.translate(this.p.v[0],this.p.v[1],-this.p.v[2])},getValue:function v(X){if(this.elem.globalData.frameId!==this.frameId){if(this._isDirty&&(this.precalculateMatrix(),this._isDirty=!1),this.iterateDynamicProperties(),this._mdf||X){var ee;if(this.v.cloneFromProps(this.pre.props),this.appliedTransformations<1&&this.v.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.appliedTransformations<2&&this.v.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.sk&&this.appliedTransformations<3&&this.v.skewFromAxis(-this.sk.v,this.sa.v),this.r&&this.appliedTransformations<4?this.v.rotate(-this.r.v):!this.r&&this.appliedTransformations<4&&this.v.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]),this.autoOriented){var oe,me;if(ee=this.elem.globalData.frameRate,this.p&&this.p.keyframes&&this.p.getValueAtTime)this.p._caching.lastFrame+this.p.offsetTime<=this.p.keyframes[0].t?(oe=this.p.getValueAtTime((this.p.keyframes[0].t+.01)/ee,0),me=this.p.getValueAtTime(this.p.keyframes[0].t/ee,0)):this.p._caching.lastFrame+this.p.offsetTime>=this.p.keyframes[this.p.keyframes.length-1].t?(oe=this.p.getValueAtTime(this.p.keyframes[this.p.keyframes.length-1].t/ee,0),me=this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length-1].t-.05)/ee,0)):(oe=this.p.pv,me=this.p.getValueAtTime((this.p._caching.lastFrame+this.p.offsetTime-.01)/ee,this.p.offsetTime));else if(this.px&&this.px.keyframes&&this.py.keyframes&&this.px.getValueAtTime&&this.py.getValueAtTime){oe=[],me=[];var K=this.px,le=this.py;K._caching.lastFrame+K.offsetTime<=K.keyframes[0].t?(oe[0]=K.getValueAtTime((K.keyframes[0].t+.01)/ee,0),oe[1]=le.getValueAtTime((le.keyframes[0].t+.01)/ee,0),me[0]=K.getValueAtTime(K.keyframes[0].t/ee,0),me[1]=le.getValueAtTime(le.keyframes[0].t/ee,0)):K._caching.lastFrame+K.offsetTime>=K.keyframes[K.keyframes.length-1].t?(oe[0]=K.getValueAtTime(K.keyframes[K.keyframes.length-1].t/ee,0),oe[1]=le.getValueAtTime(le.keyframes[le.keyframes.length-1].t/ee,0),me[0]=K.getValueAtTime((K.keyframes[K.keyframes.length-1].t-.01)/ee,0),me[1]=le.getValueAtTime((le.keyframes[le.keyframes.length-1].t-.01)/ee,0)
vendor: 9,880 bytes, line 83
83):(oe=[K.pv,le.pv],me[0]=K.getValueAtTime((K._caching.lastFrame+K.offsetTime-.01)/ee,K.offsetTime),me[1]=le.getValueAtTime((le._caching.lastFrame+le.offsetTime-.01)/ee,le.offsetTime))}else oe=me=d;this.v.rotate(-Math.atan2(oe[1]-me[1],oe[0]-me[0]))}this.data.p&&this.data.p.s?this.v.translate(this.px.v,this.py.v,this.data.p.z?-this.pz.v:0):this.v.translate(this.p.v[0],this.p.v[1],-this.p.v[2])}this.frameId=this.elem.globalData.frameId}},precalculateMatrix:function S(){if(!this.a.k&&(this.pre.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.appliedTransformations=1,!this.s.effectsSequence.length)){if(this.pre.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.appliedTransformations=2,this.sk){if(this.sk.effectsSequence.length||this.sa.effectsSequence.length)return;this.pre.skewFromAxis(-this.sk.v,this.sa.v),this.appliedTransformations=3}this.r?this.r.effectsSequence.length||(this.pre.rotate(-this.r.v),this.appliedTransformations=4):!this.rz.effectsSequence.length&&!this.ry.effectsSequence.length&&!this.rx.effectsSequence.length&&!this.or.effectsSequence.length&&(this.pre.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]),this.appliedTransformations=4)}},autoOrient:function I(){}},extendPrototype([DynamicPropertyContainer],U),U.prototype.addDynamicProperty=function y(X){this._addDynamicProperty(X),this.elem.addDynamicProperty(X),this._isDirty=!0},U.prototype._addDynamicProperty=DynamicPropertyContainer.prototype.addDynamicProperty,{getTransformProperty:function q(X,ee,oe){return new U(X,ee,oe)}}}();function RepeaterModifier(){}function RoundCornersModifier(){}function floatEqual(d,p){return 1e5*Math.abs(d-p)<=Math.min(Math.abs(d),Math.abs(p))}function floatZero(d){return Math.abs(d)<=1e-5}function lerp(d,p,v){return d*(1-v)+p*v}function lerpPoint(d,p,v){return[lerp(d[0],p[0],v),lerp(d[1],p[1],v)]}function quadRoots(d,p,v){if(0===d)return[];var S=p*p-4*d*v;if(S<0)return[];var I=-p/(2*d);if(0===S)return[I];var y=Math.sqrt(S)/(2*d);return[I-y,I+y]}function polynomialCoefficients(d,p,v,S){return[3*p-d-3*v+S,3*d-6*p+3*v,-3*d+3*p,d]}function singlePoint(d){return new PolynomialBezier(d,d,d,d,!1)}function PolynomialBezier(d,p,v,S,I){I&&pointEqual(d,p)&&(p=lerpPoint(d,S,1/3)),I&&pointEqual(v,S)&&(v=lerpPoint(d,S,2/3));var y=polynomialCoefficients(d[0],p[0],v[0],S[0]),U=polynomialCoefficients(d[1],p[1],v[1],S[1]);this.a=[y[0],U[0]],this.b=[y[1],U[1]],this.c=[y[2],U[2]],this.d=[y[3],U[3]],this.points=[d,p,v,S]}function extrema(d,p){var v=d.points[0][p],S=d.points[d.points.length-1][p];if(v>S){var I=S;S=v,v=I}for(var y=quadRoots(3*d.a[p],2*d.b[p],d.c[p]),U=0;U<y.length;U+=1)if(y[U]>0&&y[U]<1){var q=d.point(y[U])[p];q<v?v=q:q>S&&(S=q)}return{min:v,max:S}}function intersectData(d,p,v){var S=d.boundingBox();return{cx:S.cx,cy:S.cy,width:S.width,height:S.height,bez:d,t:(p+v)/2,t1:p,t2:v}}function splitData(d){var p=d.bez.split(.5);return[intersectData(p[0],d.t1,d.t),intersectData(p[1],d.t,d.t2)]}function boxIntersect(d,p){return 2*Math.abs(d.cx-p.cx)<d.width+p.width&&2*Math.abs(d.cy-p.cy)<d.height+p.height}function intersectsImpl(d,p,v,S,I,y){if(boxIntersect(d,p)){if(v>=y||d.width<=S&&d.height<=S&&p.width<=S&&p.height<=S)return void I.push([d.t,p.t]);var U=splitData(d),q=splitData(p);intersectsImpl(U[0],q[0],v+1,S,I,y),intersectsImpl(U[0],q[1],v+1,S,I,y),intersectsImpl(U[1],q[0],v+1,S,I,y),intersectsImpl(U[1],q[1],v+1,S,I,y)}}function crossProduct(d,p){return[d[1]*p[2]-d[2]*p[1],d[2]*p[0]-d[0]*p[2],d[0]*p[1]-d[1]*p[0]]}function lineIntersection(d,p,v,S){var U=[v[0],v[1],1],q=[S[0],S[1],1],X=crossProduct(crossProduct([d[0],d[1],1],[p[0],p[1],1]),crossProduct(U,q));return floatZero(X[2])?null:[X[0]/X[2],X[1]/X[2]]}function polarOffset(d,p,v){return[d[0]+Math.cos(p)*v,d[1]-Math.sin(p)*v]}function pointDistance(d,p){return Math.hypot(d[0]-p[0],d[1]-p[1])}function pointEqual(d,p){return floatEqual(d[0],p[0])&&floatEqual(d[1],p[1])}function ZigZagModifier(){}function setPoint(d,p,v,S,I,y,U){var q=v-Math.PI/2,X=v+Math.PI/2,ee=p[0]+Math.cos(v)*S*I,oe=p[1]-Math.sin(v)*S*I;d.setTripleAt(ee,oe,ee+Math.cos(q)*y,oe-Math.sin(q)*y,ee+Math.cos(X)*U,oe-Math.sin(X)*U,d.length())}function getPerpendicularVector(d,p){var v=[p[0]-d[0],p[1]-d[1]],S=.5*-Math.PI;return[Math.cos(S)*v[0]-Math.sin(S)*v[1],Math.sin(S)*v[0]+Math.cos(S)*v[1]]}function getProjectingAngle(d,p){var v=0===p?d.length()-1:p-1,S=(p+1)%d.length(),U=getPerpendicularVector(d.v[v],d.v[S]);return Math.atan2(0,1)-Math.atan2(U[1],U[0])}function zigZagCorner(d,p,v,S,I,y,U){var q=getProjectingAngle(p,v),X=p.v[v%p._length],ee=p.v[0===v?p._length-1:v-1],oe=p.v[(v+1)%p._length],me=2===y?Math.sqrt(Math.pow(X[0]-ee[0],2)+Math.pow(X[1]-ee[1],2)):0,K=2===y?Math.sqrt(Math.pow(X[0]-oe[0],2)+Math.pow(X[1]-oe[1],2)):0;setPoint(d,p.v[v%p._length],q,U,S,K/(2*(I+1)),me/(2*(I+1)),y)}function zigZagSegment(d,p,v,S,I,y){for(var U=0;U<S;U+=1){var q=(U+1)/(S+1),X=2===I?Math.sqrt(Math.pow(p.points[3][0]-p.points[0][0],2)+Math.pow(p.points[3][1]-p.points[0][1],2)):0,ee=p.normalAngle(q);setPoint(d,p.point(q),ee,y,v,X/(2*(S+1)),X/(2*(S+1)),I),y=-y}return y}function linearOffset(d,p,v){var S=Math.atan2(p[0]-d[0],p[1]-d[1]);return[polarOffset(d,S,v),polarOffset(p,S,v)]}function offsetSegment(d,p){var v,S,I,y,U,q,X;v=(X=linearOffset(d.points[0],d.points[1],p))[0],S=X[1],I=(X=linearOffset(d.points[1],d.points[2],p))[0],y=X[1],U=(X=linearOffset(d.points[2],d.points[3],p))[0],q=X[1];var ee=lineIntersection(v,S,I,y);null===ee&&(ee=S);var oe=lineIntersection(U,q,I,y);return null===oe&&(oe=U),new PolynomialBezier(v,ee,oe,q)}function joinLines(d,p,v,S,I){var y=p.points[3],U=v.points[0];if(3===S||pointEqual(y,U))return y;if(2===S){var q=-p.tangentAngle(1),X=-v.tangentAngle(0)+Math.PI,ee=lineIntersection(y,polarOffset(y,q+Math.PI/2,100),U,polarOffset(U,q+Math.PI/2,100)),oe=ee?pointDistance(ee,y):pointDistance(y,U)/2,me=polarOffset(y,q,2*oe*roundCorner);return d.setXYAt(me[0],me[1],"o",d.length()-1),me=polarOffset(U,X,2*oe*roundCorner),d.setTripleAt(U[0],U[1],U[0],U[1],me[0],me[1],d.length()),U}var ce=lineIntersection(pointEqual(y,p.points[2])?p.points[0]:p.points[2],y,U,pointEqual(U,v.points[1])?v.points[3]:v.points[1]);return ce&&pointDistance(ce,y)<I?(d.setTripleAt(ce[0],ce[1],ce[0],ce[1],ce[0],ce[1],d.length()),ce):y}function getIntersection(d,p){var v=d.intersections(p);return v.length&&floatEqual(v[0][0],1)&&v.shift(),v.length?v[0]:null}function pruneSegmentIntersection(d,p){var v=d.slice(),S=p.slice(),I=getIntersection(d[d.length-1],p[0]);return I&&(v[d.length-1]=d[d.length-1].split(I[0])[0],S[0]=p[0].split(I[1])[1]),d.length>1&&p.length>1&&(I=getIntersection(d[0],p[p.length-1]))?[[d[0].split(I[0])[0]],[p[p.length-1].split(I[1])[1]]]:[v,S]}function pruneIntersections(d){for(var p,v=1;v<d.length;v+=1)p=pruneSegmentIntersection(d[v-1],d[v]),d[v-1]=p[0],d[v]=p[1];return d.length>1&&(p=pruneSegmentIntersection(d[d.length-1],d[0]),d[d.length-1]=p[0],d[0]=p[1]),d}function offsetSegmentSplit(d,p){var S,I,y,U,v=d.inflectionPoints();return 0===v.length?[offsetSegment(d,p)]:1===v.length||floatEqual(v[1],1)?(I=(y=d.split(v[0]))[1],[offsetSegment(S=y[0],p),offsetSegment(I,p)]):(S=(y=d.split(v[0]))[0],U=(y=y[1].split((v[1]-v[0])/(1-v[0])))[0],I=y[1],[offsetSegment(S,p),offsetSegment(U,p),offsetSegment(I,p)])}function OffsetPathModifier(){}function getFontProperties(d){for(var y,p=d.fStyle?d.fStyle.split(" "):[],v="normal",S="normal",I=p.length,U=0;U<I;U+=1)switch(y=p[U].toLowerCase(),y){case"italic":S="italic";break;case"bold":v="700";break;case"black":v="900";break;case"medium":v="500";break;case"regular":case"normal":v="400";break;case"light":case"thin":v="200"}return{style:S,weight:d.fWeight||v}}extendPrototype([ShapeModifier],RepeaterModifier),RepeaterModifier.prototype.initModifierProperties=function(d,p){this.getValue=this.processKeys,this.c=PropertyFactory.getProp(d,p.c,0,null,this),this.o=PropertyFactory.getProp(d,p.o,0,null,this),this.tr=TransformPropertyFactory.getTransformProperty(d,p.tr,this),this.so=PropertyFactory.getProp(d,p.tr.so,0,.01,this),this.eo=PropertyFactory.getProp(d,p.tr.eo,0,.01,this),this.data=p,this.dynamicProperties.length||this.getValue(!0),this._isAnimated=!!this.dynamicProperties.length,this.pMatrix=new Matrix,this.rMatrix=new Matrix,this.sMatrix=new Matrix,this.tMatrix=new Matrix,this.matrix=new Matrix},RepeaterModifier.prototype.applyTransforms=function(d,p,v,S,I,y){var U=y?-1:1,q=S.s.v[0]+(1-S.s.v[0])*(1-I),X=S.s.v[1]+(1-S.s.v[1])*(1-I);d.translate(S.p.v[0]*U*I,S.p.v[1]*U*I,S.p.v[2]),p.translate(-S.a.v[0],-S.a.v[1],S.a.v[2]),p.rotate(-S.r.v*U*I),p.translate(S.a.v[0],S.a.v[1],S.a.v[2]),v.translate(-S.a.v[0],-S.a.v[1],S.a.v[2]),v.scale(y?1/q:q,y?1/X:X),v.translate(S.a.v[0],S.a.v[1],S.a.v[2])},RepeaterModifier.prototype.init=function(d,p,v,S){for(this.elem=d,this.arr=p,this.pos=v,this.elemsData=S,this._currentCopies=0,this._elements=[],this._groups=[],this.frameId=-1,this.initDynamicPropertyContainer(d),this.initModifierProperties(d,p[v]);v>0;)this._elements.unshift(p[v-=1]);this.dynamicProperties.length?this.k=!0:this.getValue(!0)},RepeaterModifier.prototype.resetElements=function(d){var p,v=d.length;for(p=0;p<v;p+=1)d[p]._processed=!1,"gr"===d[p].ty&&this.resetElements(d[p].it)},RepeaterModifier.prototype.cloneElements=function(d){var p=JSON.parse(JSON.stringify(d));return this.resetElements(p),p},RepeaterModifier.prototype.changeGroupRender=function(d,p){var v,S=d.length;for(v=0;v<S;v+=1)d[v]._render=p,"gr"===d[v].ty&&this.changeGroupRender(d[v].it,p)},RepeaterModifier.prototype.processShapes=function(d){var p,v,S,I,y,U=!1;if(this._mdf||d){var ee,q=Math.ceil(this.c.v);if(this._groups.length<q){for(;this._groups.length<q;){var X={it:this.cloneElements(this._elements),ty:"gr"};X.it.push({a:{a:0,ix:1,k:[0,0]},nm:"Transform",o:{a:0,ix:7,k:100},p:{a:0,ix:2,k:[0,0]},r:{a:1,ix:6,k:[{s:0,e:0,t:0},{s:0,e:0,t:1}]}
vendor: 3,648 bytes, line 83
83,s:{a:0,ix:3,k:[100,100]},sa:{a:0,ix:5,k:0},sk:{a:0,ix:4,k:0},ty:"tr"}),this.arr.splice(0,0,X),this._groups.splice(0,0,X),this._currentCopies+=1}this.elem.reloadShapes(),U=!0}for(y=0,S=0;S<=this._groups.length-1;S+=1){if(this._groups[S]._render=ee=y<q,this.changeGroupRender(this._groups[S].it,ee),!ee){var oe=this.elemsData[S].it,me=oe[oe.length-1];0!==me.transform.op.v?(me.transform.op._mdf=!0,me.transform.op.v=0):me.transform.op._mdf=!1}y+=1}this._currentCopies=q;var K=this.o.v,le=K%1,ce=K>0?Math.floor(K):Math.ceil(K),se=this.pMatrix.props,be=this.rMatrix.props,ae=this.sMatrix.props;this.pMatrix.reset(),this.rMatrix.reset(),this.sMatrix.reset(),this.tMatrix.reset(),this.matrix.reset();var j,$,re=0;if(K>0){for(;re<ce;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),re+=1;le&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,le,!1),re+=le)}else if(K<0){for(;re>ce;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!0),re-=1;le&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,-le,!0),re-=le)}for(S=1===this.data.m?0:this._currentCopies-1,I=1===this.data.m?1:-1,y=this._currentCopies;y;){if($=(v=(p=this.elemsData[S].it)[p.length-1].transform.mProps.v.props).length,p[p.length-1].transform.mProps._mdf=!0,p[p.length-1].transform.op._mdf=!0,p[p.length-1].transform.op.v=1===this._currentCopies?this.so.v:this.so.v+S/(this._currentCopies-1)*(this.eo.v-this.so.v),0!==re){for((0!==S&&1===I||S!==this._currentCopies-1&&-1===I)&&this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),this.matrix.transform(be[0],be[1],be[2],be[3],be[4],be[5],be[6],be[7],be[8],be[9],be[10],be[11],be[12],be[13],be[14],be[15]),this.matrix.transform(ae[0],ae[1],ae[2],ae[3],ae[4],ae[5],ae[6],ae[7],ae[8],ae[9],ae[10],ae[11],ae[12],ae[13],ae[14],ae[15]),this.matrix.transform(se[0],se[1],se[2],se[3],se[4],se[5],se[6],se[7],se[8],se[9],se[10],se[11],se[12],se[13],se[14],se[15]),j=0;j<$;j+=1)v[j]=this.matrix.props[j];this.matrix.reset()}else for(this.matrix.reset(),j=0;j<$;j+=1)v[j]=this.matrix.props[j];re+=1,y-=1,S+=I}}else for(y=this._currentCopies,S=0,I=1;y;)v=(p=this.elemsData[S].it)[p.length-1].transform.mProps.v.props,p[p.length-1].transform.mProps._mdf=!1,p[p.length-1].transform.op._mdf=!1,y-=1,S+=I;return U},RepeaterModifier.prototype.addShape=function(){},extendPrototype([ShapeModifier],RoundCornersModifier),RoundCornersModifier.prototype.initModifierProperties=function(d,p){this.getValue=this.processKeys,this.rd=PropertyFactory.getProp(d,p.r,0,null,this),this._isAnimated=!!this.rd.effectsSequence.length},RoundCornersModifier.prototype.processPath=function(d,p){var v=shapePool.newElement();v.c=d.c;var S,y,U,q,X,ee,oe,K,le,ce,se,be,ae,I=d._length,me=0;for(S=0;S<I;S+=1)U=d.i[S],(y=d.v[S])[0]===(q=d.o[S])[0]&&y[1]===q[1]&&y[0]===U[0]&&y[1]===U[1]?0!==S&&S!==I-1||d.c?(X=0===S?d.v[I-1]:d.v[S-1],oe=(ee=Math.sqrt(Math.pow(y[0]-X[0],2)+Math.pow(y[1]-X[1],2)))?Math.min(ee/2,p)/ee:0,v.setTripleAt(K=be=y[0]+(X[0]-y[0])*oe,le=ae=y[1]-(y[1]-X[1])*oe,K-(K-y[0])*roundCorner,le-(le-y[1])*roundCorner,be,ae,me),me+=1,X=S===I-1?d.v[0]:d.v[S+1],oe=(ee=Math.sqrt(Math.pow(y[0]-X[0],2)+Math.pow(y[1]-X[1],2)))?Math.min(ee/2,p)/ee:0,v.setTripleAt(K=ce=y[0]+(X[0]-y[0])*oe,le=se=y[1]+(X[1]-y[1])*oe,ce,se,be=K-(K-y[0])*roundCorner,ae=le-(le-y[1])*roundCorner,me),me+=1):(v.setTripleAt(y[0],y[1],q[0],q[1],U[0],U[1],me),me+=1):(v.setTripleAt(d.v[S][0],d.v[S][1],d.o[S][0],d.o[S][1],d.i[S][0],d.i[S][1],me),me+=1);return v},RoundCornersModifier.prototype.processShapes=function(d){var p,v,I,y,q,X,S=this.shapes.length,U=this.rd.v;if(0!==U)for(v=0;v<S;
vendor: 5,245 bytes, line 83
83v+=1){if(X=(q=this.shapes[v]).localShapeCollection,q.shape._mdf||this._mdf||d)for(X.releaseShapes(),q.shape._mdf=!0,p=q.shape.paths.shapes,y=q.shape.paths._length,I=0;I<y;I+=1)X.addShape(this.processPath(p[I],U));q.shape.paths=q.localShapeCollection}this.dynamicProperties.length||(this._mdf=!1)},PolynomialBezier.prototype.point=function(d){return[((this.a[0]*d+this.b[0])*d+this.c[0])*d+this.d[0],((this.a[1]*d+this.b[1])*d+this.c[1])*d+this.d[1]]},PolynomialBezier.prototype.derivative=function(d){return[(3*d*this.a[0]+2*this.b[0])*d+this.c[0],(3*d*this.a[1]+2*this.b[1])*d+this.c[1]]},PolynomialBezier.prototype.tangentAngle=function(d){var p=this.derivative(d);return Math.atan2(p[1],p[0])},PolynomialBezier.prototype.normalAngle=function(d){var p=this.derivative(d);return Math.atan2(p[0],p[1])},PolynomialBezier.prototype.inflectionPoints=function(){var d=this.a[1]*this.b[0]-this.a[0]*this.b[1];if(floatZero(d))return[];var p=-.5*(this.a[1]*this.c[0]-this.a[0]*this.c[1])/d,v=p*p-1/3*(this.b[1]*this.c[0]-this.b[0]*this.c[1])/d;if(v<0)return[];var S=Math.sqrt(v);return floatZero(S)?S>0&&S<1?[p]:[]:[p-S,p+S].filter(function(I){return I>0&&I<1})},PolynomialBezier.prototype.split=function(d){if(d<=0)return[singlePoint(this.points[0]),this];if(d>=1)return[this,singlePoint(this.points[this.points.length-1])];var p=lerpPoint(this.points[0],this.points[1],d),v=lerpPoint(this.points[1],this.points[2],d),S=lerpPoint(this.points[2],this.points[3],d),I=lerpPoint(p,v,d),y=lerpPoint(v,S,d),U=lerpPoint(I,y,d);return[new PolynomialBezier(this.points[0],p,I,U,!0),new PolynomialBezier(U,y,S,this.points[3],!0)]},PolynomialBezier.prototype.bounds=function(){return{x:extrema(this,0),y:extrema(this,1)}},PolynomialBezier.prototype.boundingBox=function(){var d=this.bounds();return{left:d.x.min,right:d.x.max,top:d.y.min,bottom:d.y.max,width:d.x.max-d.x.min,height:d.y.max-d.y.min,cx:(d.x.max+d.x.min)/2,cy:(d.y.max+d.y.min)/2}},PolynomialBezier.prototype.intersections=function(d,p,v){void 0===p&&(p=2),void 0===v&&(v=7);var S=[];return intersectsImpl(intersectData(this,0,1),intersectData(d,0,1),0,p,S,v),S},PolynomialBezier.shapeSegment=function(d,p){var v=(p+1)%d.length();return new PolynomialBezier(d.v[p],d.o[p],d.i[v],d.v[v],!0)},PolynomialBezier.shapeSegmentInverted=function(d,p){var v=(p+1)%d.length();return new PolynomialBezier(d.v[v],d.i[v],d.o[p],d.v[p],!0)},extendPrototype([ShapeModifier],ZigZagModifier),ZigZagModifier.prototype.initModifierProperties=function(d,p){this.getValue=this.processKeys,this.amplitude=PropertyFactory.getProp(d,p.s,0,null,this),this.frequency=PropertyFactory.getProp(d,p.r,0,null,this),this.pointsType=PropertyFactory.getProp(d,p.pt,0,null,this),this._isAnimated=0!==this.amplitude.effectsSequence.length||0!==this.frequency.effectsSequence.length||0!==this.pointsType.effectsSequence.length},ZigZagModifier.prototype.processPath=function(d,p,v,S){var I=d._length,y=shapePool.newElement();if(y.c=d.c,d.c||(I-=1),0===I)return y;var U=-1,q=PolynomialBezier.shapeSegment(d,0);zigZagCorner(y,d,0,p,v,S,U);for(var X=0;X<I;X+=1)U=zigZagSegment(y,q,p,v,S,-U),q=X!==I-1||d.c?PolynomialBezier.shapeSegment(d,(X+1)%I):null,zigZagCorner(y,d,X+1,p,v,S,U);return y},ZigZagModifier.prototype.processShapes=function(d){var p,v,I,y,ee,oe,S=this.shapes.length,U=this.amplitude.v,q=Math.max(0,Math.round(this.frequency.v)),X=this.pointsType.v;if(0!==U)for(v=0;v<S;v+=1){if(oe=(ee=this.shapes[v]).localShapeCollection,ee.shape._mdf||this._mdf||d)for(oe.releaseShapes(),ee.shape._mdf=!0,p=ee.shape.paths.shapes,y=ee.shape.paths._length,I=0;I<y;I+=1)oe.addShape(this.processPath(p[I],U,q,X));ee.shape.paths=ee.localShapeCollection}this.dynamicProperties.length||(this._mdf=!1)},extendPrototype([ShapeModifier],OffsetPathModifier),OffsetPathModifier.prototype.initModifierProperties=function(d,p){this.getValue=this.processKeys,this.amount=PropertyFactory.getProp(d,p.a,0,null,this),this.miterLimit=PropertyFactory.getProp(d,p.ml,0,null,this),this.lineJoin=p.lj,this._isAnimated=0!==this.amount.effectsSequence.length},OffsetPathModifier.prototype.processPath=function(d,p,v,S){var I=shapePool.newElement();I.c=d.c;var y=d.length();d.c||(y-=1);var U,q,X,ee=[];for(U=0;U<y;U+=1)X=PolynomialBezier.shapeSegment(d,U),ee.push(offsetSegmentSplit(X,p));if(!d.c)for(U=y-1;U>=0;U-=1)X=PolynomialBezier.shapeSegmentInverted(d,U),ee.push(offsetSegmentSplit(X,p));ee=pruneIntersections(ee);var oe=null,me=null;for(U=0;U<ee.length;U+=1){var K=ee[U];for(me&&(oe=joinLines(I,me,K[0],v,S)),me=K[K.length-1],q=0;q<K.length;q+=1)X=K[q],oe&&pointEqual(X.points[0],oe)?I.setXYAt(X.points[1][0],X.points[1][1],"o",I.length()-1):I.setTripleAt(X.points[0][0],X.points[0][1],X.points[1][0],X.points[1][1],X.points[0][0],X.points[0][1],I.length()),I.setTripleAt(X.points[3][0],X.points[3][1],X.points[3][0],X.points[3][1],X.points[2][0],X.points[2][1],I.length()),oe=X.points[3]}return ee.length&&joinLines(I,me,ee[0][0],v,S),I},OffsetPathModifier.prototype.processShapes=function(d){var p,v,I,y,ee,oe,S=this.shapes.length,U=this.amount.v,q=this.miterLimit.v,X=this.lineJoin;if(0!==U)for(v=0;v<S;v+=1){if(oe=(ee=this.shapes[v]).localShapeCollection,ee.shape._mdf||this._mdf||d)for(oe.releaseShapes(),ee.shape._mdf=!0,p=ee.shape.paths.shapes,y=ee.
vendor: 5,262 bytes, line 83
83shape.paths._length,I=0;I<y;I+=1)oe.addShape(this.processPath(p[I],U,X,q));ee.shape.paths=ee.localShapeCollection}this.dynamicProperties.length||(this._mdf=!1)};var FontManager=function(){var p={w:0,size:0,shapes:[],data:{shapes:[]}},v=[];v=v.concat([2304,2305,2306,2307,2362,2363,2364,2364,2366,2367,2368,2369,2370,2371,2372,2373,2374,2375,2376,2377,2378,2379,2380,2381,2382,2383,2387,2388,2389,2390,2391,2402,2403]);var S=["d83cdffb","d83cdffc","d83cdffd","d83cdffe","d83cdfff"],I=[65039,8205];function U($,ue){var _e=createTag("span");_e.setAttribute("aria-hidden",!0),_e.style.fontFamily=ue;var we=createTag("span");we.innerText="giItT1WQy@!-/#",_e.style.position="absolute",_e.style.left="-10000px",_e.style.top="-10000px",_e.style.fontSize="300px",_e.style.fontVariant="normal",_e.style.fontStyle="normal",_e.style.fontWeight="normal",_e.style.letterSpacing="0",_e.appendChild(we),document.body.appendChild(_e);var Oe=we.offsetWidth;return we.style.fontFamily=function y($){var _e,ue=$.split(","),we=ue.length,Oe=[];for(_e=0;_e<we;_e+=1)"sans-serif"!==ue[_e]&&"monospace"!==ue[_e]&&Oe.push(ue[_e]);return Oe.join(",")}($)+", "+ue,{node:we,w:Oe,parent:_e}}function X($,ue){var we,_e=document.body&&ue?"svg":"canvas",Oe=getFontProperties($);if("svg"===_e){var it=createNS("text");it.style.fontSize="100px",it.setAttribute("font-family",$.fFamily),it.setAttribute("font-style",Oe.style),it.setAttribute("font-weight",Oe.weight),it.textContent="1",$.fClass?(it.style.fontFamily="inherit",it.setAttribute("class",$.fClass)):it.style.fontFamily=$.fFamily,ue.appendChild(it),we=it}else{var on=new OffscreenCanvas(500,500).getContext("2d");on.font=Oe.style+" "+Oe.weight+" 100px "+$.fFamily,we=on}return{measureText:function Yt(_t){return"svg"===_e?(we.textContent=_t,we.getComputedTextLength()):we.measureText(_t).width}}}var re=function(){this.fonts=[],this.chars=null,this.typekitLoaded=0,this.isLoaded=!1,this._warned=!1,this.initTime=Date.now(),this.setIsLoadedBinded=this.setIsLoaded.bind(this),this.checkLoadedFontsBinded=this.checkLoadedFonts.bind(this)};return re.isModifier=function ce($,ue){var _e=$.toString(16)+ue.toString(16);return-1!==S.indexOf(_e)},re.isZeroWidthJoiner=function se($,ue){return ue?$===I[0]&&ue===I[1]:$===I[1]},re.isCombinedCharacter=function be($){return-1!==v.indexOf($)},re.prototype={addChars:function oe($){if($){this.chars||(this.chars=[]);var ue,we,it,_e=$.length,Oe=this.chars.length;for(ue=0;ue<_e;ue+=1){for(we=0,it=!1;we<Oe;)this.chars[we].style===$[ue].style&&this.chars[we].fFamily===$[ue].fFamily&&this.chars[we].ch===$[ue].ch&&(it=!0),we+=1;it||(this.chars.push($[ue]),Oe+=1)}}},addFonts:function ee($,ue){if($){if(this.chars)return this.isLoaded=!0,void(this.fonts=$.list);if(!document.body)return this.isLoaded=!0,$.list.forEach(function(rt){rt.helper=X(rt),rt.cache={}}),void(this.fonts=$.list);var we,_e=$.list,Oe=_e.length,it=Oe;for(we=0;we<Oe;we+=1){var Yt,_t,on=!0;if(_e[we].loaded=!1,_e[we].monoCase=U(_e[we].fFamily,"monospace"),_e[we].sansCase=U(_e[we].fFamily,"sans-serif"),_e[we].fPath){if("p"===_e[we].fOrigin||3===_e[we].origin){if((Yt=document.querySelectorAll('style[f-forigin="p"][f-family="'+_e[we].fFamily+'"], style[f-origin="3"][f-family="'+_e[we].fFamily+'"]')).length>0&&(on=!1),on){var Kt=createTag("style");Kt.setAttribute("f-forigin",_e[we].fOrigin),Kt.setAttribute("f-origin",_e[we].origin),Kt.setAttribute("f-family",_e[we].fFamily),Kt.type="text/css",Kt.innerText="@font-face {font-family: "+_e[we].fFamily+"; font-style: normal; src: url('"+_e[we].fPath+"');}",ue.appendChild(Kt)}}else if("g"===_e[we].fOrigin||1===_e[we].origin){for(Yt=document.querySelectorAll('link[f-forigin="g"], link[f-origin="1"]'),_t=0;_t<Yt.length;_t+=1)-1!==Yt[_t].href.indexOf(_e[we].fPath)&&(on=!1);if(on){var Rn=createTag("link");Rn.setAttribute("f-forigin",_e[we].fOrigin),Rn.setAttribute("f-origin",_e[we].origin),Rn.type="text/css",Rn.rel="stylesheet",Rn.href=_e[we].fPath,document.body.appendChild(Rn)}}else if("t"===_e[we].fOrigin||2===_e[we].origin){for(Yt=document.querySelectorAll('script[f-forigin="t"], script[f-origin="2"]'),_t=0;_t<Yt.length;_t+=1)_e[we].fPath===Yt[_t].src&&(on=!1);if(on){var Mt=createTag("link");Mt.setAttribute("f-forigin",_e[we].fOrigin),Mt.setAttribute("f-origin",_e[we].origin),Mt.setAttribute("rel","stylesheet"),Mt.setAttribute("href",_e[we].fPath),ue.appendChild(Mt)}}}else _e[we].loaded=!0,it-=1;_e[we].helper=X(_e[we],ue),_e[we].cache={},this.fonts.push(_e[we])}0===it?this.isLoaded=!0:setTimeout(this.checkLoadedFonts.bind(this),100)}else this.isLoaded=!0},getCharData:function me($,ue,_e){for(var we=0,Oe=this.chars.length;we<Oe;){if(this.chars[we].ch===$&&this.chars[we].style===ue&&this.chars[we].fFamily===_e)return this.chars[we];we+=1}return("string"==typeof $&&13!==$.charCodeAt(0)||!$)&&console&&console.warn&&!this._warned&&(this._warned=!0,console.warn("Missing character from exported characters list: ",$,ue,_e)),p},getFontByName:function le($){for(var ue=0,_e=this.fonts.length;ue<_e;){if(this.fonts[ue].fName===$)return this.fonts[ue];ue+=1}return this.fonts[0]},measureText:function K($,ue,_e){var we=this.getFontByName(ue),Oe=$.charCodeAt(0);if(!we.cache[Oe+1]){var it=we.helper;if(" "===$){var on=it.measureText("|"+$+"|"),Yt=it.measureText("||");
83we.cache[Oe+1]=(on-Yt)/100}else we.cache[Oe+1]=it.measureText($)/100}return we.cache[Oe+1]*_e},checkLoadedFonts:function q(){var $,ue=this.fonts.length,Oe=ue;for($=0;$<ue;$+=1)this.fonts[$].loaded?Oe-=1:"n"===this.fonts[$].fOrigin||0===this.fonts[$].origin?this.fonts[$].loaded=!0:((this.fonts[$].monoCase.node.offsetWidth!==this.fonts[$].monoCase.w||this.fonts[$].sansCase.node.offsetWidth!==this.fonts[$].sansCase.w)&&(Oe-=1,this.fonts[$].loaded=!0),this.fonts[$].loaded&&(this.fonts[$].sansCase.parent.parentNode.removeChild(this.fonts[$].sansCase.parent),this.fonts[$].monoCase.parent.parentNode.removeChild(this.fonts[$].monoCase.parent)));0!==Oe&&Date.now()-this.initTime<5e3?setTimeout(this.checkLoadedFontsBinded,20):setTimeout(this.setIsLoadedBinded,10)},setIsLoaded:function ae(){this.isLoaded=!0}},re}();function SlotManager(d){this.animationData=d}function slotFactory(d){return new SlotManager(d)}function RenderableElement(){}SlotManager.prototype.getProp=function(d){return this.animationData.slots&&this.animationData.slots[d.sid]?Object.assign(d,this.animationData.slots[d.sid].p):d},RenderableElement.prototype={initRenderable:function(){this.isInRange=!1,this.hidden=!1,this.isTransparent=!1,this.renderableComponents=[]},addRenderableComponent:function(p){-1===this.renderableComponents.indexOf(p)&&this.renderableComponents.push(p)},removeRenderableComponent:function(p){-1!==this.renderableComponents.indexOf(p)&&this.renderableComponents.splice(this.renderableComponents.indexOf(p),1)},prepareRenderableFrame:function(p){this.checkLayerLimits(p)},checkTransparency:function(){this.finalTransform.mProp.o.v<=0?!this.isTransparent&&this.globalData.renderConfig.hideOnTransparent&&(this.isTransparent=!0,this.hide()):this.isTransparent&&(this.isTransparent=!1,this.show())},checkLayerLimits:function(p){this.data.ip-this.data.st<=p&&this.data.op-this.data.st>p?!0!==this.isInRange&&(this.globalData._mdf=!0,this._mdf=!0,this.isInRange=!0,this.show()):!1!==this.isInRange&&(this.globalData._mdf=!0,this.isInRange=!1,this.hide())},renderRenderable:function(){var p,v=this.renderableComponents.length;for(p=0;p<v;p+=1)this.renderableComponents[p].renderFrame(this._isFirstFrame)},sourceRectAtTime:function(){return{top:0,left:0,width:100,height:100}},getLayerSize:function(){return 5===this.data.ty?{w:this.data.textData.width,h:this.data.textData.height}:{w:this.data.width,h:this.data.height}}};var getBlendMode=function(){var d={0:"source-over",1:"multiply",2:"screen",3:"overlay",4:"darken",5:"lighten",6:"color-dodge",7:"color-burn",8:"hard-light",9:"soft-light",10:"difference",11:"exclusion",12:"hue",13:"saturation",14:"color",15:"luminosity",16:"add"};return function(p){return d[p]||""}}();function SliderEffect(d,p,v){this.p=PropertyFactory.getProp(p,d.v,0,0,v)}function AngleEffect(d,p,v){this.p=PropertyFactory.getProp(p,d.v,0,0,v)}function ColorEffect(d,p,v){this.p=PropertyFactory.getProp(p,d.v,1,0,v)}function PointEffect(d,p,v){this.p=PropertyFactory.getProp(p,d.v,1,0,v)}function LayerIndexEffect(d,p,v){this.p=PropertyFactory.getProp(p,d.v,0,0,v)}function MaskIndexEffect(d,p,v){this.p=PropertyFactory.getProp(p,d.v,0,0,v)}function CheckboxEffect(d,p,v){this.p=PropertyFactory.getProp(p,d.v,0,0,v)}function NoValueEffect(){this.p={}}function EffectsManager(d,p){var v=d.ef||[];this.effectElements=[];var S,y,I=v.length;for(S=0;S<I;S+=1)y=new GroupEffect(v[S],p),this.effectElements.push(y)}function GroupEffect(d,p){this.init(d,p)}function BaseElement(){}function FrameElement(){}function FootageElement(d,p,v){this.initFrame(),this.initRenderable(),this.assetData=p.getAssetData(d.refId),this.footageData=p.imageLoader.getAsset(this.assetData),this.initBaseData(d,p,v)}function AudioElement(d,p,v){this.initFrame(),this.initRenderable(),this.assetData=p.getAssetData(d.refId),this.initBaseData(d,p,v),this._isPlaying=!1,this._canPlay=!1;var S=this.globalData.getAssetsPath(this.assetData);this.audio=this.globalData.audioController.createAudio(S),this._currentTime=0,this.globalData.audioController.addAudio(this),this._volumeMultiplier=1,this._volume=1,this._previousVolume=null,this.tm=d.tm?PropertyFactory.getProp(this,d.tm,0,p.frameRate,this):{_placeholder:!0},this.lv=PropertyFactory.getProp(this,d.au&&d.au.lv?d.au.lv:{k:[100]},1,.01,this)}function BaseRenderer(){}function TransformElement(){}function MaskElement(d,p,v){this.data=d,this.element=p,this.globalData=v,this.storedData=[],this.masksProperties=this.data.masksProperties||[],this.maskElement=null;var I,S=this.globalData.defs,y=this.masksProperties?this.masksProperties.length:0;this.viewData=createSizedArray(y),this.solidPath="";var U,oe,me,le,ce,se,be,q=this.masksProperties,X=0,ee=[],K=createElementID(),ae="clipPath",re="
83clip-path";for(I=0;I<y;I+=1)if(("a"!==q[I].mode&&"n"!==q[I].mode||q[I].inv||100!==q[I].o.k||q[I].o.x)&&(ae="mask",re="mask"),"s"!==q[I].mode&&"i"!==q[I].mode||0!==X?le=null:((le=createNS("rect")).setAttribute("fill","#ffffff"),le.setAttribute("width",this.element.comp.data.w||0),le.setAttribute("height",this.element.comp.data.h||0),ee.push(le)),U=createNS("path"),"n"===q[I].mode)this.viewData[I]={op:PropertyFactory.getProp(this.element,q[I].o,0,.01,this.element),prop:ShapePropertyFactory.getShapeProp(this.element,q[I],3),elem:U,lastPath:""},S.appendChild(U);else{var j;if(X+=1,U.setAttribute("fill","s"===q[I].mode?"#000000":"#ffffff"),U.setAttribute("clip-rule","nonzero"),0!==q[I].x.k?(ae="mask",re="mask",be=PropertyFactory.getProp(this.element,q[I].x,0,null,this.element),j=createElementID(),(ce=createNS("filter")).setAttribute("id",j),(se=createNS("feMorphology")).setAttribute("operator","erode"),se.setAttribute("in","SourceGraphic"),se.setAttribute("radius","0"),ce.appendChild(se),S.appendChild(ce),U.setAttribute("stroke","s"===q[I].mode?"#000000":"#ffffff")):(se=null,be=null),this.storedData[I]={elem:U,x:be,expan:se,lastPath:"",lastOperator:"",filterId:j,lastRadius:0},"i"===q[I].mode){me=ee.length;var $=createNS("g");for(oe=0;oe<me;oe+=1)$.appendChild(ee[oe]);var ue=createNS("mask");ue.setAttribute("mask-type","alpha"),ue.setAttribute("id",K+"_"+X),ue.appendChild(U),S.appendChild(ue),$.setAttribute("mask","url("+getLocationHref()+"#"+K+"_"+X+")"),ee.length=0,ee.push($)}else ee.push(U);q[I].inv&&!this.solidPath&&(this.solidPath=this.createLayerSolidPath()),this.viewData[I]={elem:U,lastPath:"",op:PropertyFactory.getProp(this.element,q[I].o,0,.01,this.element),prop:ShapePropertyFactory.getShapeProp(this.element,q[I],3),invRect:le},this.viewData[I].prop.k||this.drawPath(q[I],this.viewData[I].prop.v,this.viewData[I])}for(this.maskElement=createNS(ae),y=ee.length,I=0;I<y;I+=1)this.maskElement.appendChild(ee[I]);X>0&&(this.maskElement.setAttribute("id",K),this.element.maskedElement.setAttribute(re,"url("+getLocationHref()+"#"+K+")"),S.appendChild(this.maskElement)),this.viewData.length&&this.element.addRenderableComponent(this)}extendPrototype([DynamicPropertyContainer],GroupEffect),GroupEffect.prototype.getValue=GroupEffect.prototype.iterateDynamicProperties,GroupEffect.prototype.init=function(d,p){this.data=d,this.effectElements=[],this.initDynamicPropertyContainer(p);var v,I,S=this.data.ef.length,y=this.data.ef;for(v=0;v<S;v+=1){switch(I=null,y[v].ty){case 0:I=new SliderEffect(y[v],p,this);break;case 1:I=new AngleEffect(y[v],p,this);break;case 2:I=new ColorEffect(y[v],p,this);break;case 3:I=new PointEffect(y[v],p,this);break;case 4:case 7:I=new CheckboxEffect(y[v],p,this);break;case 10:I=new LayerIndexEffect(y[v],p,this);break;case 11:I=new MaskIndexEffect(y[v],p,this);break;case 5:I=new EffectsManager(y[v],p,this);break;default:I=new NoValueEffect(y[v],p,this)}I&&this.effectElements.push(I)}},BaseElement.prototype={checkMasks:function(){if(!this.data.hasMask)return!1;for(var p=0,v=this.data.masksProperties.length;p<v;){if("n"!==this.data.masksProperties[p].mode&&!1!==this.data.masksProperties[p].cl)return!0;p+=1}return!1},initExpressions:function(){var p=getExpressionInterfaces();if(p){var v=p("layer"),S=p("effects"),I=p("shape"),y=p("text"),U=p("comp");this.layerInterface=v(this),this.data.hasMask&&this.maskManager&&this.layerInterface.registerMaskInterface(this.maskManager);var q=S.createEffectsInterface(this,this.layerInterface);this.layerInterface.registerEffectsInterface(q),0===this.data.ty||this.data.xt?this.compInterface=U(this):4===this.data.ty?(this.layerInterface.shapeInterface=I(this.shapesData,this.itemsData,this.layerInterface),this.layerInterface.content=this.layerInterface.shapeInterface):5===this.data.ty&&(this.layerInterface.textInterface=y(this),this.layerInterface.text=this.layerInterface.textInterface)}},setBlendMode:function(){var p=getBlendMode(this.data.bm);(this.baseElement||this.layerElement).style["mix-blend-mode"]=p},initBaseData:function(p,v,S){this.globalData=v,this.comp=S,this.data=p,this.layerId=createElementID(),this.data.sr||(this.data.sr=1),this.effectsManager=new EffectsManager(this.data,this,this.dynamicProperties)},getType:function(){return this.type},sourceRectAtTime:function(){}},FrameElement.prototype={initFrame:function(){this._isFirstFrame=!1,this.dynamicProperties=[],this._mdf=!1},prepareProperties:function(p,v){var S,I=this.dynamicProperties.length;for(S=0;S<I;S+=1)(v||this._isParent&&"transform"===this.dynamicProperties[S].propType)&&(this.dynamicProperties[S].getValue(),this.dynamicProperties[S]._mdf&&(this.globalData._mdf=!0,this._mdf=!0))},addDynamicProperty:function(p){-1===this.dynamicProperties.indexOf(p)&&this.dynamicProperties.push(p)}},FootageElement.prototype.prepareFrame=function(){}
vendor: 8,094 bytes, line 83
83,extendPrototype([RenderableElement,BaseElement,FrameElement],FootageElement),FootageElement.prototype.getBaseElement=function(){return null},FootageElement.prototype.renderFrame=function(){},FootageElement.prototype.destroy=function(){},FootageElement.prototype.initExpressions=function(){var d=getExpressionInterfaces();if(d){var p=d("footage");this.layerInterface=p(this)}},FootageElement.prototype.getFootageData=function(){return this.footageData},AudioElement.prototype.prepareFrame=function(d){this.prepareRenderableFrame(d,!0),this.prepareProperties(d,!0),this._currentTime=this.tm._placeholder?d/this.data.sr:this.tm.v,this._volume=this.lv.v[0];var v=this._volume*this._volumeMultiplier;this._previousVolume!==v&&(this._previousVolume=v,this.audio.volume(v))},extendPrototype([RenderableElement,BaseElement,FrameElement],AudioElement),AudioElement.prototype.renderFrame=function(){this.isInRange&&this._canPlay&&(this._isPlaying?(!this.audio.playing()||Math.abs(this._currentTime/this.globalData.frameRate-this.audio.seek())>.1)&&this.audio.seek(this._currentTime/this.globalData.frameRate):(this.audio.play(),this.audio.seek(this._currentTime/this.globalData.frameRate),this._isPlaying=!0))},AudioElement.prototype.show=function(){this._canPlay=!0},AudioElement.prototype.hide=function(){this.audio.pause(),this._isPlaying=!1},AudioElement.prototype.pause=function(){this.audio.pause(),this._isPlaying=!1,this._canPlay=!1},AudioElement.prototype.resume=function(){this._canPlay=!0},AudioElement.prototype.setRate=function(d){this.audio.rate(d)},AudioElement.prototype.volume=function(d){this._volumeMultiplier=d,this._previousVolume=d*this._volume,this.audio.volume(this._previousVolume)},AudioElement.prototype.getBaseElement=function(){return null},AudioElement.prototype.destroy=function(){this.audio.pause()},AudioElement.prototype.sourceRectAtTime=function(){},AudioElement.prototype.initExpressions=function(){},BaseRenderer.prototype.checkLayers=function(d){var p,S,v=this.layers.length;for(this.completeLayers=!0,p=v-1;p>=0;p-=1)this.elements[p]||(S=this.layers[p]).ip-S.st<=d-this.layers[p].st&&S.op-S.st>d-this.layers[p].st&&this.buildItem(p),this.completeLayers=!!this.elements[p]&&this.completeLayers;this.checkPendingElements()},BaseRenderer.prototype.createItem=function(d){switch(d.ty){case 2:return this.createImage(d);case 0:return this.createComp(d);case 1:return this.createSolid(d);case 3:default:return this.createNull(d);case 4:return this.createShape(d);case 5:return this.createText(d);case 6:return this.createAudio(d);case 9:return this.createVideo(d);case 13:return this.createCamera(d);case 15:return this.createFootage(d)}},BaseRenderer.prototype.createCamera=function(){throw new Error("You're using a 3d camera. Try the html renderer.")},BaseRenderer.prototype.createAudio=function(d){return new AudioElement(d,this.globalData,this)},BaseRenderer.prototype.createFootage=function(d){return new FootageElement(d,this.globalData,this)},BaseRenderer.prototype.buildAllItems=function(){var d,p=this.layers.length;for(d=0;d<p;d+=1)this.buildItem(d);this.checkPendingElements()},BaseRenderer.prototype.includeLayers=function(d){this.completeLayers=!1;var p,S,v=d.length,I=this.layers.length;for(p=0;p<v;p+=1)for(S=0;S<I;){if(this.layers[S].id===d[p].id){this.layers[S]=d[p];break}S+=1}},BaseRenderer.prototype.setProjectInterface=function(d){this.globalData.projectInterface=d},BaseRenderer.prototype.initItems=function(){this.globalData.progressiveLoad||this.buildAllItems()},BaseRenderer.prototype.buildElementParenting=function(d,p,v){for(var S=this.elements,I=this.layers,y=0,U=I.length;y<U;)I[y].ind==p&&(S[y]&&!0!==S[y]?(v.push(S[y]),S[y].setAsParent(),void 0!==I[y].parent?this.buildElementParenting(d,I[y].parent,v):d.setHierarchy(v)):(this.buildItem(y),this.addPendingElement(d))),y+=1},BaseRenderer.prototype.addPendingElement=function(d){this.pendingElements.push(d)},BaseRenderer.prototype.searchExtraCompositions=function(d){var p,v=d.length;for(p=0;p<v;p+=1)if(d[p].xt){var S=this.createComp(d[p]);S.initExpressions(),this.globalData.projectInterface.registerComposition(S)}},BaseRenderer.prototype.getElementById=function(d){var p,v=this.elements.length;for(p=0;p<v;p+=1)if(this.elements[p].data.ind===d)return this.elements[p];return null},BaseRenderer.prototype.getElementByPath=function(d){var v,p=d.shift();if("number"==typeof p)v=this.elements[p];else{var S,I=this.elements.length;for(S=0;S<I;S+=1)if(this.elements[S].data.nm===p){v=this.elements[S];break}}return 0===d.length?v:v.getElementByPath(d)},BaseRenderer.prototype.setupGlobalData=function(d,p){this.globalData.fontManager=new FontManager,this.globalData.slotManager=slotFactory(d),this.globalData.fontManager.addChars(d.chars),this.globalData.fontManager.addFonts(d.fonts,p),this.globalData.getAssetData=this.animationItem.getAssetData.bind(this.animationItem),this.globalData.getAssetsPath=this.animationItem.getAssetsPath.bind(this.animationItem),this.globalData.imageLoader=this.animationItem.imagePreloader,this.globalData.videoLoader=this.animationItem.videoPreloader,this.globalData.audioController=this.animationItem.audioController,this.globalData.frameId=0,this.globalData.frameRate=d.fr,this.globalData.nm=d.nm,this.globalData.compSize={w:d.w,h:d.h}},TransformElement.prototype={initTransform:function(){this.finalTransform={mProp:this.data.ks?TransformPropertyFactory.getTransformProperty(this,this.data.ks,this):{o:0},_matMdf:!1,_opMdf:!1,mat:new Matrix},this.data.ao&&(this.finalTransform.mProp.autoOriented=!0)},renderTransform:function(){if(this.finalTransform._opMdf=this.finalTransform.mProp.o._mdf||this._isFirstFrame,this.finalTransform._matMdf=this.finalTransform.mProp._mdf||this._isFirstFrame,this.hierarchy){var p,v=this.finalTransform.mat,S=0,I=this.hierarchy.length;if(!this.finalTransform._matMdf)for(;S<I;){if(this.hierarchy[S].finalTransform.mProp._mdf){this.finalTransform._matMdf=!0;break}S+=1}if(this.finalTransform._matMdf)for(v.cloneFromProps(p=this.finalTransform.mProp.v.props),S=0;S<I;S+=1)v.transform((p=this.hierarchy[S].finalTransform.mProp.v.props)[0],p[1],p[2],p[3],p[4],p[5],p[6],p[7],p[8],p[9],p[10],p[11],p[12],p[13],p[14],p[15])}},globalToLocal:function(p){var v=[];v.push(this.finalTransform);for(var S=!0,I=this.comp;S;)I.finalTransform?(I.data.hasMask&&v.splice(0,0,I.finalTransform),I=I.comp):S=!1;var y,q,U=v.length;for(y=0;y<U;y+=1)q=v[y].mat.applyToPointArray(0,0,0),p=[p[0]-q[0],p[1]-q[1],0];return p},mHelper:new Matrix},MaskElement.prototype.getMaskProperty=function(d){return this.viewData[d].prop},MaskElement.prototype.renderFrame=function(d){var v,p=this.element.finalTransform.mat,S=this.masksProperties.length;for(v=0;v<S;v+=1)if((this.viewData[v].prop._mdf||d)&&this.drawPath(this.masksProperties[v],this.viewData[v].prop.v,this.viewData[v]),(this.viewData[v].op._mdf||d)&&this.viewData[v].elem.setAttribute("fill-opacity",this.viewData[v].op.v),"n"!==this.masksProperties[v].mode&&(this.viewData[v].invRect&&(this.element.finalTransform.mProp._mdf||d)&&this.viewData[v].invRect.setAttribute("transform",p.getInverseMatrix().to2dCSS()),this.storedData[v].x&&(this.storedData[v].x._mdf||d))){var I=this.storedData[v].expan;this.storedData[v].x.v<0?("erode"!==this.storedData[v].lastOperator&&(this.storedData[v].lastOperator="erode",this.storedData[v].elem.setAttribute("filter","url("+getLocationHref()+"#"+this.storedData[v].filterId+")")),I.setAttribute("radius",-this.storedData[v].x.v)):("dilate"!==this.storedData[v].lastOperator&&(this.storedData[v].lastOperator="dilate",this.storedData[v].elem.setAttribute("filter",null)),this.storedData[v].elem.setAttribute("stroke-width",2*this.storedData[v].x.v))}},MaskElement.prototype.getMaskelement=function(){return this.maskElement},MaskElement.prototype.createLayerSolidPath=function(){var d="M0,0 ";return d+=" h"+this.globalData.compSize.w,d+=" v"+this.globalData.compSize.h,(d+=" h-"+this.globalData.compSize.w)+" v-"+this.globalData.compSize.h+" "},MaskElement.prototype.drawPath=function(d,p,v){var I,y,S=" M"+p.v[0][0]+","+p.v[0][1];for(y=p._length,I=1;I<y;
vendor: 4,173 bytes, line 83
83I+=1)S+=" C"+p.o[I-1][0]+","+p.o[I-1][1]+" "+p.i[I][0]+","+p.i[I][1]+" "+p.v[I][0]+","+p.v[I][1];if(p.c&&y>1&&(S+=" C"+p.o[I-1][0]+","+p.o[I-1][1]+" "+p.i[0][0]+","+p.i[0][1]+" "+p.v[0][0]+","+p.v[0][1]),v.lastPath!==S){var U="";v.elem&&(p.c&&(U=d.inv?this.solidPath+S:S),v.elem.setAttribute("d",U)),v.lastPath=S}},MaskElement.prototype.destroy=function(){this.element=null,this.globalData=null,this.maskElement=null,this.data=null,this.masksProperties=null};var filtersFactory=function(){var d={createFilter:function p(S,I){var y=createNS("filter");return y.setAttribute("id",S),!0!==I&&(y.setAttribute("filterUnits","objectBoundingBox"),y.setAttribute("x","0%"),y.setAttribute("y","0%"),y.setAttribute("width","100%"),y.setAttribute("height","100%")),y},createAlphaToLuminanceFilter:function v(){var S=createNS("feColorMatrix");return S.setAttribute("type","matrix"),S.setAttribute("color-interpolation-filters","sRGB"),S.setAttribute("values","0 0 0 1 0  0 0 0 1 0  0 0 0 1 0  0 0 0 1 1"),S}};return d}(),featureSupport=function(){var d={maskType:!0,svgLumaHidden:!0,offscreenCanvas:typeof OffscreenCanvas<"u"};return(/MSIE 10/i.test(navigator.userAgent)||/MSIE 9/i.test(navigator.userAgent)||/rv:11.0/i.test(navigator.userAgent)||/Edge\/\d./i.test(navigator.userAgent))&&(d.maskType=!1),/firefox/i.test(navigator.userAgent)&&(d.svgLumaHidden=!1),d}(),registeredEffects={},idPrefix="filter_result_";function SVGEffects(d){var p,q,v="SourceGraphic",S=d.data.ef?d.data.ef.length:0,I=createElementID(),y=filtersFactory.createFilter(I,!0),U=0;for(this.filters=[],p=0;p<S;p+=1){q=null;var X=d.data.ef[p].ty;registeredEffects[X]&&(q=new(0,registeredEffects[X].effect)(y,d.effectsManager.effectElements[p],d,idPrefix+U,v),v=idPrefix+U,registeredEffects[X].countsAsEffect&&(U+=1)),q&&this.filters.push(q)}U&&(d.globalData.defs.appendChild(y),d.layerElement.setAttribute("filter","url("+getLocationHref()+"#"+I+")")),this.filters.length&&d.addRenderableComponent(this)}function registerEffect(d,p,v){registeredEffects[d]={effect:p,countsAsEffect:v}}function SVGBaseElement(){}function HierarchyElement(){}function RenderableDOMElement(){}function IImageElement(d,p,v){this.assetData=p.getAssetData(d.refId),this.assetData&&this.assetData.sid&&(this.assetData=p.slotManager.getProp(this.assetData)),this.initElement(d,p,v),this.sourceRect={top:0,left:0,width:this.assetData.w,height:this.assetData.h}}function ProcessedElement(d,p){this.elem=d,this.pos=p}function IShapeElement(){}SVGEffects.prototype.renderFrame=function(d){var p,v=this.filters.length;for(p=0;p<v;p+=1)this.filters[p].renderFrame(d)},SVGBaseElement.prototype={initRendererElement:function(){this.layerElement=createNS("g")},createContainerElements:function(){this.matteElement=createNS("g"),this.transformedElement=this.layerElement,this.maskedElement=this.layerElement,this._sizeChanged=!1;var p=null;if(this.data.td){this.matteMasks={};var v=createNS("g");v.setAttribute("id",this.layerId),v.appendChild(this.layerElement),p=v,this.globalData.defs.appendChild(v)}else this.data.tt?(this.matteElement.appendChild(this.layerElement),p=this.matteElement,this.baseElement=this.matteElement):this.baseElement=this.layerElement;if(this.data.ln&&this.layerElement.setAttribute("id",this.data.ln),this.data.cl&&this.layerElement.setAttribute("class",this.data.cl),0===this.data.ty&&!this.data.hd){var S=createNS("clipPath"),I=createNS("path");I.setAttribute("d","M0,0 L"+this.data.w+",0 L"+this.data.w+","+this.data.h+" L0,"+this.data.h+"z");var y=createElementID();if(S.setAttribute("id",y),S.appendChild(I),this.globalData.defs.appendChild(S),this.checkMasks()){var U=createNS("g");U.setAttribute("clip-path","url("+getLocationHref()+"#"+y+")"),U.appendChild(this.layerElement),this.transformedElement=U,p?p.appendChild(this.transformedElement):this.baseElement=this.transformedElement}else this.layerElement.setAttribute("clip-path","url("+getLocationHref()+"#"+y+")")}0!==this.data.bm&&this.setBlendMode()},renderElement:function(){this.finalTransform._matMdf&&this.transformedElement.setAttribute("transform",this.finalTransform.mat.to2dCSS()),this.finalTransform._opMdf&&this.transformedElement.setAttribute("op
83acity",this.finalTransform.mProp.o.v)},destroyBaseElement:function(){this.layerElement=null,this.matteElement=null,this.maskManager.destroy()},getBaseElement:function(){return this.data.hd?null:this.baseElement},createRenderableComponents:function(){this.maskManager=new MaskElement(this.data,this,this.globalData),this.renderableEffectsManager=new SVGEffects(this)},getMatte:function(p){if(this.matteMasks||(this.matteMasks={}),!this.matteMasks[p]){var S,I,y,U,v=this.layerId+"_"+p;if(1===p||3===p){var q=createNS("mask");q.setAttribute("id",v),q.setAttribute("mask-type",3===p?"luminance":"alpha"),(y=createNS("use")).setAttributeNS("http://www.w3.org/1999/xlink","href","#"+this.layerId),q.appendChild(y),this.globalData.defs.appendChild(q),!featureSupport.maskType&&1===p&&(q.setAttribute("mask-type","luminance"),S=createElementID(),I=filtersFactory.createFilter(S),this.globalData.defs.appendChild(I),I.appendChild(filtersFactory.createAlphaToLuminanceFilter()),(U=createNS("g")).appendChild(y),q.appendChild(U),U.setAttribute("filter","url("+getLocationHref()+"#"+S+")"))}else if(2===p){var X=createNS("mask");X.setAttribute("id",v),X.setAttribute("mask-type","alpha");var ee=createNS("g");X.appendChild(ee),S=createElementID(),I=filtersFactory.createFilter(S);var oe=createNS("feComponentTransfer");oe.setAttribute("in","SourceGraphic"),I.appendChild(oe);var me=createNS("feFuncA");me.setAttribute("type","table"),me.setAttribute("tableValues","1.0 0.0"),oe.appendChild(me),this.globalData.defs.appendChild(I);var K=createNS("rect");K.setAttribute("width",this.comp.data.w),K.setAttribute("height",this.comp.data.h),K.setAttribute("x","0"),K.setAttribute("y","0"),K.setAttribute("fill","#ffffff"),K.setAttribute("opacity","0"),ee.setAttribute("filter","url("+getLocationHref()+"#"+S+")"),ee.appendChild(K),(y=createNS("use")).setAttributeNS("http://www.w3.org/1999/xlink","href","#"+this.layerId),ee.appendChild(y),featureSupport.maskType||(X.setAttribute("mask-type","luminance"),I.appendChild(filtersFactory.createAlphaToLuminanceFilter()),U=createNS("g"),ee.appendChild(K),U.appendChild(this.layerElement),ee.appendChild(U)),this.globalData.defs.appendChild(X)}this.matteMasks[p]=v}return this.matteMasks[p]},setMatte:function(p){this.matteElement&&this.matteElement.setAttribute("mask","url("+getLocationHref()+"#"+p+")")}},HierarchyElement.prototype={initHierarchy:function(){this.hierarchy=[],this._isParent=!1,this.checkParenting()},setHierarchy:function(p){this.hierarchy=p},setAsParent:function(){this._isParent=!0},checkParenting:function(){void 0!==this.data.parent&&this.comp.buildElementParenting(this,this.data.parent,[])}},extendPrototype([RenderableElement,createProxyFunction({initElement:function(v,S,I){this.initFrame(),this.initBaseData(v,S,I),this.initTransform(v,S,I),this.initHierarchy(),this.initRenderable(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),this.createContent(),this.hide()},hide:function(){this.hidden||this.isInRange&&!this.isTransparent||((this.baseElement||this.layerElement).style.display="none",this.hidden=!0)},show:function(){this.isInRange&&!this.isTransparent&&(this.data.hd||((this.baseElement||this.layerElement).style.display="block"),this.hidden=!1,this._isFirstFrame=!0)},renderFrame:function(){this.data.hd||this.hidden||(this.renderTransform(),this.renderRenderable(),this.renderElement(),this.renderInnerContent(),this._isFirstFrame&&(this._isFirstFrame=!1))},renderInnerContent:function(){},prepareFrame:function(v){this._mdf=!1,this.prepareRenderableFrame(v),this.prepareProperties(v,this.isInRange),this.checkTransparency()},destroy:function(){this.innerElem=null,this.destroyBaseElement()}})],RenderableDOMElement),extendPrototype([BaseElement,TransformElement,SVGBaseElement,HierarchyElement,FrameElement,RenderableDOMElement],IImageElement),IImageElement.prototype.createContent=function(){var d=this.globalData.getAssetsPath(this.assetData);this.innerElem=createNS("image"),this.innerElem.setAttribute("width",this.assetData.w+"px"),this.innerElem.setAttribute("height",this.assetData.h+"px"),this.innerElem.setAttribute("preserveAspectRatio",this.assetData.pr||this.globalData.renderConfig.imagePreserveAspectRatio),this.innerElem.setAttributeNS("http://www.w3.org/1999/xlink","href",d),this.layerElement.appendChild(this.innerElem)},IImageElement.prototype.sourceRectAtTime=function(){return this.sourceRect},IShapeElement.prototype={addShapeToModifiers:function(p){var v,S=this.shapeModifiers.length;for(v=0;v<S;v+=1)this.shapeModifiers[v].addShape(p)},isShapeInAnimatedModifiers:function(p){for(var S=this.shapeModifiers.length;0<S;)if(this.shapeModifiers[0].isAnimatedWithShape(p))return!0;return!1},renderModifiers:function(){if(this.shapeModifiers.length){var p,v=this.shapes.length;for(p=0;p<v;p+=1)this.shapes[p].sh.reset();for(p=(v=this.shapeModifiers.length)-1;p>=0&&!this.shapeModifiers[p].processShapes(this._isFirstFrame);p-=1);}},searchProcessedElement:function(p){for(var v=this.processedElements,S=0,I=v.length;S<I;){if(v[S].elem===p)return v[S].pos;S+=1}return 0},addProcessedElement:function(p,v){for(var S=this.processedElements,I=S.length;I;)if(S[I-=1].elem===p)return void(S[I].pos=v);S.push(new ProcessedElement(p,v))},prepareFrame:function(p){this.prepareRenderableFrame(p),this.prepareProperties(p,this.isInRange)}};var lineCapEnum={1:"butt",2:"round",3:"square"},lineJoinEnum={1:"miter",2:"round",3:"bevel"};function SVGShapeData(d,p,v){this.caches=[],this.styles=[],this.transformers=d,this.lStr="",this.sh=v,this.lvl=p,this._isAnimated=!!v.k;for(var S=0,I=d.length;S<I;){if(d[S].mProps.dynamicProperties.length){this._isAnimated=!0;break}S+=1}}function SVGStyleData(d,p){this.data=d,this.type=d.ty,this.d="",this.lvl=p,this._mdf=!1,this.closed=!0===d.hd,this.pElem=createNS("path"),this.msElem=null}function DashProperty(d,p,v,S){this.elem=d,this.frameId=-1,this.dataProps=createSizedArray(p.length),this.renderer=v,this.k=!1,this.dashStr="",this.dashArray=createTypedArray("float32",p.length?p.length-1:0),this.dashoffset=createTypedArray("float32",1),this.initDynamicPropertyContainer(S);var I,U,y=p.length||0;for(I=0;I<y;I+=1)U=PropertyFactory.getProp(d,p[I].v,0,0,this),this.k=U.k||this.k,this.dataProps[I]={n:p[I].n,p:U};this.k||this.getValue(!0),this._isAnimated=this.k}function SVGStrokeStyleData(d,p,v){this.initDynamicPropertyContainer(d),this.getValue=this.iterateDynamicProperties,this.o=PropertyFactory.getProp(d,p.o,0,.01,this),this.w=PropertyFactory.getProp(d,p.w,0,null,this),this.d=new DashProperty(d,p.d||{},"svg",this),this.c=PropertyFactory.getProp(d,p.c,1,255,this),this.style=v,this._isAnimated=!!this._isAnimated}function SVGFillStyleData(d,p,v){this.initDynamicPropertyContainer(d),this.getValue=this.iterateDynamicProperties,this.o=PropertyFactory.getProp(d,p.o,0,.01,this),this.c=PropertyFactory.getProp(d,p.c,1,255,this),this.style=v}function SVGNoStyleData(d,p,v){this.initDynamicPropertyContainer(d),this.getValue=this.iterateDynamicProperties,this.style=v}function GradientProperty(d,p,v){this.data=p,this.c=createTypedArray("uint8c",4*p.p);var S=p.k.k[0].s?p.k.k[0].s.length-4*p.p:p.k.k.length-4*p.p;this.o=createTypedArray("float32",S),this._cmdf=!1,this._omdf=!1,this._collapsable=this.checkCollapsable(),this._hasOpacity=S,this.initDynamicPropertyContainer(v),this.prop=PropertyFactory.getProp(d,p.k,1,null,this),this.k=this.prop.k,this.getValue(!0)}function SVGGradientFillStyleData(d,p,v){this.initDynamicPropertyContainer(d),this.getValue=this.iterateDynamicProperties,this.initGradientData(d,p,v)}function SVGGradientStrokeStyleData(d,p,v){this.initDynamicPropertyContainer(d),this.getValue=this.iterateDynamicProperties,this.w=PropertyFactory.getProp(d,p.w,0,null,this),this.d=new DashProperty(d,p.d||{},"svg",this),this.initGradientData(d,p,v),this._isAnimated=!!this._isAnimated}function ShapeGroupData(){this.it=[],this.prevViewData=[],this.gr=createNS("g")}function SVGTransformData(d,p,v){this.transform={mProps:d,op:p,c
vendor: 4,628 bytes, line 83
83ontainer:v},this.elements=[],this._isAnimated=this.transform.mProps.dynamicProperties.length||this.transform.op.effectsSequence.length}SVGShapeData.prototype.setAsAnimated=function(){this._isAnimated=!0},SVGStyleData.prototype.reset=function(){this.d="",this._mdf=!1},DashProperty.prototype.getValue=function(d){if((this.elem.globalData.frameId!==this.frameId||d)&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf=this._mdf||d,this._mdf)){var p=0,v=this.dataProps.length;for("svg"===this.renderer&&(this.dashStr=""),p=0;p<v;p+=1)"o"!==this.dataProps[p].n?"svg"===this.renderer?this.dashStr+=" "+this.dataProps[p].p.v:this.dashArray[p]=this.dataProps[p].p.v:this.dashoffset[0]=this.dataProps[p].p.v}},extendPrototype([DynamicPropertyContainer],DashProperty),extendPrototype([DynamicPropertyContainer],SVGStrokeStyleData),extendPrototype([DynamicPropertyContainer],SVGFillStyleData),extendPrototype([DynamicPropertyContainer],SVGNoStyleData),GradientProperty.prototype.comparePoints=function(d,p){for(var v=0,S=this.o.length/2;v<S;){if(Math.abs(d[4*v]-d[4*p+2*v])>.01)return!1;v+=1}return!0},GradientProperty.prototype.checkCollapsable=function(){if(this.o.length/2!=this.c.length/4)return!1;if(this.data.k.k[0].s)for(var d=0,p=this.data.k.k.length;d<p;){if(!this.comparePoints(this.data.k.k[d].s,this.data.p))return!1;d+=1}else if(!this.comparePoints(this.data.k.k,this.data.p))return!1;return!0},GradientProperty.prototype.getValue=function(d){if(this.prop.getValue(),this._mdf=!1,this._cmdf=!1,this._omdf=!1,this.prop._mdf||d){var p,S,I,v=4*this.data.p;for(p=0;p<v;p+=1)S=p%4==0?100:255,I=Math.round(this.prop.v[p]*S),this.c[p]!==I&&(this.c[p]=I,this._cmdf=!d);if(this.o.length)for(v=this.prop.v.length,p=4*this.data.p;p<v;p+=1)S=p%2==0?100:1,I=p%2==0?Math.round(100*this.prop.v[p]):this.prop.v[p],this.o[p-4*this.data.p]!==I&&(this.o[p-4*this.data.p]=I,this._omdf=!d);this._mdf=!d}},extendPrototype([DynamicPropertyContainer],GradientProperty),SVGGradientFillStyleData.prototype.initGradientData=function(d,p,v){this.o=PropertyFactory.getProp(d,p.o,0,.01,this),this.s=PropertyFactory.getProp(d,p.s,1,null,this),this.e=PropertyFactory.getProp(d,p.e,1,null,this),this.h=PropertyFactory.getProp(d,p.h||{k:0},0,.01,this),this.a=PropertyFactory.getProp(d,p.a||{k:0},0,degToRads,this),this.g=new GradientProperty(d,p.g,this),this.style=v,this.stops=[],this.setGradientData(v.pElem,p),this.setGradientOpacity(p,v),this._isAnimated=!!this._isAnimated},SVGGradientFillStyleData.prototype.setGradientData=function(d,p){var v=createElementID(),S=createNS(1===p.t?"linearGradient":"radialGradient");S.setAttribute("id",v),S.setAttribute("spreadMethod","pad"),S.setAttribute("gradientUnits","userSpaceOnUse");var y,U,q,I=[];for(q=4*p.g.p,U=0;U<q;U+=4)y=createNS("stop"),S.appendChild(y),I.push(y);d.setAttribute("gf"===p.ty?"fill":"stroke","url("+getLocationHref()+"#"+v+")"),this.gf=S,this.cst=I},SVGGradientFillStyleData.prototype.setGradientOpacity=function(d,p){if(this.g._hasOpacity&&!this.g._collapsable){var v,S,I,y=createNS("mask"),U=createNS("path");y.appendChild(U);var q=createElementID(),X=createElementID();y.setAttribute("id",X);var ee=createNS(1===d.t?"linearGradient":"radialGradient");ee.setAttribute("id",q),ee.setAttribute("spreadMethod","pad"),ee.setAttribute("gradientUnits","userSpaceOnUse"),I=d.g.k.k[0].s?d.g.k.k[0].s.length:d.g.k.k.length;var oe=this.stops;for(S=4*d.g.p;S<I;S+=2)(v=createNS("stop")).setAttribute("stop-color","rgb(255,255,255)"),ee.appendChild(v),oe.push(v);U.setAttribute("gf"===d.ty?"fill":"stroke","url("+getLocationHref()+"#"+q+")"),"gs"===d.ty&&(U.setAttribute("stroke-linecap",lineCapEnum[d.lc||2]),U.setAttribute("stroke-linejoin",lineJoinEnum[d.lj||2]),1===d.lj&&U.setAttribute("stroke-miterlimit",d.ml)),this.of=ee,this.ms=y,this.ost=oe,this.maskId=X,p.msElem=U}},extendPrototype([DynamicPropertyContainer],SVGGradientFillStyleData),extendPrototype([SVGGradientFillStyleData,DynamicPropertyContainer],SVGGradientStrokeStyleData);var buildShapeString=function(p,v,S,I){if(0===v)return"";var X,y=p.o,U=p.i,q=p.v,ee=" M"+I.applyToPointStringified(q[0][0],q[0][1]);for(X=1;X<v;X+=1)ee+=" C"+I.applyToPointStringified(y[X-1][0],y[X-1][1])+" "+I.applyToPointStringified(U[X][0],U[X][1])+" "+I.applyToPointStringified(q[X][0],q[X][1]);return S&&v&&(ee+=" C"+I.applyToPointStringified(y[X-1][0],y[X-1][1])+" "+I.applyToPointStringified(U[0][0],U[0][1])+" "+I.applyToPointStringified(q[0][0],q[0][1]),ee+="z"),ee},SVGElementsRenderer=function(){var d=new Matrix,p=new Matrix;function I(me,K,le){(le||K.transform.op._mdf)&&K.transform.container.setAttribute("op
83acity",K.transform.op.v),(le||K.transform.mProps._mdf)&&K.transform.container.setAttribute("transform",K.transform.mProps.v.to2dCSS())}function y(){}function U(me,K,le){var ce,se,be,ae,re,j,_e,we,Oe,it,on,$=K.styles.length,ue=K.lvl;for(j=0;j<$;j+=1){if(ae=K.sh._mdf||le,K.styles[j].lvl<ue){for(we=p.reset(),it=ue-K.styles[j].lvl,on=K.transformers.length-1;!ae&&it>0;)ae=K.transformers[on].mProps._mdf||ae,it-=1,on-=1;if(ae)for(it=ue-K.styles[j].lvl,on=K.transformers.length-1;it>0;)we.transform((Oe=K.transformers[on].mProps.v.props)[0],Oe[1],Oe[2],Oe[3],Oe[4],Oe[5],Oe[6],Oe[7],Oe[8],Oe[9],Oe[10],Oe[11],Oe[12],Oe[13],Oe[14],Oe[15]),it-=1,on-=1}else we=d;if(se=(_e=K.sh.paths)._length,ae){for(be="",ce=0;ce<se;ce+=1)(re=_e.shapes[ce])&&re._length&&(be+=buildShapeString(re,re._length,re.c,we));K.caches[j]=be}else be=K.caches[j];K.styles[j].d+=!0===me.hd?"":be,K.styles[j]._mdf=ae||K.styles[j]._mdf}}function q(me,K,le){var ce=K.style;(K.c._mdf||le)&&ce.pElem.setAttribute("fill","rgb("+bmFloor(K.c.v[0])+","+bmFloor(K.c.v[1])+","+bmFloor(K.c.v[2])+")"),(K.o._mdf||le)&&ce.pElem.setAttribute("fill-opacity",K.o.v)}function X(me,K,le){ee(me,K,le),oe(0,K,le)}function ee(me,K,le){var ue,_e,we,Oe,Yt,ce=K.gf,se=K.g._hasOpacity,be=K.s.v,ae=K.e.v;if((K.o._mdf||le)&&K.style.pElem.setAttribute("gf"===me.ty?"fill-opacity":"stroke-opacity",K.o.v),K.s._mdf||le){var j=1===me.t?"x1":"cx",$="x1"===j?"y1":"cy";ce.setAttribute(j,be[0]),ce.setAttribute($,be[1]),se&&!K.g._collapsable&&(K.of.setAttribute(j,be[0]),K.of.setAttribute($,be[1]))}if(K.g._cmdf||le){var it=K.g.c;for(we=(ue=K.cst).length,_e=0;_e<we;_e+=1)(Oe=ue[_e]).setAttribute("offset",it[4*_e]+"%"),Oe.setAttribute("stop-color","rgb("+it[4*_e+1]+","+it[4*_e+2]+","+it[4*_e+3]+")")}if(se&&(K.g._omdf||le)){var on=K.g.o;for(we=(ue=K.g._collapsable?K.cst:K.ost).length,_e=0;_e<we;_e+=1)Oe=ue[_e],K.g._collapsable||Oe.setAttribute("offset",on[2*_e]+"%"),Oe.setAttribute("stop-opacity",on[2*_e+1])}if(1===me.t)(K.e._mdf||le)&&(ce.setAttribute("x2",ae[0]),ce.setAttribute("y2",ae[1]),se&&!K.g._collapsable&&(K.of.setAttribute("x2",ae[0]),K.of.setAttribute("y2",ae[1])));else if((K.s._mdf||K.e._mdf||le)&&(Yt=Math.sqrt(Math.pow(be[0]-ae[0],2)+Math.pow(be[1]-ae[1],2)),ce.setAttribute("r",Yt),se&&!K.g._collapsable&&K.of.setAttribute("r",Yt)),K.e._mdf||K.h._mdf||K.a._mdf||le){Yt||(Yt=Math.sqrt(Math.pow(be[0]-ae[0],2)+Math.pow(be[1]-ae[1],2)));var _t=Math.atan2(ae[1]-be[1],ae[0]-be[0]),Kt=K.h.v;Kt>=1?Kt=.99:Kt<=-1&&(Kt=-.99);var Rn=Yt*Kt,Mt=Math.cos(_t+K.a.v)*Rn+be[0],rt=Math.sin(_t+K.a.v)*Rn+be[1];ce.setAttribute("fx",Mt),ce.setAttribute("fy",rt),se&&!K.g._collapsable&&(K.of.setAttribute("fx",Mt),K.of.setAttribute("fy",rt))}}function oe(me,K,le){var ce=K.style,se=K.d;se&&(se._mdf||le)&&se.dashStr&&(ce.pElem.setAttribute("stroke-dasharray",se.dashStr),ce.pElem.setAttribute("stroke-dashoffset",se.dashoffset[0])),K.c&&(K.c._mdf||le)&&ce.pElem.setAttribute("stroke","rgb("+bmFloor(K.c.v[0])+","+bmFloor(K.c.v[1])+","+bmFloor(K.c.v[2])+")"),(K.o._mdf||le)&&ce.pElem.setAttribute("stroke-opacity",K.o.v),(K.w._mdf||le)&&(ce.pElem.setAttribute("stroke-width",K.w.v),ce.msElem&&ce.msElem.setAttribute("stroke-width",K.w.v))}return{createRenderFunction:function S(me){switch(me.ty){case"fl":return q;case"gf":return ee;case"gs":return X;case"st":return oe;case"sh":case"el":case"rc":case"sr":return U;case"tr":return I;case"no":return y;default:return null}}}}();function SVGShapeElement(d,p,v){this.shapes=[],this.shapesData=d.shapes,this.stylesList=[],this.shapeModifiers=[],this.itemsData=[],this.processedElements=[],this.animatedContents=[],this.initElement(d,p,v),this.prevViewData=[]}function LetterProps(d,p,v,S,I,y){this.o=d,this.sw=p,this.sc=v,this.fc=S,this.m=I,this.p=y,this._mdf={o:!0,sw:!!p,sc:!!v,fc:!!S,m:!0,p:!0}}function TextProperty(d,p){this._frameId=initialDefaultFrame,this.pv="",this.v="",this.kf=!1,this._isFirstFrame=!0,this._mdf=!1,p.d&&p.d.sid&&(p.d=d.globalData.slotManager.getProp(p.d)),this.data=p,this.elem=d,this.comp=this.elem.comp,this.keysIndex=0,this.canResize=!1,this.minimumFontSize=1,this.effectsSequence=[],this.currentData={ascent:0,boxWidth:this.defaultBoxWidth,f:"",fStyle:"",fWeight:"",fc:"",j:"",justifyOffset:"",l:[],lh:0,lineWidths:[],ls:"",of:"",s:"",sc:"",sw:0,t:0,tr:0,sz:0,ps:null,fillColorAnim:!1,strokeColorAnim:!1,strokeWidthAnim:!1,yOffset:0,finalSize:0,finalText:[],finalLineHeight:0,__complete:!1},this.copyData(this.currentData,this.data.d.k[0].s),this.searchProperty()||this.completeTextData(this.currentData)}extendPrototype([BaseElement,TransformElement,SVGBaseElement,IShapeElement,HierarchyElement,FrameElement,RenderableDOMElement],SVGShapeElement),SVGShapeElement.prototype.initSecondaryElement=function(){},SVGShapeElement.prototype.identityMatrix=new Matrix,SVGShapeElement.prototype.buildExpressionInterface=function(){},SVGShapeElement.prototype.createContent=function(){this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes()},SVGShapeElement.prototype.filterUniqueShapes=function(){var d,v,S,y,p=this.shapes.length,I=this.stylesList.length,U=[],q=!1;for(S=0;S<I;S+=1){for(y=this.stylesList[S],q=!1,U.length=0,d=0;d<p;d+=1)-1!==(v=this.shapes[d]).styles.indexOf(y)&&(U.push(v),q=v._isAnimated||q);U.length>1&&q&&this.setShapesAsAnimated(U)}},SVGShapeElement.prototype.setShapesAsAnimated=function(d){var p,v=d.length;for(p=0;p<v;p+=1)d[p].setAsAnimated()},SVGShapeElement.prototype.createStyleElement=function(d,p){var v,S=new SVGStyleData(d,p),I=S.pElem;return"st"===d.ty?v=new SVGStrokeStyleData(this,d,S):"fl"===d.ty?v=new SVGFillStyleData(this,d,S):"gf"===d.ty||"gs"===d.ty?(v=new("gf"===d.ty?SVGGradientFillStyleData:SVGGradientStrokeStyleData)(this,d,S),this.globalData.defs.appendChild(v.gf),v.maskId&&(this.globalData.defs.appendChild(v.ms),this.globalData.defs.appendChild(v.of),I.setAttribute("mask","url("+getLocationHref()+"#"+v.maskId+")"))):"no"===d.ty&&(v=new SVGNoStyleData(this,d,S)),("st"===d.ty||"gs"===d.ty)&&(I.setAttribute("stroke-linecap",lineCapEnum[d.lc||2]),I.setAttribute("stroke-linejoin",lineJoinEnum[d.lj||2]),I.setAttribute("fill-opacity","0"),1===d.lj&&I.setAttribute("stroke-miterlimit",d.ml)),2===d.r&&I.setAttribute("fill-rule","evenodd"),d.ln&&I.setAttribute("id",d.ln),d.cl&&I.setAttribute("class",d.cl),d.bm&&(I.style["mix-blend-mode"]=getBlendM
vendor: 22,996 bytes, line 83
83ode(d.bm)),this.stylesList.push(S),this.addToAnimatedContents(d,v),v},SVGShapeElement.prototype.createGroupElement=function(d){var p=new ShapeGroupData;return d.ln&&p.gr.setAttribute("id",d.ln),d.cl&&p.gr.setAttribute("class",d.cl),d.bm&&(p.gr.style["mix-blend-mode"]=getBlendMode(d.bm)),p},SVGShapeElement.prototype.createTransformElement=function(d,p){var v=TransformPropertyFactory.getTransformProperty(this,d,this),S=new SVGTransformData(v,v.o,p);return this.addToAnimatedContents(d,S),S},SVGShapeElement.prototype.createShapeElement=function(d,p,v){var S=4;"rc"===d.ty?S=5:"el"===d.ty?S=6:"sr"===d.ty&&(S=7);var y=new SVGShapeData(p,v,ShapePropertyFactory.getShapeProp(this,d,S,this));return this.shapes.push(y),this.addShapeToModifiers(y),this.addToAnimatedContents(d,y),y},SVGShapeElement.prototype.addToAnimatedContents=function(d,p){for(var v=0,S=this.animatedContents.length;v<S;){if(this.animatedContents[v].element===p)return;v+=1}this.animatedContents.push({fn:SVGElementsRenderer.createRenderFunction(d),element:p,data:d})},SVGShapeElement.prototype.setElementStyles=function(d){var v,p=d.styles,S=this.stylesList.length;for(v=0;v<S;v+=1)this.stylesList[v].closed||p.push(this.stylesList[v])},SVGShapeElement.prototype.reloadShapes=function(){this._isFirstFrame=!0;var d,p=this.itemsData.length;for(d=0;d<p;d+=1)this.prevViewData[d]=this.itemsData[d];for(this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes(),p=this.dynamicProperties.length,d=0;d<p;d+=1)this.dynamicProperties[d].getValue();this.renderModifiers()},SVGShapeElement.prototype.searchShapes=function(d,p,v,S,I,y,U){var X,oe,me,se,be,q=[].concat(y),ee=d.length-1,K=[],le=[];for(X=ee;X>=0;X-=1){if((be=this.searchProcessedElement(d[X]))?p[X]=v[be-1]:d[X]._render=U,"fl"===d[X].ty||"st"===d[X].ty||"gf"===d[X].ty||"gs"===d[X].ty||"no"===d[X].ty)be?p[X].style.closed=!1:p[X]=this.createStyleElement(d[X],I),d[X]._render&&p[X].style.pElem.parentNode!==S&&S.appendChild(p[X].style.pElem),K.push(p[X].style);else if("gr"===d[X].ty){if(be)for(me=p[X].it.length,oe=0;oe<me;oe+=1)p[X].prevViewData[oe]=p[X].it[oe];else p[X]=this.createGroupElement(d[X]);this.searchShapes(d[X].it,p[X].it,p[X].prevViewData,p[X].gr,I+1,q,U),d[X]._render&&p[X].gr.parentNode!==S&&S.appendChild(p[X].gr)}else"tr"===d[X].ty?(be||(p[X]=this.createTransformElement(d[X],S)),q.push(p[X].transform)):"sh"===d[X].ty||"rc"===d[X].ty||"el"===d[X].ty||"sr"===d[X].ty?(be||(p[X]=this.createShapeElement(d[X],q,I)),this.setElementStyles(p[X])):"tm"===d[X].ty||"rd"===d[X].ty||"ms"===d[X].ty||"pb"===d[X].ty||"zz"===d[X].ty||"op"===d[X].ty?(be?(se=p[X]).closed=!1:((se=ShapeModifiers.getModifier(d[X].ty)).init(this,d[X]),p[X]=se,this.shapeModifiers.push(se)),le.push(se)):"rp"===d[X].ty&&(be?(se=p[X]).closed=!0:(se=ShapeModifiers.getModifier(d[X].ty),p[X]=se,se.init(this,d,X,p),this.shapeModifiers.push(se),U=!1),le.push(se));this.addProcessedElement(d[X],X+1)}for(ee=K.length,X=0;X<ee;X+=1)K[X].closed=!0;for(ee=le.length,X=0;X<ee;X+=1)le[X].closed=!0},SVGShapeElement.prototype.renderInnerContent=function(){this.renderModifiers();var d,p=this.stylesList.length;for(d=0;d<p;d+=1)this.stylesList[d].reset();for(this.renderShape(),d=0;d<p;d+=1)(this.stylesList[d]._mdf||this._isFirstFrame)&&(this.stylesList[d].msElem&&(this.stylesList[d].msElem.setAttribute("d",this.stylesList[d].d),this.stylesList[d].d="M0 0"+this.stylesList[d].d),this.stylesList[d].pElem.setAttribute("d",this.stylesList[d].d||"M0 0"))},SVGShapeElement.prototype.renderShape=function(){var d,v,p=this.animatedContents.length;for(d=0;d<p;d+=1)v=this.animatedContents[d],(this._isFirstFrame||v.element._isAnimated)&&!0!==v.data&&v.fn(v.data,v.element,this._isFirstFrame)},SVGShapeElement.prototype.destroy=function(){this.destroyBaseElement(),this.shapesData=null,this.itemsData=null},LetterProps.prototype.update=function(d,p,v,S,I,y){this._mdf.o=!1,this._mdf.sw=!1,this._mdf.sc=!1,this._mdf.fc=!1,this._mdf.m=!1,this._mdf.p=!1;var U=!1;return this.o!==d&&(this.o=d,this._mdf.o=!0,U=!0),this.sw!==p&&(this.sw=p,this._mdf.sw=!0,U=!0),this.sc!==v&&(this.sc=v,this._mdf.sc=!0,U=!0),this.fc!==S&&(this.fc=S,this._mdf.fc=!0,U=!0),this.m!==I&&(this.m=I,this._mdf.m=!0,U=!0),y.length&&(this.p[0]!==y[0]||this.p[1]!==y[1]||this.p[4]!==y[4]||this.p[5]!==y[5]||this.p[12]!==y[12]||this.p[13]!==y[13])&&(this.p=y,this._mdf.p=!0,U=!0),U},TextProperty.prototype.defaultBoxWidth=[0,0],TextProperty.prototype.copyData=function(d,p){for(var v in p)Object.prototype.hasOwnProperty.call(p,v)&&(d[v]=p[v]);return d},TextProperty.prototype.setCurrentData=function(d){d.__complete||this.completeTextData(d),this.currentData=d,this.currentData.boxWidth=this.currentData.boxWidth||this.defaultBoxWidth,this._mdf=!0},TextProperty.prototype.searchProperty=function(){return this.searchKeyframes()},TextProperty.prototype.searchKeyframes=function(){return this.kf=this.data.d.k.length>1,this.kf&&this.addEffect(this.getKeyframeValue.bind(this)),this.kf},TextProperty.prototype.addEffect=function(d){this.effectsSequence.push(d),this.elem.addDynamicProperty(this)},TextProperty.prototype.getValue=function(d){if(this.elem.globalData.frameId!==this.frameId&&this.effectsSequence.length||d){this.currentData.t=this.data.d.k[this.keysIndex].s.t;var p=this.currentData,v=this.keysIndex;if(this.lock)return void this.setCurrentData(this.currentData);this.lock=!0,this._mdf=!1;var S,I=this.effectsSequence.length,y=d||this.data.d.k[this.keysIndex].s;for(S=0;S<I;S+=1)y=this.effectsSequence[S](v!==this.keysIndex?y:this.currentData,y.t);p!==y&&this.setCurrentData(y),this.v=this.currentData,this.pv=this.v,this.lock=!1,this.frameId=this.elem.globalData.frameId}},TextProperty.prototype.getKeyframeValue=function(){for(var d=this.data.d.k,p=this.elem.comp.renderedFrame,v=0,S=d.length;v<=S-1&&!(v===S-1||d[v+1].t>p);)v+=1;return this.keysIndex!==v&&(this.keysIndex=v),this.data.d.k[this.keysIndex].s},TextProperty.prototype.buildFinalText=function(d){for(var I,y,p=[],v=0,S=d.length,U=!1;v<S;)I=d.charCodeAt(v),FontManager.isCombinedCharacter(I)?p[p.length-1]+=d.charAt(v):I>=55296&&I<=56319?(y=d.charCodeAt(v+1))>=56320&&y<=57343?(U||FontManager.isModifier(I,y)?(p[p.length-1]+=d.substr(v,2),U=!1):p.push(d.substr(v,2)),v+=1):p.push(d.charAt(v)):I>56319?(y=d.charCodeAt(v+1),FontManager.isZeroWidthJoiner(I,y)?(U=!0,p[p.length-1]+=d.substr(v,2),v+=1):p.push(d.charAt(v))):FontManager.isZeroWidthJoiner(I)?(p[p.length-1]+=d.charAt(v),U=!0):p.push(d.charAt(v)),v+=1;return p},TextProperty.prototype.completeTextData=function(d){d.__complete=!0;var I,y,U,X,be,ae,j,p=this.elem.globalData.fontManager,v=this.data,S=[],q=0,ee=v.m.g,oe=0,me=0,K=0,le=[],ce=0,se=0,re=p.getFontByName(d.f),$=0,ue=getFontProperties(re);d.fWeight=ue.weight,d.fStyle=ue.style,d.finalSize=d.s,d.finalText=this.buildFinalText(d.t),y=d.finalText.length,d.finalLineHeight=d.lh;var we,_e=d.tr/1e3*d.finalSize;if(d.sz)for(var Yt,_t,Oe=!0,it=d.sz[0],on=d.sz[1];Oe;){Yt=0,ce=0,y=(_t=this.buildFinalText(d.t)).length,_e=d.tr/1e3*d.finalSize;var Kt=-1;for(I=0;I<y;I+=1)we=_t[I].charCodeAt(0),U=!1," "===_t[I]?Kt=I:(13===we||3===we)&&(ce=0,U=!0,Yt+=d.finalLineHeight||1.2*d.finalSize),p.chars?(j=p.getCharData(_t[I],re.fStyle,re.fFamily),$=U?0:j.w*d.finalSize/100):$=p.measureText(_t[I],d.f,d.finalSize),ce+$>it&&" "!==_t[I]?(-1===Kt?y+=1:I=Kt,Yt+=d.finalLineHeight||1.2*d.finalSize,_t.splice(I,Kt===I?1:0,"\r"),Kt=-1,ce=0):(ce+=$,ce+=_e);Yt+=re.ascent*d.finalSize/100,this.canResize&&d.finalSize>this.minimumFontSize&&on<Yt?(d.finalSize-=1,d.finalLineHeight=d.finalSize*d.lh/d.s):(d.finalText=_t,y=d.finalText.length,Oe=!1)}ce=-_e,$=0;var Mt,Rn=0;for(I=0;I<y;I+=1)if(U=!1,13===(we=(Mt=d.finalText[I]).charCodeAt(0))||3===we?(Rn=0,le.push(ce),se=ce>se?ce:se,ce=-2*_e,X="",U=!0,K+=1):X=Mt,p.chars?(j=p.getCharData(Mt,re.fStyle,p.getFontByName(d.f).fFamily),$=U?0:j.w*d.finalSize/100):$=p.measureText(X,d.f,d.finalSize)," "===Mt?Rn+=$+_e:(ce+=$+_e+Rn,Rn=0),S.push({l:$,an:$,add:oe,n:U,anIndexes:[],val:X,line:K,animatorJustifyOffset:0}),2==ee){if(oe+=$,""===X||" "===X||I===y-1){for((""===X||" "===X)&&(oe-=$);me<=I;)S[me].an=oe,S[me].ind=q,S[me].extra=$,me+=1;q+=1,oe=0}}else if(3==ee){if(oe+=$,""===X||I===y-1){for(""===X&&(oe-=$);me<=I;)S[me].an=oe,S[me].ind=q,S[me].extra=$,me+=1;oe=0,q+=1}}else S[q].ind=q,S[q].extra=0,q+=1;if(d.l=S,se=ce>se?ce:se,le.push(ce),d.sz)d.boxWidth=d.sz[0],d.justifyOffset=0;else switch(d.boxWidth=se,d.j){case 1:d.justifyOffset=-d.boxWidth;break;case 2:d.justifyOffset=-d.boxWidth/2;break;default:d.justifyOffset=0}d.lineWidths=le;var ke,xe,rt=v.a;ae=rt.length;var Pe,Ft,pt=[];for(be=0;be<ae;be+=1){for((ke=rt[be]).a.sc&&(d.strokeColorAnim=!0),ke.a.sw&&(d.strokeWidthAnim=!0),(ke.a.fc||ke.a.fh||ke.a.fs||ke.a.fb)&&(d.fillColorAnim=!0),Ft=0,Pe=ke.s.b,I=0;I<y;I+=1)(xe=S[I]).anIndexes[be]=Ft,(1==Pe&&""!==xe.val||2==Pe&&""!==xe.val&&" "!==xe.val||3==Pe&&(xe.n||" "==xe.val||I==y-1)||4==Pe&&(xe.n||I==y-1))&&(1===ke.s.rn&&pt.push(Ft),Ft+=1);v.a[be].s.totalChars=Ft;var Li,Hn=-1;if(1===ke.s.rn)for(I=0;I<y;I+=1)Hn!=(xe=S[I]).anIndexes[be]&&(Hn=xe.anIndexes[be],Li=pt.splice(Math.floor(Math.random()*pt.length),1)[0]),xe.anIndexes[be]=Li}d.yOffset=d.finalLineHeight||1.2*d.finalSize,d.ls=d.ls||0,d.ascent=re.ascent*d.finalSize/100},TextProperty.prototype.updateDocumentData=function(d,p){var v=this.copyData({},this.data.d.k[p=void 0===p?this.keysIndex:p].s);v=this.copyData(v,d),this.data.d.k[p].s=v,this.recalculate(p),this.setCurrentData(v),this.elem.addDynamicProperty(this)},TextProperty.prototype.recalculate=function(d){var p=this.data.d.k[d].s;p.__complete=!1,this.keysIndex=0,this._isFirstFrame=!0,this.getValue(p)},TextProperty.prototype.canResizeFont=function(d){this.canResize=d,this.recalculate(this.keysIndex),this.elem.addDynamicProperty(this)},TextProperty.prototype.setMinimumFontSize=function(d){this.minimumFontSize=Math.floor(d)||1,this.recalculate(this.keysIndex),this.elem.addDynamicProperty(this)};var TextSelectorProp=function(){var d=Math.max,p=Math.min,v=Math.floor;function S(y,U){this._currentTextLength=-1,this.k=!1,this.data=U,this.elem=y,this.comp=y.comp,this.finalS=0,this.finalE=0,this.initDynamicPropertyContainer(y),this.s=PropertyFactory.getProp(y,U.s||{k:0},0,0,this),this.e="e"in U?PropertyFactory.getProp(y,U.e,0,0,this):{v:100},this.o=PropertyFactory.getProp(y,U.o||{k:0},0,0,this),this.xe=PropertyFactory.getProp(y,U.xe||{k:0},0,0,this),this.ne=PropertyFactory.getProp(y,U.ne||{k:0},0,0,this),this.sm=PropertyFactory.getProp(y,U.sm||{k:100},0,0,this),this.a=PropertyFactory.getProp(y,U.a,0,.01,this),this.dynamicProperties.length||this.getValue()}return S.prototype={getMult:function(U){this._currentTextLength!==this.elem.textProperty.currentData.l.length&&this.getValue();var q=0,X=0,ee=1,oe=1;this.ne.v>0?q=this.ne.v/100:X=-this.ne.v/100,this.xe.v>0?ee=1-this.xe.v/100:oe=1+this.xe.v/100;var me=BezierFactory.getBezierEasing(q,X,ee,oe).get,K=0,le=this.finalS,ce=this.finalE,se=this.data.sh;if(2===se)K=me(K=ce===le?U>=ce?1:0:d(0,p(.5/(ce-le)+(U-le)/(ce-le),1)));else if(3===se)K=me(K=ce===le?U>=ce?0:1:1-d(0,p(.5/(ce-le)+(U-le)/(ce-le),1)));else if(4===se)ce===le?K=0:(K=d(0,p(.5/(ce-le)+(U-le)/(ce-le),1)))<.5?K*=2:K=1-2*(K-.5),K=me(K);else if(5===se){if(ce===le)K=0;else{var be=ce-le,ae=-be/2+(U=p(d(0,U+.5-le),ce-le)),re=be/2;K=Math.sqrt(1-ae*ae/(re*re))}K=me(K)}else 6===se?(ce===le?K=0:(U=p(d(0,U+.5-le),ce-le),K=(1+Math.cos(Math.PI+2*Math.PI*U/(ce-le)))/2),K=me(K)):(U>=v(le)&&(K=d(0,p(U-le<0?p(ce,1)-(le-U):ce-U,1))),K=me(K));if(100!==this.sm.v){var j=.01*this.sm.v;0===j&&(j=1e-8);var $=.5-.5*j;K<$?K=0:(K=(K-$)/j)>1&&(K=1)}return K*this.a.v},getValue:function(U){this.iterateDynamicProperties(),this._mdf=U||this._mdf,this._currentTextLength=this.elem.textProperty.currentData.l.length||0,U&&2===this.data.r&&(this.e.v=this._currentTextLength);var q=2===this.data.r?1:100/this.data.totalChars,X=this.o.v/q,ee=this.s.v/q+X,oe=this.e.v/q+X;if(ee>oe){var me=ee;ee=oe,oe=me}this.finalS=ee,this.finalE=oe}},extendPrototype([DynamicPropertyContainer],S),{getTextSelectorProp:function I(y,U,q){return new S(y,U,q)}}}();function TextAnimatorDataProperty(d,p,v){var S={propType:!1},I=PropertyFactory.getProp,y=p.a;this.a={r:y.r?I(d,y.r,0,degToRads,v):S,rx:y.rx?I(d,y.rx,0,degToRads,v):S,ry:y.ry?I(d,y.ry,0,degToRads,v):S,sk:y.sk?I(d,y.sk,0,degToRads,v):S,sa:y.sa?I(d,y.sa,0,degToRads,v):S,s:y.s?I(d,y.s,1,.01,v):S,a:y.a?I(d,y.a,1,0,v):S,o:y.o?I(d,y.o,0,.01,v):S,p:y.p?I(d,y.p,1,0,v):S,sw:y.sw?I(d,y.sw,0,0,v):S,sc:y.sc?I(d,y.sc,1,0,v):S,fc:y.fc?I(d,y.fc,1,0,v):S,fh:y.fh?I(d,y.fh,0,0,v):S,fs:y.fs?I(d,y.fs,0,.01,v):S,fb:y.fb?I(d,y.fb,0,.01,v):S,t:y.t?I(d,y.t,0,0,v):S},this.s=TextSelectorProp.getTextSelectorProp(d,p.s,v),this.s.t=p.s.t}function TextAnimatorProperty(d,p,v){this._isFirstFrame=!0,this._hasMaskedPath=!1,this._frameId=-1,this._textData=d,this._renderType=p,this._elem=v,this._animatorsData=createSizedArray(this._textData.a.length),this._pathData={},this._moreOptions={alignment:{}},this.renderedLetters=[],this.lettersChangedFlag=!1,this.initDynamicPropertyContainer(v)}function ITextElement(){}TextAnimatorProperty.prototype.searchProperties=function(){var d,p=this._textData.a.length,S=PropertyFactory.getProp;for(d=0;d<p;d+=1)this._animatorsData[d]=new TextAnimatorDataProperty(this._elem,this._textData.a[d],this);this._textData.p&&"m"in this._textData.p?(this._pathData={a:S(this._elem,this._textData.p.a,0,0,this),f:S(this._elem,this._textData.p.f,0,0,this),l:S(this._elem,this._textData.p.l,0,0,this),r:S(this._elem,this._textData.p.r,0,0,this),p:S(this._elem,this._textData.p.p,0,0,this),m:this._elem.maskManager.getMaskProperty(this._textData.p.m)},this._hasMaskedPath=!0):this._hasMaskedPath=!1,this._moreOptions.alignment=S(this._elem,this._textData.m.a,1,0,this)},TextAnimatorProperty.prototype.getMeasures=function(d,p){if(this.lettersChangedFlag=p,this._mdf||this._isFirstFrame||p||this._hasMaskedPath&&this._pathData.m._mdf){this._isFirstFrame=!1;var X,ee,oe,me,le,ce,se,be,ae,re,j,$,ue,_e,we,Oe,it,Yt,v=this._moreOptions.alignment.v,S=this._animatorsData,I=this._textData,y=this.mHelper,U=this._renderType,q=this.renderedLetters.length,K=d.l;if(this._hasMaskedPath){if(Yt=this._pathData.m,!this._pathData.n||this._pathData._mdf){var Kt,_t=Yt.v;for(this._pathData.r.v&&(_t=_t.reverse()),le={tLength:0,segments:[]},me=_t._length-1,Oe=0,oe=0;oe<me;oe+=1)Kt=bez.buildBezierData(_t.v[oe],_t.v[oe+1],[_t.o[oe][0]-_t.v[oe][0],_t.o[oe][1]-_t.v[oe][1]],[_t.i[oe+1][0]-_t.v[oe+1][0],_t.i[oe+1][1]-_t.v[oe+1][1]]),le.tLength+=Kt.segmentLength,le.segments.push(Kt),Oe+=Kt.segmentLength;oe=me,Yt.v.c&&(Kt=bez.buildBezierData(_t.v[oe],_t.v[0],[_t.o[oe][0]-_t.v[oe][0],_t.o[oe][1]-_t.v[oe][1]],[_t.i[0][0]-_t.v[0][0],_t.i[0][1]-_t.v[0][1]]),le.tLength+=Kt.segmentLength,le.segments.push(Kt),Oe+=Kt.segmentLength),this._pathData.pi=le}if(j=0,re=1,be=0,ae=!0,_e=(le=this._pathData.pi).segments,(ce=this._pathData.f.v)<0&&Yt.v.c)for(le.tLength<Math.abs(ce)&&(ce=-Math.abs(ce)%le.tLength),re=(ue=_e[j=_e.length-1].points).length-1;ce<0;)ce+=ue[re].partialLength,(re-=1)<0&&(re=(ue=_e[j-=1].points).length-1);$=(ue=_e[j].points)[re-1],we=(se=ue[re]).partialLength}me=K.length,X=0,ee=0;var rt,xe,Pe,Ft,Rn=1.2*d.finalSize*.714,Mt=!0;Pe=S.length;var pt,Li,ri,Gr,Es,Kr,Qs,Tn,sr,Ps,rr,pa,Rs,Hn=-1,hr=ce,Ta=j,fa=re,da=-1,wr="",ds=this.defaultPropsArray;if(2===d.j||1===d.j){var er=0,Yi=0,ur=2===d.j?-.5:-1,vi=0,Bs=!0;for(oe=0;oe<me;oe+=1)if(K[oe].n){for(er&&(er+=Yi);vi<oe;)K[vi].animatorJustifyOffset=er,vi+=1;er=0,Bs=!0}else{for(xe=0;xe<Pe;xe+=1)(rt=S[xe].a).t.propType&&(Bs&&2===d.j&&(Yi+=rt.t.v*ur),er+=(pt=S[xe].s.getMult(K[oe].anIndexes[xe],I.a[xe].s.totalChars)).length?rt.t.v*pt[0]*ur:rt.t.v*pt*ur);Bs=!1}for(er&&(er+=Yi);vi<oe;)K[vi].animatorJustifyOffset=er,vi+=1}for(oe=0;oe<me;oe+=1){if(y.reset(),Es=1,K[oe].n)X=0,ee+=d.yOffset,ee+=Mt?1:0,ce=hr,Mt=!1,this._hasMaskedPath&&($=(ue=_e[j=Ta].points)[(re=fa)-1],we=(se=ue[re]).partialLength,be=0),wr="",pa="",Ps="",Rs="",ds=this.defaultPropsArray;else{if(this._hasMaskedPath){if(da!==K[oe].line){switch(d.j){case 1:ce+=Oe-d.lineWidths[K[oe].line];break;case 2:ce+=(Oe-d.lineWidths[K[oe].line])/2}da=K[oe].line}Hn!==K[oe].ind&&(K[Hn]&&(ce+=K[Hn].extra),ce+=K[oe].an/2,Hn=K[oe].ind),ce+=v[0]*K[oe].an*.005;var ps=0;for(xe=0;xe<Pe;xe+=1)(rt=S[xe].a).p.propType&&(ps+=(pt=S[xe].s.getMult(K[oe].anIndexes[xe],I.a[xe].s.totalChars)).length?rt.p.v[0]*pt[0]:rt.p.v[0]*pt),rt.a.propType&&(ps+=(pt=S[xe].s.getMult(K[oe].anIndexes[xe],I.a[xe].s.totalChars)).length?rt.a.v[0]*pt[0]:rt.a.v[0]*pt);for(ae=!0,this._pathData.a.v&&(ce=.5*K[0].an+(Oe-this._pathData.f.v-.5*K[0].an-.5*K[K.length-1].an)*Hn/(me-1),ce+=this._pathData.f.v);ae;)be+we>=ce+ps||!ue?(ri=$.point[0]+(se.point[0]-$.point[0])*(it=(ce+ps-be)/se.partialLength),Gr=$.point[1]+(se.point[1]-$.point[1])*it,y.translate(-v[0]*K[oe].an*.005,-v[1]*Rn*.01),ae=!1):ue&&(be+=se.partialLength,(re+=1)>=ue.length&&(re=0,_e[j+=1]?ue=_e[j].points:Yt.v.c?(re=0,ue=_e[j=0].points):(be-=se.partialLength,ue=null)),ue&&($=se,we=(se=ue[re]).partialLength));y.translate(-(Li=K[oe].an/2-K[oe].add),0,0)}else y.translate(-(Li=K[oe].an/2-K[oe].add),0,0),y.translate(-v[0]*K[oe].an*.005,-v[1]*Rn*.01,0);for(xe=0;xe<Pe;xe+=1)(rt=S[xe].a).t.propType&&(pt=S[xe].s.getMult(K[oe].anIndexes[xe],I.a[xe].s.totalChars),(0!==X||0!==d.j)&&(this._hasMaskedPath?ce+=pt.length?rt.t.v*pt[0]:rt.t.v*pt:X+=pt.length?rt.t.v*pt[0]:rt.t.v*pt));for(d.strokeWidthAnim&&(Qs=d.sw||0),d.strokeColorAnim&&(Kr=d.sc?[d.sc[0],d.sc[1],d.sc[2]]:[0,0,0]),d.fillColorAnim&&d.fc&&(Tn=[d.fc[0],d.fc[1],d.fc[2]]),xe=0;xe<Pe;xe+=1)(rt=S[xe].a).a.propType&&((pt=S[xe].s.getMult(K[oe].anIndexes[xe],I.a[xe].s.totalChars)).length?y.translate(-rt.a.v[0]*pt[0],-rt.a.v[1]*pt[1],rt.a.v[2]*pt[2]):y.translate(-rt.a.v[0]*pt,-rt.a.v[1]*pt,rt.a.v[2]*pt));for(xe=0;xe<Pe;xe+=1)(rt=S[xe].a).s.propType&&((pt=S[xe].s.getMult(K[oe].anIndexes[xe],I.a[xe].s.totalChars)).length?y.scale(1+(rt.s.v[0]-1)*pt[0],1+(rt.s.v[1]-1)*pt[1],1):y.scale(1+(rt.s.v[0]-1)*pt,1+(rt.s.v[1]-1)*pt,1));for(xe=0;xe<Pe;xe+=1){if(rt=S[xe].a,pt=S[xe].s.getMult(K[oe].anIndexes[xe],I.a[xe].s.totalChars),rt.sk.propType&&(pt.length?y.skewFromAxis(-rt.sk.v*pt[0],rt.sa.v*pt[1]):y.skewFromAxis(-rt.sk.v*pt,rt.sa.v*pt)),rt.r.propType&&y.rotateZ(pt.length?-rt.r.v*pt[2]:-rt.r.v*pt),rt.ry.propType&&y.rotateY(pt.length?rt.ry.v*pt[1]:rt.ry.v*pt),rt.rx.propType&&y.rotateX(pt.length?rt.rx.v*pt[0]:rt.rx.v*pt),rt.o.propType&&(Es+=pt.length?(rt.o.v*pt[0]-Es)*pt[0]:(rt.o.v*pt-Es)*pt),d.strokeWidthAnim&&rt.sw.propType&&(Qs+=pt.length?rt.sw.v*pt[0]:rt.sw.v*pt),d.strokeColorAnim&&rt.sc.propType)for(sr=0;sr<3;sr+=1)Kr[sr]+=pt.length?(rt.sc.v[sr]-Kr[sr])*pt[0]:(rt.sc.v[sr]-Kr[sr])*pt;if(d.fillColorAnim&&d.fc){if(rt.fc.propType)for(sr=0;sr<3;sr+=1)Tn[sr]+=pt.length?(rt.fc.v[sr]-Tn[sr])*pt[0]:(rt.fc.v[sr]-Tn[sr])*pt;rt.fh.propType&&(Tn=addHueToRGB(Tn,pt.length?rt.fh.v*pt[0]:rt.fh.v*pt)),rt.fs.propType&&(Tn=addSaturationToRGB(Tn,pt.length?rt.fs.v*pt[0]:rt.fs.v*pt)),rt.fb.propType&&(Tn=addBrightnessToRGB(Tn,pt.length?rt.fb.v*pt[0]:rt.fb.v*pt))}}for(xe=0;xe<Pe;xe+=1)(rt=S[xe].a).p.propType&&(pt=S[xe].s.getMult(K[oe].anIndexes[xe],I.a[xe].s.totalChars),this._hasMaskedPath?pt.length?y.translate(0,rt.p.v[1]*pt[0],-rt.p.v[2]*pt[1]):y.translate(0,rt.p.v[1]*pt,-rt.p.v[2]*pt):pt.length?y.translate(rt.p.v[0]*pt[0],rt.p.v[1]*pt[1],-rt.p.v[2]*pt[2]):y.translate(rt.p.v[0]*pt,rt.p.v[1]*pt,-rt.p.v[2]*pt));if(d.strokeWidthAnim&&(Ps=Qs<0?0:Qs),d.strokeColorAnim&&(rr="rgb("+Math.round(255*Kr[0])+","+Math.round(255*Kr[1])+","+Math.round(255*Kr[2])+")"),d.fillColorAnim&&d.fc&&(pa="rgb("+Math.round(255*Tn[0])+","+Math.round(255*Tn[1])+","+Math.round(255*Tn[2])+")"),this._hasMaskedPath){if(y.translate(0,-d.ls),y.translate(0,v[1]*Rn*.01+ee,0),this._pathData.p.v){var Ls=180*Math.atan((se.point[1]-$.point[1])/(se.point[0]-$.point[0]))/Math.PI;se.point[0]<$.point[0]&&(Ls+=180),y.rotate(-Ls*Math.PI/180)}y.translate(ri,Gr,0),ce-=v[0]*K[oe].an*.005,K[oe+1]&&Hn!==K[oe+1].ind&&(ce+=K[oe].an/2,ce+=.001*d.tr*d.finalSize)}else{switch(y.translate(X,ee,0),d.ps&&y.translate(d.ps[0],d.ps[1]+d.ascent,0),d.j){case 1:y.translate(K[oe].animatorJustifyOffset+d.justifyOffset+(d.boxWidth-d.lineWidths[K[oe].line]),0,0);break;case 2:y.translate(K[oe].animatorJustifyOffset+d.justifyOffset+(d.boxWidth-d.lineWidths[K[oe].line])/2,0,0)}y.translate(0,-d.ls),y.translate(Li,0,0),y.translate(v[0]*K[oe].an*.005,v[1]*Rn*.01,0),X+=K[oe].l+.001*d.tr*d.finalSize}"html"===U?wr=y.toCSS():"svg"===U?wr=y.to2dCSS():ds=[y.props[0],y.props[1],y.props[2],y.props[3],y.props[4],y.props[5],y.props[6],y.props[7],y.props[8],y.props[9],y.props[10],y.props[11],y.props[12],y.props[13],y.props[14],y.props[15]],Rs=Es}q<=oe?(Ft=new LetterProps(Rs,Ps,rr,pa,wr,ds),this.renderedLetters.push(Ft),q+=1,this.lettersChangedFlag=!0):this.lettersChangedFlag=(Ft=this.renderedLetters[oe]).update(Rs,Ps,rr,pa,wr,ds)||this.lettersChangedFlag}}},TextAnimatorProperty.prototype.getValue=function(){this._elem.globalData.frameId!==this._frameId&&(this._frameId=this._elem.globalData.frameId,this.iterateDynamicProperties())},TextAnimatorProperty.prototype.mHelper=new Matrix,TextAnimatorProperty.prototype.defaultPropsArray=[],extendPrototype([DynamicPropertyContainer],TextAnimatorProperty),ITextElement.prototype.initElement=function(d,p,v){this.lettersChangedFlag=!0,this.initFrame(),this.initBaseData(d,p,v),this.textProperty=new TextProperty(this,d.t,this.dynamicProperties),this.textAnimator=new TextAnimatorProperty(d.t,this.renderType,this),this.initTransform(d,p,v),this.initHierarchy(),this.initRenderable(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),this.createContent(),this.hide(),this.textAnimator.searchProperties(this.dynamicProperties)},ITextElement.prototype.prepareFrame=function(d){this._mdf=!1,this.prepareRenderableFrame(d),this.prepareProperties(d,this.isInRange),(this.textProperty._mdf||this.textProperty._isFirstFrame)&&(this.buildNewText(),this.textProperty._isFirstFrame=!1,this.textProperty._mdf=!1)},ITextElement.prototype.createPathShape=function(d,p){var v,I,S=p.length,y="";for(v=0;v<S;v+=1)"sh"===p[v].ty&&(y+=buildShapeString(I=p[v].ks.k,I.i.length,!0,d));return y},ITextElement.prototype.updateDocumentData=function(d,p){this.textProperty.updateDocumentData(d,p)},ITextElement.prototype.canResizeFont=function(d){this.textProperty.canResizeFont(d)},ITextElement.prototype.setMinimumFontSize=function(d){this.textProperty.setMinimumFontSize(d)},ITextElement.prototype.applyTextPropertiesToMatrix=function(d,p,v,S,I){switch(d.ps&&p.translate(d.ps[0],d.ps[1]+d.ascent,0),p.translate(0,-d.ls,0),d.j){case 1:p.translate(d.justifyOffset+(d.boxWidth-d.lineWidths[v]),0,0);break;case 2:p.translate(d.justifyOffset+(d.boxWidth-d.lineWidths[v])/2,0,0)}p.translate(S,I,0)},ITextElement.prototype.buildColor=function(d){return"rgb("+Math.round(255*d[0])+","+Math.round(255*d[1])+","+Math.round(255*d[2])+")"},ITextElement.prototype.emptyProp=new LetterProps,ITextElement.prototype.destroy=function(){};
vendor: 6,156 bytes, line 83
83var emptyShapeData={shapes:[]};function SVGTextLottieElement(d,p,v){this.textSpans=[],this.renderType="svg",this.initElement(d,p,v)}function ISolidElement(d,p,v){this.initElement(d,p,v)}function NullElement(d,p,v){this.initFrame(),this.initBaseData(d,p,v),this.initFrame(),this.initTransform(d,p,v),this.initHierarchy()}function SVGRendererBase(){}function ICompElement(){}function SVGCompElement(d,p,v){this.layers=d.layers,this.supports3d=!0,this.completeLayers=!1,this.pendingElements=[],this.elements=this.layers?createSizedArray(this.layers.length):[],this.initElement(d,p,v),this.tm=d.tm?PropertyFactory.getProp(this,d.tm,0,p.frameRate,this):{_placeholder:!0}}function SVGRenderer(d,p){this.animationItem=d,this.layers=null,this.renderedFrame=-1,this.svgElement=createNS("svg");var v="";if(p&&p.title){var S=createNS("title"),I=createElementID();S.setAttribute("id",I),S.textContent=p.title,this.svgElement.appendChild(S),v+=I}if(p&&p.description){var y=createNS("desc"),U=createElementID();y.setAttribute("id",U),y.textContent=p.description,this.svgElement.appendChild(y),v+=" "+U}v&&this.svgElement.setAttribute("aria-labelledby",v);var q=createNS("defs");this.svgElement.appendChild(q);var X=createNS("g");this.svgElement.appendChild(X),this.layerElement=X,this.renderConfig={preserveAspectRatio:p&&p.preserveAspectRatio||"xMidYMid meet",imagePreserveAspectRatio:p&&p.imagePreserveAspectRatio||"xMidYMid slice",contentVisibility:p&&p.contentVisibility||"visible",progressiveLoad:p&&p.progressiveLoad||!1,hideOnTransparent:!(p&&!1===p.hideOnTransparent),viewBoxOnly:p&&p.viewBoxOnly||!1,viewBoxSize:p&&p.viewBoxSize||!1,className:p&&p.className||"",id:p&&p.id||"",focusable:p&&p.focusable,filterSize:{width:p&&p.filterSize&&p.filterSize.width||"100%",height:p&&p.filterSize&&p.filterSize.height||"100%",x:p&&p.filterSize&&p.filterSize.x||"0%",y:p&&p.filterSize&&p.filterSize.y||"0%"},width:p&&p.width,height:p&&p.height,runExpressions:!p||void 0===p.runExpressions||p.runExpressions},this.globalData={_mdf:!1,frameNum:-1,defs:q,renderConfig:this.renderConfig},this.elements=[],this.pendingElements=[],this.destroyed=!1,this.rendererType="svg"}function CVContextData(){var d;for(this.saved=[],this.cArrPos=0,this.cTr=new Matrix,this.cO=1,this.savedOp=createTypedArray("float32",15),d=0;d<15;d+=1)this.saved[d]=createTypedArray("float32",16);this._length=15}function ShapeTransformManager(){this.sequences={},this.sequenceList=[],this.transform_key_count=0}extendPrototype([BaseElement,TransformElement,SVGBaseElement,HierarchyElement,FrameElement,RenderableDOMElement,ITextElement],SVGTextLottieElement),SVGTextLottieElement.prototype.createContent=function(){this.data.singleShape&&!this.globalData.fontManager.chars&&(this.textContainer=createNS("text"))},SVGTextLottieElement.prototype.buildTextContents=function(d){for(var p=0,v=d.length,S=[],I="";p<v;)"\r"===d[p]||"\x03"===d[p]?(S.push(I),I=""):I+=d[p],p+=1;return S.push(I),S},SVGTextLottieElement.prototype.buildShapeData=function(d,p){if(d.shapes&&d.shapes.length){var v=d.shapes[0];if(v.it){var S=v.it[v.it.length-1];S.s&&(S.s.k[0]=p,S.s.k[1]=p)}}return d},SVGTextLottieElement.prototype.buildNewText=function(){this.addDynamicProperty(this);var d,p,v=this.textProperty.currentData;this.renderedLetters=createSizedArray(v?v.l.length:0),this.layerElement.setAttribute("fill",v.fc?this.buildColor(v.fc):"rgba(0,0,0,0)"),v.sc&&(this.layerElement.setAttribute("stroke",this.buildColor(v.sc)),this.layerElement.setAttribute("stroke-width",v.sw)),this.layerElement.setAttribute("font-size",v.finalSize);var S=this.globalData.fontManager.getFontByName(v.f);if(S.fClass)this.layerElement.setAttribute("class",S.fClass);else{this.layerElement.setAttribute("font-family",S.fFamily);var I=v.fWeight;this.layerElement.setAttribute("font-style",v.fStyle),this.layerElement.setAttribute("font-weight",I)}this.layerElement.setAttribute("aria-label",v.t);var U=v.l||[],q=!!this.globalData.fontManager.chars;p=U.length;var X,ee=this.mHelper,me=this.data.singleShape,K=0,le=0,ce=!0,se=.001*v.tr*v.finalSize;if(!me||q||v.sz){var $,j=this.textSpans.length;for(d=0;d<p;d+=1){if(this.textSpans[d]||(this.textSpans[d]={span:null,childSpan:null,glyph:null}),!q||!me||0===d){if(X=j>d?this.textSpans[d].span:createNS(q?"g":"text"),j<=d){if(X.setAttribute("stroke-linecap","butt"),X.setAttribute("stroke-linejoin","round"),X.setAttribute("stroke-miterlimit","4"),this.textSpans[d].span=X,q){var ue=createNS("g");X.appendChild(ue),this.textSpans[d].childSpan=ue}this.textSpans[d].span=X,this.layerElement.appendChild(X)}X.style.display="inherit"}if(ee.reset(),me&&(U[d].n&&(K=-se,le+=v.yOffset,le+=ce?1:0,ce=!1),this.applyTextPropertiesToMatrix(v,ee,U[d].line,K,le),K+=U[d].l||0,K+=se),q){var _e;if(1===($=this.globalData.fontManager.getCharData(v.finalText[d],S.fStyle,this.globalData.fontManager.getFontByName(v.f).fFamily)).t)_e=new SVGCompElement($.data,this.globalData,this);else{var we=emptyShapeData;$.data&&$.data.shapes&&(we=this.buildShapeData($.data,v.finalSize)),_e=new SVGShapeElement(we,this.globalData,this)}if(this.textSpans[d].glyph){var Oe=this.textSpans[d].glyph;this.textSpans[d].childSpan.removeChild(Oe.layerElement),Oe.destroy()}this.textSpans[d].glyph=_e,_e._debug=!0,_e.prepareFrame(0),_e.renderFrame(),this.textSpans[d].childSpan.appendChild(_e.layerElement),1===$.t&&this.textSpans[d].childSpan.setAttribute("transform","scale("+v.finalSize/100+","+v.finalSize/100+")")}else me&&X.setAttribute("transform","translate("+ee.props[12]+","+ee.props[13]+")"),X.textContent=U[d].val,X.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve")}me&&X&&X.setAttribute("d","")}else{var be=this.textContainer,ae="start";switch(v.j){case 1:ae="end";break;case 2:ae="middle";break;default:ae="start"}be.setAttribute("text-anchor",ae),be.setAttribute("letter-spacing",se);var re=this.buildTextContents(v.finalText);for(p=re.length,le=v.ps?v.ps[1]+v.ascent:0,d=0;d<p;d+=1)(X=this.textSpans[d].span||createNS("tspan")).textContent=re[d],X.setAttribute("x",0),X.setAttribute("y",le),X.style.display="inherit",be.appendChild(X),this.textSpans[d]||(this.textSpans[d]={span:null,glyph:null}
vendor: 6,619 bytes, line 83
83),this.textSpans[d].span=X,le+=v.finalLineHeight;this.layerElement.appendChild(be)}for(;d<this.textSpans.length;)this.textSpans[d].span.style.display="none",d+=1;this._sizeChanged=!0},SVGTextLottieElement.prototype.sourceRectAtTime=function(){if(this.prepareFrame(this.comp.renderedFrame-this.data.st),this.renderInnerContent(),this._sizeChanged){this._sizeChanged=!1;var d=this.layerElement.getBBox();this.bbox={top:d.y,left:d.x,width:d.width,height:d.height}}return this.bbox},SVGTextLottieElement.prototype.getValue=function(){var d,v,p=this.textSpans.length;for(this.renderedFrame=this.comp.renderedFrame,d=0;d<p;d+=1)(v=this.textSpans[d].glyph)&&(v.prepareFrame(this.comp.renderedFrame-this.data.st),v._mdf&&(this._mdf=!0))},SVGTextLottieElement.prototype.renderInnerContent=function(){if((!this.data.singleShape||this._mdf)&&(this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag),this.lettersChangedFlag||this.textAnimator.lettersChangedFlag)){this._sizeChanged=!0;var d,p,I,y,U,v=this.textAnimator.renderedLetters,S=this.textProperty.currentData.l;for(p=S.length,d=0;d<p;d+=1)S[d].n||(I=v[d],y=this.textSpans[d].span,(U=this.textSpans[d].glyph)&&U.renderFrame(),I._mdf.m&&y.setAttribute("transform",I.m),I._mdf.o&&y.setAttribute("opacity",I.o),I._mdf.sw&&y.setAttribute("stroke-width",I.sw),I._mdf.sc&&y.setAttribute("stroke",I.sc),I._mdf.fc&&y.setAttribute("fill",I.fc))}},extendPrototype([IImageElement],ISolidElement),ISolidElement.prototype.createContent=function(){var d=createNS("rect");d.setAttribute("width",this.data.sw),d.setAttribute("height",this.data.sh),d.setAttribute("fill",this.data.sc),this.layerElement.appendChild(d)},NullElement.prototype.prepareFrame=function(d){this.prepareProperties(d,!0)},NullElement.prototype.renderFrame=function(){},NullElement.prototype.getBaseElement=function(){return null},NullElement.prototype.destroy=function(){},NullElement.prototype.sourceRectAtTime=function(){},NullElement.prototype.hide=function(){},extendPrototype([BaseElement,TransformElement,HierarchyElement,FrameElement],NullElement),extendPrototype([BaseRenderer],SVGRendererBase),SVGRendererBase.prototype.createNull=function(d){return new NullElement(d,this.globalData,this)},SVGRendererBase.prototype.createShape=function(d){return new SVGShapeElement(d,this.globalData,this)},SVGRendererBase.prototype.createText=function(d){return new SVGTextLottieElement(d,this.globalData,this)},SVGRendererBase.prototype.createImage=function(d){return new IImageElement(d,this.globalData,this)},SVGRendererBase.prototype.createSolid=function(d){return new ISolidElement(d,this.globalData,this)},SVGRendererBase.prototype.configAnimation=function(d){this.svgElement.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.svgElement.setAttribute("xmlns:xlink","http://www.w3.org/1999/xlink"),this.svgElement.setAttribute("viewBox",this.renderConfig.viewBoxSize?this.renderConfig.viewBoxSize:"0 0 "+d.w+" "+d.h),this.renderConfig.viewBoxOnly||(this.svgElement.setAttribute("width",d.w),this.svgElement.setAttribute("height",d.h),this.svgElement.style.width="100%",this.svgElement.style.height="100%",this.svgElement.style.transform="translate3d(0,0,0)",this.svgElement.style.contentVisibility=this.renderConfig.contentVisibility),this.renderConfig.width&&this.svgElement.setAttribute("width",this.renderConfig.width),this.renderConfig.height&&this.svgElement.setAttribute("height",this.renderConfig.height),this.renderConfig.className&&this.svgElement.setAttribute("class",this.renderConfig.className),this.renderConfig.id&&this.svgElement.setAttribute("id",this.renderConfig.id),void 0!==this.renderConfig.focusable&&this.svgElement.setAttribute("focusable",this.renderConfig.focusable),this.svgElement.setAttribute("preserveAspectRatio",this.renderConfig.preserveAspectRatio),this.animationItem.wrapper.appendChild(this.svgElement);var p=this.globalData.defs;this.setupGlobalData(d,p),this.globalData.progressiveLoad=this.renderConfig.progressiveLoad,this.data=d;var v=createNS("clipPath"),S=createNS("rect");S.setAttribute("width",d.w),S.setAttribute("height",d.h),S.setAttribute("x",0),S.setAttribute("y",0);var I=createElementID();v.setAttribute("id",I),v.appendChild(S),this.layerElement.setAttribute("clip-path","url("+getLocationHref()+"#"+I+")"),p.appendChild(v),this.layers=d.layers,this.elements=createSizedArray(d.layers.length)},SVGRendererBase.prototype.destroy=function(){this.animationItem.wrapper&&(this.animationItem.wrapper.innerText=""),this.layerElement=null,this.globalData.defs=null;var d,p=this.layers?this.layers.length:0;for(d=0;d<p;d+=1)this.elements[d]&&this.elements[d].destroy&&this.elements[d].destroy();this.elements.length=0,this.destroyed=!0,this.animationItem=null},SVGRendererBase.prototype.updateContainerSize=function(){},SVGRendererBase.prototype.findIndexByInd=function(d){var p=0,v=this.layers.length;for(p=0;p<v;p+=1)if(this.layers[p].ind===d)return p;return-1},SVGRendererBase.prototype.buildItem=function(d){var p=this.elements;if(!p[d]&&99!==this.layers[d].ty){p[d]=!0;var v=this.createItem(this.layers[d]);if(p[d]=v,getExpressionsPlugin()&&(0===this.layers[d].ty&&this.globalData.projectInterface.registerComposition(v),v.initExpressions()),this.appendElementInPos(v,d),this.layers[d].tt){var S="tp"in this.layers[d]?this.findIndexByInd(this.layers[d].tp):d-1;if(-1===S)return;if(this.elements[S]&&!0!==this.elements[S]){var y=p[S].getMatte(this.layers[d].tt);v.setMatte(y)}else this.buildItem(S),this.addPendingElement(v)}}},SVGRendererBase.prototype.checkPendingElements=function(){for(;this.pendingElements.length;){var d=this.pendingElements.pop();if(d.checkParenting(),d.data.tt)for(var p=0,v=this.elements.length;p<v;){if(this.elements[p]===d){var S="tp"in d.data?this.findIndexByInd(d.data.tp):p-1,y=this.elements[S].getMatte(this.layers[p].tt);d.setMatte(y);break}p+=1}}},SVGRendererBase.prototype.renderFrame=function(d){if(this.renderedFrame!==d&&!this.destroyed){null===d?d=this.renderedFrame:this.renderedFrame=d,this.globalData.frameNum=d,this.globalData.frameId+=1,this.globalData.projectInterface.currentFrame=d,this.globalData._mdf=!1;var p,v=this.layers.length;for(this.completeLayers||this.checkLayers(d),p=v-1;p>=0;p-=1)(this.completeLayers||this.elements[p])&&this.elements[p].prepareFrame(d-this.layers[p].st);if(this.globalData._mdf)for(p=0;p<v;p+=1)(this.completeLayers||this.elements[p])&&this.elements[p].renderFrame()}},SVGRendererBase.prototype.appendElementInPos=function(d,p){var v=d.getBaseElement();if(v){for(var I,S=0;S<p;)this.elements[S]&&!0!==this.elements[S]&&this.elements[S].getBaseElement()&&
83(I=this.elements[S].getBaseElement()),S+=1;I?this.layerElement.insertBefore(v,I):this.layerElement.appendChild(v)}},SVGRendererBase.prototype.hide=function(){this.layerElement.style.display="none"},SVGRendererBase.prototype.show=function(){this.layerElement.style.display="block"},extendPrototype([BaseElement,TransformElement,HierarchyElement,FrameElement,RenderableDOMElement],ICompElement),ICompElement.prototype.initElement=function(d,p,v){this.initFrame(),this.initBaseData(d,p,v),this.initTransform(d,p,v),this.initRenderable(),this.initHierarchy(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),(this.data.xt||!p.progressiveLoad)&&this.buildAllItems(),this.hide()},ICompElement.prototype.prepareFrame=function(d){if(this._mdf=!1,this.prepareRenderableFrame(d),this.prepareProperties(d,this.isInRange),this.isInRange||this.data.xt){if(this.tm._placeholder)this.renderedFrame=d/this.data.sr;else{var p=this.tm.v;p===this.data.op&&(p=this.data.op-1),this.renderedFrame=p}var v,S=this.elements.length;for(this.completeLayers||this.checkLayers(this.renderedFrame),v=S-1;v>=0;v-=1)(this.completeLayers||this.elements[v])&&(this.elements[v].prepareFrame(this.renderedFrame-this.layers[v].st),this.elements[v]._mdf&&(this._mdf=!0))}},ICompElement.prototype.renderInnerContent=function(){var d,p=this.layers.length;for(d=0;d<p;d+=1)(this.completeLayers||this.elements[d])&&this.elements[d].renderFrame()},ICompElement.prototype.setElements=function(d){this.elements=d},ICompElement.prototype.getElements=function(){return this.elements},ICompElement.prototype.destroyElements=function(){var d,p=this.layers.length;for(d=0;d<p;d+=1)this.elements[d]&&this.elements[d].destroy()},ICompElement.prototype.destroy=function(){this.destroyElements(),this.destroyBaseElement()},extendPrototype([SVGRendererBase,ICompElement,SVGBaseElement],SVGCompElement),SVGCompElement.prototype.createComp=function(d){return new SVGCompElement(d,this.globalData,this)},extendPrototype([SVGRendererBase],SVGRenderer),SVGRenderer.prototype.createComp=function(d){return new SVGCompElement(d,this.globalData,this)},CVContextData.prototype.duplicate=function(){var d=2*this._length,p=this.savedOp;this.savedOp=createTypedArray("float32",d),this.savedOp.set(p);var v=0;for(v=this._length;v<d;v+=1)this.saved[v]=createTypedArray("float32",16);this._length=d},CVContextData.prototype.reset=function(){this.cArrPos=0,this.cTr.reset(),this.cO=1},CVContextData.prototype.popTransform=function(){var p,d=this.saved[this.cArrPos],v=this.cTr.props;for(p=0;p<16;p+=1)v[p]=d[p];return d},CVContextData.prototype.popOpacity=function(){var d=this.savedOp[this.cArrPos];return this.cO=d,d},CVContextData.prototype.pop=function(){return this.cArrPos-=1,{transform:this.popTransform(),opacity:this.popOpacity()}},CVContextData.prototype.push=function(){var d=this.cTr.props;this._length<=this.cArrPos&&this.duplicate();var p,v=this.saved[this.cArrPos];for(p=0;p<16;p+=1)v[p]=d[p];this.savedOp[this.cArrPos]=this.cO,this.cArrPos+=1},CVContextData.prototype.getTransform=function(){return this.cTr},CVContextData.prototype.getOpacity=function(){return this.cO},CVContextData.prototype.setOpacity=function(d){this.cO=d},ShapeTransformManager.prototype={addTransformSequence:function(p){var v,S=p.length,I="_";for(v=0;v<S;v+=1)I+=p[v].transform.key+"_";var y=this.sequences[I];return y||(y={transforms:[].concat(p),finalTransform:new Matrix,_mdf:!1},this.sequences[I]=y,this.sequenceList.push(y)),y},processSequence:function(p,v){for(var S=0,I=p.transforms.length,y=v;S<I&&!v;){if(p.transforms[S].transform.mProps._mdf){y=!0;break}S+=1}var U;if(y)for(p.finalTransform.reset(),S=I-1;S>=0;S-=1)p.finalTransform.transform((U=p.transforms[S].transform.mProps.v.props)[0],U[1],U[2],U[3],U[4],U[5],U[6],U[7],U[8],U[9],U[10],U[11],U[12],U[13],U[14],U[15]);p._mdf=y},processSequences:function(p){var v,S=this.sequenceList.length;for(v=0;v<S;v+=1)this.processSequence(this.sequenceList[v],p)},getNewKey:function(){return this.transform_key_count+=1,"_"+this.transform_key_count}};var lumaLoader=function(){var p="__lottie_element_luma_buffer",v=null,S=null,I=null;function U(){v||(I=function y(){var X=createNS("svg"),ee=createNS("filter"),oe=createNS("feColorMatrix");return ee.setAttribute("id",p),oe.setAttribute("type","matrix"),oe.setAttribute("color-interpolation-filters","sRGB"),oe.setAttribute("values","0.3, 0.3, 0.3, 0, 0, 0.3, 0.3, 0.3, 0, 0, 0.3, 0.3, 0.3, 0, 0, 0.3, 0.3, 0.3, 0, 0"),ee.appendChild(oe),X.appendChild(ee),X.setAttribute("id",p+"_svg"),featureSupport.svgLumaHidden&&(X.style.display="none"),X}(),document.body.appendChild(I),v=createTag("canvas"),(S=v.getContext("2d")).filter="url
83(#"+p+")",S.fillStyle="rgba(0,0,0,0)",S.fillRect(0,0,1,1))}return{load:U,get:function q(X){return v||U(),v.width=X.width,v.height=X.height,S.filter="url(#"+p+")",v}}};function createCanvas(d,p){if(featureSupport.offscreenCanvas)return new OffscreenCanvas(d,p);var v=createTag("canvas");return v.width=d,v.height=p,v}var assetLoader={loadLumaCanvas:lumaLoader.load,getLumaCanvas:lumaLoader.get,createCanvas};function CVEffects(){}function CVMaskElement(d,p){this.data=d,this.element=p,this.masksProperties=this.data.masksProperties||[],this.viewData=createSizedArray(this.masksProperties.length);var v,S=this.masksProperties.length,I=!1;for(v=0;v<S;v+=1)"n"!==this.masksProperties[v].mode&&(I=!0),this.viewData[v]=ShapePropertyFactory.getShapeProp(this.element,this.masksProperties[v],3);this.hasMasks=I,I&&this.element.addRenderableComponent(this)}function CVBaseElement(){}CVEffects.prototype.renderFrame=function(){},CVMaskElement.prototype.renderFrame=function(){if(this.hasMasks){var v,I,y,U,d=this.element.finalTransform.mat,p=this.element.canvasContext,S=this.masksProperties.length;for(p.beginPath(),v=0;v<S;v+=1)if("n"!==this.masksProperties[v].mode){this.masksProperties[v].inv&&(p.moveTo(0,0),p.lineTo(this.element.globalData.compSize.w,0),p.lineTo(this.element.globalData.compSize.w,this.element.globalData.compSize.h),p.lineTo(0,this.element.globalData.compSize.h),p.lineTo(0,0)),I=d.applyToPointArray((U=this.viewData[v].v).v[0][0],U.v[0][1],0),p.moveTo(I[0],I[1]);var q,X=U._length;for(q=1;q<X;q+=1)y=d.applyToTriplePoints(U.o[q-1],U.i[q],U.v[q]),p.bezierCurveTo(y[0],y[1],y[2],y[3],y[4],y[5]);y=d.applyToTriplePoints(U.o[q-1],U.i[0],U.v[0]),p.bezierCurveTo(y[0],y[1],y[2],y[3],y[4],y[5])}this.element.globalData.renderer.save(!0),p.clip()}},CVMaskElement.prototype.getMaskProperty=MaskElement.prototype.getMaskProperty,CVMaskElement.prototype.destroy=function(){this.element=null};var operationsMap={1:"source-in",2:"source-out",3:"source-in",4:"source-out"};function CVShapeData(d,p,v,S){this.styledShapes=[],this.tr=[0,0,0,0,0,0];var I=4;"rc"===p.ty?I=5:"el"===p.ty?I=6:"sr"===p.ty&&(I=7),this.sh=ShapePropertyFactory.getShapeProp(d,p,I,d);var y,q,U=v.length;for(y=0;y<U;y+=1)v[y].closed||(q={transforms:S.addTransformSequence(v[y].transforms),trNodes:[]},this.styledShapes.push(q),v[y].elements.push(q))}function CVShapeElement(d,p,v){this.shapes=[],this.shapesData=d.shapes,this.stylesList=[],this.itemsData=[],this.prevViewData=[],this.shapeModifiers=[],this.processedElements=[],this.transformsManager=new ShapeTransformManager,this.initElement(d,p,v)}function CVTextElement(d,p,v){this.textSpans=[],this.yOffset=0,this.fillColorAnim=!1,this.strokeColorAnim=!1,this.strokeWidthAnim=!1,this.stroke=!1,this.fill=!1,this.justifyOffset=0,this.currentRender=null,this.renderType="canvas",this.values={fill:"rgba(0,0,0,0)",stroke:"rgba(0,0,0,0)",sWidth:0,fValue:""},this.initElement(d,p,v)}function CVImageElement(d,p,v){this.assetData=p.getAssetData(d.refId),this.img=p.imageLoader.getAsset(this.assetData),this.initElement(d,p,v)}function CVSolidElement(d,p,v){this.initElement(d,p,v)}function CanvasRendererBase(d,p){this.animationItem=d,this.renderConfig={clearCanvas:!p||void 0===p.clearCanvas||p.clearCanvas,context:p&&p.context||null,progressiveLoad:p&&p.progressiveLoad||!1,preserveAspectRatio:p&&p.preserveAspectRatio||"xMidYMid meet",imagePreserveAspectRatio:p&&p.imagePreserveAspectRatio||"xMidYMid slice",contentVisibility:p&&p.contentVisibility||"visible",className:p&&p.className||"",id:p&&p.id||""},this.renderConfig.dpr=p&&p.dpr||1,this.animationItem.wrapper&&(this.renderConfig.dpr=p&&p.dpr||window.devicePixelRatio||1),this.renderedFrame=-1,this.globalData={frameNum:-1,_mdf:!1,renderConfig:this.renderConfig,currentGlobalAlpha:-1},this.contextData=new CVContextData,this.elements=[],this.pendingElements=[],this.transformMat=ne
vendor: 1,135 bytes, line 83
83w Matrix,this.completeLayers=!1,this.rendererType="canvas"}function CVCompElement(d,p,v){this.completeLayers=!1,this.layers=d.layers,this.pendingElements=[],this.elements=createSizedArray(this.layers.length),this.initElement(d,p,v),this.tm=d.tm?PropertyFactory.getProp(this,d.tm,0,p.frameRate,this):{_placeholder:!0}}function CanvasRenderer(d,p){this.animationItem=d,this.renderConfig={clearCanvas:!p||void 0===p.clearCanvas||p.clearCanvas,context:p&&p.context||null,progressiveLoad:p&&p.progressiveLoad||!1,preserveAspectRatio:p&&p.preserveAspectRatio||"xMidYMid meet",imagePreserveAspectRatio:p&&p.imagePreserveAspectRatio||"xMidYMid slice",contentVisibility:p&&p.contentVisibility||"visible",className:p&&p.className||"",id:p&&p.id||"",runExpressions:!p||void 0===p.runExpressions||p.runExpressions},this.renderConfig.dpr=p&&p.dpr||1,this.animationItem.wrapper&&(this.renderConfig.dpr=p&&p.dpr||window.devicePixelRatio||1),this.renderedFrame=-1,this.globalData={frameNum:-1,_mdf:!1,renderConfig:this.renderConfig,currentGlobalAlpha:-1},this.contextData=new CVContextData,this.elements=[],this.pendingElements=[],this.transformMat=ne
vendor: 4,346 bytes, line 83
83w Matrix,this.completeLayers=!1,this.rendererType="canvas"}function HBaseElement(){}function HSolidElement(d,p,v){this.initElement(d,p,v)}function HShapeElement(d,p,v){this.shapes=[],this.shapesData=d.shapes,this.stylesList=[],this.shapeModifiers=[],this.itemsData=[],this.processedElements=[],this.animatedContents=[],this.shapesContainer=createNS("g"),this.initElement(d,p,v),this.prevViewData=[],this.currentBBox={x:999999,y:-999999,h:0,w:0}}function HTextElement(d,p,v){this.textSpans=[],this.textPaths=[],this.currentBBox={x:999999,y:-999999,h:0,w:0},this.renderType="svg",this.isMasked=!1,this.initElement(d,p,v)}function HCameraElement(d,p,v){this.initFrame(),this.initBaseData(d,p,v),this.initHierarchy();var S=PropertyFactory.getProp;if(this.pe=S(this,d.pe,0,0,this),d.ks.p.s?(this.px=S(this,d.ks.p.x,1,0,this),this.py=S(this,d.ks.p.y,1,0,this),this.pz=S(this,d.ks.p.z,1,0,this)):this.p=S(this,d.ks.p,1,0,this),d.ks.a&&(this.a=S(this,d.ks.a,1,0,this)),d.ks.or.k.length&&d.ks.or.k[0].to){var I,y=d.ks.or.k.length;for(I=0;I<y;I+=1)d.ks.or.k[I].to=null,d.ks.or.k[I].ti=null}this.or=S(this,d.ks.or,1,degToRads,this),this.or.sh=!0,this.rx=S(this,d.ks.rx,0,degToRads,this),this.ry=S(this,d.ks.ry,0,degToRads,this),this.rz=S(this,d.ks.rz,0,degToRads,this),this.mat=new Matrix,this._prevMat=new Matrix,this._isFirstFrame=!0,this.finalTransform={mProp:this}}function HImageElement(d,p,v){this.assetData=p.getAssetData(d.refId),this.initElement(d,p,v)}function HybridRendererBase(d,p){this.animationItem=d,this.layers=null,this.renderedFrame=-1,this.renderConfig={className:p&&p.className||"",imagePreserveAspectRatio:p&&p.imagePreserveAspectRatio||"xMidYMid slice",hideOnTransparent:!(p&&!1===p.hideOnTransparent),filterSize:{width:p&&p.filterSize&&p.filterSize.width||"400%",height:p&&p.filterSize&&p.filterSize.height||"400%",x:p&&p.filterSize&&p.filterSize.x||"-100%",y:p&&p.filterSize&&p.filterSize.y||"-100%"}},this.globalData={_mdf:!1,frameNum:-1,renderConfig:this.renderConfig},this.pendingElements=[],this.elements=[],this.threeDElements=[],this.destroyed=!1,this.camera=null,this.supports3d=!0,this.rendererType="html"}function HCompElement(d,p,v){this.layers=d.layers,this.supports3d=!d.hasMask,this.completeLayers=!1,this.pendingElements=[],this.elements=this.layers?createSizedArray(this.layers.length):[],this.initElement(d,p,v),this.tm=d.tm?PropertyFactory.getProp(this,d.tm,0,p.frameRate,this):{_placeholder:!0}}function HybridRenderer(d,p){this.animationItem=d,this.layers=null,this.renderedFrame=-1,this.renderConfig={className:p&&p.className||"",imagePreserveAspectRatio:p&&p.imagePreserveAspectRatio||"xMidYMid slice",hideOnTransparent:!(p&&!1===p.hideOnTransparent),filterSize:{width:p&&p.filterSize&&p.filterSize.width||"400%",height:p&&p.filterSize&&p.filterSize.height||"400%",x:p&&p.filterSize&&p.filterSize.x||"-100%",y:p&&p.filterSize&&p.filterSize.y||"-100%"},runExpressions:!p||void 0===p.runExpressions||p.runExpressions},this.globalData={_mdf:!1,frameNum:-1,renderConfig:this.renderConfig},this.pendingElements=[],this.elements=[],this.threeDElements=[],this.destroyed=!1,this.camera=null,this.supports3d=!0,this.rendererType="html"}CVBaseElement.prototype={createElements:function(){},initRendererElement:function(){},createContainerElements:function(){if(this.data.tt>=1){this.buffers=[];var p=this.globalData.canvasContext,v=assetLoader.createCanvas(p.canvas.width,p.canvas.height);this.buffers.push(v);var S=assetLoader.createCanvas(p.canvas.width,p.canvas.height);this.buffers.push(S),this.data.tt>=3&&!document._isProxy&&assetLoader.loadLumaCanvas()}this.canvasContext=this.globalData.canvasContext,this.transformCanvas=this.globalData.transformCanvas,this.renderableEffectsManager=new CVEffects(this)},createContent:function(){},setBlendMode:function(){var p=this.globalData;if(p.blendMode!==this.data.bm){p.blendMode=this.data.bm;var v=getBlendMode(this.data.bm);p.canvasContext.globalCompositeOperation=v}},createRenderableComponents:function(){this.maskManager=new CVMaskElement(this.data,this)},hideElement:function(){!this.hidden&&(!this.isInRange||this.isTransparent)&&(this.hidden=!0)},showElement:function(){this.isInRange&&!this.isTransparent&&(this.hidden=!1,this._isFirstFrame=!0,this.maskManager._isFirstFrame=!0)},clearCanvas:function(p){p.clearRect(this.transformCanvas.tx,this.transformCanvas.t
vendor: 5,298 bytes, line 83
83y,this.transformCanvas.w*this.transformCanvas.sx,this.transformCanvas.h*this.transformCanvas.sy)},prepareLayer:function(){if(this.data.tt>=1){var v=this.buffers[0].getContext("2d");this.clearCanvas(v),v.drawImage(this.canvasContext.canvas,0,0),this.currentTransform=this.canvasContext.getTransform(),this.canvasContext.setTransform(1,0,0,1,0,0),this.clearCanvas(this.canvasContext),this.canvasContext.setTransform(this.currentTransform)}},exitLayer:function(){if(this.data.tt>=1){var p=this.buffers[1],v=p.getContext("2d");if(this.clearCanvas(v),v.drawImage(this.canvasContext.canvas,0,0),this.canvasContext.setTransform(1,0,0,1,0,0),this.clearCanvas(this.canvasContext),this.canvasContext.setTransform(this.currentTransform),this.comp.getElementById("tp"in this.data?this.data.tp:this.data.ind-1).renderFrame(!0),this.canvasContext.setTransform(1,0,0,1,0,0),this.data.tt>=3&&!document._isProxy){var I=assetLoader.getLumaCanvas(this.canvasContext.canvas);I.getContext("2d").drawImage(this.canvasContext.canvas,0,0),this.clearCanvas(this.canvasContext),this.canvasContext.drawImage(I,0,0)}this.canvasContext.globalCompositeOperation=operationsMap[this.data.tt],this.canvasContext.drawImage(p,0,0),this.canvasContext.globalCompositeOperation="destination-over",this.canvasContext.drawImage(this.buffers[0],0,0),this.canvasContext.setTransform(this.currentTransform),this.canvasContext.globalCompositeOperation="source-over"}},renderFrame:function(p){if(!this.hidden&&!this.data.hd&&(1!==this.data.td||p)){this.renderTransform(),this.renderRenderable(),this.setBlendMode();var v=0===this.data.ty;this.prepareLayer(),this.globalData.renderer.save(v),this.globalData.renderer.ctxTransform(this.finalTransform.mat.props),this.globalData.renderer.ctxOpacity(this.finalTransform.mProp.o.v),this.renderInnerContent(),this.globalData.renderer.restore(v),this.exitLayer(),this.maskManager.hasMasks&&this.globalData.renderer.restore(!0),this._isFirstFrame&&(this._isFirstFrame=!1)}},destroy:function(){this.canvasContext=null,this.data=null,this.globalData=null,this.maskManager.destroy()},mHelper:new Matrix},CVBaseElement.prototype.hide=CVBaseElement.prototype.hideElement,CVBaseElement.prototype.show=CVBaseElement.prototype.showElement,CVShapeData.prototype.setAsAnimated=SVGShapeData.prototype.setAsAnimated,extendPrototype([BaseElement,TransformElement,CVBaseElement,IShapeElement,HierarchyElement,FrameElement,RenderableElement],CVShapeElement),CVShapeElement.prototype.initElement=RenderableDOMElement.prototype.initElement,CVShapeElement.prototype.transformHelper={opacity:1,_opMdf:!1},CVShapeElement.prototype.dashResetter=[],CVShapeElement.prototype.createContent=function(){this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,!0,[])},CVShapeElement.prototype.createStyleElement=function(d,p){var v={data:d,type:d.ty,preTransforms:this.transformsManager.addTransformSequence(p),transforms:[],elements:[],closed:!0===d.hd},S={};if("fl"===d.ty||"st"===d.ty?(S.c=PropertyFactory.getProp(this,d.c,1,255,this),S.c.k||(v.co="rgb("+bmFloor(S.c.v[0])+","+bmFloor(S.c.v[1])+","+bmFloor(S.c.v[2])+")")):("gf"===d.ty||"gs"===d.ty)&&(S.s=PropertyFactory.getProp(this,d.s,1,null,this),S.e=PropertyFactory.getProp(this,d.e,1,null,this),S.h=PropertyFactory.getProp(this,d.h||{k:0},0,.01,this),S.a=PropertyFactory.getProp(this,d.a||{k:0},0,degToRads,this),S.g=new GradientProperty(this,d.g,this)),S.o=PropertyFactory.getProp(this,d.o,0,.01,this),"st"===d.ty||"gs"===d.ty){if(v.lc=lineCapEnum[d.lc||2],v.lj=lineJoinEnum[d.lj||2],1==d.lj&&(v.ml=d.ml),S.w=PropertyFactory.getProp(this,d.w,0,null,this),S.w.k||(v.wi=S.w.v),d.d){var I=new DashProperty(this,d.d,"canvas",this);S.d=I,S.d.k||(v.da=S.d.dashArray,v.do=S.d.dashoffset[0])}}else v.r=2===d.r?"evenodd":"nonzero";return this.stylesList.push(v),S.style=v,S},CVShapeElement.prototype.createGroupElement=function(){return{it:[],prevViewData:[]}},CVShapeElement.prototype.createTransformElement=function(d){return{transform:{opacity:1,_opMdf:!1,key:this.transformsManager.getNewKey(),op:PropertyFactory.getProp(this,d.o,0,.01,this),mProps:TransformPropertyFactory.getTransformProperty(this,d,this)}}},CVShapeElement.prototype.createShapeElement=function(d){var p=new CVShapeData(this,d,this.stylesList,this.transformsManager);return this.shapes.push(p),this.addShapeToModifiers(p),p},CVShapeElement.prototype.reloadShapes=function(){this._isFirstFrame=!0;var d,p=this.itemsData.length;for(d=0;d<p;d+=1)this.prevViewData[d]=this.itemsData[d];for(this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,!0,[]),p=this.dynamicProperties.length,d=0;d<p;d+=1)this.dynamicProperties[d].getValue();this.renderModifiers(),this.transformsManager.processSequences(this._isFirstFrame)},CVShapeElement.prototype.addTransformToStyleList=function(d){var p,v=this.stylesList.length;for(p=0;p<v;p+=1)this.stylesList[p].closed||this.stylesList[p].transforms.push(d)},CVShapeElement.prototype.removeTransformFromStyleList=function(){var d,p=this.stylesList.length;for(d=0;d<p;d+=1)this.stylesList[d].closed||this.stylesList[d].transforms.pop()},CVShapeElement.prototype.closeStyles=function(d){var p,v=d.length;for(p=0;p<v;p+=1)d[p].closed=!0},CVShapeElement.prototype.searchShapes=function(d,p,v,S,I){var y,q,X,me,K,le,U=d.length-1,ee=[],oe=[],ce=[].concat(I
vendor: 5,977 bytes, line 83
83);for(y=U;y>=0;y-=1){if((me=this.searchProcessedElement(d[y]))?p[y]=v[me-1]:d[y]._shouldRender=S,"fl"===d[y].ty||"st"===d[y].ty||"gf"===d[y].ty||"gs"===d[y].ty)me?p[y].style.closed=!1:p[y]=this.createStyleElement(d[y],ce),ee.push(p[y].style);else if("gr"===d[y].ty){if(me)for(X=p[y].it.length,q=0;q<X;q+=1)p[y].prevViewData[q]=p[y].it[q];else p[y]=this.createGroupElement(d[y]);this.searchShapes(d[y].it,p[y].it,p[y].prevViewData,S,ce)}else"tr"===d[y].ty?(me||(le=this.createTransformElement(d[y]),p[y]=le),ce.push(p[y]),this.addTransformToStyleList(p[y])):"sh"===d[y].ty||"rc"===d[y].ty||"el"===d[y].ty||"sr"===d[y].ty?me||(p[y]=this.createShapeElement(d[y])):"tm"===d[y].ty||"rd"===d[y].ty||"pb"===d[y].ty||"zz"===d[y].ty||"op"===d[y].ty?(me?(K=p[y]).closed=!1:((K=ShapeModifiers.getModifier(d[y].ty)).init(this,d[y]),p[y]=K,this.shapeModifiers.push(K)),oe.push(K)):"rp"===d[y].ty&&(me?(K=p[y]).closed=!0:(K=ShapeModifiers.getModifier(d[y].ty),p[y]=K,K.init(this,d,y,p),this.shapeModifiers.push(K),S=!1),oe.push(K));this.addProcessedElement(d[y],y+1)}for(this.removeTransformFromStyleList(),this.closeStyles(ee),U=oe.length,y=0;y<U;y+=1)oe[y].closed=!0},CVShapeElement.prototype.renderInnerContent=function(){this.transformHelper.opacity=1,this.transformHelper._opMdf=!1,this.renderModifiers(),this.transformsManager.processSequences(this._isFirstFrame),this.renderShape(this.transformHelper,this.shapesData,this.itemsData,!0)},CVShapeElement.prototype.renderShapeTransform=function(d,p){(d._opMdf||p.op._mdf||this._isFirstFrame)&&(p.opacity=d.opacity,p.opacity*=p.op.v,p._opMdf=!0)},CVShapeElement.prototype.drawLayer=function(){var d,v,S,I,y,U,q,oe,me,p=this.stylesList.length,X=this.globalData.renderer,ee=this.globalData.canvasContext;for(d=0;d<p;d+=1)if(("st"!==(oe=(me=this.stylesList[d]).type)&&"gs"!==oe||0!==me.wi)&&me.data._shouldRender&&0!==me.coOp&&0!==this.globalData.currentGlobalAlpha){for(X.save(),U=me.elements,"st"===oe||"gs"===oe?(ee.strokeStyle="st"===oe?me.co:me.grd,ee.lineWidth=me.wi,ee.lineCap=me.lc,ee.lineJoin=me.lj,ee.miterLimit=me.ml||0):ee.fillStyle="fl"===oe?me.co:me.grd,X.ctxOpacity(me.coOp),"st"!==oe&&"gs"!==oe&&ee.beginPath(),X.ctxTransform(me.preTransforms.finalTransform.props),S=U.length,v=0;v<S;v+=1){for(("st"===oe||"gs"===oe)&&(ee.beginPath(),me.da&&(ee.setLineDash(me.da),ee.lineDashOffset=me.do)),y=(q=U[v].trNodes).length,I=0;I<y;I+=1)"m"===q[I].t?ee.moveTo(q[I].p[0],q[I].p[1]):"c"===q[I].t?ee.bezierCurveTo(q[I].pts[0],q[I].pts[1],q[I].pts[2],q[I].pts[3],q[I].pts[4],q[I].pts[5]):ee.closePath();("st"===oe||"gs"===oe)&&(ee.stroke(),me.da&&ee.setLineDash(this.dashResetter))}"st"!==oe&&"gs"!==oe&&ee.fill(me.r),X.restore()}},CVShapeElement.prototype.renderShape=function(d,p,v,S){var I,U;for(U=d,I=p.length-1;I>=0;I-=1)"tr"===p[I].ty?this.renderShapeTransform(d,U=v[I].transform):"sh"===p[I].ty||"el"===p[I].ty||"rc"===p[I].ty||"sr"===p[I].ty?this.renderPath(p[I],v[I]):"fl"===p[I].ty?this.renderFill(p[I],v[I],U):"st"===p[I].ty?this.renderStroke(p[I],v[I],U):"gf"===p[I].ty||"gs"===p[I].ty?this.renderGradientFill(p[I],v[I],U):"gr"===p[I].ty&&this.renderShape(U,p[I].it,v[I].it);S&&this.drawLayer()},CVShapeElement.prototype.renderStyledShape=function(d,p){if(this._isFirstFrame||p._mdf||d.transforms._mdf){var I,y,U,v=d.trNodes,S=p.paths,q=S._length;v.length=0;var X=d.transforms.finalTransform;for(U=0;U<q;U+=1){var ee=S.shapes[U];if(ee&&ee.v){for(y=ee._length,I=1;I<y;I+=1)1===I&&v.push({t:"m",p:X.applyToPointArray(ee.v[0][0],ee.v[0][1],0)}),v.push({t:"c",pts:X.applyToTriplePoints(ee.o[I-1],ee.i[I],ee.v[I])});1===y&&v.push({t:"m",p:X.applyToPointArray(ee.v[0][0],ee.v[0][1],0)}),ee.c&&y&&(v.push({t:"c",pts:X.applyToTriplePoints(ee.o[I-1],ee.i[0],ee.v[0])}),v.push({t:"z"}))}}d.trNodes=v}},CVShapeElement.prototype.renderPath=function(d,p){if(!0!==d.hd&&d._shouldRender){var v,S=p.styledShapes.length;for(v=0;v<S;v+=1)this.renderStyledShape(p.styledShapes[v],p.sh)}},CVShapeElement.prototype.renderFill=function(d,p,v){var S=p.style;(p.c._mdf||this._isFirstFrame)&&(S.co="rgb("+bmFloor(p.c.v[0])+","+bmFloor(p.c.v[1])+","+bmFloor(p.c.v[2])+")"),(p.o._mdf||v._opMdf||this._isFirstFrame)&&(S.coOp=p.o.v*v.opacity)},CVShapeElement.prototype.renderGradientFill=function(d,p,v){var I,S=p.style;if(!S.grd||p.g._mdf||p.s._mdf||p.e._mdf||1!==d.t&&(p.h._mdf||p.a._mdf)){var y=this.globalData.canvasContext,U=p.s.v,q=p.e.v;if(1===d.t)I=y.createLinearGradient(U[0],U[1],q[0],q[1]);else{var X=Math.sqrt(Math.pow(U[0]-q[0],2)+Math.pow(U[1]-q[1],2)),ee=Math.atan2(q[1]-U[1],q[0]-U[0]),oe=p.h.v;oe>=1?oe=.99:oe<=-1&&(oe=-.99);var me=X*oe,K=Math.cos(ee+p.a.v)*me+U[0],le=Math.sin(ee+p.a.v)*me+U[1];I=y.createRadialGradient(K,le,0,U[0],U[1],X)}var ce,se=d.g.p,be=p.g.c,ae=1;for(ce=0;ce<se;ce+=1)p.g._hasOpacity&&p.g._collapsable&&(ae=p.g.o[2*ce+1]),I.addColorStop(be[4*ce]/100,"rgba("+be[4*ce+1]+","+be[4*ce+2]+","+be[4*ce+3]+","+ae+")");S.grd=I}S.coOp=p.o.v*v.opacity},CVShapeElement.prototype.renderStroke=function(d,p,v){var S=p.style,I=p.d;I&&(I._mdf||this._isFirstFrame)&&(S.da=I.dashArray,S.do=I.dashoffset[0]),(p.c._mdf||this._isFirstFrame)&&(S.co="rgb("+bmFloor(p.c.v[0])+","+bmFloor(p.c.v[1])+","+bmFloor(p.c.v[2])+")"),(p.o._mdf||v._opMdf||this._isFirstFrame)&&(S.coOp=p.o.v*v.opacity),(p.w._mdf||this._isFirstFrame)&&(S.wi=p.w.v)},CVShapeElement.prototype.destroy=function(){this.shapesData=null,this.globalData=null,this.canvasContext=null,this.stylesList.length=0,this.itemsData.length=0},extendPrototype([BaseElement,TransformElement,CVBaseElement,HierarchyElement,FrameElement,RenderableElement,ITextElement],CVTextElement),CVTextElement.prototype.tHelper=createTag("canvas").getContext("2d"),CVTextElement.prototype.buildNewText=function(){var d=this.textProperty.currentData;this.renderedLetters=createSizedArray(d.l?d.l.length:0);var p=!1;d.fc?(p=!0,this.values.fill=this.buildColor(d.fc)):this.values.fill="rgba(0,0,0,0)",this.fill=p;var v=!1;d.sc&&(v=!0,this.values.stroke=this.buildColor(d.sc),this.values.sWidth=d.sw);
vendor: 6,220 bytes, line 83
83var I,y,S=this.globalData.fontManager.getFontByName(d.f),U=d.l,q=this.mHelper;this.stroke=v,this.values.fValue=d.finalSize+"px "+this.globalData.fontManager.getFontByName(d.f).fFamily,y=d.finalText.length;var X,ee,oe,me,K,le,ce,se,be,ae,re=this.data.singleShape,j=.001*d.tr*d.finalSize,$=0,ue=0,_e=!0,we=0;for(I=0;I<y;I+=1){ee=(X=this.globalData.fontManager.getCharData(d.finalText[I],S.fStyle,this.globalData.fontManager.getFontByName(d.f).fFamily))&&X.data||{},q.reset(),re&&U[I].n&&($=-j,ue+=d.yOffset,ue+=_e?1:0,_e=!1),ce=(K=ee.shapes?ee.shapes[0].it:[]).length,q.scale(d.finalSize/100,d.finalSize/100),re&&this.applyTextPropertiesToMatrix(d,q,U[I].line,$,ue),be=createSizedArray(ce-1);var Oe=0;for(le=0;le<ce;le+=1)if("sh"===K[le].ty){for(me=K[le].ks.k.i.length,se=K[le].ks.k,ae=[],oe=1;oe<me;oe+=1)1===oe&&ae.push(q.applyToX(se.v[0][0],se.v[0][1],0),q.applyToY(se.v[0][0],se.v[0][1],0)),ae.push(q.applyToX(se.o[oe-1][0],se.o[oe-1][1],0),q.applyToY(se.o[oe-1][0],se.o[oe-1][1],0),q.applyToX(se.i[oe][0],se.i[oe][1],0),q.applyToY(se.i[oe][0],se.i[oe][1],0),q.applyToX(se.v[oe][0],se.v[oe][1],0),q.applyToY(se.v[oe][0],se.v[oe][1],0));ae.push(q.applyToX(se.o[oe-1][0],se.o[oe-1][1],0),q.applyToY(se.o[oe-1][0],se.o[oe-1][1],0),q.applyToX(se.i[0][0],se.i[0][1],0),q.applyToY(se.i[0][0],se.i[0][1],0),q.applyToX(se.v[0][0],se.v[0][1],0),q.applyToY(se.v[0][0],se.v[0][1],0)),be[Oe]=ae,Oe+=1}re&&($+=U[I].l,$+=j),this.textSpans[we]?this.textSpans[we].elem=be:this.textSpans[we]={elem:be},we+=1}},CVTextElement.prototype.renderInnerContent=function(){var d=this.canvasContext;d.font=this.values.fValue,d.lineCap="butt",d.lineJoin="miter",d.miterLimit=4,this.data.singleShape||this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag);var p,v,S,I,y,U,q=this.textAnimator.renderedLetters,X=this.textProperty.currentData.l;v=X.length;var ee,le,ce,oe=null,me=null,K=null;for(p=0;p<v;p+=1)if(!X[p].n){if((ee=q[p])&&(this.globalData.renderer.save(),this.globalData.renderer.ctxTransform(ee.p),this.globalData.renderer.ctxOpacity(ee.o)),this.fill){for(ee&&ee.fc?oe!==ee.fc&&(oe=ee.fc,d.fillStyle=ee.fc):oe!==this.values.fill&&(oe=this.values.fill,d.fillStyle=this.values.fill),I=(le=this.textSpans[p].elem).length,this.globalData.canvasContext.beginPath(),S=0;S<I;S+=1)for(U=(ce=le[S]).length,this.globalData.canvasContext.moveTo(ce[0],ce[1]),y=2;y<U;y+=6)this.globalData.canvasContext.bezierCurveTo(ce[y],ce[y+1],ce[y+2],ce[y+3],ce[y+4],ce[y+5]);this.globalData.canvasContext.closePath(),this.globalData.canvasContext.fill()}if(this.stroke){for(ee&&ee.sw?K!==ee.sw&&(K=ee.sw,d.lineWidth=ee.sw):K!==this.values.sWidth&&(K=this.values.sWidth,d.lineWidth=this.values.sWidth),ee&&ee.sc?me!==ee.sc&&(me=ee.sc,d.strokeStyle=ee.sc):me!==this.values.stroke&&(me=this.values.stroke,d.strokeStyle=this.values.stroke),I=(le=this.textSpans[p].elem).length,this.globalData.canvasContext.beginPath(),S=0;S<I;S+=1)for(U=(ce=le[S]).length,this.globalData.canvasContext.moveTo(ce[0],ce[1]),y=2;y<U;y+=6)this.globalData.canvasContext.bezierCurveTo(ce[y],ce[y+1],ce[y+2],ce[y+3],ce[y+4],ce[y+5]);this.globalData.canvasContext.closePath(),this.globalData.canvasContext.stroke()}ee&&this.globalData.renderer.restore()}},extendPrototype([BaseElement,TransformElement,CVBaseElement,HierarchyElement,FrameElement,RenderableElement],CVImageElement),CVImageElement.prototype.initElement=SVGShapeElement.prototype.initElement,CVImageElement.prototype.prepareFrame=IImageElement.prototype.prepareFrame,CVImageElement.prototype.createContent=function(){if(this.img.width&&(this.assetData.w!==this.img.width||this.assetData.h!==this.img.height)){var d=createTag("canvas");d.width=this.assetData.w,d.height=this.assetData.h;var U,q,p=d.getContext("2d"),v=this.img.width,S=this.img.height,I=v/S,y=this.assetData.w/this.assetData.h,X=this.assetData.pr||this.globalData.renderConfig.imagePreserveAspectRatio;I>y&&"xMidYMid slice"===X||I<y&&"xMidYMid slice"!==X?U=(q=S)*y:q=(U=v)/y,p.drawImage(this.img,(v-U)/2,(S-q)/2,U,q,0,0,this.assetData.w,this.assetData.h),this.img=d}},CVImageElement.prototype.renderInnerContent=function(){this.canvasContext.drawImage(this.img,0,0)},CVImageElement.prototype.destroy=function(){this.img=null},extendPrototype([BaseElement,TransformElement,CVBaseElement,HierarchyElement,FrameElement,RenderableElement],CVSolidElement),CVSolidElement.prototype.initElement=SVGShapeElement.prototype.initElement,CVSolidElement.prototype.prepareFrame=IImageElement.prototype.prepareFrame,CVSolidElement.prototype.renderInnerContent=function(){var d=this.canvasContext;d.fillStyle=this.data.sc,d.fillRect(0,0,this.data.sw,this.data.sh)},extendPrototype([BaseRenderer],CanvasRendererBase),CanvasRendererBase.prototype.createShape=function(d){return new CVShapeElement(d,this.globalData,this)},CanvasRendererBase.prototype.createText=function(d){return new CVTextElement(d,this.globalData,this)},CanvasRendererBase.prototype.createImage=function(d){return new CVImageElement(d,this.globalData,this)},CanvasRendererBase.prototype.createSolid=function(d){return new CVSolidElement(d,this.globalData,this)},CanvasRendererBase.prototype.createNull=SVGRenderer.prototype.createNull,CanvasRendererBase.prototype.ctxTransform=function(d){if(1!==d[0]||0!==d[1]||0!==d[4]||1!==d[5]||0!==d[12]||0!==d[13]){if(!this.renderConfig.clearCanvas)return void this.canvasContext.transform(d[0],d[1],d[4],d[5],d[12],d[13]);this.transformMat.cloneFromProps(d);var p=this.contextData.getTransform(),v=p.props;this.transformMat.transform(v[0],v[1],v[2],v[3],v[4],v[5],v[6],v[7],v[8],v[9],v[10],v[11],v[12],v[13],v[14],v[15]),p.cloneFromProps(this.transformMat.props);var S=p.props;this.canvasContext.setTransform(S[0],S[1],S[4],S[5],S[12],S[13])}},CanvasRendererBase.prototype.ctxOpacity=function(d){var p=this.contextData.getOpacity();if(!this.renderConfig.clearCanvas)return this.canvasContext.globalAlpha*=d<0?0:d,void(this.globalData.currentGlobalAlpha=p);this.contextData.setOpacity(p*=d<0?0:d),this.globalData.currentGlobalAlpha!==p&&(this.canvasContext.globalAlpha=p,this.globalData.currentGlobalAlpha=p)},CanvasRendererBase.prototype.reset=function(){this.renderConfig.clearCanvas?this.contextData.reset():this.canvasContext.restore(
vendor: 4,640 bytes, line 83
83)},CanvasRendererBase.prototype.save=function(d){this.renderConfig.clearCanvas?(d&&this.canvasContext.save(),this.contextData.push()):this.canvasContext.save()},CanvasRendererBase.prototype.restore=function(d){if(this.renderConfig.clearCanvas){d&&(this.canvasContext.restore(),this.globalData.blendMode="source-over");var p=this.contextData.pop(),v=p.transform,S=p.opacity;this.canvasContext.setTransform(v[0],v[1],v[4],v[5],v[12],v[13]),this.globalData.currentGlobalAlpha!==S&&(this.canvasContext.globalAlpha=S,this.globalData.currentGlobalAlpha=S)}else this.canvasContext.restore()},CanvasRendererBase.prototype.configAnimation=function(d){if(this.animationItem.wrapper){this.animationItem.container=createTag("canvas");var p=this.animationItem.container.style;p.width="100%",p.height="100%";var v="0px 0px 0px";p.transformOrigin=v,p.mozTransformOrigin=v,p.webkitTransformOrigin=v,p["-webkit-transform"]=v,p.contentVisibility=this.renderConfig.contentVisibility,this.animationItem.wrapper.appendChild(this.animationItem.container),this.canvasContext=this.animationItem.container.getContext("2d"),this.renderConfig.className&&this.animationItem.container.setAttribute("class",this.renderConfig.className),this.renderConfig.id&&this.animationItem.container.setAttribute("id",this.renderConfig.id)}else this.canvasContext=this.renderConfig.context;this.data=d,this.layers=d.layers,this.transformCanvas={w:d.w,h:d.h,sx:0,sy:0,tx:0,ty:0},this.setupGlobalData(d,document.body),this.globalData.canvasContext=this.canvasContext,this.globalData.renderer=this,this.globalData.isDashed=!1,this.globalData.progressiveLoad=this.renderConfig.progressiveLoad,this.globalData.transformCanvas=this.transformCanvas,this.elements=createSizedArray(d.layers.length),this.updateContainerSize()},CanvasRendererBase.prototype.updateContainerSize=function(d,p){var v,S,I,y;if(this.reset(),d?(S=p,this.canvasContext.canvas.width=v=d,this.canvasContext.canvas.height=S):(this.animationItem.wrapper&&this.animationItem.container?(v=this.animationItem.wrapper.offsetWidth,S=this.animationItem.wrapper.offsetHeight):(v=this.canvasContext.canvas.width,S=this.canvasContext.canvas.height),this.canvasContext.canvas.width=v*this.renderConfig.dpr,this.canvasContext.canvas.height=S*this.renderConfig.dpr),-1!==this.renderConfig.preserveAspectRatio.indexOf("meet")||-1!==this.renderConfig.preserveAspectRatio.indexOf("slice")){var U=this.renderConfig.preserveAspectRatio.split(" "),q=U[1]||"meet",X=U[0]||"xMidYMid",ee=X.substr(0,4),oe=X.substr(4);(y=this.transformCanvas.w/this.transformCanvas.h)>(I=v/S)&&"meet"===q||y<I&&"slice"===q?(this.transformCanvas.sx=v/(this.transformCanvas.w/this.renderConfig.dpr),this.transformCanvas.sy=v/(this.transformCanvas.w/this.renderConfig.dpr)):(this.transformCanvas.sx=S/(this.transformCanvas.h/this.renderConfig.dpr),this.transformCanvas.sy=S/(this.transformCanvas.h/this.renderConfig.dpr)),this.transformCanvas.tx="xMid"===ee&&(y<I&&"meet"===q||y>I&&"slice"===q)?(v-this.transformCanvas.w*(S/this.transformCanvas.h))/2*this.renderConfig.dpr:"xMax"===ee&&(y<I&&"meet"===q||y>I&&"slice"===q)?(v-this.transformCanvas.w*(S/this.transformCanvas.h))*this.renderConfig.dpr:0,this.transformCanvas.ty="YMid"===oe&&(y>I&&"meet"===q||y<I&&"slice"===q)?(S-this.transformCanvas.h*(v/this.transformCanvas.w))/2*this.renderConfig.dpr:"YMax"===oe&&(y>I&&"meet"===q||y<I&&"slice"===q)?(S-this.transformCanvas.h*(v/this.transformCanvas.w))*this.renderConfig.dpr:0}else"none"===this.renderConfig.preserveAspectRatio?(this.transformCanvas.sx=v/(this.transformCanvas.w/this.renderConfig.dpr),this.transformCanvas.sy=S/(this.transformCanvas.h/this.renderConfig.dpr),this.transformCanvas.tx=0,this.transformCanvas.ty=0):(this.transformCanvas.sx=this.renderConfig.dpr,this.transformCanvas.sy=this.renderConfig.dpr,this.transformCanvas.tx=0,this.transformCanvas.ty=0);this.transformCanvas.props=[this.transformCanvas.sx,0,0,0,0,this.transformCanvas.sy,0,0,0,0,1,0,this.transformCanvas.tx,this.transformCanvas.ty,0,1],this.ctxTransform(this.transformCanvas.props),this.canvasContext.beginPath(),this.canvasContext.rect(0,0,this.transformCanvas.w,this.transformCanvas.h),this.canvasContext.closePath(),this.canvasContext.clip(),this.renderFrame(this.renderedFrame,!0)},CanvasRendererBase.prototype.destroy=function(){var d;for(this.renderConfig.clearCanvas&&this.animationItem.wrapper&&(this.animationItem.wrapper.innerText=""),d=(this.layers?this.layers.length:0)-1;d>=0;d-=1)this.elements[d]&&this.elements[d].destroy&&this.elements[d].destroy();this.elements.length=0,this.globalData.canvasContext=null,this.animationItem.container=null,this.destroyed=!0}
vendor: 6,193 bytes, line 83
83,CanvasRendererBase.prototype.renderFrame=function(d,p){if((this.renderedFrame!==d||!0!==this.renderConfig.clearCanvas||p)&&!this.destroyed&&-1!==d){this.renderedFrame=d,this.globalData.frameNum=d-this.animationItem._isFirstFrame,this.globalData.frameId+=1,this.globalData._mdf=!this.renderConfig.clearCanvas||p,this.globalData.projectInterface.currentFrame=d;var v,S=this.layers.length;for(this.completeLayers||this.checkLayers(d),v=0;v<S;v+=1)(this.completeLayers||this.elements[v])&&this.elements[v].prepareFrame(d-this.layers[v].st);if(this.globalData._mdf){for(!0===this.renderConfig.clearCanvas?this.canvasContext.clearRect(0,0,this.transformCanvas.w,this.transformCanvas.h):this.save(),v=S-1;v>=0;v-=1)(this.completeLayers||this.elements[v])&&this.elements[v].renderFrame();!0!==this.renderConfig.clearCanvas&&this.restore()}}},CanvasRendererBase.prototype.buildItem=function(d){var p=this.elements;if(!p[d]&&99!==this.layers[d].ty){var v=this.createItem(this.layers[d],this,this.globalData);p[d]=v,v.initExpressions()}},CanvasRendererBase.prototype.checkPendingElements=function(){for(;this.pendingElements.length;)this.pendingElements.pop().checkParenting()},CanvasRendererBase.prototype.hide=function(){this.animationItem.container.style.display="none"},CanvasRendererBase.prototype.show=function(){this.animationItem.container.style.display="block"},extendPrototype([CanvasRendererBase,ICompElement,CVBaseElement],CVCompElement),CVCompElement.prototype.renderInnerContent=function(){var p,d=this.canvasContext;for(d.beginPath(),d.moveTo(0,0),d.lineTo(this.data.w,0),d.lineTo(this.data.w,this.data.h),d.lineTo(0,this.data.h),d.lineTo(0,0),d.clip(),p=this.layers.length-1;p>=0;p-=1)(this.completeLayers||this.elements[p])&&this.elements[p].renderFrame()},CVCompElement.prototype.destroy=function(){var d;for(d=this.layers.length-1;d>=0;d-=1)this.elements[d]&&this.elements[d].destroy();this.layers=null,this.elements=null},CVCompElement.prototype.createComp=function(d){return new CVCompElement(d,this.globalData,this)},extendPrototype([CanvasRendererBase],CanvasRenderer),CanvasRenderer.prototype.createComp=function(d){return new CVCompElement(d,this.globalData,this)},HBaseElement.prototype={checkBlendMode:function(){},initRendererElement:function(){this.baseElement=createTag(this.data.tg||"div"),this.data.hasMask?(this.svgElement=createNS("svg"),this.layerElement=createNS("g"),this.maskedElement=this.layerElement,this.svgElement.appendChild(this.layerElement),this.baseElement.appendChild(this.svgElement)):this.layerElement=this.baseElement,styleDiv(this.baseElement)},createContainerElements:function(){this.renderableEffectsManager=new CVEffects(this),this.transformedElement=this.baseElement,this.maskedElement=this.layerElement,this.data.ln&&this.layerElement.setAttribute("id",this.data.ln),this.data.cl&&this.layerElement.setAttribute("class",this.data.cl),0!==this.data.bm&&this.setBlendMode()},renderElement:function(){var p=this.transformedElement?this.transformedElement.style:{};if(this.finalTransform._matMdf){var v=this.finalTransform.mat.toCSS();p.transform=v,p.webkitTransform=v}this.finalTransform._opMdf&&(p.opacity=this.finalTransform.mProp.o.v)},renderFrame:function(){this.data.hd||this.hidden||(this.renderTransform(),this.renderRenderable(),this.renderElement(),this.renderInnerContent(),this._isFirstFrame&&(this._isFirstFrame=!1))},destroy:function(){this.layerElement=null,this.transformedElement=null,this.matteElement&&(this.matteElement=null),this.maskManager&&(this.maskManager.destroy(),this.maskManager=null)},createRenderableComponents:function(){this.maskManager=new MaskElement(this.data,this,this.globalData)},addEffects:function(){},setMatte:function(){}},HBaseElement.prototype.getBaseElement=SVGBaseElement.prototype.getBaseElement,HBaseElement.prototype.destroyBaseElement=HBaseElement.prototype.destroy,HBaseElement.prototype.buildElementParenting=BaseRenderer.prototype.buildElementParenting,extendPrototype([BaseElement,TransformElement,HBaseElement,HierarchyElement,FrameElement,RenderableDOMElement],HSolidElement),HSolidElement.prototype.createContent=function(){var d;this.data.hasMask?((d=createNS("rect")).setAttribute("width",this.data.sw),d.setAttribute("height",this.data.sh),d.setAttribute("fill",this.data.sc),this.svgElement.setAttribute("width",this.data.sw),this.svgElement.setAttribute("height",this.data.sh)):((d=createTag("div")).style.width=this.data.sw+"px",d.style.height=this.data.sh+"px",d.style.backgroundColor=this.data.sc),this.layerElement.appendChild(d)},extendPrototype([BaseElement,TransformElement,HSolidElement,SVGShapeElement,HBaseElement,HierarchyElement,FrameElement,RenderableElement],HShapeElement),HShapeElement.prototype._renderShapeFrame=HShapeElement.prototype.renderInnerContent,HShapeElement.prototype.createContent=function(){var d;if(this.baseElement.style.fontSize=0,this.data.hasMask)this.layerElement.appendChild(this.shapesContainer),d=this.svgElement;else{d=createNS("svg");var p=this.comp.data?this.comp.data:this.globalData.compSize;d.setAttribute("width",p.w),d.setAttribute("height",p.h),d.appendChild(this.shapesContainer),this.layerElement.appendChild(d)}this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.shapesContainer,0,[],!0),this.filterUniqueShapes(),this.shapeCont=d},HShapeElement.prototype.getTransformedPoint=function(d,p){var v,S=d.length;for(v=0;v<S;v+=1)p=d[v].mProps.v.applyToPointArray(p[0],p[1],0);return p},HShapeElement.prototype.calculateShapeBoundingBox=function(d,p){var I,U,q,X,ee,v=d.sh.v,S=d.transformers,y=v._length;if(!(y<=1)){for(I=0;I<y-1;I+=1)U=this.getTransformedPoint(S,v.v[I]),q=this.getTransformedPoint(S,v.o[I]),X=this.getTransformedPoint(S,v.i[I+1]),ee=this.getTransformedPoint(S,v.v[I+1]),this.checkBounds(U,q,X,ee,p);v.c&&(U=this.getTransformedPoint(S,v.v[I]),q=this.getTransformedPoint(S,v.o[I]),X=this.getTransformedPoint(S,v.i[0]),ee=this.getTransformedPoint(S,v.v[0]),this.checkBounds(U,q,X,ee,p))}},HShapeElement.prototype.checkBounds=function(d,p,v,S,I){this.getBoundsOfCurve(d,p,v,S);var y=this.shapeBoundingBox;I.x=bmMin(y.left,I.x),I.xMax=bmMax(y.right,I.xMax),I.y=bmMin(y.top,I.y),I.yMax=bmMax(y.bottom,I.yMax
vendor: 4,297 bytes, line 83
83)},HShapeElement.prototype.shapeBoundingBox={left:0,right:0,top:0,bottom:0},HShapeElement.prototype.tempBoundingBox={x:0,xMax:0,y:0,yMax:0,width:0,height:0},HShapeElement.prototype.getBoundsOfCurve=function(d,p,v,S){for(var y,U,q,X,ee,oe,me,I=[[d[0],S[0]],[d[1],S[1]]],K=0;K<2;++K)U=6*d[K]-12*p[K]+6*v[K],y=-3*d[K]+9*p[K]-9*v[K]+3*S[K],q=3*p[K]-3*d[K],U|=0,q|=0,0==(y|=0)&&0===U||(0===y?(X=-q/U)>0&&X<1&&I[K].push(this.calculateF(X,d,p,v,S,K)):(ee=U*U-4*q*y)>=0&&((oe=(-U+bmSqrt(ee))/(2*y))>0&&oe<1&&I[K].push(this.calculateF(oe,d,p,v,S,K)),(me=(-U-bmSqrt(ee))/(2*y))>0&&me<1&&I[K].push(this.calculateF(me,d,p,v,S,K))));this.shapeBoundingBox.left=bmMin.apply(null,I[0]),this.shapeBoundingBox.top=bmMin.apply(null,I[1]),this.shapeBoundingBox.right=bmMax.apply(null,I[0]),this.shapeBoundingBox.bottom=bmMax.apply(null,I[1])},HShapeElement.prototype.calculateF=function(d,p,v,S,I,y){return bmPow(1-d,3)*p[y]+3*bmPow(1-d,2)*d*v[y]+3*(1-d)*bmPow(d,2)*S[y]+bmPow(d,3)*I[y]},HShapeElement.prototype.calculateBoundingBox=function(d,p){var v,S=d.length;for(v=0;v<S;v+=1)d[v]&&d[v].sh?this.calculateShapeBoundingBox(d[v],p):d[v]&&d[v].it?this.calculateBoundingBox(d[v].it,p):d[v]&&d[v].style&&d[v].w&&this.expandStrokeBoundingBox(d[v].w,p)},HShapeElement.prototype.expandStrokeBoundingBox=function(d,p){var v=0;if(d.keyframes){for(var S=0;S<d.keyframes.length;S+=1){var I=d.keyframes[S].s;I>v&&(v=I)}v*=d.mult}else v=d.v*d.mult;p.x-=v,p.xMax+=v,p.y-=v,p.yMax+=v},HShapeElement.prototype.currentBoxContains=function(d){return this.currentBBox.x<=d.x&&this.currentBBox.y<=d.y&&this.currentBBox.width+this.currentBBox.x>=d.x+d.width&&this.currentBBox.height+this.currentBBox.y>=d.y+d.height},HShapeElement.prototype.renderInnerContent=function(){if(this._renderShapeFrame(),!this.hidden&&(this._isFirstFrame||this._mdf)){var d=this.tempBoundingBox,p=999999;if(d.x=p,d.xMax=-p,d.y=p,d.yMax=-p,this.calculateBoundingBox(this.itemsData,d),d.width=d.xMax<d.x?0:d.xMax-d.x,d.height=d.yMax<d.y?0:d.yMax-d.y,this.currentBoxContains(d))return;var v=!1;if(this.currentBBox.w!==d.width&&(this.currentBBox.w=d.width,this.shapeCont.setAttribute("width",d.width),v=!0),this.currentBBox.h!==d.height&&(this.currentBBox.h=d.height,this.shapeCont.setAttribute("height",d.height),v=!0),v||this.currentBBox.x!==d.x||this.currentBBox.y!==d.y){this.currentBBox.w=d.width,this.currentBBox.h=d.height,this.currentBBox.x=d.x,this.currentBBox.y=d.y,this.shapeCont.setAttribute("viewBox",this.currentBBox.x+" "+this.currentBBox.y+" "+this.currentBBox.w+" "+this.currentBBox.h);var S=this.shapeCont.style,I="translate("+this.currentBBox.x+"px,"+this.currentBBox.y+"px)";S.transform=I,S.webkitTransform=I}}},extendPrototype([BaseElement,TransformElement,HBaseElement,HierarchyElement,FrameElement,RenderableDOMElement,ITextElement],HTextElement),HTextElement.prototype.createContent=function(){if(this.isMasked=this.checkMasks(),this.isMasked){this.renderType="svg",this.compW=this.comp.data.w,this.compH=this.comp.data.h,this.svgElement.setAttribute("width",this.compW),this.svgElement.setAttribute("height",this.compH);var d=createNS("g");this.maskedElement.appendChild(d),this.innerElem=d}else this.renderType="html",this.innerElem=this.layerElement;this.checkParenting()},HTextElement.prototype.buildNewText=function(){var d=this.textProperty.currentData;this.renderedLetters=createSizedArray(d.l?d.l.length:0);var p=this.innerElem.style,v=d.fc?this.buildColor(d.fc):"rgba(0,0,0,0)";p.fill=v,p.color=v,d.sc&&(p.stroke=this.buildColor(d.sc),p.strokeWidth=d.sw+"px");var S=this.globalData.fontManager.getFontByName(d.f);if(!this.globalData.fontManager.chars)if(p.fontSize=d.finalSize+"px",p.lineHeight=d.finalSize+"px",S.fClass)this.innerElem.className=S.fClass;else{p.fontFamily=S.fFamily;var I=d.fWeight;p.fontStyle=d.fStyle,p.fontWeight=I}var U,q,X=d.l;q=X.length;var ee,oe,me,le,K=this.mHelper,ce="",se=0;for(U=0;U<q;U+=1){if(this.globalData.fontManager.chars?(this.textPaths[se]?ee=this.textPaths[se]:((ee=createNS("path")).setAttribute("stroke-linecap",lineCapEnum[1]),ee.setAttribute("stroke-linejoin",lineJoinEnum[2]),ee.setAttribute("stroke-miterlimit","4")),this.isMasked||(this.textSpans[se]?me=(oe=this.textSpans[se]).children[0]:((oe=createTag("div")).style.lineHeight=0,(me=createNS("svg")).appendChild(ee),styleDiv(oe)))
vendor: 4,277 bytes, line 83
83):this.isMasked?ee=this.textPaths[se]?this.textPaths[se]:createNS("text"):this.textSpans[se]?(oe=this.textSpans[se],ee=this.textPaths[se]):(styleDiv(oe=createTag("span")),styleDiv(ee=createTag("span")),oe.appendChild(ee)),this.globalData.fontManager.chars){var ae,be=this.globalData.fontManager.getCharData(d.finalText[U],S.fStyle,this.globalData.fontManager.getFontByName(d.f).fFamily);if(ae=be?be.data:null,K.reset(),ae&&ae.shapes&&ae.shapes.length&&(le=ae.shapes[0].it,K.scale(d.finalSize/100,d.finalSize/100),ce=this.createPathShape(K,le),ee.setAttribute("d",ce)),this.isMasked)this.innerElem.appendChild(ee);else{if(this.innerElem.appendChild(oe),ae&&ae.shapes){document.body.appendChild(me);var re=me.getBBox();me.setAttribute("width",re.width+2),me.setAttribute("height",re.height+2),me.setAttribute("viewBox",re.x-1+" "+(re.y-1)+" "+(re.width+2)+" "+(re.height+2));var j=me.style,$="translate("+(re.x-1)+"px,"+(re.y-1)+"px)";j.transform=$,j.webkitTransform=$,X[U].yOffset=re.y-1}else me.setAttribute("width",1),me.setAttribute("height",1);oe.appendChild(me)}}else if(ee.textContent=X[U].val,ee.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),this.isMasked)this.innerElem.appendChild(ee);else{this.innerElem.appendChild(oe);var ue=ee.style,_e="translate3d(0,"+-d.finalSize/1.2+"px,0)";ue.transform=_e,ue.webkitTransform=_e}this.textSpans[se]=this.isMasked?ee:oe,this.textSpans[se].style.display="block",this.textPaths[se]=ee,se+=1}for(;se<this.textSpans.length;)this.textSpans[se].style.display="none",se+=1},HTextElement.prototype.renderInnerContent=function(){var d;if(this.data.singleShape){if(!this._isFirstFrame&&!this.lettersChangedFlag)return;if(this.isMasked&&this.finalTransform._matMdf){this.svgElement.setAttribute("viewBox",-this.finalTransform.mProp.p.v[0]+" "+-this.finalTransform.mProp.p.v[1]+" "+this.compW+" "+this.compH);var p="translate("+-this.finalTransform.mProp.p.v[0]+"px,"+-this.finalTransform.mProp.p.v[1]+"px)";(d=this.svgElement.style).transform=p,d.webkitTransform=p}}if(this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag),this.lettersChangedFlag||this.textAnimator.lettersChangedFlag){var v,S,q,X,ee,I=0,y=this.textAnimator.renderedLetters,U=this.textProperty.currentData.l;for(S=U.length,v=0;v<S;v+=1)U[v].n?I+=1:(X=this.textSpans[v],ee=this.textPaths[v],q=y[I],I+=1,q._mdf.m&&(this.isMasked?X.setAttribute("transform",q.m):(X.style.webkitTransform=q.m,X.style.transform=q.m)),X.style.opacity=q.o,q.sw&&q._mdf.sw&&ee.setAttribute("stroke-width",q.sw),q.sc&&q._mdf.sc&&ee.setAttribute("stroke",q.sc),q.fc&&q._mdf.fc&&(ee.setAttribute("fill",q.fc),ee.style.color=q.fc));if(this.innerElem.getBBox&&!this.hidden&&(this._isFirstFrame||this._mdf)){var oe=this.innerElem.getBBox();if(this.currentBBox.w!==oe.width&&(this.currentBBox.w=oe.width,this.svgElement.setAttribute("width",oe.width)),this.currentBBox.h!==oe.height&&(this.currentBBox.h=oe.height,this.svgElement.setAttribute("height",oe.height)),this.currentBBox.w!==oe.width+2||this.currentBBox.h!==oe.height+2||this.currentBBox.x!==oe.x-1||this.currentBBox.y!==oe.y-1){this.currentBBox.w=oe.width+2,this.currentBBox.h=oe.height+2,this.currentBBox.x=oe.x-1,this.currentBBox.y=oe.y-1,this.svgElement.setAttribute("viewBox",this.currentBBox.x+" "+this.currentBBox.y+" "+this.currentBBox.w+" "+this.currentBBox.h);var K="translate("+this.currentBBox.x+"px,"+this.currentBBox.y+"px)";(d=this.svgElement.style).transform=K,d.webkitTransform=K}}}},extendPrototype([BaseElement,FrameElement,HierarchyElement],HCameraElement),HCameraElement.prototype.setup=function(){var d,v,S,I,p=this.comp.threeDElements.length;for(d=0;d<p;d+=1)if("3d"===(v=this.comp.threeDElements[d]).type){I=v.container.style;var y=this.pe.v+"px",U="0px 0px 0px",q="matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)";(S=v.perspectiveElem.style).perspective=y,S.webkitPerspective=y,I.transformOrigin=U,I.mozTransformOrigin=U,I.webkitTransformOrigin=U,S.transform=q,S.webkitTransform=q}},HCameraElement.prototype.createElements=function(){},HCameraElement.prototype.hide=function(){},HCameraElement.prototype.renderFrame=function(){var p,v,d=this._isFirstFrame;if(this.hierarchy)for(v=this.hierarchy.length,p=0;p<v;p+=1)d=this.hierarchy[p].finalTransform.mProp._mdf||d;
vendor: 11,593 bytes, line 83
83if(d||this.pe._mdf||this.p&&this.p._mdf||this.px&&(this.px._mdf||this.py._mdf||this.pz._mdf)||this.rx._mdf||this.ry._mdf||this.rz._mdf||this.or._mdf||this.a&&this.a._mdf){if(this.mat.reset(),this.hierarchy)for(p=v=this.hierarchy.length-1;p>=0;p-=1){var S=this.hierarchy[p].finalTransform.mProp;this.mat.translate(-S.p.v[0],-S.p.v[1],S.p.v[2]),this.mat.rotateX(-S.or.v[0]).rotateY(-S.or.v[1]).rotateZ(S.or.v[2]),this.mat.rotateX(-S.rx.v).rotateY(-S.ry.v).rotateZ(S.rz.v),this.mat.scale(1/S.s.v[0],1/S.s.v[1],1/S.s.v[2]),this.mat.translate(S.a.v[0],S.a.v[1],S.a.v[2])}if(this.p?this.mat.translate(-this.p.v[0],-this.p.v[1],this.p.v[2]):this.mat.translate(-this.px.v,-this.py.v,this.pz.v),this.a){var I;I=this.p?[this.p.v[0]-this.a.v[0],this.p.v[1]-this.a.v[1],this.p.v[2]-this.a.v[2]]:[this.px.v-this.a.v[0],this.py.v-this.a.v[1],this.pz.v-this.a.v[2]];var y=Math.sqrt(Math.pow(I[0],2)+Math.pow(I[1],2)+Math.pow(I[2],2)),U=[I[0]/y,I[1]/y,I[2]/y],q=Math.sqrt(U[2]*U[2]+U[0]*U[0]),X=Math.atan2(U[1],q),ee=Math.atan2(U[0],-U[2]);this.mat.rotateY(ee).rotateX(-X)}this.mat.rotateX(-this.rx.v).rotateY(-this.ry.v).rotateZ(this.rz.v),this.mat.rotateX(-this.or.v[0]).rotateY(-this.or.v[1]).rotateZ(this.or.v[2]),this.mat.translate(this.globalData.compSize.w/2,this.globalData.compSize.h/2,0),this.mat.translate(0,0,this.pe.v);var oe=!this._prevMat.equals(this.mat);if((oe||this.pe._mdf)&&this.comp.threeDElements){var me,K,le;for(v=this.comp.threeDElements.length,p=0;p<v;p+=1)if("3d"===(me=this.comp.threeDElements[p]).type){if(oe){var ce=this.mat.toCSS();(le=me.container.style).transform=ce,le.webkitTransform=ce}this.pe._mdf&&((K=me.perspectiveElem.style).perspective=this.pe.v+"px",K.webkitPerspective=this.pe.v+"px")}this.mat.clone(this._prevMat)}}this._isFirstFrame=!1},HCameraElement.prototype.prepareFrame=function(d){this.prepareProperties(d,!0)},HCameraElement.prototype.destroy=function(){},HCameraElement.prototype.getBaseElement=function(){return null},extendPrototype([BaseElement,TransformElement,HBaseElement,HSolidElement,HierarchyElement,FrameElement,RenderableElement],HImageElement),HImageElement.prototype.createContent=function(){var d=this.globalData.getAssetsPath(this.assetData),p=new Image;this.data.hasMask?(this.imageElem=createNS("image"),this.imageElem.setAttribute("width",this.assetData.w+"px"),this.imageElem.setAttribute("height",this.assetData.h+"px"),this.imageElem.setAttributeNS("http://www.w3.org/1999/xlink","href",d),this.layerElement.appendChild(this.imageElem),this.baseElement.setAttribute("width",this.assetData.w),this.baseElement.setAttribute("height",this.assetData.h)):this.layerElement.appendChild(p),p.crossOrigin="anonymous",p.src=d,this.data.ln&&this.baseElement.setAttribute("id",this.data.ln)},extendPrototype([BaseRenderer],HybridRendererBase),HybridRendererBase.prototype.buildItem=SVGRenderer.prototype.buildItem,HybridRendererBase.prototype.checkPendingElements=function(){for(;this.pendingElements.length;)this.pendingElements.pop().checkParenting()},HybridRendererBase.prototype.appendElementInPos=function(d,p){var v=d.getBaseElement();if(v){var S=this.layers[p];if(S.ddd&&this.supports3d)this.addTo3dContainer(v,p);else if(this.threeDElements)this.addTo3dContainer(v,p);else{for(var y,U,I=0;I<p;)this.elements[I]&&!0!==this.elements[I]&&this.elements[I].getBaseElement&&(U=this.elements[I],y=(this.layers[I].ddd?this.getThreeDContainerByPos(I):U.getBaseElement())||y),I+=1;y?(!S.ddd||!this.supports3d)&&this.layerElement.insertBefore(v,y):(!S.ddd||!this.supports3d)&&this.layerElement.appendChild(v)}}},HybridRendererBase.prototype.createShape=function(d){return this.supports3d?new HShapeElement(d,this.globalData,this):new SVGShapeElement(d,this.globalData,this)},HybridRendererBase.prototype.createText=function(d){return this.supports3d?new HTextElement(d,this.globalData,this):new SVGTextLottieElement(d,this.globalData,this)},HybridRendererBase.prototype.createCamera=function(d){return this.camera=new HCameraElement(d,this.globalData,this),this.camera},HybridRendererBase.prototype.createImage=function(d){return this.supports3d?new HImageElement(d,this.globalData,this):new IImageElement(d,this.globalData,this)},HybridRendererBase.prototype.createSolid=function(d){return this.supports3d?new HSolidElement(d,this.globalData,this):new ISolidElement(d,this.globalData,this)},HybridRendererBase.prototype.createNull=SVGRenderer.prototype.createNull,HybridRendererBase.prototype.getThreeDContainerByPos=function(d){for(var p=0,v=this.threeDElements.length;p<v;){if(this.threeDElements[p].startPos<=d&&this.threeDElements[p].endPos>=d)return this.threeDElements[p].perspectiveElem;p+=1}return null},HybridRendererBase.prototype.createThreeDContainer=function(d,p){var S,I,v=createTag("div");styleDiv(v);var y=createTag("div");if(styleDiv(y),"3d"===p){(S=v.style).width=this.globalData.compSize.w+"px",S.height=this.globalData.compSize.h+"px";var U="50% 50%";S.webkitTransformOrigin=U,S.mozTransformOrigin=U,S.transformOrigin=U;var q="matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)";(I=y.style).transform=q,I.webkitTransform=q}v.appendChild(y);var X={container:y,perspectiveElem:v,startPos:d,endPos:d,type:p};return this.threeDElements.push(X),X},HybridRendererBase.prototype.build3dContainers=function(){var d,v,p=this.layers.length,S="";for(d=0;d<p;d+=1)this.layers[d].ddd&&3!==this.layers[d].ty?("3d"!==S&&(S="3d",v=this.createThreeDContainer(d,"3d")),v.endPos=Math.max(v.endPos,d)):("2d"!==S&&(S="2d",v=this.createThreeDContainer(d,"2d")),v.endPos=Math.max(v.endPos,d));for(d=(p=this.threeDElements.length)-1;d>=0;d-=1)this.resizerElem.appendChild(this.threeDElements[d].perspectiveElem)},HybridRendererBase.prototype.addTo3dContainer=function(d,p){for(var v=0,S=this.threeDElements.length;v<S;){if(p<=this.threeDElements[v].endPos){for(var y,I=this.threeDElements[v].startPos;I<p;)this.elements[I]&&this.elements[I].getBaseElement&&(y=this.elements[I].getBaseElement()),I+=1;y?this.threeDElements[v].container.insertBefore(d,y):this.threeDElements[v].container.appendChild(d);break}v+=1}},HybridRendererBase.prototype.configAnimation=function(d){var p=createTag("div"),v=this.animationItem.wrapper,S=p.style;S.width=d.w+"px",S.height=d.h+"px",this.resizerElem=p,styleDiv(p),S.transformStyle="flat",S.mozTransformStyle="flat",S.webkitTransformStyle="flat",this.renderConfig.className&&p.setAttribute("class",this.renderConfig.className),v.appendChild(p),S.overflow="hidden";var I=createNS("svg");I.setAttribute("width","1"),I.setAttribute("height","1"),styleDiv(I),this.resizerElem.appendChild(I);var y=createNS("defs");I.appendChild(y),this.data=d,this.setupGlobalData(d,I),this.globalData.defs=y,this.layers=d.layers,this.layerElement=this.resizerElem,this.build3dContainers(),this.updateContainerSize()},HybridRendererBase.prototype.destroy=function(){this.animationItem.wrapper&&(this.animationItem.wrapper.innerText=""),this.animationItem.container=null,this.globalData.defs=null;var d,p=this.layers?this.layers.length:0;for(d=0;d<p;d+=1)this.elements[d]&&this.elements[d].destroy&&this.elements[d].destroy();this.elements.length=0,this.destroyed=!0,this.animationItem=null},HybridRendererBase.prototype.updateContainerSize=function(){var I,y,U,q,d=this.animationItem.wrapper.offsetWidth,p=this.animationItem.wrapper.offsetHeight;this.globalData.compSize.w/this.globalData.compSize.h>d/p?(I=d/this.globalData.compSize.w,y=d/this.globalData.compSize.w,U=0,q=(p-this.globalData.compSize.h*(d/this.globalData.compSize.w))/2):(I=p/this.globalData.compSize.h,y=p/this.globalData.compSize.h,U=(d-this.globalData.compSize.w*(p/this.globalData.compSize.h))/2,q=0);var X=this.resizerElem.style;X.webkitTransform="matrix3d("+I+",0,0,0,0,"+y+",0,0,0,0,1,0,"+U+","+q+",0,1)",X.transform=X.webkitTransform},HybridRendererBase.prototype.renderFrame=SVGRenderer.prototype.renderFrame,HybridRendererBase.prototype.hide=function(){this.resizerElem.style.display="none"},HybridRendererBase.prototype.show=function(){this.resizerElem.style.display="block"},HybridRendererBase.prototype.initItems=function(){if(this.buildAllItems(),this.camera)this.camera.setup();else{var v,d=this.globalData.compSize.w,p=this.globalData.compSize.h,S=this.threeDElements.length;for(v=0;v<S;v+=1){var I=this.threeDElements[v].perspectiveElem.style;I.webkitPerspective=Math.sqrt(Math.pow(d,2)+Math.pow(p,2))+"px",I.perspective=I.webkitPerspective}}},HybridRendererBase.prototype.searchExtraCompositions=function(d){var p,v=d.length,S=createTag("div");for(p=0;p<v;p+=1)if(d[p].xt){var I=this.createComp(d[p],S,this.globalData.comp,null);I.initExpressions(),this.globalData.projectInterface.registerComposition(I)}},extendPrototype([HybridRendererBase,ICompElement,HBaseElement],HCompElement),HCompElement.prototype._createBaseContainerElements=HCompElement.prototype.createContainerElements,HCompElement.prototype.createContainerElements=function(){this._createBaseContainerElements(),this.data.hasMask?(this.svgElement.setAttribute("width",this.data.w),this.svgElement.setAttribute("height",this.data.h),this.transformedElement=this.baseElement):this.transformedElement=this.layerElement},HCompElement.prototype.addTo3dContainer=function(d,p){for(var S,v=0;v<p;)this.elements[v]&&this.elements[v].getBaseElement&&(S=this.elements[v].getBaseElement()),v+=1;S?this.layerElement.insertBefore(d,S):this.layerElement.appendChild(d)},HCompElement.prototype.createComp=function(d){return this.supports3d?new HCompElement(d,this.globalData,this):new SVGCompElement(d,this.globalData,this)},extendPrototype([HybridRendererBase],HybridRenderer),HybridRenderer.prototype.createComp=function(d){return this.supports3d?new HCompElement(d,this.globalData,this):new SVGCompElement(d,this.globalData,this)};var CompExpressionInterface=function(){return function(d){function p(v){for(var S=0,I=d.layers.length;S<I;){if(d.layers[S].nm===v||d.layers[S].ind===v)return d.elements[S].layerInterface;S+=1}return null}return Object.defineProperty(p,"_name",{value:d.data.nm}),p.layer=p,p.pixelAspect=1,p.height=d.data.h||d.globalData.compSize.h,p.width=d.data.w||d.globalData.compSize.w,p.pixelAspect=1,p.frameDuration=1/d.globalData.frameRate,p.displayStartTime=0,p.numLayers=d.layers.length,p}}(),Expressions=function(){var d={initExpressions:function p(v){var S=0,I=[];v.renderer.compInterface=CompExpressionInterface(v.renderer),v.renderer.globalData.projectInterface.registerComposition(v.renderer),v.renderer.globalData.pushExpression=function y(){S+=1},v.renderer.globalData.popExpression=function U(){0==(S-=1)&&function X(){var ee,oe=I.length;for(ee=0;ee<oe;ee+=1)I[ee].release();I.length=0}()},v.renderer.globalData.registerExpressionProperty=function q(ee){-1===I.indexOf(ee)&&I.push(ee)}}};return d}(),MaskManagerInterface=function(){function d(v,S){this._mask=v,this._data=S}return Object.defineProperty(d.prototype,"maskPath",{get:function(){return this._mask.prop.k&&this._mask.prop.getValue(),this._mask.prop}}),Object.defineProperty(d.prototype,"maskOpacity",{get:function(){return this._mask.op.k&&this._mask.op.getValue(),100*this._mask.op.v}}),function(S){var y,I=createSizedArray(S.viewData.length),U=S.viewData.length;for(y=0;y<U;y+=1)I[y]=new d(S.viewData[y],S.masksProperties[y]);return function(ee){for(y=0;y<U;){if(S.masksProperties[y].nm===ee)return I[y];y+=1}return null}}}(),ExpressionPropertyInterface=function(){var d={pv:0,v:0,mult:1},p={pv:[0,0,0],v:[0,0,0],mult:1};function v(U,q,X){Object.defineProperty(U,"velocity",{get:function(){return q.getVelocityAtTime(q.comp.currentFrame)}}),U.numKeys=q.keyframes?q.keyframes.length:0,U.key=function(ee){if(!U.numKe
vendor: 10,606 bytes, line 83
83ys)return 0;var oe;oe="s"in q.keyframes[ee-1]?q.keyframes[ee-1].s:"e"in q.keyframes[ee-2]?q.keyframes[ee-2].e:q.keyframes[ee-2].s;var me="unidimensional"===X?new Number(oe):Object.assign({},oe);return me.time=q.keyframes[ee-1].t/q.elem.comp.globalData.frameRate,me.value="unidimensional"===X?oe[0]:oe,me},U.valueAtTime=q.getValueAtTime,U.speedAtTime=q.getSpeedAtTime,U.velocityAtTime=q.getVelocityAtTime,U.propertyGroup=q.propertyGroup}function y(){return d}return function(U){return U?"unidimensional"===U.propType?function S(U){(!U||!("pv"in U))&&(U=d);var q=1/U.mult,X=U.pv*q,ee=new Number(X);return ee.value=X,v(ee,U,"unidimensional"),function(){return U.k&&U.getValue(),ee.value!==(X=U.v*q)&&((ee=new Number(X)).value=X,v(ee,U,"unidimensional")),ee}}(U):function I(U){(!U||!("pv"in U))&&(U=p);var q=1/U.mult,X=U.data&&U.data.l||U.pv.length,ee=createTypedArray("float32",X),oe=createTypedArray("float32",X);return ee.value=oe,v(ee,U,"multidimensional"),function(){U.k&&U.getValue();for(var me=0;me<X;me+=1)oe[me]=U.v[me]*q,ee[me]=oe[me];return ee}}(U):y}}(),TransformExpressionInterface=function(){return function(d){function p(U){switch(U){case"scale":case"Scale":case"ADBE Scale":case 6:return p.scale;case"rotation":case"Rotation":case"ADBE Rotation":case"ADBE Rotate Z":case 10:return p.rotation;case"ADBE Rotate X":return p.xRotation;case"ADBE Rotate Y":return p.yRotation;case"position":case"Position":case"ADBE Position":case 2:return p.position;case"ADBE Position_0":return p.xPosition;case"ADBE Position_1":return p.yPosition;case"ADBE Position_2":return p.zPosition;case"anchorPoint":case"AnchorPoint":case"Anchor Point":case"ADBE AnchorPoint":case 1:return p.anchorPoint;case"opacity":case"Opacity":case 11:return p.opacity;default:return null}}var v,S,I,y;return Object.defineProperty(p,"rotation",{get:ExpressionPropertyInterface(d.r||d.rz)}),Object.defineProperty(p,"zRotation",{get:ExpressionPropertyInterface(d.rz||d.r)}),Object.defineProperty(p,"xRotation",{get:ExpressionPropertyInterface(d.rx)}),Object.defineProperty(p,"yRotation",{get:ExpressionPropertyInterface(d.ry)}),Object.defineProperty(p,"scale",{get:ExpressionPropertyInterface(d.s)}),d.p?y=ExpressionPropertyInterface(d.p):(v=ExpressionPropertyInterface(d.px),S=ExpressionPropertyInterface(d.py),d.pz&&(I=ExpressionPropertyInterface(d.pz))),Object.defineProperty(p,"position",{get:function(){return d.p?y():[v(),S(),I?I():0]}}),Object.defineProperty(p,"xPosition",{get:ExpressionPropertyInterface(d.px)}),Object.defineProperty(p,"yPosition",{get:ExpressionPropertyInterface(d.py)}),Object.defineProperty(p,"zPosition",{get:ExpressionPropertyInterface(d.pz)}),Object.defineProperty(p,"anchorPoint",{get:ExpressionPropertyInterface(d.a)}),Object.defineProperty(p,"opacity",{get:ExpressionPropertyInterface(d.o)}),Object.defineProperty(p,"skew",{get:ExpressionPropertyInterface(d.sk)}),Object.defineProperty(p,"skewAxis",{get:ExpressionPropertyInterface(d.sa)}),Object.defineProperty(p,"orientation",{get:ExpressionPropertyInterface(d.or)}),p}}(),LayerExpressionInterface=function(){function d(ee){var oe=new Matrix;return void 0!==ee?this._elem.finalTransform.mProp.getValueAtTime(ee).clone(oe):this._elem.finalTransform.mProp.applyToMatrix(oe),oe}function p(ee,oe){var me=this.getMatrix(oe);return me.props[12]=0,me.props[13]=0,me.props[14]=0,this.applyPoint(me,ee)}function v(ee,oe){var me=this.getMatrix(oe);return this.applyPoint(me,ee)}function S(ee,oe){var me=this.getMatrix(oe);return me.props[12]=0,me.props[13]=0,me.props[14]=0,this.invertPoint(me,ee)}function I(ee,oe){var me=this.getMatrix(oe);return this.invertPoint(me,ee)}function y(ee,oe){if(this._elem.hierarchy&&this._elem.hierarchy.length){var me,K=this._elem.hierarchy.length;for(me=0;me<K;me+=1)this._elem.hierarchy[me].finalTransform.mProp.applyToMatrix(ee)}return ee.applyToPointArray(oe[0],oe[1],oe[2]||0)}function U(ee,oe){if(this._elem.hierarchy&&this._elem.hierarchy.length){var me,K=this._elem.hierarchy.length;for(me=0;me<K;me+=1)this._elem.hierarchy[me].finalTransform.mProp.applyToMatrix(ee)}return ee.inversePoint(oe)}function q(ee){var oe=new Matrix;if(oe.reset(),this._elem.finalTransform.mProp.applyToMatrix(oe),this._elem.hierarchy&&this._elem.hierarchy.length){var me,K=this._elem.hierarchy.length;for(me=0;me<K;me+=1)this._elem.hierarchy[me].finalTransform.mProp.applyToMatrix(oe);return oe.inversePoint(ee)}return oe.inversePoint(ee)}function X(){return[1,1,1,1]}return function(ee){var oe;function le(se){switch(se){case"ADBE Root Vectors Group":case"Contents":case 2:return le.shapeInterface;case 1:case 6:case"Transform":case"transform":case"ADBE Transform Group":return oe;case 4:case"ADBE Effect Parade":case"effects":case"Effects":return le.effect;case"ADBE Text Properties":return le.textInterface;default:return null}}le.getMatrix=d,le.invertPoint=U,le.applyPoint=y,le.toWorld=v,le.toWorldVec=p,le.fromWorld=I,le.fromWorldVec=S,le.toComp=v,le.fromComp=q,le.sampleImage=X,le.sourceRectAtTime=ee.sourceRectAtTime.bind(ee),le._elem=ee;var ce=getDescriptor(oe=TransformExpressionInterface(ee.finalTransform.mProp),"anchorPoint");return Object.defineProperties(le,{hasParent:{get:function(){return ee.hierarchy.length}},parent:{get:function(){return ee.hierarchy[0].layerInterface}},rotation:getDescriptor(oe,"rotation"),scale:getDescriptor(oe,"scale"),position:getDescriptor(oe,"position"),opacity:getDescriptor(oe,"opacity"),anchorPoint:ce,anchor_point:ce,transform:{get:function(){return oe}},active:{get:function(){return ee.isInRange}}}),le.startTime=ee.data.st,le.index=ee.data.ind,le.source=ee.data.refId,le.height=0===ee.data.ty?ee.data.h:100,le.width=0===ee.data.ty?ee.data.w:100,le.inPoint=ee.data.ip/ee.comp.globalData.frameRate,le.outPoint=ee.data.op/ee.comp.globalData.frameRate,le._name=ee.data.nm,le.registerMaskInterface=function me(se){le.mask=new MaskManagerInterface(se,ee)},le.registerEffectsInterface=function K(se){le.effect=se},le}}(),propertyGroupFactory=function(){return function(d,p){return function(v){return(v=void 0===v?1:v)<=0?d:p(v-1)}}}(),PropertyInterface=function(){return function(d,p){var v={_name:d};return function S(I){return(I=void 0===I?1:I)<=0?v:p(I-1)}}}(),EffectsExpressionInterface=function(){function v(I,y,U,q){function X(le){for(var ce=I.ef,se=0,be=ce.length;se<be;){if(le===ce[se].nm||le===ce[se].mn||le===ce[se].ix)return 5===ce[se].ty?oe[se]:oe[se]();se+=1}throw new Error}var me,ee=propertyGroupFactory(X,U),oe=[],K=I.ef.length;for(me=0;me<K;me+=1)oe.push(5===I.ef[me].ty?v(I.ef[me],y.effectElements[me],y.effectElements[me].propertyGroup,q):S(y.effectElements[me],I.ef[me].ty,q,ee));return"ADBE Color Control"===I.mn&&Object.defineProperty(X,"color",{get:function(){return oe[0]()}}),Object.defineProperties(X,{numProperties:{get:function(){return I.np}},_name:{value:I.nm},propertyGroup:{value:ee}}),X.active=X.enabled=0!==I.en,X}function S(I,y,U,q){var X=ExpressionPropertyInterface(I.p);return I.p.setGroupProperty&&I.p.setGroupProperty(PropertyInterface("",q)),function ee(){return 10===y?U.comp.compInterface(I.p.v):X()}}return{createEffectsInterface:function p(I,y){if(I.effectsManager){var X,U=[],q=I.data.ef,ee=I.effectsManager.effectElements.length;for(X=0;X<ee;X+=1)U.push(v(q[X],I.effectsManager.effectElements[X],y,I));var oe=I.data.ef||[],me=function(le){for(X=0,ee=oe.length;X<ee;){if(le===oe[X].nm||le===oe[X].mn||le===oe[X].ix)return U[X];X+=1}return null};return Object.defineProperty(me,"numProperties",{get:function(){return oe.length}}),me}return null}}}(),ShapePathInterface=function(){return function(p,v,S){var I=v.sh;function y(q){return"Shape"===q||"shape"===q||"Path"===q||"path"===q||"ADBE Vector Shape"===q||2===q?y.path:null}var U=propertyGroupFactory(y,S);return I.setGroupProperty(PropertyInterface("Path",U)),Object.defineProperties(y,{path:{get:function(){return I.k&&I.getValue(),I}},shape:{get:function(){return I.k&&I.getValue(),I}},_name:{value:p.nm},ix:{value:p.ix},propertyIndex:{value:p.ix},mn:{value:p.mn},propertyGroup:{value:S}}),y}}(),ShapeExpressionInterface=function(){function d(ce,se,be){var re,ae=[],j=ce?ce.length:0;for(re=0;re<j;re+=1)"gr"===ce[re].ty?ae.push(v(ce[re],se[re],be)):"fl"===ce[re].ty?ae.push(S(ce[re],se[re],be)):"st"===ce[re].ty?ae.push(U(ce[re],se[re],be)):"tm"===ce[re].ty?ae.push(q(ce[re],se[re],be)):"tr"===ce[re].ty||ae.push("el"===ce[re].ty?ee(ce[re],se[re],be):"sr"===ce[re].ty?oe(ce[re],se[re],be):"sh"===ce[re].ty?ShapePathInterface(ce[re],se[re],be):"rc"===ce[re].ty?me(ce[re],se[re],be):"rd"===ce[re].ty?K(ce[re],se[re],be):"rp"===ce[re].ty?le(ce[re],se[re],be):"gf"===ce[re].ty?I(ce[re],se[re],be):function ce(){return null});return ae}function v(ce,se,be){var ae=function(ue){switch(ue){case"ADBE Vectors Group":case"Contents":case 2:return ae.content;default:return ae.transform}};ae.propertyGroup=propertyGroupFactory(ae,be);var re=function p(ce,se,be){var ae,re=function(ue){for(var _e=0,we=ae.length;_e<we;){if(ae[_e]._name===ue||ae[_e].mn===ue||ae[_e].propertyIndex===ue||ae[_e].ix===ue||ae[_e].ind===ue)return ae[_e];_e+=1}return"number"==typeof ue?ae[ue-1]:null};re.propertyGroup=propertyGroupFactory(re,be),ae=d(ce.it,se.it,re.propertyGroup),re.numProperties=ae.length;var j=X(ce.it[ce.it.length-1],se.it[se.it.length-1],re.propertyGroup);return re.transform=j,re.propertyIndex=ce.cix,re._name=ce.nm,re}(ce,se,ae.propertyGroup),j=X(ce.it[ce.it.length-1],se.it[se.it.length-1],ae.propertyGroup);return ae.content=re,ae.transform=j,Object.defineProperty(ae,"_name",{get:function(){return ce.nm}}),ae.numProperties=ce.np,ae.propertyIndex=ce.ix,ae.nm=ce.nm,ae.mn=ce.mn,ae}function S(ce,se,be){function ae(re){return"Color"===re||"color"===re?ae.color:"Opacity"===re||"opacity"===re?ae.opacity:null}return Object.defineProperties(ae,{color:{get:ExpressionPropertyInterface(se.c)},opacity:{get:ExpressionPropertyInterface(se.o)},_name:{value:ce.nm},mn:{value:ce.mn}}),se.c.setGroupProperty(PropertyInterface("Color",be)),se.o.setGroupProperty(PropertyInterface("Opacity",be)),ae}function I(ce,se,be){function ae(re){return"Start Point"===re||"start point"===re?ae.startPoint:"End Point"===re||"end point"===re?ae.endPoint:"Opacity"===re||"opacity"===re?ae.opacity:null}return Object.defineProperties(ae,{startPoint:{get:ExpressionPropertyInterface(se.s)},endPoint:{get:ExpressionPropertyInterface(se.e)},opacity:{get:ExpressionPropertyInterface(se.o)},type:{get:function(){return"a"}},_name:{value:ce.nm},mn:{value:ce.mn}}),se.s.setGroupProperty(PropertyInterface("Start Point",be)),se.e.setGroupProperty(PropertyInterface("End Point",be)),se.o.setGroupProperty(PropertyInterface("Opacity",be)),ae}
vendor: 7,492 bytes, line 83
83function U(ce,se,be){var $,Oe,ae=propertyGroupFactory(we,be),re=propertyGroupFactory(_e,ae),ue=ce.d?ce.d.length:0,_e={};for($=0;$<ue;$+=1)Oe=$,Object.defineProperty(_e,ce.d[Oe].nm,{get:ExpressionPropertyInterface(se.d.dataProps[Oe].p)}),se.d.dataProps[$].p.setGroupProperty(re);function we(Oe){return"Color"===Oe||"color"===Oe?we.color:"Opacity"===Oe||"opacity"===Oe?we.opacity:"Stroke Width"===Oe||"stroke width"===Oe?we.strokeWidth:null}return Object.defineProperties(we,{color:{get:ExpressionPropertyInterface(se.c)},opacity:{get:ExpressionPropertyInterface(se.o)},strokeWidth:{get:ExpressionPropertyInterface(se.w)},dash:{get:function(){return _e}},_name:{value:ce.nm},mn:{value:ce.mn}}),se.c.setGroupProperty(PropertyInterface("Color",ae)),se.o.setGroupProperty(PropertyInterface("Opacity",ae)),se.w.setGroupProperty(PropertyInterface("Stroke Width",ae)),we}function q(ce,se,be){function ae(j){return j===ce.e.ix||"End"===j||"end"===j?ae.end:j===ce.s.ix?ae.start:j===ce.o.ix?ae.offset:null}var re=propertyGroupFactory(ae,be);return ae.propertyIndex=ce.ix,se.s.setGroupProperty(PropertyInterface("Start",re)),se.e.setGroupProperty(PropertyInterface("End",re)),se.o.setGroupProperty(PropertyInterface("Offset",re)),ae.propertyIndex=ce.ix,ae.propertyGroup=be,Object.defineProperties(ae,{start:{get:ExpressionPropertyInterface(se.s)},end:{get:ExpressionPropertyInterface(se.e)},offset:{get:ExpressionPropertyInterface(se.o)},_name:{value:ce.nm}}),ae.mn=ce.mn,ae}function X(ce,se,be){function ae(j){return ce.a.ix===j||"Anchor Point"===j?ae.anchorPoint:ce.o.ix===j||"Opacity"===j?ae.opacity:ce.p.ix===j||"Position"===j?ae.position:ce.r.ix===j||"Rotation"===j||"ADBE Vector Rotation"===j?ae.rotation:ce.s.ix===j||"Scale"===j?ae.scale:ce.sk&&ce.sk.ix===j||"Skew"===j?ae.skew:ce.sa&&ce.sa.ix===j||"Skew Axis"===j?ae.skewAxis:null}var re=propertyGroupFactory(ae,be);return se.transform.mProps.o.setGroupProperty(PropertyInterface("Opacity",re)),se.transform.mProps.p.setGroupProperty(PropertyInterface("Position",re)),se.transform.mProps.a.setGroupProperty(PropertyInterface("Anchor Point",re)),se.transform.mProps.s.setGroupProperty(PropertyInterface("Scale",re)),se.transform.mProps.r.setGroupProperty(PropertyInterface("Rotation",re)),se.transform.mProps.sk&&(se.transform.mProps.sk.setGroupProperty(PropertyInterface("Skew",re)),se.transform.mProps.sa.setGroupProperty(PropertyInterface("Skew Angle",re))),se.transform.op.setGroupProperty(PropertyInterface("Opacity",re)),Object.defineProperties(ae,{opacity:{get:ExpressionPropertyInterface(se.transform.mProps.o)},position:{get:ExpressionPropertyInterface(se.transform.mProps.p)},anchorPoint:{get:ExpressionPropertyInterface(se.transform.mProps.a)},scale:{get:ExpressionPropertyInterface(se.transform.mProps.s)},rotation:{get:ExpressionPropertyInterface(se.transform.mProps.r)},skew:{get:ExpressionPropertyInterface(se.transform.mProps.sk)},skewAxis:{get:ExpressionPropertyInterface(se.transform.mProps.sa)},_name:{value:ce.nm}}),ae.ty="tr",ae.mn=ce.mn,ae.propertyGroup=be,ae}function ee(ce,se,be){function ae($){return ce.p.ix===$?ae.position:ce.s.ix===$?ae.size:null}var re=propertyGroupFactory(ae,be);ae.propertyIndex=ce.ix;var j="tm"===se.sh.ty?se.sh.prop:se.sh;return j.s.setGroupProperty(PropertyInterface("Size",re)),j.p.setGroupProperty(PropertyInterface("Position",re)),Object.defineProperties(ae,{size:{get:ExpressionPropertyInterface(j.s)},position:{get:ExpressionPropertyInterface(j.p)},_name:{value:ce.nm}}),ae.mn=ce.mn,ae}function oe(ce,se,be){function ae($){return ce.p.ix===$?ae.position:ce.r.ix===$?ae.rotation:ce.pt.ix===$?ae.points:ce.or.ix===$||"ADBE Vector Star Outer Radius"===$?ae.outerRadius:ce.os.ix===$?ae.outerRoundness:!ce.ir||ce.ir.ix!==$&&"ADBE Vector Star Inner Radius"!==$?ce.is&&ce.is.ix===$?ae.innerRoundness:null:ae.innerRadius}var re=propertyGroupFactory(ae,be),j="tm"===se.sh.ty?se.sh.prop:se.sh;return ae.propertyIndex=ce.ix,j.or.setGroupProperty(PropertyInterface("Outer Radius",re)),j.os.setGroupProperty(PropertyInterface("Outer Roundness",re)),j.pt.setGroupProperty(PropertyInterface("Points",re)),j.p.setGroupProperty(PropertyInterface("Position",re)),j.r.setGroupProperty(PropertyInterface("Rotation",re)),ce.ir&&(j.ir.setGroupProperty(PropertyInterface("Inner Radius",re)),j.is.setGroupProperty(PropertyInterface("Inner Roundness",re))),Object.defineProperties(ae,{position:{get:ExpressionPropertyInterface(j.p)},rotation:{get:ExpressionPropertyInterface(j.r)},points:{get:ExpressionPropertyInterface(j.pt)},outerRadius:{get:ExpressionPropertyInterface(j.or)},outerRoundness:{get:ExpressionPropertyInterface(j.os)},innerRadius:{get:ExpressionPropertyInterface(j.ir)},innerRoundness:{get:ExpressionPropertyInterface(j.is)},_name:{value:ce.nm}}),ae.mn=ce.mn,ae}function me(ce,se,be){function ae($){return ce.p.ix===$?ae.position:ce.r.ix===$?ae.roundness:ce.s.ix===$||"Size"===$||"ADBE Vector Rect Size"===$?ae.size:null}var re=propertyGroupFactory(ae,be),j="tm"===se.sh.ty?se.sh.prop:se.sh;return ae.propertyIndex=ce.ix,j.p.setGroupProperty(PropertyInterface("Position",re)),j.s.setGroupProperty(PropertyInterface("Size",re)),j.r.setGroupProperty(PropertyInterface("Rotation",re)),Object.defineProperties(ae,{position:{get:ExpressionPropertyInterface(j.p)},roundness:{get:ExpressionPropertyInterface(j.r)},size:{get:ExpressionPropertyInterface(j.s)},_name:{value:ce.nm}}),ae.mn=ce.mn,ae}function K(ce,se,be){function ae($){return ce.r.ix===$||"Round Corners 1"===$?ae.radius:null}var re=propertyGroupFactory(ae,be),j=se;return ae.propertyIndex=ce.ix,j.rd.setGroupProperty(PropertyInterface("Radius",re)),Object.defineProperties(ae,{radius:{get:ExpressionPropertyInterface(j.rd)},_name:{value:ce.nm}}),ae.mn=ce.mn,ae}function le(ce,se,be){function ae($){return ce.c.ix===$||"Copies"===$?ae.copies:ce.o.ix===$||"Offset"===$?ae.offset:null}var re=propertyGroupFactory(ae,be),j=se;return ae.propertyIndex=ce.ix,j.c.setGroupProperty(PropertyInterface("Copies",re)),j.o.setGroupProperty(PropertyInterface("Offset",re)),Object.defineProperties(ae,{copies:{get:ExpressionPropertyInterface(j.c)},offset:{get:ExpressionPropertyInterface(j.o)},_name:{value:ce.nm}}),ae.mn=ce.mn,ae}return function(ce,se,be){var ae;function re($){if("number"==typeof $)return 0===($=void 0===$?1:$)?be:ae[$-1];for(var ue=0,_e=ae.length;ue<_e;){if(ae[ue]._name===$)return ae[ue];ue+=1}return null}return re.propertyGroup=propertyGroupFactory(re,function j(){return be}),ae=d(ce,se,re.propertyGroup),re.numProperties=ae.length,re._name="Contents",re}}(),TextExpressionInterface=function(){return function(d){var p;function v(S){return"ADBE Text Document"===S?v.sourceText:null}return Object.defineProperty(v,"sourceText",{get:function(){d.textProperty.getValue();var I=d.textProperty.currentData.t;return(!p||I!==p.value)&&((p=new String(I)).value=I||new String(I),Object.defineProperty(p,"style",{get:function(){return{fillColor:d.textProperty.currentData.fc}}})),p}}),v}}();function _typeof$2(d){return _typeof$2="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(p){return typeof p}:function(p){return p&&"function"==typeof Symbol&&p.constructor===Symbol&&p!==Symbol.prototype?"symbol":typeof p},_typeof$2(d)}var FootageInterface=function(){return function(v){function S(I){return"Data"===I?S.dataInterface:null}return S._name="Data",S.dataInterface=function(S){function I(y){return"Outline"===y?I.outlineInterface():null}return I._name="Outline",I.outlineInterface=function(S){var I="",y=S.getFootageData();
83function q(X){if(y[X])return I=X,"object"===_typeof$2(y=y[X])?q:y;var ee=X.indexOf(I);if(-1!==ee){var oe=parseInt(X.substr(ee+I.length),10);return"object"===_typeof$2(y=y[oe])?q:y}return""}return function U(){return I="",y=S.getFootageData(),q}}(S),I}(v),S}}(),interfaces={layer:LayerExpressionInterface,effects:EffectsExpressionInterface,comp:CompExpressionInterface,shape:ShapeExpressionInterface,text:TextExpressionInterface,footage:FootageInterface};function getInterface(d){return interfaces[d]||null}function _typeof$1(d){return _typeof$1="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(p){return typeof p}:function(p){return p&&"function"==typeof Symbol&&p.constructor===Symbol&&p!==Symbol.prototype?"symbol":typeof p},_typeof$1(d)}function seedRandom(d,p){var v=this,S=256,U="random",q=p.pow(S,6),X=p.pow(2,52),ee=2*X;function le(j){var $,ue=j.length,_e=this,we=0,Oe=_e.i=_e.j=0,it=_e.S=[];for(ue||(j=[ue++]);we<S;)it[we]=we++;for(we=0;we<S;we++)it[we]=it[Oe=255&Oe+j[we%ue]+($=it[we])],it[Oe]=$;_e.g=function(on){for(var Yt,_t=0,Kt=_e.i,Rn=_e.j,Mt=_e.S;on--;)Yt=Mt[Kt=255&Kt+1],_t=_t*S+Mt[255&(Mt[Kt]=Mt[Rn=255&Rn+Yt])+(Mt[Rn]=Yt)];return _e.i=Kt,_e.j=Rn,_t}}function ce(j,$){return $.i=j.i,$.j=j.j,$.S=j.S.slice(),$}function se(j,$){var we,ue=[],_e=_typeof$1(j);if($&&"object"==_e)for(we in j)try{ue.push(se(j[we],$-1))}catch{}return ue.length?ue:"string"==_e?j:j+"\0"}function be(j,$){for(var _e,ue=j+"",we=0;we<ue.length;)$[255&we]=255&(_e^=19*$[255&we])+ue.charCodeAt(we++);return re($)}function re(j){return String.fromCharCode.apply(0,j)}p["seed"+U]=function K(j,$,ue){var _e=[],we=be(se(($=!0===$?{entropy:!0}:$||{}).entropy?[j,re(d)]:null===j?function ae(){try{undefined;var j=new Uint8Array(S);return(v.crypto||v.msCrypto).getRandomValues(j),re(j)}catch{var $=v.navigator,ue=$&&$.plugins;return[+new Date,v,ue,v.screen,re(d)]}}():j,3),_e),Oe=new le(_e),it=function(){for(var Yt=Oe.g(6),_t=q,Kt=0;Yt<X;)Yt=(Yt+Kt)*S,_t*=S,Kt=Oe.g(1);for(;Yt>=ee;)Yt/=2,_t/=2,Kt>>>=1;return(Yt+Kt)/_t};return it.int32=function(){return 0|Oe.g(4)},it.quick=function(){return Oe.g(4)/4294967296},it.double=it,be(re(Oe.S),d),($.pass||ue||function(on,Yt,_t,Kt){return Kt&&(Kt.S&&ce(Kt,Oe),on.state=function(){return ce(Oe,{})}),_t?(p[U]=on,Yt):on})(it,we,"global"in $?$.global:this==p,$.state)},be(p.random(),d)}function initialize$2(d){seedRandom([],d)}var propTypes={SHAPE:"shape"};function _typeof(d){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(p){return typeof p}:function(p){return p&&"function"==typeof Symbol&&p.constructor===Symbol&&p!==Symbol.prototype?"symbol":typeof p},_typeof(d)}var ExpressionManager=function(){var ob={},Math=BMMath,window=null,document=null,XMLHttpRequest=null,fetch=null,frames=null;function $bm_isInstanceOfArray(d){return d.constructor===Array||d.constructor===Float32Array}function isNumerable(d,p){return"number"===d||"boolean"===d||"string"===d||p instanceof Number}function $bm_neg(d){var p=_typeof(d);if("number"===p||"boolean"===p||d instanceof Number)return-d;if($bm_isInstanceOfArray(d)){var v,S=d.length,I=[];for(v=0;v<S;v+=1)I[v]=-d[v];return I}return d.propType?d.v:-d}initialize$2(BMMath);var easeInBez=BezierFactory.getBezierEasing(.333,0,.833,.833,"easeIn").get,easeOutBez=BezierFactory.getBezierEasing(.167,.167,.667,1,"easeOut").get,easeInOutBez=BezierFactory.getBezierEasing(.33,0,.667,1,"easeInOut").get;function sum(d,p){var v=_typeof(d),S=_typeof(p);if("string"===v||"string"===S||isNumerable(v,d)&&isNumerable(S,p))return d+p;if($bm_isInstanceOfArray(d)&&isNumerable(S,p))return(d=d.slice(0))[0]+=p,d;if(isNumerable(v,d)&&$bm_isInstanceOfArray(p))return(p=p.slice(0))[0]=d+p[0],p;if($bm_isInstanceOfArray(d)&&$bm_isInstanceOfArray(p)){for(var I=0,y=d.length,U=p.length,q=[];I<y||I<U;)q[I]=("number"==typeof d[I]||d[I]instanceof Number)&&("number"==typeof p[I]||p[I]instanceof Number)?d[I]+p[I]:void 0===p[I]?d[I]:d[I]||p[I],I+=1;return q}return 0}var add=sum;function sub(d,p){var v=_typeof(d),S=_typeof(p);if(isNumerable(v,d)&&isNumerable(S,p))return"string"===v&&(d=parseInt(d,10)),"string"===S&&(p=parseInt(p,10)),d-p;if($bm_isInstanceOfArray(d)&&isNumerable(S,p))return(d=d.slice(0))[0]-=p,d;if(isNumerable(v,d)&&$bm_isInstanceOfArray(p))return(p=p.slice(0))[0]=d-p[0],p;if($bm_isInstanceOfArray(d)&&$bm_isInstanceOfArray(p)){for(var I=0,y=d.length,U=p.length,q=[];I<y||I<U;)q[I]=("number"==typeof d[I]||d[I]instanceof Number)&&("number"==typeof p[I]||p[I]instanceof Number)?d[I]-p[I]:void 0===p[I]?d[I]:d[I]||p[I],I+=1;return q}return 0}function mul(d,p){var I,y,U,v=_typeof(d),S=_typeof(p);if(isNumerable(v,d)&&isNumerable(S,p))return d*p;if($bm_isInstanceOfArray(d)&&isNumerable(S,p)){for(I=createTypedArray("float32",U=d.length),y=0;y<U;y+=1)I[y]=d[y]*p;return I}if(isNumerable(v,d)&&$bm_isInstanceOfArray(p)){for(I=createTypedArray("float32",U=p.length),y=0;y<U;y+=1)I[y]=d*p[y];return I}return 0}function div(d,p){var I,y,U,v=_typeof(d),S=_typeof(p);if(isNumerable(v,d)&&isNumerable(S,p))return d/p;if($bm_isInstanceOfArray(d)&&isNumerable(S,p)){for(I=createTypedArray("float32",U=d.length),y=0;y<U;y+=1)I[y]=d[y]/p;return I}if(isNumerable(v,d)&&$bm_isInstanceOfArray(p)){for(I=createTypedArray("float32",U=p.length),y=0;y<U;y+=1)I[y]=d/p[y];return I}return 0}function mod(d,p){return"string"==typeof d&&(d=parseInt(d,10)),"string"==typeof p&&(p=parseInt(p,10)),d%p}var $bm_sum=sum,$bm_sub=sub,$bm_mul=mul,$bm_div=div,$bm_mod=mod;function clamp(d,p,v){if(p>v){var S=v;v=p,p=S}return Math.min(Math.max(d,p),v)}function radiansToDegrees(d){return d/degToRads}
vendor: 5,102 bytes, line 83
83var radians_to_degrees=radiansToDegrees;function degreesToRadians(d){return d*degToRads}var degrees_to_radians=radiansToDegrees,helperLengthArray=[0,0,0,0,0,0];function length(d,p){if("number"==typeof d||d instanceof Number)return Math.abs(d-(p=p||0));p||(p=helperLengthArray);var v,S=Math.min(d.length,p.length),I=0;for(v=0;v<S;v+=1)I+=Math.pow(p[v]-d[v],2);return Math.sqrt(I)}function normalize(d){return div(d,length(d))}function rgbToHsl(d){var U,q,p=d[0],v=d[1],S=d[2],I=Math.max(p,v,S),y=Math.min(p,v,S),X=(I+y)/2;if(I===y)U=0,q=0;else{var ee=I-y;switch(q=X>.5?ee/(2-I-y):ee/(I+y),I){case p:U=(v-S)/ee+(v<S?6:0);break;case v:U=(S-p)/ee+2;break;case S:U=(p-v)/ee+4}U/=6}return[U,q,X,d[3]]}function hue2rgb(d,p,v){return v<0&&(v+=1),v>1&&(v-=1),v<1/6?d+6*(p-d)*v:v<.5?p:v<2/3?d+(p-d)*(2/3-v)*6:d}function hslToRgb(d){var I,y,U,p=d[0],v=d[1],S=d[2];if(0===v)I=S,U=S,y=S;else{var q=S<.5?S*(1+v):S+v-S*v,X=2*S-q;I=hue2rgb(X,q,p+1/3),y=hue2rgb(X,q,p),U=hue2rgb(X,q,p-1/3)}return[I,y,U,d[3]]}function linear(d,p,v,S,I){if((void 0===S||void 0===I)&&(S=p,I=v,p=0,v=1),v<p){var y=v;v=p,p=y}if(d<=p)return S;if(d>=v)return I;var U=v===p?0:(d-p)/(v-p);if(!S.length)return S+(I-S)*U;var q,X=S.length,ee=createTypedArray("float32",X);for(q=0;q<X;q+=1)ee[q]=S[q]+(I[q]-S[q])*U;return ee}function random(d,p){if(void 0===p&&(void 0===d?(d=0,p=1):(p=d,d=void 0)),p.length){var v,S=p.length;d||(d=createTypedArray("float32",S));var I=createTypedArray("float32",S),y=BMMath.random();for(v=0;v<S;v+=1)I[v]=d[v]+y*(p[v]-d[v]);return I}return void 0===d&&(d=0),d+BMMath.random()*(p-d)}function createPath(d,p,v,S){var I,y=d.length,U=shapePool.newElement();U.setPathData(!!S,y);var X,ee,q=[0,0];for(I=0;I<y;I+=1)U.setTripleAt(d[I][0],d[I][1],(ee=v&&v[I]?v[I]:q)[0]+d[I][0],ee[1]+d[I][1],(X=p&&p[I]?p[I]:q)[0]+d[I][0],X[1]+d[I][1],I,!0);return U}function initiateExpression(elem,data,property){function noOp(d){return d}if(!elem.globalData.renderConfig.runExpressions)return noOp;var val=data.x,needsVelocity=/velocity(?![\w\d])/.test(val),_needsRandom=-1!==val.indexOf("random"),elemType=elem.data.ty,transform,$bm_transform,content,effect,thisProperty=property;thisProperty.valueAtTime=thisProperty.getValueAtTime,Object.defineProperty(thisProperty,"value",{get:function(){return thisProperty.v}}),elem.comp.frameDuration=1/elem.comp.globalData.frameRate,elem.comp.displayStartTime=0;var inPoint=elem.data.ip/elem.comp.globalData.frameRate,outPoint=elem.data.op/elem.comp.globalData.frameRate,width=elem.data.sw?elem.data.sw:0,height=elem.data.sh?elem.data.sh:0,name=elem.data.nm,loopIn,loop_in,loopOut,loop_out,smooth,toWorld,fromWorld,fromComp,toComp,fromCompToSurface,position,rotation,anchorPoint,scale,thisLayer,thisComp,mask,valueAtTime,velocityAtTime,scoped_bm_rt,expression_function=eval("[function _expression_function(){"+val+";scoped_bm_rt=$bm_rt}]")[0],numKeys=property.kf?data.k.length:0,active=!this.data||!0!==this.data.hd,wiggle=function d(p,v){var S,I,y=this.pv.length?this.pv.length:1,U=createTypedArray("float32",y),q=Math.floor(5*time);for(S=0,I=0;S<q;){for(I=0;I<y;I+=1)U[I]+=-v+2*v*BMMath.random();S+=1}var X=5*time,ee=X-Math.floor(X),oe=createTypedArray("float32",y);if(y>1){for(I=0;I<y;I+=1)oe[I]=this.pv[I]+U[I]+(-v+2*v*BMMath.random())*ee;return oe}return this.pv+U[0]+(-v+2*v*BMMath.random())*ee}.bind(this);function loopInDuration(d,p){return loopIn(d,p,!0)}function loopOutDuration(d,p){return loopOut(d,p,!0)}thisProperty.loopIn&&(loopIn=thisProperty.loopIn.bind(thisProperty),loop_in=loopIn),thisProperty.loopOut&&(loopOut=thisProperty.loopOut.bind(thisProperty),loop_out=loopOut),thisProperty.smooth&&(smooth=thisProperty.smooth.bind(thisProperty)),this.getValueAtTime&&(valueAtTime=this.getValueAtTime.bind(this)),this.getVelocityAtTime&&(velocityAtTime=this.getVelocityAtTime.bind(this));var comp=elem.comp.globalData.projectInterface.bind(elem.comp.globalData.projectInterface);function lookAt(d,p){var v=[p[0]-d[0],p[1]-d[1],p[2]-d[2]],S=Math.atan2(v[0],Math.sqrt(v[1]*v[1]+v[2]*v[2]))/degToRads;return[-Math.atan2(v[1],v[2])/degToRads,S,0]}function easeOut(d,p,v,S,I){return applyEase(easeOutBez,d,p,v,S,I)}function easeIn(d,p,v,S,I){return applyEase(easeInBez,d,p,v,S,I)}function ease(d,p,v,S,I){return applyEase(easeInOutBez,d,p,v,S,I)}function applyEase(d,p,v,S,I,y){void 0===I?(I=v,y=S):p=(p-v)/(S-v),p>1?p=1:p<0&&(p=0);var U=d(p);if($bm_isInstanceOfArray(I)){var q,X=I.length,ee=createTypedArray("float32",X);for(q=0;q<X;q+=1)ee[q]=(y[q]-I[q])*U+I[q];return ee}return(y-I)*U+I}function nearestKey(d){var p,S,I,v=data.k.length;if(data.k.length&&"number"!=typeof data.k[0])if(S=-1,(d*=elem.comp.globalData.frameRate)<data.k[0].t)S=1,I=data.k[0].t;else{for(p=0;p<v-1;p+=1){if(d===data.k[p].t){S=p+1,I=data.k[p].t;break}if(d>data.k[p].t&&d<data.k[p+1].t){d-data.k[p].t>data.k[p+1].t-d?(S=p+2,I=data.k[p+1].t):(S=p+1,I=data.k[p].t);break}}-1===S&&(S=p+1,I=data.k[p].t)}else S=0,I=0;var y={};return y.index=S,y.time=I/elem.comp.globalData.frameRate,y}function key(d){var p,v,S;if(!data.k.length||"number"==typeof data.k[0])throw new Error("The property has no keyframe at index "+d
vendor: 16,673 bytes, line 83
83);p={time:data.k[d-=1].t/elem.comp.globalData.frameRate,value:[]};var I=Object.prototype.hasOwnProperty.call(data.k[d],"s")?data.k[d].s:data.k[d-1].e;for(S=I.length,v=0;v<S;v+=1)p[v]=I[v],p.value[v]=I[v];return p}function framesToTime(d,p){return p||(p=elem.comp.globalData.frameRate),d/p}function timeToFrames(d,p){return!d&&0!==d&&(d=time),p||(p=elem.comp.globalData.frameRate),d*p}function seedRandom(d){BMMath.seedrandom(randSeed+d)}function sourceRectAtTime(){return elem.sourceRectAtTime()}function substring(d,p){return"string"==typeof value?void 0===p?value.substring(d):value.substring(d,p):""}function substr(d,p){return"string"==typeof value?void 0===p?value.substr(d):value.substr(d,p):""}function posterizeTime(d){time=0===d?0:Math.floor(time*d)/d,value=valueAtTime(time)}var time,velocity,value,text,textIndex,textTotal,selectorValue,index=elem.data.ind,hasParent=!(!elem.hierarchy||!elem.hierarchy.length),parent,randSeed=Math.floor(1e6*Math.random()),globalData=elem.globalData;function executeExpression(d){return value=d,this.frameExpressionId===elem.globalData.frameId&&"textSelector"!==this.propType?value:("textSelector"===this.propType&&(textIndex=this.textIndex,textTotal=this.textTotal,selectorValue=this.selectorValue),thisLayer||(text=elem.layerInterface.text,thisComp=elem.comp.compInterface,toWorld=(thisLayer=elem.layerInterface).toWorld.bind(thisLayer),fromWorld=thisLayer.fromWorld.bind(thisLayer),fromComp=thisLayer.fromComp.bind(thisLayer),toComp=thisLayer.toComp.bind(thisLayer),mask=thisLayer.mask?thisLayer.mask.bind(thisLayer):null,fromCompToSurface=fromComp),transform||(transform=elem.layerInterface("ADBE Transform Group"),$bm_transform=transform,transform&&(anchorPoint=transform.anchorPoint)),4===elemType&&!content&&(content=thisLayer("ADBE Root Vectors Group")),effect||(effect=thisLayer(4)),(hasParent=!(!elem.hierarchy||!elem.hierarchy.length))&&!parent&&(parent=elem.hierarchy[0].layerInterface),time=this.comp.renderedFrame/this.comp.globalData.frameRate,_needsRandom&&seedRandom(randSeed+time),needsVelocity&&(velocity=velocityAtTime(time)),expression_function(),this.frameExpressionId=elem.globalData.frameId,scoped_bm_rt=scoped_bm_rt.propType===propTypes.SHAPE?scoped_bm_rt.v:scoped_bm_rt)}return executeExpression.__preventDeadCodeRemoval=[$bm_transform,anchorPoint,time,velocity,inPoint,outPoint,width,height,name,loop_in,loop_out,smooth,toComp,fromCompToSurface,toWorld,fromWorld,mask,position,rotation,scale,thisComp,numKeys,active,wiggle,loopInDuration,loopOutDuration,comp,lookAt,easeOut,easeIn,ease,nearestKey,key,text,textIndex,textTotal,selectorValue,framesToTime,timeToFrames,sourceRectAtTime,substring,substr,posterizeTime,index,globalData],executeExpression}return ob.initiateExpression=initiateExpression,ob.__preventDeadCodeRemoval=[window,document,XMLHttpRequest,fetch,frames,$bm_neg,add,$bm_sum,$bm_sub,$bm_mul,$bm_div,$bm_mod,clamp,radians_to_degrees,degreesToRadians,degrees_to_radians,normalize,rgbToHsl,hslToRgb,linear,random,createPath],ob}(),expressionHelpers=function(){return{searchExpressions:function d(U,q,X){q.x&&(X.k=!0,X.x=!0,X.initiateExpression=ExpressionManager.initiateExpression,X.effectsSequence.push(X.initiateExpression(U,q,X).bind(X)))},getSpeedAtTime:function v(U){var X=this.getValueAtTime(U),ee=this.getValueAtTime(U+-.01),oe=0;if(X.length){var me;for(me=0;me<X.length;me+=1)oe+=Math.pow(ee[me]-X[me],2);oe=100*Math.sqrt(oe)}else oe=0;return oe},getVelocityAtTime:function S(U){if(void 0!==this.vel)return this.vel;var oe,me,q=-.001,X=this.getValueAtTime(U),ee=this.getValueAtTime(U+q);if(X.length)for(oe=createTypedArray("float32",X.length),me=0;me<X.length;me+=1)oe[me]=(ee[me]-X[me])/q;else oe=(ee-X)/q;return oe},getValueAtTime:function p(U){return U*=this.elem.globalData.frameRate,(U-=this.offsetTime)!==this._cachingAtTime.lastFrame&&(this._cachingAtTime.lastIndex=this._cachingAtTime.lastFrame<U?this._cachingAtTime.lastIndex:0,this._cachingAtTime.value=this.interpolateValue(U,this._cachingAtTime),this._cachingAtTime.lastFrame=U),this._cachingAtTime.value},getStaticValueAtTime:function I(){return this.pv},setGroupProperty:function y(U){this.propertyGroup=U}}}();function addPropertyDecorator(){function d(K,le,ce){if(!this.k||!this.keyframes)return this.pv;K=K?K.toLowerCase():"";var re,j,$,ue,_e,se=this.comp.renderedFrame,be=this.keyframes,ae=be[be.length-1].t;if(se<=ae)return this.pv;if(ce?j=ae-(re=le?Math.abs(ae-this.elem.comp.globalData.frameRate*le):Math.max(0,ae-this.elem.data.ip)):((!le||le>be.length-1)&&(le=be.length-1),re=ae-(j=be[be.length-1-le].t)),"pingpong"===K){if(Math.floor((se-j)/re)%2!=0)return this.getValueAtTime((re-(se-j)%re+j)/this.comp.globalData.frameRate,0)}else{if("offset"===K){var Oe=this.getValueAtTime(j/this.comp.globalData.frameRate,0),it=this.getValueAtTime(ae/this.comp.globalData.frameRate,0),on=this.getValueAtTime(((se-j)%re+j)/this.comp.globalData.frameRate,0),Yt=Math.floor((se-j)/re);if(this.pv.length){for(ue=(_e=new Array(Oe.length)).length,$=0;$<ue;$+=1)_e[$]=(it[$]-Oe[$])*Yt+on[$];return _e}return(it-Oe)*Yt+on}if("continue"===K){var _t=this.getValueAtTime(ae/this.comp.globalData.frameRate,0),Kt=this.getValueAtTime((ae-.001)/this.comp.globalData.frameRate,0);if(this.pv.length){for(ue=(_e=new Array(_t.length)).length,$=0;$<ue;$+=1)_e[$]=_t[$]+(se-ae)/this.comp.globalData.frameRate*(_t[$]-Kt[$])/5e-4;return _e}return _t+(se-ae)/.001*(_t-Kt)}}return this.getValueAtTime(((se-j)%re+j)/this.comp.globalData.frameRate,0)}function p(K,le,ce){if(!this.k)return this.pv;K=K?K.toLowerCase():"";var re,j,$,ue,_e,se=this.comp.renderedFrame,be=this.keyframes,ae=be[0].t;if(se>=ae)return this.pv;if(ce?j=ae+(re=le?Math.abs(this.elem.comp.globalData.frameRate*le):Math.max(0,this.elem.data.op-ae)):((!le||le>be.length-1)&&(le=be.length-1),re=(j=be[le].t)-ae),"pingpong"===K){if(Math.floor((ae-se)/re)%2==0)return this.getValueAtTime(((ae-se)%re+ae)/this.comp.globalData.frameRate,0)}else{if("offset"===K){var Oe=this.getValueAtTime(ae/this.comp.globalData.frameRate,0),it=this.getValueAtTime(j/this.comp.globalData.frameRate,0),on=this.getValueAtTime((re-(ae-se)%re+ae)/this.comp.globalData.frameRate,0),Yt=Math.floor((ae-se)/re)+1;if(this.pv.length){for(ue=(_e=new Array(Oe.length)).length,$=0;$<ue;$+=1)_e[$]=on[$]-(it[$]-Oe[$])*Yt;return _e}return on-(it-Oe)*Yt}if("continue"===K){var _t=this.getValueAtTime(ae/this.comp.globalData.frameRate,0),Kt=this.getValueAtTime((ae+.001)/this.comp.globalData.frameRate,0);if(this.pv.length){for(ue=(_e=new Array(_t.length)).length,$=0;$<ue;$+=1)_e[$]=_t[$]+(_t[$]-Kt[$])*(ae-se)/.001;return _e}return _t+(_t-Kt)*(ae-se)/.001}}return this.getValueAtTime((re-((ae-se)%re+ae))/this.comp.globalData.frameRate,0)}function v(K,le){if(!this.k)return this.pv;if(K=.5*(K||.4),(le=Math.floor(le||5))<=1)return this.pv;var $,ue,ce=this.comp.renderedFrame/this.comp.globalData.frameRate,se=ce-K,ae=le>1?(ce+K-se)/(le-1):1,re=0,j=0;for($=this.pv.length?createTypedArray("float32",this.pv.length):0;re<le;){if(ue=this.getValueAtTime(se+re*ae),this.pv.length)for(j=0;j<this.pv.length;j+=1)$[j]+=ue[j];else $+=ue;re+=1}if(this.pv.length)for(j=0;j<this.pv.length;j+=1)$[j]/=le;else $/=le;return $}function S(K){this._transformCachingAtTime||(this._transformCachingAtTime={v:new Matrix});var le=this._transformCachingAtTime.v;if(le.cloneFromProps(this.pre.props),this.appliedTransformations<1){var ce=this.a.getValueAtTime(K);le.translate(-ce[0]*this.a.mult,-ce[1]*this.a.mult,ce[2]*this.a.mult)}if(this.appliedTransformations<2){var se=this.s.getValueAtTime(K);le.scale(se[0]*this.s.mult,se[1]*this.s.mult,se[2]*this.s.mult)}if(this.sk&&this.appliedTransformations<3){var be=this.sk.getValueAtTime(K),ae=this.sa.getValueAtTime(K);le.skewFromAxis(-be*this.sk.mult,ae*this.sa.mult)}if(this.r&&this.appliedTransformations<4){var re=this.r.getValueAtTime(K);le.rotate(-re*this.r.mult)}else if(!this.r&&this.appliedTransformations<4){var j=this.rz.getValueAtTime(K),$=this.ry.getValueAtTime(K),ue=this.rx.getValueAtTime(K),_e=this.or.getValueAtTime(K);le.rotateZ(-j*this.rz.mult).rotateY($*this.ry.mult).rotateX(ue*this.rx.mult).rotateZ(-_e[2]*this.or.mult).rotateY(_e[1]*this.or.mult).rotateX(_e[0]*this.or.mult)}if(this.data.p&&this.data.p.s){var we=this.px.getValueAtTime(K),Oe=this.py.getValueAtTime(K);if(this.data.p.z){var it=this.pz.getValueAtTime(K);le.translate(we*this.px.mult,Oe*this.py.mult,-it*this.pz.mult)}else le.translate(we*this.px.mult,Oe*this.py.mult,0)}else{var on=this.p.getValueAtTime(K);le.translate(on[0]*this.p.mult,on[1]*this.p.mult,-on[2]*this.p.mult)}return le}function I(){return this.v.clone(new Matrix)}var y=TransformPropertyFactory.getTransformProperty;TransformPropertyFactory.getTransformProperty=function(K,le,ce){var se=y(K,le,ce);return se.getValueAtTime=se.dynamicProperties.length?S.bind(se):I.bind(se),se.setGroupProperty=expressionHelpers.setGroupProperty,se};var U=PropertyFactory.getProp;PropertyFactory.getProp=function(K,le,ce,se,be){var ae=U(K,le,ce,se,be);ae.getValueAtTime=ae.kf?expressionHelpers.getValueAtTime.bind(ae):expressionHelpers.getStaticValueAtTime.bind(ae),ae.setGroupProperty=expressionHelpers.setGroupProperty,ae.loopOut=d,ae.loopIn=p,ae.smooth=v,ae.getVelocityAtTime=expressionHelpers.getVelocityAtTime.bind(ae),ae.getSpeedAtTime=expressionHelpers.getSpeedAtTime.bind(ae),ae.numKeys=1===le.a?le.k.length:0,ae.propertyIndex=le.ix;var re=0;return 0!==ce&&(re=createTypedArray("float32",1===le.a?le.k[0].s.length:le.k.length)),ae._cachingAtTime={lastFrame:initialDefaultFrame,lastIndex:0,value:re},expressionHelpers.searchExpressions(K,le,ae),ae.k&&be.addDynamicProperty(ae),ae};var X=ShapePropertyFactory.getConstructorFunction(),ee=ShapePropertyFactory.getKeyframedConstructorFunction();function oe(){}oe.prototype={vertices:function(le,ce){this.k&&this.getValue();var se=this.v;void 0!==ce&&(se=this.getValueAtTime(ce,0));var be,ae=se._length,re=se[le],j=se.v,$=createSizedArray(ae);for(be=0;be<ae;be+=1)$[be]="i"===le||"o"===le?[re[be][0]-j[be][0],re[be][1]-j[be][1]]:[re[be][0],re[be][1]];return $},points:function(le){return this.vertices("v",le)},inTangents:function(le){return this.vertices("i",le)},outTangents:function(le){return this.vertices("o",le)},isClosed:function(){return this.v.c},pointOnPath:function(le,ce){var se=this.v;void 0!==ce&&(se=this.getValueAtTime(ce,0)),this._segmentsLength||(this._segmentsLength=bez.getSegmentsLength(se));for(var _e,be=this._segmentsLength,ae=be.lengths,re=be.totalLength*le,j=0,$=ae.length,ue=0;j<$;){if(ue+ae[j].addedLength>re){var Oe=se.c&&j===$-1?0:j+1;_e=bez.getPointInSegment(se.v[j],se.v[Oe],se.o[j],se.i[Oe],(re-ue)/ae[j].addedLength,ae[j]);break}ue+=ae[j].addedLength,j+=1}return _e||(_e=se.c?[se.v[0][0],se.v[0][1]]:[se.v[se._length-1][0],se.v[se._length-1][1]]),_e},vectorOnPath:function(le,ce,se){1==le?le=this.v.c:0==le&&(le=.999);var be=this.pointOnPath(le,ce),ae=this.pointOnPath(le+.001,ce),re=ae[0]-be[0],j=ae[1]-be[1],$=Math.sqrt(Math.pow(re,2)+Math.pow(j,2));return 0===$?[0,0]:"tangent"===se?[re/$,j/$]:[-j/$,re/$]},tangentOnPath:function(le,ce){return this.vectorOnPath(le,ce,"tangent")},normalOnPath:function(le,ce){return this.vectorOnPath(le,ce,"normal")},setGroupProperty:expressionHelpers.setGroupProperty,getValueAtTime:expressionHelpers.getStaticValueAtTime},extendPrototype([oe],X),extendPrototype([oe],ee),ee.prototype.getValueAtTime=function q(K){return this._cachingAtTime||(this._cachingAtTime={shapeValue:shapePool.clone(this.pv),lastIndex:0,lastTime:initialDefaultFrame}),K*=this.elem.globalData.frameRate,(K-=this.offsetTime)!==this._cachingAtTime.lastTime&&(this._cachingAtTime.lastIndex=this._cachingAtTime.lastTime<K?this._caching.lastIndex:0,this._cachingAtTime.lastTime=K,this.interpolateShape(K,this._cachingAtTime.shapeValue,this._cachingAtTime)),this._cachingAtTime.shapeValue},ee.prototype.initiateExpression=ExpressionManager.initiateExpression;var me=ShapePropertyFactory.getShapeProp;ShapePropertyFactory.getShapeProp=function(K,le,ce,se,be){var ae=me(K,le,ce,se,be);return ae.propertyIndex=le.ix,ae.lock=!1,3===ce?expressionHelpers.searchExpressions(K,le.pt,ae):4===ce&&expressionHelpers.searchExpressions(K,le.ks,ae),ae.k&&K.addDynamicProperty(ae),ae}}function initialize$1(){addPropertyDecorator()}function addDecorator(){TextProperty.prototype.getExpressionValue=function(p,v){var S=this.calculateExpression(v);if(p.t!==S){var I={};return this.copyData(I,p),I.t=S.toString(),I.__complete=!1,I}return p},TextProperty.prototype.searchProperty=function(){var p=this.searchKeyframes(),v=this.searchExpressions();return this.kf=p||v,this.kf},TextProperty.prototype.searchExpressions=function d(){return this.data.d.x?(this.calculateExpression=ExpressionManager.initiateExpression.bind(this)(this.elem,this.data.d,this),this.addEffect(this.getExpressionValue.bind(this)),!0):null}}function initialize(){addDecorator()}function SVGComposableEffect(){}SVGComposableEffect.prototype={createMergeNode:function d(p,v){var I,y,S=createNS("feMerge");for(S.setAttribute("result",p),y=0;y<v.length;y+=1)(I=createNS("feMergeNode")).setAttribute("in",v[y]),S.appendChild(I),S.appendChild(I);return S}};var linearFilterValue="0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0";function SVGTintFilter(d,p,v,S,I){this.filterManager=p;var y=createNS("feColorMatrix");y.setAttribute("type","matrix"),y.setAttribute("color-interpolation-filters","linearRGB"),y.setAttribute("values",linearFilterValue+" 1 0"),this.linearFilter=y,y.setAttribute("result",S+"_tint_1"),d.appendChild(y),(y=createNS("feColorMatrix")).setAttribute("type","matrix"),y.setAttribute("color-interpolation-filters","sRGB"),y.setAttribute("values","1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"),y.setAttribute("result",S+"_tint_2"),d.appendChild(y),this.matrixFilter=y;var U=this.createMergeNode(S,[I,S+"_tint_1",S+"_tint_2"]);d.appendChild(U)}function SVGFillFilter(d,p,v,S){this.filterManager=p;var I=createNS("feColorMatrix");I.setAttribute("type","matrix"),I.setAttribute("color-interpolation-filters","sRGB"),I.setAttribute("values","1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"),I.setAttribute("result",S),d.appendChild(I),this.matrixFilter=I}function SVGStrokeEffect(d,p,v){this.initialized=!1,this.filterManager=p,this.elem=v,this.paths=[]}function SVGTritoneFilter(d,p,v,S){this.filterManager=p;var I=createNS("feColorMatrix");I.setAttribute("type","matrix"),I.setAttribute("color-interpolation-filters","linearRGB"),I.setAttribute("values","0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0"),d.appendChild(I);var y=createNS("feComponentTransfer");y.setAttribute("color-interpolation-filters","sRGB"),y.setAttribute("result",S),this.matrixFilter=y;var U=createNS("feFuncR");U.setAttribute("type","table"),y.appendChild(U),this.feFuncR=U;var q=createNS("feFuncG");q.setAttribute("type","table"),y.appendChild(q),this.feFuncG=q;var X=createNS("feFuncB");X.setAttribute("type","table"),y.appendChild(X),this.feFuncB=X,d.appendChild(y)}function SVGProLevelsFilter(d,p,v,S){this.filterManager=p;var I=this.filterManager.effectElements,y=createNS("feComponentTransfer");(I[10].p.k||0!==I[10].p.v||I[11].p.k||1!==I[11].p.v||I[12].p.k||1!==I[12].p.v||I[13].p.k||0!==I[13].p.v||I[14].p.k||1!==I[14].p.v)&&(this.feFuncR=this.createFeFunc("feFuncR",y)),(I[17].p.k||0!==I[17].p.v||I[18].p.k||1!==I[18].p.v||I[19].p.k||1!==I[19].p.v||I[20].p.k||0!==I[20].p.v||I[21].p.k||1!==I[21].p.v)&&(this.feFuncG=this.createFeFunc("feFuncG",y)),(I[24].p.k||0!==I[24].p.v||I[25].p.k||1!==I[25].p.v||I[26].p.k||1!==I[26].p.v||I[27].p.k||0!==I[27].p.v||I[28].p.k||1!==I[28].p.v)&&(this.feFuncB=this.createFeFunc("feFuncB",y)),(I[31].p.k||0!==I[31].p.v||I[32].p.k||1!==I[32].p.v||I[33].p.k||1!==I[33].p.v||I[34].p.k||0!==I[34].p.v||I[35].p.k||1!==I[35].p.v)&&(this.feFuncA=this.createFeFunc("feFuncA",y)),(this.feFuncR||this.feFuncG||this.feFuncB||this.feFuncA)&&(y.setAttribute("color-interpolation-filters","sRGB"),d.appendChild(y)),(I[3].p.k||0!==I[3].p.v||I[4].p.k||1!==I[4].p.v||I[5].p.k||1!==I[5].p.v||I[6].p.k||0!==I[6].p.v||I[7].p.k||1!==I[7].p.v)&&((y=createNS("feComponentTransfer")).setAttribute("color-interpolation-filters","sRGB"),y.setAttribute("result",S),d.appendChild(y),this.feFuncRComposed=this.createFeFunc("feFuncR",y),this.feFuncGComposed=this.createFeFunc("feFuncG",y),this.feFuncBComposed=this.createFeFunc("feFuncB",y))}function SVGDropShadowEffect(d,p,v,S,I){var y=p.container.globalData.renderConfig.filterSize,U=p.data.fs||y;d.setAttribute("x",U.x||y.x),d.setAttribute("y",U.y||y.y),d.setAttribute("width",U.width||y.width),d.setAttribute("height",U.height||y.height),this.filterManager=p;var q=createNS("feGaussianBlur");
vendor: 4,256 bytes, line 83
83q.setAttribute("in","SourceAlpha"),q.setAttribute("result",S+"_drop_shadow_1"),q.setAttribute("stdDeviation","0"),this.feGaussianBlur=q,d.appendChild(q);var X=createNS("feOffset");X.setAttribute("dx","25"),X.setAttribute("dy","0"),X.setAttribute("in",S+"_drop_shadow_1"),X.setAttribute("result",S+"_drop_shadow_2"),this.feOffset=X,d.appendChild(X);var ee=createNS("feFlood");ee.setAttribute("flood-color","#00ff00"),ee.setAttribute("flood-opacity","1"),ee.setAttribute("result",S+"_drop_shadow_3"),this.feFlood=ee,d.appendChild(ee);var oe=createNS("feComposite");oe.setAttribute("in",S+"_drop_shadow_3"),oe.setAttribute("in2",S+"_drop_shadow_2"),oe.setAttribute("operator","in"),oe.setAttribute("result",S+"_drop_shadow_4"),d.appendChild(oe);var me=this.createMergeNode(S,[S+"_drop_shadow_4",I]);d.appendChild(me)}extendPrototype([SVGComposableEffect],SVGTintFilter),SVGTintFilter.prototype.renderFrame=function(d){if(d||this.filterManager._mdf){var p=this.filterManager.effectElements[0].p.v,v=this.filterManager.effectElements[1].p.v;this.linearFilter.setAttribute("values",linearFilterValue+" "+this.filterManager.effectElements[2].p.v/100+" 0"),this.matrixFilter.setAttribute("values",v[0]-p[0]+" 0 0 0 "+p[0]+" "+(v[1]-p[1])+" 0 0 0 "+p[1]+" "+(v[2]-p[2])+" 0 0 0 "+p[2]+" 0 0 0 1 0")}},SVGFillFilter.prototype.renderFrame=function(d){if(d||this.filterManager._mdf){var p=this.filterManager.effectElements[2].p.v;this.matrixFilter.setAttribute("values","0 0 0 0 "+p[0]+" 0 0 0 0 "+p[1]+" 0 0 0 0 "+p[2]+" 0 0 0 "+this.filterManager.effectElements[6].p.v+" 0")}},SVGStrokeEffect.prototype.initialize=function(){var p,v,S,I,d=this.elem.layerElement.children||this.elem.layerElement.childNodes;for(1===this.filterManager.effectElements[1].p.v?(I=this.elem.maskManager.masksProperties.length,S=0):I=1+(S=this.filterManager.effectElements[0].p.v-1),(v=createNS("g")).setAttribute("fill","none"),v.setAttribute("stroke-linecap","round"),v.setAttribute("stroke-dashoffset",1);S<I;S+=1)p=createNS("path"),v.appendChild(p),this.paths.push({p,m:S});if(3===this.filterManager.effectElements[10].p.v){var y=createNS("mask"),U=createElementID();y.setAttribute("id",U),y.setAttribute("mask-type","alpha"),y.appendChild(v),this.elem.globalData.defs.appendChild(y);var q=createNS("g");for(q.setAttribute("mask","url("+getLocationHref()+"#"+U+")");d[0];)q.appendChild(d[0]);this.elem.layerElement.appendChild(q),this.masker=y,v.setAttribute("stroke","#fff")}else if(1===this.filterManager.effectElements[10].p.v||2===this.filterManager.effectElements[10].p.v){if(2===this.filterManager.effectElements[10].p.v)for(d=this.elem.layerElement.children||this.elem.layerElement.childNodes;d.length;)this.elem.layerElement.removeChild(d[0]);this.elem.layerElement.appendChild(v),this.elem.layerElement.removeAttribute("mask"),v.setAttribute("stroke","#fff")}this.initialized=!0,this.pathMasker=v},SVGStrokeEffect.prototype.renderFrame=function(d){this.initialized||this.initialize();var p,S,I,v=this.paths.length;for(p=0;p<v;p+=1)if(-1!==this.paths[p].m&&(S=this.elem.maskManager.viewData[this.paths[p].m],I=this.paths[p].p,(d||this.filterManager._mdf||S.prop._mdf)&&I.setAttribute("d",S.lastPath),d||this.filterManager.effectElements[9].p._mdf||this.filterManager.effectElements[4].p._mdf||this.filterManager.effectElements[7].p._mdf||this.filterManager.effectElements[8].p._mdf||S.prop._mdf)){var y;if(0!==this.filterManager.effectElements[7].p.v||100!==this.filterManager.effectElements[8].p.v){var U=.01*Math.min(this.filterManager.effectElements[7].p.v,this.filterManager.effectElements[8].p.v),q=.01*Math.max(this.filterManager.effectElements[7].p.v,this.filterManager.effectElements[8].p.v),X=I.getTotalLength();y="0 0 0 "+X*U+" ";var K,me=Math.floor(X*(q-U)/(1+2*this.filterManager.effectElements[4].p.v*this.filterManager.effectElements[9].p.v*.01));for(K=0;K<me;K+=1)y+="1 "+2*this.filterManager.effectElements[4].p.v*this.filterManager.effectElements[9].p.v*.01+" ";y+="0 "+10*X+" 0 0"}else y="1 "+2*this.filterManager.effectElements[4].p.v*this.filterManager.effectElements[9].p.v*.01;I.setAttribute("stroke-dasharray",y)}if((d||this.filterManager.effectElements[4].p._mdf)&&this.pathMasker.setAttribute("stroke-width",2*this.filterManager.effectElements[4].p.v),(
vendor: 4,484 bytes, line 83
83d||this.filterManager.effectElements[6].p._mdf)&&this.pathMasker.setAttribute("opacity",this.filterManager.effectElements[6].p.v),(1===this.filterManager.effectElements[10].p.v||2===this.filterManager.effectElements[10].p.v)&&(d||this.filterManager.effectElements[3].p._mdf)){var le=this.filterManager.effectElements[3].p.v;this.pathMasker.setAttribute("stroke","rgb("+bmFloor(255*le[0])+","+bmFloor(255*le[1])+","+bmFloor(255*le[2])+")")}},SVGTritoneFilter.prototype.renderFrame=function(d){if(d||this.filterManager._mdf){var p=this.filterManager.effectElements[0].p.v,v=this.filterManager.effectElements[1].p.v,S=this.filterManager.effectElements[2].p.v,y=S[1]+" "+v[1]+" "+p[1],U=S[2]+" "+v[2]+" "+p[2];this.feFuncR.setAttribute("tableValues",S[0]+" "+v[0]+" "+p[0]),this.feFuncG.setAttribute("tableValues",y),this.feFuncB.setAttribute("tableValues",U)}},SVGProLevelsFilter.prototype.createFeFunc=function(d,p){var v=createNS(d);return v.setAttribute("type","table"),p.appendChild(v),v},SVGProLevelsFilter.prototype.getTableValue=function(d,p,v,S,I){for(var q,me,y=0,X=Math.min(d,p),ee=Math.max(d,p),oe=Array.call(null,{length:256}),K=0,le=I-S,ce=p-d;y<=256;)me=(q=y/256)<=X?ce<0?I:S:q>=ee?ce<0?S:I:S+le*Math.pow((q-d)/ce,1/v),oe[K]=me,K+=1,y+=256/255;return oe.join(" ")},SVGProLevelsFilter.prototype.renderFrame=function(d){if(d||this.filterManager._mdf){var p,v=this.filterManager.effectElements;this.feFuncRComposed&&(d||v[3].p._mdf||v[4].p._mdf||v[5].p._mdf||v[6].p._mdf||v[7].p._mdf)&&(p=this.getTableValue(v[3].p.v,v[4].p.v,v[5].p.v,v[6].p.v,v[7].p.v),this.feFuncRComposed.setAttribute("tableValues",p),this.feFuncGComposed.setAttribute("tableValues",p),this.feFuncBComposed.setAttribute("tableValues",p)),this.feFuncR&&(d||v[10].p._mdf||v[11].p._mdf||v[12].p._mdf||v[13].p._mdf||v[14].p._mdf)&&(p=this.getTableValue(v[10].p.v,v[11].p.v,v[12].p.v,v[13].p.v,v[14].p.v),this.feFuncR.setAttribute("tableValues",p)),this.feFuncG&&(d||v[17].p._mdf||v[18].p._mdf||v[19].p._mdf||v[20].p._mdf||v[21].p._mdf)&&(p=this.getTableValue(v[17].p.v,v[18].p.v,v[19].p.v,v[20].p.v,v[21].p.v),this.feFuncG.setAttribute("tableValues",p)),this.feFuncB&&(d||v[24].p._mdf||v[25].p._mdf||v[26].p._mdf||v[27].p._mdf||v[28].p._mdf)&&(p=this.getTableValue(v[24].p.v,v[25].p.v,v[26].p.v,v[27].p.v,v[28].p.v),this.feFuncB.setAttribute("tableValues",p)),this.feFuncA&&(d||v[31].p._mdf||v[32].p._mdf||v[33].p._mdf||v[34].p._mdf||v[35].p._mdf)&&(p=this.getTableValue(v[31].p.v,v[32].p.v,v[33].p.v,v[34].p.v,v[35].p.v),this.feFuncA.setAttribute("tableValues",p))}},extendPrototype([SVGComposableEffect],SVGDropShadowEffect),SVGDropShadowEffect.prototype.renderFrame=function(d){if(d||this.filterManager._mdf){if((d||this.filterManager.effectElements[4].p._mdf)&&this.feGaussianBlur.setAttribute("stdDeviation",this.filterManager.effectElements[4].p.v/4),d||this.filterManager.effectElements[0].p._mdf){var p=this.filterManager.effectElements[0].p.v;this.feFlood.setAttribute("flood-color",rgbToHex(Math.round(255*p[0]),Math.round(255*p[1]),Math.round(255*p[2])))}if((d||this.filterManager.effectElements[1].p._mdf)&&this.feFlood.setAttribute("flood-opacity",this.filterManager.effectElements[1].p.v/255),d||this.filterManager.effectElements[2].p._mdf||this.filterManager.effectElements[3].p._mdf){var v=this.filterManager.effectElements[3].p.v,S=(this.filterManager.effectElements[2].p.v-90)*degToRads,I=v*Math.cos(S),y=v*Math.sin(S);this.feOffset.setAttribute("dx",I),this.feOffset.setAttribute("dy",y)}}};var _svgMatteSymbols=[];function SVGMatte3Effect(d,p,v){this.initialized=!1,this.filterManager=p,this.filterElem=d,this.elem=v,v.matteElement=createNS("g"),v.matteElement.appendChild(v.layerElement),v.matteElement.appendChild(v.transformedElement),v.baseElement=v.matteElement}function SVGGaussianBlurEffect(d,p,v,S){d.setAttribute("x","-100%"),d.setAttribute("y","-100%"),d.setAttribute("width","300%"),d.setAttribute("height","300%"),this.filterManager=p;var I=createNS("feGaussianBlur");I.setAttribute("result",S),d.appendChild(I),this.feGaussianBlur=I}SVGMatte3Effect.prototype.findSymbol=function(d){for(var p=0,v=_svgMatteSymbols.length;p<v;){if(_svgMatteSymbols[p]===d)return _svgMatteSymbols[p];p+=1}return null},SVGMatte3Effect.prototype.replaceInParent=function(d,p){var v=d.layerElement.parentNode;if(v){for(var S=v.children,I=0,y=S.length;I<y&&S[I]!==d.layerElement;)I+=1;var U;I<=y-2&&(U=S[I+1]);var q=createNS("use");q.setAttribute("href","#"+p),U?v.insertBefore(q,U):v.appendChild(q)}}
83,SVGMatte3Effect.prototype.setElementAsMask=function(d,p){if(!this.findSymbol(p)){var v=createElementID(),S=createNS("mask");S.setAttribute("id",p.layerId),S.setAttribute("mask-type","alpha"),_svgMatteSymbols.push(p);var I=d.globalData.defs;I.appendChild(S);var y=createNS("symbol");y.setAttribute("id",v),this.replaceInParent(p,v),y.appendChild(p.layerElement),I.appendChild(y);var U=createNS("use");U.setAttribute("href","#"+v),S.appendChild(U),p.data.hd=!1,p.show()}d.setMatte(p.layerId)},SVGMatte3Effect.prototype.initialize=function(){for(var d=this.filterManager.effectElements[0].p.v,p=this.elem.comp.elements,v=0,S=p.length;v<S;)p[v]&&p[v].data.ind===d&&this.setElementAsMask(this.elem,p[v]),v+=1;this.initialized=!0},SVGMatte3Effect.prototype.renderFrame=function(){this.initialized||this.initialize()},SVGGaussianBlurEffect.prototype.renderFrame=function(d){if(d||this.filterManager._mdf){var v=.3*this.filterManager.effectElements[0].p.v,S=this.filterManager.effectElements[1].p.v;this.feGaussianBlur.setAttribute("stdDeviation",(3==S?0:v)+" "+(2==S?0:v)),this.feGaussianBlur.setAttribute("edgeMode",1==this.filterManager.effectElements[2].p.v?"wrap":"duplicate")}};var c=class{target;name;intersected;wasIntersected=!1;distance;constructor(d,p){this.target=d,this.name=p,this.intersected=!1,this.distance=0}},i=class{type;cancelBubble;originalEvent;coords=new three.Vector2(0,0);distance=0;intersected=!1;constructor(d,p=null){this.cancelBubble=!1,this.type=d,this.originalEvent=p}stopPropagation(){this.cancelBubble=!0}},h=class{bindEventsOnBodyElement=!0;autoAdd=!1;scene=null;constructor(d){d&&typeof d.bindEventsOnBodyElement<"u"&&(this.bindEventsOnBodyElement=d.bindEventsOnBodyElement),d&&typeof d.scene<"u"&&(this.scene=d.scene),d&&typeof d.autoAdd<"u"&&(this.autoAdd=d.autoAdd)}},a=class{renderer;camera;domElement;bindEventsOnBodyElement;autoAdd;scene;mouse;supportsPointerEvents;interactiveObjects;closestObject;raycaster;treatTouchEventsAsMouseEvents;constructor(d,p,v,S){this.renderer=d,this.camera=p,this.domElement=v,this.bindEventsOnBodyElement=!(S&&typeof S.bindEventsOnBodyElement<"u")||S.bindEventsOnBodyElement,this.scene=S&&typeof S.scene<"u"?S.scene:null,this.scene&&(this.scene.onBeforeRender=()=>{this.autoAdd&&null!==this.scene&&this.scene.traverse(I=>{this.add(I),I.addEventListener("removed",y=>{this.remove(y.target)})}),this.update()}),this.autoAdd=!!(S&&typeof S.autoAdd<"u")&&S.autoAdd,this.autoAdd&&null===this.scene&&console.error("Attention: Options.scene needs to be set when using options.autoAdd"),this.mouse=new three.Vector2(-1,1),this.supportsPointerEvents=!!window.PointerEvent,this.interactiveObjects=[],this.closestObject=null,this.raycaster=new three.Raycaster,v.addEventListener("click",this.onMouseClick),this.supportsPointerEvents&&(this.bindEventsOnBodyElement?v.ownerDocument.addEventListener("pointermove",this.onDocumentPointerMove):v.addEventListener("pointermove",this.onDocumentPointerMove),v.addEventListener("pointerdown",this.onPointerDown),v.addEventListener("pointerup",this.onPointerUp)),this.bindEventsOnBodyElement?v.ownerDocument.addEventListener("mousemove",this.onDocumentMouseMove):v.addEventListener("mousemove",this.onDocumentMouseMove),v.addEventListener("mousedown",this.onMouseDown),v.addEventListener("mouseup",this.onMouseUp),v.addEventListener("touchstart",this.onTouchStart,{passive:!0}),v.addEventListener("touchmove",this.onTouchMove,{passive:!0}),v.addEventListener("touchend",this.onTouchEnd,{passive:!0}),this.treatTouchEventsAsMouseEvents=!0}dispose=()=>{this.domElement.removeEventListener("click",this.onMouseClick),this.supportsPointerEvents&&(this.bindEventsOnBodyElement?this.domElement.ownerDocument.removeEventListener("pointermove",this.onDocumentPointerMove):this.domElement.removeEventListener("pointermove",this.onDocumentPointerMove),this.domElement.removeEventListener("pointerdown",this.onPointerDown),this.domElement.removeEventListener("pointerup",this.onPointerUp)),this.bindEventsOnBodyElement?this.domElement.ownerDocument.removeEventListener("mousemove",this.onDocumentMouseMove):this.domElement.removeEventListener("mousemove",this.onDocumentMouseMove),this.domElement.removeEventListener("mousedown",this.onMouseDown),this.domElement.removeEventListener("mouseup",this.onMouseUp),this.domElement.removeEventListener("touchstart",this.onTouchStart),this.domElement.removeEventListener("touchmove",this.onTouchMove),this.domElement.removeEventListener("touchend",this.onTouchEnd)};add=(d,p=[])=>{if(d&&!this.interactiveObjects.find(v=>v.target===d))if(p.length>
830)p.forEach(v=>{let S=d.getObjectByName(v);if(S){let I=new c(S,v);this.interactiveObjects.push(I)}});else{let v=new c(d,d.name);this.interactiveObjects.push(v)}};remove=(d,p=[])=>{!d||(p.length>0?p.forEach(v=>{let S=d.getObjectByName(v);S&&(this.interactiveObjects=this.interactiveObjects.filter(I=>I.target!==S))}):this.interactiveObjects=this.interactiveObjects.filter(v=>v.target!==d))};update=()=>{this.raycaster.setFromCamera(this.mouse,this.camera),this.interactiveObjects.forEach(S=>{S.target&&this.checkIntersection(S)}),this.interactiveObjects.sort(function(S,I){return S.distance-I.distance});let p,v,d=this.interactiveObjects.find(S=>S.intersected)??null;if(d!=this.closestObject){if(this.closestObject){let S=new i("mouseout");this.dispatch(this.closestObject,S)}if(d){let S=new i("mouseover");this.dispatch(d,S)}this.closestObject=d}this.interactiveObjects.forEach(S=>{!S.intersected&&S.wasIntersected&&(p||(p=new i("mouseleave")),this.dispatch(S,p))}),this.interactiveObjects.forEach(S=>{S.intersected&&!S.wasIntersected&&(v||(v=new i("mouseenter")),this.dispatch(S,v))})};checkIntersection=d=>{let p=this.raycaster.intersectObjects([d.target],!0);if(d.wasIntersected=d.intersected,p.length>0){let v=p[0].distance;p.forEach(S=>{S.distance<v&&(v=S.distance)}),d.intersected=!0,d.distance=v}else d.intersected=!1};onDocumentMouseMove=d=>{this.mapPositionToPoint(this.mouse,d.clientX,d.clientY);let p=new i("mousemove",d);this.interactiveObjects.forEach(v=>{this.dispatch(v,p)})};onDocumentPointerMove=d=>{this.mapPositionToPoint(this.mouse,d.clientX,d.clientY);let p=new i("pointermove",d);this.interactiveObjects.forEach(v=>{this.dispatch(v,p)})};onTouchMove=d=>{d.touches.length>0&&this.mapPositionToPoint(this.mouse,d.touches[0].clientX,d.touches[0].clientY);let p=new i(this.treatTouchEventsAsMouseEvents?"mousemove":"touchmove",d);this.interactiveObjects.forEach(v=>{this.dispatch(v,p)})};onMouseClick=d=>{this.update();let p=new i("click",d);this.interactiveObjects.forEach(v=>{v.intersected&&this.dispatch(v,p)})};onMouseDown=d=>{this.mapPositionToPoint(this.mouse,d.clientX,d.clientY),this.update();let p=new i("mousedown",d);this.interactiveObjects.forEach(v=>{v.intersected&&this.dispatch(v,p)})};onPointerDown=d=>{this.mapPositionToPoint(this.mouse,d.clientX,d.clientY),this.update();let p=new i("pointerdown",d);this.interactiveObjects.forEach(v=>{v.intersected&&this.dispatch(v,p)})};onTouchStart=d=>{d.touches.length>0&&this.mapPositionToPoint(this.mouse,d.touches[0].clientX,d.touches[0].clientY),this.update();let p=new i(this.treatTouchEventsAsMouseEvents?"mousedown":"touchstart",d);this.interactiveObjects.forEach(v=>{v.intersected&&this.dispatch(v,p)})};onMouseUp=d=>{let p=new i("mouseup",d);this.interactiveObjects.forEach(v=>{this.dispatch(v,p)})};onPointerUp=d=>{let p=new i("pointerup",d);this.interactiveObjects.forEach(v=>{this.dispatch(v,p)})};onTouchEnd=d=>{d.touches.length>0&&this.mapPositionToPoint(this.mouse,d.touches[0].clientX,d.touches[0].clientY),this.update();let p=new i(this.treatTouchEventsAsMouseEvents?"mouseup":"touchend",d);this.interactiveObjects.forEach(v=>{this.dispatch(v,p)})};dispatch=(d,p)=>{d.target&&!p.cancelBubble&&(p.coords=this.mouse,p.distance=d.distance,p.intersected=d.intersected,d.target.dispatchEvent(p))};mapPositionToPoint=(d,p,v)=>{let S=this.renderer.domElement.getBoundingClientRect();d.x=(p-S.left)/S.width*2-1,d.y=-(v-S.top)/S.height*2+1}},Stats=function(){var d=0,p=document.createElement("div");function v(oe){return p.appendChild(oe.dom),oe}function S(oe){for(var me=0;me<p.children.length;me++)p.children[me].style.display=me===oe?"block":"none";d=oe}p.style.cssText="position:fixed;top:0;left:0;cursor:pointer;opacity:0.9;z-index:10000",p.addEventListener("click",function(oe){oe.preventDefault(),S(++d%p.children.length)},!1);var I=(performance||Date).now(),y=I,U=0,q=v(new Stats.Panel("FPS","#0ff","#002")),X=v(new Stats.Panel("MS","#0f0","#020"));if(self.performance&&self.performance.memory)var ee=v(new Stats.Panel("MB","#f08","#201"));return S(0),{REVISION:16,dom:p,addPanel:v,showPanel:S,begin:function(){I=(performance||Date).now()},end:function(){U++;var oe=(performance||Date).now();if(X.update(oe-I,200),oe>=y+1e3&&(q.update(1e3*U/(oe-y),100),y=oe,U=0,ee)){var me=performance.memory;ee.update(me.usedJSHeapSize/1048576,me.jsHeapSizeLimit/1048576)}return oe},update:function(){I=this.end()},domElement:p,setMode:S}};Stats.Panel=function(d,p,v){var S=1/0,I=0,y=Math.round,U=y(window.devicePixelRatio||1),q=80*U,X=48*U,ee=3*U,oe=2*U,me=3*U,K=15*U,le=74*U,ce=30*U,se=document.createElement("canvas");se.width=q,se.height=X,se.style.cssText="width:80px;height:48px";var be=se.getContext("2d");return be.font="bold "+9*U+"px Helvetica,Arial,sans-serif",be.textBaseline="top",be.fillStyle=v,be.fillRect(0,0,q,X),be.fillStyle=p,be.fillText(d,ee,oe),be.fillRect(me,K,le,ce),be.fillStyle=v,be.globalAlpha=.9,be.fillRect(me,K,le,ce),{dom:se,update:function(ae,re){S=Math.min(S,ae),I=Math.max(I,ae),be.fillStyle=v,be.globalAlpha=1,be.fillRect(0,0,q,K),be.fillStyle=p,be.fillText(y(ae)+" "+d+" ("+y(S)+"-"+y(I)+")",ee,oe),be.drawImage(se,me+U,K,le-U,ce,me,K,le-U,ce),be.fillRect(me+le-U,K,U,ce),be.fillStyle=v,be.globalAlpha=.9,be.fillRect(me+le-U,K,U,y((1-ae/re)*ce))}}};const _changeEvent={type:"change"},_startEvent={type:"start"},_endEvent={type:"end"};class OrbitControls extends three.EventDispatcher{constructor(p,v){super(),this.object=p,this.domElement=v,this.domElement.style.touchAction="none",this.enabled=!0,this.target=new three.Vector3,this.minDistance=0,this.maxDistance=1/0,this.minZoom=0,this.maxZoom=1/0,this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.minAzimuthAngle=-1/0,this.maxAzimuthAngle=1/0,this.enableDamping=!1,this.dampingFactor=.05,this.enableZoom=!0,this.zoomSpeed=1,this.enableRotate=!0,this.rotateSpeed=1,this.enablePan=!0,this.panSpeed=1,this.screenSpacePanning=!0,this.keyPanSpeed=7,this.autoRotate=!1,this.autoRotateSpeed=2,this.keys={LE
83FT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",BOTTOM:"ArrowDown"},this.mouseButtons={LEFT:three.MOUSE.ROTATE,MIDDLE:three.MOUSE.DOLLY,RIGHT:three.MOUSE.PAN},this.touches={ONE:three.TOUCH.ROTATE,TWO:three.TOUCH.DOLLY_PAN},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this._domElementKeyEvents=null,this.getPolarAngle=function(){return q.phi},this.getAzimuthalAngle=function(){return q.theta},this.getDistance=function(){return this.object.position.distanceTo(this.target)},this.listenToKeyEvents=function(at){at.addEventListener("keydown",Rs),this._domElementKeyEvents=at},this.stopListenToKeyEvents=function(){this._domElementKeyEvents.removeEventListener("keydown",Rs),this._domElementKeyEvents=null},this.saveState=function(){S.target0.copy(S.target),S.position0.copy(S.object.position),S.zoom0=S.object.zoom},this.reset=function(){S.target.copy(S.target0),S.object.position.copy(S.position0),S.object.zoom=S.zoom0,S.object.updateProjectionMatrix(),S.dispatchEvent(_changeEvent),S.update(),y=I.NONE},this.update=function(){const at=new three.Vector3,Pn=(new three.Quaternion).setFromUnitVectors(p.up,new three.Vector3(0,1,0)),Nr=Pn.clone().invert(),Jn=new three.Vector3,Wi=new three.Quaternion,js=2*Math.PI;return function(){const Wa=S.object.position;at.copy(Wa).sub(S.target),at.applyQuaternion(Pn),q.setFromVector3(at),S.autoRotate&&y===I.NONE&&it(function we(){return 2*Math.PI/60/60*S.autoRotateSpeed}()),S.enableDamping?(q.theta+=X.theta*S.dampingFactor,q.phi+=X.phi*S.dampingFactor):(q.theta+=X.theta,q.phi+=X.phi);let Mi=S.minAzimuthAngle,ma=S.maxAzimuthAngle;return isFinite(Mi)&&isFinite(ma)&&(Mi<-Math.PI?Mi+=js:Mi>Math.PI&&(Mi-=js),ma<-Math.PI?ma+=js:ma>Math.PI&&(ma-=js),q.theta=Mi<=ma?Math.max(Mi,Math.min(ma,q.theta)):q.theta>(Mi+ma)/2?Math.max(Mi,q.theta):Math.min(ma,q.theta)),q.phi=Math.max(S.minPolarAngle,Math.min(S.maxPolarAngle,q.phi)),q.makeSafe(),q.radius*=ee,q.radius=Math.max(S.minDistance,Math.min(S.maxDistance,q.radius)),!0===S.enableDamping?S.target.addScaledVector(oe,S.dampingFactor):S.target.add(oe),at.setFromSpherical(q),at.applyQuaternion(Nr),Wa.copy(S.target).add(at),S.object.lookAt(S.target),!0===S.enableDamping?(X.theta*=1-S.dampingFactor,X.phi*=1-S.dampingFactor,oe.multiplyScalar(1-S.dampingFactor)):(X.set(0,0,0),oe.set(0,0,0)),ee=1,!!(me||Jn.distanceToSquared(S.object.position)>U||8*(1-Wi.dot(S.object.quaternion))>U)&&(S.dispatchEvent(_changeEvent),Jn.copy(S.object.position),Wi.copy(S.object.quaternion),me=!1,!0)}}(),this.dispose=function(){S.domElement.removeEventListener("contextmenu",ur),S.domElement.removeEventListener("pointerdown",sr),S.domElement.removeEventListener("pointercancel",rr),S.domElement.removeEventListener("wheel",ds),S.domElement.removeEventListener("pointermove",Ps),S.domElement.removeEventListener("pointerup",rr),null!==S._domElementKeyEvents&&(S._domElementKeyEvents.removeEventListener("keydown",Rs),S._domElementKeyEvents=null)};const S=this,I={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6};let y=I.NONE;const U=1e-6,q=new three.Spherical,X=new three.Spherical;let ee=1;const oe=new three.Vector3;let me=!1;const K=new three.Vector2,le=new three.Vector2,ce=new three.Vector2,se=new three.Vector2,be=ne
83w three.Vector2,ae=new three.Vector2,re=new three.Vector2,j=new three.Vector2,$=new three.Vector2,ue=[],_e={};function Oe(){return Math.pow(.95,S.zoomSpeed)}function it(at){X.theta-=at}function on(at){X.phi-=at}const Yt=function(){const at=new three.Vector3;return function(Nr,Jn){at.setFromMatrixColumn(Jn,0),at.multiplyScalar(-Nr),oe.add(at)}}(),_t=function(){const at=new three.Vector3;return function(Nr,Jn){!0===S.screenSpacePanning?at.setFromMatrixColumn(Jn,1):(at.setFromMatrixColumn(Jn,0),at.crossVectors(S.object.up,at)),at.multiplyScalar(Nr),oe.add(at)}}(),Kt=function(){const at=new three.Vector3;return function(Nr,Jn){const Wi=S.domElement;if(S.object.isPerspectiveCamera){at.copy(S.object.position).sub(S.target);let lo=at.length();lo*=Math.tan(S.object.fov/2*Math.PI/180),Yt(2*Nr*lo/Wi.clientHeight,S.object.matrix),_t(2*Jn*lo/Wi.clientHeight,S.object.matrix)}else S.object.isOrthographicCamera?(Yt(Nr*(S.object.right-S.object.left)/S.object.zoom/Wi.clientWidth,S.object.matrix),_t(Jn*(S.object.top-S.object.bottom)/S.object.zoom/Wi.clientHeight,S.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),S.enablePan=!1)}}();function Rn(at){S.object.isPerspectiveCamera?ee/=at:S.object.isOrthographicCamera?(S.object.zoom=Math.max(S.minZoom,Math.min(S.maxZoom,S.object.zoom*at)),S.object.updateProjectionMatrix(),me=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),S.enableZoom=!1)}function Mt(at){S.object.isPerspectiveCamera?ee*=at:S.object.isOrthographicCamera?(S.object.zoom=Math.max(S.minZoom,Math.min(S.maxZoom,S.object.zoom/at)),S.object.updateProjectionMatrix(),me=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),S.enableZoom=!1)}function rt(at){K.set(at.clientX,at.clientY)}function xe(at){se.set(at.clientX,at.clientY)}function ri(){1===ue.length?K.set(ue[0].pageX,ue[0].pageY):K.set(.5*(ue[0].pageX+ue[1].pageX),.5*(ue[0].pageY+ue[1].pageY))}function Gr(){1===ue.length?se.set(ue[0].pageX,ue[0].pageY):se.set(.5*(ue[0].pageX+ue[1].pageX),.5*(ue[0].pageY+ue[1].pageY))}function hr(){const at=ue[0].pageX-ue[1].pageX,Pn=ue[0].pageY-ue[1].pageY,Nr=Math.sqrt(at*at+Pn*Pn);re.set(0,Nr)}function da(at){if(1==ue.length)le.set(at.pageX,at.pageY);else{const Nr=Ls(at);le.set(.5*(at.pageX+Nr.x),.5*(at.pageY+Nr.y))}ce.subVectors(le,K).multiplyScalar(S.rotateSpeed);const Pn=S.domElement;it(2*Math.PI*ce.x/Pn.clientHeight),on(2*Math.PI*ce.y/Pn.clientHeight),K.copy(le)}function Es(at){if(1===ue.length)be.set(at.pageX,at.pageY);else{const Pn=Ls(at);be.set(.5*(at.pageX+Pn.x),.5*(at.pageY+Pn.y))}ae.subVectors(be,se).multiplyScalar(S.panSpeed),Kt(ae.x,ae.y),se.copy(be)}function Kr(at){const Pn=Ls(at),Nr=at.pageX-Pn.x,Jn=at.pageY-Pn.y,Wi=Math.sqrt(Nr*Nr+Jn*Jn);j.set(0,Wi),$.set(0,Math.pow(j.y/re.y,S.zoomSpeed)),Rn($.y),re.copy(j)}function sr(at){!1!==S.enabled&&(0===ue.length&&(S.domElement.setPointerCapture(at.pointerId),S.domElement.addEventListener("pointermove",Ps),S.domElement.addEventListener("pointerup",rr)),function vi(at){ue.push(at)}(at),"touch"===at.pointerType?function er(at){switch(ps(at),ue.length){case 1:switch(S.touches.ONE){case three.TOUCH.ROTATE:if(!1===S.enableRotate)return;ri(),y=I.TOUCH_ROTATE;break;case three.TOUCH.PAN:if(!1===S.enablePan)return;Gr(),y=I.TOUCH_PAN;break;default:y=I.NONE}break;case 2:switch(S.touches.TWO){case three.TOUCH.DOLLY_PAN:if(!1===S.enableZoom&&!1===S.enablePan)return;(function Ta(){S.enableZoom&&hr(),S.enablePan&&Gr()})(),y=I.TOUCH_DOLLY_PAN;break;case three.TOUCH.DOLLY_ROTATE:if(!1===S.enableZoom&&!1===S.enableRotate)return;(function fa(){S.enableZoom&&hr(),S.enableRotate&&ri()})(),y=I.TOUCH_DOLLY_ROTATE;break;default:y=I.NONE}break;default:y=I.NONE}y!==I.NONE&&S.dispatchEvent(_startEvent)}(at):function pa(at){let Pn;switch(at.button){case 0:Pn=S.mouseButtons.LEFT;break;case 1:Pn=S.mouseButtons.MIDDLE;break;case 2:Pn=S.mouseButtons.RIGHT;break;default:Pn=-1}switch(Pn){case three.MOUSE.DOLLY:if(!1===S.enableZoom)return;(function ke(at){re.set(at.clientX,at.clientY)})(at),y=I.DOLLY;break;case three.MOUSE.ROTATE:if(at.ctrlKey||at.metaKey||at.shiftKey){if(!1===S.enablePan)return;xe(at),y=I.PAN}else{if(!1===S.enableRotate)return;rt(at),y=I.ROTATE}break;case three.MOUSE.PAN:if(at.ctrlKey||at.metaKey||at.shiftKey){if(!1===S.enableRotate)return;rt(at),y=I.ROTATE}else{if(!1===S.enablePan)return;xe(at),y=I.PAN}break;default:y=I.NONE}y!==I.NONE&&S.dispatchEvent(_startEvent)}(at))}function Ps(at){!1!==S.enabled&&("touch"===at.pointerType?function Yi(at){switch(ps(at),y){case I.TOUCH_ROTATE:if(!1===S.enableRotate)return;da(at),S.update();break;case I.TOUCH_PAN:if(!1===S.enablePan)return;Es(at),S.update();break;case I.TOUCH_DOLLY_PAN:if(!1===S.enableZoom&&!1===S.enablePan)return;(function Qs(at){S.enableZoom&&Kr(at),S.enablePan&&Es(at)})(at),S.update();break;case I.TOUCH_DOLLY_ROTATE:if(!1===S.enableZoom&&!1===S.enableRotate)return;(function Tn(at){S.enableZoom&&Kr(at),S.enableRotate&&da(at)})(at),S.update();break;default:y=I.NONE}}(at):function wr(at){switch(y){case I.ROTATE:if(!1===S.enableRotate)return;!function Pe(at){le.set(at.clientX,at.clientY),ce.subVectors(le,K).multiplyScalar(S.rotateSpeed);const Pn=S.domElement;it(2*Math.PI*ce.x/Pn.clientHeight),on(2*Math.PI*ce.y/Pn.clientHeight),K.copy(le),S.update()}(at);break;case I.DOLLY:if(!1===S.enableZoom)return;!function Ft(at){j.set(at.clientX,at.clientY),$.subVectors(j,re),$.y>0?Rn(Oe()):$.y<0&&Mt(Oe()),re.copy(j),S.update()}(at);break;case I.PAN:if(!1===S.enablePan)return;!function pt(at){be.set(at.clientX,at.clientY),ae.subVectors(be,se).multiplyScalar(S.panS
83peed),Kt(ae.x,ae.y),se.copy(be),S.update()}(at)}}(at))}function rr(at){(function Bs(at){delete _e[at.pointerId];for(let Pn=0;Pn<ue.length;Pn++)if(ue[Pn].pointerId==at.pointerId)return void ue.splice(Pn,1)})(at),0===ue.length&&(S.domElement.releasePointerCapture(at.pointerId),S.domElement.removeEventListener("pointermove",Ps),S.domElement.removeEventListener("pointerup",rr)),S.dispatchEvent(_endEvent),y=I.NONE}function ds(at){!1===S.enabled||!1===S.enableZoom||y!==I.NONE||(at.preventDefault(),S.dispatchEvent(_startEvent),function Hn(at){at.deltaY<0?Mt(Oe()):at.deltaY>0&&Rn(Oe()),S.update()}(at),S.dispatchEvent(_endEvent))}function Rs(at){!1===S.enabled||!1===S.enablePan||function Li(at){let Pn=!1;switch(at.code){case S.keys.UP:at.ctrlKey||at.metaKey||at.shiftKey?on(2*Math.PI*S.rotateSpeed/S.domElement.clientHeight):Kt(0,S.keyPanSpeed),Pn=!0;break;case S.keys.BOTTOM:at.ctrlKey||at.metaKey||at.shiftKey?on(-2*Math.PI*S.rotateSpeed/S.domElement.clientHeight):Kt(0,-S.keyPanSpeed),Pn=!0;break;case S.keys.LEFT:at.ctrlKey||at.metaKey||at.shiftKey?it(2*Math.PI*S.rotateSpeed/S.domElement.clientHeight):Kt(S.keyPanSpeed,0),Pn=!0;break;case S.keys.RIGHT:at.ctrlKey||at.metaKey||at.shiftKey?it(-2*Math.PI*S.rotateSpeed/S.domElement.clientHeight):Kt(-S.keyPanSpeed,0),Pn=!0}Pn&&(at.preventDefault(),S.update())}(at)}function ur(at){!1!==S.enabled&&at.preventDefault()}function ps(at){let Pn=_e[at.pointerId];void 0===Pn&&(Pn=new three.Vector2,_e[at.pointerId]=Pn),Pn.set(at.pageX,at.pageY)}function Ls(at){return _e[(at.pointerId===ue[0].pointerId?ue[1]:ue[0]).pointerId]}S.domElement.addEventListener("contextmenu",ur),S.domElement.addEventListener("pointerdown",sr),S.domElement.addEventListener("pointercancel",rr),S.domElement.addEventListener("wheel",ds,{passive:!1}),this.update()}}function THRMaskElement(d,p){this.data=d,this.element=p,this.masksProperties=this.data.masksProperties||[],this.viewData=createSizedArray(this.masksProperties.length);var v,S=this.masksProperties.length,I=!1;for(v=0;v<S;v+=1)"n"!==this.masksProperties[v].mode&&(I=!0),this.viewData[v]=ShapePropertyFactory.getShapeProp(this.element,this.masksProperties[v],3);this.hasMasks=I,I&&console.log("THRMaskElement::",I)}function THRBaseElement(){}function THRShapeElement(d,p,v){this.initElement(d,p,v)}function RenderableObjectElement(){}function THRImageElement(d,p,v){this.assetData=p.getAssetData(d.refId),this.initElement(d,p,v)}function THRSolidElement(d,p,v){this.initElement(d,p,v)}function THRCameraElement(d,p,v){this.initFrame(),this.initBaseData(d,p,v),this.initHierarchy();var S=PropertyFactory.getProp;if(this.pe=S(this,d.pe,0,0,this),d.ks.p.s?(this.px=S(this,d.ks.p.x,1,0,this),this.py=S(this,d.ks.p.y,1,0,this),this.pz=S(this,d.ks.p.z,1,0,this)):this.p=S(this,d.ks.p,1,0,this),d.ks.a&&(this.a=S(this,d.ks.a,1,0,this)),d.ks.or.k.length&&d.ks.or.k[0].to){var I,y=d.ks.or.k.length;for(I=0;I<y;I+=1)d.ks.or.k[I].to=null,d.ks.or.k[I].ti=null}this.or=S(this,d.ks.or,1,degToRads,this),this.or.sh=!0,this.rx=S(this,d.ks.rx,0,degToRads,this),this.ry=S(this,d.ks.ry,0,degToRads,this),this.rz=S(this,d.ks.rz,0,degToRads,this),this.mat=new Matrix,this._prevMat=new Matrix,this._isFirstFrame=!0,this.finalTransform={mProp:this}}function THRVideoElement(d,p,v){this.assetData=p.getAssetData(d.refId),this.initElement(d,p,v),this.video=null,this._isBusy=!1,this._isPlaying=!1,this._canPlay=!1,this.renderedFrame=0,this.tm=d.tm?PropertyFactory.getProp(this,d.tm,0,p.frameRate,this):{_placeholder:!0}}function THRNullElement(d,p,v){this.assetData=p.getAssetData(d.refId),this.initElement(d,p,v),this.initRendererElement(),this.createContent()}function ThreeRendererBase(d,p){this.animationItem=d,this.layers=null,this.renderedFrame=-1,this.renderConfig={className:p&&p.className||"",imagePreserveAspectRatio:p&&p.imagePreserveAspectRatio||"xMidYMid slice",hideOnTransparent:!(p&&!1===p.hideOnTransparent),filterSize:{width:p&&p.filterSize&&p.filterSize.width||"400%",height:p&&p.filterSize&&p.filterSize.height||"400%",x:p&&p.filterSize&&p.filterSize.x||"-100%",y:p&&p.filterSize&&p.filterSize.y||"-100%"},assetsPath:p&&p.assetsPath,renderer:p&&p.renderer},this.renderConfig.renderer.loader=three.DefaultLoadingManager,this.globalData={_mdf:!1,frameNum:-1,renderConfig:this.renderConfig,isAssetsLoaded:!1,cameraManager:this.animationItem.cameraManager},this.pendingElements=[],this.elements=[],this.threeDElements=[],this.destroyed=!1,this.camera=null,this.supports3d=!0,this.rendererType="threejs"}function THRCompElement(d,p,v){this.layers=d.layers,this.supports3d=!d.hasMask,this.completeLayers=!1,this.pendingElements=[],this.elements=this.layers?createSizedArray(this.layers.length):[],this.initElement(d,p,v),this.tm=d.tm?PropertyFactory.getProp(this,d.tm,0,p.frameRate,this):{_placeholder:!0}}function ThreeRenderer(d,p){this.animationItem=d,this.layers=null,this.renderedFrame=-1,this.renderConfig={className:p&&p.className||"",imagePreserveAspectRatio:p&&p.imagePreserveAspectRatio||"xMidYMid slice",hideOnTransparent:!(p&&!1===p.hideOnTransparent),filterSize:{width:p&&p.filterSize&&p.filterSize.width||"400%",height:p&&p.filterSize&&p.filterSize.height||"400%",x:p&&p.filterSize&&p.filterSize.x||"-100%",y:p&&p.filterSize&&p.filterSize.y||"-100%",assetsPath:p.assetsPath},scale:p&&p.scale,runExpressions:!p||void 0===p.runExpressions||p.runExpressions,assetsPath:p&&p.assetsPath,renderer:p&&p.renderer},this.renderConfig.renderer.loader=three.DefaultLoadingManager,this.globalData={_mdf:!1,frameNum:-1,renderConfig:this.renderConfig,isAssetsLoaded:!1,cameraManager:this.animationItem.cameraManager},this.pendingElements=[],this.elements=[],this.threeDElements=[],this.destroyed=!1,this.camera=null,this.supports3d=!0,this.rendererType="threejs",AnimationItem.prototype.checkLoaded=ThreeRenderer.prototype.checkLoaded}return THRMaskElement.prototype.renderFrame=function(){},THRMaskElement.prototype.getMaskProperty=MaskElement.prototype.getMaskProperty,THRMaskElement.prototype.destroy=function(){},THRBaseElement.prototype={checkBlendMode:function d(){},initRendererElement:function d(){this.material=null,this.baseElement=new three.Object3D,this.pivotElement=new three.Object3D,this.baseElement.add(this.pivotElement),this.assetData=this.globalData.getAssetData(this.data.refId),this.layerElement=this.baseElement},createContainerElements:function d(){this.maskedElement=this.layerElement,0!==this.data.bm&&this.setBlendMode()}
83,setBlendMode:function d(){var p=getBlendMode(this.data.bm),v=this.material;if(v)switch(p){case"add":case"lighten":v.blending=three.AdditiveBlending,v.needsUpdate=!0;break;case"multiply":v.blending=three.MultiplyBlending,v.needsUpdate=!0;break;default:console.log("THRBaseElement::setBlendMode() no blend:",this.data.bm,p)}},initTransform:function d(){TransformElement.prototype.initTransform.call(this);var p=this,v=this.data.ks;if(v.p&&v.p.s?(this.px=PropertyFactory.getProp(p,v.p.x,0,0,this),this.py=PropertyFactory.getProp(p,v.p.y,0,0,this),v.p.z&&(this.pz=PropertyFactory.getProp(p,v.p.z,0,0,this))):this.p=PropertyFactory.getProp(p,v.p||{k:[0,0,0]},1,0,this),v.rx){if(this.rx=PropertyFactory.getProp(p,v.rx,0,degToRads,this),this.ry=PropertyFactory.getProp(p,v.ry,0,degToRads,this),this.rz=PropertyFactory.getProp(p,v.rz,0,degToRads,this),v.or.k[0].ti){var S,I=v.or.k.length;for(S=0;S<I;S+=1)v.or.k[S].to=null,v.or.k[S].ti=null}this.or=PropertyFactory.getProp(p,v.or,1,degToRads,this),this.or.sh=!0}else this.r=PropertyFactory.getProp(p,v.r||{k:0},0,degToRads,this);v.sk&&(this.sk=PropertyFactory.getProp(p,v.sk,0,degToRads,this),this.sa=PropertyFactory.getProp(p,v.sa,0,degToRads,this)),this.a=PropertyFactory.getProp(p,v.a||{k:[0,0,0]},1,0,this),this.s=PropertyFactory.getProp(p,v.s||{k:[100,100,100]},1,.01,this)},renderElement:function d(){if(this.transformedElement&&this.finalTransform._matMdf){var v=1,S=1;if(this.s&&this.transformedElement.scale.set(v=this.s.v[0],S=this.s.v[1],this.s.v[2]),this.a){var y=new three.Vector3(-this.a.v[0],this.a.v[1],this.a.v[2]);this.pivotElement.position.copy(y)}if(this.p){var U=0,q=0;this.assetData&&(U=this.assetData.w,q=this.assetData.h);var X=new three.Vector3(this.p.v[0],-this.p.v[1],-this.p.v[2]);X.x+=.5*U*v,X.y-=.5*q*S,this.transformedElement.position.copy(X)}this.helper&&this.helper.update()}this.finalTransform._opMdf&&this.material&&(this.material.opacity=this.finalTransform.mProp.o.v)},renderFrame:function d(){this.data.hd||this.hidden||(this.renderTransform(),this.renderRenderable(),this.renderElement(),this.renderInnerContent(),this._isFirstFrame&&(this._isFirstFrame=!1))},destroy:function d(){this.layerElement=null,this.transformedElement=null,this.matteElement&&(this.matteElement=null),this.maskManager&&(this.maskManager.destroy(),this.maskManager=null)},createRenderableComponents:function d(){this.maskManager=new THRMaskElement(this.data,this,this.globalData)},addEffects:function d(){},setMatte:function d(){},hide:function d(){this.hidden||this.isInRange&&!this.isTransparent||((this.baseElement||this.layerElement).visible=!1,this.hidden=!0)},show:function d(){this.isInRange&&!this.isTransparent&&(this.data.hd||((this.baseElement||this.layerElement).visible=!0),this.hidden=!1,this._isFirstFrame=!0)}},THRBaseElement.prototype.getBaseElement=SVGBaseElement.prototype.getBaseElement,THRBaseElement.prototype.destroyBaseElement=THRBaseElement.prototype.destroy,THRBaseElement.prototype.buildElementParenting=BaseRenderer.prototype.buildElementParenting,extendPrototype([BaseElement,TransformElement,THRBaseElement,HierarchyElement,FrameElement,RenderableElement],THRShapeElement),THRShapeElement.prototype.createContent=function(){var d=new three.PlaneGeometry(this.data.sw,this.data.sh),p=new three.MeshBasicMaterial({color:this.data.sc,side:three.DoubleSide});this.material=p;var v=new three.Mesh(d,p);this.baseElement.add(v)},extendPrototype([RenderableElement,createProxyFunction({initElement:function(v,S,I){this.initFrame(),this.initBaseData(v,S,I),this.initTransform(v,S,I),this.initHierarchy(),this.initRenderable(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),this.createContent(),this.hide()},hide:function(){this.hidden||this.isInRange&&!this.isTransparent||((this.baseElement||this.layerElement).visible=!1,this.hidden=!0)},show:function(){this.isInRange&&!this.isTransparent&&(this.data.hd||((this.baseElement||this.layerElement).visible=!0),this.hidden=!1,this._isFirstFrame=!0)},renderFrame:function(){this.data.hd||this.hidden||(this.renderTransform(),this.renderRenderable(),this.renderElement(),this.renderInnerContent(),this._isFirstFrame&&(this._isFirstFrame=!1))},renderInnerContent:function(){},prepareFrame:function(v){this._mdf=!1,this.prepareRenderableFrame(v),this.prepareProperties(v,this.isInRange),this.checkTransparency()},destroy:function(){this.innerElem=null,this.destroyBaseElement()}})],RenderableObjectElement),extendPrototype([BaseElement,TransformElement,THRBaseElement,HierarchyElement,FrameElement,RenderableObjectElement],THRImageElement),THRImageElement.prototype.createContent=function(){var d=new three.TextureLoader,p="".concat(this.globalData.renderConfig.assetsPath||"").concat(this.assetData.u).concat(this.assetData.p),v=d.load(p);v.encoding=three.sRGBEncoding;var S=new three.MeshBasicMaterial({map:v,side:three.DoubleSide,transparent:!0,toneMapped:!1,wireframe:!1});this.material=S;var I=new three.PlaneGeometry(this.assetData.w,this.assetData.h,3,3),y=new three.Mesh(I,S);y.name=this.assetData.id,this.pivotElement.add(y),this.transformedElement=this.baseElement,this.data.nm&&(this.baseElement.name="".concat(this.data.nm),this.pivotElement.name="".concat(this.data.nm,"_pivot")),0!==this.data.bm&&this.setBlendMode(y)},extendPrototype([BaseElement,TransformElement,THRBaseElement,HierarchyElement,FrameElement,RenderableObjectElement],THRSolidElement),THRSolidElement.prototype.createContent=function(){var d=new three.PlaneGeometry(this.data.sw,this.data.sh),p=new three.MeshBasicMaterial({color:this.data.sc});this.material=p;var v=new three.Mesh(d,p);this.baseElement.add(v)},extendPrototype([BaseElement,FrameElement,HierarchyElement],THRCameraElement),THRCameraElement.prototype.setup=function(){var d,p=this.comp.threeDElements.length;for(d=0;d<p;d+=1)"3d"===this.comp.threeDElements[d].type&&this.refresh();this.refreshListener=this.refresh.bind(this),window.addEventListener("resize",this.refreshListener)},THRCameraElement.prototype.refresh=function(){if(this.globalData){var d=this.globalData.cameraManager;if(d&&d.isTracking(this)){var p=this.globalData.renderConfig.renderer.viewport.width||window.innerWidth,v=this.globalData.renderConfig.renderer.viewport.height||window.innerHeight,S=this.globalData.renderConfig.renderer.viewport.minWidth||p,I=this.globalData.renderConfig.renderer.viewport.maxWidth||p,y=this.globalData.renderConfig.renderer.viewport.minHeight||v,U=this.globalData.renderConfig.renderer.viewport.maxHeight||v,q=(p=Math.max(S,Math.min(p,I)))/(v=Math.max(y,Math.min(v,U)));p/q>U?p=U*q:p/q>
83I&&(v=I/q),v<=y?p=(v=y)*q:p<=S&&(v=(p=S)/q),d.updateCameraAspect(q),this.globalData.renderConfig.renderer.renderer.setSize(p,v),this._prevMat&&this._prevMat.reset()}}else console.warn("Camera has been detached")},THRCameraElement.prototype.createElements=function(){},THRCameraElement.prototype.hide=function(){},THRCameraElement.prototype.renderFrame=function(){var p,v,d=this._isFirstFrame;if(this.hierarchy)for(v=this.hierarchy.length,p=0;p<v;p+=1)d=this.hierarchy[p].finalTransform.mProp._mdf||d;if(d||this.pe._mdf||this.p&&this.p._mdf||this.px&&(this.px._mdf||this.py._mdf||this.pz._mdf)||this.rx._mdf||this.ry._mdf||this.rz._mdf||this.or._mdf||this.a&&this.a._mdf){if(this.mat.reset(),this.hierarchy)for(p=v=this.hierarchy.length-1;p>=0;p-=1){var S=this.hierarchy[p].finalTransform.mProp;this.mat.translate(-S.p.v[0],-S.p.v[1],S.p.v[2]),this.mat.rotateX(-S.or.v[0]).rotateY(-S.or.v[1]).rotateZ(S.or.v[2]),this.mat.rotateX(-S.rx.v).rotateY(-S.ry.v).rotateZ(S.rz.v),this.mat.scale(1/S.s.v[0],1/S.s.v[1],1/S.s.v[2]),this.mat.translate(S.a.v[0],S.a.v[1],S.a.v[2])}if(this.p?this.mat.translate(-this.p.v[0],-this.p.v[1],this.p.v[2]):this.mat.translate(-this.px.v,-this.py.v,this.pz.v),this.a){var I;I=this.p?[this.p.v[0]-this.a.v[0],this.p.v[1]-this.a.v[1],this.p.v[2]-this.a.v[2]]:[this.px.v-this.a.v[0],this.py.v-this.a.v[1],this.pz.v-this.a.v[2]];var y=Math.sqrt(Math.pow(I[0],2)+Math.pow(I[1],2)+Math.pow(I[2],2)),U=[I[0]/y,I[1]/y,I[2]/y],q=Math.sqrt(U[2]*U[2]+U[0]*U[0]),X=Math.atan2(U[1],q),ee=Math.atan2(U[0],-U[2]);this.mat.rotateY(ee).rotateX(-X)}this.mat.rotateX(-this.rx.v).rotateY(-this.ry.v).rotateZ(this.rz.v),this.mat.rotateX(-this.or.v[0]).rotateY(-this.or.v[1]).rotateZ(this.or.v[2]),this.mat.translate(this.globalData.compSize.w/2,this.globalData.compSize.h/2,0),this.mat.translate(0,0,this.pe.v);var oe=this.globalData.cameraManager;if(oe&&oe.isTracking(this)){var me=oe.getActiveCamera(),K=this.globalData.renderConfig.renderer.scale||1,le=!this._prevMat.equals(this.mat);if((le||this.pe._mdf)&&this.comp.threeDElements){for(v=this.comp.threeDElements.length,p=0;p<v;p+=1)if("3d"===this.comp.threeDElements[p].type&&le){var se=new three.Vector3;this.p?se.set(this.p.v[0]*K,-this.p.v[1]*K,-this.p.v[2]*K):se.set(this.px.v*K,-this.py.v*K,-this.pz.v*K),me.position.copy(se);var be=this.globalData.renderConfig.renderer.cameraModifier;if(be&&be.position&&me.position.add(be.position),this.a){var ae=new three.Vector3(this.a.v[0],-this.a.v[1],-this.a.v[2]);me.lookAt(ae)}}this.mat.clone(this._prevMat)}}}this._isFirstFrame=!1},THRCameraElement.prototype.prepareFrame=function(d){this.prepareProperties(d,!0)},THRCameraElement.prototype.destroy=function(){window.removeEventListener("resize",this.refreshListener)},THRCameraElement.prototype.getBaseElement=function(){return null},extendPrototype([BaseElement,TransformElement,THRBaseElement,HierarchyElement,FrameElement,RenderableObjectElement],THRVideoElement),THRVideoElement.prototype.createContent=function(){if(this.video=this.globalData.videoLoader.getAsset(this.assetData),this.video){this.video.pause(),this._canPlay=!0;var v,d=new three.PlaneGeometry(this.assetData.w,this.assetData.h,3,3),p=new three.VideoTexture(this.video);p.encoding=three.sRGBEncoding,p.format=three.RGBAFormat,v=0!==this.data.bm?new three.MeshBasicMaterial({map:p,transparent:!0,toneMapped:!1}):new three.ShaderMaterial({transparent:!0,uniforms:{u_texture:{value:p}},vertexShader:"\n                  varying vec2 vUv;\n                  void main() {\n                      vUv = uv;\n                      gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n                  }\n              ",fragmentShader:"\n                  uniform sampler2D u_texture;\n                  varying vec2 vUv;\n                  void main() {\n                      vec4 color = texture2D(u_texture, vec2(vUv.x * 0.5, vUv.y));\n                      float alpha = texture2D(u_texture, vec2(0.5 + vUv.x * 0.5, vUv.y)).r;\n                      gl_FragColor = vec4(color.rgb, alpha);\n                      \n                      // Encodings\n                      // gl_FragColor = linearToOutputTexel(gl_FragColor);\n                    \n                      // Get get normal blending with premultipled, use with CustomBlending, OneFactor, OneMinusSrcAlphaFactor, AddEquation.\n                      // gl_FragColor.rgb *= gl_FragColor.a;\n                  }\n              "}),this.material=v;var S=new three.Mesh(d,v);S.name=this.assetData.id,S.x=-.5*this.assetData.w,S.y=-.5*this.assetData.h,this.pivotElement.add(S)}else console.warn("Video not available",this.assetData);this.transformedElement=this.baseElement,this.data.nm&&(this.baseElement.name="".concat(this.data.nm),this.pivotElement.name="".concat(this.data.nm,"_pivot")),0!==this.data.bm&&this.setBlendMode()},THRVideoElement.prototype.prepareFrame=function(d){if(this._mdf=!1,this.prepareRenderableFrame(d),this.prepareProperties(d,this.isInRange),this.checkTransparency(),this.tm._placeholder)this.renderedFrame=d/this.data.sr;else{var p=this.tm.v;p===this.data.op&&(p=this.data.op-1),this.renderedFrame=p}},THRVideoElement.prototype.renderFrame=function(){var d=this;if(!this.data.hd&&!this.hidden)if(this.renderTransform(),this.renderRenderable(),this.renderElement(),this.renderInnerContent(),this._isFirstFrame&&(this._isFirstFrame=!1),this._canPlay&&this.video)this.isInRange||!this.animationItem.isPau
83sed?this._isPlaying?!this.isPlaying()&&Math.abs(this.renderedFrame/this.globalData.frameRate-this.video.currentTime)>.2&&(this._isBusy||(this._isBusy=!0,this.video.play().then(function(){d._isBusy&&(d.video.currentTime=d.renderedFrame/d.globalData.frameRate,d._isBusy=!1,d._isPlaying=!0,d.pivotElement.visible=!0)}).catch(function(){d._isBusy&&(d._isBusy=!1,d._isPlaying=!1)}))):this._isBusy||(this._isBusy=!0,this.video.play().then(function(){d._isBusy&&(d.video.currentTime=d.renderedFrame/d.globalData.frameRate,d._isBusy=!1,d._isPlaying=!0,d.pivotElement.visible=!0)}).catch(function(){d._isBusy&&(d._isBusy=!1,d._isPlaying=!1)})):this._isPlaying&&(this.video.pause(),this.video.currentTime=0,this._isPlaying=!1,this._isBusy=!1);else{var p=this.globalData.videoLoader.getAsset(this.assetData);this.video=p,this._isPlaying=!1,this._isBusy=!1,this._canPlay=!0}},THRVideoElement.prototype.isPlaying=function(){return this.video&&!this.video.paused&&!this.video.ended&&this.video.readyState>2},THRVideoElement.prototype.show=function(){var d=this;this.isInRange&&(this.video&&!this._isBusy&&(this._isBusy=!0,this.video.play().then(function(){d.video.currentTime=d.renderedFrame/d.globalData.frameRate,d._isBusy=!1,d._isPlaying=!0,d.pivotElement.visible=!0}).catch(function(){d._isBusy=!1,d._isPlaying=!1})),this.data.hd||((this.baseElement||this.layerElement).visible=!0),this.hidden=!1,this._isFirstFrame=!0)},THRVideoElement.prototype.hide=function(){this.video&&!this._isBusy&&this.video.pause(),this._isPlaying=!1,this.hidden||this.isInRange||((this.baseElement||this.layerElement).visible=!1,this.hidden=!0)},THRVideoElement.prototype.pause=function(){this.video&&!this._isBusy&&this.video.pause(),this._isPlaying=!1},THRVideoElement.prototype.resume=function(){this._canPlay=!0},extendPrototype([BaseElement,TransformElement,THRBaseElement,HierarchyElement,FrameElement,RenderableObjectElement],THRNullElement),THRNullElement.prototype.createContent=function(){this.transformedElement=this.baseElement,this.baseElement.name="".concat(this.data.nm),this.pivotElement.name="".concat(this.data.nm,"_pivot")},extendPrototype([BaseRenderer],ThreeRendererBase),ThreeRendererBase.prototype.buildItem=SVGRenderer.prototype.buildItem,ThreeRendererBase.prototype.checkPendingElements=function(){for(;this.pendingElements.length;)this.pendingElements.pop().checkParenting()},ThreeRendererBase.prototype.appendElementInPos=function(d,p){var v=d.getBaseElement();if(v){var S=this.layers[p];if(S.ddd&&this.supports3d)this.addTo3dContainer(v,p);else if(this.threeDElements)this.addTo3dContainer(v,p);else{for(var y,U,I=0;I<p;)this.elements[I]&&!0!==this.elements[I]&&this.elements[I].getBaseElement&&(U=this.elements[I],y=(this.layers[I].ddd?this.getThreeDContainerByPos(I):U.getBaseElement())||y),I+=1;if(y){if(!S.ddd||!this.supports3d){var X=this.layerElement.children.indexOf(v);X>=0?this.layerElement.children.splice(X,0,y):this.layerElement.add(v)}}else(!S.ddd||!this.supports3d)&&this.layerElement.add(v)}}},ThreeRendererBase.prototype.createNull=function(d){return new THRNullElement(d,this.globalData,this)},ThreeRendererBase.prototype.createShape=function(d){return new THRShapeElement(d,this.globalData,this)},ThreeRendererBase.prototype.createText=function(d){return this.supports3d?new HTextElement(d,this.globalData,this):new SVGTextLottieElement(d,this.globalData,this)},ThreeRendererBase.prototype.createCamera=function(d){var p=new THRCameraElement(d,this.globalData,this);return this.globalData.cameraManager.addCameraElement(d,p),this.camera||(this.camera=p),p},ThreeRendererBase.prototype.createVideo=function(d){return new THRVideoElement(d,this.globalData,this)},ThreeRendererBase.prototype.createImage=function(d){return new THRImageElement(d,this.globalData,this)},ThreeRendererBase.prototype.createSolid=function(d){return new THRSolidElement(d,this.globalData,this)},ThreeRendererBase.prototype.getThreeDContainerByPos=function(d){for(var p=0,v=this.threeDElements.length;p<v;){if(this.threeDElements[p].startPos<=d&&this.threeDElements[p].endPos>=d)return this.threeDElements[p].perspectiveElem;p+=1}return null},ThreeRendererBase.prototype.createThreeDContainer=function(d,p){var v=new three.Group,S=new three.Group;if("3d"===p){var I=new three.Matrix4;I.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),S.applyMatrix4(I)}v.add(S);var y={container:S,perspectiveElem:v,startPos:d,endPos:d,type:p};return this.threeDElements.push(y),y},ThreeRendererBase.prototype.build3dContainers=function(){var d,v,p=this.layers.length,S="";for(d=0;d<p;d+=1)this.layers[d].ddd&&3!==this.layers[d].ty?("3d"!==S&&(S="3d",v=this.createThreeDContainer(d,"3d")),v.endPos=Math.max(v.endPos,d)):("2d"!==S&&(S="2d",v=this.createThreeDContainer(d,"2d")),v.endPos=Math.max(v.endPos,d));for(d=(p=this.threeDElements.length)-1;d>=0;d-=1)this.resizerElem.add(this.threeDElements[d].perspectiveElem)},ThreeRendererBase.prototype.addTo3dContainer=function(d,p){for(var v=0,S=this.threeDElements.length;v<S;){if(p<=this.threeDElements[v].endPos){for(var y,I=this.threeDElements[v].startPos;I<p;)this.elements[I]&&this.elements[I].getBaseElement&&(y=this.elements[I].getBaseElement()),I+=1;if(y){var U=this.threeDElements[v].container,q=U.children.indexOf(d);q>=0?U.children.splice(q,0,y):U.add(d)}else this.threeDElements[v].container.add(d);break}v+=1}},ThreeRendererBase.prototype.configAnimation=function(d){var p=this.globalData,v=this.globalData.renderConfig.renderer;v||(this.globalData.renderConfig.renderer=v={}
83),v.renderScene||(v.renderScene=new three.Scene,v.scene=v.renderScene),v.camera||(v.camera=new three.PerspectiveCamera(25,d.w/d.h,.1,2e4),v.camera.fov=25,v.camera.focus=10,v.camera.updateProjectionMatrix()),this.globalData.cameraManager.setActiveCamera(v.camera),v.renderer||(v.renderer=new three.WebGLRenderer,v.renderer.setPixelRatio(window.devicePixelRatio),v.renderer.setSize(d.w,d.h)),!0===v.controls&&(v.controls=new OrbitControls(v.camera,v.renderer.domElement),v.controls.listenToKeyEvents(window)),!0===v.interaction&&(v.interaction=new a(v.renderer,v.camera,v.renderer.domElement)),d.assets&&d.assets.length>0&&(new three.TextureLoader).load("".concat(this.globalData.renderConfig.assetsPath).concat(d.assets[0].u).concat(d.assets[0].p));var I=new three.Group;if(I.name="Resizer",this.globalData.renderConfig.renderer.scale){var y=this.globalData.renderConfig.renderer.scale;I.scale.set(y,y,y)}this.resizerElem=I,v.renderScene.add(I);var q,U=this.animationItem.wrapper||document.body;function oe(){p.renderConfig.render?p.renderConfig.render():(v.controls&&v.controls.update(),v.interaction&&v.interaction.update(),p.renderConfig.composer?p.renderConfig.composer.render():v.renderer.render(v.renderScene,v.camera))}v.renderer.domElement!==U&&U.appendChild(v.renderer.domElement),v.animate||(!0===v.debug?((q=new Stats).showPanel(0),v.stats=q,document.body.appendChild(q.dom),function X(){q.begin(),oe(),q.end(),requestAnimationFrame(X)}()):function ee(){oe(),requestAnimationFrame(ee)}()),this.data=d,this.setupGlobalData(d,document.body),this.layers=d.layers,this.layerElement=this.resizerElem,this.build3dContainers(),this.updateContainerSize(),this.initPreloader(this.animationItem)},ThreeRendererBase.prototype.destroy=function(){this.animationItem.wrapper&&(this.animationItem.wrapper.innerText=""),this.animationItem.container=null,this.globalData.defs=null;var d,p=this.layers?this.layers.length:0;for(d=0;d<p;d+=1)this.elements[d]&&this.elements[d].destroy&&this.elements[d].destroy();this.elements.length=0,this.destroyed=!0,this.animationItem=null},ThreeRendererBase.prototype.initPreloader=function(d){var p=this,v=!1,S=d.videoPreloader,I=d.imagePreloader,y=0,U=!1,q=!1,X=0,ee=!1,oe=!1;d.animationData.assets.forEach(function(me){S.isValid(me.p)&&(X+=1),I.isValid(me.p)&&(y+=1)}),S&&X>0&&(ee=!0,S.addEventListener("videoLoaded",function(){oe=!0,!v&&(U&&q||!U)&&(v=!0,p.globalData.isAssetsLoaded=!0,d.checkLoaded())})),I&&y&&(U=!0),I.onStart=function(){v=!1},I.onLoad=function(){q=!0,!v&&(ee&&oe||!ee)&&(v=!0,p.globalData.isAssetsLoaded=!0,d.checkLoaded())}},ThreeRendererBase.prototype.updateContainerSize=function(){if(this.globalData.compSize&&this.resizerElem){var I,y,U,q,d=this.animationItem.wrapper.offsetWidth,p=this.animationItem.wrapper.offsetHeight;this.globalData.compSize.w/this.globalData.compSize.h>d/p?(I=d/this.globalData.compSize.w,y=d/this.globalData.compSize.w,U=0,q=(p-this.globalData.compSize.h*(d/this.globalData.compSize.w))/2):(I=p/this.globalData.compSize.h,y=p/this.globalData.compSize.h,U=(d-this.globalData.compSize.w*(p/this.globalData.compSize.h))/2,q=0),(new three.Matrix4).set(I,0,0,0,0,y,0,0,0,0,1,0,U,q,0,1)}},ThreeRendererBase.prototype.renderFrame=function(d){if(this.renderedFrame!==d&&!this.destroyed){null===d?d=this.renderedFrame:this.renderedFrame=d,this.globalData.frameNum=d,this.globalData.frameId+=1,this.globalData.projectInterface.currentFrame=d,this.globalData._mdf=!1;var p,v=this.layers.length;for(this.completeLayers||this.checkLayers(d),p=v-1;p>=0;p-=1)(this.completeLayers||this.elements[p])&&this.elements[p].prepareFrame(d-this.layers[p].st);if(this.globalData._mdf)for(p=0;p<v;p+=1)(this.completeLayers||this.elements[p])&&this.elements[p].renderFrame()}},ThreeRendererBase.prototype.videosLoaded=function(){},ThreeRendererBase.prototype.initItems=function(){this.buildAllItems(),this.camera&&this.camera.setup()},ThreeRendererBase.prototype.searchExtraCompositions=function(d){var p,v=d.length,S=createTag("div");for(p=0;p<v;p+=1)if(d[p].xt){var I=this.createComp(d[p],S,this.globalData.comp,null);I.initExpressions(),this.globalData.projectInterface.registerComposition(I)}},extendPrototype([ThreeRendererBase,ICompElement,THRBaseElement],THRCompElement),THRCompElement.prototype._createBaseContainerElements=THRCompElement.prototype.createContainerElements,THRCompElement.prototype.createContainerElements=function(){this._createBaseContainerElements()},THRCompElement.prototype.addTo3dContainer=function(d,p){for(var S,v=0;v<p;)this.elements[v]&&this.elements[v].getBaseElement&&(S=this.elements[v].getBaseElement()),v+=1;if(S){var I=this.layerElement.children.indexOf(d);I>=0?this.layerElement.children.splice(I,0,S):this.layerElement.add(d)}else this.layerElement.add(d)},THRCompElement.prototype.createComp=function(d){return new THRCompElement(d,this.globalData,this)},extendPrototype([ThreeRendererBase],ThreeRenderer),ThreeRenderer.prototype.createComp=function(d){return new THRCompElement(d,this.globalData,this)},ThreeRenderer.prototype.checkLoaded=function(){if(!this.isLoaded&&this.renderer.globalData.fontManager.isLoaded&&(this.imagePreloader.loadedImages()||"canvas"!==this.renderer.rendererType)&&this.imagePreloader.loadedFootages()&&this.videoPreloader.loadedVideos()){this.isLoaded=!0;var d=getExpressionsPlugin();d&&d.initExpressions(this),this.renderer.initItems(),setTimeout(function(){this.trigger("DOMLoaded")}.bind(this),0),this.gotoFrame(),this.autoplay&&this.play()}},registerRenderer("canvas",CanvasRenderer),registerRenderer("html",HybridRenderer),registerRenderer("svg",SVGRenderer),registerRenderer("threejs",ThreeRenderer),ShapeModifiers.registerModifier("tm",TrimModifier),ShapeModifiers.registerModifier("pb",PuckerAndBloatModifier),ShapeModifiers.registerModifier("rp",RepeaterModifier),ShapeModifiers.registerModifier("rd",RoundCornersModifier),ShapeModifiers.registerModifier("zz",ZigZagModifier),ShapeModifiers.registerModifier("op",OffsetPathModifier),setExpressionsPlugin(Expressions),setExpressionInterfaces(getInterface),initialize$1(),initialize(),registerEffect(20,SVGTintFilter,!0),registerEffect(21,SVGFillFilter,!0),registerEffect(22,SVGStrokeEffect,!1),registerEffect(23,SVGTritoneFilter,!0),registerEffect(24,SVGProLevelsFilter,!0),registerEffect(25,SVGDropShadowEffect,!0),registerEffect(28,SVGMatte3Effect,!1),registerEffect(29,SVGGaussianBlurEffect,!0),lottie},module.exports=p(__webpack_require__(12032)))},12032:(d,p,v)=>{"use strict";var S=v(95386).default;const I="151",K=1,le=2,ce=3,se=0,be=1,ae=2,it=100,on=101,Yt=102,Rn=200,Mt=201,rt=202,ke=203,xe=2
vendor: 10,794 bytes, line 83
8304,Pe=205,Ft=206,pt=207,Hn=208,Li=209,ri=210,Tn=0,sr=1,Ps=2,rr=0,pa=1,wr=2,ds=3,Rs=4,er=5,ur=301,vi=302,Ls=306,at=1e3,Pn=1001,Nr=1002,Jn=1003,Wi=1004,lo=1005,Mi=1006,ma=1007,Il=1008,Ko=1009,Pl=1014,Rl=1015,yr=1016,Bl=1020,ea=1023,Zo=1026,jo=1027,eu=33776,Do=33777,tu=33778,yf=33779,th=36492,nh=2300,bf=2301,co=2400,Jo=2401,fc=2402,dc=3e3,xr=3001,Zr="srgb",tl="srgb-linear",nl="display-p3",au=35044,tp="300 es";class Ki{addEventListener(n,o){void 0===this._listeners&&(this._listeners={});const m=this._listeners;void 0===m[n]&&(m[n]=[]),-1===m[n].indexOf(o)&&m[n].push(o)}hasEventListener(n,o){if(void 0===this._listeners)return!1;const m=this._listeners;return void 0!==m[n]&&-1!==m[n].indexOf(o)}removeEventListener(n,o){if(void 0===this._listeners)return;const A=this._listeners[n];if(void 0!==A){const E=A.indexOf(o);-1!==E&&A.splice(E,1)}}dispatchEvent(n){if(void 0===this._listeners)return;const m=this._listeners[n.type];if(void 0!==m){n.target=this;const A=m.slice(0);for(let E=0,w=A.length;E<w;E++)A[E].call(this,n);n.target=null}}}const ms=["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 np=1234567;const pc=Math.PI/180,rh=180/Math.PI;function Ra(){const b=4294967295*Math.random()|0,n=4294967295*Math.random()|0,o=4294967295*Math.random()|0,m=4294967295*Math.random()|0;return(ms[255&b]+ms[b>>8&255]+ms[b>>16&255]+ms[b>>24&255]+"-"+ms[255&n]+ms[n>>8&255]+"-"+ms[n>>16&15|64]+ms[n>>24&255]+"-"+ms[63&o|128]+ms[o>>8&255]+"-"+ms[o>>16&255]+ms[o>>24&255]+ms[255&m]+ms[m>>8&255]+ms[m>>16&255]+ms[m>>24&255]).toLowerCase()}function gr(b,n,o){return Math.max(n,Math.min(o,b))}function $m(b,n){return(b%n+n)%n}function Ws(b,n,o){return(1-o)*b+o*n}function kl(b){return!(b&b-1)&&0!==b}function Km(b){return Math.pow(2,Math.ceil(Math.log(b)/Math.LN2))}function ip(b){return Math.pow(2,Math.floor(Math.log(b)/Math.LN2))}function Ba(b,n){switch(n.constructor){case Float32Array:return b;case Uint16Array:return b/65535;case Uint8Array:return b/255;case Int16Array:return Math.max(b/32767,-1);case Int8Array:return Math.max(b/127,-1);default:throw new Error("Invalid component type.")}}function wi(b,n){switch(n.constructor){case Float32Array:return b;case Uint16Array:return Math.round(65535*b);case Uint8Array:return Math.round(255*b);case Int16Array:return Math.round(32767*b);case Int8Array:return Math.round(127*b);default:throw new Error("Invalid component type.")}}const Aa={DEG2RAD:pc,RAD2DEG:rh,generateUUID:Ra,clamp:gr,euclideanModulo:$m,mapLinear:function FA(b,n,o,m,A){return m+(b-n)*(A-m)/(o-n)},inverseLerp:function If(b,n,o){return b!==n?(o-b)/(n-b):0},lerp:Ws,damp:function lu(b,n,o,m){return Ws(b,n,1-Math.exp(-o*m))},pingpong:function Zi(b,n=1){return n-Math.abs($m(b,2*n)-n)},smoothstep:function Lx(b,n,o){return b<=n?0:b>=o?1:(b=(b-n)/(o-n))*b*(3-2*b)},smootherstep:function Dx(b,n,o){return b<=n?0:b>=o?1:(b=(b-n)/(o-n))*b*b*(b*(6*b-15)+10)},randInt:function Fx(b,n){return b+Math.floor(Math.random()*(n-b+1))},randFloat:function kx(b,n){return b+Math.random()*(n-b)},randFloatSpread:function Ox(b){return b*(.5-Math.random())},seededRandom:function kA(b){void 0!==b&&(np=b);let n=np+=1831565813;return n=Math.imul(n^n>>>15,1|n),n^=n+Math.imul(n^n>>>7,61|n),((n^n>>>14)>>>0)/4294967296},degToRad:function OA(b){return b*pc},radToDeg:function sh(b){return b*rh},isPowerOfTwo:kl,ceilPowerOfTwo:Km,floorPowerOfTwo:ip,setQuaternionFromProperEuler:function Zm(b,n,o,m,A){const E=Math.cos,w=Math.sin,T=E(o/2),B=w(o/2),D=E((n+m)/2),N=w((n+m)/2),G=E((n-m)/2),H=w((n-m)/2),Q=E((m-n)/2),Z=w((m-n)/2);switch(A){case"XYX":b.set(T*N,B*G,B*H,T*D);break;case"YZY":b.set(B*H,T*N,B*G,T*D);break;case"ZXZ":b.set(B*G,B*H,T*N,T*D);break;case"XZX":b.set(T*N,B*Z,B*Q,T*D);break;case"YXY":b.set(B*Q,T*N,B*Z,T*D);break;case"ZYZ":b.set(B*Z,B*Q,T*N,T*D);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+A)}},normalize:wi,denormalize:Ba};class qt{constructor(n=0,o=0){qt.prototype.isVector2=!0,this.x=n,this.y=o}get width(){return this.x}set width(n){this.x=n}get height(){return this.y}set height(n){this.y=n}set(n,o){return this.x=n,this.y=o,this}setScalar(n){return this.x=n,this.y=n,this}setX(n){return this.x=n,this}setY(n){return this.y=n,this}setComponent(n,o){switch(n){case 0:this.x=o;break;case 1:this.y=o;break;default:throw new Error("index is out of range: "+n)}return this}getComponent(n){switch(n){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+n)}}clone(){return new this.constructor(this.x,this.y)}copy(n){return this.x=n.x,this.y=n.y,this}add(n){return this.x+=n.x,this.y+=n.y,this}addScalar(n){return this.x+=n,this.y+=n,this}addVectors(n,o){return this.x=n.x+o.x,this.y=n.y+o.y,this}addScaledVector(n,o){return this.x+=n.x*o,this.y+=n.y*o,this}sub(n){return this.x-=n.x,this.y-=n.y,this}subScalar(n){return this.x-=n,this.y-=n,this}subVectors(n,o){return this.x=n.x-o.x,this.y=n.y-o.y,this}multiply(n){return this.x*=n.x,this.y*=n.y,this}multiplyScalar(n){return this.x*=n,this.y*=n,this}divide(n){return this.x/=n.x,this.y/=n.y,this}divideScalar(n){return this.multiplyScalar(1/n)}applyMatrix3(n){const o=this.x,m=this.y,A=n.elements;return this.x=A[0]*o+A[3]*m+A[6],this.y=A[1]*o+A[4]*m+A[7],this}min(n){return this.x=Math.min(this.x,n.x),this.y=Math.min(this.y,n.y),this}max(n){return this.x=Math.max(this.x,n.x),this.y=Math.max(this.y,n.y),this}clamp(n,o){return this.x=Math.max(n.x,Math.min(o.x,this.x)),this.y=Math.max(n.y,Math.min(o.y,this.y)),this}clampScalar(n,o){return this.x=Math.max(n,Math.min(o,this.x)),this.y=Math.max(n,Math.min(o,this.y)),this}clampLength(n,o){const m=this.length();return this.divideScalar(m||1).multiplyScalar(Math.max(n,Math.min(o,m)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(n){return this.x*n.x+this.y*n.y}cross(n){return this.x*n.y-this.y*n.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(n){const o=Math.sqrt(this.lengthSq()*n.lengthSq());if(0===o)return Math.PI/2;const m=this.dot(n)/o;return Math.acos(gr(m,-1,1))}distanceTo(n){return Math.sqrt(this.distanceToSquared(n))}distanceToSquared(n){const o=this.x-n.x,m=this.y-n.y;return o*o+m*m}manhattanDistanceTo(n){return Math.abs(this.x-n.x)+Math.abs(this.y-n.y)}setLength(n){return this.normalize().multiplyScalar(n)}lerp(n,o){return this.x+=(n.x-this.x)*o,this.y+=(n.y-this.y)*o,this}lerpVectors(n,o,m){return this.x=n.x+(o.x-n.x)*m,this.y=n.y+(o.y-n.y)*m,this}equals(n){return n.x===this.x&&n.y===this.y}fromArray(n,o=0){return this.x=n[o],this.y=n[o+1],this}toArray(n=[],o=0){return n[o]=this.x,n[o+1]=this.y,n}fromBufferAttribute(n,o){return this.x=n.getX(o),this.y=n.getY(o),this}rotateAround(n,o){const m=Math.cos(o),A=Math.sin(o),E=this.x-n.x,w=this.y-n.y;return this.x=E*m-w*A+n.x,this.y=E*A+w*m+n.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class Di{constructor(){Di.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1]}set(n,o,m,A,E,w,T,B,D){const N=this.elements;return N[0]=n,N[1]=A,N[2]=T,N[3]=o,N[4]=E,N[5]=B,N[6]=m,N[7]=w,N[8]=D,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(n){const o=this.elements,m=n.elements;return o[0]=m[0],o[1]=m[1],o[2]=m[2],o[3]=m[3],o[4]=m[4],o[5]=m[5],o[6]=m[6],o[7]=m[7],o[8]=m[8],this}extractBasis(n,o,m){return n.setFromMatrix3Column(this,0),o.setFromMatrix3Column(this,1),m.setFromMatrix3Column(this,2),this}setFromMatrix4(n){const o=n.elements;return this.set(o[0],o[4],o[8],o[1],o[5],o[9],o[2],o[6],o[10]),this}multiply(n){return this.multiplyMatrices(this,n)}premultiply(n){return this.multiplyMatrices(n,this)}multiplyMatrices(n,o){const m=n.elements,A=o.elements,E=this.elements,w=m[0],T=m[3],B=m[6],D=m[1],N=m[4],G=m[7],H=m[2],Q=m[5],Z=m[8],he=A[0],J=A[3],Y=A[6],ve=A[1],pe=A[4],Ae=A[7],Ie=A[2],Ne=A[5],Xe=A[8];return E[0]=w*he+T*ve+B*Ie,E[3]=w*J+T*pe+B*Ne,E[6]=w*Y+T*Ae+B*Xe,E[1]=D*he+N*ve+G*Ie,E[4]=D*J+N*pe+G*Ne,E[7]=D*Y+N*Ae+G*Xe,E[2]=H*he+Q*ve+Z*Ie,E[5]=H*J+Q*pe+Z*Ne,E[8]=H*Y+Q*Ae+Z*Xe,this}multiplyScalar(n){const o=this.elements;return o[0]*=n,o[3]*=n,o[6]*=n,o[1]*=n,o[4]*=n,o[7]*=n,o[2]*=n,o[5]*=n,o[8]*=n,this}determinant(){const n=this.elements,o=n[0],m=n[1],A=n[2],E=n[3],w=n[4],T=n[5],B=n[6],D=n[7],N=n[8];return o*w*N-o*T*D-m*E*N+m*T*B+A*E*D-A*w*B}invert(){const n=this.elements,o=n[0],m=n[1],A=n[2],E=n[3],w=n[4],T=n[5],B=n[6],D=n[7],N=n[8],G=N*w-T*D,H=T*B-N*E,Q=D*E-w*B,Z=o*G+m*H+A*Q;if(0===Z)return this.set(0,0,0,0,0,0,0,0,0);const he=1/Z;return n[0]=G*he,n[1]=(A*D-N*m)*he,n[2]=(T*m-A*w)*he,n[3]=H*he,n[4]=(N*o-A*B)*he,n[5]=(A*E-T*o)*he,n[6]=Q*he,n[7]=(m*B-D*o)*he,n[8]=(w*o-m*E)*he,this}transpose(){let n;const o=this.elements;return n=o[1],o[1]=o[3],o[3]=n,n=o[2],o[2]=o[6],o[6]=n,n=o[5],o[5]=o[7],o[7]=n,this}getNormalMatrix(n){return this.setFromMatrix4(n).invert().transpose()}transposeIntoArray(n){const o=this.elements;return n[0]=o[0],n[1]=o[3],n[2]=o[6],n[3]=o[1],n[4]=o[4],n[5]=o[7],n[6]=o[2],n[7]=o[5],n[8]=o[8],this}setUvTransform(n,o,m,A,E,w,T){const B=Math.cos(E),D=Math.sin(E);
83return this.set(m*B,m*D,-m*(B*w+D*T)+w+n,-A*D,A*B,-A*(-D*w+B*T)+T+o,0,0,1),this}scale(n,o){return this.premultiply(jm.makeScale(n,o)),this}rotate(n){return this.premultiply(jm.makeRotation(-n)),this}translate(n,o){return this.premultiply(jm.makeTranslation(n,o)),this}makeTranslation(n,o){return this.set(1,0,n,0,1,o,0,0,1),this}makeRotation(n){const o=Math.cos(n),m=Math.sin(n);return this.set(o,-m,0,m,o,0,0,0,1),this}makeScale(n,o){return this.set(n,0,0,0,o,0,0,0,1),this}equals(n){const o=this.elements,m=n.elements;for(let A=0;A<9;A++)if(o[A]!==m[A])return!1;return!0}fromArray(n,o=0){for(let m=0;m<9;m++)this.elements[m]=n[m+o];return this}toArray(n=[],o=0){const m=this.elements;return n[o]=m[0],n[o+1]=m[1],n[o+2]=m[2],n[o+3]=m[3],n[o+4]=m[4],n[o+5]=m[5],n[o+6]=m[6],n[o+7]=m[7],n[o+8]=m[8],n}clone(){return(new this.constructor).fromArray(this.elements)}}const jm=new Di;function Jm(b){for(let n=b.length-1;n>=0;--n)if(b[n]>=65535)return!0;return!1}const mc={Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array};function gc(b,n){return new mc[b](n)}function ah(b){return document.createElementNS("http://www.w3.org/1999/xhtml",b)}function cu(b){return b<.04045?.0773993808*b:Math.pow(.9478672986*b+.0521327014,2.4)}function eg(b){return b<.0031308?12.92*b:1.055*Math.pow(b,.41666)-.055}const Nx=(new Di).fromArray([.8224621,.0331941,.0170827,.177538,.9668058,.0723974,-1e-7,1e-7,.9105199]),Pf=(new Di).fromArray([1.2249401,-.0420569,-.0196376,-.2249404,1.0420571,-.0786361,1e-7,0,1.0982735]),gs={[tl]:b=>b,[Zr]:b=>b.convertSRGBToLinear(),[nl]:function NA(b){return b.convertSRGBToLinear().applyMatrix3(Pf)}},tg={[tl]:b=>b,[Zr]:b=>b.convertLinearToSRGB(),[nl]:function UA(b){return b.applyMatrix3(Nx).convertLinearToSRGB()}},_a={enabled:!1,get legacyMode(){return console.warn("THREE.ColorManagement: .legacyMode=false renamed to .enabled=true in r150."),!this.enabled},set legacyMode(b){console.warn("THREE.ColorManagement: .legacyMode=false renamed to .enabled=true in r150."),this.enabled=!b},get workingColorSpace(){return tl},set workingColorSpace(b){console.warn("THREE.ColorManagement: .workingColorSpace is readonly.")},convert:function(b,n,o){if(!1===this.enabled||n===o||!n||!o)return b;const m=gs[n],A=tg[o];if(void 0===m||void 0===A)throw new Error(`Unsupported color space conversion, "${n}" to "${o}".`);return A(m(b))},fromWorkingColorSpace:function(b,n){return this.convert(b,this.workingColorSpace,n)},toWorkingColorSpace:function(b,n){return this.convert(b,n,this.workingColorSpace)}};let hu;class ng{static getDataURL(n){if(/^data:/i.test(n.src)||typeof HTMLCanvasElement>"u")return n.src;let o;if(n instanceof HTMLCanvasElement)o=n;else{void 0===hu&&(hu=ah("canvas")),hu.width=n.width,hu.height=n.height;const m=hu.getContext("2d");n instanceof ImageData?m.putImageData(n,0,0):m.drawImage(n,0,0,n.width,n.height),o=hu}return o.width>2048||o.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",n),o.toDataURL("image/jpeg",.6)):o.toDataURL("image/png")}static sRGBToLinear(n){if(typeof HTMLImageElement<"u"&&n instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&n instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&n instanceof ImageBitmap){const o=ah("canvas");o.width=n.width,o.height=n.height;const m=o.getContext("2d");m.drawImage(n,0,0,n.width,n.height);const A=m.getImageData(0,0,n.width,n.height),E=A.data;for(let w=0;w<E.length;w++)E[w]=255*cu(E[w]/255);return m.putImageData(A,0,0),o}if(n.data){const o=n.data.slice(0);for(let m=0;m<o.length;m++)o[m]=o instanceof Uint8Array||o instanceof Uint8ClampedArray?Math.floor(255*cu(o[m]/255)):cu(o[m]);return{data:o,width:n.width,height:n.height}}return console.warn("THREE.ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied."),n}}class Ol{constructor(n=null){this.isSource=!0,this.uuid=Ra(),this.data=n,this.version=0}set needsUpdate(n){!0===n&&this.version++}toJSON(n){const o=void 0===n||"string"==typeof n;if(!o&&void 0!==n.images[this.uuid])return n.images[this.uuid];const m={uuid:this.uuid,url:""},A=this.data;if(null!==A){let E;if(Array.isArray(A)){E=[];for(let w=0,T=A.length;w<T;w++)E.push(rp(A[w].isDataTexture?A[w].image:A[w]))}else E=rp(A);m.url=E}return o||(n.images[this.uuid]=m),m}}function rp(b){return typeof HTMLImageElement<"u"&&b instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&b instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&b instanceof ImageBitmap?ng.getDataURL(b):b.data?{data:Array.from(b.data),width:b.
vendor: 5,858 bytes, line 83
83width,height:b.height,type:b.data.constructor.name}:(console.warn("THREE.Texture: Unable to serialize Texture."),{})}let Ux=0,va=(()=>{class b extends Ki{constructor(o=b.DEFAULT_IMAGE,m=b.DEFAULT_MAPPING,A=Pn,E=Pn,w=Mi,T=Il,B=ea,D=Ko,N=b.DEFAULT_ANISOTROPY,G=dc){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:Ux++}),this.uuid=Ra(),this.name="",this.source=new Ol(o),this.mipmaps=[],this.mapping=m,this.channel=0,this.wrapS=A,this.wrapT=E,this.magFilter=w,this.minFilter=T,this.anisotropy=N,this.format=B,this.internalFormat=null,this.type=D,this.offset=new qt(0,0),this.repeat=new qt(1,1),this.center=new qt(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new Di,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.encoding=G,this.userData={},this.version=0,this.onUpdate=null,this.isRenderTargetTexture=!1,this.needsPMREMUpdate=!1}get image(){return this.source.data}set image(o=null){this.source.data=o}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}clone(){return(new this.constructor).copy(this)}copy(o){return this.name=o.name,this.source=o.source,this.mipmaps=o.mipmaps.slice(0),this.mapping=o.mapping,this.channel=o.channel,this.wrapS=o.wrapS,this.wrapT=o.wrapT,this.magFilter=o.magFilter,this.minFilter=o.minFilter,this.anisotropy=o.anisotropy,this.format=o.format,this.internalFormat=o.internalFormat,this.type=o.type,this.offset.copy(o.offset),this.repeat.copy(o.repeat),this.center.copy(o.center),this.rotation=o.rotation,this.matrixAutoUpdate=o.matrixAutoUpdate,this.matrix.copy(o.matrix),this.generateMipmaps=o.generateMipmaps,this.premultiplyAlpha=o.premultiplyAlpha,this.flipY=o.flipY,this.unpackAlignment=o.unpackAlignment,this.encoding=o.encoding,this.userData=JSON.parse(JSON.stringify(o.userData)),this.needsUpdate=!0,this}toJSON(o){const m=void 0===o||"string"==typeof o;if(!m&&void 0!==o.textures[this.uuid])return o.textures[this.uuid];const A={metadata:{version:4.5,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,image:this.source.toJSON(o).uuid,mapping:this.mapping,channel:this.channel,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,internalFormat:this.internalFormat,type:this.type,encoding:this.encoding,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,generateMipmaps:this.generateMipmaps,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};return Object.keys(this.userData).length>0&&(A.userData=this.userData),m||(o.textures[this.uuid]=A),A}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(o){if(300!==this.mapping)return o;if(o.applyMatrix3(this.matrix),o.x<0||o.x>1)switch(this.wrapS){case at:o.x=o.x-Math.floor(o.x);break;case Pn:o.x=o.x<0?0:1;break;case Nr:o.x=1===Math.abs(Math.floor(o.x)%2)?Math.ceil(o.x)-o.x:o.x-Math.floor(o.x)}if(o.y<0||o.y>1)switch(this.wrapT){case at:o.y=o.y-Math.floor(o.y);break;case Pn:o.y=o.y<0?0:1;break;case Nr:o.y=1===Math.abs(Math.floor(o.y)%2)?Math.ceil(o.y)-o.y:o.y-Math.floor(o.y)}return this.flipY&&(o.y=1-o.y),o}set needsUpdate(o){!0===o&&(this.version++,this.source.needsUpdate=!0)}}return b.DEFAULT_IMAGE=null,b.DEFAULT_MAPPING=300,b.DEFAULT_ANISOTROPY=1,b})();class fr{constructor(n=0,o=0,m=0,A=1){fr.prototype.isVector4=!0,this.x=n,this.y=o,this.z=m,this.w=A}get width(){return this.z}set width(n){this.z=n}get height(){return this.w}set height(n){this.w=n}set(n,o,m,A){return this.x=n,this.y=o,this.z=m,this.w=A,this}setScalar(n){return this.x=n,this.y=n,this.z=n,this.w=n,this}setX(n){return this.x=n,this}setY(n){return this.y=n,this}setZ(n){return this.z=n,this}setW(n){return this.w=n,this}setComponent(n,o){switch(n){case 0:this.x=o;break;case 1:this.y=o;break;case 2:this.z=o;break;case 3:this.w=o;break;default:throw new Error("index is out of range: "+n)}return this}getComponent(n){switch(n){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: "+n)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(n){return this.x=n.x,this.y=n.y,this.z=n.z,this.w=void 0!==n.w?n.w:1,this}add(n){return this.x+=n.x,this.y+=n.y,this.z+=n.z,this.w+=n.w,this}addScalar(n){return this.x+=n,this.y+=n,this.z+=n,this.w+=n,this}addVectors(n,o){return this.x=n.x+o.x,this.y=n.y+o.y,this.z=n.z+o.z,this.w=n.w+o.w,this}addScaledVector(n,o){return this.x+=n.x*o,this.y+=n.y*o,this.z+=n.z*o,this.w+=n.w*o,this}sub(n){return this.x-=n.x,this.y-=n.y,this.z-=n.z,this.w-=n.w,this}subScalar(n){return this.x-=n,this.y-=n,this.z-=n,this.w-=n,this}subVectors(n,o){return this.x=n.x-o.x,this.y=n.y-o.y,this.z=n.z-o.z,this.w=n.w-o.w,this}multiply(n){return this.x*=n.x,this.y*=n.y,this.z*=n.z,this.w*=n.w,this}multiplyScalar(n){return this.x*=n,this.y*=n,this.z*=n,this.w*=n,this}applyMatrix4(n){const o=this.x,m=this.y,A=this.z,E=this.w,w=n.elements;return this.x=w[0]*o+w[4]*m+w[8]*A+w[12]*E,this.y=w[1]*o+w[5]*m+w[9]*A+w[13]*E,this.z=w[2]*o+w[6]*m+w[10]*A+w[14]*E,this.w=w[3]*o+w[7]*m+w[11]*A+w[15]*E,this}divideScalar(n){return this.multiplyScalar(1/n)}setAxisAngleFromQuaternion(n){this.w=2*Math.acos(n.w);const o=Math.sqrt(1-n.w*n.w);return o<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=n.x/o,this.y=n.y/o,this.z=n.z/o),this}setAxisAngleFromRotationMatrix(n){let o,m,A,E;const B=n.elements,D=B[0],N=B[4],G=B[8],H=B[1],Q=B[5],Z=B[9],he=B[2],J=B[6],Y=B[10];if(Math.abs(N-H)<.01&&Math.abs(G-he)<.01&&Math.abs(Z-J)<.01){if(Math.abs(N+H)<.1&&Math.abs(G+he)<.1&&Math.abs(Z+J)<.1&&Math.abs(D+Q+Y-3)<.1)return this.set(1,0,0,0),this;o=Math.PI;const pe=(D+1)/2,Ae=(Q+1)/2,Ie=(Y+1)/2,Ne=(N+H)/4,Xe=(G+he)/4,Qe=(
vendor: 5,466 bytes, line 83
83Z+J)/4;return pe>Ae&&pe>Ie?pe<.01?(m=0,A=.707106781,E=.707106781):(m=Math.sqrt(pe),A=Ne/m,E=Xe/m):Ae>Ie?Ae<.01?(m=.707106781,A=0,E=.707106781):(A=Math.sqrt(Ae),m=Ne/A,E=Qe/A):Ie<.01?(m=.707106781,A=.707106781,E=0):(E=Math.sqrt(Ie),m=Xe/E,A=Qe/E),this.set(m,A,E,o),this}let ve=Math.sqrt((J-Z)*(J-Z)+(G-he)*(G-he)+(H-N)*(H-N));return Math.abs(ve)<.001&&(ve=1),this.x=(J-Z)/ve,this.y=(G-he)/ve,this.z=(H-N)/ve,this.w=Math.acos((D+Q+Y-1)/2),this}min(n){return this.x=Math.min(this.x,n.x),this.y=Math.min(this.y,n.y),this.z=Math.min(this.z,n.z),this.w=Math.min(this.w,n.w),this}max(n){return this.x=Math.max(this.x,n.x),this.y=Math.max(this.y,n.y),this.z=Math.max(this.z,n.z),this.w=Math.max(this.w,n.w),this}clamp(n,o){return this.x=Math.max(n.x,Math.min(o.x,this.x)),this.y=Math.max(n.y,Math.min(o.y,this.y)),this.z=Math.max(n.z,Math.min(o.z,this.z)),this.w=Math.max(n.w,Math.min(o.w,this.w)),this}clampScalar(n,o){return this.x=Math.max(n,Math.min(o,this.x)),this.y=Math.max(n,Math.min(o,this.y)),this.z=Math.max(n,Math.min(o,this.z)),this.w=Math.max(n,Math.min(o,this.w)),this}clampLength(n,o){const m=this.length();return this.divideScalar(m||1).multiplyScalar(Math.max(n,Math.min(o,m)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this.w=this.w<0?Math.ceil(this.w):Math.floor(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(n){return this.x*n.x+this.y*n.y+this.z*n.z+this.w*n.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(n){return this.normalize().multiplyScalar(n)}lerp(n,o){return this.x+=(n.x-this.x)*o,this.y+=(n.y-this.y)*o,this.z+=(n.z-this.z)*o,this.w+=(n.w-this.w)*o,this}lerpVectors(n,o,m){return this.x=n.x+(o.x-n.x)*m,this.y=n.y+(o.y-n.y)*m,this.z=n.z+(o.z-n.z)*m,this.w=n.w+(o.w-n.w)*m,this}equals(n){return n.x===this.x&&n.y===this.y&&n.z===this.z&&n.w===this.w}fromArray(n,o=0){return this.x=n[o],this.y=n[o+1],this.z=n[o+2],this.w=n[o+3],this}toArray(n=[],o=0){return n[o]=this.x,n[o+1]=this.y,n[o+2]=this.z,n[o+3]=this.w,n}fromBufferAttribute(n,o){return this.x=n.getX(o),this.y=n.getY(o),this.z=n.getZ(o),this.w=n.getW(o),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 Fo extends Ki{constructor(n=1,o=1,m={}){super(),this.isWebGLRenderTarget=!0,this.width=n,this.height=o,this.depth=1,this.scissor=new fr(0,0,n,o),this.scissorTest=!1,this.viewport=new fr(0,0,n,o),this.texture=new va({width:n,height:o,depth:1},m.mapping,m.wrapS,m.wrapT,m.magFilter,m.minFilter,m.format,m.type,m.anisotropy,m.encoding),this.texture.isRenderTargetTexture=!0,this.texture.flipY=!1,this.texture.generateMipmaps=void 0!==m.generateMipmaps&&m.generateMipmaps,this.texture.internalFormat=void 0!==m.internalFormat?m.internalFormat:null,this.texture.minFilter=void 0!==m.minFilter?m.minFilter:Mi,this.depthBuffer=void 0===m.depthBuffer||m.depthBuffer,this.stencilBuffer=void 0!==m.stencilBuffer&&m.stencilBuffer,this.depthTexture=void 0!==m.depthTexture?m.depthTexture:null,this.samples=void 0!==m.samples?m.samples:0}setSize(n,o,m=1){(this.width!==n||this.height!==o||this.depth!==m)&&(this.width=n,this.height=o,this.depth=m,this.texture.image.width=n,this.texture.image.height=o,this.texture.image.depth=m,this.dispose()),this.viewport.set(0,0,n,o),this.scissor.set(0,0,n,o)}clone(){return(new this.constructor).copy(this)}copy(n){this.width=n.width,this.height=n.height,this.depth=n.depth,this.viewport.copy(n.viewport),this.texture=n.texture.clone(),this.texture.isRenderTargetTexture=!0;const o=Object.assign({},n.texture.image);return this.texture.source=new Ol(o),this.depthBuffer=n.depthBuffer,this.stencilBuffer=n.stencilBuffer,null!==n.depthTexture&&(this.depthTexture=n.depthTexture.clone()),this.samples=n.samples,this}dispose(){this.dispatchEvent({type:"dispose"})}}class sp extends va{constructor(n=null,o=1,m=1,A=1){super(null),this.isDataArrayTexture=!0,this.image={data:n,width:o,height:m,depth:A},this.magFilter=Jn,this.minFilter=Jn,this.wrapR=Pn,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class ap extends va{constructor(n=null,o=1,m=1,A=1){super(null),this.isData3DTexture=!0,this.image={data:n,width:o,height:m,depth:A},this.magFilter=Jn,this.minFilter=Jn,this.wrapR=Pn,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class Xs{constructor(n=0,o=0,m=0,A=1){this.isQuaternion=!0,this._x=n,this._y=o,this._z=m,this._w=A}static slerpFlat(n,o,m,A,E,w,T){let B=m[A+0],D=m[A+1],N=m[A+2],G=m[A+3];const H=E[w+0],Q=E[w+1],Z=E[w+2],he=E[w+3];if(0===T)return n[o+0]=B,n[o+1]=D,n[o+2]=N,void(n[o+3]=G);if(1===T)return n[o+0]=H,n[o+1]=Q,n[o+2]=Z,void(n[o+3]=he);
vendor: 5,346 bytes, line 83
83if(G!==he||B!==H||D!==Q||N!==Z){let J=1-T;const Y=B*H+D*Q+N*Z+G*he,ve=Y>=0?1:-1,pe=1-Y*Y;if(pe>Number.EPSILON){const Ie=Math.sqrt(pe),Ne=Math.atan2(Ie,Y*ve);J=Math.sin(J*Ne)/Ie,T=Math.sin(T*Ne)/Ie}const Ae=T*ve;if(B=B*J+H*Ae,D=D*J+Q*Ae,N=N*J+Z*Ae,G=G*J+he*Ae,J===1-T){const Ie=1/Math.sqrt(B*B+D*D+N*N+G*G);B*=Ie,D*=Ie,N*=Ie,G*=Ie}}n[o]=B,n[o+1]=D,n[o+2]=N,n[o+3]=G}static multiplyQuaternionsFlat(n,o,m,A,E,w){const T=m[A],B=m[A+1],D=m[A+2],N=m[A+3],G=E[w],H=E[w+1],Q=E[w+2],Z=E[w+3];return n[o]=T*Z+N*G+B*Q-D*H,n[o+1]=B*Z+N*H+D*G-T*Q,n[o+2]=D*Z+N*Q+T*H-B*G,n[o+3]=N*Z-T*G-B*H-D*Q,n}get x(){return this._x}set x(n){this._x=n,this._onChangeCallback()}get y(){return this._y}set y(n){this._y=n,this._onChangeCallback()}get z(){return this._z}set z(n){this._z=n,this._onChangeCallback()}get w(){return this._w}set w(n){this._w=n,this._onChangeCallback()}set(n,o,m,A){return this._x=n,this._y=o,this._z=m,this._w=A,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(n){return this._x=n.x,this._y=n.y,this._z=n.z,this._w=n.w,this._onChangeCallback(),this}setFromEuler(n,o){const m=n._x,A=n._y,E=n._z,w=n._order,T=Math.cos,B=Math.sin,D=T(m/2),N=T(A/2),G=T(E/2),H=B(m/2),Q=B(A/2),Z=B(E/2);switch(w){case"XYZ":this._x=H*N*G+D*Q*Z,this._y=D*Q*G-H*N*Z,this._z=D*N*Z+H*Q*G,this._w=D*N*G-H*Q*Z;break;case"YXZ":this._x=H*N*G+D*Q*Z,this._y=D*Q*G-H*N*Z,this._z=D*N*Z-H*Q*G,this._w=D*N*G+H*Q*Z;break;case"ZXY":this._x=H*N*G-D*Q*Z,this._y=D*Q*G+H*N*Z,this._z=D*N*Z+H*Q*G,this._w=D*N*G-H*Q*Z;break;case"ZYX":this._x=H*N*G-D*Q*Z,this._y=D*Q*G+H*N*Z,this._z=D*N*Z-H*Q*G,this._w=D*N*G+H*Q*Z;break;case"YZX":this._x=H*N*G+D*Q*Z,this._y=D*Q*G+H*N*Z,this._z=D*N*Z-H*Q*G,this._w=D*N*G-H*Q*Z;break;case"XZY":this._x=H*N*G-D*Q*Z,this._y=D*Q*G-H*N*Z,this._z=D*N*Z+H*Q*G,this._w=D*N*G+H*Q*Z;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+w)}return!1!==o&&this._onChangeCallback(),this}setFromAxisAngle(n,o){const m=o/2,A=Math.sin(m);return this._x=n.x*A,this._y=n.y*A,this._z=n.z*A,this._w=Math.cos(m),this._onChangeCallback(),this}setFromRotationMatrix(n){const o=n.elements,m=o[0],A=o[4],E=o[8],w=o[1],T=o[5],B=o[9],D=o[2],N=o[6],G=o[10],H=m+T+G;if(H>0){const Q=.5/Math.sqrt(H+1);this._w=.25/Q,this._x=(N-B)*Q,this._y=(E-D)*Q,this._z=(w-A)*Q}else if(m>T&&m>G){const Q=2*Math.sqrt(1+m-T-G);this._w=(N-B)/Q,this._x=.25*Q,this._y=(A+w)/Q,this._z=(E+D)/Q}else if(T>G){const Q=2*Math.sqrt(1+T-m-G);this._w=(E-D)/Q,this._x=(A+w)/Q,this._y=.25*Q,this._z=(B+N)/Q}else{const Q=2*Math.sqrt(1+G-m-T);this._w=(w-A)/Q,this._x=(E+D)/Q,this._y=(B+N)/Q,this._z=.25*Q}return this._onChangeCallback(),this}setFromUnitVectors(n,o){let m=n.dot(o)+1;return m<Number.EPSILON?(m=0,Math.abs(n.x)>Math.abs(n.z)?(this._x=-n.y,this._y=n.x,this._z=0,this._w=m):(this._x=0,this._y=-n.z,this._z=n.y,this._w=m)):(this._x=n.y*o.z-n.z*o.y,this._y=n.z*o.x-n.x*o.z,this._z=n.x*o.y-n.y*o.x,this._w=m),this.normalize()}angleTo(n){return 2*Math.acos(Math.abs(gr(this.dot(n),-1,1)))}rotateTowards(n,o){const m=this.angleTo(n);if(0===m)return this;const A=Math.min(1,o/m);return this.slerp(n,A),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(n){return this._x*n._x+this._y*n._y+this._z*n._z+this._w*n._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 n=this.length();return 0===n?(this._x=0,this._y=0,this._z=0,this._w=1):(n=1/n,this._x=this._x*n,this._y=this._y*n,this._z=this._z*n,this._w=this._w*n),this._onChangeCallback(),this}multiply(n){return this.multiplyQuaternions(this,n)}premultiply(n){return this.multiplyQuaternions(n,this)}multiplyQuaternions(n,o){const m=n._x,A=n._y,E=n._z,w=n._w,T=o._x,B=o._y,D=o._z,N=o._w;return this._x=m*N+w*T+A*D-E*B,this._y=A*N+w*B+E*T-m*D,this._z=E*N+w*D+m*B-A*T,this._w=w*N-m*T-A*B-E*D,this._onChangeCallback(),this}slerp(n,o){if(0===o)return this;if(1===o)return this.copy(n);const m=this._x,A=this._y,E=this._z,w=this._w;let T=w*n._w+m*n._x+A*n._y+E*n._z;if(T<0?(this._w=-n._w,this._x=-n._x,this._y=-n._y,this._z=-n._z,T=-T):this.copy(n),T>=1)return this._w=w,this._x=m,this._y=A,this._z=E,this;const B=1-T*T;if(B<=Number.EPSILON){const Q=1-o;return this._w=Q*w+o*this._w,this._x=Q*m+o*this._x,this._y=Q*A+o*this._y,this._z=Q*E+o*this._z,this.normalize(),this._onChangeCallback(),this}const D=Math.sqrt(B),N=Math.atan2(D,T),G=Math.sin((1-o)*N)/D,H=Math.sin(o*N)/D;return this._w=w*G+this._w*H,this._x=m*G+this._x*H,this._y=A*G+this._y*H,this._z=E*G+this._z*H,this._onChangeCallback(),this}slerpQuaternions(n,o,m){return this.copy(n).slerp(o,m)}random(){const n=Math.random(),o=Math.sqrt(1-n),m=Math.sqrt(n),A=2*Math.PI*Math.random(),E=2*Math.PI*Math.random();return this.set(o*Math.cos(A),m*Math.sin(E),m*Math.cos(E),o*Math.sin(A))}equals(n){return n._x===this._x&&n._y===this._y&&n._z===this._z&&n._w===this._w}fromArray(n,o=0){return this._x=n[o],this._y=n[o+1],this._z=n[o+2],this._w=n[o+3],this._onChangeCallback(),this}toArray(n=[],o=0){return n[o]=this._x,n[o+1]=this._y,n[o+2]=this._z,n[o+3]=this._w,n}fromBufferAttribute(n,o){return this._x=n.getX(o),this._y=n.getY(o),this._z=n.getZ(o),this._w=n.getW(o
vendor: 11,636 bytes, line 83
83),this}toJSON(){return this.toArray()}_onChange(n){return this._onChangeCallback=n,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class De{constructor(n=0,o=0,m=0){De.prototype.isVector3=!0,this.x=n,this.y=o,this.z=m}set(n,o,m){return void 0===m&&(m=this.z),this.x=n,this.y=o,this.z=m,this}setScalar(n){return this.x=n,this.y=n,this.z=n,this}setX(n){return this.x=n,this}setY(n){return this.y=n,this}setZ(n){return this.z=n,this}setComponent(n,o){switch(n){case 0:this.x=o;break;case 1:this.y=o;break;case 2:this.z=o;break;default:throw new Error("index is out of range: "+n)}return this}getComponent(n){switch(n){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+n)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(n){return this.x=n.x,this.y=n.y,this.z=n.z,this}add(n){return this.x+=n.x,this.y+=n.y,this.z+=n.z,this}addScalar(n){return this.x+=n,this.y+=n,this.z+=n,this}addVectors(n,o){return this.x=n.x+o.x,this.y=n.y+o.y,this.z=n.z+o.z,this}addScaledVector(n,o){return this.x+=n.x*o,this.y+=n.y*o,this.z+=n.z*o,this}sub(n){return this.x-=n.x,this.y-=n.y,this.z-=n.z,this}subScalar(n){return this.x-=n,this.y-=n,this.z-=n,this}subVectors(n,o){return this.x=n.x-o.x,this.y=n.y-o.y,this.z=n.z-o.z,this}multiply(n){return this.x*=n.x,this.y*=n.y,this.z*=n.z,this}multiplyScalar(n){return this.x*=n,this.y*=n,this.z*=n,this}multiplyVectors(n,o){return this.x=n.x*o.x,this.y=n.y*o.y,this.z=n.z*o.z,this}applyEuler(n){return this.applyQuaternion(zA.setFromEuler(n))}applyAxisAngle(n,o){return this.applyQuaternion(zA.setFromAxisAngle(n,o))}applyMatrix3(n){const o=this.x,m=this.y,A=this.z,E=n.elements;return this.x=E[0]*o+E[3]*m+E[6]*A,this.y=E[1]*o+E[4]*m+E[7]*A,this.z=E[2]*o+E[5]*m+E[8]*A,this}applyNormalMatrix(n){return this.applyMatrix3(n).normalize()}applyMatrix4(n){const o=this.x,m=this.y,A=this.z,E=n.elements,w=1/(E[3]*o+E[7]*m+E[11]*A+E[15]);return this.x=(E[0]*o+E[4]*m+E[8]*A+E[12])*w,this.y=(E[1]*o+E[5]*m+E[9]*A+E[13])*w,this.z=(E[2]*o+E[6]*m+E[10]*A+E[14])*w,this}applyQuaternion(n){const o=this.x,m=this.y,A=this.z,E=n.x,w=n.y,T=n.z,B=n.w,D=B*o+w*A-T*m,N=B*m+T*o-E*A,G=B*A+E*m-w*o,H=-E*o-w*m-T*A;return this.x=D*B+H*-E+N*-T-G*-w,this.y=N*B+H*-w+G*-E-D*-T,this.z=G*B+H*-T+D*-w-N*-E,this}project(n){return this.applyMatrix4(n.matrixWorldInverse).applyMatrix4(n.projectionMatrix)}unproject(n){return this.applyMatrix4(n.projectionMatrixInverse).applyMatrix4(n.matrixWorld)}transformDirection(n){const o=this.x,m=this.y,A=this.z,E=n.elements;return this.x=E[0]*o+E[4]*m+E[8]*A,this.y=E[1]*o+E[5]*m+E[9]*A,this.z=E[2]*o+E[6]*m+E[10]*A,this.normalize()}divide(n){return this.x/=n.x,this.y/=n.y,this.z/=n.z,this}divideScalar(n){return this.multiplyScalar(1/n)}min(n){return this.x=Math.min(this.x,n.x),this.y=Math.min(this.y,n.y),this.z=Math.min(this.z,n.z),this}max(n){return this.x=Math.max(this.x,n.x),this.y=Math.max(this.y,n.y),this.z=Math.max(this.z,n.z),this}clamp(n,o){return this.x=Math.max(n.x,Math.min(o.x,this.x)),this.y=Math.max(n.y,Math.min(o.y,this.y)),this.z=Math.max(n.z,Math.min(o.z,this.z)),this}clampScalar(n,o){return this.x=Math.max(n,Math.min(o,this.x)),this.y=Math.max(n,Math.min(o,this.y)),this.z=Math.max(n,Math.min(o,this.z)),this}clampLength(n,o){const m=this.length();return this.divideScalar(m||1).multiplyScalar(Math.max(n,Math.min(o,m)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(n){return this.x*n.x+this.y*n.y+this.z*n.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(n){return this.normalize().multiplyScalar(n)}lerp(n,o){return this.x+=(n.x-this.x)*o,this.y+=(n.y-this.y)*o,this.z+=(n.z-this.z)*o,this}lerpVectors(n,o,m){return this.x=n.x+(o.x-n.x)*m,this.y=n.y+(o.y-n.y)*m,this.z=n.z+(o.z-n.z)*m,this}cross(n){return this.crossVectors(this,n)}crossVectors(n,o){const m=n.x,A=n.y,E=n.z,w=o.x,T=o.y,B=o.z;return this.x=A*B-E*T,this.y=E*w-m*B,this.z=m*T-A*w,this}projectOnVector(n){const o=n.lengthSq();if(0===o)return this.set(0,0,0);const m=n.dot(this)/o;return this.copy(n).multiplyScalar(m)}projectOnPlane(n){return op.copy(this).projectOnVector(n),this.sub(op)}reflect(n){return this.sub(op.copy(n).multiplyScalar(2*this.dot(n)))}angleTo(n){const o=Math.sqrt(this.lengthSq()*n.lengthSq());if(0===o)return Math.PI/2;const m=this.dot(n)/o;return Math.acos(gr(m,-1,1))}distanceTo(n){return Math.sqrt(this.distanceToSquared(n))}distanceToSquared(n){const o=this.x-n.x,m=this.y-n.y,A=this.z-n.z;return o*o+m*m+A*A}manhattanDistanceTo(n){return Math.abs(this.x-n.x)+Math.abs(this.y-n.y)+Math.abs(this.z-n.z)}setFromSpherical(n){return this.setFromSphericalCoords(n.radius,n.phi,n.theta)}setFromSphericalCoords(n,o,m){const A=Math.sin(o)*n;return this.x=A*Math.sin(m),this.y=Math.cos(o)*n,this.z=A*Math.cos(m),this}setFromCylindrical(n){return this.setFromCylindricalCoords(n.radius,n.theta,n.y)}setFromCylindricalCoords(n,o,m){return this.x=n*Math.sin(o),this.y=m,this.z=n*Math.cos(o),this}setFromMatrixPosition(n){const o=n.elements;return this.x=o[12],this.y=o[13],this.z=o[14],this}setFromMatrixScale(n){const o=this.setFromMatrixColumn(n,0).length(),m=this.setFromMatrixColumn(n,1).length(),A=this.setFromMatrixColumn(n,2).length();return this.x=o,this.y=m,this.z=A,this}setFromMatrixColumn(n,o){return this.fromArray(n.elements,4*o)}setFromMatrix3Column(n,o){return this.fromArray(n.elements,3*o)}setFromEuler(n){return this.x=n._x,this.y=n._y,this.z=n._z,this}setFromColor(n){return this.x=n.r,this.y=n.g,this.z=n.b,this}equals(n){return n.x===this.x&&n.y===this.y&&n.z===this.z}fromArray(n,o=0){return this.x=n[o],this.y=n[o+1],this.z=n[o+2],this}toArray(n=[],o=0){return n[o]=this.x,n[o+1]=this.y,n[o+2]=this.z,n}fromBufferAttribute(n,o){return this.x=n.getX(o),this.y=n.getY(o),this.z=n.getZ(o),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const n=2*(Math.random()-.5),o=Math.random()*Math.PI*2,m=Math.sqrt(1-n**2);return this.x=m*Math.cos(o),this.y=m*Math.sin(o),this.z=n,this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const op=new De,zA=new Xs;class fo{constructor(n=new De(1/0,1/0,1/0),o=new De(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=n,this.max=o}set(n,o){return this.min.copy(n),this.max.copy(o),this}setFromArray(n){this.makeEmpty();for(let o=0,m=n.length;o<m;o+=3)this.expandByPoint(il.fromArray(n,o));return this}setFromBufferAttribute(n){this.makeEmpty();for(let o=0,m=n.count;o<m;o++)this.expandByPoint(il.fromBufferAttribute(n,o));return this}setFromPoints(n){this.makeEmpty();for(let o=0,m=n.length;o<m;o++)this.expandByPoint(n[o]);return this}setFromCenterAndSize(n,o){const m=il.copy(o).multiplyScalar(.5);return this.min.copy(n).sub(m),this.max.copy(n).add(m),this}setFromObject(n,o=!1){return this.makeEmpty(),this.expandByObject(n,o)}clone(){return(new this.constructor).copy(this)}copy(n){return this.min.copy(n.min),this.max.copy(n.max),this}makeEmpty(){return this.min.x=this.min.y=this.min.z=1/0,this.max.x=this.max.y=this.max.z=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z}getCenter(n){return this.isEmpty()?n.set(0,0,0):n.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(n){return this.isEmpty()?n.set(0,0,0):n.subVectors(this.max,this.min)}expandByPoint(n){return this.min.min(n),this.max.max(n),this}expandByVector(n){return this.min.sub(n),this.max.add(n),this}expandByScalar(n){return this.min.addScalar(-n),this.max.addScalar(n),this}expandByObject(n,o=!1){if(n.updateWorldMatrix(!1,!1),void 0!==n.boundingBox)null===n.boundingBox&&n.computeBoundingBox(),uu.copy(n.boundingBox),uu.applyMatrix4(n.matrixWorld),this.union(uu);else{const A=n.geometry;if(void 0!==A)if(o&&void 0!==A.attributes&&void 0!==A.attributes.position){const E=A.attributes.position;for(let w=0,T=E.count;w<T;w++)il.fromBufferAttribute(E,w).applyMatrix4(n.matrixWorld),this.expandByPoint(il)}else null===A.boundingBox&&A.computeBoundingBox(),uu.copy(A.boundingBox),uu.applyMatrix4(n.matrixWorld),this.union(uu)}const m=n.children;for(let A=0,E=m.length;A<E;A++)this.expandByObject(m[A],o);return this}containsPoint(n){return!(n.x<this.min.x||n.x>this.max.x||n.y<this.min.y||n.y>this.max.y||n.z<this.min.z||n.z>this.max.z)}containsBox(n){return this.min.x<=n.min.x&&n.max.x<=this.max.x&&this.min.y<=n.min.y&&n.max.y<=this.max.y&&this.min.z<=n.min.z&&n.max.z<=this.max.z}getParameter(n,o){return o.set((n.x-this.min.x)/(this.max.x-this.min.x),(n.y-this.min.y)/(this.max.y-this.min.y),(n.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(n){return!(n.max.x<this.min.x||n.min.x>this.max.x||n.max.y<this.min.y||n.min.y>this.max.y||n.max.z<this.min.z||n.min.z>this.max.z)}intersectsSphere(n){return this.clampPoint(n.center,il),il.distanceToSquared(n.center)<=n.radius*n.radius}intersectsPlane(n){let o,m;return n.normal.x>0?(o=n.normal.x*this.min.x,m=n.normal.x*this.max.x):(o=n.normal.x*this.max.x,m=n.normal.x*this.min.x),n.normal.y>0?(o+=n.normal.y*this.min.y,m+=n.normal.y*this.max.y):(o+=n.normal.y*this.max.y,m+=n.normal.y*this.min.y),n.normal.z>0?(o+=n.normal.z*this.min.z,m+=n.normal.z*this.max.z):(o+=n.normal.z*this.max.z,m+=n.normal.z*this.min.z),o<=-n.constant&&m>=-n.constant}intersectsTriangle(n){if(this.isEmpty())return!1;this.getCenter(lp),ig.subVectors(this.max,lp),Nl.subVectors(n.a,lp),fu.subVectors(n.b,lp),du.subVectors(n.c,lp),rl.subVectors(fu,Nl),is.subVectors(du,fu),pu.subVectors(Nl,du);let o=[0,-rl.z,rl.y,0,-is.z,is.y,0,-pu.z,pu.y,rl.z,0,-rl.x,is.z,0,-is.x,pu.z,0,-pu.x,-rl.y,rl.x,0,-is.y,is.x,0,-pu.y,pu.x,0];return!(!GA(o,Nl,fu,du,ig)||(o=[1,0,0,0,1,0,0,0,1],!GA(o,Nl,fu,du,ig)))&&(rg.crossVectors(rl,is),o=[rg.x,rg.y,rg.z],GA(o,Nl,fu,du,ig))}clampPoint(n,o){return o.copy(n).clamp(this.min,this.max)}distanceToPoint(n){return this.clampPoint(n,il).distanceTo(n)}getBoundingSphere(n){return this.isEmpty()?n.makeEmpty():(this.getCenter(n.center),n.radius=.5*this.getSize(il).length()),n}intersect(n){return this.min.max(n.min),this.max.min(n.max),this.isEmpty()&&this.makeEmpty(),this}union(n){return this.min.min(n.min),this.max.max(n.max),this}applyMatrix4(n){return this.isEmpty()||(ko[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(n),ko[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(n),ko[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(n),ko[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(n),ko[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(n),ko[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(n),ko[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(n),ko[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(n),this.setFromPoints(ko)),this}translate(n){return this.min.add(n),this.max.add(n),this}equals(n){return n.min.equals(this.min)&&n.max.equals(this.max)}}const ko=[new De,new De,new De,new De,new De,new De,new De,new De],il=new De,uu=new fo,Nl=new De,fu=new De,du=new De,rl=new De,is=new De,pu
vendor: 4,796 bytes, line 83
83=new De,lp=new De,ig=new De,rg=new De,mu=new De;function GA(b,n,o,m,A){for(let E=0,w=b.length-3;E<=w;E+=3){mu.fromArray(b,E);const T=A.x*Math.abs(mu.x)+A.y*Math.abs(mu.y)+A.z*Math.abs(mu.z),B=n.dot(mu),D=o.dot(mu),N=m.dot(mu);if(Math.max(-Math.max(B,D,N),Math.min(B,D,N))>T)return!1}return!0}const NS=new fo,cp=new De,VA=new De;class Ul{constructor(n=new De,o=-1){this.center=n,this.radius=o}set(n,o){return this.center.copy(n),this.radius=o,this}setFromPoints(n,o){const m=this.center;void 0!==o?m.copy(o):NS.setFromPoints(n).getCenter(m);let A=0;for(let E=0,w=n.length;E<w;E++)A=Math.max(A,m.distanceToSquared(n[E]));return this.radius=Math.sqrt(A),this}copy(n){return this.center.copy(n.center),this.radius=n.radius,this}isEmpty(){return this.radius<0}makeEmpty(){return this.center.set(0,0,0),this.radius=-1,this}containsPoint(n){return n.distanceToSquared(this.center)<=this.radius*this.radius}distanceToPoint(n){return n.distanceTo(this.center)-this.radius}intersectsSphere(n){const o=this.radius+n.radius;return n.center.distanceToSquared(this.center)<=o*o}intersectsBox(n){return n.intersectsSphere(this)}intersectsPlane(n){return Math.abs(n.distanceToPoint(this.center))<=this.radius}clampPoint(n,o){const m=this.center.distanceToSquared(n);return o.copy(n),m>this.radius*this.radius&&(o.sub(this.center).normalize(),o.multiplyScalar(this.radius).add(this.center)),o}getBoundingBox(n){return this.isEmpty()?(n.makeEmpty(),n):(n.set(this.center,this.center),n.expandByScalar(this.radius),n)}applyMatrix4(n){return this.center.applyMatrix4(n),this.radius=this.radius*n.getMaxScaleOnAxis(),this}translate(n){return this.center.add(n),this}expandByPoint(n){if(this.isEmpty())return this.center.copy(n),this.radius=0,this;cp.subVectors(n,this.center);const o=cp.lengthSq();if(o>this.radius*this.radius){const m=Math.sqrt(o),A=.5*(m-this.radius);this.center.addScaledVector(cp,A/m),this.radius+=A}return this}union(n){return n.isEmpty()?this:this.isEmpty()?(this.copy(n),this):(!0===this.center.equals(n.center)?this.radius=Math.max(this.radius,n.radius):(VA.subVectors(n.center,this.center).setLength(n.radius),this.expandByPoint(cp.copy(n.center).add(VA)),this.expandByPoint(cp.copy(n.center).sub(VA))),this)}equals(n){return n.center.equals(this.center)&&n.radius===this.radius}clone(){return(new this.constructor).copy(this)}}const Ac=new De,HA=new De,sg=new De,lh=new De,QA=new De,ag=new De,WA=new De;class hp{constructor(n=new De,o=new De(0,0,-1)){this.origin=n,this.direction=o}set(n,o){return this.origin.copy(n),this.direction.copy(o),this}copy(n){return this.origin.copy(n.origin),this.direction.copy(n.direction),this}at(n,o){return o.copy(this.origin).addScaledVector(this.direction,n)}lookAt(n){return this.direction.copy(n).sub(this.origin).normalize(),this}recast(n){return this.origin.copy(this.at(n,Ac)),this}closestPointToPoint(n,o){o.subVectors(n,this.origin);const m=o.dot(this.direction);return m<0?o.copy(this.origin):o.copy(this.origin).addScaledVector(this.direction,m)}distanceToPoint(n){return Math.sqrt(this.distanceSqToPoint(n))}distanceSqToPoint(n){const o=Ac.subVectors(n,this.origin).dot(this.direction);return o<0?this.origin.distanceToSquared(n):(Ac.copy(this.origin).addScaledVector(this.direction,o),Ac.distanceToSquared(n))}distanceSqToSegment(n,o,m,A){HA.copy(n).add(o).multiplyScalar(.5),sg.copy(o).sub(n).normalize(),lh.copy(this.origin).sub(HA);const E=.5*n.distanceTo(o),w=-this.direction.dot(sg),T=lh.dot(this.direction),B=-lh.dot(sg),D=lh.lengthSq(),N=Math.abs(1-w*w);let G,H,Q,Z;if(N>0)if(G=w*B-T,H=w*T-B,Z=E*N,G>=0)if(H>=-Z)if(H<=Z){const he=1/N;G*=he,H*=he,Q=G*(G+w*H+2*T)+H*(w*G+H+2*B)+D}else H=E,G=Math.max(0,-(w*H+T)),Q=-G*G+H*(H+2*B)+D;else H=-E,G=Math.max(0,-(w*H+T)),Q=-G*G+H*(H+2*B)+D;else H<=-Z?(G=Math.max(0,-(-w*E+T)),H=G>0?-E:Math.min(Math.max(-E,-B),E),Q=-G*G+H*(H+2*B)+D):H<=Z?(G=0,H=Math.min(Math.max(-E,-B),E),Q=H*(H+2*B)+D):(G=Math.max(0,-(w*E+T)),H=G>0?E:Math.min(Math.max(-E,-B),E),Q=-G*G+H*(H+2*B)+D);else H=w>0?-E:E,G=Math.max(0,-(w*H+T)),Q=-G*G+H*(H+2*B)+D;return m&&m.copy(this.origin).addScaledVector(this.direction,G),A&&A.copy(HA).addScaledVector(sg,H),Q}intersectSphere(n,o){Ac.subVectors(n.center,this.origin);const m=Ac.dot(this.direction),A=Ac.dot(Ac)-m*m,E=n.radius*n.radius;if(A>E)return null;const w=Math.sqrt(E-A),T=m-w,B=m+w;return B<0?null:this.at(T<0?B:T,o)}intersectsSphere(n){return this.distanceSqToPoint(n.center)<=n.radius*n.radius}distanceToPlane(n){const o=n.normal.dot(this.direction);if(0===o)return 0===n.distanceToPoint(this.origin)?0:null;const m=-(this.origin.dot(n.normal)+n.constant)/o;return m>=0?m:null}intersectPlane(n,o){const m=this.distanceToPlane(n);return null===m?null:this.at(m,o)}intersectsPlane(n){const o=n.distanceToPoint(this.origin);return 0===o||n.normal.dot(this.direction)*o<0}
vendor: 5,356 bytes, line 83
83intersectBox(n,o){let m,A,E,w,T,B;const D=1/this.direction.x,N=1/this.direction.y,G=1/this.direction.z,H=this.origin;return D>=0?(m=(n.min.x-H.x)*D,A=(n.max.x-H.x)*D):(m=(n.max.x-H.x)*D,A=(n.min.x-H.x)*D),N>=0?(E=(n.min.y-H.y)*N,w=(n.max.y-H.y)*N):(E=(n.max.y-H.y)*N,w=(n.min.y-H.y)*N),m>w||E>A||((E>m||isNaN(m))&&(m=E),(w<A||isNaN(A))&&(A=w),G>=0?(T=(n.min.z-H.z)*G,B=(n.max.z-H.z)*G):(T=(n.max.z-H.z)*G,B=(n.min.z-H.z)*G),m>B||T>A)||((T>m||m!=m)&&(m=T),(B<A||A!=A)&&(A=B),A<0)?null:this.at(m>=0?m:A,o)}intersectsBox(n){return null!==this.intersectBox(n,Ac)}intersectTriangle(n,o,m,A,E){QA.subVectors(o,n),ag.subVectors(m,n),WA.crossVectors(QA,ag);let T,w=this.direction.dot(WA);if(w>0){if(A)return null;T=1}else{if(!(w<0))return null;T=-1,w=-w}lh.subVectors(this.origin,n);const B=T*this.direction.dot(ag.crossVectors(lh,ag));if(B<0)return null;const D=T*this.direction.dot(QA.cross(lh));if(D<0||B+D>w)return null;const N=-T*lh.dot(WA);return N<0?null:this.at(N/w,E)}applyMatrix4(n){return this.origin.applyMatrix4(n),this.direction.transformDirection(n),this}equals(n){return n.origin.equals(this.origin)&&n.direction.equals(this.direction)}clone(){return(new this.constructor).copy(this)}}class Ti{constructor(){Ti.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}set(n,o,m,A,E,w,T,B,D,N,G,H,Q,Z,he,J){const Y=this.elements;return Y[0]=n,Y[4]=o,Y[8]=m,Y[12]=A,Y[1]=E,Y[5]=w,Y[9]=T,Y[13]=B,Y[2]=D,Y[6]=N,Y[10]=G,Y[14]=H,Y[3]=Q,Y[7]=Z,Y[11]=he,Y[15]=J,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 Ti).fromArray(this.elements)}copy(n){const o=this.elements,m=n.elements;return o[0]=m[0],o[1]=m[1],o[2]=m[2],o[3]=m[3],o[4]=m[4],o[5]=m[5],o[6]=m[6],o[7]=m[7],o[8]=m[8],o[9]=m[9],o[10]=m[10],o[11]=m[11],o[12]=m[12],o[13]=m[13],o[14]=m[14],o[15]=m[15],this}copyPosition(n){const o=this.elements,m=n.elements;return o[12]=m[12],o[13]=m[13],o[14]=m[14],this}setFromMatrix3(n){const o=n.elements;return this.set(o[0],o[3],o[6],0,o[1],o[4],o[7],0,o[2],o[5],o[8],0,0,0,0,1),this}extractBasis(n,o,m){return n.setFromMatrixColumn(this,0),o.setFromMatrixColumn(this,1),m.setFromMatrixColumn(this,2),this}makeBasis(n,o,m){return this.set(n.x,o.x,m.x,0,n.y,o.y,m.y,0,n.z,o.z,m.z,0,0,0,0,1),this}extractRotation(n){const o=this.elements,m=n.elements,A=1/Ya.setFromMatrixColumn(n,0).length(),E=1/Ya.setFromMatrixColumn(n,1).length(),w=1/Ya.setFromMatrixColumn(n,2).length();return o[0]=m[0]*A,o[1]=m[1]*A,o[2]=m[2]*A,o[3]=0,o[4]=m[4]*E,o[5]=m[5]*E,o[6]=m[6]*E,o[7]=0,o[8]=m[8]*w,o[9]=m[9]*w,o[10]=m[10]*w,o[11]=0,o[12]=0,o[13]=0,o[14]=0,o[15]=1,this}makeRotationFromEuler(n){const o=this.elements,m=n.x,A=n.y,E=n.z,w=Math.cos(m),T=Math.sin(m),B=Math.cos(A),D=Math.sin(A),N=Math.cos(E),G=Math.sin(E);if("XYZ"===n.order){const H=w*N,Q=w*G,Z=T*N,he=T*G;o[0]=B*N,o[4]=-B*G,o[8]=D,o[1]=Q+Z*D,o[5]=H-he*D,o[9]=-T*B,o[2]=he-H*D,o[6]=Z+Q*D,o[10]=w*B}else if("YXZ"===n.order){const H=B*N,Q=B*G,Z=D*N,he=D*G;o[0]=H+he*T,o[4]=Z*T-Q,o[8]=w*D,o[1]=w*G,o[5]=w*N,o[9]=-T,o[2]=Q*T-Z,o[6]=he+H*T,o[10]=w*B}else if("ZXY"===n.order){const H=B*N,Q=B*G,Z=D*N,he=D*G;o[0]=H-he*T,o[4]=-w*G,o[8]=Z+Q*T,o[1]=Q+Z*T,o[5]=w*N,o[9]=he-H*T,o[2]=-w*D,o[6]=T,o[10]=w*B}else if("ZYX"===n.order){const H=w*N,Q=w*G,Z=T*N,he=T*G;o[0]=B*N,o[4]=Z*D-Q,o[8]=H*D+he,o[1]=B*G,o[5]=he*D+H,o[9]=Q*D-Z,o[2]=-D,o[6]=T*B,o[10]=w*B}else if("YZX"===n.order){const H=w*B,Q=w*D,Z=T*B,he=T*D;o[0]=B*N,o[4]=he-H*G,o[8]=Z*G+Q,o[1]=G,o[5]=w*N,o[9]=-T*N,o[2]=-D*N,o[6]=Q*G+Z,o[10]=H-he*G}else if("XZY"===n.order){const H=w*B,Q=w*D,Z=T*B,he=T*D;o[0]=B*N,o[4]=-G,o[8]=D*N,o[1]=H*G+he,o[5]=w*N,o[9]=Q*G-Z,o[2]=Z*G-Q,o[6]=T*N,o[10]=he*G+H}return o[3]=0,o[7]=0,o[11]=0,o[12]=0,o[13]=0,o[14]=0,o[15]=1,this}makeRotationFromQuaternion(n){return this.compose(og,n,ch)}lookAt(n,o,m){const A=this.elements;return ya.subVectors(n,o),0===ya.lengthSq()&&(ya.z=1),ya.normalize(),_c.crossVectors(m,ya),0===_c.lengthSq()&&(1===Math.abs(m.z)?ya.x+=1e-4:ya.z+=1e-4,ya.normalize(),_c.crossVectors(m,ya)),_c.normalize(),Rf.crossVectors(ya,_c),A[0]=_c.x,A[4]=Rf.x,A[8]=ya.x,A[1]=_c.y,A[5]=Rf.y,A[9]=ya.y,A[2]=_c.z,A[6]=Rf.z,A[10]=ya.z,this}multiply(n){return this.multiplyMatrices(this,n)}premultiply(n){return this.multiplyMatrices(n,this)}multiplyMatrices(n,o){const m=n.elements,A=o.elements,E=this.elements,w=m[0],T=m[4],B=m[8],D=m[12],N=m[1],G=m[5],H=m[9],Q=m[13],Z=m[2],he=m[6],J=m[10],Y=m[14],ve=m[3],pe=m[7],Ae=m[11],Ie=m[15],Ne=A[0],Xe=A[4],Qe=A[8],Se=A[12],Le=A[1],vt=A[5],Pt=A[9],ot=A[13],dt=A[2],Et=A[6],tn=A[10],cn=A[14],Ht=A[3],nn=A[7],dn=A[11],Yn=A[15];return E[0]=w*Ne+T*Le+B*dt+D*Ht,E[4]=w*Xe+T*vt+B*Et+D*nn,E[8]=w*Qe+T*Pt+B*tn+D*dn,E[12]=w*Se+T*ot+B*cn+D*Yn,E[1]=N*Ne+G*Le+H*dt+Q*Ht,E[5]=N*Xe+G*vt+H*Et+Q*nn,E[9]=N*Qe+G*Pt+H*tn+Q*dn,E[13]=N*Se+G*ot+H*cn+Q*Yn,E[2]=Z*Ne+he*Le+J*dt+Y*Ht,E[6]=Z*Xe+he*vt+J*Et+Y*nn,E[10]=Z*Qe+he*Pt+J*tn+Y*dn,E[14]=Z*Se+he*ot+J*cn+Y*Yn,E[3]=ve*Ne+pe*Le+Ae*dt+Ie*Ht,E[7]=ve*Xe+pe*vt+Ae*Et+Ie*nn,E[11]=ve*Qe+pe*Pt+Ae*tn+Ie*dn,E[15]=ve*Se+pe*ot+Ae*cn+Ie*Yn,this}multiplyScalar(n){const o=this.elements;return o[0]*=n,o[4]*=n,o[8]*=n,o[12]*=n,o[1]*=n,o[5]*=n,o[9]*=n,o[13]*=n,o[2]*=n,o[6]*=n,o[10]*=n,o[14]*=n,o[3]*=n,o[7]*=n,o[11]*=n,o[15]*=n,this}determinant(){const n=this.elements,o=n[0],m=n[4],A=n[8],E=n[12],w=n[1],T=n[5],B=n[9],D=n[13],N=n[2],G=n[6],H=n[10],Q=n[14];return n[3]*(+E*B*G-A*D*G-E*T*H+m*D*H+A*T*Q-m*B*Q)+n[7]*(+o*B*Q-o
vendor: 4,329 bytes, line 83
83*D*H+E*w*H-A*w*Q+A*D*N-E*B*N)+n[11]*(+o*D*G-o*T*Q-E*w*G+m*w*Q+E*T*N-m*D*N)+n[15]*(-A*T*N-o*B*G+o*T*H+A*w*G-m*w*H+m*B*N)}transpose(){const n=this.elements;let o;return o=n[1],n[1]=n[4],n[4]=o,o=n[2],n[2]=n[8],n[8]=o,o=n[6],n[6]=n[9],n[9]=o,o=n[3],n[3]=n[12],n[12]=o,o=n[7],n[7]=n[13],n[13]=o,o=n[11],n[11]=n[14],n[14]=o,this}setPosition(n,o,m){const A=this.elements;return n.isVector3?(A[12]=n.x,A[13]=n.y,A[14]=n.z):(A[12]=n,A[13]=o,A[14]=m),this}invert(){const n=this.elements,o=n[0],m=n[1],A=n[2],E=n[3],w=n[4],T=n[5],B=n[6],D=n[7],N=n[8],G=n[9],H=n[10],Q=n[11],Z=n[12],he=n[13],J=n[14],Y=n[15],ve=G*J*D-he*H*D+he*B*Q-T*J*Q-G*B*Y+T*H*Y,pe=Z*H*D-N*J*D-Z*B*Q+w*J*Q+N*B*Y-w*H*Y,Ae=N*he*D-Z*G*D+Z*T*Q-w*he*Q-N*T*Y+w*G*Y,Ie=Z*G*B-N*he*B-Z*T*H+w*he*H+N*T*J-w*G*J,Ne=o*ve+m*pe+A*Ae+E*Ie;if(0===Ne)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const Xe=1/Ne;return n[0]=ve*Xe,n[1]=(he*H*E-G*J*E-he*A*Q+m*J*Q+G*A*Y-m*H*Y)*Xe,n[2]=(T*J*E-he*B*E+he*A*D-m*J*D-T*A*Y+m*B*Y)*Xe,n[3]=(G*B*E-T*H*E-G*A*D+m*H*D+T*A*Q-m*B*Q)*Xe,n[4]=pe*Xe,n[5]=(N*J*E-Z*H*E+Z*A*Q-o*J*Q-N*A*Y+o*H*Y)*Xe,n[6]=(Z*B*E-w*J*E-Z*A*D+o*J*D+w*A*Y-o*B*Y)*Xe,n[7]=(w*H*E-N*B*E+N*A*D-o*H*D-w*A*Q+o*B*Q)*Xe,n[8]=Ae*Xe,n[9]=(Z*G*E-N*he*E-Z*m*Q+o*he*Q+N*m*Y-o*G*Y)*Xe,n[10]=(w*he*E-Z*T*E+Z*m*D-o*he*D-w*m*Y+o*T*Y)*Xe,n[11]=(N*T*E-w*G*E-N*m*D+o*G*D+w*m*Q-o*T*Q)*Xe,n[12]=Ie*Xe,n[13]=(N*he*A-Z*G*A+Z*m*H-o*he*H-N*m*J+o*G*J)*Xe,n[14]=(Z*T*A-w*he*A-Z*m*B+o*he*B+w*m*J-o*T*J)*Xe,n[15]=(w*G*A-N*T*A+N*m*B-o*G*B-w*m*H+o*T*H)*Xe,this}scale(n){const o=this.elements,m=n.x,A=n.y,E=n.z;return o[0]*=m,o[4]*=A,o[8]*=E,o[1]*=m,o[5]*=A,o[9]*=E,o[2]*=m,o[6]*=A,o[10]*=E,o[3]*=m,o[7]*=A,o[11]*=E,this}getMaxScaleOnAxis(){const n=this.elements;return Math.sqrt(Math.max(n[0]*n[0]+n[1]*n[1]+n[2]*n[2],n[4]*n[4]+n[5]*n[5]+n[6]*n[6],n[8]*n[8]+n[9]*n[9]+n[10]*n[10]))}makeTranslation(n,o,m){return this.set(1,0,0,n,0,1,0,o,0,0,1,m,0,0,0,1),this}makeRotationX(n){const o=Math.cos(n),m=Math.sin(n);return this.set(1,0,0,0,0,o,-m,0,0,m,o,0,0,0,0,1),this}makeRotationY(n){const o=Math.cos(n),m=Math.sin(n);return this.set(o,0,m,0,0,1,0,0,-m,0,o,0,0,0,0,1),this}makeRotationZ(n){const o=Math.cos(n),m=Math.sin(n);return this.set(o,-m,0,0,m,o,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(n,o){const m=Math.cos(o),A=Math.sin(o),E=1-m,w=n.x,T=n.y,B=n.z,D=E*w,N=E*T;return this.set(D*w+m,D*T-A*B,D*B+A*T,0,D*T+A*B,N*T+m,N*B-A*w,0,D*B-A*T,N*B+A*w,E*B*B+m,0,0,0,0,1),this}makeScale(n,o,m){return this.set(n,0,0,0,0,o,0,0,0,0,m,0,0,0,0,1),this}makeShear(n,o,m,A,E,w){return this.set(1,m,E,0,n,1,w,0,o,A,1,0,0,0,0,1),this}compose(n,o,m){const A=this.elements,E=o._x,w=o._y,T=o._z,B=o._w,D=E+E,N=w+w,G=T+T,H=E*D,Q=E*N,Z=E*G,he=w*N,J=w*G,Y=T*G,ve=B*D,pe=B*N,Ae=B*G,Ie=m.x,Ne=m.y,Xe=m.z;return A[0]=(1-(he+Y))*Ie,A[1]=(Q+Ae)*Ie,A[2]=(Z-pe)*Ie,A[3]=0,A[4]=(Q-Ae)*Ne,A[5]=(1-(H+Y))*Ne,A[6]=(J+ve)*Ne,A[7]=0,A[8]=(Z+pe)*Xe,A[9]=(J-ve)*Xe,A[10]=(1-(H+he))*Xe,A[11]=0,A[12]=n.x,A[13]=n.y,A[14]=n.z,A[15]=1,this}decompose(n,o,m){const A=this.elements;let E=Ya.set(A[0],A[1],A[2]).length();const w=Ya.set(A[4],A[5],A[6]).length(),T=Ya.set(A[8],A[9],A[10]).length();this.determinant()<0&&(E=-E),n.x=A[12],n.y=A[13],n.z=A[14],na.copy(this);const D=1/E,N=1/w,G=1/T;return na.elements[0]*=D,na.elements[1]*=D,na.elements[2]*=D,na.elements[4]*=N,na.elements[5]*=N,na.elements[6]*=N,na.elements[8]*=G,na.elements[9]*=G,na.elements[10]*=G,o.setFromRotationMatrix(na),m.x=E,m.y=w,m.z=T,this}makePerspective(n,o,m,A,E,w){const T=this.elements,D=2*E/(m-A),N=(o+n)/(o-n),G=(m+A)/(m-A),H=-(w+E)/(w-E),Q=-2*w*E/(w-E);return T[0]=2*E/(o-n),T[4]=0,T[8]=N,T[12]=0,T[1]=0,T[5]=D,T[9]=G,T[13]=0,T[2]=0,T[6]=0,T[10]=H,T[14]=Q,T[3]=0,T[7]=0,T[11]=-1,T[15]=0,this}makeOrthographic(n,o,m,A,E,w){const T=this.elements,B=1/(o-n),D=1/(m-A),N=1/(w-E),G=(o+n)*B,H=(m+A)*D,Q=(w+E)*N;return T[0]=2*B,T[4]=0,T[8]=0,T[12]=-G,T[1]=0,T[5]=2*D,T[9]=0,T[13]=-H,T[2]=0,T[6]=0,T[10]=-2*N,T[14]=-Q,T[3]=0,T[7]=0,T[11]=0,T[15]=1,this}equals(n){const o=this.elements,m=n.elements;for(let A=0;A<16;A++)if(o[A]!==m[A])return!1;return!0}fromArray(n,o=0){for(let m=0;m<16;m++)this.elements[m]=n[m+o];return this}toArray(n=[],o=0){const m=this.elements;return n[o]=m[0],n[o+1]=m[1],n[o+2]=m[2],n[o+3]=m[3],n[o+4]=m[4],n[o+5]=m[5],n[o+6]=m[6],n[o+7]=m[7],n[o+8]=m[8],n[o+9]=m[9],n[o+10]=m[10],n[o+11]=m[11],n[o+12]=m[12],n[o+13]=m[13],n[o+14]=m[14],n[o+15]=m[15],n}}
vendor: 4,572 bytes, line 83
83const Ya=new De,na=new Ti,og=new De(0,0,0),ch=new De(1,1,1),_c=new De,Rf=new De,ya=new De,XA=new Ti,sl=new Xs;let vc=(()=>{class b{constructor(o=0,m=0,A=0,E=b.DEFAULT_ORDER){this.isEuler=!0,this._x=o,this._y=m,this._z=A,this._order=E}get x(){return this._x}set x(o){this._x=o,this._onChangeCallback()}get y(){return this._y}set y(o){this._y=o,this._onChangeCallback()}get z(){return this._z}set z(o){this._z=o,this._onChangeCallback()}get order(){return this._order}set order(o){this._order=o,this._onChangeCallback()}set(o,m,A,E=this._order){return this._x=o,this._y=m,this._z=A,this._order=E,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(o){return this._x=o._x,this._y=o._y,this._z=o._z,this._order=o._order,this._onChangeCallback(),this}setFromRotationMatrix(o,m=this._order,A=!0){const E=o.elements,w=E[0],T=E[4],B=E[8],D=E[1],N=E[5],G=E[9],H=E[2],Q=E[6],Z=E[10];switch(m){case"XYZ":this._y=Math.asin(gr(B,-1,1)),Math.abs(B)<.9999999?(this._x=Math.atan2(-G,Z),this._z=Math.atan2(-T,w)):(this._x=Math.atan2(Q,N),this._z=0);break;case"YXZ":this._x=Math.asin(-gr(G,-1,1)),Math.abs(G)<.9999999?(this._y=Math.atan2(B,Z),this._z=Math.atan2(D,N)):(this._y=Math.atan2(-H,w),this._z=0);break;case"ZXY":this._x=Math.asin(gr(Q,-1,1)),Math.abs(Q)<.9999999?(this._y=Math.atan2(-H,Z),this._z=Math.atan2(-T,N)):(this._y=0,this._z=Math.atan2(D,w));break;case"ZYX":this._y=Math.asin(-gr(H,-1,1)),Math.abs(H)<.9999999?(this._x=Math.atan2(Q,Z),this._z=Math.atan2(D,w)):(this._x=0,this._z=Math.atan2(-T,N));break;case"YZX":this._z=Math.asin(gr(D,-1,1)),Math.abs(D)<.9999999?(this._x=Math.atan2(-G,N),this._y=Math.atan2(-H,w)):(this._x=0,this._y=Math.atan2(B,Z));break;case"XZY":this._z=Math.asin(-gr(T,-1,1)),Math.abs(T)<.9999999?(this._x=Math.atan2(Q,N),this._y=Math.atan2(B,w)):(this._x=Math.atan2(-G,Z),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+m)}return this._order=m,!0===A&&this._onChangeCallback(),this}setFromQuaternion(o,m,A){return XA.makeRotationFromQuaternion(o),this.setFromRotationMatrix(XA,m,A)}setFromVector3(o,m=this._order){return this.set(o.x,o.y,o.z,m)}reorder(o){return sl.setFromEuler(this),this.setFromQuaternion(sl,o)}equals(o){return o._x===this._x&&o._y===this._y&&o._z===this._z&&o._order===this._order}fromArray(o){return this._x=o[0],this._y=o[1],this._z=o[2],void 0!==o[3]&&(this._order=o[3]),this._onChangeCallback(),this}toArray(o=[],m=0){return o[m]=this._x,o[m+1]=this._y,o[m+2]=this._z,o[m+3]=this._order,o}_onChange(o){return this._onChangeCallback=o,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}return b.DEFAULT_ORDER="XYZ",b})();class zl{constructor(){this.mask=1}set(n){this.mask=1<<n>>>0}enable(n){this.mask|=1<<n}enableAll(){this.mask=-1}toggle(n){this.mask^=1<<n}disable(n){this.mask&=~(1<<n)}disableAll(){this.mask=0}test(n){return!!(this.mask&n.mask)}isEnabled(n){return!!(this.mask&1<<n)}}let gu=0;const lg=new De,yc=new Xs,Gl=new Ti,up=new De,Da=new De,cg=new De,Gx=new Xs,qA=new De(1,0,0),YA=new De(0,1,0),hg=new De(0,0,1),$A={type:"added"},KA={type:"removed"};let Fr=(()=>{class b extends Ki{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:gu++}),this.uuid=Ra(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=b.DEFAULT_UP.clone();const o=new De,m=new vc,A=new Xs,E=new De(1,1,1);m._onChange(function w(){A.setFromEuler(m,!1)}),A._onChange(function T(){m.setFromQuaternion(A,void 0,!1)}),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:o},rotation:{configurable:!0,enumerable:!0,value:m},quaternion:{configurable:!0,enumerable:!0,value:A},scale:{configurable:!0,enumerable:!0,value:E},modelViewMatrix:{value:new Ti},normalMatrix:{value:new Di}}),this.matrix=new Ti,this.matrixWorld=new Ti,this.matrixAutoUpdate=b.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.matrixWorldAutoUpdate=b.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.layers=new zl,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.animations=[],this.userData={}}onBeforeRender(){}onAfterRender(){}applyMatrix4(o){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(o),this.matrix.decompose(this.position,this.quaternion,this.scale)}applyQuaternion(o){return this.quaternion.premultiply(o),this}setRotationFromAxisAngle(o,m){this.quaternion.setFromAxisAngle(o,m)}setRotationFromEuler(o){this.quaternion.setFromEuler(o,!0)}
vendor: 10,151 bytes, line 83
83setRotationFromMatrix(o){this.quaternion.setFromRotationMatrix(o)}setRotationFromQuaternion(o){this.quaternion.copy(o)}rotateOnAxis(o,m){return yc.setFromAxisAngle(o,m),this.quaternion.multiply(yc),this}rotateOnWorldAxis(o,m){return yc.setFromAxisAngle(o,m),this.quaternion.premultiply(yc),this}rotateX(o){return this.rotateOnAxis(qA,o)}rotateY(o){return this.rotateOnAxis(YA,o)}rotateZ(o){return this.rotateOnAxis(hg,o)}translateOnAxis(o,m){return lg.copy(o).applyQuaternion(this.quaternion),this.position.add(lg.multiplyScalar(m)),this}translateX(o){return this.translateOnAxis(qA,o)}translateY(o){return this.translateOnAxis(YA,o)}translateZ(o){return this.translateOnAxis(hg,o)}localToWorld(o){return this.updateWorldMatrix(!0,!1),o.applyMatrix4(this.matrixWorld)}worldToLocal(o){return this.updateWorldMatrix(!0,!1),o.applyMatrix4(Gl.copy(this.matrixWorld).invert())}lookAt(o,m,A){o.isVector3?up.copy(o):up.set(o,m,A);const E=this.parent;this.updateWorldMatrix(!0,!1),Da.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?Gl.lookAt(Da,up,this.up):Gl.lookAt(up,Da,this.up),this.quaternion.setFromRotationMatrix(Gl),E&&(Gl.extractRotation(E.matrixWorld),yc.setFromRotationMatrix(Gl),this.quaternion.premultiply(yc.invert()))}add(o){if(arguments.length>1){for(let m=0;m<arguments.length;m++)this.add(arguments[m]);return this}return o===this?(console.error("THREE.Object3D.add: object can't be added as a child of itself.",o),this):(o&&o.isObject3D?(null!==o.parent&&o.parent.remove(o),o.parent=this,this.children.push(o),o.dispatchEvent($A)):console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.",o),this)}remove(o){if(arguments.length>1){for(let A=0;A<arguments.length;A++)this.remove(arguments[A]);return this}const m=this.children.indexOf(o);return-1!==m&&(o.parent=null,this.children.splice(m,1),o.dispatchEvent(KA)),this}removeFromParent(){const o=this.parent;return null!==o&&o.remove(this),this}clear(){for(let o=0;o<this.children.length;o++){const m=this.children[o];m.parent=null,m.dispatchEvent(KA)}return this.children.length=0,this}attach(o){return this.updateWorldMatrix(!0,!1),Gl.copy(this.matrixWorld).invert(),null!==o.parent&&(o.parent.updateWorldMatrix(!0,!1),Gl.multiply(o.parent.matrixWorld)),o.applyMatrix4(Gl),this.add(o),o.updateWorldMatrix(!1,!0),this}getObjectById(o){return this.getObjectByProperty("id",o)}getObjectByName(o){return this.getObjectByProperty("name",o)}getObjectByProperty(o,m){if(this[o]===m)return this;for(let A=0,E=this.children.length;A<E;A++){const T=this.children[A].getObjectByProperty(o,m);if(void 0!==T)return T}}getObjectsByProperty(o,m){let A=[];this[o]===m&&A.push(this);for(let E=0,w=this.children.length;E<w;E++){const T=this.children[E].getObjectsByProperty(o,m);T.length>0&&(A=A.concat(T))}return A}getWorldPosition(o){return this.updateWorldMatrix(!0,!1),o.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(o){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Da,o,cg),o}getWorldScale(o){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Da,Gx,o),o}getWorldDirection(o){this.updateWorldMatrix(!0,!1);const m=this.matrixWorld.elements;return o.set(m[8],m[9],m[10]).normalize()}raycast(){}traverse(o){o(this);const m=this.children;for(let A=0,E=m.length;A<E;A++)m[A].traverse(o)}traverseVisible(o){if(!1===this.visible)return;o(this);const m=this.children;for(let A=0,E=m.length;A<E;A++)m[A].traverseVisible(o)}traverseAncestors(o){const m=this.parent;null!==m&&(o(m),m.traverseAncestors(o))}updateMatrix(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0}updateMatrixWorld(o){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||o)&&(null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),this.matrixWorldNeedsUpdate=!1,o=!0);const m=this.children;for(let A=0,E=m.length;A<E;A++){const w=m[A];(!0===w.matrixWorldAutoUpdate||!0===o)&&w.updateMatrixWorld(o)}}updateWorldMatrix(o,m){const A=this.parent;if(!0===o&&null!==A&&!0===A.matrixWorldAutoUpdate&&A.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),!0===m){const E=this.children;for(let w=0,T=E.length;w<T;w++){const B=E[w];!0===B.matrixWorldAutoUpdate&&B.updateWorldMatrix(!1,!0)}}}toJSON(o){const m=void 0===o||"string"==typeof o,A={};m&&(o={geometries:{},materials:{},textures:{},images:{},shapes:{},skeletons:{},animations:{},nodes:{}},A.metadata={version:4.5,type:"Object",generator:"Object3D.toJSON"});const E={};function w(B,D){return void 0===B[D.uuid]&&(B[D.uuid]=D.toJSON(o)),D.uuid}if(E.uuid=this.uuid,E.type=this.type,""!==this.name&&(E.name=this.name),!0===this.castShadow&&(E.castShadow=!0),!0===this.receiveShadow&&(E.receiveShadow=!0),!1===this.visible&&(E.visible=!1),!1===this.frustumCulled&&(E.frustumCulled=!1),0!==this.renderOrder&&(E.renderOrder=this.renderOrder),Object.keys(this.userData).length>0&&(E.userData=this.userData),E.layers=this.layers.mask,E.matrix=this.matrix.toArray(),E.up=this.up.toArray(),!1===this.matrixAutoUpdate&&(E.matrixAutoUpdate=!1),this.isInstancedMesh&&(E.type="InstancedMesh",E.count=this.count,E.instanceMatrix=this.instanceMatrix.toJSON(),null!==this.instanceColor&&(E.instanceColor=this.instanceColor.toJSON())),this.isScene)this.background&&(this.background.isColor?E.background=this.background.toJSON():this.background.isTexture&&(E.background=this.background.toJSON(o).uuid)),this.environment&&this.environment.isTexture&&!0!==this.environment.isRenderTargetTexture&&(E.environment=this.environment.toJSON(o).uuid);else if(this.isMesh||this.isLine||this.isPoints){E.geometry=w(o.geometries,this.geometry);const B=this.geometry.parameters;if(void 0!==B&&void 0!==B.shapes){const D=B.shapes;if(Array.isArray(D))for(let N=0,G=D.length;N<G;N++)w(o.shapes,D[N]);else w(o.shapes,D)}}if(this.isSkinnedMesh&&(E.bindMode=this.bindMode,E.bindMatrix=this.bindMatrix.toArray(),void 0!==this.skeleton&&(w(o.skeletons,this.skeleton),E.skeleton=this.skeleton.uuid)),void 0!==this.material)if(Array.isArray(this.material)){const B=[];for(let D=0,N=this.material.length;D<N;D++)B.push(w(o.materials,this.material[D]));E.material=B}else E.material=w(o.materials,this.material);if(this.children.length>0){E.children=[];for(let B=0;B<this.children.length;B++)E.children.push(this.children[B].toJSON(o).object)}if(this.animations.length>0){E.animations=[];for(let B=0;B<this.animations.length;B++)E.animations.push(w(o.animations,this.animations[B]))}if(m){const B=T(o.geometries),D=T(o.materials),N=T(o.textures),G=T(o.images),H=T(o.shapes),Q=T(o.skeletons),Z=T(o.animations),he=T(o.nodes);B.length>0&&(A.geometries=B),D.length>0&&(A.materials=D),N.length>0&&(A.textures=N),G.length>0&&(A.images=G),H.length>0&&(A.shapes=H),Q.length>0&&(A.skeletons=Q),Z.length>0&&(A.animations=Z),he.length>0&&(A.nodes=he)}return A.object=E,A;function T(B){const D=[];for(const N in B){const G=B[N];delete G.metadata,D.push(G)}return D}}clone(o){return(new this.constructor).copy(this,o)}copy(o,m=!0){if(this.name=o.name,this.up.copy(o.up),this.position.copy(o.position),this.rotation.order=o.rotation.order,this.quaternion.copy(o.quaternion),this.scale.copy(o.scale),this.matrix.copy(o.matrix),this.matrixWorld.copy(o.matrixWorld),this.matrixAutoUpdate=o.matrixAutoUpdate,this.matrixWorldNeedsUpdate=o.matrixWorldNeedsUpdate,this.matrixWorldAutoUpdate=o.matrixWorldAutoUpdate,this.layers.mask=o.layers.mask,this.visible=o.visible,this.castShadow=o.castShadow,this.receiveShadow=o.receiveShadow,this.frustumCulled=o.frustumCulled,this.renderOrder=o.renderOrder,this.userData=JSON.parse(JSON.stringify(o.userData)),!0===m)for(let A=0;A<o.children.length;A++)this.add(o.children[A].clone());return this}}return b.DEFAULT_UP=new De(0,1,0),b.DEFAULT_MATRIX_AUTO_UPDATE=!0,b.DEFAULT_MATRIX_WORLD_AUTO_UPDATE=!0,b})();const Oo=new De,Vl=new De,ug=new De,Hl=new De,Er=new De,ia=new De,ZA=new De,fp=new De,fg=new De,dp=new De;let Bf=!1;class ra{constructor(n=new De,o=new De,m=new De){this.a=n,this.b=o,this.c=m}static getNormal(n,o,m,A){A.subVectors(m,o),Oo.subVectors(n,o),A.cross(Oo);const E=A.lengthSq();return E>0?A.multiplyScalar(1/Math.sqrt(E)):A.set(0,0,0)}static getBarycoord(n,o,m,A,E){Oo.subVectors(A,o),Vl.subVectors(m,o),ug.subVectors(n,o);const w=Oo.dot(Oo),T=Oo.dot(Vl),B=Oo.dot(ug),D=Vl.dot(Vl),N=Vl.dot(ug),G=w*D-T*T;if(0===G)return E.set(-2,-1,-1);const H=1/G,Q=(D*B-T*N)*H,Z=(w*N-T*B)*H;return E.set(1-Q-Z,Z,Q)}static containsPoint(n,o,m,A){return this.getBarycoord(n,o,m,A,Hl),Hl.x>=0&&Hl.y>=0&&Hl.x+Hl.y<=1}static getUV(n,o,m,A,E,w,T,B){return!1===Bf&&(console.warn("THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."),Bf=!0),this.getInterpolation(n,o,m,A,E,w,T,B)}static getInterpolation(n,o,m,A,E,w,T,B){return this.getBarycoord(n,o,m,A,Hl),B.setScalar(0),B.addScaledVector(E,Hl.x),B.addScaledVector(w,Hl.y),B.addScaledVector(T,Hl.z),B}static isFrontFacing(n,o,m,A){return Oo.subVectors(m,o),Vl.subVectors(n,o),Oo.cross(Vl).dot(A)<0}set(n,o,m){return this.a.copy(n),this.b.copy(o),this.c.copy(m),this}setFromPointsAndIndices(n,o,m,A){return this.a.copy(n[o]),this.b.copy(n[m]),this.c.copy(n[A]),this}setFromAttributeAndIndices(n,o,m,A){return this.a.fromBufferAttribute(n,o),this.b.fromBufferAttribute(n,m),this.c.fromBufferAttribute(n,A),this}clone(){return(new this.constructor).copy(this)}copy(n){return this.a.copy(n.a),this.b.copy(n.b),this.c.copy(n.c),this}getArea(){return Oo.subVectors(this.c,this.b),Vl.subVectors(this.a,this.b),.5*Oo.cross(Vl).length()}getMidpoint(n){return n.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(n){return ra.getNormal(this.a,this.b,this.c,n)}getPlane(n){return n.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(n,o){return ra.getBarycoord(n,this.a,this.b,this.c,o)}getUV(n,o,m,A,E){return!1===Bf&&(console.warn("THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."),Bf=!0),ra.getInterpolation(n,this.a,this.b,this.c,o,m,A,
vendor: 2,892 bytes, line 83
83E)}getInterpolation(n,o,m,A,E){return ra.getInterpolation(n,this.a,this.b,this.c,o,m,A,E)}containsPoint(n){return ra.containsPoint(n,this.a,this.b,this.c)}isFrontFacing(n){return ra.isFrontFacing(this.a,this.b,this.c,n)}intersectsBox(n){return n.intersectsTriangle(this)}closestPointToPoint(n,o){const m=this.a,A=this.b,E=this.c;let w,T;Er.subVectors(A,m),ia.subVectors(E,m),fp.subVectors(n,m);const B=Er.dot(fp),D=ia.dot(fp);if(B<=0&&D<=0)return o.copy(m);fg.subVectors(n,A);const N=Er.dot(fg),G=ia.dot(fg);if(N>=0&&G<=N)return o.copy(A);const H=B*G-N*D;if(H<=0&&B>=0&&N<=0)return w=B/(B-N),o.copy(m).addScaledVector(Er,w);dp.subVectors(n,E);const Q=Er.dot(dp),Z=ia.dot(dp);if(Z>=0&&Q<=Z)return o.copy(E);const he=Q*D-B*Z;if(he<=0&&D>=0&&Z<=0)return T=D/(D-Z),o.copy(m).addScaledVector(ia,T);const J=N*Z-Q*G;if(J<=0&&G-N>=0&&Q-Z>=0)return ZA.subVectors(E,A),T=(G-N)/(G-N+(Q-Z)),o.copy(A).addScaledVector(ZA,T);const Y=1/(J+he+H);return w=he*Y,T=H*Y,o.copy(m).addScaledVector(Er,w).addScaledVector(ia,T)}equals(n){return n.a.equals(this.a)&&n.b.equals(this.b)&&n.c.equals(this.c)}}let al=0;class qs extends Ki{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:al++}),this.uuid=Ra(),this.name="",this.type="Material",this.blending=1,this.side=0,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.blendSrc=204,this.blendDst=205,this.blendEquation=100,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.depthFunc=3,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=519,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=7680,this.stencilZFail=7680,this.stencilZPass=7680,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.forceSinglePass=!1,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0,this._alphaTest=0}get alphaTest(){return this._alphaTest}set alphaTest(n){this._alphaTest>0!=n>0&&this.version++,this._alphaTest=n}onBuild(){}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(n){if(void 0!==n)for(const o in n){const m=n[o];if(void 0===m){console.warn(`THREE.Material: parameter '${o}' has value of undefined.`);continue}const A=this[o];void 0!==A?A&&A.isColor?A.set(m):A&&A.isVector3&&m&&m.isVector3?A.copy(m):this[o]=m:console.warn(`THREE.Material: '${o}' is not a property of THREE.${this.type}.`)}}toJSON(n){const o=void 0===n||"string"==typeof n;o&&(n={textures:{},images:{}});const m={metadata:{version:4.5,type:"Material",generator:"Material.toJSON"}};function A(E){const w=[];for(const T in E){const B=E[T];delete B.metadata,w.push(B)}return w}
vendor: 11,591 bytes, line 83
83if(m.uuid=this.uuid,m.type=this.type,""!==this.name&&(m.name=this.name),this.color&&this.color.isColor&&(m.color=this.color.getHex()),void 0!==this.roughness&&(m.roughness=this.roughness),void 0!==this.metalness&&(m.metalness=this.metalness),void 0!==this.sheen&&(m.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(m.sheenColor=this.sheenColor.getHex()),void 0!==this.sheenRoughness&&(m.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(m.emissive=this.emissive.getHex()),this.emissiveIntensity&&1!==this.emissiveIntensity&&(m.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(m.specular=this.specular.getHex()),void 0!==this.specularIntensity&&(m.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(m.specularColor=this.specularColor.getHex()),void 0!==this.shininess&&(m.shininess=this.shininess),void 0!==this.clearcoat&&(m.clearcoat=this.clearcoat),void 0!==this.clearcoatRoughness&&(m.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(m.clearcoatMap=this.clearcoatMap.toJSON(n).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(m.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(n).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(m.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(n).uuid,m.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),void 0!==this.iridescence&&(m.iridescence=this.iridescence),void 0!==this.iridescenceIOR&&(m.iridescenceIOR=this.iridescenceIOR),void 0!==this.iridescenceThicknessRange&&(m.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(m.iridescenceMap=this.iridescenceMap.toJSON(n).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(m.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(n).uuid),this.map&&this.map.isTexture&&(m.map=this.map.toJSON(n).uuid),this.matcap&&this.matcap.isTexture&&(m.matcap=this.matcap.toJSON(n).uuid),this.alphaMap&&this.alphaMap.isTexture&&(m.alphaMap=this.alphaMap.toJSON(n).uuid),this.lightMap&&this.lightMap.isTexture&&(m.lightMap=this.lightMap.toJSON(n).uuid,m.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(m.aoMap=this.aoMap.toJSON(n).uuid,m.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(m.bumpMap=this.bumpMap.toJSON(n).uuid,m.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(m.normalMap=this.normalMap.toJSON(n).uuid,m.normalMapType=this.normalMapType,m.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(m.displacementMap=this.displacementMap.toJSON(n).uuid,m.displacementScale=this.displacementScale,m.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(m.roughnessMap=this.roughnessMap.toJSON(n).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(m.metalnessMap=this.metalnessMap.toJSON(n).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(m.emissiveMap=this.emissiveMap.toJSON(n).uuid),this.specularMap&&this.specularMap.isTexture&&(m.specularMap=this.specularMap.toJSON(n).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(m.specularIntensityMap=this.specularIntensityMap.toJSON(n).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(m.specularColorMap=this.specularColorMap.toJSON(n).uuid),this.envMap&&this.envMap.isTexture&&(m.envMap=this.envMap.toJSON(n).uuid,void 0!==this.combine&&(m.combine=this.combine)),void 0!==this.envMapIntensity&&(m.envMapIntensity=this.envMapIntensity),void 0!==this.reflectivity&&(m.reflectivity=this.reflectivity),void 0!==this.refractionRatio&&(m.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(m.gradientMap=this.gradientMap.toJSON(n).uuid),void 0!==this.transmission&&(m.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(m.transmissionMap=this.transmissionMap.toJSON(n).uuid),void 0!==this.thickness&&(m.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(m.thicknessMap=this.thicknessMap.toJSON(n).uuid),void 0!==this.attenuationDistance&&this.attenuationDistance!==1/0&&(m.attenuationDistance=this.attenuationDistance),void 0!==this.attenuationColor&&(m.attenuationColor=this.attenuationColor.getHex()),void 0!==this.size&&(m.size=this.size),null!==this.shadowSide&&(m.shadowSide=this.shadowSide),void 0!==this.sizeAttenuation&&(m.sizeAttenuation=this.sizeAttenuation),1!==this.blending&&(m.blending=this.blending),0!==this.side&&(m.side=this.side),this.vertexColors&&(m.vertexColors=!0),this.opacity<1&&(m.opacity=this.opacity),!0===this.transparent&&(m.transparent=this.transparent),m.depthFunc=this.depthFunc,m.depthTest=this.depthTest,m.depthWrite=this.depthWrite,m.colorWrite=this.colorWrite,m.stencilWrite=this.stencilWrite,m.stencilWriteMask=this.stencilWriteMask,m.stencilFunc=this.stencilFunc,m.stencilRef=this.stencilRef,m.stencilFuncMask=this.stencilFuncMask,m.stencilFail=this.stencilFail,m.stencilZFail=this.stencilZFail,m.stencilZPass=this.stencilZPass,void 0!==this.rotation&&0!==this.rotation&&(m.rotation=this.rotation),!0===this.polygonOffset&&(m.polygonOffset=!0),0!==this.polygonOffsetFactor&&(m.polygonOffsetFactor=this.polygonOffsetFactor),0!==this.polygonOffsetUnits&&(m.polygonOffsetUnits=this.polygonOffsetUnits),void 0!==this.linewidth&&1!==this.linewidth&&(m.linewidth=this.linewidth),void 0!==this.dashSize&&(m.dashSize=this.dashSize),void 0!==this.gapSize&&(m.gapSize=this.gapSize),void 0!==this.scale&&(m.scale=this.scale),!0===this.dithering&&(m.dithering=!0),this.alphaTest>0&&(m.alphaTest=this.alphaTest),!0===this.alphaToCoverage&&(m.alphaToCoverage=this.alphaToCoverage),!0===this.premultipliedAlpha&&(m.premultipliedAlpha=this.premultipliedAlpha),!0===this.forceSinglePass&&(m.forceSinglePass=this.forceSinglePass),!0===this.wireframe&&(m.wireframe=this.wireframe),this.wireframeLinewidth>1&&(m.wireframeLinewidth=this.wireframeLinewidth),"round"!==this.wireframeLinecap&&(m.wireframeLinecap=this.wireframeLinecap),"round"!==this.wireframeLinejoin&&(m.wireframeLinejoin=this.wireframeLinejoin),!0===this.flatShading&&(m.flatShading=this.flatShading),!1===this.visible&&(m.visible=!1),!1===this.toneMapped&&(m.toneMapped=!1),!1===this.fog&&(m.fog=!1),Object.keys(this.userData).length>0&&(m.userData=this.userData),o){const E=A(n.textures),w=A(n.images);E.length>0&&(m.textures=E),w.length>0&&(m.images=w)}return m}clone(){return(new this.constructor).copy(this)}copy(n){this.name=n.name,this.blending=n.blending,this.side=n.side,this.vertexColors=n.vertexColors,this.opacity=n.opacity,this.transparent=n.transparent,this.blendSrc=n.blendSrc,this.blendDst=n.blendDst,this.blendEquation=n.blendEquation,this.blendSrcAlpha=n.blendSrcAlpha,this.blendDstAlpha=n.blendDstAlpha,this.blendEquationAlpha=n.blendEquationAlpha,this.depthFunc=n.depthFunc,this.depthTest=n.depthTest,this.depthWrite=n.depthWrite,this.stencilWriteMask=n.stencilWriteMask,this.stencilFunc=n.stencilFunc,this.stencilRef=n.stencilRef,this.stencilFuncMask=n.stencilFuncMask,this.stencilFail=n.stencilFail,this.stencilZFail=n.stencilZFail,this.stencilZPass=n.stencilZPass,this.stencilWrite=n.stencilWrite;const o=n.clippingPlanes;let m=null;if(null!==o){const A=o.length;m=new Array(A);for(let E=0;E!==A;++E)m[E]=o[E].clone()}return this.clippingPlanes=m,this.clipIntersection=n.clipIntersection,this.clipShadows=n.clipShadows,this.shadowSide=n.shadowSide,this.colorWrite=n.colorWrite,this.precision=n.precision,this.polygonOffset=n.polygonOffset,this.polygonOffsetFactor=n.polygonOffsetFactor,this.polygonOffsetUnits=n.polygonOffsetUnits,this.dithering=n.dithering,this.alphaTest=n.alphaTest,this.alphaToCoverage=n.alphaToCoverage,this.premultipliedAlpha=n.premultipliedAlpha,this.forceSinglePass=n.forceSinglePass,this.visible=n.visible,this.toneMapped=n.toneMapped,this.userData=JSON.parse(JSON.stringify(n.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(n){!0===n&&this.version++}}const hh={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},$a={h:0,s:0,l:0},Au={h:0,s:0,l:0};function pp(b,n,o){return o<0&&(o+=1),o>1&&(o-=1),o<1/6?b+6*(n-b)*o:o<.5?n:o<2/3?b+6*(n-b)*(2/3-o):b}class Dn{constructor(n,o,m){return this.isColor=!0,this.r=1,this.g=1,this.b=1,void 0===o&&void 0===m?this.set(n):this.setRGB(n,o,m)}set(n){return n&&n.isColor?this.copy(n):"number"==typeof n?this.setHex(n):"string"==typeof n&&this.setStyle(n),this}setScalar(n){return this.r=n,this.g=n,this.b=n,this}setHex(n,o=Zr){return n=Math.floor(n),this.r=(n>>16&255)/255,this.g=(n>>8&255)/255,this.b=(255&n)/255,_a.toWorkingColorSpace(this,o),this}setRGB(n,o,m,A=_a.workingColorSpace){return this.r=n,this.g=o,this.b=m,_a.toWorkingColorSpace(this,A),this}setHSL(n,o,m,A=_a.workingColorSpace){if(n=$m(n,1),o=gr(o,0,1),m=gr(m,0,1
vendor: 9,618 bytes, line 83
83),0===o)this.r=this.g=this.b=m;else{const E=m<=.5?m*(1+o):m+o-m*o,w=2*m-E;this.r=pp(w,E,n+1/3),this.g=pp(w,E,n),this.b=pp(w,E,n-1/3)}return _a.toWorkingColorSpace(this,A),this}setStyle(n,o=Zr){function m(E){void 0!==E&&parseFloat(E)<1&&console.warn("THREE.Color: Alpha component of "+n+" will be ignored.")}let A;if(A=/^(\w+)\(([^\)]*)\)/.exec(n)){let E;const T=A[2];switch(A[1]){case"rgb":case"rgba":if(E=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(T))return this.r=Math.min(255,parseInt(E[1],10))/255,this.g=Math.min(255,parseInt(E[2],10))/255,this.b=Math.min(255,parseInt(E[3],10))/255,_a.toWorkingColorSpace(this,o),m(E[4]),this;if(E=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(T))return this.r=Math.min(100,parseInt(E[1],10))/100,this.g=Math.min(100,parseInt(E[2],10))/100,this.b=Math.min(100,parseInt(E[3],10))/100,_a.toWorkingColorSpace(this,o),m(E[4]),this;break;case"hsl":case"hsla":if(E=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(T)){const B=parseFloat(E[1])/360,D=parseFloat(E[2])/100,N=parseFloat(E[3])/100;return m(E[4]),this.setHSL(B,D,N,o)}break;default:console.warn("THREE.Color: Unknown color model "+n)}}else if(A=/^\#([A-Fa-f\d]+)$/.exec(n)){const E=A[1],w=E.length;if(3===w)return this.setRGB(parseInt(E.charAt(0),16)/15,parseInt(E.charAt(1),16)/15,parseInt(E.charAt(2),16)/15,o);if(6===w)return this.setHex(parseInt(E,16),o);console.warn("THREE.Color: Invalid hex color "+n)}else if(n&&n.length>0)return this.setColorName(n,o);return this}setColorName(n,o=Zr){const m=hh[n.toLowerCase()];return void 0!==m?this.setHex(m,o):console.warn("THREE.Color: Unknown color "+n),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(n){return this.r=n.r,this.g=n.g,this.b=n.b,this}copySRGBToLinear(n){return this.r=cu(n.r),this.g=cu(n.g),this.b=cu(n.b),this}copyLinearToSRGB(n){return this.r=eg(n.r),this.g=eg(n.g),this.b=eg(n.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(n=Zr){return _a.fromWorkingColorSpace(Ys.copy(this),n),gr(255*Ys.r,0,255)<<16^gr(255*Ys.g,0,255)<<8^gr(255*Ys.b,0,255)}getHexString(n=Zr){return("000000"+this.getHex(n).toString(16)).slice(-6)}getHSL(n,o=_a.workingColorSpace){_a.fromWorkingColorSpace(Ys.copy(this),o);const m=Ys.r,A=Ys.g,E=Ys.b,w=Math.max(m,A,E),T=Math.min(m,A,E);let B,D;const N=(T+w)/2;if(T===w)B=0,D=0;else{const G=w-T;switch(D=N<=.5?G/(w+T):G/(2-w-T),w){case m:B=(A-E)/G+(A<E?6:0);break;case A:B=(E-m)/G+2;break;case E:B=(m-A)/G+4}B/=6}return n.h=B,n.s=D,n.l=N,n}getRGB(n,o=_a.workingColorSpace){return _a.fromWorkingColorSpace(Ys.copy(this),o),n.r=Ys.r,n.g=Ys.g,n.b=Ys.b,n}getStyle(n=Zr){_a.fromWorkingColorSpace(Ys.copy(this),n);const o=Ys.r,m=Ys.g,A=Ys.b;return n!==Zr?`color(${n} ${o.toFixed(3)} ${m.toFixed(3)} ${A.toFixed(3)})`:`rgb(${255*o|0},${255*m|0},${255*A|0})`}offsetHSL(n,o,m){return this.getHSL($a),$a.h+=n,$a.s+=o,$a.l+=m,this.setHSL($a.h,$a.s,$a.l),this}add(n){return this.r+=n.r,this.g+=n.g,this.b+=n.b,this}addColors(n,o){return this.r=n.r+o.r,this.g=n.g+o.g,this.b=n.b+o.b,this}addScalar(n){return this.r+=n,this.g+=n,this.b+=n,this}sub(n){return this.r=Math.max(0,this.r-n.r),this.g=Math.max(0,this.g-n.g),this.b=Math.max(0,this.b-n.b),this}multiply(n){return this.r*=n.r,this.g*=n.g,this.b*=n.b,this}multiplyScalar(n){return this.r*=n,this.g*=n,this.b*=n,this}lerp(n,o){return this.r+=(n.r-this.r)*o,this.g+=(n.g-this.g)*o,this.b+=(n.b-this.b)*o,this}lerpColors(n,o,m){return this.r=n.r+(o.r-n.r)*m,this.g=n.g+(o.g-n.g)*m,this.b=n.b+(o.b-n.b)*m,this}lerpHSL(n,o){this.getHSL($a),n.getHSL(Au);const m=Ws($a.h,Au.h,o),A=Ws($a.s,Au.s,o),E=Ws($a.l,Au.l,o);return this.setHSL(m,A,E),this}setFromVector3(n){return this.r=n.x,this.g=n.y,this.b=n.z,this}applyMatrix3(n){const o=this.r,m=this.g,A=this.b,E=n.elements;return this.r=E[0]*o+E[3]*m+E[6]*A,this.g=E[1]*o+E[4]*m+E[7]*A,this.b=E[2]*o+E[5]*m+E[8]*A,this}equals(n){return n.r===this.r&&n.g===this.g&&n.b===this.b}fromArray(n,o=0){return this.r=n[o],this.g=n[o+1],this.b=n[o+2],this}toArray(n=[],o=0){return n[o]=this.r,n[o+1]=this.g,n[o+2]=this.b,n}fromBufferAttribute(n,o){return this.r=n.getX(o),this.g=n.getY(o),this.b=n.getZ(o),this}toJSON(){return this.getHex()}*[Symbol.iterator](){yield this.r,yield this.g,yield this.b}}const Ys=new Dn;Dn.NAMES=hh;class po extends qs{constructor(n){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new Dn(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=Tn,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(n)}copy(n){return super.copy(n),this.color.copy(n.color),this.map=n.map,this.lightMap=n.lightMap,this.lightMapIntensity=n.lightMapIntensity,this.aoMap=n.aoMap,this.aoMapIntensity=n.aoMapIntensity,this.specularMap=n.specularMap,this.alphaMap=n.alphaMap,this.envMap=n.envMap,this.combine=n.combine,this.reflectivity=n.reflectivity,this.refractionRatio=n.refractionRatio,this.wireframe=n.wireframe,this.wireframeLinewidth=n.wireframeLinewidth,this.wireframeLinecap=n.wireframeLinecap,this.wireframeLinejoin=n.wireframeLinejoin,this.fog=n.fog,this}}const sa=jA();function jA(){const b=new ArrayBuffer(4),n=new Float32Array(b),o=new Uint32Array(b),m=new Uint32Array(512),A=new Uint32Array(512);for(let B=0;B<256;++B){const D=B-127;D<-27?(m[B]=0,m[256|B]=32768,A[B]=24,A[256|B]=24):D<-14?(m[B]=1024>>-D-14,m[256|B]=1024>>-D-14|32768,A[B]=-D-1,A[256|B]=-D-1):D<=15?(m[B]=D+15<<10,m[256|B]=D+15<<10|32768,A[B]=13,A[256|B]=13):D<128?(m[B]=31744,m[256|B]=64512,A[B]=24,A[256|B]=24):(m[B]=31744,m[256|B]=64512,A[B]=13,A[256|B]=13)}const E=new Uint32Array(2048),w=new Uint32Array(64),T=new Uint32Array(64);for(let B=1;B<1024;++B){let D=B<<13,N=0;for(;!(8388608&D);)D<<=1,N-=8388608;D&=-8388609,N+=947912704,E[B]=D|N}for(let B=1024;B<2048;++B)E[B]=939524096+(B-1024<<13);for(let B=1;B<31;++B)w[B]=B<<23;w[31]=1199570944,w[32]=2147483648;for(let B=33;B<63;++B)w[B]=2147483648+(B-32<<23);w[63]=3347054592;for(let B=1;B<64;++B)32!==B&&(T[B]=1024);return{floatView:n,uint32View:o,baseTable:m,shiftTable:A,mantissaTable:E,exponentTable:w,offsetTable:T}}function Fa(b){Math.abs(b)>65504&&console.warn("THREE.DataUtils.toHalfFloat(): Value out of range."),b=gr(b,-65504,65504),sa.floatView[0]=b;const n=sa.uint32View[0],o=n>>23&511;return sa.baseTable[o]+((8388607&n)>>sa.shiftTable[o])}function mo(b){const n=b>>10;return sa.uint32View[0]=sa.mantissaTable[sa.offsetTable[n]+(1023&b)]+sa.exponentTable[n],sa.floatView[0]}const Ql={toHalfFloat:Fa,fromHalfFloat:mo},As=new De,Lf=new qt;class Cr{constructor(n,o,m=!1){if(Array.isArray(n))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,this.name="",this.array=n,this.itemSize=o,this.count=void 0!==n?n.length/o:0,this.normalized=m,this.usage=au,this.updateRange={offset:0,count:-1},this.version=0}onUploadCallback(){}set needsUpdate(n){!0===n&&this.version++}setUsage(n){return this.usage=n,this}copy(n){return this.name=n.name,this.array=new n.array.constructor(n.array),this.itemSize=n.itemSize,this.count=n.count,this.normalized=n.normalized,this.usage=n.usage,this}copyAt(n,o,m){n*=this.itemSize,m*=o.itemSize;for(let A=0,E=this.itemSize;A<E;A++)this.array[n+A]=o.array[m+A];return this}copyArray(n){return this.array.set(n),this}applyMatrix3(n){if(2===this.itemSize)for(let o=0,m=this.count;o<m;o++)Lf.fromBufferAttribute(this,o),Lf.applyMatrix3(n),this.setXY(o,Lf.x,Lf.y);else if(3===this.itemSize)for(let o=0,m=this.count;o<m;o++)As.fromBufferAttribute(this,o),As.applyMatrix3(n),this.setXYZ(o,As.x,As.y,As.z);return this}applyMatrix4(n){for(let o=0,m=this.count;o<m;o++)As.fromBufferAttribute(this,o),As.applyMatrix4(n),this.setXYZ(o,As.x,As.y,As.z);return this}applyNormalMatrix(n){for(let o=0,m=this.count;o<m;o++)As.fromBufferAttribute(this,o),As.applyNormalMatrix(n),this.setXYZ(o,As.x,As.y,As.z);return this}transformDirection(n){for(let o=0,m=this.count;o<m;o++)As.fromBufferAttribute(this,o),As.transformDirection(n),this.setXYZ(o,As.x,As.y,As.z);return this}set(n,o=0){return this.array.set(n,o),this}getX(n){let o=this.array[n*this.itemSize];return this.normalized&&(o=Ba(o,this.array)),o}setX(n,o){return this.normalized&&(o=wi(o,this.array)),this.array[n*this.itemSize]=o,this}getY(n){let o=this.array[n*this.itemSize+1];return this.normalized&&(o=Ba(o,this.array)),o}setY(n,o){return this.normalized&&(o=wi(o,this.array)),this.array[n*this.itemSize+1]=o,this}getZ(n){let o=this.array[n*this.itemSize+2];return this.normalized&&(o=Ba(o,this.array)),o}setZ(n,o){return this.normalized&&(o=wi(o,this.array)),this.array[n*this.itemSize+2]=o,this}getW(n){let o=this.array[n*this.itemSize+3];return this.normalized&&(o=Ba(o,this.array)),o}setW(n,o){return this.normalized&&(o=wi(o,this.array)),this.array[n*this.itemSize+3]=o,this}setXY(n,o,m){return n*=this.itemSize,this.normalized&&(o=wi(o,this.array),m=wi(m,this.array)),this.array[n+0]=o,this.array[n+1]=m,this}setXYZ(n,o,m,A){return n*=this.itemSize,this.normalized&&(o=wi(o,this.array),m=wi(m,this.array),A=wi(A,this.array)),this.array[n+0]=o,this.array[n+1]=m,this.array[n+2]=A,this}setXYZW(n,o,m,A,E){return n*=this.itemSize,this.normalized&&(o=wi(o,this.array),m=wi(m,this.array),A=wi(A,this.array),E=wi(E,this.array)),this.array[n+0]=o,this.array[n+1]=m,this.array[n+2]=A,this.array[n+3]=E,this}
vendor: 3,480 bytes, line 83
83onUpload(n){return this.onUploadCallback=n,this}clone(){return new this.constructor(this.array,this.itemSize).copy(this)}toJSON(){const n={itemSize:this.itemSize,type:this.array.constructor.name,array:Array.from(this.array),normalized:this.normalized};return""!==this.name&&(n.name=this.name),this.usage!==au&&(n.usage=this.usage),(0!==this.updateRange.offset||-1!==this.updateRange.count)&&(n.updateRange=this.updateRange),n}copyColorsArray(){console.error("THREE.BufferAttribute: copyColorsArray() was removed in r144.")}copyVector2sArray(){console.error("THREE.BufferAttribute: copyVector2sArray() was removed in r144.")}copyVector3sArray(){console.error("THREE.BufferAttribute: copyVector3sArray() was removed in r144.")}copyVector4sArray(){console.error("THREE.BufferAttribute: copyVector4sArray() was removed in r144.")}}class gp extends Cr{constructor(n,o,m){super(new Uint16Array(n),o,m)}}class Ff extends Cr{constructor(n,o,m){super(new Uint32Array(n),o,m)}}class zn extends Cr{constructor(n,o,m){super(new Float32Array(n),o,m)}}let pg=0;const go=new Ti,Wl=new Fr,ol=new De,Ms=new fo,_u=new fo,Ds=new De;class Fi extends Ki{constructor(){super(),this.isBufferGeometry=!0,Object.defineProperty(this,"id",{value:pg++}),this.uuid=Ra(),this.name="",this.type="BufferGeometry",this.index=null,this.attributes={},this.morphAttributes={},this.morphTargetsRelative=!1,this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0},this.userData={}}getIndex(){return this.index}setIndex(n){return this.index=Array.isArray(n)?new(Jm(n)?Ff:gp)(n,1):n,this}getAttribute(n){return this.attributes[n]}setAttribute(n,o){return this.attributes[n]=o,this}deleteAttribute(n){return delete this.attributes[n],this}hasAttribute(n){return void 0!==this.attributes[n]}addGroup(n,o,m=0){this.groups.push({start:n,count:o,materialIndex:m})}clearGroups(){this.groups=[]}setDrawRange(n,o){this.drawRange.start=n,this.drawRange.count=o}applyMatrix4(n){const o=this.attributes.position;void 0!==o&&(o.applyMatrix4(n),o.needsUpdate=!0);const m=this.attributes.normal;if(void 0!==m){const E=(new Di).getNormalMatrix(n);m.applyNormalMatrix(E),m.needsUpdate=!0}const A=this.attributes.tangent;return void 0!==A&&(A.transformDirection(n),A.needsUpdate=!0),null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this}applyQuaternion(n){return go.makeRotationFromQuaternion(n),this.applyMatrix4(go),this}rotateX(n){return go.makeRotationX(n),this.applyMatrix4(go),this}rotateY(n){return go.makeRotationY(n),this.applyMatrix4(go),this}rotateZ(n){return go.makeRotationZ(n),this.applyMatrix4(go),this}translate(n,o,m){return go.makeTranslation(n,o,m),this.applyMatrix4(go),this}scale(n,o,m){return go.makeScale(n,o,m),this.applyMatrix4(go),this}lookAt(n){return Wl.lookAt(n),Wl.updateMatrix(),this.applyMatrix4(Wl.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(ol).negate(),this.translate(ol.x,ol.y,ol.z),this}setFromPoints(n){const o=[];for(let m=0,A=n.length;m<A;m++){const E=n[m];o.push(E.x,E.y,E.z||0)}return this.setAttribute("position",new zn(o,3)),this}computeBoundingBox(){null===this.boundingBox&&(this.boundingBox=new fo);const n=this.attributes.position,o=this.morphAttributes.position;if(n&&n.isGLBufferAttribute)return console.error('THREE.BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box. Alternatively set "mesh.frustumCulled" to "fal
83se".',this),void this.boundingBox.set(new De(-1/0,-1/0,-1/0),new De(1/0,1/0,1/0));if(void 0!==n){if(this.boundingBox.setFromBufferAttribute(n),o)for(let m=0,A=o.length;m<A;m++)Ms.setFromBufferAttribute(o[m]),this.morphTargetsRelative?(Ds.addVectors(this.boundingBox.min,Ms.min),this.boundingBox.expandByPoint(Ds),Ds.addVectors(this.boundingBox.max,Ms.max),this.boundingBox.expandByPoint(Ds)):(this.boundingBox.expandByPoint(Ms.min),this.boundingBox.expandByPoint(Ms.max))}else this.boundingBox.makeEmpty();(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&console.error('THREE.BufferGeometry.computeBoundingBox(): Computed min/max have NaN values. The "position" attribute is likely to have NaN values.',this)}computeBoundingSphere(){null===this.boundingSphere&&(this.boundingSphere=new Ul);const n=this.attributes.position,o=this.morphAttributes.position;if(n&&n.isGLBufferAttribute)return console.error('THREE.BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere. Alternatively set "mesh.frustumCulled" to "fal
83se".',this),void this.boundingSphere.set(new De,1/0);if(n){const m=this.boundingSphere.center;if(Ms.setFromBufferAttribute(n),o)for(let E=0,w=o.length;E<w;E++)_u.setFromBufferAttribute(o[E]),this.morphTargetsRelative?(Ds.addVectors(Ms.min,_u.min),Ms.expandByPoint(Ds),Ds.addVectors(Ms.max,_u.max),Ms.expandByPoint(Ds)):(Ms.expandByPoint(_u.min),Ms.expandByPoint(_u.max));Ms.getCenter(m);let A=0;for(let E=0,w=n.count;E<w;E++)Ds.fromBufferAttribute(n,E),A=Math.max(A,m.distanceToSquared(Ds));if(o)for(let E=0,w=o.length;E<w;E++){const T=o[E],B=this.morphTargetsRelative;for(let D=0,N=T.count;D<N;D++)Ds.fromBufferAttribute(T,D),B&&(ol.fromBufferAttribute(n,D),Ds.add(ol)),A=Math.max(A,m.distanceToSquared(Ds))}this.boundingSphere.radius=Math.sqrt(A),isNaN(this.boundingSphere.radius)&&console.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this)}}computeTangents(){const n=this.index,o=this.attributes;if(null===n||void 0===o.position||void 0===o.normal||void 0===o.uv)return void console.error("THREE.BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)");const m=n.array,A=o.position.array,E=o.normal.array,w=o.uv.array,T=A.length/3;!1===this.hasAttribute("tangent")&&this.setAttribute("tangent",new Cr(new Float32Array(4*T),4));const B=this.getAttribute("tangent").array,D=[],N=[];for(let Le=0;Le<T;Le++)D[Le]=new De,N[Le]=new De;const G=new De,H=new De,Q=new De,Z=new qt,he=new qt,J=new qt,Y=new De,ve=new De;function pe(Le,vt,Pt){G.fromArray(A,3*Le),H.fromArray(A,3*vt),Q.fromArray(A,3*Pt),Z.fromArray(w,2*Le),he.fromArray(w,2*vt),J.fromArray(w,2*Pt),H.sub(G),Q.sub(G),he.sub(Z),J.sub(Z);const ot=1/(he.x*J.y-J.x*he.y);isFinite(ot)&&(Y.copy(H).multiplyScalar(J.y).addScaledVector(Q,-he.y).multiplyScalar(ot),ve.copy(Q).multiplyScalar(he.x).addScaledVector(H,-J.x).multiplyScalar(ot),D[Le].add(Y),D[vt].add(Y),D[Pt].add(Y),N[Le].add(ve),N[vt].add(ve),N[Pt].add(ve))}let Ae=this.groups;0===Ae.length&&(Ae=[{start:0,count:m.length}]);for(let Le=0,vt=Ae.length;Le<vt;++Le){const Pt=Ae[Le],ot=Pt.start;for(let Et=ot,tn=ot+Pt.count;Et<tn;Et+=3)pe(m[Et+0],m[Et+1],m[Et+2])}const Ie=new De,Ne=new De,Xe=new De,Qe=new De;function Se(Le){Xe.fromArray(E,3*Le),Qe.copy(Xe);const vt=D[Le];Ie.copy(vt),Ie.sub(Xe.multiplyScalar(Xe.dot(vt))).normalize(),Ne.crossVectors(Qe,vt);const ot=Ne.dot(N[Le])<0?-1:1;B[4*Le]=Ie.x,B[4*Le+1]=Ie.y,B[4*Le+2]=Ie.z,B[4*Le+3]=ot}for(let Le=0,vt=Ae.length;Le<vt;++Le){const Pt=Ae[Le],ot=Pt.start;for(let Et=ot,tn=ot+Pt.count;Et<tn;Et+=3)Se(m[Et+0]),Se(m[Et+1]),Se(m[Et+2])}}computeVertexNormals(){const n=this.index,o=this.getAttribute("position");if(void 0!==o){let m=this.getAttribute("normal");if(void 0===m)m=new Cr(new Float32Array(3*o.count),3),this.setAttribute("normal",m);else for(let H=0,Q=m.count;H<Q;H++)m.setXYZ(H,0,0,0);const A=new De,E=new De,w=new De,T=new De,B=new De,D=new De,N=new De,G=new De;if(n)for(let H=0,Q=n.count;H<Q;H+=3){const Z=n.getX(H+0),he=n.getX(H+1),J=n.getX(H+2);A.fromBufferAttribute(o,Z),E.fromBufferAttribute(o,he),w.fromBufferAttribute(o,J),N.subVectors(w,E),G.subVectors(A,E),N.cross(G),T.fromBufferAttribute(m,Z),B.fromBufferAttribute(m,he),D.fromBufferAttribute(m,J),T.add(N),B.add(N),D.add(N),m.setXYZ(Z,T.x,T.y,T.z),m.setXYZ(he,B.x,B.y,B.z),m.setXYZ(J,D.x,D.y,D.z)}else for(let H=0,Q=o.count;H<Q;H+=3)A.fromBufferAttribute(o,H+0),E.fromBufferAttribute(o,H+1),w.fromBufferAttribute(o,H+2),N.subVectors(w,E),G.subVectors(A,E),N.cross(G),m.setXYZ(H+0,N.x,N.y,N.z),m.setXYZ(H+1,N.x,N.y,N.z),m.setXYZ(H+2,N.x,N.y,N.z);this.normalizeNormals(),m.needsUpdate=!0}}merge(){return console.error("THREE.BufferGeometry.merge() has been removed. Use THREE.BufferGeometryUtils.mergeGeometries() instead."),this}normalizeNormals(){const n=this.attributes.normal;for(let o=0,m=n.count;o<m;o++)Ds.fromBufferAttribute(n,o),Ds.normalize(),n.setXYZ(o,Ds.x,Ds.y,Ds.z)}toNonIndexed(){function n(T,B){const D=T.array,N=T.itemSize,G=T.normalized,H=new D.constructor(B.length*N);let Q=0,Z=0;for(let he=0,J=B.length;he<J;he++){Q=T.isInterleavedBufferAttribute?B[he]*T.data.stride+T.offset:B[he]*N;for(let Y=0;Y<N;Y++)H[Z++]=D[Q++]}return new Cr(H,N,G)}if(null===this.index)return console.warn("THREE.BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."),this;const o=new Fi,m=this.index.array,A=this.attributes;for(const T in A){const D=n(A[T],m);o.setAttribute(T,D)}const E=this.morphAttributes;for(const T in E){const B=[],D=E[T];for(let N=0,G=D.length;N<G;N++){const Q=n(D[N],m);B.push(Q)}o.morphAttributes[T]=B}o.morphTargetsRelative=this.morphTargetsRelative;const w=this.groups;for(let T=0,B=w.length;T<B;T++){const D=w[T];o.addGroup(D.start,D.count,D.materialIndex)}return o}toJSON(){const n={metadata:{version:4.5,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};
vendor: 4,187 bytes, line 83
83if(n.uuid=this.uuid,n.type=this.type,""!==this.name&&(n.name=this.name),Object.keys(this.userData).length>0&&(n.userData=this.userData),void 0!==this.parameters){const B=this.parameters;for(const D in B)void 0!==B[D]&&(n[D]=B[D]);return n}n.data={attributes:{}};const o=this.index;null!==o&&(n.data.index={type:o.array.constructor.name,array:Array.prototype.slice.call(o.array)});const m=this.attributes;for(const B in m)n.data.attributes[B]=m[B].toJSON(n.data);const A={};let E=!1;for(const B in this.morphAttributes){const D=this.morphAttributes[B],N=[];for(let G=0,H=D.length;G<H;G++)N.push(D[G].toJSON(n.data));N.length>0&&(A[B]=N,E=!0)}E&&(n.data.morphAttributes=A,n.data.morphTargetsRelative=this.morphTargetsRelative);const w=this.groups;w.length>0&&(n.data.groups=JSON.parse(JSON.stringify(w)));const T=this.boundingSphere;return null!==T&&(n.data.boundingSphere={center:T.center.toArray(),radius:T.radius}),n}clone(){return(new this.constructor).copy(this)}copy(n){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const o={};this.name=n.name;const m=n.index;null!==m&&this.setIndex(m.clone(o));const A=n.attributes;for(const D in A)this.setAttribute(D,A[D].clone(o));const E=n.morphAttributes;for(const D in E){const N=[],G=E[D];for(let H=0,Q=G.length;H<Q;H++)N.push(G[H].clone(o));this.morphAttributes[D]=N}this.morphTargetsRelative=n.morphTargetsRelative;const w=n.groups;for(let D=0,N=w.length;D<N;D++){const G=w[D];this.addGroup(G.start,G.count,G.materialIndex)}const T=n.boundingBox;null!==T&&(this.boundingBox=T.clone());const B=n.boundingSphere;return null!==B&&(this.boundingSphere=B.clone()),this.drawRange.start=n.drawRange.start,this.drawRange.count=n.drawRange.count,this.userData=n.userData,this}dispose(){this.dispatchEvent({type:"dispose"})}}const mg=new Ti,ll=new hp,kf=new Ul,br=new De,Of=new De,vu=new De,yu=new De,gg=new De,_p=new De,vp=new qt,yp=new qt,uh=new qt,Nf=new De,xa=new De,cl=new De,xp=new De,Xl=new De;class Fs extends Fr{constructor(n=new Fi,o=new po){super(),this.isMesh=!0,this.type="Mesh",this.geometry=n,this.material=o,this.updateMorphTargets()}copy(n,o){return super.copy(n,o),void 0!==n.morphTargetInfluences&&(this.morphTargetInfluences=n.morphTargetInfluences.slice()),void 0!==n.morphTargetDictionary&&(this.morphTargetDictionary=Object.assign({},n.morphTargetDictionary)),this.material=n.material,this.geometry=n.geometry,this}updateMorphTargets(){const o=this.geometry.morphAttributes,m=Object.keys(o);if(m.length>0){const A=o[m[0]];if(void 0!==A){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let E=0,w=A.length;E<w;E++){const T=A[E].name||String(E);this.morphTargetInfluences.push(0),this.morphTargetDictionary[T]=E}}}}getVertexPosition(n,o){const m=this.geometry,E=m.morphAttributes.position,w=m.morphTargetsRelative;o.fromBufferAttribute(m.attributes.position,n);const T=this.morphTargetInfluences;if(E&&T){_p.set(0,0,0);for(let B=0,D=E.length;B<D;B++){const N=T[B];0!==N&&(gg.fromBufferAttribute(E[B],n),_p.addScaledVector(w?gg:gg.sub(o),N))}o.add(_p)}return this.isSkinnedMesh&&this.applyBoneTransform(n,o),o}raycast(n,o){const m=this.geometry,A=this.material,E=this.matrixWorld;if(void 0===A||(null===m.boundingSphere&&m.computeBoundingSphere(),kf.copy(m.boundingSphere),kf.applyMatrix4(E),ll.copy(n.ray).recast(n.near),!1===kf.containsPoint(ll.origin)&&(null===ll.intersectSphere(kf,br)||ll.origin.distanceToSquared(br)>(n.far-n.near)**2))||(mg.copy(E).invert(),ll.copy(n.ray).applyMatrix4(mg),null!==m.boundingBox&&!1===ll.intersectsBox(m.boundingBox)))return;let w;const T=m.index,B=m.attributes.position,D=m.attributes.uv,N=m.attributes.uv2,G=m.attributes.normal,H=m.groups,Q=m.drawRange;if(null!==T)if(Array.isArray(A))for(let Z=0,he=H.length;Z<he;Z++){const J=H[Z],Y=A[J.materialIndex];for(let Ae=Math.max(J.start,Q.start),Ie=Math.min(T.count,Math.min(J.start+J.count,Q.start+Q.count));Ae<Ie;Ae+=3){const Ne=T.getX(Ae),Xe=T.getX(Ae+1),Qe=T.getX(Ae+2);w=Ep(this,Y,n,ll,D,N,G,Ne,Xe,Qe),w&&(w.faceIndex=Math.floor(Ae/3),w.face.materialIndex=J.materialIndex,o.push(w))}}else for(let J=Math.max(0,Q.start),Y=Math.min(T.count,Q.start+Q.c
vendor: 4,584 bytes, line 83
83ount);J<Y;J+=3){const ve=T.getX(J),pe=T.getX(J+1),Ae=T.getX(J+2);w=Ep(this,A,n,ll,D,N,G,ve,pe,Ae),w&&(w.faceIndex=Math.floor(J/3),o.push(w))}else if(void 0!==B)if(Array.isArray(A))for(let Z=0,he=H.length;Z<he;Z++){const J=H[Z],Y=A[J.materialIndex];for(let Ae=Math.max(J.start,Q.start),Ie=Math.min(B.count,Math.min(J.start+J.count,Q.start+Q.count));Ae<Ie;Ae+=3)w=Ep(this,Y,n,ll,D,N,G,Ae,Ae+1,Ae+2),w&&(w.faceIndex=Math.floor(Ae/3),w.face.materialIndex=J.materialIndex,o.push(w))}else for(let J=Math.max(0,Q.start),Y=Math.min(B.count,Q.start+Q.count);J<Y;J+=3)w=Ep(this,A,n,ll,D,N,G,J,J+1,J+2),w&&(w.faceIndex=Math.floor(J/3),o.push(w))}}function Ep(b,n,o,m,A,E,w,T,B,D){b.getVertexPosition(T,Of),b.getVertexPosition(B,vu),b.getVertexPosition(D,yu);const N=function t_(b,n,o,m,A,E,w,T){let B;if(B=1===n.side?m.intersectTriangle(w,E,A,!0,T):m.intersectTriangle(A,E,w,0===n.side,T),null===B)return null;Xl.copy(T),Xl.applyMatrix4(b.matrixWorld);const D=o.ray.origin.distanceTo(Xl);return D<o.near||D>o.far?null:{distance:D,point:Xl.clone(),object:b}}(b,n,o,m,Of,vu,yu,xp);if(N){A&&(vp.fromBufferAttribute(A,T),yp.fromBufferAttribute(A,B),uh.fromBufferAttribute(A,D),N.uv=ra.getInterpolation(xp,Of,vu,yu,vp,yp,uh,new qt)),E&&(vp.fromBufferAttribute(E,T),yp.fromBufferAttribute(E,B),uh.fromBufferAttribute(E,D),N.uv2=ra.getInterpolation(xp,Of,vu,yu,vp,yp,uh,new qt)),w&&(Nf.fromBufferAttribute(w,T),xa.fromBufferAttribute(w,B),cl.fromBufferAttribute(w,D),N.normal=ra.getInterpolation(xp,Of,vu,yu,Nf,xa,cl,new De),N.normal.dot(m.direction)>0&&N.normal.multiplyScalar(-1));const G={a:T,b:B,c:D,normal:new De,materialIndex:0};ra.getNormal(Of,vu,yu,G.normal),N.face=G}return N}class xc extends Fi{constructor(n=1,o=1,m=1,A=1,E=1,w=1){super(),this.type="BoxGeometry",this.parameters={width:n,height:o,depth:m,widthSegments:A,heightSegments:E,depthSegments:w};const T=this;A=Math.floor(A),E=Math.floor(E),w=Math.floor(w);const B=[],D=[],N=[],G=[];let H=0,Q=0;function Z(he,J,Y,ve,pe,Ae,Ie,Ne,Xe,Qe,Se){const Le=Ae/Xe,vt=Ie/Qe,Pt=Ae/2,ot=Ie/2,dt=Ne/2,Et=Xe+1,tn=Qe+1;let cn=0,Ht=0;const nn=new De;for(let dn=0;dn<tn;dn++){const Yn=dn*vt-ot;for(let In=0;In<Et;In++)nn[he]=(In*Le-Pt)*ve,nn[J]=Yn*pe,nn[Y]=dt,D.push(nn.x,nn.y,nn.z),nn[he]=0,nn[J]=0,nn[Y]=Ne>0?1:-1,N.push(nn.x,nn.y,nn.z),G.push(In/Xe),G.push(1-dn/Qe),cn+=1}for(let dn=0;dn<Qe;dn++)for(let Yn=0;Yn<Xe;Yn++){const wt=H+Yn+Et*(dn+1),Zt=H+(Yn+1)+Et*(dn+1),En=H+(Yn+1)+Et*dn;B.push(H+Yn+Et*dn,wt,En),B.push(wt,Zt,En),Ht+=6}T.addGroup(Q,Ht,Se),Q+=Ht,H+=cn}Z("z","y","x",-1,-1,m,o,n,w,E,0),Z("z","y","x",1,-1,m,o,-n,w,E,1),Z("x","z","y",1,1,n,m,o,A,w,2),Z("x","z","y",1,-1,n,m,-o,A,w,3),Z("x","y","z",1,-1,n,o,m,A,E,4),Z("x","y","z",-1,-1,n,o,-m,A,E,5),this.setIndex(B),this.setAttribute("position",new zn(D,3)),this.setAttribute("normal",new zn(N,3)),this.setAttribute("uv",new zn(G,2))}copy(n){return super.copy(n),this.parameters=Object.assign({},n.parameters),this}static fromJSON(n){return new xc(n.width,n.height,n.depth,n.widthSegments,n.heightSegments,n.depthSegments)}}function xu(b){const n={};for(const o in b){n[o]={};for(const m in b[o]){const A=b[o][m];A&&(A.isColor||A.isMatrix3||A.isMatrix4||A.isVector2||A.isVector3||A.isVector4||A.isTexture||A.isQuaternion)?A.isRenderTargetTexture?(console.warn("UniformsUtils: Textures of render targets cannot be cloned via cloneUniforms() or mergeUniforms()."),n[o][m]=null):n[o][m]=A.clone():n[o][m]=Array.isArray(A)?A.slice():A}}return n}function ks(b){const n={};for(let o=0;o<b.length;o++){const m=xu(b[o]);for(const A in m)n[A]=m[A]}return n}function ar(b){return null===b.getRenderTarget()&&b.outputEncoding===xr?Zr:tl}const Ag={clone:xu,merge:ks};class hl extends qs{constructor(n){super(),this.isShaderMaterial=!0,this.type="ShaderMaterial",this.defines={},this.uniforms={},this.uniformsGroups=[],this.vertexShader="void main() {\n\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}",this.fragmentShader="void main() {\n\tgl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );\n}",this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!1,this.forceSinglePass=!0,this.extensions={derivatives:!1,fragDepth:!1,drawBuffers:!1,shaderTextureLOD:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv2:[0,0]},this.index0AttributeName=void 0,this.uniformsNeedUpdate=!1,this.glslVersion=null,void 0!==n&&this.setValues(n)}copy(n){return super.copy(n),this.fragmentShader=n.fragmentShader,this.vertexShader=n.vertexShader,this.uniforms=xu(n.uniforms),this.uniformsGroups=function n_(b){const n=[];for(let o=0;o<b.length;
vendor: 5,397 bytes, line 83
83o++)n.push(b[o].clone());return n}(n.uniformsGroups),this.defines=Object.assign({},n.defines),this.wireframe=n.wireframe,this.wireframeLinewidth=n.wireframeLinewidth,this.fog=n.fog,this.lights=n.lights,this.clipping=n.clipping,this.extensions=Object.assign({},n.extensions),this.glslVersion=n.glslVersion,this}toJSON(n){const o=super.toJSON(n);o.glslVersion=this.glslVersion,o.uniforms={};for(const A in this.uniforms){const w=this.uniforms[A].value;o.uniforms[A]=w&&w.isTexture?{type:"t",value:w.toJSON(n).uuid}:w&&w.isColor?{type:"c",value:w.getHex()}:w&&w.isVector2?{type:"v2",value:w.toArray()}:w&&w.isVector3?{type:"v3",value:w.toArray()}:w&&w.isVector4?{type:"v4",value:w.toArray()}:w&&w.isMatrix3?{type:"m3",value:w.toArray()}:w&&w.isMatrix4?{type:"m4",value:w.toArray()}:{value:w}}Object.keys(this.defines).length>0&&(o.defines=this.defines),o.vertexShader=this.vertexShader,o.fragmentShader=this.fragmentShader;const m={};for(const A in this.extensions)!0===this.extensions[A]&&(m[A]=!0);return Object.keys(m).length>0&&(o.extensions=m),o}}class Uf extends Fr{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new Ti,this.projectionMatrix=new Ti,this.projectionMatrixInverse=new Ti}copy(n,o){return super.copy(n,o),this.matrixWorldInverse.copy(n.matrixWorldInverse),this.projectionMatrix.copy(n.projectionMatrix),this.projectionMatrixInverse.copy(n.projectionMatrixInverse),this}getWorldDirection(n){this.updateWorldMatrix(!0,!1);const o=this.matrixWorld.elements;return n.set(-o[8],-o[9],-o[10]).normalize()}updateMatrixWorld(n){super.updateMatrixWorld(n),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(n,o){super.updateWorldMatrix(n,o),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return(new this.constructor).copy(this)}}class $s extends Uf{constructor(n=50,o=1,m=.1,A=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=n,this.zoom=1,this.near=m,this.far=A,this.focus=10,this.aspect=o,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(n,o){return super.copy(n,o),this.fov=n.fov,this.zoom=n.zoom,this.near=n.near,this.far=n.far,this.focus=n.focus,this.aspect=n.aspect,this.view=null===n.view?null:Object.assign({},n.view),this.filmGauge=n.filmGauge,this.filmOffset=n.filmOffset,this}setFocalLength(n){const o=.5*this.getFilmHeight()/n;this.fov=2*rh*Math.atan(o),this.updateProjectionMatrix()}getFocalLength(){const n=Math.tan(.5*pc*this.fov);return.5*this.getFilmHeight()/n}getEffectiveFOV(){return 2*rh*Math.atan(Math.tan(.5*pc*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}setViewOffset(n,o,m,A,E,w){this.aspect=n/o,null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=n,this.view.fullHeight=o,this.view.offsetX=m,this.view.offsetY=A,this.view.width=E,this.view.height=w,this.updateProjectionMatrix()}clearViewOffset(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const n=this.near;let o=n*Math.tan(.5*pc*this.fov)/this.zoom,m=2*o,A=this.aspect*m,E=-.5*A;const w=this.view;if(null!==this.view&&this.view.enabled){const B=w.fullWidth,D=w.fullHeight;E+=w.offsetX*A/B,o-=w.offsetY*m/D,A*=w.width/B,m*=w.height/D}const T=this.filmOffset;0!==T&&(E+=n*T/this.getFilmWidth()),this.projectionMatrix.makePerspective(E,E+A,o,o-m,n,this.far),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(n){const o=super.toJSON(n);return o.object.fov=this.fov,o.object.zoom=this.zoom,o.object.near=this.near,o.object.far=this.far,o.object.focus=this.focus,o.object.aspect=this.aspect,null!==this.view&&(o.object.view=Object.assign({},this.view)),o.object.filmGauge=this.filmGauge,o.object.filmOffset=this.filmOffset,o}}class s_ extends Fr{constructor(n,o,m){super(),this.type="CubeCamera",this.renderTarget=m;const A=new $s(-90,1,n,o);A.layers=this.layers,A.up.set(0,1,0),A.lookAt(1,0,0),this.add(A);const E=new $s(-90,1,n,o);E.layers=this.layers,E.up.set(0,1,0),E.lookAt(-1,0,0),this.add(E);const w=new $s(-90,1,n,o);w.layers=this.layers,w.up.set(0,0,-1),w.lookAt(0,1,0),this.add(w);const T=new $s(-90,1,n,o);T.layers=this.layers,T.up.set(0,0,1),T.lookAt(0,-1,0),this.add(T);const B=new $s(-90,1,n,o);B.layers=this.layers,B.up.set(0,1,0),B.lookAt(0,0,1),this.add(B);const D=new $s(-90,1,n,o);D.layers=this.layers,D.up.set(0,1,0),D.lookAt(0,0,-1),this.add(D)}update(n,o){null===this.parent&&this.updateMatrixWorld();const m=this.renderTarget,[A,E,w,T,B,D]=this.children,N=n.getRenderTarget(),G=n.toneMapping,H=n.xr.enabled;n.toneMapping=rr,n.xr.enabled=!1;const Q=m.texture.generateMipmaps;m.texture.generateMipmaps=!1,n.setRenderTarget(m,0),n.render(o,A),n.setRenderTarget(m,1),n.render(o,E),n.setRenderTarget(m,2),n.render(o,w),n.setRenderTarget(m,3),n.render(o,T),n.setRenderTarget(m,4),n.render(o,B),m.texture.generateMipmaps=Q,n.setRenderTarget(m,5),n.render(o,D),n.setRenderTarget(N),n.toneMapping=G,n.xr.enabled=H,m.texture.needsPMREMUpdate=!0}}class zf extends va{constructor(n,o,m,A,E,w,T,B,D,N){super(n=void 0!==n?n:[],o=void 0!==o?o:ur,m,A,E,w,T,B,D,N),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(n){this.image=n}}class a_ extends Fo{constructor(n=1,o={}
vendor: 5,195 bytes, line 83
83){super(n,n,o),this.isWebGLCubeRenderTarget=!0;const m={width:n,height:n,depth:1};this.texture=new zf([m,m,m,m,m,m],o.mapping,o.wrapS,o.wrapT,o.magFilter,o.minFilter,o.format,o.type,o.anisotropy,o.encoding),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=void 0!==o.generateMipmaps&&o.generateMipmaps,this.texture.minFilter=void 0!==o.minFilter?o.minFilter:Mi}fromEquirectangularTexture(n,o){this.texture.type=o.type,this.texture.encoding=o.encoding,this.texture.generateMipmaps=o.generateMipmaps,this.texture.minFilter=o.minFilter,this.texture.magFilter=o.magFilter;const m_uniforms={tEquirect:{value:null}},m_vertexShader="\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\tvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\n\t\t\t\t\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n\n\t\t\t\t}\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvWorldDirection = transformDirection( position, modelMatrix );\n\n\t\t\t\t\t#include <begin_vertex>\n\t\t\t\t\t#include <project_vertex>\n\n\t\t\t\t}\n\t\t\t",m_fragmentShader="\n\n\t\t\t\tuniform sampler2D tEquirect;\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\t#include <common>\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvec3 direction = normalize( vWorldDirection );\n\n\t\t\t\t\tvec2 sampleUV = equirectUv( direction );\n\n\t\t\t\t\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\n\t\t\t\t}\n\t\t\t",A=new xc(5,5,5),E=new hl({name:"CubemapFromEquirect",uniforms:xu(m_uniforms),vertexShader:m_vertexShader,fragmentShader:m_fragmentShader,side:1,blending:0});E.uniforms.tEquirect.value=o;const w=new Fs(A,E),T=o.minFilter;return o.minFilter===Il&&(o.minFilter=Mi),new s_(1,10,this).update(n,w),o.minFilter=T,w.geometry.dispose(),w.material.dispose(),this}clear(n,o,m,A){const E=n.getRenderTarget();for(let w=0;w<6;w++)n.setRenderTarget(this,w),n.clear(o,m,A);n.setRenderTarget(E)}}const _g=new De,Hx=new De,Qx=new Di;class fh{constructor(n=new De(1,0,0),o=0){this.isPlane=!0,this.normal=n,this.constant=o}set(n,o){return this.normal.copy(n),this.constant=o,this}setComponents(n,o,m,A){return this.normal.set(n,o,m),this.constant=A,this}setFromNormalAndCoplanarPoint(n,o){return this.normal.copy(n),this.constant=-o.dot(this.normal),this}setFromCoplanarPoints(n,o,m){const A=_g.subVectors(m,o).cross(Hx.subVectors(n,o)).normalize();return this.setFromNormalAndCoplanarPoint(A,n),this}copy(n){return this.normal.copy(n.normal),this.constant=n.constant,this}normalize(){const n=1/this.normal.length();return this.normal.multiplyScalar(n),this.constant*=n,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(n){return this.normal.dot(n)+this.constant}distanceToSphere(n){return this.distanceToPoint(n.center)-n.radius}projectPoint(n,o){return o.copy(n).addScaledVector(this.normal,-this.distanceToPoint(n))}intersectLine(n,o){const m=n.delta(_g),A=this.normal.dot(m);if(0===A)return 0===this.distanceToPoint(n.start)?o.copy(n.start):null;const E=-(n.start.dot(this.normal)+this.constant)/A;return E<0||E>1?null:o.copy(n.start).addScaledVector(m,E)}intersectsLine(n){const o=this.distanceToPoint(n.start),m=this.distanceToPoint(n.end);return o<0&&m>0||m<0&&o>0}intersectsBox(n){return n.intersectsPlane(this)}intersectsSphere(n){return n.intersectsPlane(this)}coplanarPoint(n){return n.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(n,o){const m=o||Qx.getNormalMatrix(n),A=this.coplanarPoint(_g).applyMatrix4(n),E=this.normal.applyMatrix3(m).normalize();return this.constant=-A.dot(E),this}translate(n){return this.constant-=n.dot(this.normal),this}equals(n){return n.normal.equals(this.normal)&&n.constant===this.constant}clone(){return(new this.constructor).copy(this)}}const Yl=new Ul,Gf=new De;class bp{constructor(n=new fh,o=new fh,m=new fh,A=new fh,E=new fh,w=new fh){this.planes=[n,o,m,A,E,w]}set(n,o,m,A,E,w){const T=this.planes;return T[0].copy(n),T[1].copy(o),T[2].copy(m),T[3].copy(A),T[4].copy(E),T[5].copy(w),this}copy(n){const o=this.planes;for(let m=0;m<6;m++)o[m].copy(n.planes[m]);return this}setFromProjectionMatrix(n){const o=this.planes,m=n.elements,A=m[0],E=m[1],w=m[2],T=m[3],B=m[4],D=m[5],N=m[6],G=m[7],H=m[8],Q=m[9],Z=m[10],he=m[11],J=m[12],Y=m[13],ve=m[14],pe=m[15];return o[0].setComponents(T-A,G-B,he-H,pe-J).normalize(),o[1].setComponents(T+A,G+B,he+H,pe+J).normalize(),o[2].setComponents(T+E,G+D,he+Q,pe+Y).normalize(),o[3].setComponents(T-E,G-D,he-Q,pe-Y).normalize(),o[4].setComponents(T-w,G-N,he-Z,pe-ve).normalize(),o[5].setComponents(T+w,G+N,he+Z,pe+ve).normalize(),this}intersectsObject(n){if(void 0!==n.boundingSphere)null===n.boundingSphere&&n.computeBoundingSphere(),Yl.copy(n.boundingSphere).applyMatrix4(n.matrixWorld);else{const o=n.geometry;null===o.boundingSphere&&o.computeBoundingSphere(),Yl.copy(o.boundingSphere).applyMatrix4(n.matrixWorld)}return this.intersectsSphere(Yl)}intersectsSprite(n){return Yl.center.set(0,0,0),Yl.radius=.7071067811865476,Yl.applyMatrix4(n.matrixWorld),this.intersectsSphere(Yl)}intersectsSphere(n){const o=this.planes,m=n.center,A=-n.radius;for(let E=0;E<6;E++)if(o[E].distanceToPoint(m)<A)return!1;return!0}intersectsBox(n){const o=this.planes;for(let m=0;m<6;m++){const A=o[m];if(Gf.x=A.normal.x>
830?n.max.x:n.min.x,Gf.y=A.normal.y>0?n.max.y:n.min.y,Gf.z=A.normal.z>0?n.max.z:n.min.z,A.distanceToPoint(Gf)<0)return!1}return!0}containsPoint(n){const o=this.planes;for(let m=0;m<6;m++)if(o[m].distanceToPoint(n)<0)return!1;return!0}clone(){return(new this.constructor).copy(this)}}function Ec(){let b=null,n=!1,o=null,m=null;function A(E,w){o(E,w),m=b.requestAnimationFrame(A)}return{start:function(){!0!==n&&null!==o&&(m=b.requestAnimationFrame(A),n=!0)},stop:function(){b.cancelAnimationFrame(m),n=!1},setAnimationLoop:function(E){o=E},setContext:function(E){b=E}}}function Sp(b,n){const o=n.isWebGL2,m=new WeakMap;return{get:function w(D){return D.isInterleavedBufferAttribute&&(D=D.data),m.get(D)},remove:function T(D){D.isInterleavedBufferAttribute&&(D=D.data);const N=m.get(D);N&&(b.deleteBuffer(N.buffer),m.delete(D))},update:function B(D,N){if(D.isGLBufferAttribute){const H=m.get(D);return void((!H||H.version<D.version)&&m.set(D,{buffer:D.buffer,type:D.type,bytesPerElement:D.elementSize,version:D.version}))}D.isInterleavedBufferAttribute&&(D=D.data);const G=m.get(D);void 0===G?m.set(D,function A(D,N){const G=D.array,H=D.usage,Q=b.createBuffer();let Z;if(b.bindBuffer(N,Q),b.bufferData(N,G,H),D.onUploadCallback(),G instanceof Float32Array)Z=b.FLOAT;else if(G instanceof Uint16Array)if(D.isFloat16BufferAttribute){if(!o)throw new Error("THREE.WebGLAttributes: Usage of Float16BufferAttribute requires WebGL2.");Z=b.HALF_FLOAT}else Z=b.UNSIGNED_SHORT;else if(G instanceof Int16Array)Z=b.SHORT;else if(G instanceof Uint32Array)Z=b.UNSIGNED_INT;else if(G instanceof Int32Array)Z=b.INT;else if(G instanceof Int8Array)Z=b.BYTE;else if(G instanceof Uint8Array)Z=b.UNSIGNED_BYTE;else{if(!(G instanceof Uint8ClampedArray))throw new Error("THREE.WebGLAttributes: Unsupported buffer data format: "+G);Z=b.UNSIGNED_BYTE}return{buffer:Q,type:Z,bytesPerElement:G.BYTES_PER_ELEMENT,version:D.version}}(D,N)):G.version<D.version&&(function E(D,N,G){const H=N.array,Q=N.updateRange;b.bindBuffer(G,D),-1===Q.count?b.bufferSubData(G,0,H):(o?b.bufferSubData(G,Q.offset*H.BYTES_PER_ELEMENT,H,Q.offset,Q.count):b.bufferSubData(G,Q.offset*H.BYTES_PER_ELEMENT,H.subarray(Q.offset,Q.offset+Q.count)),Q.count=-1),N.onUploadCallback()}(G.buffer,D,N),G.version=D.version)}}}class bc extends Fi{constructor(n=1,o=1,m=1,A=1){super(),this.type="PlaneGeometry",this.parameters={width:n,height:o,widthSegments:m,heightSegments:A};const E=n/2,w=o/2,T=Math.floor(m),B=Math.floor(A),D=T+1,N=B+1,G=n/T,H=o/B,Q=[],Z=[],he=[],J=[];for(let Y=0;Y<N;Y++){const ve=Y*H-w;for(let pe=0;pe<D;pe++)Z.push(pe*G-E,-ve,0),he.push(0,0,1),J.push(pe/T),J.push(1-Y/B)}for(let Y=0;Y<B;Y++)for(let ve=0;ve<T;ve++){const Ae=ve+D*(Y+1),Ie=ve+1+D*(Y+1),Ne=ve+1+D*Y;Q.push(ve+D*Y,Ae,Ne),Q.push(Ae,Ie,Ne)}this.setIndex(Q),this.setAttribute("position",new zn(Z,3)),this.setAttribute("normal",new zn(he,3)),this.setAttribute("uv",new zn(J,2))}copy(n){return super.copy(n),this.parameters=Object.assign({},n.parameters),this}static fromJSON(n){return new bc(n.width,n.height,n.widthSegments,n.heightSegments)}}const bi={alphamap_fragment:"#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, vAlphaMapUv ).g;\n#endif",alphamap_pars_fragment:"#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif",alphatest_fragment:"#ifdef USE_ALPHATEST\n\tif ( diffuseColor.a < alphaTest ) discard;\n#endif",alphatest_pars_fragment:"#ifdef USE_ALPHATEST\n\tuniform float alphaTest;\n#endif",aomap_fragment:"#ifdef USE_AOMAP\n\tfloat ambientOcclusion = ( texture2D( aoMap, vAoMapUv ).r - 1.0 ) * aoMapIntensity + 1.0;\n\treflectedLight.indirectDiffuse *= ambientOcclusion;\n\t#if defined( USE_ENVMAP ) && defined( STANDARD )\n\t\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\t\treflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.roughness );\n\t#endif\n#endif",aomap_pars_fragment:"#ifdef USE_AOMAP\n\tuniform sampler2D aoMap;\n\tuniform float aoMapIntensity;\n#endif",begin_vertex:"vec3 transformed = vec3( position );",beginnormal_vertex:"vec3 objectNormal = vec3( normal );\n#ifdef USE_TANGENT\n\tvec3 objectTangent = vec3( tangent.xyz );\n#endif",bsdfs:"float G_BlinnPhong_Implicit( ) {\n\treturn 0.25;\n}\nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {\n\treturn RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );\n}\nvec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float shininess ) {\n\tvec3 halfDir = normalize( lightDir + viewDir );
83\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, 1.0, dotVH );\n\tfloat G = G_BlinnPhong_Implicit( );\n\tfloat D = D_BlinnPhong( shininess, dotNH );\n\treturn F * ( G * D );\n} // validated",iridescence_fragment:"#ifdef USE_IRIDESCENCE\n\tconst mat3 XYZ_TO_REC709 = mat3(\n\t\t 3.2404542, -0.9692660,  0.0556434,\n\t\t-1.5371385,  1.8760108, -0.2040259,\n\t\t-0.4985314,  0.0415560,  1.0572252\n\t);\n\tvec3 Fresnel0ToIor( vec3 fresnel0 ) {\n\t\tvec3 sqrtF0 = sqrt( fresnel0 );\n\t\treturn ( vec3( 1.0 ) + sqrtF0 ) / ( vec3( 1.0 ) - sqrtF0 );\n\t}\n\tvec3 IorToFresnel0( vec3 transmittedIor, float incidentIor ) {\n\t\treturn pow2( ( transmittedIor - vec3( incidentIor ) ) / ( transmittedIor + vec3( incidentIor ) ) );\n\t}\n\tfloat IorToFresnel0( float transmittedIor, float incidentIor ) {\n\t\treturn pow2( ( transmittedIor - incidentIor ) / ( transmittedIor + incidentIor ));\n\t}\n\tvec3 evalSensitivity( float OPD, vec3 shift ) {\n\t\tfloat phase = 2.0 * PI * OPD * 1.0e-9;\n\t\tvec3 val = vec3( 5.4856e-13, 4.4201e-13, 5.2481e-13 );\n\t\tvec3 pos = vec3( 1.6810e+06, 1.7953e+06, 2.2084e+06 );\n\t\tvec3 var = vec3( 4.3278e+09, 9.3046e+09, 6.6121e+09 );\n\t\tvec3 xyz = val * sqrt( 2.0 * PI * var ) * cos( pos * phase + shift ) * exp( - pow2( phase ) * var );\n\t\txyz.x += 9.7470e-14 * sqrt( 2.0 * PI * 4.5282e+09 ) * cos( 2.2399e+06 * phase + shift[ 0 ] ) * exp( - 4.5282e+09 * pow2( phase ) );\n\t\txyz /= 1.0685e-7;\n\t\tvec3 rgb = XYZ_TO_REC709 * xyz;\n\t\treturn rgb;\n\t}\n\tvec3 evalIridescence( float outsideIOR, float eta2, float cosTheta1, float thinFilmThickness, vec3 baseF0 ) {\n\t\tvec3 I;\n\t\tfloat iridescenceIOR = mix( outsideIOR, eta2, smoothstep( 0.0, 0.03, thinFilmThickness ) );\n\t\tfloat sinTheta2Sq = pow2( outsideIOR / iridescenceIOR ) * ( 1.0 - pow2( cosTheta1 ) );\n\t\tfloat cosTheta2Sq = 1.0 - sinTheta2Sq;\n\t\tif ( cosTheta2Sq < 0.0 ) {\n\t\t\t return vec3( 1.0 );\n\t\t}\n\t\tfloat cosTheta2 = sqrt( cosTheta2Sq );\n\t\tfloat R0 = IorToFresnel0( iridescenceIOR, outsideIOR );\n\t\tfloat R12 = F_Schlick( R0, 1.0, cosTheta1 );\n\t\tfloat R21 = R12;\n\t\tfloat T121 = 1.0 - R12;\n\t\tfloat phi12 = 0.0;\n\t\tif ( iridescenceIOR < outsideIOR ) phi12 = PI;\n\t\tfloat phi21 = PI - phi12;\n\t\tvec3 baseIOR = Fresnel0ToIor( clamp( baseF0, 0.0, 0.9999 ) );\t\tvec3 R1 = IorToFresnel0( baseIOR, iridescenceIOR );
83\n\t\tvec3 R23 = F_Schlick( R1, 1.0, cosTheta2 );\n\t\tvec3 phi23 = vec3( 0.0 );\n\t\tif ( baseIOR[ 0 ] < iridescenceIOR ) phi23[ 0 ] = PI;\n\t\tif ( baseIOR[ 1 ] < iridescenceIOR ) phi23[ 1 ] = PI;\n\t\tif ( baseIOR[ 2 ] < iridescenceIOR ) phi23[ 2 ] = PI;\n\t\tfloat OPD = 2.0 * iridescenceIOR * thinFilmThickness * cosTheta2;\n\t\tvec3 phi = vec3( phi21 ) + phi23;\n\t\tvec3 R123 = clamp( R12 * R23, 1e-5, 0.9999 );\n\t\tvec3 r123 = sqrt( R123 );\n\t\tvec3 Rs = pow2( T121 ) * R23 / ( vec3( 1.0 ) - R123 );\n\t\tvec3 C0 = R12 + Rs;\n\t\tI = C0;\n\t\tvec3 Cm = Rs - T121;\n\t\tfor ( int m = 1; m <= 2; ++ m ) {\n\t\t\tCm *= r123;\n\t\t\tvec3 Sm = 2.0 * evalSensitivity( float( m ) * OPD, float( m ) * phi );\n\t\t\tI += Cm * Sm;\n\t\t}\n\t\treturn max( I, vec3( 0.0 ) );\n\t}\n#endif",bumpmap_pars_fragment:"#ifdef USE_BUMPMAP\n\tuniform sampler2D bumpMap;\n\tuniform float bumpScale;\n\tvec2 dHdxy_fwd() {\n\t\tvec2 dSTdx = dFdx( vBumpMapUv );\n\t\tvec2 dSTdy = dFdy( vBumpMapUv );\n\t\tfloat Hll = bumpScale * texture2D( bumpMap, vBumpMapUv ).x;\n\t\tfloat dBx = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdx ).x - Hll;\n\t\tfloat dBy = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdy ).x - Hll;\n\t\treturn vec2( dBx, dBy );\n\t}\n\tvec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy, float faceDirection ) {\n\t\tvec3 vSigmaX = dFdx( surf_pos.xyz );\n\t\tvec3 vSigmaY = dFdy( surf_pos.xyz );\n\t\tvec3 vN = surf_norm;\n\t\tvec3 R1 = cross( vSigmaY, vN );\n\t\tvec3 R2 = cross( vN, vSigmaX );\n\t\tfloat fDet = dot( vSigmaX, R1 ) * faceDirection;\n\t\tvec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\n\t\treturn normalize( abs( fDet ) * surf_norm - vGrad );\n\t}\n#endif",clipping_planes_fragment:"#if NUM_CLIPPING_PLANES > 0\n\tvec4 plane;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n\t\tplane = clippingPlanes[ i ];\n\t\tif ( dot( vClipPosition, plane.xyz ) > plane.w ) discard;\n\t}\n\t#pragma unroll_loop_end\n\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\t\tbool clipped = true;\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n\t\t\tplane = clippingPlanes[ i ];\n\t\t\tclipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t\tif ( clipped ) discard;\n\t#endif\n#endif",clipping_planes_pars_fragment:"#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\n#endif",clipping_planes_pars_vertex:"#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n#endif",clipping_planes_vertex:"#if NUM_CLIPPING_PLANES > 0\n\tvClipPosition = - mvPosition.xyz;\n#endif",color_fragment:"#if defined( USE_COLOR_ALPHA )\n\tdiffuseColor *= vColor;\n#elif defined( USE_COLOR )\n\tdiffuseColor.rgb *= vColor;\n#endif",color_pars_fragment:"#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR )\n\tvarying vec3 vColor;\n#endif",color_pars_vertex:"#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n\tvarying vec3 vColor;\n#endif",color_vertex:"#if defined( USE_COLOR_ALPHA )\n\tvColor = vec4( 1.0 );\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n\tvColor = vec3( 1.0 );\n#endif\n#ifdef USE_COLOR\n\tvColor *= color;\n#endif\n#ifdef USE_INSTANCING_COLOR\n\tvColor.xyz *= instanceColor.xyz;\n#endif",common:"#define PI 3.141592653589793\n#define PI2 6.283185307179586\n#define PI_HALF 1.5707963267948966\n#define RECIPROCAL_PI 0.3183098861837907\n#define RECIPROCAL_PI2 0.15915494309189535\n#define EPSILON 1e-6\n#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\n#define whiteComplement( a ) ( 1.0 - saturate( a ) )\nfloat pow2( const in float x ) { return x*x; }\nvec3 pow2( const in vec3 x ) { return x*x; }\nfloat pow3( const in float x ) { return x*x*x; }\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\nfloat max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); }\nfloat average( const in vec3 v ) { return dot( v, vec3( 0.3333333 ) ); }\nhighp float rand( const in vec2 uv ) {\n\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\n\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\n\treturn fract( sin( sn ) * c );\n}\n#ifdef HIGH_PRECISION\n\tfloat precisionSafeLength( vec3 v ) { return length( v ); }\n#else\n\tfloat precisionSafeLength( vec3 v ) {\n\t\tfloat maxComponent = max3( abs( v ) );\n\t\treturn length( v / maxComponent ) * maxComponent;\n\t}\n#endif\nstruct IncidentLight {\n\tvec3 color;\n\tvec3 direction;\n\tbool visible;\n};\nstruct ReflectedLight {\n\tvec3 directDiffuse;\n\tvec3 directSpecular;\n\tvec3 indirectDiffuse;\n\tvec3 indirectSpecular;\n};\nstruct GeometricContext {\n\tvec3 position;\n\tvec3 normal;\n\tvec3 viewDir;\n#ifdef USE_CLEARCOAT\n\tvec3 clearcoatNormal;\n#endif\n};\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n}\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\n}\nmat3 transposeMat3( const in mat3 m ) {\n\tmat3 tmp;\n\ttmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\n\ttmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\n\ttmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\n\treturn tmp;\n}\nfloat luminance( const in vec3 rgb ) {\n\tconst vec3 weights = vec3( 0.2126729, 0.7151522, 0.0721750 );\n\treturn dot( weights, rgb );\n}\nbool isPerspectiveMatrix( mat4 m ) {\n\treturn m[ 2 ][ 3 ] == - 1.0;\n}\nvec2 equirectUv( in vec3 dir ) {\n\tfloat u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5;\n\tfloat v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\treturn vec2( u, v );\n}\nvec3 BRDF_Lambert( const in vec3 diffuseColor ) {\n\treturn RECIPROCAL_PI * diffuseColor;\n}\nvec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) {\n\tfloat fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n\treturn f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n}\nfloat F_Schlick( const in float f0, const in float f90, const in float dotVH ) {\n\tfloat fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n\treturn f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n} // validated",cube_uv_reflection_fragment:"#ifdef ENVMAP_TYPE_CUBE_UV\n\t#define cubeUV_minMipLevel 4.0\n\t#define cubeUV_minTileSize 16.0\n\tfloat getFace( vec3 direction ) {\n\t\tvec3 absDirection = abs( direction );\n\t\tfloat face = - 1.0;\n\t\tif ( absDirection.x > absDirection.z ) {\n\t\t\tif ( absDirection.x > absDirection.y )\n\t\t\t\tface = direction.x > 0.0 ? 0.0 : 3.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t} else {\n\t\t\tif ( absDirection.z > absDirection.y )\n\t\t\t\tface = direction.z > 0.0 ? 2.0 : 5.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t}\n\t\treturn face;\n\t}\n\tvec2 getUV( vec3 direction, float face ) {\n\t\tvec2 uv;\n\t\tif ( face == 0.0 ) {\n\t\t\tuv = vec2( direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 1.0 ) {\n\t\t\tuv = vec2( - direction.x, - direction.z ) / abs( direction.y );\n\t\t} else if ( face == 2.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.y ) / abs( direction.z );\n\t\t} else if ( face == 3.0 ) {\n\t\t\tuv = vec2( - direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 4.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.z ) / abs( direction.y );\n\t\t} else {\n\t\t\tuv = vec2( direction.x, direction.y ) / abs( direction.z );\n\t\t}\n\t\treturn 0.5 * ( uv + 1.0 );\n\t}\n\tvec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) {\n\t\tfloat face = getFace( direction );\n\t\tfloat filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );\n\t\tmipInt = max( mipInt, cubeUV_minMipLevel );\n\t\tfloat faceSize = exp2( mipInt );\n\t\thighp vec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0;\n\t\tif ( face > 2.0 ) {\n\t\t\tuv.y += faceSize;\n\t\t\tface -= 3.0;\n\t\t}\n\t\tuv.x += face * faceSize;\n\t\tuv.x += filterInt * 3.0 * cubeUV_minTileSize;\n\t\tuv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize );\n\t\tuv.x *= CUBEUV_TEXEL_WIDTH;\n\t\tuv.y *= CUBEUV_TEXEL_HEIGHT;\n\t\t#ifdef texture2DGradEXT\n\t\t\treturn texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb;\n\t\t#else\n\t\t\treturn texture2D( envMap, uv ).rgb;\n\t\t#endif\n\t}\n\t#define cubeUV_r0 1.0\n\t#define cubeUV_v0 0.339\n\t#define cubeUV_m0 - 2.0\n\t#define cubeUV_r1 0.8\n\t#define cubeUV_v1 0.276\n\t#define cubeUV_m1 - 1.0\n\t#define cubeUV_r4 0.4\n\t#define cubeUV_v4 0.046\n\t#define cubeUV_m4 2.0\n\t#define cubeUV_r5 0.305\n\t#define cubeUV_v5 0.016\n\t#define cubeUV_m5 3.0\n\t#define cubeUV_r6 0.21\n\t#define cubeUV_v6 0.0038\n\t#define cubeUV_m6 4.0\n\tfloat roughnessToMip( float roughness ) {\n\t\tfloat mip = 0.0;\n\t\tif ( roughness >= cubeUV_r1 ) {\n\t\t\tmip = ( cubeUV_r0 - roughness ) * ( cubeUV_m1 - cubeUV_m0 ) / ( cubeUV_r0 - cubeUV_r1 ) + cubeUV_m0;\n\t\t} else if ( roughness >= cubeUV_r4 ) {\n\t\t\tmip = ( cubeUV_r1 - roughness ) * ( cubeUV_m4 - cubeUV_m1 ) / ( cubeUV_r1 - cubeUV_r4 ) + cubeUV_m1;\n\t\t} else if ( roughness >= cubeUV_r5 ) {\n\t\t\tmip = ( cubeUV_r4 - roughness ) * ( cubeUV_m5 - cubeUV_m4 ) / ( cubeUV_r4 - cubeUV_r5 ) + cubeUV_m4;\n\t\t} else if ( roughness >= cubeUV_r6 ) {\n\t\t\tmip = ( cubeUV_r5 - roughness ) * ( cubeUV_m6 - cubeUV_m5 ) / ( cubeUV_r5 - cubeUV_r6 ) + cubeUV_m5;\n\t\t} else {\n\t\t\tmip = - 2.0 * log2( 1.16 * roughness );\t\t}\n\t\treturn mip;\n\t}\n\tvec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) {\n\t\tfloat mip = clamp( roughnessToMip( roughness ), cubeUV_m0, CUBEUV_MAX_MIP );\n\t\tfloat mipF = fract( mip );\n\t\tfloat mipInt = floor( mip );\n\t\tvec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt );\n\t\tif ( mipF == 0.0 ) {\n\t\t\treturn vec4( color0, 1.0 );\n\t\t} else {\n\t\t\tvec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 );\n\t\t\treturn vec4( mix( color0, color1, mipF ), 1.0 );\n\t\t}\n\t}\n#endif",defaultnormal_vertex:"vec3 transformedNormal = objectNormal;\n#ifdef USE_INSTANCING\n\tmat3 m = mat3( instanceMatrix );\n\ttransformedNormal /= vec3( dot( m[ 0 ], m[ 0 ] ), dot( m[ 1 ], m[ 1 ] ), dot( m[ 2 ], m[ 2 ] ) );\n\ttransformedNormal = m * transformedNormal;\n#endif\ntransformedNormal = normalMatrix * transformedNormal;\n#ifdef FLIP_SIDED\n\ttransformedNormal = - transformedNormal;\n#endif\n#ifdef USE_TANGENT\n\tvec3 transformedTangent = ( modelViewMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\t#ifdef FLIP_SIDED\n\t\ttransformedTangent = - transformedTangent;\n\t#endif\n#endif",displacementmap_pars_vertex:"#ifdef USE_DISPLACEMENTMAP\n\tuniform sampler2D displacementMap;\n\tuniform float displacementScale;\n\tuniform float displacementBias;\n#endif",displacementmap_vertex:"#ifdef USE_DISPLACEMENTMAP\n\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, vDisplacementMapUv ).x * displacementScale + dis
83placementBias );\n#endif",emissivemap_fragment:"#ifdef USE_EMISSIVEMAP\n\tvec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv );\n\ttotalEmissiveRadiance *= emissiveColor.rgb;\n#endif",emissivemap_pars_fragment:"#ifdef USE_EMISSIVEMAP\n\tuniform sampler2D emissiveMap;\n#endif",encodings_fragment:"gl_FragColor = linearToOutputTexel( gl_FragColor );",encodings_pars_fragment:"vec4 LinearToLinear( in vec4 value ) {\n\treturn value;\n}\nvec4 LinearTosRGB( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a );\n}",envmap_fragment:"#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvec3 cameraToFrag;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToFrag = normalize( vWorldPosition - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( cameraToFrag, worldNormal );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio );\n\t\t#endif\n\t#else\n\t\tvec3 reflectVec = vReflect;\n\t#endif\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\n\t#else\n\t\tvec4 envColor = vec4( 0.0 );\n\t#endif\n\t#ifdef ENVMAP_BLENDING_MULTIPLY\n\t\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_MIX )\n\t\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_ADD )\n\t\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\n\t#endif\n#endif",envmap_common_pars_fragment:"#ifdef USE_ENVMAP\n\tuniform float envMapIntensity;\n\tuniform float flipEnvMap;\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tuniform samplerCube envMap;\n\t#else\n\t\tuniform sampler2D envMap;\n\t#endif\n\t\n#endif",envmap_pars_fragment:"#ifdef USE_ENVMAP\n\tuniform float reflectivity;\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\tvarying vec3 vWorldPosition;\n\t\tuniform float refractionRatio;\n\t#else\n\t\tvarying vec3 vReflect;\n\t#endif\n#endif",envmap_pars_vertex:"#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\t\n\t\tvarying vec3 vWorldPosition;\n\t#else\n\t\tvarying vec3 vReflect;\n\t\tuniform float refractionRatio;\n\t#endif\n#endif",envmap_physical_pars_fragment:"#if defined( USE_ENVMAP )\n\tvec3 getIBLIrradiance( const in vec3 normal ) {\n\t\t#if defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, worldNormal, 1.0 );\n\t\t\treturn PI * envMapColor.rgb * envMapIntensity;\n\t\t#else\n\t\t\treturn vec3( 0.0 );\n\t\t#endif\n\t}\n\tvec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) {\n\t\t#if defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec3 reflectVec = reflect( - viewDir, normal );\n\t\t\treflectVec = normalize( mix( reflectVec, normal, roughness * roughness) );\n\t\t\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, reflectVec, roughness );\n\t\t\treturn envMapColor.rgb * envMapIntensity;\n\t\t#else\n\t\t\treturn vec3( 0.0 );\n\t\t#endif\n\t}\n#endif",envmap_vertex:"#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvWorldPosition = worldPosition.xyz;\n\t#else\n\t\tvec3 cameraToVertex;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t}
83 else {\n\t\t\tcameraToVertex = normalize( worldPosition.xyz - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvReflect = reflect( cameraToVertex, worldNormal );\n\t\t#else\n\t\t\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\n\t\t#endif\n\t#endif\n#endif",fog_vertex:"#ifdef USE_FOG\n\tvFogDepth = - mvPosition.z;\n#endif",fog_pars_vertex:"#ifdef USE_FOG\n\tvarying float vFogDepth;\n#endif",fog_fragment:"#ifdef USE_FOG\n\t#ifdef FOG_EXP2\n\t\tfloat fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth );\n\t#else\n\t\tfloat fogFactor = smoothstep( fogNear, fogFar, vFogDepth );\n\t#endif\n\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\n#endif",fog_pars_fragment:"#ifdef USE_FOG\n\tuniform vec3 fogColor;\n\tvarying float vFogDepth;\n\t#ifdef FOG_EXP2\n\t\tuniform float fogDensity;\n\t#else\n\t\tuniform float fogNear;\n\t\tuniform float fogFar;\n\t#endif\n#endif",gradientmap_pars_fragment:"#ifdef USE_GRADIENTMAP\n\tuniform sampler2D gradientMap;\n#endif\nvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\n\tfloat dotNL = dot( normal, lightDirection );\n\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\n\t#ifdef USE_GRADIENTMAP\n\t\treturn vec3( texture2D( gradientMap, coord ).r );\n\t#else\n\t\tvec2 fw = fwidth( coord ) * 0.5;\n\t\treturn mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) );\n\t#endif\n}",lightmap_fragment:"#ifdef USE_LIGHTMAP\n\tvec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\n\tvec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;\n\treflectedLight.indirectDiffuse += lightMapIrradiance;\n#endif",lightmap_pars_fragment:"#ifdef USE_LIGHTMAP\n\tuniform sampler2D lightMap;\n\tuniform float lightMapIntensity;\n#endif",lights_lambert_fragment:"LambertMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularStrength = specularStrength;",lights_lambert_pars_fragment:"varying vec3 vViewPosition;\nstruct LambertMaterial {\n\tvec3 diffuseColor;\n\tfloat specularStrength;\n};\nvoid RE_Direct_Lambert( const in IncidentLight directLight, const in GeometricContext geometry, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Lambert( const in vec3 irradiance, const in GeometricContext geometry, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Lambert\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Lambert",lights_pars_begin:"uniform bool receiveShadow;\nuniform vec3 ambientLightColor;\nuniform vec3 lightProbe[ 9 ];\nvec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {\n\tfloat x = normal.x, y = normal.y, z = normal.z;\n\tvec3 result = shCoefficients[ 0 ] * 0.886227;\n\tresult += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;\n\tresult += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;\n\tresult += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;\n\tresult += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;\n\tresult += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;\n\tresult += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );\n\tresult += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;\n\tresult += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );\n\treturn result;\n}\nvec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in vec3 normal ) {\n\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\tvec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe );\n\treturn irradiance;\n}\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\n\tvec3 irradiance = ambientLightColor;\n\treturn irradiance;\n}\nfloat getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\n\t#if defined ( LEGACY_LIGHTS )\n\t\tif ( cutoffDistance > 0.0 && decayExponent > 0.0 ) {\n\t\t\treturn pow( saturate( - lightDistance / cutoffDistance + 1.0 ), decayExponent );\n\t\t}\n\t\treturn 1.0;\n\t#else\n\t\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\t\tif ( cutoffDistance > 0.0 ) {\n\t\t\tdistanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t\t}\n\t\treturn distanceFalloff;\n\t#endif\n}\nfloat getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) {\n\treturn smoothstep( coneCosine, penumbraCosine, angleCosine );\n}\n#if NUM_DIR_LIGHTS > 0\n\tstruct DirectionalLight {\n\t\tvec3 direction;\n\t\tvec3 color;\n\t};\n\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\n\tvoid getDirectionalLightInfo( const in DirectionalLight directionalLight, const in GeometricContext geometry, out IncidentLight light ) {\n\t\tlight.color = directionalLight.color;\n\t\tlight.direction = directionalLight.direction;\n\t\tlight.visible = true;\n\t}\n#endif\n#if NUM_POINT_LIGHTS > 0\n\tstruct PointLight {\n\t\tvec3 position;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t};\n\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\n\tvoid getPointLightInfo( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight light ) {\n\t\tvec3 lVector = pointLight.position - geometry.position;\n\t\tlight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tlight.color = pointLight.color;\n\t\tlight.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay );\n\t\tlight.visible = ( light.color != vec3( 0.0 ) );\n\t}
83\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\tstruct SpotLight {\n\t\tvec3 position;\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t\tfloat coneCos;\n\t\tfloat penumbraCos;\n\t};\n\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\n\tvoid getSpotLightInfo( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight light ) {\n\t\tvec3 lVector = spotLight.position - geometry.position;\n\t\tlight.direction = normalize( lVector );\n\t\tfloat angleCos = dot( light.direction, spotLight.direction );\n\t\tfloat spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n\t\tif ( spotAttenuation > 0.0 ) {\n\t\t\tfloat lightDistance = length( lVector );\n\t\t\tlight.color = spotLight.color * spotAttenuation;\n\t\t\tlight.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay );\n\t\t\tlight.visible = ( light.color != vec3( 0.0 ) );\n\t\t} else {\n\t\t\tlight.color = vec3( 0.0 );\n\t\t\tlight.visible = false;\n\t\t}\n\t}\n#endif\n#if NUM_RECT_AREA_LIGHTS > 0\n\tstruct RectAreaLight {\n\t\tvec3 color;\n\t\tvec3 position;\n\t\tvec3 halfWidth;\n\t\tvec3 halfHeight;\n\t};\n\tuniform sampler2D ltc_1;\tuniform sampler2D ltc_2;\n\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\tstruct HemisphereLight {\n\t\tvec3 direction;\n\t\tvec3 skyColor;\n\t\tvec3 groundColor;\n\t};\n\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\n\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in vec3 normal ) {\n\t\tfloat dotNL = dot( normal, hemiLight.direction );\n\t\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n\t\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n\t\treturn irradiance;\n\t}\n#endif",lights_toon_fragment:"ToonMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;",lights_toon_pars_fragment:"varying vec3 vViewPosition;\nstruct ToonMaterial {\n\tvec3 diffuseColor;\n};\nvoid RE_Direct_Toon( const in IncidentLight directLight, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\tvec3 irradiance = getGradientIrradiance( geometry.normal, directLight.direction ) * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Toon\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Toon",lights_phong_fragment:"BlinnPhongMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularColor = specular;\nmaterial.specularShininess = shininess;\nmaterial.specularStrength = specularStrength;",lights_phong_pars_fragment:"varying vec3 vViewPosition;\nstruct BlinnPhongMaterial {\n\tvec3 diffuseColor;\n\tvec3 specularColor;\n\tfloat specularShininess;\n\tfloat specularStrength;\n};\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n\treflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometry.viewDir, geometry.normal, material.specularColor, material.specularShininess ) * material.specularStrength;\n}\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_BlinnPhong\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_BlinnPhong",lights_physical_fragment:"PhysicalMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\nvec3 dxy = max( abs( dFdx( geometryNormal ) ), abs( dFdy( geometryNormal ) ) );\nfloat geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );\nmaterial.roughness = max( roughnessFactor, 0.0525 );material.roughness += geometryRoughness;\nmaterial.roughness = min( material.roughness, 1.0 );\n#ifdef IOR\n\tmaterial.ior = ior;\n\t#ifdef USE_SPECULAR\n\t\tfloat specularIntensityFactor = specularIntensity;\n\t\tvec3 specularColorFactor = specularColor;\n\t\t#ifdef USE_SPECULAR_COLORMAP\n\t\t\tspecularColorFactor *= texture2D( specularColorMap, vSpecularColorMapUv ).rgb;\n\t\t#endif\n\t\t#ifdef USE_SPECULAR_INTENSITYMAP\n\t\t\tspecularIntensityFactor *= texture2D( specularIntensityMap, vSpecularIntensityMapUv ).a;\n\t\t#endif\n\t\tmaterial.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor );\n\t#else\n\t\tfloat specularIntensityFactor = 1.0;\n\t\tvec3 specularColorFactor = vec3( 1.0 );\n\t\tmaterial.specularF90 = 1.0;\n\t#endif\n\tmaterial.specularColor = mix( min( pow2( ( material.ior - 1.0 ) / ( material.ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor, diffuseColor.rgb, metalnessFactor );\n#else\n\tmaterial.specularColor = mix( vec3( 0.04 ), diffuseColor.rgb, metalnessFactor );\n\tmaterial.specularF90 = 1.0;\n#endif\n#ifdef USE_CLEARCOAT\n\tmaterial.clearcoat = clearcoat;
83\n\tmaterial.clearcoatRoughness = clearcoatRoughness;\n\tmaterial.clearcoatF0 = vec3( 0.04 );\n\tmaterial.clearcoatF90 = 1.0;\n\t#ifdef USE_CLEARCOATMAP\n\t\tmaterial.clearcoat *= texture2D( clearcoatMap, vClearcoatMapUv ).x;\n\t#endif\n\t#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\t\tmaterial.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vClearcoatRoughnessMapUv ).y;\n\t#endif\n\tmaterial.clearcoat = saturate( material.clearcoat );\tmaterial.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 );\n\tmaterial.clearcoatRoughness += geometryRoughness;\n\tmaterial.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 );\n#endif\n#ifdef USE_IRIDESCENCE\n\tmaterial.iridescence = iridescence;\n\tmaterial.iridescenceIOR = iridescenceIOR;\n\t#ifdef USE_IRIDESCENCEMAP\n\t\tmaterial.iridescence *= texture2D( iridescenceMap, vIridescenceMapUv ).r;\n\t#endif\n\t#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\t\tmaterial.iridescenceThickness = (iridescenceThicknessMaximum - iridescenceThicknessMinimum) * texture2D( iridescenceThicknessMap, vIridescenceThicknessMapUv ).g + iridescenceThicknessMinimum;\n\t#else\n\t\tmaterial.iridescenceThickness = iridescenceThicknessMaximum;\n\t#endif\n#endif\n#ifdef USE_SHEEN\n\tmaterial.sheenColor = sheenColor;\n\t#ifdef USE_SHEEN_COLORMAP\n\t\tmaterial.sheenColor *= texture2D( sheenColorMap, vSheenColorMapUv ).rgb;\n\t#endif\n\tmaterial.sheenRoughness = clamp( sheenRoughness, 0.07, 1.0 );\n\t#ifdef USE_SHEEN_ROUGHNESSMAP\n\t\tmaterial.sheenRoughness *= texture2D( sheenRoughnessMap, vSheenRoughnessMapUv ).a;\n\t#endif\n#endif",lights_physical_pars_fragment:"struct PhysicalMaterial {\n\tvec3 diffuseColor;\n\tfloat roughness;\n\tvec3 specularColor;\n\tfloat specularF90;\n\t#ifdef USE_CLEARCOAT\n\t\tfloat clearcoat;\n\t\tfloat clearcoatRoughness;\n\t\tvec3 clearcoatF0;\n\t\tfloat clearcoatF90;\n\t#endif\n\t#ifdef USE_IRIDESCENCE\n\t\tfloat iridescence;\n\t\tfloat iridescenceIOR;\n\t\tfloat iridescenceThickness;\n\t\tvec3 iridescenceFresnel;\n\t\tvec3 iridescenceF0;\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tvec3 sheenColor;\n\t\tfloat sheenRoughness;\n\t#endif\n\t#ifdef IOR\n\t\tfloat ior;\n\t#endif\n\t#ifdef USE_TRANSMISSION\n\t\tfloat transmission;\n\t\tfloat transmissionAlpha;\n\t\tfloat thickness;\n\t\tfloat attenuationDistance;\n\t\tvec3 attenuationColor;\n\t#endif\n};\nvec3 clearcoatSpecular = vec3( 0.0 );\nvec3 sheenSpecular = vec3( 0.0 );\nvec3 Schlick_to_F0( const in vec3 f, const in float f90, const in float dotVH ) {\n    float x = clamp( 1.0 - dotVH, 0.0, 1.0 );\n    float x2 = x * x;\n    float x5 = clamp( x * x2 * x2, 0.0, 0.9999 );\n    return ( f - vec3( f90 ) * x5 ) / ( 1.0 - x5 );\n}\nfloat V_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\tfloat gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\treturn 0.5 / max( gv + gl, EPSILON );\n}\nfloat D_GGX( const in float alpha, const in float dotNH ) {\n\tfloat a2 = pow2( alpha );\n\tfloat denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\n\treturn RECIPROCAL_PI * a2 / pow2( denom );\n}\n#ifdef USE_CLEARCOAT\n\tvec3 BRDF_GGX_Clearcoat( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material) {\n\t\tvec3 f0 = material.clearcoatF0;\n\t\tfloat f90 = material.clearcoatF90;\n\t\tfloat roughness = material.clearcoatRoughness;\n\t\tfloat alpha = pow2( roughness );\n\t\tvec3 halfDir = normalize( lightDir + viewDir );\n\t\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\t\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\t\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\t\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\t\tvec3 F = F_Schlick( f0, f90, dotVH );\n\t\tfloat V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\t\tfloat D = D_GGX( alpha, dotNH );\n\t\treturn F * ( V * D );\n\t}\n#endif\nvec3 BRDF_GGX( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material ) {\n\tvec3 f0 = material.specularColor;\n\tfloat f90 = material.specularF90;\n\tfloat roughness = material.roughness;\n\tfloat alpha = pow2( roughness );\n\tvec3 halfDir = normalize( lightDir + viewDir );
83\n\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\tvec3 F = F_Schlick( f0, f90, dotVH );\n\t#ifdef USE_IRIDESCENCE\n\t\tF = mix( F, material.iridescenceFresnel, material.iridescence );\n\t#endif\n\tfloat V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\tfloat D = D_GGX( alpha, dotNH );
vendor: 5,468 bytes, line 83
83\n\treturn F * ( V * D );\n}\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\n\tconst float LUT_SIZE = 64.0;\n\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\n\tconst float LUT_BIAS = 0.5 / LUT_SIZE;\n\tfloat dotNV = saturate( dot( N, V ) );\n\tvec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\n\tuv = uv * LUT_SCALE + LUT_BIAS;\n\treturn uv;\n}\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\n\tfloat l = length( f );\n\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\n}\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\n\tfloat x = dot( v1, v2 );\n\tfloat y = abs( x );\n\tfloat a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\n\tfloat b = 3.4175940 + ( 4.1616724 + y ) * y;\n\tfloat v = a / b;\n\tfloat theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\n\treturn cross( v1, v2 ) * theta_sintheta;\n}\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\n\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\n\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\n\tvec3 lightNormal = cross( v1, v2 );\n\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\n\tvec3 T1, T2;\n\tT1 = normalize( V - N * dot( V, N ) );\n\tT2 = - cross( N, T1 );\n\tmat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\n\tvec3 coords[ 4 ];\n\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\n\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\n\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\n\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\n\tcoords[ 0 ] = normalize( coords[ 0 ] );\n\tcoords[ 1 ] = normalize( coords[ 1 ] );\n\tcoords[ 2 ] = normalize( coords[ 2 ] );\n\tcoords[ 3 ] = normalize( coords[ 3 ] );\n\tvec3 vectorFormFactor = vec3( 0.0 );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\n\tfloat result = LTC_ClippedSphereFormFactor( vectorFormFactor );\n\treturn vec3( result );\n}\n#if defined( USE_SHEEN )\nfloat D_Charlie( float roughness, float dotNH ) {\n\tfloat alpha = pow2( roughness );\n\tfloat invAlpha = 1.0 / alpha;\n\tfloat cos2h = dotNH * dotNH;\n\tfloat sin2h = max( 1.0 - cos2h, 0.0078125 );\n\treturn ( 2.0 + invAlpha ) * pow( sin2h, invAlpha * 0.5 ) / ( 2.0 * PI );\n}\nfloat V_Neubelt( float dotNV, float dotNL ) {\n\treturn saturate( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) );\n}\nvec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) {\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat D = D_Charlie( sheenRoughness, dotNH );\n\tfloat V = V_Neubelt( dotNV, dotNL );\n\treturn sheenColor * ( D * V );\n}\n#endif\nfloat IBLSheenBRDF( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat r2 = roughness * roughness;\n\tfloat a = roughness < 0.25 ? -339.2 * r2 + 161.4 * roughness - 25.9 : -8.48 * r2 + 14.3 * roughness - 9.95;\n\tfloat b = roughness < 0.25 ? 44.0 * r2 - 23.7 * roughness + 3.26 : 1.97 * r2 - 3.27 * roughness + 0.72;\n\tfloat DG = exp( a * dotNV + b ) + ( roughness < 0.25 ? 0.0 : 0.1 * ( roughness - 0.25 ) );\n\treturn saturate( DG * RECIPROCAL_PI );\n}\nvec2 DFGApprox( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\n\tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\n\tvec4 r = roughness * c0 + c1;\n\tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\n\tvec2 fab = vec2( - 1.04, 1.04 ) * a004 + r.zw;\n\treturn fab;\n}\nvec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) {\n\tvec2 fab = DFGApprox( normal, viewDir, roughness );\n\treturn specularColor * fab.x + specularF90 * fab.y;\n}\n#ifdef USE_IRIDESCENCE\nvoid computeMultiscatteringIridescence( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float iridescence, const in vec3 iridescenceF0, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n#else\nvoid computeMultiscattering( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n#endif\n\tvec2 fab = DFGApprox( normal, viewDir, roughness );\n\t#ifdef USE_IRIDESCENCE\n\t\tvec3 Fr = mix( specularColor, iridescenceF0, iridescence );\n\t#else\n\t\tvec3 Fr = specularColor;\n\t#endif\n\tvec3 FssEss = Fr * fab.x + specularF90 * fab.y;\n\tfloat Ess = fab.x + fab.y;\n\tfloat Ems = 1.0 - Ess;\n\tvec3 Favg = Fr + ( 1.0 - Fr ) * 0.047619;\tvec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );\n\tsingleScatter += FssEss;\n\tmultiScatter += Fms * Ems;\n}\n#if NUM_RECT_AREA_LIGHTS > 0\n\tvoid RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in 
83GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\t\tvec3 normal = geometry.normal;\n\t\tvec3 viewDir = geometry.viewDir;\n\t\tvec3 position = geometry.position;\n\t\tvec3 lightPos = rectAreaLight.position;\n\t\tvec3 halfWidth = rectAreaLight.halfWidth;\n\t\tvec3 halfHeight = rectAreaLight.halfHeight;\n\t\tvec3 lightColor = rectAreaLight.color;\n\t\tfloat roughness = material.roughness;\n\t\tvec3 rectCoords[ 4 ];\n\t\trectCoords[ 0 ] = lightPos + halfWidth - halfHeight;\t\trectCoords[ 1 ] = lightPos - halfWidth - halfHeight;\n\t\trectCoords[ 2 ] = lightPos - halfWidth + halfHeight;\n\t\trectCoords[ 3 ] = lightPos + halfWidth + halfHeight;\n\t\tvec2 uv = LTC_Uv( normal, viewDir, roughness );\n\t\tvec4 t1 = texture2D( ltc_1, uv );\n\t\tvec4 t2 = texture2D( ltc_2, uv );\n\t\tmat3 mInv = mat3(\n\t\t\tvec3( t1.x, 0, t1.y ),\n\t\t\tvec3(    0, 1,    0 ),\n\t\t\tvec3( t1.z, 0, t1.w )\n\t\t);\n\t\tvec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );\n\t\treflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\n\t\treflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\n\t}\n#endif\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNLcc = saturate( dot( geometry.clearcoatNormal, directLight.direction ) );\n\t\tvec3 ccIrradiance = dotNLcc * directLight.color;\n\t\tclearcoatSpecular += ccIrradiance * BRDF_GGX_Clearcoat( directLight.direction, geometry.viewDir, geometry.clearcoatNormal, material );\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tsheenSpecular += irradiance * BRDF_Sheen( directLight.direction, geometry.viewDir, geometry.normal, material.sheenColor, material.sheenRoughness );\n\t#endif\n\treflectedLight.directSpecular += irradiance * BRDF_GGX( directLight.direction, geometry.viewDir, geometry.normal, material );\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) {\n\t#ifdef USE_CLEARCOAT\n\t\tclearcoatSpecular += clearcoatRadiance * EnvironmentBRDF( geometry.clearcoatNormal, geometry.viewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness );\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tsheenSpecular += irradiance * material.sheenColor * IBLSheenBRDF( geometry.normal, geometry.viewDir, material.sheenRoughness );\n\t#endif\n\tvec3 singleScattering = vec3( 0.0 );\n\tvec3 multiScattering = vec3( 0.0 );\n\tvec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;\n\t#ifdef USE_IRIDESCENCE\n\t\tcomputeMultiscatteringIridescence( geometry.normal, geometry.viewDir, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnel, material.roughness, singleScattering, multiScattering );\n\t#else\n\t\tcomputeMultiscattering( geometry.normal, geometry.viewDir, material.specularColor, material.specularF90, material.roughness, singleScattering, multiScattering );\n\t#endif\n\tvec3 totalScattering = singleScattering + multiScattering;\n\tvec3 diffuse = material.diffuseColor * ( 1.0 - max( max( totalScattering.r, totalScattering.g ), totalScattering.b ) );\n\treflectedLight.indirectSpecular += radiance * singleScattering;\n\treflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance;\n\treflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance;\n}\n#define RE_Direct\t\t\t\tRE_Direct_Physical\n#define RE_Direct_RectArea\t\tRE_Direct_RectArea_Physical\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Physical\n#define RE_IndirectSpecular\t\tRE_IndirectSpecular_Physical\nfloat c
83omputeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\n\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\n}",lights_fragment_begin:"\nGeometricContext geometry;\ngeometry.position = - vViewPosition;\ngeometry.normal = normal;\ngeometry.viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );\n#ifdef USE_CLEARCOAT\n\tgeometry.clearcoatNormal = clearcoatNormal;\n#endif\n#ifdef USE_IRIDESCENCE\n\tfloat dotNVi = saturate( dot( normal, geometry.viewDir ) );\n\tif ( material.iridescenceThickness == 0.0 ) {\n\t\tmaterial.iridescence = 0.0;\n\t} else {\n\t\tmaterial.iridescence = saturate( material.iridescence );\n\t}\n\tif ( material.iridescence > 0.0 ) {\n\t\tmaterial.iridescenceFresnel = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.specularColor );\n\t\tmaterial.iridescenceF0 = Schlick_to_F0( material.iridescenceFresnel, 1.0, dotNVi );\n\t}\n#endif\nIncidentLight directLight;\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\n\tPointLight pointLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tgetPointLightInfo( pointLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS )\n\t\tpointLightShadow = pointLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n\tSpotLight spotLight;\n\tvec4 spotColor;\n\tvec3 spotLightCoord;\n\tbool inSpotLightMap;\n\t#if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tgetSpotLightInfo( spotLight, geometry, directLight );\n\t\t#if ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\n\t\t#define SPOT_LIGHT_MAP_INDEX UNROLLED_LOOP_INDEX\n\t\t#elif ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\t#define SPOT_LIGHT_MAP_INDEX NUM_SPOT_LIGHT_MAPS\n\t\t#else\n\t\t#define SPOT_LIGHT_MAP_INDEX ( UNROLLED_LOOP_INDEX - NUM_SPOT_LIGHT_SHADOWS + NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\n\t\t#endif\n\t\t#if ( SPOT_LIGHT_MAP_INDEX < NUM_SPOT_LIGHT_MAPS )\n\t\t\tspotLightCoord = vSpotLightCoord[ i ].xyz / vSpotLightCoord[ i ].w;\n\t\t\tinSpotLightMap = all( lessThan( abs( spotLightCoord * 2. - 1. ), vec3( 1.0 ) ) );\n\t\t\tspotColor = texture2D( spotLightMap[ SPOT_LIGHT_MAP_INDEX ], spotLightCoord.xy );\n\t\t\tdirectLight.color = inSpotLightMap ? directLight.color * spotColor.rgb : directLight.color;\n\t\t#endif\n\t\t#undef SPOT_LIGHT_MAP_INDEX\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\tspotLightShadow = spotLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\n\tDirectionalLight directionalLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tgetDirectionalLightInfo( directionalLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )\n\t\tdirectionalLightShadow = directionalLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\n\tRectAreaLight rectAreaLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\n\t\trectAreaLight = rectAreaLights[ i ];\n\t\tRE_Direct_RectArea( rectAreaLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if defined( RE_IndirectDiffuse )\n\tvec3 iblIrradiance = vec3( 0.0 );\n\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\n\tirradiance += getLightProbeIrradiance( lightProbe, geometry.normal );\n\t#if ( NUM_HEMI_LIGHTS > 0 )\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\t\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry.normal );\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n#endif\n#if defined( RE_IndirectSpecular )\n\tvec3 radiance = vec3( 0.0 );\n\tvec3 clearcoatRadiance = vec3( 0.0 );\n#endif",lights_fragment_maps:"#if defined( RE_IndirectDiffuse )\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\n\t\tvec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;\n\t\tirradiance += lightMapIrradiance;\n\t#endif\n\t#if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV )\n\t\tiblIrradiance += getIBLIrradiance( geometry.normal );\n\t#endif\n#endif\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\n\tradiance += getIBLRadiance( geometry.viewDir, geometry.normal, material.roughness );\n\t#ifdef USE_CLEARCOAT\n\t\tclearcoatRadiance += getIBLRadiance( geometry.viewDir, geometry.clearcoatNormal, material.clearcoatRoughness );\n\t#endif\n#endif",lights_fragment_end:"#if defined( RE_IndirectDiffuse )\n\tRE_IndirectDiffuse( irradiance, geometry, material, reflectedLight );\n#endif\n#if defined( RE_IndirectSpecular )\n\tRE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometry, material, reflectedLight );\n#endif",logdepthbuf_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tgl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;\n#endif",logdepthbuf_pars_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tuniform float logDepthBufFC;\n\tvarying float vFragDepth;\n\tvarying float vIsPerspective;\n#endif",logdepthbuf_pars_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvarying float vFragDepth;\n\t\tvarying float vIsPerspective;\n\t#else\n\t\tuniform float logDepthBufFC;\n\t#endif\n#endif",logdepthbuf_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvFragDepth = 1.0 + gl_Position.w;\n\t\tvIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );\n\t#else\n\t\tif ( isPerspectiveMatrix( projectionMatrix ) ) {\n\t\t\tgl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0;\n\t\t\tgl_Position.z *= gl_Position.w;\n\t\t}\n\t#endif\n#endif",map_fragment:"#ifdef USE_MAP\n\tvec4 sampledDiffuseColor = texture2D( map, vMapUv );\n\t#ifdef DECODE_VIDEO_TEXTURE\n\t\tsampledDiffuseColor = vec4( mix( pow( sampledDiffuseColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), sampledDiffuseColor.rgb * 0.0773993808, vec3( lessThanEqual( sampledDiffuseColor.rgb, vec3( 0.04045 ) ) ) ), sampledDiffuseColor.w );\n\t#endif\n\tdiffuseColor *= sampledDiffuseColor;\n#endif",map_pars_fragment:"#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif",map_particle_fragment:"#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\t#if defined( USE_POINTS_UV )\n\t\tvec2 uv = vUv;\n\t#else\n\t\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\n\t#endif\n#endif\n#ifdef USE_MAP\n\tdiffuseColor *= texture2D( map, uv );\n#endif\n#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, uv ).g;\n#endif",map_particle_pars_fragment:"#if defined( USE_POINTS_UV )\n\tvarying vec2 vUv;\n#else\n\t#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\t\tuniform mat3 uvTransform;\n\t#endif\n#endif\n#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif\n#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif",metalnessmap_fragment:"float metalnessFactor = metalness;\n#ifdef USE_METALNESSMAP\n\tvec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv );\n\tmetalnessFactor *= texelMetalness.b;\n#endif",metalnessmap_pars_fragment:"#ifdef USE_METALNESSMAP\n\tuniform sampler2D metalnessMap;\n#endif",morphcolor_vertex:"#if defined( USE_MORPHCOLORS ) && defined( MORPHTARGETS_TEXTURE )\n\tvColor *= morphTargetBaseInfluence;\n\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t#if defined( USE_COLOR_ALPHA )\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ) * morphTargetInfluences[ i ];\n\t\t#elif defined( USE_COLOR )\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ];\n\t\t#endif\n\t}\n#endif",morphnormal_vertex:"#ifdef USE_MORPHNORMALS\n\tobjectNormal *= morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ];\n\t\t}\n\t#else\n\t\tobjectNormal += morphNormal0 * morphTargetInfluences[ 0 ];\n\t\tobjectNormal += morphNormal1 * morphTargetInfluences[ 1 ];\n\t\tobjectNormal += morphNormal2 * morphTargetInfluences[ 2 ];\n\t\tobjectNormal += morphNormal3 * morphTargetInfluences[ 3 ];\n\t#endif\n#endif",morphtarget_pars_vertex:"#ifdef USE_MORPHTARGETS\n\tuniform float morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tuniform float morphTargetInfluences[ MORPHTARGETS_COUNT ];\n\t\tuniform sampler2DArray morphTargetsTexture;\n\t\tuniform ivec2 morphTargetsTextureSize;\n\t\tvec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) {\n\t\t\tint texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset;\n\t\t\tint y = texelIndex / morphTargetsTextureSize.x;\n\t\t\tint x = texelIndex - y * morphTargetsTextureSize.x;\n\t\t\tivec3 morphUV = ivec3( x, y, morphTargetIndex );\n\t\t\treturn texelFetch( morphTargetsTexture, morphUV, 0 );\n\t\t}\n\t#else\n\t\t#ifndef USE_MORPHNORMALS\n\t\t\tuniform float morphTargetInfluences[ 8 ];\n\t\t#else\n\t\t\tuniform float morphTargetInfluences[ 4 ];\n\t\t#endif\n\t#endif\n#endif",morphtarget_vertex:"#ifdef USE_MORPHTARGETS\n\ttransformed *= morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ];\n\t\t}\n\t#else\n\t\ttransformed += morphTarget0 * morphTargetInfluences[ 0 ];\n\t\ttransformed += morphTarget1 * morphTargetInfluences[ 1 ];\n\t\ttransformed += morphTarget2 * morphTargetInfluences[ 2 ];\n\t\ttransformed += morphTarget3 * morphTargetInfluences[ 3 ];\n\t\t#ifndef USE_MORPHNORMALS\n\t\t\ttransformed += morphTarget4 * morphTargetInfluences[ 4 ];\n\t\t\ttransformed += morphTarget5 * morphTargetInfluences[ 5 ];\n\t\t\ttransformed += morphTarget6 * morphTargetInfluences[ 6 ];\n\t\t\ttransformed += morphTarget7 * morphTargetInfluences[ 7 ];\n\t\t#endif\n\t#endif\n#endif",normal_fragment_begin:"float faceDirection = gl_FrontFacing ? 1.0 : - 1.0;\n#ifdef FLAT_SHADED\n\tvec3 fdx = dFdx( vViewPosition );\n\tvec3 fdy = dFdy( vViewPosition );\n\tvec3 normal = normalize( cross( fdx, fdy ) );\n#else\n\tvec3 normal = normalize( vNormal );\n\t#ifdef DOUBLE_SIDED\n\t\tnormal *= faceDirection;\n\t#endif\n#endif\n#ifdef USE_NORMALMAP_TANGENTSPACE\n\t#ifdef USE_TANGENT\n\t\tmat3 tbn = mat3( normalize( vTangent ), normalize( vBitangent ), normal );\n\t#else\n\t\tmat3 tbn = getTangentFrame( - vViewPosition, normal, vNormalMapUv );\n\t#endif\n\t#if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )\n\t\ttbn[0] *= faceDirection;\n\t\ttbn[1] *= faceDirection;\n\t#endif\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\t#ifdef USE_TANGENT\n\t\tmat3 tbn2 = mat3( normalize( vTangent ), normalize( vBitangent ), normal );\n\t#else\n\t\tmat3 tbn2 = getTangentFrame( - vViewPosition, normal, vClearcoatNormalMapUv );\n\t#endif\n\t#if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )\n\t\ttbn2[0] *= faceDirection;\n\t\ttbn2[1] *= faceDirection;\n\t#endif\n#endif\nvec3 geometryNormal = normal;",normal_fragment_maps:"#ifdef USE_NORMALMAP_OBJECTSPACE\n\tnormal = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;\n\t#ifdef FLIP_SIDED\n\t\tnormal = - normal;\n\t#endif\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * faceDirection;\n\t#endif\n\tnormal = normalize( normalMatrix * normal );\n#elif defined( USE_NORMALMAP_TANGENTSPACE )\n\tvec3 mapN = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;\n\tmapN.xy *= normalScale;\n\tnormal = normalize( tbn * mapN );
83\n#elif defined( USE_BUMPMAP )\n\tnormal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection );\n#endif",normal_pars_fragment:"#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif",normal_pars_vertex:"#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif",normal_vertex:"#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n\t#ifdef USE_TANGENT\n\t\tvTangent = normalize( transformedTangent );\n\t\tvBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\n\t#endif\n#endif",normalmap_pars_fragment:"#ifdef USE_NORMALMAP\n\tuniform sampler2D normalMap;\n\tuniform vec2 normalScale;\n#endif\n#ifdef USE_NORMALMAP_OBJECTSPACE\n\tuniform mat3 normalMatrix;\n#endif\n#if ! defined ( USE_TANGENT ) && ( defined ( USE_NORMALMAP_TANGENTSPACE ) || defined ( USE_CLEARCOAT_NORMALMAP ) )\n\tmat3 getTangentFrame( vec3 eye_pos, vec3 surf_norm, vec2 uv ) {\n\t\tvec3 q0 = dFdx( eye_pos.xyz );\n\t\tvec3 q1 = dFdy( eye_pos.xyz );\n\t\tvec2 st0 = dFdx( uv.st );\n\t\tvec2 st1 = dFdy( uv.st );\n\t\tvec3 N = surf_norm;\n\t\tvec3 q1perp = cross( q1, N );\n\t\tvec3 q0perp = cross( N, q0 );\n\t\tvec3 T = q1perp * st0.x + q0perp * st1.x;\n\t\tvec3 B = q1perp * st0.y + q0perp * st1.y;\n\t\tfloat det = max( dot( T, T ), dot( B, B ) );\n\t\tfloat scale = ( det == 0.0 ) ? 0.0 : inversesqrt( det );\n\t\treturn mat3( T * scale, B * scale, N );\n\t}\n#endif",clearcoat_normal_fragment_begin:"#ifdef USE_CLEARCOAT\n\tvec3 clearcoatNormal = geometryNormal;\n#endif",clearcoat_normal_fragment_maps:"#ifdef USE_CLEARCOAT_NORMALMAP\n\tvec3 clearcoatMapN = texture2D( clearcoatNormalMap, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0;\n\tclearcoatMapN.xy *= clearcoatNormalScale;\n\tclearcoatNormal = normalize( tbn2 * clearcoatMapN );\n#endif",clearcoat_pars_fragment:"#ifdef USE_CLEARCOATMAP\n\tuniform sampler2D clearcoatMap;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tuniform sampler2D clearcoatNormalMap;\n\tuniform vec2 clearcoatNormalScale;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tuniform sampler2D clearcoatRoughnessMap;\n#endif",iridescence_pars_fragment:"#ifdef USE_IRIDESCENCEMAP\n\tuniform sampler2D iridescenceMap;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tuniform sampler2D iridescenceThicknessMap;\n#endif",output_fragment:"#ifdef OPAQUE\ndiffuseColor.a = 1.0;\n#endif\n#ifdef USE_TRANSMISSION\ndiffuseColor.a *= material.transmissionAlpha + 0.1;\n#endif\ngl_FragColor = vec4( outgoingLight, diffuseColor.a );",packing:"vec3 packNormalToRGB( const in vec3 normal ) {\n\treturn normalize( normal ) * 0.5 + 0.5;\n}\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\n\treturn 2.0 * rgb.xyz - 1.0;\n}\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;\nconst vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );\nconst vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );\nconst float ShiftRight8 = 1. / 256.;\nvec4 packDepthToRGBA( const in float v ) {\n\tvec4 r = vec4( fract( v * PackFactors ), v );\n\tr.yzw -= r.xyz * ShiftRight8;\treturn r * PackUpscale;\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n\treturn dot( v, UnpackFactors );\n}\nvec2 packDepthToRG( in highp float v ) {\n\treturn packDepthToRGBA( v ).yx;\n}\nfloat unpackRGToDepth( const in highp vec2 v ) {\n\treturn unpackRGBAToDepth( vec4( v.xy, 0.0, 0.0 ) );\n}\nvec4 pack2HalfToRGBA( vec2 v ) {\n\tvec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ) );\n\treturn vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w );\n}\nvec2 unpackRGBATo2Half( vec4 v ) {\n\treturn vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) );\n}\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( viewZ + near ) / ( near - far );\n}\nfloat orthographicDepthToViewZ( const in float depth, const in float near, const in float far ) {\n\treturn depth * ( near - far ) - near;\n}\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ );\n}\nfloat perspectiveDepthToViewZ( const in float depth, const in float near, const in float far ) {\n\treturn ( near * far ) / ( ( far - near ) * depth - far );\n}",premultiplied_alpha_fragment:"#ifdef PREMULTIPLIED_ALPHA\n\tgl_FragColor.rgb *= gl_FragColor.a;\n#endif",project_vertex:"vec4 mvPosition = vec4( transformed, 1.0 );
vendor: 14,803 bytes, line 83
83\n#ifdef USE_INSTANCING\n\tmvPosition = instanceMatrix * mvPosition;\n#endif\nmvPosition = modelViewMatrix * mvPosition;\ngl_Position = projectionMatrix * mvPosition;",dithering_fragment:"#ifdef DITHERING\n\tgl_FragColor.rgb = dithering( gl_FragColor.rgb );\n#endif",dithering_pars_fragment:"#ifdef DITHERING\n\tvec3 dithering( vec3 color ) {\n\t\tfloat grid_position = rand( gl_FragCoord.xy );\n\t\tvec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\n\t\tdither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\n\t\treturn color + dither_shift_RGB;\n\t}\n#endif",roughnessmap_fragment:"float roughnessFactor = roughness;\n#ifdef USE_ROUGHNESSMAP\n\tvec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv );\n\troughnessFactor *= texelRoughness.g;\n#endif",roughnessmap_pars_fragment:"#ifdef USE_ROUGHNESSMAP\n\tuniform sampler2D roughnessMap;\n#endif",shadowmap_pars_fragment:"#if NUM_SPOT_LIGHT_COORDS > 0\n\tvarying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\n#endif\n#if NUM_SPOT_LIGHT_MAPS > 0\n\tuniform sampler2D spotLightMap[ NUM_SPOT_LIGHT_MAPS ];\n#endif\n#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\n\t\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\n\t}\n\tvec2 texture2DDistribution( sampler2D shadow, vec2 uv ) {\n\t\treturn unpackRGBATo2Half( texture2D( shadow, uv ) );\n\t}\n\tfloat VSMShadow (sampler2D shadow, vec2 uv, float compare ){\n\t\tfloat occlusion = 1.0;\n\t\tvec2 distribution = texture2DDistribution( shadow, uv );\n\t\tfloat hard_shadow = step( compare , distribution.x );\n\t\tif (hard_shadow != 1.0 ) {\n\t\t\tfloat distance = compare - distribution.x ;\n\t\t\tfloat variance = max( 0.00000, distribution.y * distribution.y );\n\t\t\tfloat softness_probability = variance / (variance + distance * distance );\t\t\tsoftness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 );\t\t\tocclusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 );\n\t\t}\n\t\treturn occlusion;\n\t}\n\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n\t\tfloat shadow = 1.0;\n\t\tshadowCoord.xyz /= shadowCoord.w;\n\t\tshadowCoord.z += shadowBias;\n\t\tbool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0;\n\t\tbool frustumTest = inFrustum && shadowCoord.z <= 1.0;\n\t\tif ( frustumTest ) {\n\t\t#if defined( SHADOWMAP_TYPE_PCF )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx0 = - texelSize.x * shadowRadius;\n\t\t\tfloat dy0 = - texelSize.y * shadowRadius;\n\t\t\tfloat dx1 = + texelSize.x * shadowRadius;\n\t\t\tfloat dy1 = + texelSize.y * shadowRadius;\n\t\t\tfloat dx2 = dx0 / 2.0;\n\t\t\tfloat dy2 = dy0 / 2.0;\n\t\t\tfloat dx3 = dx1 / 2.0;\n\t\t\tfloat dy3 = dy1 / 2.0;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n\t\t\t) * ( 1.0 / 17.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx = texelSize.x;\n\t\t\tfloat dy = texelSize.y;\n\t\t\tvec2 uv = shadowCoord.xy;\n\t\t\tvec2 f = fract( uv * shadowMapSize + 0.5 );\n\t\t\tuv -= f * texelSize;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, uv, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t\t  texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t\t  f.x ),\n\t\t\t\t\t mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t\t  texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t\t  f.x ),\n\t\t\t\t\t f.y )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_VSM )\n\t\t\tshadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#else\n\t\t\tshadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#endif\n\t\t}\n\t\treturn shadow;\n\t}\n\tvec2 cubeToUV( vec3 v, float texelSizeY ) {\n\t\tvec3 absV = abs( v );\n\t\tfloat scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\n\t\tabsV *= scaleToCube;\n\t\tv *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\n\t\tvec2 planar = v.xy;\n\t\tfloat almostATexel = 1.5 * texelSizeY;\n\t\tfloat almostOne = 1.0 - almostATexel;\n\t\tif ( absV.z >= almostOne ) {\n\t\t\tif ( v.z > 0.0 )\n\t\t\t\tplanar.x = 4.0 - v.x;\n\t\t} else if ( absV.x >= almostOne ) {\n\t\t\tfloat signX = sign( v.x );\n\t\t\tplanar.x = v.z * signX + 2.0 * signX;\n\t\t} else if ( absV.y >= almostOne ) {\n\t\t\tfloat signY = sign( v.y );\n\t\t\tplanar.x = v.x + 2.0 * signY + 2.0;\n\t\t\tplanar.y = v.z * signY - 2.0;\n\t\t}\n\t\treturn vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\n\t}\n\tfloat getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\n\t\tvec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\n\t\tvec3 lightToPosition = shadowCoord.xyz;\n\t\tfloat dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear );\t\tdp += shadowBias;\n\t\tvec3 bd3D = normalize( lightToPosition );\n\t\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM )\n\t\t\tvec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\n\t\t\treturn (\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#else\n\t\t\treturn texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\n\t\t#endif\n\t}\n#endif",shadowmap_pars_vertex:"#if NUM_SPOT_LIGHT_COORDS > 0\n\tuniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ];\n\tvarying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\n#endif\n#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n#endif",shadowmap_vertex:"#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 )\n\tvec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\tvec4 shadowWorldPosition;\n#endif\n#if defined( USE_SHADOWMAP )\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 );\n\t\t\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 );\n\t\t\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n#endif\n#if NUM_SPOT_LIGHT_COORDS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_COORDS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition;\n\t\t#if ( defined( USE_SHADOWMAP ) && UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\t\tshadowWorldPosition.xyz += shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias;\n\t\t#endif\n\t\tvSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n#endif",shadowmask_pars_fragment:"float getShadowMask() {\n\tfloat shadow = 1.0;\n\t#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\tdirectionalLight = directionalLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n\t\tspotLight = spotLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\tpointLight = pointLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#endif\n\treturn shadow;\n}",skinbase_vertex:"#ifdef USE_SKINNING\n\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\n\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\n\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\n\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\n#endif",skinning_pars_vertex:"#ifdef USE_SKINNING\n\tuniform mat4 bindMatrix;\n\tuniform mat4 bindMatrixInverse;\n\tuniform highp sampler2D boneTexture;\n\t
83uniform int boneTextureSize;\n\tmat4 getBoneMatrix( const in float i ) {\n\t\tfloat j = i * 4.0;\n\t\tfloat x = mod( j, float( boneTextureSize ) );\n\t\tfloat y = floor( j / float( boneTextureSize ) );\n\t\tfloat dx = 1.0 / float( boneTextureSize );\n\t\tfloat dy = 1.0 / float( boneTextureSize );\n\t\ty = dy * ( y + 0.5 );\n\t\tvec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) );\n\t\tvec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) );\n\t\tvec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) );\n\t\tvec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) );\n\t\tmat4 bone = mat4( v1, v2, v3, v4 );\n\t\treturn bone;\n\t}\n#endif",skinning_vertex:"#ifdef USE_SKINNING\n\tvec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\n\tvec4 skinned = vec4( 0.0 );\n\tskinned += boneMatX * skinVertex * skinWeight.x;\n\tskinned += boneMatY * skinVertex * skinWeight.y;\n\tskinned += boneMatZ * skinVertex * skinWeight.z;\n\tskinned += boneMatW * skinVertex * skinWeight.w;\n\ttransformed = ( bindMatrixInverse * skinned ).xyz;\n#endif",skinnormal_vertex:"#ifdef USE_SKINNING\n\tmat4 skinMatrix = mat4( 0.0 );\n\tskinMatrix += skinWeight.x * boneMatX;\n\tskinMatrix += skinWeight.y * boneMatY;\n\tskinMatrix += skinWeight.z * boneMatZ;\n\tskinMatrix += skinWeight.w * boneMatW;\n\tskinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;\n\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\n\t#ifdef USE_TANGENT\n\t\tobjectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\t#endif\n#endif",specularmap_fragment:"float specularStrength;\n#ifdef USE_SPECULARMAP\n\tvec4 texelSpecular = texture2D( specularMap, vSpecularMapUv );\n\tspecularStrength = texelSpecular.r;\n#else\n\tspecularStrength = 1.0;\n#endif",specularmap_pars_fragment:"#ifdef USE_SPECULARMAP\n\tuniform sampler2D specularMap;\n#endif",tonemapping_fragment:"#if defined( TONE_MAPPING )\n\tgl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\n#endif",tonemapping_pars_fragment:"#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\nuniform float toneMappingExposure;\nvec3 LinearToneMapping( vec3 color ) {\n\treturn toneMappingExposure * color;\n}\nvec3 ReinhardToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( color / ( vec3( 1.0 ) + color ) );\n}\nvec3 OptimizedCineonToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\tcolor = max( vec3( 0.0 ), color - 0.004 );\n\treturn pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\n}\nvec3 RRTAndODTFit( vec3 v ) {\n\tvec3 a = v * ( v + 0.0245786 ) - 0.000090537;\n\tvec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081;\n\treturn a / b;\n}\nvec3 ACESFilmicToneMapping( vec3 color ) {\n\tconst mat3 ACESInputMat = mat3(\n\t\tvec3( 0.59719, 0.07600, 0.02840 ),\t\tvec3( 0.35458, 0.90834, 0.13383 ),\n\t\tvec3( 0.04823, 0.01566, 0.83777 )\n\t);\n\tconst mat3 ACESOutputMat = mat3(\n\t\tvec3(  1.60475, -0.10208, -0.00327 ),\t\tvec3( -0.53108,  1.10813, -0.07276 ),\n\t\tvec3( -0.07367, -0.00605,  1.07602 )\n\t);\n\tcolor *= toneMappingExposure / 0.6;\n\tcolor = ACESInputMat * color;\n\tcolor = RRTAndODTFit( color );\n\tcolor = ACESOutputMat * color;\n\treturn saturate( color );\n}\nvec3 CustomToneMapping( vec3 color ) { return color; }",transmission_fragment:"#ifdef USE_TRANSMISSION\n\tmaterial.transmission = transmission;\n\tmaterial.transmissionAlpha = 1.0;\n\tmaterial.thickness = thickness;\n\tmaterial.attenuationDistance = attenuationDistance;\n\tmaterial.attenuationColor = attenuationColor;\n\t#ifdef USE_TRANSMISSIONMAP\n\t\tmaterial.transmission *= texture2D( transmissionMap, vTransmissionMapUv ).r;\n\t#endif\n\t#ifdef USE_THICKNESSMAP\n\t\tmaterial.thickness *= texture2D( thicknessMap, vThicknessMapUv ).g;\n\t#endif\n\tvec3 pos = vWorldPosition;\n\tvec3 v = normalize( cameraPosition - pos );\n\tvec3 n = inverseTransformDirection( normal, viewMatrix );\n\tvec4 transmission = getIBLVolumeRefraction(\n\t\tn, v, material.roughness, material.diffuseColor, material.specularColor, material.specularF90,\n\t\tpos, modelMatrix, viewMatrix, projectionMatrix, material.ior, material.thickness,\n\t\tmaterial.attenuationColor, material.attenuationDistance );\n\tmaterial.transmissionAlpha = mix( material.transmissionAlpha, transmission.a, material.transmission );\n\ttotalDiffuse = mix( totalDiffuse, transmission.rgb, material.transmission );\n#endif",transmission_pars_fragment:"#ifdef USE_TRANSMISSION\n\tuniform float transmission;\n\tuniform float thickness;\n\tuniform float attenuationDistance;\n\tuniform vec3 attenuationColor;\n\t#ifdef USE_TRANSMISSIONMAP\n\t\tuniform sampler2D transmissionMap;\n\t#endif\n\t#ifdef USE_THICKNESSMAP\n\t\tuniform sampler2D thicknessMap;\n\t#endif\n\tuniform vec2 transmissionSamplerSize;\n\tuniform sampler2D transmissionSamplerMap;\n\tuniform mat4 modelMatrix;\n\tuniform mat4 projectionMatrix;\n\tvarying vec3 vWorldPosition;\n\tfloat w0( float a ) {\n\t\treturn ( 1.0 / 6.0 ) * ( a * ( a * ( - a + 3.0 ) - 3.0 ) + 1.0 );\n\t}\n\tfloat w1( float a ) {\n\t\treturn ( 1.0 / 6.0 ) * ( a *  a * ( 3.0 * a - 6.0 ) + 4.0 );\n\t}\n\tfloat w2( float a ){\n\t\treturn ( 1.0 / 6.0 ) * ( a * ( a * ( - 3.0 * a + 3.0 ) + 3.0 ) + 1.0 );\n\t}\n\tfloat w3( float a ) {\n\t\treturn ( 1.0 / 6.0 ) * ( a * a * a );\n\t}\n\tfloat g0( float a ) {\n\t\treturn w0( a ) + w1( a );\n\t}\n\tfloat g1( float a ) {\n\t\treturn w2( a ) + w3( a );\n\t}\n\tfloat h0( float a ) {\n\t\treturn - 1.0 + w1( a ) / ( w0( a ) + w1( a ) );\n\t}\n\tfloat h1( float a ) {\n\t\treturn 1.0 + w3( a ) / ( w2( a ) + w3( a ) );\n\t}\n\tvec4 bicubic( sampler2D tex, vec2 uv, vec4 texelSize, vec2 fullSize, float lod ) {\n\t\tuv = uv * texelSize.zw + 0.5;\n\t\tvec2 iuv = floor( uv );\n\t\tvec2 fuv = fract( uv );\n\t\tfloat g0x = g0( fuv.x );\n\t\tfloat g1x = g1( fuv.x );\n\t\tfloat h0x = h0( fuv.x );\n\t\tfloat h1x = h1( fuv.x );\n\t\tfloat h0y = h0( fuv.y );\n\t\tfloat h1y = h1( fuv.y );\n\t\tvec2 p0 = ( vec2( iuv.x + h0x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p1 = ( vec2( iuv.x + h1x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p2 = ( vec2( iuv.x + h0x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p3 = ( vec2( iuv.x + h1x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;\n\t\t\n\t\tvec2 lodFudge = pow( 1.95, lod ) / fullSize;\n\t\treturn g0( fuv.y ) * ( g0x * textureLod( tex, p0, lod ) + g1x * textureLod( tex, p1, lod ) ) +\n\t\t\tg1( fuv.y ) * ( g0x * textureLod( tex, p2, lod ) + g1x * textureLod( tex, p3, lod ) );\n\t}\n\tvec4 textureBicubic( sampler2D sampler, vec2 uv, float lod ) {\n\t\tvec2 fLodSize = vec2( textureSize( sampler, int( lod ) ) );\n\t\tvec2 cLodSize = vec2( textureSize( sampler, int( lod + 1.0 ) ) );\n\t\tvec2 fLodSizeInv = 1.0 / fLodSize;\n\t\tvec2 cLodSizeInv = 1.0 / cLodSize;\n\t\tvec2 fullSize = vec2( textureSize( sampler, 0 ) );\n\t\tvec4 fSample = bicubic( sampler, uv, vec4( fLodSizeInv, fLodSize ), fullSize, floor( lod ) );\n\t\tvec4 cSample = bicubic( sampler, uv, vec4( cLodSizeInv, cLodSize ), fullSize, ceil( lod ) );\n\t\treturn mix( fSample, cSample, fract( lod ) );\n\t}\n\tvec3 getVolumeTransmissionRay( const in vec3 n, const in vec3 v, const in float thickness, const in float ior, const in mat4 modelMatrix ) {\n\t\tvec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior );\n\t\tvec3 modelScale;\n\t\tmodelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) );\n\t\tmodelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) );\n\t\tmodelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) );\n\t\treturn normalize( refractionVector ) * thickness * modelScale;\n\t}\n\tfloat applyIorToRoughness( const in float roughness, const in float ior ) {\n\t\treturn roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 );\n\t}\n\tvec4 getTransmissionSample( const in vec2 fragCoord, const in float roughness, const in float ior ) {\n\t\tfloat lod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior );\n\t\treturn textureBicubic( transmissionSamplerMap, fragCoord.xy, lod );\n\t}\n\tvec3 applyVolumeAttenuation( const in vec3 radiance, const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tif ( isinf( attenuationDistance ) ) {\n\t\t\treturn radiance;\n\t\t} else {\n\t\t\tvec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance;\n\t\t\tvec3 transmittance = exp( - attenuationCoefficient * transmissionDistance );\t\t\treturn transmittance * radiance;\n\t\t}\n\t}\n\tvec4 getIBLVolumeRefraction( const in vec3 n, const in vec3 v, const in float roughness, const in vec3 diffuseColor,\n\t\tconst in vec3 specularColor, const in float specularF90, const in vec3 position, const in mat4 modelMatrix,\n\t\tconst in mat4 viewMatrix, const in mat4 projMatrix, const in float ior, const in float thickness,\n\t\tconst in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tvec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix );\n\t\tvec3 refractedRayExit = position + transmissionRay;\n\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\trefractionCoords += 1.0;\n\t\trefractionCoords /= 2.0;\n\t\tvec4 transmittedLight = getTransmissionSample( refractionCoords, roughness, ior );\n\t\tvec3 attenuatedColor = applyVolumeAttenuation( transmittedLight.rgb, length( transmissionRay ), attenuationColor, attenuationDistance );\n\t\tvec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness );\n\t\treturn vec4( ( 1.0 - F ) * attenuatedColor * diffuseColor, transmittedLight.a );\n\t}\n#endif",uv_pars_fragment:"#ifdef USE_UV\n\tvarying vec2 vUv;\n#endif\n#ifdef USE_MAP\n\tvarying vec2 vMapUv;
83\n#endif\n#ifdef USE_ALPHAMAP\n\tvarying vec2 vAlphaMapUv;\n#endif\n#ifdef USE_LIGHTMAP\n\tvarying vec2 vLightMapUv;\n#endif\n#ifdef USE_AOMAP\n\tvarying vec2 vAoMapUv;\n#endif\n#ifdef USE_BUMPMAP\n\tvarying vec2 vBumpMapUv;\n#endif\n#ifdef USE_NORMALMAP\n\tvarying vec2 vNormalMapUv;\n#endif\n#ifdef USE_EMISSIVEMAP\n\tvarying vec2 vEmissiveMapUv;\n#endif\n#ifdef USE_METALNESSMAP\n\tvarying vec2 vMetalnessMapUv;\n#endif\n#ifdef USE_ROUGHNESSMAP\n\tvarying vec2 vRoughnessMapUv;\n#endif\n#ifdef USE_CLEARCOATMAP\n\tvarying vec2 vClearcoatMapUv;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tvarying vec2 vClearcoatNormalMapUv;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tvarying vec2 vClearcoatRoughnessMapUv;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\tvarying vec2 vIridescenceMapUv;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tvarying vec2 vIridescenceThicknessMapUv;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\tvarying vec2 vSheenColorMapUv;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\tvarying vec2 vSheenRoughnessMapUv;\n#endif\n#ifdef USE_SPECULARMAP\n\tvarying vec2 vSpecularMapUv;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\tvarying vec2 vSpecularColorMapUv;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\tvarying vec2 vSpecularIntensityMapUv;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\tuniform mat3 transmissionMapTransform;\n\tvarying vec2 vTransmissionMapUv;\n#endif\n#ifdef USE_THICKNESSMAP\n\tuniform mat3 thicknessMapTransform;\n\tvarying vec2 vThicknessMapUv;\n#endif",uv_pars_vertex:"#ifdef USE_UV\n\tvarying vec2 vUv;\n#endif\n#ifdef USE_UV2\n\tattribute vec2 uv2;\n#endif\n#ifdef USE_MAP\n\tuniform mat3 mapTransform;\n\tvarying vec2 vMapUv;\n#endif\n#ifdef USE_ALPHAMAP\n\tuniform mat3 alphaMapTransform;\n\tvarying vec2 vAlphaMapUv;\n#endif\n#ifdef USE_LIGHTMAP\n\tuniform mat3 lightMapTransform;\n\tvarying vec2 vLightMapUv;\n#endif\n#ifdef USE_AOMAP\n\tuniform mat3 aoMapTransform;\n\tvarying vec2 vAoMapUv;\n#endif\n#ifdef USE_BUMPMAP\n\tuniform mat3 bumpMapTransform;\n\tvarying vec2 vBumpMapUv;\n#endif\n#ifdef USE_NORMALMAP\n\tuniform mat3 normalMapTransform;\n\tvarying vec2 vNormalMapUv;\n#endif\n#ifdef USE_DISPLACEMENTMAP\n\tuniform mat3 displacementMapTransform;\n\tvarying vec2 vDisplacementMapUv;\n#endif\n#ifdef USE_EMISSIVEMAP\n\tuniform mat3 emissiveMapTransform;\n\tvarying vec2 vEmissiveMapUv;\n#endif\n#ifdef USE_METALNESSMAP\n\tuniform mat3 metalnessMapTransform;\n\tvarying vec2 vMetalnessMapUv;\n#endif\n#ifdef USE_ROUGHNESSMAP\n\tuniform mat3 roughnessMapTransform;\n\tvarying vec2 vRoughnessMapUv;\n#endif\n#ifdef USE_CLEARCOATMAP\n\tuniform mat3 clearcoatMapTransform;\n\tvarying vec2 vClearcoatMapUv;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tuniform mat3 clearcoatNormalMapTransform;\n\tvarying vec2 vClearcoatNormalMapUv;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tuniform mat3 clearcoatRoughnessMapTransform;\n\tvarying vec2 vClearcoatRoughnessMapUv;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\tuniform mat3 sheenColorMapTransform;\n\tvarying vec2 vSheenColorMapUv;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\tuniform mat3 sheenRoughnessMapTransform;\n\tvarying vec2 vSheenRoughnessMapUv;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\tuniform mat3 iridescenceMapTransform;\n\tvarying vec2 vIridescenceMapUv;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tuniform mat3 iridescenceThicknessMapTransform;\n\tvarying vec2 vIridescenceThicknessMapUv;\n#endif\n#ifdef USE_SPECULARMAP\n\tuniform mat3 specularMapTransform;\n\tvarying vec2 vSpecularMapUv;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\tuniform mat3 specularColorMapTransform;\n\tvarying vec2 vSpecularColorMapUv;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\tuniform mat3 specularIntensityMapTransform;\n\tvarying vec2 vSpecularIntensityMapUv;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\tuniform mat3 transmissionMapTransform;\n\tvarying vec2 vTransmissionMapUv;\n#endif\n#ifdef USE_THICKNESSMAP\n\tuniform mat3 thicknessMapTransform;\n\tvarying vec2 vThicknessMapUv;\n#endif",uv_vertex:"#ifdef USE_UV\n\tvUv = vec3( uv, 1 ).xy;\n#endif\n#ifdef USE_MAP\n\tvMapUv = ( mapTransform * vec3( MAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ALPHAMAP\n\tvAlphaMapUv = ( alphaMapTransform * vec3( ALPHAMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_LIGHTMAP\n\tvLightMapUv = ( lightMapTransform * vec3( LIGHTMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_AOMAP\n\tvAoMapUv = ( aoMapTransform * vec3( AOMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_BUMPMAP\n\tvBumpMapUv = ( bumpMapTransform * vec3( BUMPMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_NORMALMAP\n\tvNormalMapUv = ( normalMapTransform * vec3( NORMALMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_DISPLACEMENTMAP\n\tvDisplacementMapUv = ( displacementMapTransform * vec3( DISPLACEMENTMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_EMISSIVEMAP\n\tvEmissiveMapUv = ( emissiveMapTransform * vec3( EMISSIVEMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_METALNESSMAP\n\tvMetalnessMapUv = ( metalnessMapTransform * vec3( METALNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ROUGHNESSMAP\n\tvRoughnessMapUv = ( roughnessMapTransform * vec3( ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOATMAP\n\tvClearcoatMapUv = ( clearcoatMapTransform * vec3( CLEARCOATMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tvClearcoatNormalMapUv = ( clearcoatNormalMapTransform * vec3( CLEARCOAT_NORMALMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tvClearcoatRoughnessMapUv = ( clearcoatRoughnessMapTransform * vec3( CLEARCOAT_ROUGHNESSMAP_UV, 1 ) ).xy;
83\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\tvIridescenceMapUv = ( iridescenceMapTransform * vec3( IRIDESCENCEMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tvIridescenceThicknessMapUv = ( iridescenceThicknessMapTransform * vec3( IRIDESCENCE_THICKNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\tvSheenColorMapUv = ( sheenColorMapTransform * vec3( SHEEN_COLORMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\tvSheenRoughnessMapUv = ( sheenRoughnessMapTransform * vec3( SHEEN_ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULARMAP\n\tvSpecularMapUv = ( specularMapTransform * vec3( SPECULARMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\tvSpecularColorMapUv = ( specularColorMapTransform * vec3( SPECULAR_COLORMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\tvSpecularIntensityMapUv = ( specularIntensityMapTransform * vec3( SPECULAR_INTENSITYMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\tvTransmissionMapUv = ( transmissionMapTransform * vec3( TRANSMISSIONMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_THICKNESSMAP\n\tvThicknessMapUv = ( thicknessMapTransform * vec3( THICKNESSMAP_UV, 1 ) ).xy;\n#endif",worldpos_vertex:"#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0\n\tvec4 worldPosition = vec4( transformed, 1.0 );\n\t#ifdef USE_INSTANCING\n\t\tworldPosition = instanceMatrix * worldPosition;\n\t#endif\n\tworldPosition = modelMatrix * worldPosition;\n#endif",background_vert:"varying vec2 vUv;\nuniform mat3 uvTransform;\nvoid main() {\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\tgl_Position = vec4( position.xy, 1.0, 1.0 );\n}",background_frag:"uniform sampler2D t2D;\nuniform float backgroundIntensity;\nvarying vec2 vUv;\nvoid main() {\n\tvec4 texColor = texture2D( t2D, vUv );\n\t#ifdef DECODE_VIDEO_TEXTURE\n\t\ttexColor = vec4( mix( pow( texColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), texColor.rgb * 0.0773993808, vec3( lessThanEqual( texColor.rgb, vec3( 0.04045 ) ) ) ), texColor.w );\n\t#endif\n\ttexColor.rgb *= backgroundIntensity;\n\tgl_FragColor = texColor;\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n}",backgroundCube_vert:"varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\tgl_Position.z = gl_Position.w;\n}",backgroundCube_frag:"#ifdef ENVMAP_TYPE_CUBE\n\tuniform samplerCube envMap;\n#elif defined( ENVMAP_TYPE_CUBE_UV )\n\tuniform sampler2D envMap;\n#endif\nuniform float flipEnvMap;\nuniform float backgroundBlurriness;\nuniform float backgroundIntensity;\nvarying vec3 vWorldDirection;\n#include <cube_uv_reflection_fragment>\nvoid main() {\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 texColor = textureCube( envMap, vec3( flipEnvMap * vWorldDirection.x, vWorldDirection.yz ) );\n\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\tvec4 texColor = textureCubeUV( envMap, vWorldDirection, backgroundBlurriness );\n\t#else\n\t\tvec4 texColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\t#endif\n\ttexColor.rgb *= backgroundIntensity;\n\tgl_FragColor = texColor;\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n}",cube_vert:"varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\tgl_Position.z = gl_Position.w;\n}",cube_frag:"uniform samplerCube tCube;\nuniform float tFlip;\nuniform float opacity;\nvarying vec3 vWorldDirection;\nvoid main() {\n\tvec4 texColor = textureCube( tCube, vec3( tFlip * vWorldDirection.x, vWorldDirection.yz ) );\n\tgl_FragColor = texColor;\n\tgl_FragColor.a *= opacity;\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n}",depth_vert:"#include <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include <uv_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvHighPrecisionZW = gl_Position.zw;\n}",depth_frag:"#if DEPTH_PACKING == 3200\n\tuniform float opacity;\n#endif\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#if DEPTH_PACKING == 3200\n\t\tdiffuseColor.a = opacity;\n\t#endif\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <logdepthbuf_fragment>\n\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\n\t#if DEPTH_PACKING == 3200\n\t\tgl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );\n\t#elif DEPTH_PACKING == 3201\n\t\tgl_FragColor = packDepthToRGBA( fragCoordZ );\n\t#endif\n}",distanceRGBA_vert:"#define DISTANCE\nvarying vec3 vWorldPosition;\n#include <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <worldpos_vertex>\n\t#include <clipping_planes_vertex>\n\tvWorldPosition = worldPosition.xyz;\n}",distanceRGBA_frag:"#define DISTANCE\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main () {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\tfloat dist = length( vWorldPosition - referencePosition );\n\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n\tdist = saturate( dist );\n\tgl_FragColor = packDepthToRGBA( dist );\n}",equirect_vert:"varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n}",equirect_frag:"uniform sampler2D tEquirect;\nvarying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvec3 direction = normalize( vWorldDirection );\n\tvec2 sampleUV = equirectUv( direction );\n\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n}",linedashed_vert:"uniform float scale;\nattribute float lineDistance;\nvarying float vLineDistance;\n#include <common>\n#include <uv_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\tvLineDistance = scale * lineDistance;\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphcolor_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n}",linedashed_frag:"uniform vec3 diffuse;\nuniform float opacity;\nuniform float dashSize;\nuniform float totalSize;\nvarying float vLineDistance;\n#include <common>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\n\t\tdiscard;\n\t}\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n}",meshbasic_vert:"#include <common>\n#include <uv_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphcolor_vertex>\n\t#if defined ( USE_ENVMAP ) || defined ( USE_SKINNING )\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinbase_vertex>\n\t\t#include <skinnormal_vertex>\n\t\t#include <defaultnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <fog_vertex>\n}",meshbasic_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\n\t\treflectedLight.indirectDiffuse += lightMapTexel.rgb * lightMapIntensity * RECIPROCAL_PI;\n\t#else\n\t\treflectedLight.indirectDiffuse += vec3( 1.0 );\n\t#endif\n\t#include <aomap_fragment>\n\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\n\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\n\t#include <envmap_fragment>\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshlambert_vert:"#define LAMBERT\nvarying vec3 vViewPosition;\n#include <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphcolor_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",meshlambert_frag:"#define LAMBERT\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_lambert_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_lambert_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include <envmap_fragment>\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshmatcap_vert:"#define MATCAP\nvarying vec3 vViewPosition;\n#include <common>\n#include <uv_pars_vertex>\n#include <color_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphcolor_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n\tvViewPosition = - mvPosition.xyz;\n}",meshmatcap_frag:"#define MATCAP\nuniform vec3 diffuse;\nuniform float opacity;\nuniform sampler2D matcap;\nvarying vec3 vViewPosition;\n#include <common>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <fog_pars_fragment>\n#include <normal_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <m
83ap_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\tvec3 viewDir = normalize( vViewPosition );\n\tvec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) );\n\tvec3 y = cross( viewDir, x );\n\tvec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5;\n\t#ifdef USE_MATCAP\n\t\tvec4 matcapColor = texture2D( matcap, uv );\n\t#else\n\t\tvec4 matcapColor = vec4( vec3( mix( 0.2, 0.8, uv.y ) ), 1.0 );\n\t#endif\n\tvec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb;\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshnormal_vert:"#define NORMAL\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n\tvarying vec3 vViewPosition;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n\tvViewPosition = - mvPosition.xyz;\n#endif\n}",meshnormal_frag:"#define NORMAL\nuniform float opacity;\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n\tvarying vec3 vViewPosition;\n#endif\n#include <packing>\n#include <uv_pars_fragment>\n#include <normal_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\t#include <logdepthbuf_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\tgl_FragColor = vec4( packNormalToRGB( normal ), opacity );\n\t#ifdef OPAQUE\n\t\tgl_FragColor.a = 1.0;\n\t#endif\n}",meshphong_vert:"#define PHONG\nvarying vec3 vViewPosition;\n#include <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphcolor_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",meshphong_frag:"#define PHONG\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform vec3 specular;\nuniform float shininess;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_phong_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_phong_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\t#include <envmap_fragment>\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshphysical_vert:"#define STANDARD\nvarying vec3 vViewPosition;\n#ifdef USE_TRANSMISSION\n\tvarying vec3 vWorldPosition;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphcolor_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n#ifdef USE_TRANSMISSION\n\tvWorldPosition = worldPosition.xyz;\n#endif\n}",meshphysical_frag:"#define STANDARD\n#ifdef PHYSICAL\n\t#define IOR\n\t#define USE_SPECULAR\n#endif\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifdef IOR\n\tuniform float ior;\n#endif\n#ifdef USE_SPECULAR\n\tuniform float specularIntensity;\n\tuniform vec3 specularColor;\n\t#ifdef USE_SPECULAR_COLORMAP\n\t\tuniform sampler2D specularColorMap;\n\t#endif\n\t#ifdef USE_SPECULAR_INTENSITYMAP\n\t\tuniform sampler2D specularIntensityMap;\n\t#endif\n#endif\n#ifdef USE_CLEARCOAT\n\tuniform float clearcoat;
83\n\tuniform float clearcoatRoughness;\n#endif\n#ifdef USE_IRIDESCENCE\n\tuniform float iridescence;\n\tuniform float iridescenceIOR;\n\tuniform float iridescenceThicknessMinimum;\n\tuniform float iridescenceThicknessMaximum;\n#endif\n#ifdef USE_SHEEN\n\tuniform vec3 sheenColor;\n\tuniform float sheenRoughness;\n\t#ifdef USE_SHEEN_COLORMAP\n\t\tuniform sampler2D sheenColorMap;\n\t#endif\n\t#ifdef USE_SHEEN_ROUGHNESSMAP\n\t\tuniform sampler2D sheenRoughnessMap;\n\t#endif\n#endif\nvarying vec3 vViewPosition;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <iridescence_fragment>\n#include <cube_uv_reflection_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_physical_pars_fragment>\n#include <fog_pars_fragment>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_physical_pars_fragment>\n#include <transmission_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <clearcoat_pars_fragment>\n#include <iridescence_pars_fragment>\n#include <roughnessmap_pars_fragment>\n#include <metalnessmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <roughnessmap_fragment>\n\t#include <metalnessmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <clearcoat_normal_fragment_begin>\n\t#include <clearcoat_normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_physical_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse;\n\tvec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular;\n\t#include <transmission_fragment>\n\tvec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance;\n\t#ifdef USE_SHEEN\n\t\tfloat sheenEnergyComp = 1.0 - 0.157 * max3( material.sheenColor );\n\t\toutgoingLight = outgoingLight * sheenEnergyComp + sheenSpecular;\n\t#endif\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNVcc = saturate( dot( geometry.clearcoatNormal, geometry.viewDir ) );\n\t\tvec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc );\n\t\toutgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + clearcoatSpecular * material.clearcoat;
83\n\t#endif\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshtoon_vert:"#define TOON\nvarying vec3 vViewPosition;\n#include <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphcolor_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",meshtoon_frag:"#define TOON\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <gradientmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_toon_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_toon_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",points_vert:"uniform float size;\nuniform float scale;\n#include <common>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\n#ifdef USE_POINTS_UV\n\tvarying vec2 vUv;\n\tuniform mat3 uvTransform;\n#endif\nvoid main() {\n\t#ifdef USE_POINTS_UV\n\t\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\t#endif\n\t#include <color_vertex>\n\t#include <morphcolor_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <project_vertex>\n\tgl_PointSize = size;\n\t#ifdef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z );\n\t#endif\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#include <fog_vertex>\n}",points_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <color_pars_fragment>\n#include <map_particle_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_particle_fragment>\n\t#include <color_fragment>\n\t#include <alphatest_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n}",shadow_vert:"#include <common>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <shadowmap_pars_vertex>\nvoid main() {\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",shadow_frag:"uniform vec3 color;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <logdepthbuf_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <shadowmask_pars_fragment>\nvoid main() {\n\t#include <logdepthbuf_fragment>\n\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}",sprite_vert:"uniform float rotation;\nuniform vec2 center;\n#include <common>\n#include <uv_pars_vertex>\n#include <fog_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\tvec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );\n\tvec2 scale;\n\tscale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) );\n\tscale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) );\n\t#ifndef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) scale *= - mvPosition.z;\n\t#endif\n\tvec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;\n\tvec2 rotatedPosition;\n\trotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;\n\trotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;\n\tmvPosition.xy += rotatedPosition;\n\tgl_Position = projectionMatrix * mvPosition;\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n}",sprite_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}"},gn={common:{diffuse:{value:new Dn(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new Di},alphaMap:{value:null},alphaMapTransform:{value:new Di},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new Di}},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 Di}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new Di}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new Di},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new Di},normalScale:{value:new qt(1,1)}}
vendor: 6,488 bytes, line 83
83,displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new Di},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new Di}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new Di}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new Di}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new Dn(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 Dn(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaTest:{value:0},uvTransform:{value:new Di}},sprite:{diffuse:{value:new Dn(16777215)},opacity:{value:1},center:{value:new qt(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new Di},alphaMap:{value:null},alphaTest:{value:0}}},Oa={basic:{uniforms:ks([gn.common,gn.specularmap,gn.envmap,gn.aomap,gn.lightmap,gn.fog]),vertexShader:bi.meshbasic_vert,fragmentShader:bi.meshbasic_frag},lambert:{uniforms:ks([gn.common,gn.specularmap,gn.envmap,gn.aomap,gn.lightmap,gn.emissivemap,gn.bumpmap,gn.normalmap,gn.displacementmap,gn.fog,gn.lights,{emissive:{value:new Dn(0)}}]),vertexShader:bi.meshlambert_vert,fragmentShader:bi.meshlambert_frag},phong:{uniforms:ks([gn.common,gn.specularmap,gn.envmap,gn.aomap,gn.lightmap,gn.emissivemap,gn.bumpmap,gn.normalmap,gn.displacementmap,gn.fog,gn.lights,{emissive:{value:new Dn(0)},specular:{value:new Dn(1118481)},shininess:{value:30}}]),vertexShader:bi.meshphong_vert,fragmentShader:bi.meshphong_frag},standard:{uniforms:ks([gn.common,gn.envmap,gn.aomap,gn.lightmap,gn.emissivemap,gn.bumpmap,gn.normalmap,gn.displacementmap,gn.roughnessmap,gn.metalnessmap,gn.fog,gn.lights,{emissive:{value:new Dn(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:bi.meshphysical_vert,fragmentShader:bi.meshphysical_frag},toon:{uniforms:ks([gn.common,gn.aomap,gn.lightmap,gn.emissivemap,gn.bumpmap,gn.normalmap,gn.displacementmap,gn.gradientmap,gn.fog,gn.lights,{emissive:{value:new Dn(0)}}]),vertexShader:bi.meshtoon_vert,fragmentShader:bi.meshtoon_frag},matcap:{uniforms:ks([gn.common,gn.bumpmap,gn.normalmap,gn.displacementmap,gn.fog,{matcap:{value:null}}]),vertexShader:bi.meshmatcap_vert,fragmentShader:bi.meshmatcap_frag},points:{uniforms:ks([gn.points,gn.fog]),vertexShader:bi.points_vert,fragmentShader:bi.points_frag},dashed:{uniforms:ks([gn.common,gn.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:bi.linedashed_vert,fragmentShader:bi.linedashed_frag},depth:{uniforms:ks([gn.common,gn.displacementmap]),vertexShader:bi.depth_vert,fragmentShader:bi.depth_frag},normal:{uniforms:ks([gn.common,gn.bumpmap,gn.normalmap,gn.displacementmap,{opacity:{value:1}}]),vertexShader:bi.meshnormal_vert,fragmentShader:bi.meshnormal_frag},sprite:{uniforms:ks([gn.sprite,gn.fog]),vertexShader:bi.sprite_vert,fragmentShader:bi.sprite_frag},background:{uniforms:{uvTransform:{value:new Di},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:bi.background_vert,fragmentShader:bi.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1}},vertexShader:bi.backgroundCube_vert,fragmentShader:bi.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:bi.cube_vert,fragmentShader:bi.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:bi.equirect_vert,fragmentShader:bi.equirect_frag},distanceRGBA:{uniforms:ks([gn.common,gn.displacementmap,{referencePosition:{value:new De},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:bi.distanceRGBA_vert,fragmentShader:bi.distanceRGBA_frag},shadow:{uniforms:ks([gn.lights,gn.fog,{color:{value:new Dn(0)},opacity:{value:1}}]),vertexShader:bi.shadow_vert,fragmentShader:bi.shadow_frag}};Oa.physical={uniforms:ks([Oa.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new Di},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new Di},clearcoatNormalScale:{value:new qt(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new Di},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new Di},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new Di},sheen:{value:0},sheenColor:{value:new Dn(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new Di},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new Di},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new Di},transmissionSamplerSize:{value:new qt},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new Di},attenuationDistance:{value:0},attenuationColor:{value:new Dn(0)},specularColor:{value:new Dn(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new Di},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new Di}}]),vertexShader:bi.meshphysical_vert,fragmentShader:bi.meshphysical_frag};const wc={r:0,b:0,g:0};
vendor: 4,222 bytes, line 83
83function Zl(b,n,o,m,A,E,w){const T=new Dn(0);let D,N,B=!0===E?0:1,G=null,H=0,Q=null;function he(J,Y){J.getRGB(wc,ar(b)),m.buffers.color.setClear(wc.r,wc.g,wc.b,Y,w)}return{getClearColor:function(){return T},setClearColor:function(J,Y=1){T.set(J),B=Y,he(T,B)},getClearAlpha:function(){return B},setClearAlpha:function(J){B=J,he(T,B)},render:function Z(J,Y){let ve=!1,pe=!0===Y.isScene?Y.background:null;pe&&pe.isTexture&&(pe=(Y.backgroundBlurriness>0?o:n).get(pe));const Ae=b.xr,Ie=Ae.getSession&&Ae.getSession();Ie&&"additive"===Ie.environmentBlendMode&&(pe=null),null===pe?he(T,B):pe&&pe.isColor&&(he(pe,1),ve=!0),(b.autoClear||ve)&&b.clear(b.autoClearColor,b.autoClearDepth,b.autoClearStencil),pe&&(pe.isCubeTexture||pe.mapping===Ls)?(void 0===N&&(N=new Fs(new xc(1,1,1),new hl({name:"BackgroundCubeMaterial",uniforms:xu(Oa.backgroundCube.uniforms),vertexShader:Oa.backgroundCube.vertexShader,fragmentShader:Oa.backgroundCube.fragmentShader,side:1,depthTest:!1,depthWrite:!1,fog:!1})),N.geometry.deleteAttribute("normal"),N.geometry.deleteAttribute("uv"),N.onBeforeRender=function(Ne,Xe,Qe){this.matrixWorld.copyPosition(Qe.matrixWorld)},Object.defineProperty(N.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),A.update(N)),N.material.uniforms.envMap.value=pe,N.material.uniforms.flipEnvMap.value=pe.isCubeTexture&&!1===pe.isRenderTargetTexture?-1:1,N.material.uniforms.backgroundBlurriness.value=Y.backgroundBlurriness,N.material.uniforms.backgroundIntensity.value=Y.backgroundIntensity,N.material.toneMapped=pe.encoding!==xr,(G!==pe||H!==pe.version||Q!==b.toneMapping)&&(N.material.needsUpdate=!0,G=pe,H=pe.version,Q=b.toneMapping),N.layers.enableAll(),J.unshift(N,N.geometry,N.material,0,0,null)):pe&&pe.isTexture&&(void 0===D&&(D=new Fs(new bc(2,2),new hl({name:"BackgroundMaterial",uniforms:xu(Oa.background.uniforms),vertexShader:Oa.background.vertexShader,fragmentShader:Oa.background.fragmentShader,side:0,depthTest:!1,depthWrite:!1,fog:!1})),D.geometry.deleteAttribute("normal"),Object.defineProperty(D.material,"map",{get:function(){return this.uniforms.t2D.value}}),A.update(D)),D.material.uniforms.t2D.value=pe,D.material.uniforms.backgroundIntensity.value=Y.backgroundIntensity,D.material.toneMapped=pe.encoding!==xr,!0===pe.matrixAutoUpdate&&pe.updateMatrix(),D.material.uniforms.uvTransform.value.copy(pe.matrix),(G!==pe||H!==pe.version||Q!==b.toneMapping)&&(D.material.needsUpdate=!0,G=pe,H=pe.version,Q=b.toneMapping),D.layers.enableAll(),J.unshift(D,D.geometry,D.material,0,0,null))}}}function aa(b,n,o,m){const A=b.getParameter(b.MAX_VERTEX_ATTRIBS),E=m.isWebGL2?null:n.get("OES_vertex_array_object"),w=m.isWebGL2||null!==E,T={},B=J(null);let D=B,N=!1;function Q(dt){return m.isWebGL2?b.bindVertexArray(dt):E.bindVertexArrayOES(dt)}function Z(dt){return m.isWebGL2?b.deleteVertexArray(dt):E.deleteVertexArrayOES(dt)}function J(dt){const Et=[],tn=[],cn=[];for(let Ht=0;Ht<A;Ht++)Et[Ht]=0,tn[Ht]=0,cn[Ht]=0;return{geometry:null,program:null,wireframe:!1,newAttributes:Et,enabledAttributes:tn,attributeDivisors:cn,object:dt,attributes:{},index:null}}function pe(){const dt=D.newAttributes;for(let Et=0,tn=dt.length;Et<tn;Et++)dt[Et]=0}function Ae(dt){Ie(dt,0)}function Ie(dt,Et){const cn=D.enabledAttributes,Ht=D.attributeDivisors;D.newAttributes[dt]=1,0===cn[dt]&&(b.enableVertexAttribArray(dt),cn[dt]=1),Ht[dt]!==Et&&((m.isWebGL2?b:n.get("ANGLE_instanced_arrays"))[m.isWebGL2?"vertexAttribDivisor":"vertexAttribDivisorANGLE"](dt,Et),Ht[dt]=Et)}function Ne(){const dt=D.newAttributes,Et=D.enabledAttributes;for(let tn=0,cn=Et.length;tn<cn;tn++)Et[tn]!==dt[tn]&&(b.disableVertexAttribArray(tn),Et[tn]=0)}function Xe(dt,Et,tn,cn,Ht,nn){!0!==m.isWebGL2||tn!==b.INT&&tn!==b.UNSIGNED_INT?b.vertexAttribPointer(dt,Et,tn,cn,Ht,nn):b.vertexAttribIPointer(dt,Et,tn,Ht,nn)}function Pt(){ot(),N=!0,D!==B&&(D=B,Q(D.object))}function ot(){B.geometry=null,B.program=null,B.wireframe=!1}return{setup:function G(dt,Et,tn,cn,Ht){let nn=!1;if(w){const dn=function he(dt,Et,tn){const cn=!0===tn.wireframe;let Ht=T[dt.id];void 0===Ht&&(Ht={},T[dt.id]=Ht);let nn=Ht[Et.id];void 0===nn&&(nn={},Ht[Et.id]=nn);let dn=nn[cn];return void 0===dn&&(dn=J(function H(){return m.isWebGL2?b.createVertexArray():E.
83createVertexArrayOES()}()),nn[cn]=dn),dn}(cn,tn,Et);D!==dn&&(D=dn,Q(D.object)),nn=function Y(dt,Et,tn,cn){const Ht=D.attributes,nn=Et.attributes;let dn=0;const Yn=tn.getAttributes();for(const In in Yn)if(Yn[In].location>=0){const Zt=Ht[In];let En=nn[In];if(void 0===En&&("instanceMatrix"===In&&dt.instanceMatrix&&(En=dt.instanceMatrix),"instanceColor"===In&&dt.instanceColor&&(En=dt.instanceColor)),void 0===Zt||Zt.attribute!==En||En&&Zt.data!==En.data)return!0;dn++}return D.attributesNum!==dn||D.index!==cn}(dt,cn,tn,Ht),nn&&function ve(dt,Et,tn,cn){const Ht={},nn=Et.attributes;let dn=0;const Yn=tn.getAttributes();for(const In in Yn)if(Yn[In].location>=0){let Zt=nn[In];void 0===Zt&&("instanceMatrix"===In&&dt.instanceMatrix&&(Zt=dt.instanceMatrix),"instanceColor"===In&&dt.instanceColor&&(Zt=dt.instanceColor));const En={};En.attribute=Zt,Zt&&Zt.data&&(En.data=Zt.data),Ht[In]=En,dn++}D.attributes=Ht,D.attributesNum=dn,D.index=cn}(dt,cn,tn,Ht)}else{const dn=!0===Et.wireframe;(D.geometry!==cn.id||D.program!==tn.id||D.wireframe!==dn)&&(D.geometry=cn.id,D.program=tn.id,D.wireframe=dn,nn=!0)}null!==Ht&&o.update(Ht,b.ELEMENT_ARRAY_BUFFER),(nn||N)&&(N=!1,function Qe(dt,Et,tn,cn){if(!1===m.isWebGL2&&(dt.isInstancedMesh||cn.isInstancedBufferGeometry)&&null===n.get("ANGLE_instanced_arrays"))return;pe();const Ht=cn.attributes,nn=tn.getAttributes(),dn=Et.defaultAttributeValues;for(const Yn in nn){const In=nn[Yn];if(In.location>=0){let wt=Ht[Yn];if(void 0===wt&&("instanceMatrix"===Yn&&dt.instanceMatrix&&(wt=dt.instanceMatrix),"instanceColor"===Yn&&dt.instanceColor&&(wt=dt.instanceColor)),void 0!==wt){const Zt=wt.normalized,En=wt.itemSize,Bn=o.get(wt);if(void 0===Bn)continue;const $e=Bn.buffer,Ei=Bn.type,fi=Bn.bytesPerElement;if(wt.isInterleavedBufferAttribute){const mn=wt.data,jn=mn.stride,Jt=wt.offset;if(mn.isInstancedInterleavedBuffer){for(let kt=0;kt<In.locationSize;kt++)Ie(In.location+kt,mn.meshPerAttribute);!0!==dt.isInstancedMesh&&void 0===cn._maxInstanceCount&&(cn._maxInstanceCount=mn.meshPerAttribute*mn.count)}else for(let kt=0;kt<In.locationSize;kt++)Ae(In.location+kt);b.bindBuffer(b.ARRAY_BUFFER,$e);for(let kt=0;kt<In.locationSize;kt++)Xe(In.location+kt,En/In.locationSize,Ei,Zt,jn*fi,(Jt+En/In.locationSize*kt)*fi)}else{if(wt.isInstancedBufferAttribute){for(let mn=0;mn<In.locationSize;mn++)Ie(In.location+mn,wt.meshPerAttribute);!0!==dt.isInstancedMesh&&void 0===cn._maxInstanceCount&&(cn._maxInstanceCount=wt.meshPerAttribute*wt.count)}else for(let mn=0;mn<In.locationSize;mn++)Ae(In.location+mn);b.bindBuffer(b.ARRAY_BUFFER,$e);for(let mn=0;mn<In.locationSize;mn++)Xe(In.location+mn,En/In.locationSize,Ei,Zt,En*fi,En/In.locationSize*mn*fi)}}else if(void 0!==dn){const Zt=dn[Yn];if(void 0!==Zt)switch(Zt.length){case 2:b.vertexAttrib2fv(In.location,Zt);break;case 3:b.vertexAttrib3fv(In.location,Zt);break;case 4:b.vertexAttrib4fv(In.location,Zt);break;default:b.vertexAttrib1fv(In.location,Zt)}}}}Ne()}(dt,Et,tn,cn),null!==Ht&&b.bindBuffer(b.ELEMENT_ARRAY_BUFFER,o.get(Ht).buffer))},reset:Pt,resetDefaultState:ot,dispose:function Se(){Pt();for(const dt in T){const Et=T[dt];for(const tn in Et){const cn=Et[tn];for(const Ht in cn)Z(cn[Ht].object),delete cn[Ht];delete Et[tn]}delete T[dt]}},releaseStatesOfGeometry:function Le(dt){if(void 0===T[dt.id])return;const Et=T[dt.id];for(const tn in Et){const cn=Et[tn];for(const Ht in cn)Z(cn[Ht].object),delete cn[Ht];delete Et[tn]}delete T[dt.id]},releaseStatesOfProgram:function vt(dt){for(const Et in T){const tn=T[Et];if(void 0===tn[dt.id])continue;const cn=tn[dt.id];for(const Ht in cn)Z(cn[Ht].object),delete cn[Ht];delete tn[dt.id]}},initAttributes:pe,enableAttribute:Ae,disableUnusedAttributes:Ne}}function Kf(b,n,o,m){const A=m.isWebGL2;let E;this.setMode=function w(D){E=D},this.render=function T(D,N){b.drawArrays(E,D,N),o.update(N,E,1)},this.renderInstances=function B(D,N,G){if(0===G)return;let H,Q;if(A)H=b,Q="drawArraysInstanced";else if(H=n.get("ANGLE_instanced_arrays"),Q="drawArraysInstancedANGLE",null===H)return void console.error("THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_
83instanced_arrays.");H[Q](E,D,N,G),o.update(N,E,G)}}function Hr(b,n,o){let m;function E(Xe){if("highp"===Xe){if(b.getShaderPrecisionFormat(b.VERTEX_SHADER,b.HIGH_FLOAT).precision>0&&b.getShaderPrecisionFormat(b.FRAGMENT_SHADER,b.HIGH_FLOAT).precision>0)return"highp";Xe="mediump"}return"mediump"===Xe&&b.getShaderPrecisionFormat(b.VERTEX_SHADER,b.MEDIUM_FLOAT).precision>0&&b.getShaderPrecisionFormat(b.FRAGMENT_SHADER,b.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}const w=typeof WebGL2RenderingContext<"u"&&"WebGL2RenderingContext"===b.constructor.name;let T=void 0!==o.precision?o.precision:"highp";const B=E(T);B!==T&&(console.warn("THREE.WebGLRenderer:",T,"not supported, using",B,"instead."),T=B);const D=w||n.has("WEBGL_draw_buffers"),N=!0===o.logarithmicDepthBuffer,G=b.getParameter(b.MAX_TEXTURE_IMAGE_UNITS),H=b.getParameter(b.MAX_VERTEX_TEXTURE_IMAGE_UNITS),Q=b.getParameter(b.MAX_TEXTURE_SIZE),Z=b.getParameter(b.MAX_CUBE_MAP_TEXTURE_SIZE),he=b.getParameter(b.MAX_VERTEX_ATTRIBS),J=b.getParameter(b.MAX_VERTEX_UNIFORM_VECTORS),Y=b.getParameter(b.MAX_VARYING_VECTORS),ve=b.getParameter(b.MAX_FRAGMENT_UNIFORM_VECTORS),pe=H>0,Ae=w||n.has("OES_texture_float");return{isWebGL2:w,drawBuffers:D,getMaxAnisotropy:function A(){if(void 0!==m)return m;if(!0===n.has("EXT_texture_filter_anisotropic")){const Xe=n.get("EXT_texture_filter_anisotropic");m=b.getParameter(Xe.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else m=0;return m},getMaxPrecision:E,precision:T,logarithmicDepthBuffer:N,maxTextures:G,maxVertexTextures:H,maxTextureSize:Q,maxCubemapSize:Z,maxAttributes:he,maxVertexUniforms:J,maxVaryings:Y,maxFragmentUniforms:ve,vertexTextures:pe,floatFragmentTextures:Ae,floatVertexTextures:pe&&Ae,maxSamples:w?b.getParameter(b.MAX_SAMPLES):0}}function Pp(b){const n=this;let o=null,m=0,A=!1,E=!1;const w=new fh,T=new Di,B={value:null,needsUpdate:!1};function N(G,H,Q,Z){const he=null!==G?G.length:0;let J=null;if(0!==he){if(J=B.value,!0!==Z||null===J){const Y=Q+4*he,ve=H.matrixWorldInverse;T.getNormalMatrix(ve),(null===J||J.length<Y)&&(J=new Float32Array(Y));for(let pe=0,Ae=Q;pe!==he;++pe,Ae+=4)w.copy(G[pe]).applyMatrix4(ve,T),w.normal.toArray(J,Ae),J[Ae+3]=w.constant}B.value=J,B.needsUpdate=!0}return n.numPlanes=he,n.numIntersection=0,J}this.uniform=B,this.numPlanes=0,this.numIntersection=0,this.init=function(G,H){const Q=0!==G.length||H||0!==m||A;return A=H,m=G.length,Q},this.beginShadows=function(){E=!0,N(null)},this.endShadows=function(){E=!1},this.setGlobalState=function(G,H){o=N(G,H,0)},this.setState=function(G,H,Q){const Z=G.clippingPlanes,he=G.clipIntersection,J=G.clipShadows,Y=b.get(G);if(!A||null===Z||0===Z.length||E&&!J)E?N(null):function D(){B.value!==o&&(B.value=o,B.needsUpdate=m>0),n.numPlanes=m,n.numIntersection=0}();else{const ve=E?0:m,pe=4*ve;let Ae=Y.clippingState||null;B.value=Ae,Ae=N(Z,H,pe,Q);for(let Ie=0;Ie!==pe;++Ie)Ae[Ie]=o[Ie];Y.clippingState=Ae,this.numIntersection=he?this.numPlanes:0,this.numPlanes+=ve}}}function gM(b){let n=new WeakMap;function o(w,T){return 303===T?w.mapping=ur:304===T&&(w.mapping=vi),w}function A(w){const T=w.target;T.removeEventListener("dispose",A);const B=n.get(T);void 0!==B&&(n.delete(T),B.dispose())}return{get:function m(w){if(w&&w.isTexture&&!1===w.isRenderTargetTexture){const T=w.mapping;if(303===T||304===T){if(n.has(w))return o(n.get(w).texture,w.mapping);{const B=w.image;if(B&&B.height>0){const D=new a_(B.height/2);return D.fromEquirectangularTexture(b,w),n.set(w,D),w.addEventListener("dispose",A),o(D.texture,w.mapping)}return null}}}return w},dispose:function E(){n=new WeakMap}}}class Cc extends Uf{constructor(n=-1,o=1,m=1,A=-1,E=.1,w=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=n,this.right=o,this.top=m,this.bottom=A,this.near=E,this.far=w,this.updateProjectionMatrix()}copy(n,o){return super.copy(n,o),this.left=n.left,this.right=n.right,this.top=n.top,this.bottom=n.bottom,this.near=n.near,this.far=n.far,this.zoom=n.zoom,this.view=null===n.view?null:Object.assign({},n.view),this}setViewOffset(n,o,m,A,E,w){null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=n,this.view.fullHeight=o,this.view.offsetX=m,this.view.offsetY=A,this.view.width=E,this.view.height=w,this.updateProjectionMatrix()}clearViewOffset(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const n=(this.right-this.left)/(2*this.zoom),o=(this.top-this.bottom)/(2*this.zoom),m=(this.right+this.left)/2,A=(this.top+this.bottom)/2;let E=m-n,w=m+n,T=A+o,B=A-o;if(null!==this.view&&this.view.enabled){const D=(this.right-this.left)/this.view.fullWidth/this.zoom,N=(this.top-this.bottom)/this.view.fullHeight/this.zoom;E+=D*this.view.offsetX,w=E+D*this.view.width,T-=N*this.view.offsetY,B=T-N*this.view.height}
vendor: 7,047 bytes, line 83
83this.projectionMatrix.makeOrthographic(E,w,T,B,this.near,this.far),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(n){const o=super.toJSON(n);return o.object.zoom=this.zoom,o.object.left=this.left,o.object.right=this.right,o.object.top=this.top,o.object.bottom=this.bottom,o.object.near=this.near,o.object.far=this.far,null!==this.view&&(o.object.view=Object.assign({},this.view)),o}}const Tr=[.125,.215,.35,.446,.526,.582],T_=new Cc,Uo=new Dn;let I_=null;const rs=(1+Math.sqrt(5))/2,Pu=1/rs,P_=[new De(1,1,1),new De(-1,1,1),new De(1,1,-1),new De(-1,1,-1),new De(0,rs,Pu),new De(0,rs,-Pu),new De(Pu,0,rs),new De(-Pu,0,rs),new De(rs,Pu,0),new De(-rs,Pu,0)];class Rp{constructor(n){this._renderer=n,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(n,o=0,m=.1,A=100){I_=this._renderer.getRenderTarget(),this._setSize(256);const E=this._allocateTargets();return E.depthBuffer=!0,this._sceneToCubeUV(n,m,A,E),o>0&&this._blur(E,0,0,o),this._applyPMREM(E),this._cleanup(E),E}fromEquirectangular(n,o=null){return this._fromTexture(n,o)}fromCubemap(n,o=null){return this._fromTexture(n,o)}compileCubemapShader(){null===this._cubemapMaterial&&(this._cubemapMaterial=B_(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){null===this._equirectMaterial&&(this._equirectMaterial=R_(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),null!==this._cubemapMaterial&&this._cubemapMaterial.dispose(),null!==this._equirectMaterial&&this._equirectMaterial.dispose()}_setSize(n){this._lodMax=Math.floor(Math.log2(n)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){null!==this._blurMaterial&&this._blurMaterial.dispose(),null!==this._pingPongRenderTarget&&this._pingPongRenderTarget.dispose();for(let n=0;n<this._lodPlanes.length;n++)this._lodPlanes[n].dispose()}_cleanup(n){this._renderer.setRenderTarget(I_),n.scissorTest=!1,Os(n,0,0,n.width,n.height)}_fromTexture(n,o){this._setSize(n.mapping===ur||n.mapping===vi?0===n.image.length?16:n.image[0].width||n.image[0].image.width:n.image.width/4),I_=this._renderer.getRenderTarget();const m=o||this._allocateTargets();return this._textureToCubeUV(n,m),this._applyPMREM(m),this._cleanup(m),m}_allocateTargets(){const n=3*Math.max(this._cubeSize,112),o=4*this._cubeSize,m={magFilter:Mi,minFilter:Mi,generateMipmaps:!1,type:yr,format:ea,encoding:dc,depthBuffer:!1},A=Tc(n,o,m);if(null===this._pingPongRenderTarget||this._pingPongRenderTarget.width!==n||this._pingPongRenderTarget.height!==o){null!==this._pingPongRenderTarget&&this._dispose(),this._pingPongRenderTarget=Tc(n,o,m);const{_lodMax:E}=this;({sizeLods:this._sizeLods,lodPlanes:this._lodPlanes,sigmas:this._sigmas}=function C1(b){const n=[],o=[],m=[];let A=b;const E=b-4+1+Tr.length;for(let w=0;w<E;w++){const T=Math.pow(2,A);o.push(T);let B=1/T;w>b-4?B=Tr[w-b+4-1]:0===w&&(B=0),m.push(B);const D=1/(T-2),N=-D,G=1+D,H=[N,N,G,N,G,G,N,N,G,G,N,G],Q=6,Z=6,he=3,J=2,Y=1,ve=new Float32Array(he*Z*Q),pe=new Float32Array(J*Z*Q),Ae=new Float32Array(Y*Z*Q);for(let Ne=0;Ne<Q;Ne++){const Xe=Ne%3*2/3-1,Qe=Ne>2?0:-1;ve.set([Xe,Qe,0,Xe+2/3,Qe,0,Xe+2/3,Qe+1,0,Xe,Qe,0,Xe+2/3,Qe+1,0,Xe,Qe+1,0],he*Z*Ne),pe.set(H,J*Z*Ne),Ae.set([Ne,Ne,Ne,Ne,Ne,Ne],Y*Z*Ne)}const Ie=new Fi;Ie.setAttribute("position",new Cr(ve,he)),Ie.setAttribute("uv",new Cr(pe,J)),Ie.setAttribute("faceIndex",new Cr(Ae,Y)),n.push(Ie),A>4&&A--}return{lodPlanes:n,sizeLods:o,sigmas:m}}(E)),this._blurMaterial=function Ka(b,n,o){const m=new Float32Array(20),A=new De(0,1,0);return new hl({name:"SphericalGaussianBlur",defines:{n:20,CUBEUV_TEXEL_WIDTH:1/n,CUBEUV_TEXEL_HEIGHT:1/o,CUBEUV_MAX_MIP:`${b}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:m},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:A}},vertexShader:"\n\n\t\tprecision mediump float;\n\t\tprecision mediump int;\n\n\t\tattribute float faceIndex;\n\n\t\tvarying vec3 vOutputDirection;\n\n\t\t// RH coordinate system; PMREM face-indexing convention\n\t\tvec3 getDirection( vec2 uv, float face ) {\n\n\t\t\tuv = 2.0 * uv - 1.0;\n\n\t\t\tvec3 direction = vec3( uv, 1.0 );\n\n\t\t\tif ( face == 0.0 ) {\n\n\t\t\t\tdirection = direction.zyx; // ( 1, v, u ) pos x\n\n\t\t\t} else if ( face == 1.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xz *= -1.0; // ( -u, 1, -v ) pos y\n\n\t\t\t} else if ( face == 2.0 ) {\n\n\t\t\t\tdirection.x *= -1.0; // ( -u, v, 1 ) pos z\n\n\t\t\t} else if ( face == 3.0 ) {\n\n\t\t\t\tdirection = direction.zyx;\n\t\t\t\tdirection.xz *= -1.0; // ( -1, v, -u ) neg x\n\n\t\t\t} else if ( face == 4.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xy *= -1.0; // ( -u, -1, v ) neg y\n\n\t\t\t} else if ( face == 5.0 ) {\n\n\t\t\t\tdirection.z *= -1.0; // ( u, v, -1 ) neg z\n\n\t\t\t}\n\n\t\t\treturn direction;\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tvOutputDirection = getDirection( uv, faceIndex );\n\t\t\tgl_Position = vec4( position, 1.0 );\n\n\t\t}\n\t",fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform sampler2D envMap;\n\t\t\tuniform int samples;\n\t\t\tuniform float weights[ n ];\n\t\t\tuniform bool latitudinal;\n\t\t\tuniform float dTheta;\n\t\t\tuniform float mipInt;\n\t\t\tuniform vec3 poleAxis;\n\n\t\t\t#define ENVMAP_TYPE_CUBE_UV\n\t\t\t#include <cube_uv_reflection_fragment>\n\n\t\t\tvec3 getSample( float theta, vec3 axis ) {\n\n\t\t\t\tfloat cosTheta = cos( theta );\n\t\t\t\t// Rodrigues' axis-angle rotation\n\t\t\t\tvec3 sampleDirection = vOutputDirection * cosTheta\n\t\t\t\t\t+ cross( axis, vOutputDirection ) * sin( theta )\n\t\t\t\t\t+ axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta );\n\n\t\t\t\treturn bilinearCubeUV( envMap, sampleDirection, mipInt );\n\n\t\t\t}\n\n\t\t\tvoid main() {\n\n\t\t\t\tvec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection );\n\n\t\t\t\tif ( all( equal( axis, vec3( 0.0 ) ) ) ) {\n\n\t\t\t\t\taxis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x );\n\n\t\t\t\t}\n\n\t\t\t\taxis = normalize( axis );\n\n\t\t\t\tgl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\t\t\t\tgl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis );\n\n\t\t\t\tfor ( int i = 1; i < n; i++ ) {\n\n\t\t\t\t\tif ( i >= samples ) {\n\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tfloat theta = dTheta * float( i );\n\t\t\t\t\tgl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis );\n\t\t\t\t\tgl_FragColor.rgb += weights[ i ] * getSample( theta, axis );\n\n\t\t\t\t}\n\n\t\t\t}\n\t\t",blending:0,depthTest:!1,depthWrite:!1})}(E,n,o)}return A}_compileMaterial(n){const o=new Fs(this._lodPlanes[0],n);this._renderer.compile(o,T_)}_sceneToCubeUV(n,o,m,A){const T=new $s(90,1,o,m),B=[1,-1,1,1,1,1],D=[1,1,1,-1,-1,-1],N=this._renderer,G=N.autoClear,H=N.toneMapping;N.getClearColor(Uo),N.toneMapping=rr,N.autoClear=!1;
vendor: 4,146 bytes, line 83
83const Q=new po({name:"PMREM.Background",side:1,depthWrite:!1,depthTest:!1}),Z=new Fs(new xc,Q);let he=!1;const J=n.background;J?J.isColor&&(Q.color.copy(J),n.background=null,he=!0):(Q.color.copy(Uo),he=!0);for(let Y=0;Y<6;Y++){const ve=Y%3;0===ve?(T.up.set(0,B[Y],0),T.lookAt(D[Y],0,0)):1===ve?(T.up.set(0,0,B[Y]),T.lookAt(0,D[Y],0)):(T.up.set(0,B[Y],0),T.lookAt(0,0,D[Y]));const pe=this._cubeSize;Os(A,ve*pe,Y>2?pe:0,pe,pe),N.setRenderTarget(A),he&&N.render(Z,T),N.render(n,T)}Z.geometry.dispose(),Z.material.dispose(),N.toneMapping=H,N.autoClear=G,n.background=J}_textureToCubeUV(n,o){const m=this._renderer,A=n.mapping===ur||n.mapping===vi;A?(null===this._cubemapMaterial&&(this._cubemapMaterial=B_()),this._cubemapMaterial.uniforms.flipEnvMap.value=!1===n.isRenderTargetTexture?-1:1):null===this._equirectMaterial&&(this._equirectMaterial=R_());const E=A?this._cubemapMaterial:this._equirectMaterial,w=new Fs(this._lodPlanes[0],E);E.uniforms.envMap.value=n;const B=this._cubeSize;Os(o,0,0,3*B,2*B),m.setRenderTarget(o),m.render(w,T_)}_applyPMREM(n){const o=this._renderer,m=o.autoClear;o.autoClear=!1;for(let A=1;A<this._lodPlanes.length;A++){const E=Math.sqrt(this._sigmas[A]*this._sigmas[A]-this._sigmas[A-1]*this._sigmas[A-1]);this._blur(n,A-1,A,E,P_[(A-1)%P_.length])}o.autoClear=m}_blur(n,o,m,A,E){const w=this._pingPongRenderTarget;this._halfBlur(n,w,o,m,A,"latitudinal",E),this._halfBlur(w,n,m,m,A,"longitudinal",E)}_halfBlur(n,o,m,A,E,w,T){const B=this._renderer,D=this._blurMaterial;"latitudinal"!==w&&"longitudinal"!==w&&console.error("blur direction must be either latitudinal or longitudinal!");const G=new Fs(this._lodPlanes[A],D),H=D.uniforms,Q=this._sizeLods[m]-1,Z=isFinite(E)?Math.PI/(2*Q):2*Math.PI/39,he=E/Z,J=isFinite(E)?1+Math.floor(3*he):20;J>20&&console.warn(`sigmaRadians, ${E}, is too large and will clip, as it requested ${J} samples when the maximum is set to 20`);const Y=[];let ve=0;for(let Xe=0;Xe<20;++Xe){const Qe=Xe/he,Se=Math.exp(-Qe*Qe/2);Y.push(Se),0===Xe?ve+=Se:Xe<J&&(ve+=2*Se)}for(let Xe=0;Xe<Y.length;Xe++)Y[Xe]=Y[Xe]/ve;H.envMap.value=n.texture,H.samples.value=J,H.weights.value=Y,H.latitudinal.value="latitudinal"===w,T&&(H.poleAxis.value=T);const{_lodMax:pe}=this;H.dTheta.value=Z,H.mipInt.value=pe-m;const Ae=this._sizeLods[A];Os(o,3*Ae*(A>pe-4?A-pe+4:0),4*(this._cubeSize-Ae),3*Ae,2*Ae),B.setRenderTarget(o),B.render(G,T_)}}function Tc(b,n,o){const m=new Fo(b,n,o);return m.texture.mapping=Ls,m.texture.name="PMREM.cubeUv",m.scissorTest=!0,m}function Os(b,n,o,m,A){b.viewport.set(n,o,m,A),b.scissor.set(n,o,m,A)}function R_(){return new hl({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:"\n\n\t\tprecision mediump float;\n\t\tprecision mediump int;\n\n\t\tattribute float faceIndex;\n\n\t\tvarying vec3 vOutputDirection;\n\n\t\t// RH coordinate system; PMREM face-indexing convention\n\t\tvec3 getDirection( vec2 uv, float face ) {\n\n\t\t\tuv = 2.0 * uv - 1.0;\n\n\t\t\tvec3 direction = vec3( uv, 1.0 );\n\n\t\t\tif ( face == 0.0 ) {\n\n\t\t\t\tdirection = direction.zyx; // ( 1, v, u ) pos x\n\n\t\t\t} else if ( face == 1.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xz *= -1.0; // ( -u, 1, -v ) pos y\n\n\t\t\t} else if ( face == 2.0 ) {\n\n\t\t\t\tdirection.x *= -1.0; // ( -u, v, 1 ) pos z\n\n\t\t\t} else if ( face == 3.0 ) {\n\n\t\t\t\tdirection = direction.zyx;\n\t\t\t\tdirection.xz *= -1.0; // ( -1, v, -u ) neg x\n\n\t\t\t} else if ( face == 4.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xy *= -1.0; // ( -u, -1, v ) neg y\n\n\t\t\t} else if ( face == 5.0 ) {\n\n\t\t\t\tdirection.z *= -1.0; // ( u, v, -1 ) neg z\n\n\t\t\t}\n\n\t\t\treturn direction;\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tvOutputDirection = getDirection( uv, faceIndex );\n\t\t\tgl_Position = vec4( position, 1.0 );\n\n\t\t}\n\t",fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform sampler2D envMap;\n\n\t\t\t#include <common>\n\n\t\t\tvoid main() {\n\n\t\t\t\tvec3 outputDirection = normalize( vOutputDirection );\n\t\t\t\tvec2 uv = equirectUv( outputDirection );
83\n\n\t\t\t\tgl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 );\n\n\t\t\t}\n\t\t",blending:0,depthTest:!1,depthWrite:!1})}function B_(){return new hl({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:"\n\n\t\tprecision mediump float;\n\t\tprecision mediump int;\n\n\t\tattribute float faceIndex;\n\n\t\tvarying vec3 vOutputDirection;\n\n\t\t// RH coordinate system; PMREM face-indexing convention\n\t\tvec3 getDirection( vec2 uv, float face ) {\n\n\t\t\tuv = 2.0 * uv - 1.0;\n\n\t\t\tvec3 direction = vec3( uv, 1.0 );\n\n\t\t\tif ( face == 0.0 ) {\n\n\t\t\t\tdirection = direction.zyx; // ( 1, v, u ) pos x\n\n\t\t\t} else if ( face == 1.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xz *= -1.0; // ( -u, 1, -v ) pos y\n\n\t\t\t} else if ( face == 2.0 ) {\n\n\t\t\t\tdirection.x *= -1.0; // ( -u, v, 1 ) pos z\n\n\t\t\t} else if ( face == 3.0 ) {\n\n\t\t\t\tdirection = direction.zyx;\n\t\t\t\tdirection.xz *= -1.0; // ( -1, v, -u ) neg x\n\n\t\t\t} else if ( face == 4.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xy *= -1.0; // ( -u, -1, v ) neg y\n\n\t\t\t} else if ( face == 5.0 ) {\n\n\t\t\t\tdirection.z *= -1.0; // ( u, v, -1 ) neg z\n\n\t\t\t}\n\n\t\t\treturn direction;\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tvOutputDirection = getDirection( uv, faceIndex );\n\t\t\tgl_Position = vec4( position, 1.0 );\n\n\t\t}\n\t",fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tuniform float flipEnvMap;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform samplerCube envMap;\n\n\t\t\tvoid main() {\n\n\t\t\t\tgl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) );\n\n\t\t\t}\n\t\t",blending:0,depthTest:!1,depthWrite:!1})}function T1(b){let n=new WeakMap,o=null;function E(T){const B=T.target;B.removeEventListener("dispose",E);const D=n.get(B);void 0!==D&&(n.delete(B),D.dispose())}return{get:function m(T){if(T&&T.isTexture){const B=T.mapping,D=303===B||304===B,N=B===ur||B===vi;if(D||N){if(T.isRenderTargetTexture&&!0===T.needsPMREMUpdate){T.needsPMREMUpdate=!1;let G=n.get(T);return null===o&&(o=new Rp(b)),G=D?o.fromEquirectangular(T,G):o.fromCubemap(T,G),n.set(T,G),G.texture}if(n.has(T))return n.get(T).texture;{const G=T.image;if(D&&G&&G.height>0||N&&G&&function A(T){let B=0;for(let N=0;N<6;N++)void 0!==T[N]&&B++;return 6===B}(G)){null===o&&(o=new Rp(b));const H=D?o.fromEquirectangular(T):o.fromCubemap(T);return n.set(T,H),T.addEventListener("dispose",E),H.texture}return null}}}return T},dispose:function w(){n=new WeakMap,null!==o&&(o.dispose(),o=null)}}}function Ns(b){const n={};function o(m){if(void 0!==n[m])return n[m];let A;switch(m){case"WEBGL_depth_texture":A=b.getExtension("WEBGL_depth_texture")||b.getExtension("MOZ_WEBGL_depth_texture")||b.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":A=b.getExtension("EXT_texture_filter_anisotropic")||b.getExtension("MOZ_EXT_texture_filter_anisotropic")||b.getExtension("WEBKIT_EXT_texture_filter_anisotropic");break;case"WEBGL_compressed_texture_s3tc":A=b.getExtension("WEBGL_compressed_texture_s3tc")||b.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||b.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");break;case"WEBGL_compressed_texture_pvrtc":A=b.getExtension("WEBGL_compressed_texture_pvrtc")||b.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;default:A=b.getExtension(m)}return n[m]=A,A}return{has:function(m){return null!==o(m)},init:function(m){m.isWebGL2?o("EXT_color_buffer_float"):(o("WEBGL_depth_texture"),o("OES_texture_float"),o("OES_texture_half_float"),o("OES_texture_half_float_linear"),o("OES_standard_derivatives"),o("OES_element_index_uint"),o("OES_vertex_array_object"),o("ANGLE_instanced_arrays")),o("OES_texture_float_linear"),o("EXT_color_buffer_half_float"),o("WEBGL_multisampled_render_to_texture")},get:function(m){const A=o(m);return null===A&&console.warn("THREE.WebGLRenderer: "+m+" extension not supported."),A}}}function I1(b,n,o,m){const A={},E=new WeakMap;function w(G){const H=G.target;null!==H.index&&n.remove(H.index);for(const Z in H.attributes)n.remove(H.attributes[Z]);H.removeEventListener("dispose",w),delete A[H.id];const Q=E.get(H);Q&&(n.remove(Q),E.delete(H)),m.releaseStatesOfGeometry(H),!0===H.isInstancedBufferGeometry&&delete H._maxInstanceCount,o.memory.geometries--}function D(G){const H=[],Q=G.index,Z=G.attributes.position;let he=0;if(null!==Q){const ve=Q.array;he=Q.version;for(let pe=0,Ae=ve.length;pe<Ae;
vendor: 6,159 bytes, line 83
83pe+=3){const Ie=ve[pe+0],Ne=ve[pe+1],Xe=ve[pe+2];H.push(Ie,Ne,Ne,Xe,Xe,Ie)}}else{he=Z.version;for(let pe=0,Ae=Z.array.length/3-1;pe<Ae;pe+=3){const Ie=pe+0,Ne=pe+1,Xe=pe+2;H.push(Ie,Ne,Ne,Xe,Xe,Ie)}}const J=new(Jm(H)?Ff:gp)(H,1);J.version=he;const Y=E.get(G);Y&&n.remove(Y),E.set(G,J)}return{get:function T(G,H){return!0===A[H.id]||(H.addEventListener("dispose",w),A[H.id]=!0,o.memory.geometries++),H},update:function B(G){const H=G.attributes;for(const Z in H)n.update(H[Z],b.ARRAY_BUFFER);const Q=G.morphAttributes;for(const Z in Q){const he=Q[Z];for(let J=0,Y=he.length;J<Y;J++)n.update(he[J],b.ARRAY_BUFFER)}},getWireframeAttribute:function N(G){const H=E.get(G);if(H){const Q=G.index;null!==Q&&H.version<Q.version&&D(G)}else D(G);return E.get(G)}}}function P1(b,n,o,m){const A=m.isWebGL2;let E,T,B;this.setMode=function w(H){E=H},this.setIndex=function D(H){T=H.type,B=H.bytesPerElement},this.render=function N(H,Q){b.drawElements(E,Q,T,H*B),o.update(Q,E,1)},this.renderInstances=function G(H,Q,Z){if(0===Z)return;let he,J;if(A)he=b,J="drawElementsInstanced";else if(he=n.get("ANGLE_instanced_arrays"),J="drawElementsInstancedANGLE",null===he)return void console.error("THREE.WebGLIndexedBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");he[J](E,Q,T,H*B,Z),o.update(Q,E,Z)}}function ph(b){const o={frame:0,calls:0,triangles:0,points:0,lines:0};return{memory:{geometries:0,textures:0},render:o,programs:null,autoReset:!0,reset:function A(){o.frame++,o.calls=0,o.triangles=0,o.points=0,o.lines=0},update:function m(E,w,T){switch(o.calls++,w){case b.TRIANGLES:o.triangles+=T*(E/3);break;case b.LINES:o.lines+=T*(E/2);break;case b.LINE_STRIP:o.lines+=T*(E-1);break;case b.LINE_LOOP:o.lines+=T*E;break;case b.POINTS:o.points+=T*E;break;default:console.error("THREE.WebGLInfo: Unknown draw mode:",w)}}}}function Ru(b,n){return b[0]-n[0]}function Bu(b,n){return Math.abs(n[1])-Math.abs(b[1])}function R1(b,n,o){const m={},A=new Float32Array(8),E=new WeakMap,w=new fr,T=[];for(let D=0;D<8;D++)T[D]=[D,0];return{update:function B(D,N,G){const H=D.morphTargetInfluences;if(!0===n.isWebGL2){const Q=N.morphAttributes.position||N.morphAttributes.normal||N.morphAttributes.color,Z=void 0!==Q?Q.length:0;let he=E.get(N);if(void 0===he||he.count!==Z){let dt=function(){Pt.dispose(),E.delete(N),N.removeEventListener("dispose",dt)};void 0!==he&&he.texture.dispose();const ve=void 0!==N.morphAttributes.position,pe=void 0!==N.morphAttributes.normal,Ae=void 0!==N.morphAttributes.color,Ie=N.morphAttributes.position||[],Ne=N.morphAttributes.normal||[],Xe=N.morphAttributes.color||[];let Qe=0;!0===ve&&(Qe=1),!0===pe&&(Qe=2),!0===Ae&&(Qe=3);let Se=N.attributes.position.count*Qe,Le=1;Se>n.maxTextureSize&&(Le=Math.ceil(Se/n.maxTextureSize),Se=n.maxTextureSize);const vt=new Float32Array(Se*Le*4*Z),Pt=new sp(vt,Se,Le,Z);Pt.type=Rl,Pt.needsUpdate=!0;const ot=4*Qe;for(let Et=0;Et<Z;Et++){const tn=Ie[Et],cn=Ne[Et],Ht=Xe[Et],nn=Se*Le*4*Et;for(let dn=0;dn<tn.count;dn++){const Yn=dn*ot;!0===ve&&(w.fromBufferAttribute(tn,dn),vt[nn+Yn+0]=w.x,vt[nn+Yn+1]=w.y,vt[nn+Yn+2]=w.z,vt[nn+Yn+3]=0),!0===pe&&(w.fromBufferAttribute(cn,dn),vt[nn+Yn+4]=w.x,vt[nn+Yn+5]=w.y,vt[nn+Yn+6]=w.z,vt[nn+Yn+7]=0),!0===Ae&&(w.fromBufferAttribute(Ht,dn),vt[nn+Yn+8]=w.x,vt[nn+Yn+9]=w.y,vt[nn+Yn+10]=w.z,vt[nn+Yn+11]=4===Ht.itemSize?w.w:1)}}he={count:Z,texture:Pt,size:new qt(Se,Le)},E.set(N,he),N.addEventListener("dispose",dt)}let J=0;for(let ve=0;ve<H.length;ve++)J+=H[ve];const Y=N.morphTargetsRelative?1:1-J;G.getUniforms().setValue(b,"morphTargetBaseInfluence",Y),G.getUniforms().setValue(b,"morphTargetInfluences",H),G.getUniforms().setValue(b,"morphTargetsTexture",he.texture,o),G.getUniforms().setValue(b,"morphTargetsTextureSize",he.size)}else{const Q=void 0===H?0:H.length;let Z=m[N.id];if(void 0===Z||Z.length!==Q){Z=[];for(let pe=0;pe<Q;pe++)Z[pe]=[pe,0];m[N.id]=Z}for(let pe=0;pe<Q;pe++){const Ae=Z[pe];Ae[0]=pe,Ae[1]=H[pe]}Z.sort(Bu);for(let pe=0;pe<8;pe++)pe<Q&&Z[pe][1]?(T[pe][0]=Z[pe][0],T[pe][1]=Z[pe][1]):(T[pe][0]=Number.MAX_SAFE_INTEGER,T[pe][1]=0);T.sort(Ru);const he=N.morphAttributes.position,J=N.morphAttributes.normal;let Y=0;for(let pe=0;pe<8;pe++){const Ae=T[pe],Ie=Ae[0],Ne=Ae[1];Ie!==Number.MAX_SAFE_INTEGER&&Ne?(he&&N.getAttribute("morphTarget"+pe)!==he[Ie]&&N.setAttribute("morphTarget"+pe,he[Ie]),J&&N.getAttribute("morphNormal"+pe)!==J[Ie]&&N.setAttribute("morphNormal"+pe,J[Ie]),A[pe]=Ne,Y+=Ne):(he&&!0===N.hasAttribute("morphTarget"+pe)&&N.deleteAttribute("morphTarget"+pe),J&&!0===N.hasAttribute("morphNormal"+pe)&&N.deleteAttribute("morphNormal"+pe),A[pe]=0)}const ve=N.morphTargetsRelative?1:1-Y;G.getUniforms().setValue(b,"morphTargetBaseInfluence",ve),G.getUniforms().setValue(b,"morphTargetInfluences",A)}}}}function jf(b,n,o,m){let A=new WeakMap;function T(B){const D=B.target;D.removeEventListener("dispose",T),o.remove(D.instanceMatrix),null!==D.instanceColor&&o.remove(D.instanceColor)}return{update:function E(B){const D=m.render.frame,G=n.get(B,B.geometry);return A.get(G)!==D&&(n.update(G),A.set(G,D)),B.isInstancedMesh&&(!1===B.hasEventListener("dispose",T)&&B.addEventListener("dispose",T),o.update(B.instanceMatrix,b.ARRAY_BUFFER),null!==B.instanceColor&&o.update(B.instanceColor,b.ARRAY_BUFFER)),G},dispose:function w(){A=new WeakMap}}}const L_=new va,D_=new sp,Jf=new ap,Bp=new zf,Lp=[],ed=[],Dp=new Float32Array(16),kg=new Float32Array(9),Fp=new Float32Array(4);function mh(b,n,o){const m=b[0];if(m<=0||m>0)return b;const A=n*o;let E=Lp[A];if(void 0===E&&(E=new Float32Array(A),Lp[A]=E),0!==n){m.toArray(E,0);for(let w=1,T=0;w!==n;++w)T+=o,b[w].toArray(E,T)}return E}function _s(b,n){if(b.length!==n.length)return!1;for(let o=0,m=b.length;o<m;o++)if(b[o]!==n[o])return!1;return!0}function ss(b,n){for(let o=0,m=n.length;o<m;o++)b[o]=n[o]}function Lu(b,n){let o=ed[n];void 0===o&&(o=new Int32Array(n),ed[n]=o);for(let m=0;m!==n;++m)o[m]=b.allocateTextureUnit();return o}function Og(b,n){const o=this.cache;o[0]!==n&&(b.uniform1f(this.addr,n),o[0]=n)}function F_(b,n){const o=this.cache;if(void 0!==n.x)(o[0]!==n.x||o[1]!==n.y)&&(b.uniform2f(this.addr,n.x,n.y),o[0]=n.x,o[1]=n.y);
vendor: 4,905 bytes, line 83
83else{if(_s(o,n))return;b.uniform2fv(this.addr,n),ss(o,n)}}function k_(b,n){const o=this.cache;if(void 0!==n.x)(o[0]!==n.x||o[1]!==n.y||o[2]!==n.z)&&(b.uniform3f(this.addr,n.x,n.y,n.z),o[0]=n.x,o[1]=n.y,o[2]=n.z);else if(void 0!==n.r)(o[0]!==n.r||o[1]!==n.g||o[2]!==n.b)&&(b.uniform3f(this.addr,n.r,n.g,n.b),o[0]=n.r,o[1]=n.g,o[2]=n.b);else{if(_s(o,n))return;b.uniform3fv(this.addr,n),ss(o,n)}}function O_(b,n){const o=this.cache;if(void 0!==n.x)(o[0]!==n.x||o[1]!==n.y||o[2]!==n.z||o[3]!==n.w)&&(b.uniform4f(this.addr,n.x,n.y,n.z,n.w),o[0]=n.x,o[1]=n.y,o[2]=n.z,o[3]=n.w);else{if(_s(o,n))return;b.uniform4fv(this.addr,n),ss(o,n)}}function N_(b,n){const o=this.cache,m=n.elements;if(void 0===m){if(_s(o,n))return;b.uniformMatrix2fv(this.addr,!1,n),ss(o,n)}else{if(_s(o,m))return;Fp.set(m),b.uniformMatrix2fv(this.addr,!1,Fp),ss(o,m)}}function U_(b,n){const o=this.cache,m=n.elements;if(void 0===m){if(_s(o,n))return;b.uniformMatrix3fv(this.addr,!1,n),ss(o,n)}else{if(_s(o,m))return;kg.set(m),b.uniformMatrix3fv(this.addr,!1,kg),ss(o,m)}}function z_(b,n){const o=this.cache,m=n.elements;if(void 0===m){if(_s(o,n))return;b.uniformMatrix4fv(this.addr,!1,n),ss(o,n)}else{if(_s(o,m))return;Dp.set(m),b.uniformMatrix4fv(this.addr,!1,Dp),ss(o,m)}}function G_(b,n){const o=this.cache;o[0]!==n&&(b.uniform1i(this.addr,n),o[0]=n)}function V_(b,n){const o=this.cache;if(void 0!==n.x)(o[0]!==n.x||o[1]!==n.y)&&(b.uniform2i(this.addr,n.x,n.y),o[0]=n.x,o[1]=n.y);else{if(_s(o,n))return;b.uniform2iv(this.addr,n),ss(o,n)}}function H_(b,n){const o=this.cache;if(void 0!==n.x)(o[0]!==n.x||o[1]!==n.y||o[2]!==n.z)&&(b.uniform3i(this.addr,n.x,n.y,n.z),o[0]=n.x,o[1]=n.y,o[2]=n.z);else{if(_s(o,n))return;b.uniform3iv(this.addr,n),ss(o,n)}}function Q_(b,n){const o=this.cache;if(void 0!==n.x)(o[0]!==n.x||o[1]!==n.y||o[2]!==n.z||o[3]!==n.w)&&(b.uniform4i(this.addr,n.x,n.y,n.z,n.w),o[0]=n.x,o[1]=n.y,o[2]=n.z,o[3]=n.w);else{if(_s(o,n))return;b.uniform4iv(this.addr,n),ss(o,n)}}function W_(b,n){const o=this.cache;o[0]!==n&&(b.uniform1ui(this.addr,n),o[0]=n)}function X_(b,n){const o=this.cache;if(void 0!==n.x)(o[0]!==n.x||o[1]!==n.y)&&(b.uniform2ui(this.addr,n.x,n.y),o[0]=n.x,o[1]=n.y);else{if(_s(o,n))return;b.uniform2uiv(this.addr,n),ss(o,n)}}function q_(b,n){const o=this.cache;if(void 0!==n.x)(o[0]!==n.x||o[1]!==n.y||o[2]!==n.z)&&(b.uniform3ui(this.addr,n.x,n.y,n.z),o[0]=n.x,o[1]=n.y,o[2]=n.z);else{if(_s(o,n))return;b.uniform3uiv(this.addr,n),ss(o,n)}}function kp(b,n){const o=this.cache;if(void 0!==n.x)(o[0]!==n.x||o[1]!==n.y||o[2]!==n.z||o[3]!==n.w)&&(b.uniform4ui(this.addr,n.x,n.y,n.z,n.w),o[0]=n.x,o[1]=n.y,o[2]=n.z,o[3]=n.w);else{if(_s(o,n))return;b.uniform4uiv(this.addr,n),ss(o,n)}}function B1(b,n,o){const m=this.cache,A=o.allocateTextureUnit();m[0]!==A&&(b.uniform1i(this.addr,A),m[0]=A),o.setTexture2D(n||L_,A)}function Y_(b,n,o){const m=this.cache,A=o.allocateTextureUnit();m[0]!==A&&(b.uniform1i(this.addr,A),m[0]=A),o.setTexture3D(n||Jf,A)}function $_(b,n,o){const m=this.cache,A=o.allocateTextureUnit();m[0]!==A&&(b.uniform1i(this.addr,A),m[0]=A),o.setTextureCube(n||Bp,A)}function K_(b,n,o){const m=this.cache,A=o.allocateTextureUnit();m[0]!==A&&(b.uniform1i(this.addr,A),m[0]=A),o.setTexture2DArray(n||D_,A)}function D1(b,n){b.uniform1fv(this.addr,n)}function F1(b,n){const o=mh(n,this.size,2);b.uniform2fv(this.addr,o)}function td(b,n){const o=mh(n,this.size,3);b.uniform3fv(this.addr,o)}function Du(b,n){const o=mh(n,this.size,4);b.uniform4fv(this.addr,o)}function Ng(b,n){const o=mh(n,this.size,4);b.uniformMatrix2fv(this.addr,!1,o)}function Fu(b,n){const o=mh(n,this.size,9);b.uniformMatrix3fv(this.addr,!1,o)}function ku(b,n){const o=mh(n,this.size,16);b.uniformMatrix4fv(this.addr,!1,o)}function Op(b,n){b.uniform1iv(this.addr,n)}function Ug(b,n){b.uniform2iv(this.addr,n)}function Z_(b,n){b.uniform3iv(this.addr,n)}function k1(b,n){b.uniform4iv(this.addr,n)}function j_(b,n){b.uniform1uiv(this.addr,n)}function zg(b,n){b.uniform2uiv(this.addr,n)}function zo(b,n){b.uniform3uiv(this.addr,n)}function Ui(b,n){b.uniform4uiv(this.addr,n)}function O1(b,n,o){const m=this.cache,A=n.length,E=Lu(o,A);_s(m,E)||(b.uniform1iv(this.addr,E),ss(m,E));for(let w=0;w!==A;++w)o.setTexture2D(n[w]||L_,E[w])}function N1(b,n,o){const m=this.cache,A=n.length,E=Lu(o,A);_s(m,E)||(b.uniform1iv(this.addr,E),ss(m,E));for(let w=0;w!==A;++w)o.setTexture3D(n[w]||Jf,E[w])}function gh(b,n,o){const m=this.cache,A=n.length,E=Lu(o,A);_s(m,E)||(b.uniform1iv(this.addr,E),ss(m,E));for(let w=0;w!==A;++w)o.setTextureCube(n[w]||Bp,E[w])}function U1(b,n,o){const m=this.cache,A=n.length,E=Lu(o,A);_s(m,E)||(b.uniform1iv(this.addr,E),ss(m,E));for(let w=0;w!==A;++w)o.setTexture2DArray(n[w]||D_,E[w])}class yo{constructor(n,o,m){this.id=n,this.addr=m,this.cache=[],this.setValue=function L1(b){switch(b){case 5126:return Og;case 35664:return F_;case 35665:return k_;case 35666:return O_;case 35674:return N_;case 35675:return U_;
vendor: 18,684 bytes, line 83
83case 35676:return z_;case 5124:case 35670:return G_;case 35667:case 35671:return V_;case 35668:case 35672:return H_;case 35669:case 35673:return Q_;case 5125:return W_;case 36294:return X_;case 36295:return q_;case 36296:return kp;case 35678:case 36198:case 36298:case 36306:case 35682:return B1;case 35679:case 36299:case 36307:return Y_;case 35680:case 36300:case 36308:case 36293:return $_;case 36289:case 36303:case 36311:case 36292:return K_}}(o.type)}}class Ou{constructor(n,o,m){this.id=n,this.addr=m,this.cache=[],this.size=o.size,this.setValue=function AM(b){switch(b){case 5126:return D1;case 35664:return F1;case 35665:return td;case 35666:return Du;case 35674:return Ng;case 35675:return Fu;case 35676:return ku;case 5124:case 35670:return Op;case 35667:case 35671:return Ug;case 35668:case 35672:return Z_;case 35669:case 35673:return k1;case 5125:return j_;case 36294:return zg;case 36295:return zo;case 36296:return Ui;case 35678:case 36198:case 36298:case 36306:case 35682:return O1;case 35679:case 36299:case 36307:return N1;case 35680:case 36300:case 36308:case 36293:return gh;case 36289:case 36303:case 36311:case 36292:return U1}}(o.type)}}class J_{constructor(n){this.id=n,this.seq=[],this.map={}}setValue(n,o,m){const A=this.seq;for(let E=0,w=A.length;E!==w;++E){const T=A[E];T.setValue(n,o[T.id],m)}}}const ev=/(\w+)(\])?(\[|\.)?/g;function Np(b,n){b.seq.push(n),b.map[n.id]=n}function _M(b,n,o){const m=b.name,A=m.length;for(ev.lastIndex=0;;){const E=ev.exec(m);let T=E[1];const D=E[3];if("]"===E[2]&&(T|=0),void 0===D||"["===D&&ev.lastIndex+2===A){Np(o,void 0===D?new yo(T,b,n):new Ou(T,b,n));break}{let G=o.map[T];void 0===G&&(G=new J_(T),Np(o,G)),o=G}}}class Gg{constructor(n,o){this.seq=[],this.map={};const m=n.getProgramParameter(o,n.ACTIVE_UNIFORMS);for(let A=0;A<m;++A){const E=n.getActiveUniform(o,A);_M(E,n.getUniformLocation(o,E.name),this)}}setValue(n,o,m,A){const E=this.map[o];void 0!==E&&E.setValue(n,m,A)}setOptional(n,o,m){const A=o[m];void 0!==A&&this.setValue(n,m,A)}static upload(n,o,m,A){for(let E=0,w=o.length;E!==w;++E){const T=o[E],B=m[T.id];!1!==B.needsUpdate&&T.setValue(n,B.value,A)}}static seqWithValue(n,o){const m=[];for(let A=0,E=n.length;A!==E;++A){const w=n[A];w.id in o&&m.push(w)}return m}}function z1(b,n,o){const m=b.createShader(n);return b.shaderSource(m,o),b.compileShader(m),m}let vM=0;function G1(b,n,o){const m=b.getShaderParameter(n,b.COMPILE_STATUS),A=b.getShaderInfoLog(n).trim();if(m&&""===A)return"";const E=/ERROR: 0:(\d+)/.exec(A);if(E){const w=parseInt(E[1]);return o.toUpperCase()+"\n\n"+A+"\n\n"+function yM(b,n){const o=b.split("\n"),m=[],A=Math.max(n-6,0),E=Math.min(n+6,o.length);for(let w=A;w<E;w++){const T=w+1;m.push(`${T===n?">":" "} ${T}: ${o[w]}`)}return m.join("\n")}(b.getShaderSource(n),w)}return A}function EM(b,n){const o=function xM(b){switch(b){case dc:return["Linear","( value )"];case xr:return["sRGB","( value )"];default:return console.warn("THREE.WebGLProgram: Unsupported encoding:",b),["Linear","( value )"]}}(n);return"vec4 "+b+"( vec4 value ) { return LinearTo"+o[0]+o[1]+"; }"}function bM(b,n){let o;switch(n){case pa:o="Linear";break;case wr:o="Reinhard";break;case ds:o="OptimizedCineon";break;case Rs:o="ACESFilmic";break;case er:o="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",n),o="Linear"}return"vec3 "+b+"( vec3 color ) { return "+o+"ToneMapping( color ); }"}function Up(b){return""!==b}function tv(b,n){const o=n.numSpotLightShadows+n.numSpotLightMaps-n.numSpotLightShadowsWithMaps;return b.replace(/NUM_DIR_LIGHTS/g,n.numDirLights).replace(/NUM_SPOT_LIGHTS/g,n.numSpotLights).replace(/NUM_SPOT_LIGHT_MAPS/g,n.numSpotLightMaps).replace(/NUM_SPOT_LIGHT_COORDS/g,o).replace(/NUM_RECT_AREA_LIGHTS/g,n.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g,n.numPointLights).replace(/NUM_HEMI_LIGHTS/g,n.numHemiLights).replace(/NUM_DIR_LIGHT_SHADOWS/g,n.numDirLightShadows).replace(/NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS/g,n.numSpotLightShadowsWithMaps).replace(/NUM_SPOT_LIGHT_SHADOWS/g,n.numSpotLightShadows).replace(/NUM_POINT_LIGHT_SHADOWS/g,n.numPointLightShadows)}function nd(b,n){return b.replace(/NUM_CLIPPING_PLANES/g,n.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,n.numClippingPlanes-n.numClipIntersection)}const CM=/^[ \t]*#include +<([\w\d./]+)>/gm;function nv(b){return b.replace(CM,TM)}function TM(b,n){const o=bi[n];if(void 0===o)throw new Error("Can not resolve #include <"+n+">");return nv(o)}const IM=/#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;function V1(b){return b.replace(IM,PM)}function PM(b,n,o,m){let A="";for(let E=parseInt(n);E<parseInt(o);E++)A+=m.replace(/\[\s*i\s*\]/g,"[ "+E+" ]").replace(/UNROLLED_LOOP_INDEX/g,E);return A}function H1(b){let n="precision "+b.precision+" float;\nprecision "+b.precision+" int;";return"highp"===b.precision?n+="\n#define HIGH_PRECISION":"mediump"===b.precision?n+="\n#define MEDIUM_PRECISION":"lowp"===b.precision&&(n+="\n#define LOW_PRECISION"),n}function oa(b,n,o,m){const A=b.getContext(),E=o.defines;let w=o.vertexShader,T=o.fragmentShader;const B=function RM(b){let n="SHADOWMAP_TYPE_BASIC";return b.shadowMapType===K?n="SHADOWMAP_TYPE_PCF":b.shadowMapType===le?n="SHADOWMAP_TYPE_PCF_SOFT":b.shadowMapType===ce&&(n="SHADOWMAP_TYPE_VSM"),n}(o),D=function BM(b){let n="ENVMAP_TYPE_CUBE";if(b.envMap)switch(b.envMapMode){case ur:case vi:n="ENVMAP_TYPE_CUBE";break;case Ls:n="ENVMAP_TYPE_CUBE_UV"}return n}(o),N=function iv(b){let n="ENVMAP_MODE_REFLECTION";return b.envMap&&b.envMapMode===vi&&(n="ENVMAP_MODE_REFRACTION"),n}(o),G=function Vg(b){let n="ENVMAP_BLENDING_NONE";if(b.envMap)switch(b.combine){case Tn:n="ENVMAP_BLENDING_MULTIPLY";break;case sr:n="ENVMAP_BLENDING_MIX";break;case Ps:n="ENVMAP_BLENDING_ADD"}return n}(o),H=function Pc(b){const n=b.envMapCubeUVHeight;if(null===n)return null;const o=Math.log2(n)-2,m=1/n;return{texelWidth:1/(3*Math.max(Math.pow(2,o),112)),texelHeight:m,maxMip:o}}(o),Q=o.isWebGL2?"":function SM(b){return[b.extensionDerivatives||b.envMapCubeUVHeight||b.bumpMap||b.normalMapTangentSpace||b.clearcoatNormalMap||b.flatShading||"physical"===b.shaderID?"#extension GL_OES_standard_derivatives : enable":"",(b.extensionFragDepth||b.logarithmicDepthBuffer)&&b.rendererExtensionFragDepth?"#extension GL_EXT_frag_depth : enable":"",b.extensionDrawBuffers&&b.rendererExtensionDrawBuffers?"#extension GL_EXT_draw_buffers : require":"",(b.extensionShaderTextureLOD||b.envMap||b.transmission)&&b.rendererExtensionShaderTextureLod?"#extension GL_EXT_shader_texture_lod : enable":""].filter(Up).join("\n")}(o),Z=function MM(b){const n=[];for(const o in b){const m=b[o];!1!==m&&n.push("#define "+o+" "+m)}return n.join("\n")}(E),he=A.createProgram();let J,Y,ve=o.glslVersion?"#version "+o.glslVersion+"\n":"";o.isRawShaderMaterial?(J=[Z].filter(Up).join("\n"),J.length>0&&(J+="\n"),Y=[Q,Z].filter(Up).join("\n"),Y.length>0&&(Y+="\n")):(J=[H1(o),"#define SHADER_NAME "+o.shaderName,Z,o.instancing?"#define USE_INSTANCING":"",o.instancingColor?"#define USE_INSTANCING_COLOR":"",o.useFog&&o.fog?"#define USE_FOG":"",o.useFog&&o.fogExp2?"#define FOG_EXP2":"",o.map?"#define USE_MAP":"",o.envMap?"#define USE_ENVMAP":"",o.envMap?"#define "+N:"",o.lightMap?"#define USE_LIGHTMAP":"",o.aoMap?"#define USE_AOMAP":"",o.bumpMap?"#define USE_BUMPMAP":"",o.normalMap?"#define USE_NORMALMAP":"",o.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",o.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",o.displacementMap?"#define USE_DISPLACEMENTMAP":"",o.emissiveMap?"#define USE_EMISSIVEMAP":"",o.clearcoatMap?"#define USE_CLEARCOATMAP":"",o.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",o.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",o.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",o.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",o.specularMap?"#define USE_SPECULARMAP":"",o.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",o.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",o.roughnessMap?"#define USE_ROUGHNESSMAP":"",o.metalnessMap?"#define USE_METALNESSMAP":"",o.alphaMap?"#define USE_ALPHAMAP":"",o.transmission?"#define USE_TRANSMISSION":"",o.transmissionMap?"#define USE_TRANSMISSIONMAP":"",o.thicknessMap?"#define USE_THICKNESSMAP":"",o.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",o.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",o.mapUv?"#define MAP_UV "+o.mapUv:"",o.alphaMapUv?"#define ALPHAMAP_UV "+o.alphaMapUv:"",o.lightMapUv?"#define LIGHTMAP_UV "+o.lightMapUv:"",o.aoMapUv?"#define AOMAP_UV "+o.aoMapUv:"",o.emissiveMapUv?"#define EMISSIVEMAP_UV "+o.emissiveMapUv:"",o.bumpMapUv?"#define BUMPMAP_UV "+o.bumpMapUv:"",o.normalMapUv?"#define NORMALMAP_UV "+o.normalMapUv:"",o.displacementMapUv?"#define DISPLACEMENTMAP_UV "+o.displacementMapUv:"",o.metalnessMapUv?"#define METALNESSMAP_UV "+o.metalnessMapUv:"",o.roughnessMapUv?"#define ROUGHNESSMAP_UV "+o.roughnessMapUv:"",o.clearcoatMapUv?"#define CLEARCOATMAP_UV "+o.clearcoatMapUv:"",o.clearcoatNormalMapUv?"#define CLEARCOAT_NORMALMAP_UV "+o.clearcoatNormalMapUv:"",o.clearcoatRoughnessMapUv?"#define CLEARCOAT_ROUGHNESSMAP_UV "+o.clearcoatRoughnessMapUv:"",o.iridescenceMapUv?"#define IRIDESCENCEMAP_UV "+o.iridescenceMapUv:"",o.iridescenceThicknessMapUv?"#define IRIDESCENCE_THICKNESSMAP_UV "+o.iridescenceThicknessMapUv:"",o.sheenColorMapUv?"#define SHEEN_COLORMAP_UV "+o.sheenColorMapUv:"",o.sheenRoughnessMapUv?"#define SHEEN_ROUGHNESSMAP_UV "+o.sheenRoughnessMapUv:"",o.specularMapUv?"#define SPECULARMAP_UV "+o.specularMapUv:"",o.specularColorMapUv?"#define SPECULAR_COLORMAP_UV "+o.specularColorMapUv:"",o.specularIntensityMapUv?"#define SPECULAR_INTENSITYMAP_UV "+o.specularIntensityMapUv:"",o.transmissionMapUv?"#define TRANSMISSIONMAP_UV "+o.transmissionMapUv:"",o.thicknessMapUv?"#define THICKNESSMAP_UV "+o.thicknessMapUv:"",o.vertexTangents?"#define USE_TANGENT":"",o.vertexColors?"#define USE_COLOR":"",o.vertexAlphas?"#define USE_COLOR_ALPHA":"",o.vertexUvs2?"#define USE_UV2":"",o.pointsUvs?"#define USE_POINTS_UV":"",o.flatShading?"#define FLAT_SHADED":"",o.skinning?"#define USE_SKINNING":"",o.morphTargets?"#define USE_MORPHTARGETS":"",o.morphNormals&&!1===o.flatShading?"#define USE_MORPHNORMALS":"",o.morphColors&&o.isWebGL2?"#define USE_MORPHCOLORS":"",o.morphTargetsCount>0&&o.isWebGL2?"#define MORPHTARGETS_TEXTURE":"",o.morphTargetsCount>0&&o.isWebGL2?"#define MORPHTARGETS_TEXTURE_STRIDE "+o.morphTextureStride:"",o.morphTargetsCount>0&&o.isWebGL2?"#define MORPHTARGETS_COUNT "+o.morphTargetsCount:"",o.doubleSided?"#define DOUBLE_SIDED":"",o.flipSided?"#define FLIP_SIDED":"",o.shadowMapEnabled?"#define USE_SHADOWMAP":"",o.shadowMapEnabled?"#define "+B:"",o.sizeAttenuation?"#define USE_SIZEATTENUATION":"",o.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",o.logarithmicDepthBuffer&&o.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING","\tattribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR","\tattribute vec3 instanceColor;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_TANGENT","\tattribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )","\tattribute vec4 color;","#elif defined( USE_COLOR )","\tattribute vec3 color;","#endif","#if ( defined( USE_MORPHTARGETS ) && ! defined( MORPHTARGETS_TEXTURE ) )","\tattribute vec3 morphTarget0;","\tattribute vec3 morphTarget1;","\tattribute vec3 morphTarget2;","\tattribute vec3 morphTarget3;","\t#ifdef USE_MORPHNORMALS","\t\tattribute vec3 morphNormal0;","\t\tattribute vec3 morphNormal1;","\t\tattribute vec3 morphNormal2;","\t\tattribute vec3 morphNormal3;","\t#else","\t\tattribute vec3 morphTarget4;","\t\tattribute vec3 morphTarget5;","\t\tattribute vec3 morphTarget6;","\t\tattribute vec3 morphTarget7;","\t#endif","#endif","#ifdef USE_SKINNING","\tattribute vec4 skinIndex;","\tattribute vec4 skinWeight;","#endif","\n"].filter(Up).join("\n"),Y=[Q,H1(o),"#define SHADER_NAME "+o.shaderName,Z,o.useFog&&o.fog?"#define USE_FOG":"",o.useFog&&o.fogExp2?"#define FOG_EXP2":"",o.map?"#define USE_MAP":"",o.matcap?"#define USE_MATCAP":"",o.envMap?"#define USE_ENVMAP":"",o.envMap?"#define "+D:"",o.envMap?"#define "+N:"",o.envMap?"#define "+G:"",H?"#define CUBEUV_TEXEL_WIDTH "+H.texelWidth:"",H?"#define CUBEUV_TEXEL_HEIGHT "+H.texelHeight:"",H?"#define CUBEUV_MAX_MIP "+H.maxMip+".0":"",o.lightMap?"#define USE_LIGHTMAP":"",o.aoMap?"#define USE_AOMAP":"",o.bumpMap?"#define USE_BUMPMAP":"",o.normalMap?"#define USE_NORMALMAP":"",o.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",o.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",o.emissiveMap?"#define USE_EMISSIVEMAP":"",o.clearcoat?"#define USE_CLEARCOAT":"",o.clearcoatMap?"#define USE_CLEARCOATMAP":"",o.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",o.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",o.iridescence?"#define USE_IRIDESCENCE":"",o.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",o.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",o.specularMap?"#define USE_SPECULARMAP":"",o.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",o.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",o.roughnessMap?"#define USE_ROUGHNESSMAP":"",o.metalnessMap?"#define USE_METALNESSMAP":"",o.alphaMap?"#define USE_ALPHAMAP":"",o.alphaTest?"#define USE_ALPHATEST":"",o.sheen?"#define USE_SHEEN":"",o.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",o.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",o.transmission?"#define USE_TRANSMISSION":"",o.transmissionMap?"#define USE_TRANSMISSIONMAP":"",o.thicknessMap?"#define USE_THICKNESSMAP":"",o.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",o.vertexTangents?"#define USE_TANGENT":"",o.vertexColors||o.instancingColor?"#define USE_COLOR":"",o.vertexAlphas?"#define USE_COLOR_ALPHA":"",o.vertexUvs2?"#define USE_UV2":"",o.pointsUvs?"#define USE_POINTS_UV":"",o.gradientMap?"#define USE_GRADIENTMAP":"",o.flatShading?"#define FLAT_SHADED":"",o.doubleSided?"#define DOUBLE_SIDED":"",o.flipSided?"#define FLIP_SIDED":"",o.shadowMapEnabled?"#define USE_SHADOWMAP":"",o.shadowMapEnabled?"#define "+B:"",o.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",o.useLegacyLights?"#define LEGACY_LIGHTS":"",o.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",o.logarithmicDepthBuffer&&o.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",o.toneMapping!==rr?"#define TONE_MAPPING":"",o.toneMapping!==rr?bi.tonemapping_pars_fragment:"",o.toneMapping!==rr?bM("toneMapping",o.toneMapping):"",o.dithering?"#define DITHERING":"",o.opaque?"#define OPAQUE":"",bi.encodings_pars_fragment,EM("linearToOutputTexel",o.outputEncoding),o.useDepthPacking?"#define DEPTH_PACKING "+o.depthPacking:"","\n"].filter(Up).join("\n")),w=nv(w),w=tv(w,o),w=nd(w,o),T=nv(T),T=tv(T,o),T=nd(T,o),w=V1(w),T=V1(T),o.isWebGL2&&!0!==o.isRawShaderMaterial&&(ve="#version 300 es\n",J=["precision mediump sampler2DArray;","#define attribute in","#define varying out","#define texture2D texture"].join("\n")+"\n"+J,Y=["#define varying in",o.glslVersion===tp?"":"layout(location = 0) out highp vec4 pc_fragColor;",o.glslVersion===tp?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth","#define texture2D texture","#define textureCube texture","#define texture2DProj textureProj","#define texture2DLodEXT textureLod","#define texture2DProjLodEXT textureProjLod","#define textureCubeLodEXT textureLod","#define texture2DGradEXT textureGrad","#define texture2DProjGradEXT textureProjGrad","#define textureCubeGradEXT textureGrad"].join("\n")+"\n"+Y);const Ae=ve+Y+T,Ie=z1(A,A.VERTEX_SHADER,ve+J+w),Ne=z1(A,A.FRAGMENT_SHADER,Ae);if(A.attachShader(he,Ie),A.attachShader(he,Ne),void 0!==o.index0AttributeName?A.bindAttribLocation(he,0,o.index0AttributeName):!0===o.morphTargets&&A.bindAttribLocation(he,0,"position"),A.linkProgram(he),b.debug.checkShaderErrors){const Se=A.getProgramInfoLog(he).trim(),Le=A.getShaderInfoLog(Ie).trim(),vt=A.getShaderInfoLog(Ne).trim();let Pt=!0,ot=!0;if(!1===A.getProgramParameter(he,A.LINK_STATUS))if(Pt=!1,"function"==typeof b.debug.onShaderError)b.debug.onShaderError(A,he,Ie,Ne);else{const dt=G1(A,Ie,"vertex"),Et=G1(A,Ne,"fragment");console.error("THREE.WebGLProgram: Shader Error "+A.getError()+" - VALIDATE_STATUS "+A.getProgramParameter(he,A.VALIDATE_STATUS)+"\n\nProgram Info Log: "+Se+"\n"+dt+"\n"+Et)}else""!==Se?console.warn("THREE.WebGLProgram: Program Info Log:",Se):(""===Le||""===vt)&&(ot=!1);ot&&(this.diagnostics={runnable:Pt,programLog:Se,vertexShader:{log:Le,prefix:J},fragmentShader:{log:vt,prefix:Y}})}let Xe,Qe;return A.deleteShader(Ie),A.deleteShader(Ne),this.getUniforms=function(){return void 0===Xe&&(Xe=new Gg(A,he)),Xe},this.getAttributes=function(){return void 0===Qe&&(Qe=function wM(b,n){const o={},m=b.getProgramParameter(n,b.ACTIVE_ATTRIBUTES);for(let A=0;A<m;A++){const E=b.getActiveAttrib(n,A),w=E.name;let T=1;E.type===b.FLOAT_MAT2&&(T=2),E.type===b.FLOAT_MAT3&&(T=3),E.type===b.FLOAT_MAT4&&(T=4),o[w]={type:E.type,location:b.getAttribLocation(n,w),locationSize:T}}return o}(A,he)),Qe},this.destroy=function(){m.releaseStatesOfProgram(this),A.deleteProgram(he),this.program=void 0},this.name=o.shaderName,this.id=vM++,this.cacheKey=n,this.usedTimes=1,this.program=he,this.vertexShader=Ie,this.fragmentShader=Ne,this}let rv=0;class Ah{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(n){const m=n.fragmentShader,A=this._getShaderStage(n.vertexShader),E=this._getShaderStage(m),w=this._getShaderCacheForMaterial(n);return!1===w.has(A)&&(w.add(A),A.usedTimes++),!1===w.has(E)&&(w.add(E),E.usedTimes++),this}remove(n){const o=this.materialCache.get(n);for(const m of o)m.usedTimes--,0===m.usedTimes&&this.shaderCache.delete(m.code);return this.materialCache.delete(n),this}getVertexShaderID(n){return this._getShaderStage(n.vertexShader).id}getFragmentShaderID(n){return this._getShaderStage(n.fragmentShader).id}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(n){const o=this.materialCache;let m=o.get(n);return void 0===m&&(m=new Set,o.set(n,m)),m}_getShaderStage(n){const o=this.shaderCache;let m=o.get(n);return void 0===m&&(m=new Nu(n),o.set(n,m)),m}}class Nu{constructor(n){this.id=rv++,this.code=n,this.usedTimes=0}}
83function Za(b,n,o,m,A,E,w){const T=new zl,B=new Ah,D=[],N=A.isWebGL2,G=A.logarithmicDepthBuffer,H=A.vertexTextures;let Q=A.precision;const Z={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 he(Se){return 1===Se?"uv2":"uv"}return{getParameters:function J(Se,Le,vt,Pt,ot){const dt=Pt.fog,Et=ot.geometry,cn=(Se.isMeshStandardMaterial?o:n).get(Se.envMap||(Se.isMeshStandardMaterial?Pt.environment:null)),Ht=cn&&cn.mapping===Ls?cn.image.height:null,nn=Z[Se.type];null!==Se.precision&&(Q=A.getMaxPrecision(Se.precision),Q!==Se.precision&&console.warn("THREE.WebGLProgram.getParameters:",Se.precision,"not supported, using",Q,"instead."));const dn=Et.morphAttributes.position||Et.morphAttributes.normal||Et.morphAttributes.color,Yn=void 0!==dn?dn.length:0;let wt,Zt,En,Bn,In=0;if(void 0!==Et.morphAttributes.position&&(In=1),void 0!==Et.morphAttributes.normal&&(In=2),void 0!==Et.morphAttributes.color&&(In=3),nn){const Ln=Oa[nn];wt=Ln.vertexShader,Zt=Ln.fragmentShader}else wt=Se.vertexShader,Zt=Se.fragmentShader,B.update(Se),En=B.getVertexShaderID(Se),Bn=B.getFragmentShaderID(Se);const $e=b.getRenderTarget(),Ei=!0===ot.isInstancedMesh,fi=!!Se.map,jn=!!cn,Jt=!!Se.aoMap,kt=!!Se.lightMap,en=!!Se.bumpMap,Wn=!!Se.normalMap,bn=!!Se.displacementMap,di=!!Se.emissiveMap,pi=!!Se.metalnessMap,ai=!!Se.roughnessMap,Gi=Se.clearcoat>0,nr=Se.iridescence>0,Ue=Se.sheen>0,Te=Se.transmission>0,yt=Gi&&!!Se.clearcoatMap,an=Gi&&!!Se.clearcoatNormalMap,un=Gi&&!!Se.clearcoatRoughnessMap,wn=nr&&!!Se.iridescenceMap,yi=nr&&!!Se.iridescenceThicknessMap,Gn=Ue&&!!Se.sheenColorMap,Bt=Ue&&!!Se.sheenRoughnessMap,Kn=!!Se.specularMap,oi=!!Se.specularColorMap,mi=!!Se.specularIntensityMap,Xn=Te&&!!Se.transmissionMap,$n=Te&&!!Se.thicknessMap,_r=!!Se.alphaMap,Ke=!!Se.extensions,It=!!Et.attributes.uv2;return{isWebGL2:N,shaderID:nn,shaderName:Se.type,vertexShader:wt,fragmentShader:Zt,defines:Se.defines,customVertexShaderID:En,customFragmentShaderID:Bn,isRawShaderMaterial:!0===Se.isRawShaderMaterial,glslVersion:Se.glslVersion,precision:Q,instancing:Ei,instancingColor:Ei&&null!==ot.instanceColor,supportsVertexTextures:H,outputEncoding:null===$e?b.outputEncoding:!0===$e.isXRRenderTarget?$e.texture.encoding:dc,map:fi,matcap:!!Se.matcap,envMap:jn,envMapMode:jn&&cn.mapping,envMapCubeUVHeight:Ht,aoMap:Jt,lightMap:kt,bumpMap:en,normalMap:Wn,displacementMap:H&&bn,emissiveMap:di,normalMapObjectSpace:Wn&&1===Se.normalMapType,normalMapTangentSpace:Wn&&0===Se.normalMapType,decodeVideoTexture:fi&&!0===Se.map.isVideoTexture&&Se.map.encoding===xr,metalnessMap:pi,roughnessMap:ai,clearcoat:Gi,clearcoatMap:yt,clearcoatNormalMap:an,clearcoatRoughnessMap:un,iridescence:nr,iridescenceMap:wn,iridescenceThicknessMap:yi,sheen:Ue,sheenColorMap:Gn,sheenRoughnessMap:Bt,specularMap:Kn,specularColorMap:oi,specularIntensityMap:mi,transmission:Te,transmissionMap:Xn,thicknessMap:$n,gradientMap:!!Se.gradientMap,opaque:!1===Se.transparent&&1===Se.blending,alphaMap:_r,alphaTest:Se.alphaTest>0,combine:Se.combine,mapUv:fi&&he(Se.map.channel),aoMapUv:Jt&&he(Se.aoMap.channel),lightMapUv:kt&&he(Se.lightMap.channel),bumpMapUv:en&&he(Se.bumpMap.channel),normalMapUv:Wn&&he(Se.normalMap.channel),displacementMapUv:bn&&he(Se.displacementMap.channel),emissiveMapUv:di&&he(Se.emissiveMap.channel),metalnessMapUv:pi&&he(Se.metalnessMap.channel),roughnessMapUv:ai&&he(Se.roughnessMap.channel),clearcoatMapUv:yt&&he(Se.clearcoatMap.channel),clearcoatNormalMapUv:an&&he(Se.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:un&&he(Se.clearcoatRoughnessMap.channel),iridescenceMapUv:wn&&he(Se.iridescenceMap.channel),iridescenceThicknessMapUv:yi&&he(Se.iridescenceThicknessMap.channel),sheenColorMapUv:Gn&&he(Se.sheenColorMap.channel),sheenRoughnessMapUv:Bt&&he(Se.sheenRoughnessMap.channel),specularMapUv:Kn&&he(Se.specularMap.channel),specularColorMapUv:oi&&he(Se.specularColorMap.channel),specularIntensityMapUv:mi&&he(Se.specularIntensityMap.channel),transmissionMapUv:Xn&&he(Se.transmissionMap.channel),thicknessMapUv:$n&&he(Se.thicknessMap.channel),alphaMapUv:_r&&he(Se.alphaMap.channel),vertexTangents:Wn&&!!Et.attributes.tangent,vertexColors:Se.vertexColors,vertexAlphas:!0===Se.vertexColors&&!!Et.attributes.color&&4===Et.attributes.color.itemSize,vertexUvs2:It,pointsUvs:!0===ot.isPoints&&!!Et.attributes.uv&&(fi||_r),fog:!!dt,useFog:!0===Se.fog,fogExp2:dt&&dt.isFogExp2,flatShading:!0===Se.flatShading,sizeAttenuation:!0===Se.sizeAttenuation,logarithmicDepthBuffer:G,skinning:!0===ot.isSkinnedMesh,morphTargets:void 0!==Et.morphAttributes.position,morphNormals:void 0!==Et.morphAttributes.normal,morphColors:void 0!==Et.morphAttributes.color,morphTargetsCount:Yn,morphTextureStride:In,numDirLights:Le.directional.length,numPointLights:Le.point.length,numSpotLights:Le.spot.length,numSpotLightMaps:Le.spotLightMap.length,numRectAreaLights:Le.rectArea.length,numHemiLights:Le.hemi.length,numDirLightShadows:Le.directionalShadowMap.length,numPointLightShadows:Le.pointShadowMap.length,numSpotLightShadows:Le.spotShadowMap.length,numSpotLightShadowsWithMaps:Le.numSpotLightShadowsWithMaps,numClippingPlanes:w.numPlanes,numClipIntersection:w.numIntersection,dithering:Se.dithering,shadowMapEnabled:b.shadowMap.enabled&&vt.length>0,shadowMapType:b.shadowMap.type,toneMapping:Se.toneMapped?b.toneMapping:rr,useLegacyLights:b.useLegacyLights,premultipliedAlpha:Se.premultipliedAlpha,doubleSided:2===Se.side,flipSided:1===Se.side,useDepthPacking:Se.depthPacking>=0,depthPacking:Se.depthPacking||0,index0AttributeName:Se.index0AttributeName,extensionDerivatives:Ke&&!0===Se.extensions.derivatives,extensionFragDepth:Ke&&!0===Se.extensions.fragDepth,extensionDrawBuffers:Ke&&!0===Se.extensions.drawBuffers,extensionShaderTextureLOD:Ke&&!0===Se.extensions.shaderTextureLOD,rendererExtensionFragDepth:N||m.has("EXT_frag_depth"),rendererExtensionDrawBuffers:N||m.has("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:N||m.has("EXT_shader_texture_lod"),customProgramCacheKey:Se.customProgramCacheKey()}},getProgramCacheKey:function Y(Se){const Le=[];if(Se.shaderID?Le.push(Se.shaderID):(Le.push(Se.customVertexShaderID),Le.push(Se.customFragmentShaderID)),void 0!==Se.defines)for(const vt in Se.defines)Le.push(vt),Le.pu
vendor: 6,645 bytes, line 83
83sh(Se.defines[vt]);return!1===Se.isRawShaderMaterial&&(function ve(Se,Le){Se.push(Le.precision),Se.push(Le.outputEncoding),Se.push(Le.envMapMode),Se.push(Le.envMapCubeUVHeight),Se.push(Le.mapUv),Se.push(Le.alphaMapUv),Se.push(Le.lightMapUv),Se.push(Le.aoMapUv),Se.push(Le.bumpMapUv),Se.push(Le.normalMapUv),Se.push(Le.displacementMapUv),Se.push(Le.emissiveMapUv),Se.push(Le.metalnessMapUv),Se.push(Le.roughnessMapUv),Se.push(Le.clearcoatMapUv),Se.push(Le.clearcoatNormalMapUv),Se.push(Le.clearcoatRoughnessMapUv),Se.push(Le.iridescenceMapUv),Se.push(Le.iridescenceThicknessMapUv),Se.push(Le.sheenColorMapUv),Se.push(Le.sheenRoughnessMapUv),Se.push(Le.specularMapUv),Se.push(Le.specularColorMapUv),Se.push(Le.specularIntensityMapUv),Se.push(Le.transmissionMapUv),Se.push(Le.thicknessMapUv),Se.push(Le.combine),Se.push(Le.fogExp2),Se.push(Le.sizeAttenuation),Se.push(Le.morphTargetsCount),Se.push(Le.morphAttributeCount),Se.push(Le.numDirLights),Se.push(Le.numPointLights),Se.push(Le.numSpotLights),Se.push(Le.numSpotLightMaps),Se.push(Le.numHemiLights),Se.push(Le.numRectAreaLights),Se.push(Le.numDirLightShadows),Se.push(Le.numPointLightShadows),Se.push(Le.numSpotLightShadows),Se.push(Le.numSpotLightShadowsWithMaps),Se.push(Le.shadowMapType),Se.push(Le.toneMapping),Se.push(Le.numClippingPlanes),Se.push(Le.numClipIntersection),Se.push(Le.depthPacking)}(Le,Se),function pe(Se,Le){T.disableAll(),Le.isWebGL2&&T.enable(0),Le.supportsVertexTextures&&T.enable(1),Le.instancing&&T.enable(2),Le.instancingColor&&T.enable(3),Le.matcap&&T.enable(4),Le.envMap&&T.enable(5),Le.normalMapObjectSpace&&T.enable(6),Le.normalMapTangentSpace&&T.enable(7),Le.clearcoat&&T.enable(8),Le.iridescence&&T.enable(9),Le.alphaTest&&T.enable(10),Le.vertexColors&&T.enable(11),Le.vertexAlphas&&T.enable(12),Le.vertexUvs2&&T.enable(13),Le.vertexTangents&&T.enable(14),Se.push(T.mask),T.disableAll(),Le.fog&&T.enable(0),Le.useFog&&T.enable(1),Le.flatShading&&T.enable(2),Le.logarithmicDepthBuffer&&T.enable(3),Le.skinning&&T.enable(4),Le.morphTargets&&T.enable(5),Le.morphNormals&&T.enable(6),Le.morphColors&&T.enable(7),Le.premultipliedAlpha&&T.enable(8),Le.shadowMapEnabled&&T.enable(9),Le.useLegacyLights&&T.enable(10),Le.doubleSided&&T.enable(11),Le.flipSided&&T.enable(12),Le.useDepthPacking&&T.enable(13),Le.dithering&&T.enable(14),Le.transmission&&T.enable(15),Le.sheen&&T.enable(16),Le.decodeVideoTexture&&T.enable(17),Le.opaque&&T.enable(18),Le.pointsUvs&&T.enable(19),Se.push(T.mask)}(Le,Se),Le.push(b.outputEncoding)),Le.push(Se.customProgramCacheKey),Le.join()},getUniforms:function Ae(Se){const Le=Z[Se.type];let vt;return vt=Le?Ag.clone(Oa[Le].uniforms):Se.uniforms,vt},acquireProgram:function Ie(Se,Le){let vt;for(let Pt=0,ot=D.length;Pt<ot;Pt++){const dt=D[Pt];if(dt.cacheKey===Le){vt=dt,++vt.usedTimes;break}}return void 0===vt&&(vt=new oa(b,Le,Se,E),D.push(vt)),vt},releaseProgram:function Ne(Se){if(0==--Se.usedTimes){const Le=D.indexOf(Se);D[Le]=D[D.length-1],D.pop(),Se.destroy()}},releaseShaderCache:function Xe(Se){B.remove(Se)},programs:D,dispose:function Qe(){B.dispose()}}}function jr(){let b=new WeakMap;return{get:function n(E){let w=b.get(E);return void 0===w&&(w={},b.set(E,w)),w},remove:function o(E){b.delete(E)},update:function m(E,w,T){b.get(E)[w]=T},dispose:function A(){b=new WeakMap}}}function Hg(b,n){return b.groupOrder!==n.groupOrder?b.groupOrder-n.groupOrder:b.renderOrder!==n.renderOrder?b.renderOrder-n.renderOrder:b.material.id!==n.material.id?b.material.id-n.material.id:b.z!==n.z?b.z-n.z:b.id-n.id}function sv(b,n){return b.groupOrder!==n.groupOrder?b.groupOrder-n.groupOrder:b.renderOrder!==n.renderOrder?b.renderOrder-n.renderOrder:b.z!==n.z?n.z-b.z:b.id-n.id}function av(){const b=[];let n=0;const o=[],m=[],A=[];function w(G,H,Q,Z,he,J){let Y=b[n];return void 0===Y?(Y={id:G.id,object:G,geometry:H,material:Q,groupOrder:Z,renderOrder:G.renderOrder,z:he,group:J},b[n]=Y):(Y.id=G.id,Y.object=G,Y.geometry=H,Y.material=Q,Y.groupOrder=Z,Y.renderOrder=G.renderOrder,Y.z=he,Y.group=J),n++,Y}return{opaque:o,transmissive:m,transparent:A,init:function E(){n=0,o.length=0,m.length=0,A.length=0},push:function T(G,H,Q,Z,he,J){const Y=w(G,H,Q,Z,he,J);Q.transmission>0?m.push(Y):!0===Q.transparent?A.push(Y):o.push(Y)},unshift:function B(G,H,Q,Z,he,J){const Y=w(G,H,Q,Z,he,J);Q.transmission>0?m.unshift(Y):!0===Q.transparent?A.unshift(Y):o.unshift(Y)},finish:function N(){for(let G=n,H=b.length;G<H;G++){const Q=b[G];if(null===Q.id)break;Q.id=null,Q.object=null,Q.geometry=null,Q.material=null,Q.group=null}},sort:function D(G,H){o.length>1&&o.sort(G||Hg),m.length>1&&m.sort(H||sv),A.length>1&&A.sort(H||sv)}}}function id(){let b=new WeakMap;return{get:function n(m,A){const E=b.get(m);let w;return void 0===E?(w=new av,b.set(m,[w])):A>=E.length?(w=new av,E.push(w)):w=E[A],w},dispose:function o(){b=new WeakMap}}}function Q1(){const b={};return{get:function(n){if(void 0!==b[n.id])return b[n.id];let o;switch(n.type){case"DirectionalLight":o={direction:new De,color:new Dn};break;case"SpotLight":o={position:new De,direction:new De,color:new Dn,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":o={position:new De,color:new Dn,distance:0,decay:0};break;case"HemisphereLight":o={direction:new De,skyColor:new Dn,groundColor:new Dn};break;case"RectAreaLight":o={color:new Dn,position:new De,halfWidth:new De,halfHeight:new De}}return b[n.id]=o,o}}}let X1=0;function q1(b,n){return(n.castShadow?2:0)-(b.castShadow?2:0)+(n.map?1:0)-(b.map?1:0)}function Y1(b,n){const o=new Q1,m=function W1(){const b={};return{get:function(n){if(void 0!==b[n.id])return b[n.id];let o;switch(n.type){case"DirectionalLight":case"SpotLight":o={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new qt};break;case"PointLight":o={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new qt,shadowCameraNear:1,shadowCameraFar:1e3}}return b[n.id]=o,o}}}(),A={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-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};for(let N=0;N<9;N++)A.probe.push(new De);const E=new De,w=new Ti,T=new Ti;return{setup:function B(N,G){let H=0,Q=0,Z=0;for(let vt=0;vt<9;vt++)A.probe[vt].set(0,0,0);let he=0,J=0,Y=0,ve=0,pe=0,Ae=0,Ie=0,Ne=0,Xe=0,Qe=0;N.sort(q1);const Se=!0===G?Math.PI:1;
vendor: 6,279 bytes, line 83
83for(let vt=0,Pt=N.length;vt<Pt;vt++){const ot=N[vt],dt=ot.color,Et=ot.intensity,tn=ot.distance,cn=ot.shadow&&ot.shadow.map?ot.shadow.map.texture:null;if(ot.isAmbientLight)H+=dt.r*Et*Se,Q+=dt.g*Et*Se,Z+=dt.b*Et*Se;else if(ot.isLightProbe)for(let Ht=0;Ht<9;Ht++)A.probe[Ht].addScaledVector(ot.sh.coefficients[Ht],Et);else if(ot.isDirectionalLight){const Ht=o.get(ot);if(Ht.color.copy(ot.color).multiplyScalar(ot.intensity*Se),ot.castShadow){const nn=ot.shadow,dn=m.get(ot);dn.shadowBias=nn.bias,dn.shadowNormalBias=nn.normalBias,dn.shadowRadius=nn.radius,dn.shadowMapSize=nn.mapSize,A.directionalShadow[he]=dn,A.directionalShadowMap[he]=cn,A.directionalShadowMatrix[he]=ot.shadow.matrix,Ae++}A.directional[he]=Ht,he++}else if(ot.isSpotLight){const Ht=o.get(ot);Ht.position.setFromMatrixPosition(ot.matrixWorld),Ht.color.copy(dt).multiplyScalar(Et*Se),Ht.distance=tn,Ht.coneCos=Math.cos(ot.angle),Ht.penumbraCos=Math.cos(ot.angle*(1-ot.penumbra)),Ht.decay=ot.decay,A.spot[Y]=Ht;const nn=ot.shadow;if(ot.map&&(A.spotLightMap[Xe]=ot.map,Xe++,nn.updateMatrices(ot),ot.castShadow&&Qe++),A.spotLightMatrix[Y]=nn.matrix,ot.castShadow){const dn=m.get(ot);dn.shadowBias=nn.bias,dn.shadowNormalBias=nn.normalBias,dn.shadowRadius=nn.radius,dn.shadowMapSize=nn.mapSize,A.spotShadow[Y]=dn,A.spotShadowMap[Y]=cn,Ne++}Y++}else if(ot.isRectAreaLight){const Ht=o.get(ot);Ht.color.copy(dt).multiplyScalar(Et),Ht.halfWidth.set(.5*ot.width,0,0),Ht.halfHeight.set(0,.5*ot.height,0),A.rectArea[ve]=Ht,ve++}else if(ot.isPointLight){const Ht=o.get(ot);if(Ht.color.copy(ot.color).multiplyScalar(ot.intensity*Se),Ht.distance=ot.distance,Ht.decay=ot.decay,ot.castShadow){const nn=ot.shadow,dn=m.get(ot);dn.shadowBias=nn.bias,dn.shadowNormalBias=nn.normalBias,dn.shadowRadius=nn.radius,dn.shadowMapSize=nn.mapSize,dn.shadowCameraNear=nn.camera.near,dn.shadowCameraFar=nn.camera.far,A.pointShadow[J]=dn,A.pointShadowMap[J]=cn,A.pointShadowMatrix[J]=ot.shadow.matrix,Ie++}A.point[J]=Ht,J++}else if(ot.isHemisphereLight){const Ht=o.get(ot);Ht.skyColor.copy(ot.color).multiplyScalar(Et*Se),Ht.groundColor.copy(ot.groundColor).multiplyScalar(Et*Se),A.hemi[pe]=Ht,pe++}}ve>0&&(n.isWebGL2||!0===b.has("OES_texture_float_linear")?(A.rectAreaLTC1=gn.LTC_FLOAT_1,A.rectAreaLTC2=gn.LTC_FLOAT_2):!0===b.has("OES_texture_half_float_linear")?(A.rectAreaLTC1=gn.LTC_HALF_1,A.rectAreaLTC2=gn.LTC_HALF_2):console.error("THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.")),A.ambient[0]=H,A.ambient[1]=Q,A.ambient[2]=Z;const Le=A.hash;(Le.directionalLength!==he||Le.pointLength!==J||Le.spotLength!==Y||Le.rectAreaLength!==ve||Le.hemiLength!==pe||Le.numDirectionalShadows!==Ae||Le.numPointShadows!==Ie||Le.numSpotShadows!==Ne||Le.numSpotMaps!==Xe)&&(A.directional.length=he,A.spot.length=Y,A.rectArea.length=ve,A.point.length=J,A.hemi.length=pe,A.directionalShadow.length=Ae,A.directionalShadowMap.length=Ae,A.pointShadow.length=Ie,A.pointShadowMap.length=Ie,A.spotShadow.length=Ne,A.spotShadowMap.length=Ne,A.directionalShadowMatrix.length=Ae,A.pointShadowMatrix.length=Ie,A.spotLightMatrix.length=Ne+Xe-Qe,A.spotLightMap.length=Xe,A.numSpotLightShadowsWithMaps=Qe,Le.directionalLength=he,Le.pointLength=J,Le.spotLength=Y,Le.rectAreaLength=ve,Le.hemiLength=pe,Le.numDirectionalShadows=Ae,Le.numPointShadows=Ie,Le.numSpotShadows=Ne,Le.numSpotMaps=Xe,A.version=X1++)},setupView:function D(N,G){let H=0,Q=0,Z=0,he=0,J=0;const Y=G.matrixWorldInverse;for(let ve=0,pe=N.length;ve<pe;ve++){const Ae=N[ve];if(Ae.isDirectionalLight){const Ie=A.directional[H];Ie.direction.setFromMatrixPosition(Ae.matrixWorld),E.setFromMatrixPosition(Ae.target.matrixWorld),Ie.direction.sub(E),Ie.direction.transformDirection(Y),H++}else if(Ae.isSpotLight){const Ie=A.spot[Z];Ie.position.setFromMatrixPosition(Ae.matrixWorld),Ie.position.applyMatrix4(Y),Ie.direction.setFromMatrixPosition(Ae.matrixWorld),E.setFromMatrixPosition(Ae.target.matrixWorld),Ie.direction.sub(E),Ie.direction.transformDirection(Y),Z++}else if(Ae.isRectAreaLight){const Ie=A.rectArea[he];Ie.position.setFromMatrixPosition(Ae.matrixWorld),Ie.position.applyMatrix4(Y),T.identity(),w.copy(Ae.matrixWorld),w.premultiply(Y),T.extractRotation(w),Ie.halfWidth.set(.5*Ae.width,0,0),Ie.halfHeight.set(0,.5*Ae.height,0),Ie.halfWidth.applyMatrix4(T),Ie.halfHeight.applyMatrix4(T),he++}else if(Ae.isPointLight){const Ie=A.point[Q];Ie.position.setFromMatrixPosition(Ae.matrixWorld),Ie.position.applyMatrix4(Y),Q++}else if(Ae.isHemisphereLight){const Ie=A.hemi[J];Ie.direction.setFromMatrixPosition(Ae.matrixWorld),Ie.direction.transformDirection(Y),J++}}},state:A}}function ov(b,n){const o=new Y1(b,n),m=[],A=[];return{init:function E(){m.length=0,A.length=0},state:{lightsArray:m,shadowsArray:A,lights:o},setupLights:function B(G){o.setup(m,G)},setupLightsView:function D(G){o.setupView(m,G)},pushLight:function w(G){m.push(G)},pushShadow:function T(G){A.push(G)}}}function $1(b,n){let o=new WeakMap;return{get:function m(E,w=0){const T=o.get(E);let B;return void 0===T?(B=new ov(b,n),o.set(E,[B])):w>=T.length?(B=new ov(b,n),T.push(B)):B=T[w],B},dispose:function A(){o=new WeakMap}}}class Qg extends qs{constructor(n){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=3200,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(n)}copy(n){return super.copy(n),this.depthPacking=n.depthPacking,this.map=n.map,this.alphaMap=n.alphaMap,this.displacementMap=n.displacementMap,this.displacementScale=n.displacementScale,this.displacementBias=n.displacementBias,this.wireframe=n.wireframe,this.wireframeLinewidth=n.wireframeLinewidth,this}}class Wg extends qs{constructor(n){super(),this.isMeshDistanceMaterial=!0,this.type="MeshDistanceMaterial",this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(n)}copy(n){return super.copy(n),this.map=n.map,this.alphaMap=n.alphaMap,this.displacementMap=n.displacementMap,this.displacementScale=n.displacementScale,this.displacementBias=n.displacementBias,this}}function lv(b,n,o){let m=new bp;const A=new qt,E=new qt,w=new fr,T=new Qg({depthPacking:3201}),B=new Wg,D={},N=o.maxTextureSize,G={[se]:1,[be]:0,[ae]:2}
vendor: 4,321 bytes, line 83
83,H=new hl({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new qt},radius:{value:4}},vertexShader:"void main() {\n\tgl_Position = vec4( position, 1.0 );\n}",fragmentShader:"uniform sampler2D shadow_pass;\nuniform vec2 resolution;\nuniform float radius;\n#include <packing>\nvoid main() {\n\tconst float samples = float( VSM_SAMPLES );\n\tfloat mean = 0.0;\n\tfloat squared_mean = 0.0;\n\tfloat uvStride = samples <= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 );\n\tfloat uvStart = samples <= 1.0 ? 0.0 : - 1.0;\n\tfor ( float i = 0.0; i < samples; i ++ ) {\n\t\tfloat uvOffset = uvStart + i * uvStride;\n\t\t#ifdef HORIZONTAL_PASS\n\t\t\tvec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ) );\n\t\t\tmean += distribution.x;\n\t\t\tsquared_mean += distribution.y * distribution.y + distribution.x * distribution.x;\n\t\t#else\n\t\t\tfloat depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ) );\n\t\t\tmean += depth;\n\t\t\tsquared_mean += depth * depth;\n\t\t#endif\n\t}\n\tmean = mean / samples;\n\tsquared_mean = squared_mean / samples;\n\tfloat std_dev = sqrt( squared_mean - mean * mean );\n\tgl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) );\n}"}),Q=H.clone();Q.defines.HORIZONTAL_PASS=1;const Z=new Fi;Z.setAttribute("position",new Cr(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const he=new Fs(Z,H),J=this;function Y(Ae,Ie){const Ne=n.update(he);H.defines.VSM_SAMPLES!==Ae.blurSamples&&(H.defines.VSM_SAMPLES=Ae.blurSamples,Q.defines.VSM_SAMPLES=Ae.blurSamples,H.needsUpdate=!0,Q.needsUpdate=!0),null===Ae.mapPass&&(Ae.mapPass=new Fo(A.x,A.y)),H.uniforms.shadow_pass.value=Ae.map.texture,H.uniforms.resolution.value=Ae.mapSize,H.uniforms.radius.value=Ae.radius,b.setRenderTarget(Ae.mapPass),b.clear(),b.renderBufferDirect(Ie,null,Ne,H,he,null),Q.uniforms.shadow_pass.value=Ae.mapPass.texture,Q.uniforms.resolution.value=Ae.mapSize,Q.uniforms.radius.value=Ae.radius,b.setRenderTarget(Ae.map),b.clear(),b.renderBufferDirect(Ie,null,Ne,Q,he,null)}function ve(Ae,Ie,Ne,Xe){let Qe=null;const Se=!0===Ne.isPointLight?Ae.customDistanceMaterial:Ae.customDepthMaterial;if(void 0!==Se)Qe=Se;else if(Qe=!0===Ne.isPointLight?B:T,b.localClippingEnabled&&!0===Ie.clipShadows&&Array.isArray(Ie.clippingPlanes)&&0!==Ie.clippingPlanes.length||Ie.displacementMap&&0!==Ie.displacementScale||Ie.alphaMap&&Ie.alphaTest>0||Ie.map&&Ie.alphaTest>0){const Le=Qe.uuid,vt=Ie.uuid;let Pt=D[Le];void 0===Pt&&(Pt={},D[Le]=Pt);let ot=Pt[vt];void 0===ot&&(ot=Qe.clone(),Pt[vt]=ot),Qe=ot}return Qe.visible=Ie.visible,Qe.wireframe=Ie.wireframe,Qe.side=Xe===ce?null!==Ie.shadowSide?Ie.shadowSide:Ie.side:null!==Ie.shadowSide?Ie.shadowSide:G[Ie.side],Qe.alphaMap=Ie.alphaMap,Qe.alphaTest=Ie.alphaTest,Qe.map=Ie.map,Qe.clipShadows=Ie.clipShadows,Qe.clippingPlanes=Ie.clippingPlanes,Qe.clipIntersection=Ie.clipIntersection,Qe.displacementMap=Ie.displacementMap,Qe.displacementScale=Ie.displacementScale,Qe.displacementBias=Ie.displacementBias,Qe.wireframeLinewidth=Ie.wireframeLinewidth,Qe.linewidth=Ie.linewidth,!0===Ne.isPointLight&&!0===Qe.isMeshDistanceMaterial&&(b.properties.get(Qe).light=Ne),Qe}function pe(Ae,Ie,Ne,Xe,Qe){if(!1===Ae.visible)return;if(Ae.layers.test(Ie.layers)&&(Ae.isMesh||Ae.isLine||Ae.isPoints)&&(Ae.castShadow||Ae.receiveShadow&&Qe===ce)&&(!Ae.frustumCulled||m.intersectsObject(Ae))){Ae.modelViewMatrix.multiplyMatrices(Ne.matrixWorldInverse,Ae.matrixWorld);const vt=n.update(Ae),Pt=Ae.material;if(Array.isArray(Pt)){const ot=vt.groups;for(let dt=0,Et=ot.length;dt<Et;dt++){const tn=ot[dt],cn=Pt[tn.materialIndex];if(cn&&cn.visible){const Ht=ve(Ae,cn,Xe,Qe);b.renderBufferDirect(Ne,null,vt,Ht,Ae,tn)}}}else if(Pt.visible){const ot=ve(Ae,Pt,Xe,Qe);b.renderBufferDirect(Ne,null,vt,ot,Ae,null)}}const Le=Ae.children;for(let vt=0,Pt=Le.length;vt<Pt;vt++)pe(Le[vt],Ie,Ne,Xe,Qe)}this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=K,this.render=function(Ae,Ie,Ne){if(!1===J.enabled||!1===J.autoUpdate&&!1===J.needsUpdate||0===Ae.length)return;const Xe=b.getRenderTarget(),Qe=b.getActiveCubeFace(),Se=b.getActiveMipmapLevel(),Le=b.state;Le.setBlending(0),Le.buffers.color.setClear(1,1,1,1),Le.buffers.depth.setTest(!0),Le.setScissorTest(!1);
vendor: 6,074 bytes, line 83
83for(let vt=0,Pt=Ae.length;vt<Pt;vt++){const ot=Ae[vt],dt=ot.shadow;if(void 0===dt){console.warn("THREE.WebGLShadowMap:",ot,"has no shadow.");continue}if(!1===dt.autoUpdate&&!1===dt.needsUpdate)continue;A.copy(dt.mapSize);const Et=dt.getFrameExtents();A.multiply(Et),E.copy(dt.mapSize),(A.x>N||A.y>N)&&(A.x>N&&(E.x=Math.floor(N/Et.x),A.x=E.x*Et.x,dt.mapSize.x=E.x),A.y>N&&(E.y=Math.floor(N/Et.y),A.y=E.y*Et.y,dt.mapSize.y=E.y)),null===dt.map&&(dt.map=new Fo(A.x,A.y,this.type!==ce?{minFilter:Jn,magFilter:Jn}:{}),dt.map.texture.name=ot.name+".shadowMap",dt.camera.updateProjectionMatrix()),b.setRenderTarget(dt.map),b.clear();const tn=dt.getViewportCount();for(let cn=0;cn<tn;cn++){const Ht=dt.getViewport(cn);w.set(E.x*Ht.x,E.y*Ht.y,E.x*Ht.z,E.y*Ht.w),Le.viewport(w),dt.updateMatrices(ot,cn),m=dt.getFrustum(),pe(Ie,Ne,dt.camera,ot,this.type)}!0!==dt.isPointLightShadow&&this.type===ce&&Y(dt,Ne),dt.needsUpdate=!1}J.needsUpdate=!1,b.setRenderTarget(Xe,Qe,Se)}}function cv(b,n,o){const m=o.isWebGL2,T=new function A(){let Ke=!1;const It=new fr;let hn=null;const Ln=new fr(0,0,0,0);return{setMask:function(ti){hn!==ti&&!Ke&&(b.colorMask(ti,ti,ti,ti),hn=ti)},setLocked:function(ti){Ke=ti},setClear:function(ti,Br,Xr,ca,Gc){!0===Gc&&(ti*=ca,Br*=ca,Xr*=ca),It.set(ti,Br,Xr,ca),!1===Ln.equals(It)&&(b.clearColor(ti,Br,Xr,ca),Ln.copy(It))},reset:function(){Ke=!1,hn=null,Ln.set(-1,0,0,0)}}},B=new function E(){let Ke=!1,It=null,hn=null,Ln=null;return{setTest:function(ti){ti?$e(b.DEPTH_TEST):Ei(b.DEPTH_TEST)},setMask:function(ti){It!==ti&&!Ke&&(b.depthMask(ti),It=ti)},setFunc:function(ti){if(hn!==ti){switch(ti){case 0:b.depthFunc(b.NEVER);break;case 1:b.depthFunc(b.ALWAYS);break;case 2:b.depthFunc(b.LESS);break;case 3:default:b.depthFunc(b.LEQUAL);break;case 4:b.depthFunc(b.EQUAL);break;case 5:b.depthFunc(b.GEQUAL);break;case 6:b.depthFunc(b.GREATER);break;case 7:b.depthFunc(b.NOTEQUAL)}hn=ti}},setLocked:function(ti){Ke=ti},setClear:function(ti){Ln!==ti&&(b.clearDepth(ti),Ln=ti)},reset:function(){Ke=!1,It=null,hn=null,Ln=null}}},D=new function w(){let Ke=!1,It=null,hn=null,Ln=null,ti=null,Br=null,Xr=null,ca=null,Gc=null;return{setTest:function(cs){Ke||(cs?$e(b.STENCIL_TEST):Ei(b.STENCIL_TEST))},setMask:function(cs){It!==cs&&!Ke&&(b.stencilMask(cs),It=cs)},setFunc:function(cs,Io,Sl){(hn!==cs||Ln!==Io||ti!==Sl)&&(b.stencilFunc(cs,Io,Sl),hn=cs,Ln=Io,ti=Sl)},setOp:function(cs,Io,Sl){(Br!==cs||Xr!==Io||ca!==Sl)&&(b.stencilOp(cs,Io,Sl),Br=cs,Xr=Io,ca=Sl)},setLocked:function(cs){Ke=cs},setClear:function(cs){Gc!==cs&&(b.clearStencil(cs),Gc=cs)},reset:function(){Ke=!1,It=null,hn=null,Ln=null,ti=null,Br=null,Xr=null,ca=null,Gc=null}}},N=new WeakMap,G=new WeakMap;let H={},Q={},Z=new WeakMap,he=[],J=null,Y=!1,ve=null,pe=null,Ae=null,Ie=null,Ne=null,Xe=null,Qe=null,Se=!1,Le=null,vt=null,Pt=null,ot=null,dt=null;const Et=b.getParameter(b.MAX_COMBINED_TEXTURE_IMAGE_UNITS);let tn=!1,cn=0;const Ht=b.getParameter(b.VERSION);-1!==Ht.indexOf("WebGL")?(cn=parseFloat(/^WebGL (\d)/.exec(Ht)[1]),tn=cn>=1):-1!==Ht.indexOf("OpenGL ES")&&(cn=parseFloat(/^OpenGL ES (\d)/.exec(Ht)[1]),tn=cn>=2);let nn=null,dn={};const Yn=b.getParameter(b.SCISSOR_BOX),In=b.getParameter(b.VIEWPORT),wt=(new fr).fromArray(Yn),Zt=(new fr).fromArray(In);function En(Ke,It,hn){const Ln=new Uint8Array(4),ti=b.createTexture();b.bindTexture(Ke,ti),b.texParameteri(Ke,b.TEXTURE_MIN_FILTER,b.NEAREST),b.texParameteri(Ke,b.TEXTURE_MAG_FILTER,b.NEAREST);for(let Br=0;Br<hn;Br++)b.texImage2D(It+Br,0,b.RGBA,1,1,0,b.RGBA,b.UNSIGNED_BYTE,Ln);return ti}const Bn={};function $e(Ke){!0!==H[Ke]&&(b.enable(Ke),H[Ke]=!0)}function Ei(Ke){!1!==H[Ke]&&(b.disable(Ke),H[Ke]=!1)}Bn[b.TEXTURE_2D]=En(b.TEXTURE_2D,b.TEXTURE_2D,1),Bn[b.TEXTURE_CUBE_MAP]=En(b.TEXTURE_CUBE_MAP,b.TEXTURE_CUBE_MAP_POSITIVE_X,6),T.setClear(0,0,0,1),B.setClear(1),D.setClear(0),$e(b.DEPTH_TEST),B.setFunc(3),bn(!1),di(1),$e(b.CULL_FACE),en(0);const Jt={[it]:b.FUNC_ADD,[on]:b.FUNC_SUBTRACT,[Yt]:b.FUNC_REVERSE_SUBTRACT};if(m)Jt[103]=b.MIN,Jt[104]=b.MAX;else{const Ke=n.get("EXT_blend_minmax");null!==Ke&&(Jt[103]=Ke.MIN_EXT,Jt[104]=Ke.MAX_EXT)}const kt={[Rn]:b.ZERO,[Mt]:b.ONE,[rt]:b.SRC_COLOR,[xe]:b.SRC_ALPHA,[ri]:b.SRC_ALPHA_SATURATE,[Hn]:b.DST_COLOR,[Ft]:b.DST_ALPHA,[ke]:b.ONE_MINUS_SRC_COLOR,[Pe]:b.ONE_MINUS_SRC_ALPHA,[Li]:b.ONE_MINUS_DST_COLOR,[pt]:b.ONE_MINUS_DST_ALPHA};function en(Ke,It,hn,Ln,ti,Br,Xr,ca){if(0!==Ke){if(!1===Y&&($e(b.BLEND),Y=!0),5===Ke)ti=ti||It,Br=Br||hn,Xr=Xr||Ln,(It!==pe||ti!==Ne)&&(b.blendEquationSeparate(Jt[It],Jt[ti]),pe=It,Ne=ti),(hn!==Ae||Ln!==Ie||Br!==Xe||Xr!==Qe)&&(b.blendFuncSeparate(kt[hn],kt[Ln],kt[Br],kt[Xr]),Ae=hn,Ie=Ln,Xe=Br,Qe=Xr),ve=Ke,Se=!1;else if(Ke!==ve||ca!==Se){if((100!==pe||100!==Ne)&&(b.blendEquation(b.FUNC_ADD),pe=100,Ne=100),ca)switch(Ke){case 1:b.blendFuncSeparate(b.ONE,b.ONE_MINUS_SRC_ALPHA,b.ONE,b.ONE_MINUS_SRC_ALPHA);break;case 2:b.blendFunc(b.ONE,b.ONE);break;case 3:b.blendFuncSeparate(b.ZERO,b.ONE_MINUS_SRC_COLOR,b.ZERO,b.ONE);break;case 4:b.blendFuncSeparate(b.ZERO,b.SRC_COLOR,b.ZERO,b.SRC_ALPHA);break;default:console.error("THREE.WebGLState: Invalid blending: ",Ke)}else switch(Ke){case 1:b.blendFuncSeparate(b.SRC_ALPHA,b.ONE_MINUS_SRC_ALPHA,b.ONE,b.ONE_MINUS_SRC_ALPHA);break;case 2:b.blendFunc(b.SRC_ALPHA,b.ONE);break;case 3:b.blendFuncSeparate(b.ZERO,b.ONE_MINUS_SRC_COLOR,b.ZERO,b.ONE);break;case 4:b.blendFunc(b.ZERO,b.SRC_COLOR);break;default:console.error("THREE.WebGLState: Invalid blending: ",Ke)}Ae=null,Ie=null,Xe=null,Qe=null,ve=Ke,Se=ca}}else!0===Y&&(Ei(b.BLEND),Y=!1)}function bn(Ke){Le!==Ke&&(b.frontFace(Ke?b.CW:b.CCW),Le=Ke)}function di(Ke){0!==Ke?($e(b.CULL_FACE),Ke!==vt&&b.cullFace(1===Ke?b.BACK:2===Ke?b.FRONT:b.FRONT_AND_BACK)):Ei(b.CULL_FACE),vt=Ke}function ai(Ke,It,hn){Ke?($e(b.POLYGON_OFFSET_FILL),(ot!==It||dt!==hn)&&(b.polygonOffset(It,hn),ot=It,dt=hn)):Ei(b.POLYGON_OFFSET_FILL)}return{buffers:{color:T,depth:B,stencil:D},enable:$e,disable:Ei,bindFramebuffer:function fi(Ke,It){return Q[Ke]!==It&&(b.bindFramebuffer(Ke,It),Q[Ke]=It,m&&(Ke===b.DRAW_FRAMEBUFFER&&(Q[b.FRAMEBUFFER]=It),Ke===b.FRAMEBUFFER&&(Q[b.DRAW_FRAMEBUFFER]=It)),!0)}
83,drawBuffers:function mn(Ke,It){let hn=he,Ln=!1;if(Ke)if(hn=Z.get(It),void 0===hn&&(hn=[],Z.set(It,hn)),Ke.isWebGLMultipleRenderTargets){const ti=Ke.texture;if(hn.length!==ti.length||hn[0]!==b.COLOR_ATTACHMENT0){for(let Br=0,Xr=ti.length;Br<Xr;Br++)hn[Br]=b.COLOR_ATTACHMENT0+Br;hn.length=ti.length,Ln=!0}}else hn[0]!==b.COLOR_ATTACHMENT0&&(hn[0]=b.COLOR_ATTACHMENT0,Ln=!0);else hn[0]!==b.BACK&&(hn[0]=b.BACK,Ln=!0);Ln&&(o.isWebGL2?b.drawBuffers(hn):n.get("WEBGL_draw_buffers").drawBuffersWEBGL(hn))},useProgram:function jn(Ke){return J!==Ke&&(b.useProgram(Ke),J=Ke,!0)},setBlending:en,setMaterial:function Wn(Ke,It){2===Ke.side?Ei(b.CULL_FACE):$e(b.CULL_FACE);let hn=1===Ke.side;It&&(hn=!hn),bn(hn),1===Ke.blending&&!1===Ke.transparent?en(0):en(Ke.blending,Ke.blendEquation,Ke.blendSrc,Ke.blendDst,Ke.blendEquationAlpha,Ke.blendSrcAlpha,Ke.blendDstAlpha,Ke.premultipliedAlpha),B.setFunc(Ke.depthFunc),B.setTest(Ke.depthTest),B.setMask(Ke.depthWrite),T.setMask(Ke.colorWrite);const Ln=Ke.stencilWrite;D.setTest(Ln),Ln&&(D.setMask(Ke.stencilWriteMask),D.setFunc(Ke.stencilFunc,Ke.stencilRef,Ke.stencilFuncMask),D.setOp(Ke.stencilFail,Ke.stencilZFail,Ke.stencilZPass)),ai(Ke.polygonOffset,Ke.polygonOffsetFactor,Ke.polygonOffsetUnits),!0===Ke.alphaToCoverage?$e(b.SAMPLE_ALPHA_TO_COVERAGE):Ei(b.SAMPLE_ALPHA_TO_COVERAGE)},setFlipSided:bn,setCullFace:di,setLineWidth:function pi(Ke){Ke!==Pt&&(tn&&b.lineWidth(Ke),Pt=Ke)},setPolygonOffset:ai,setScissorTest:function Gi(Ke){Ke?$e(b.SCISSOR_TEST):Ei(b.SCISSOR_TEST)},activeTexture:function nr(Ke){void 0===Ke&&(Ke=b.TEXTURE0+Et-1),nn!==Ke&&(b.activeTexture(Ke),nn=Ke)},bindTexture:function Ue(Ke,It,hn){void 0===hn&&(hn=null===nn?b.TEXTURE0+Et-1:nn);let Ln=dn[hn];void 0===Ln&&(Ln={type:void 0,texture:void 0},dn[hn]=Ln),(Ln.type!==Ke||Ln.texture!==It)&&(nn!==hn&&(b.activeTexture(hn),nn=hn),b.bindTexture(Ke,It||Bn[Ke]),Ln.type=Ke,Ln.texture=It)},unbindTexture:function Te(){const Ke=dn[nn];void 0!==Ke&&void 0!==Ke.type&&(b.bindTexture(Ke.type,null),Ke.type=void 0,Ke.texture=void 0)},compressedTexImage2D:function yt(){try{b.compressedTexImage2D.apply(b,arguments)}catch(Ke){console.error("THREE.WebGLState:",Ke)}},compressedTexImage3D:function an(){try{b.compressedTexImage3D.apply(b,arguments)}catch(Ke){console.error("THREE.WebGLState:",Ke)}},texImage2D:function oi(){try{b.texImage2D.apply(b,arguments)}catch(Ke){console.error("THREE.WebGLState:",Ke)}},texImage3D:function mi(){try{b.texImage3D.apply(b,arguments)}catch(Ke){console.error("THREE.WebGLState:",Ke)}},updateUBOMapping:function ji(Ke,It){let hn=G.get(It);void 0===hn&&(hn=new WeakMap,G.set(It,hn));let Ln=hn.get(Ke);void 0===Ln&&(Ln=b.getUniformBlockIndex(It,Ke.name),hn.set(Ke,Ln))},uniformBlockBinding:function _r(Ke,It){const Ln=G.get(It).get(Ke);N.get(It)!==Ln&&(b.uniformBlockBinding(It,Ln,Ke.__bindingPointIndex),N.set(It,Ln))},texStorage2D:function Bt(){try{b.texStorage2D.apply(b,arguments)}catch(Ke){console.error("THREE.WebGLState:",Ke)}},texStorage3D:function Kn(){try{b.texStorage3D.apply(b,arguments)}catch(Ke){console.error("THREE.WebGLState:",Ke)}},texSubImage2D:function un(){try{b.texSubImage2D.apply(b,arguments)}catch(Ke){console.error("THREE.WebGLState:",Ke)}},texSubImage3D:function wn(){try{b.texSubImage3D.apply(b,arguments)}catch(Ke){console.error("THREE.WebGLState:",Ke)}},compressedTexSubImage2D:function yi(){try{b.compressedTexSubImage2D.apply(b,arguments)}catch(Ke){console.error("THREE.WebGLState:",Ke)}},compressedTexSubImage3D:function Gn(){try{b.compressedTexSubImage3D.apply(b,arguments)}catch(Ke){console.error("THREE.WebGLState:",Ke)}},scissor:function Xn(Ke){!1===wt.equals(Ke)&&(b.scissor(Ke.x,Ke.y,Ke.z,Ke.w),wt.copy(Ke))},viewport:function $n(Ke){!1===Zt.equals(Ke)&&(b.viewport(Ke.x,Ke.y,Ke.z,Ke.w),Zt.copy(Ke))},reset:function ls(){b.disable(b.BLEND),b.disable(b.CULL_FACE),b.disable(b.DEPTH_TEST),b.disable(b.POLYGON_OFFSET_FILL),b.disable(b.SCISSOR_TEST),b.disable(b.STENCIL_TEST),b.disable(b.SAMPLE_ALPHA_TO_COVERAGE),b.blendEquation(b.FUNC_ADD),b.blendFunc(b.ONE,b.ZERO),b.blendFuncSeparate(b.ONE,b.ZERO,b.ONE,b.ZERO),b.colorMask(!0,!0,!0,!0),b.clearColor(0,0,0,0),b.depthMask(!0),b.depthFunc(b.LESS),b.clearDepth(1),b.stencilMask(4294967295),b.stencilFunc(b.ALWAYS,0,4294967295),b.stencilOp(b.KEEP,b.KEEP,b.KEEP),b.clearStencil(0),b.cullFace(b.BACK),b.frontFace(b.CCW),b.polygonOffset(0,0),b.activeTexture(b.TEXTURE0),b.bindFramebuffer(b.FRAMEBUFFER,null),!0===m&&(b.bindFramebuffer(b.DRAW_FRAMEBUFFER,null),b.bindFramebuffer(b.READ_FRAMEBUFFER,null)),b.useProgram(null),b.lineWidth(1),b.scissor(0,0,b.canvas.width,b.canvas.height),b.viewport(0,0,b.canvas.width,b.canvas.height),H={},nn=null,dn={},Q={}
83,Z=new WeakMap,he=[],J=null,Y=!1,ve=null,pe=null,Ae=null,Ie=null,Ne=null,Xe=null,Qe=null,Se=!1,Le=null,vt=null,Pt=null,ot=null,dt=null,wt.set(0,0,b.canvas.width,b.canvas.height),Zt.set(0,0,b.canvas.width,b.canvas.height),T.reset(),B.reset(),D.reset()}}}function Z1(b,n,o,m,A,E,w){const T=A.isWebGL2,B=A.maxTextures,D=A.maxCubemapSize,N=A.maxTextureSize,G=A.maxSamples,H=n.has("WEBGL_multisampled_render_to_texture")?n.get("WEBGL_multisampled_render_to_texture"):null,Q=!(typeof navigator>"u")&&/OculusBrowser/g.test(navigator.userAgent),Z=new WeakMap;let he;const J=new WeakMap;let Y=!1;try{Y=typeof OffscreenCanvas<"u"&&null!==new OffscreenCanvas(1,1).getContext("2d")}catch{}function ve(Ue,Te){return Y?new OffscreenCanvas(Ue,Te):ah("canvas")}function pe(Ue,Te,yt,an){let un=1;if((Ue.width>an||Ue.height>an)&&(un=an/Math.max(Ue.width,Ue.height)),un<1||!0===Te){if(typeof HTMLImageElement<"u"&&Ue instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&Ue instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&Ue instanceof ImageBitmap){const wn=Te?ip:Math.floor,yi=wn(un*Ue.width),Gn=wn(un*Ue.height);void 0===he&&(he=ve(yi,Gn));const Bt=yt?ve(yi,Gn):he;return Bt.width=yi,Bt.height=Gn,Bt.getContext("2d").drawImage(Ue,0,0,yi,Gn),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+Ue.width+"x"+Ue.height+") to ("+yi+"x"+Gn+")."),Bt}return"data"in Ue&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+Ue.width+"x"+Ue.height+")."),Ue}return Ue}function Ae(Ue){return kl(Ue.width)&&kl(Ue.height)}function Ne(Ue,Te){return Ue.generateMipmaps&&Te&&Ue.minFilter!==Jn&&Ue.minFilter!==Mi}function Xe(Ue){b.generateMipmap(Ue)}function Qe(Ue,Te,yt,an,un=!1){if(!1===T)return Te;if(null!==Ue){if(void 0!==b[Ue])return b[Ue];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+Ue+"'")}let wn=Te;return Te===b.RED&&(yt===b.FLOAT&&(wn=b.R32F),yt===b.HALF_FLOAT&&(wn=b.R16F),yt===b.UNSIGNED_BYTE&&(wn=b.R8)),Te===b.RG&&(yt===b.FLOAT&&(wn=b.RG32F),yt===b.HALF_FLOAT&&(wn=b.RG16F),yt===b.UNSIGNED_BYTE&&(wn=b.RG8)),Te===b.RGBA&&(yt===b.FLOAT&&(wn=b.RGBA32F),yt===b.HALF_FLOAT&&(wn=b.RGBA16F),yt===b.UNSIGNED_BYTE&&(wn=an===xr&&!1===un?b.SRGB8_ALPHA8:b.RGBA8),yt===b.UNSIGNED_SHORT_4_4_4_4&&(wn=b.RGBA4),yt===b.UNSIGNED_SHORT_5_5_5_1&&(wn=b.RGB5_A1)),(wn===b.R16F||wn===b.R32F||wn===b.RG16F||wn===b.RG32F||wn===b.RGBA16F||wn===b.RGBA32F)&&n.get("EXT_color_buffer_float"),wn}function Se(Ue,Te,yt){return!0===Ne(Ue,yt)||Ue.isFramebufferTexture&&Ue.minFilter!==Jn&&Ue.minFilter!==Mi?Math.log2(Math.max(Te.width,Te.height))+1:void 0!==Ue.mipmaps&&Ue.mipmaps.length>0?Ue.mipmaps.length:Ue.isCompressedTexture&&Array.isArray(Ue.image)?Te.mipmaps.length:1}function Le(Ue){return Ue===Jn||1004===Ue||Ue===lo?b.NEAREST:b.LINEAR}function vt(Ue){const Te=Ue.target;Te.removeEventListener("dispose",vt),function ot(Ue){const Te=m.get(Ue);if(void 0===Te.__webglInit)return;const yt=Ue.source,an=J.get(yt);if(an){const un=an[Te.__cacheKey];un.usedTimes--,0===un.usedTimes&&dt(Ue),0===Object.keys(an).length&&J.delete(yt)}m.remove(Ue)}(Te),Te.isVideoTexture&&Z.delete(Te)}function Pt(Ue){const Te=Ue.target;Te.removeEventListener("dispose",Pt),function Et(Ue){const Te=Ue.texture,yt=m.get(Ue),an=m.get(Te);if(void 0!==an.__webglTexture&&(b.deleteTexture(an.__webglTexture),w.memory.textures--),Ue.depthTexture&&Ue.depthTexture.dispose(),Ue.isWebGLCubeRenderTarget)for(let un=0;un<6;un++)b.deleteFramebuffer(yt.__webglFramebuffer[un]),yt.__webglDepthbuffer&&b.deleteRenderbuffer(yt.__webglDepthbuffer[un]);else{if(b.deleteFramebuffer(yt.__webglFramebuffer),yt.__webglDepthbuffer&&b.deleteRenderbuffer(yt.__webglDepthbuffer),yt.__webglMultisampledFramebuffer&&b.deleteFramebuffer(yt.__webglMultisampledFramebuffer),yt.__webglColorRenderbuffer)for(let un=0;un<yt.__webglColorRenderbuffer.length;un++)yt.__webglColorRenderbuffer[un]&&b.deleteRenderbuffer(yt.__webglColorRenderbuffer[un]);yt.__webglDepthRenderbuffer&&b.deleteRenderbuffer(yt.__webglDepthRenderbuffer)}if(Ue.isWebGLMultipleRenderTargets)for(let un=0,wn=Te.length;un<wn;un++){const yi=m.get(Te[un]);yi.__webglTexture&&(b.deleteTexture(yi.__webglTexture),w.memory.textures--),m.remove(Te[un])}m.remove(Te),m.remove(Ue)}(Te)}function dt(Ue){const Te=m.get(Ue);b.deleteTexture(Te.__webglTexture),delete J.get(Ue.source)[Te.__cacheKey],w.memory.textures--}let tn=0;function dn(Ue,Te){const yt=m.get(Ue);if(Ue.isVideoTexture&&function Gi(Ue){const Te=w.render.frame;
83Z.get(Ue)!==Te&&(Z.set(Ue,Te),Ue.update())}(Ue),!1===Ue.isRenderTargetTexture&&Ue.version>0&&yt.__version!==Ue.version){const an=Ue.image;if(null===an)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else{if(!1!==an.complete)return void Ei(yt,Ue,Te);console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete")}}o.bindTexture(b.TEXTURE_2D,yt.__webglTexture,b.TEXTURE0+Te)}const Zt={[at]:b.REPEAT,[Pn]:b.CLAMP_TO_EDGE,[Nr]:b.MIRRORED_REPEAT},En={[Jn]:b.NEAREST,[Wi]:b.NEAREST_MIPMAP_NEAREST,[lo]:b.NEAREST_MIPMAP_LINEAR,[Mi]:b.LINEAR,[ma]:b.LINEAR_MIPMAP_NEAREST,[Il]:b.LINEAR_MIPMAP_LINEAR};function Bn(Ue,Te,yt){if(yt?(b.texParameteri(Ue,b.TEXTURE_WRAP_S,Zt[Te.wrapS]),b.texParameteri(Ue,b.TEXTURE_WRAP_T,Zt[Te.wrapT]),(Ue===b.TEXTURE_3D||Ue===b.TEXTURE_2D_ARRAY)&&b.texParameteri(Ue,b.TEXTURE_WRAP_R,Zt[Te.wrapR]),b.texParameteri(Ue,b.TEXTURE_MAG_FILTER,En[Te.magFilter]),b.texParameteri(Ue,b.TEXTURE_MIN_FILTER,En[Te.minFilter])):(b.texParameteri(Ue,b.TEXTURE_WRAP_S,b.CLAMP_TO_EDGE),b.texParameteri(Ue,b.TEXTURE_WRAP_T,b.CLAMP_TO_EDGE),(Ue===b.TEXTURE_3D||Ue===b.TEXTURE_2D_ARRAY)&&b.texParameteri(Ue,b.TEXTURE_WRAP_R,b.CLAMP_TO_EDGE),(Te.wrapS!==Pn||Te.wrapT!==Pn)&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),b.texParameteri(Ue,b.TEXTURE_MAG_FILTER,Le(Te.magFilter)),b.texParameteri(Ue,b.TEXTURE_MIN_FILTER,Le(Te.minFilter)),Te.minFilter!==Jn&&Te.minFilter!==Mi&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),!0===n.has("EXT_texture_filter_anisotropic")){const an=n.get("EXT_texture_filter_anisotropic");if(Te.magFilter===Jn||Te.minFilter!==lo&&Te.minFilter!==Il||Te.type===Rl&&!1===n.has("OES_texture_float_linear")||!1===T&&Te.type===yr&&!1===n.has("OES_texture_half_float_linear"))return;(Te.anisotropy>1||m.get(Te).__currentAnisotropy)&&(b.texParameterf(Ue,an.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(Te.anisotropy,A.getMaxAnisotropy())),m.get(Te).__currentAnisotropy=Te.anisotropy)}}function $e(Ue,Te){let yt=!1;void 0===Ue.__webglInit&&(Ue.__webglInit=!0,Te.addEventListener("dispose",vt));const an=Te.source;let un=J.get(an);void 0===un&&(un={},J.set(an,un));const wn=function nn(Ue){const Te=[];return Te.push(Ue.wrapS),Te.push(Ue.wrapT),Te.push(Ue.wrapR||0),Te.push(Ue.magFilter),Te.push(Ue.minFilter),Te.push(Ue.anisotropy),Te.push(Ue.internalFormat),Te.push(Ue.format),Te.push(Ue.type),Te.push(Ue.generateMipmaps),Te.push(Ue.premultiplyAlpha),Te.push(Ue.flipY),Te.push(Ue.unpackAlignment),Te.push(Ue.encoding),Te.join()}(Te);if(wn!==Ue.__cacheKey){void 0===un[wn]&&(un[wn]={texture:b.createTexture(),usedTimes:0},w.memory.textures++,yt=!0),un[wn].usedTimes++;const yi=un[Ue.__cacheKey];void 0!==yi&&(un[Ue.__cacheKey].usedTimes--,0===yi.usedTimes&&dt(Te)),Ue.__cacheKey=wn,Ue.__webglTexture=un[wn].texture}return yt}function Ei(Ue,Te,yt){let an=b.TEXTURE_2D;(Te.isDataArrayTexture||Te.isCompressedArrayTexture)&&(an=b.TEXTURE_2D_ARRAY),Te.isData3DTexture&&(an=b.TEXTURE_3D);const un=$e(Ue,Te),wn=Te.source;o.bindTexture(an,Ue.__webglTexture,b.TEXTURE0+yt);const yi=m.get(wn);if(wn.version!==yi.__version||!0===un){o.activeTexture(b.TEXTURE0+yt),b.pixelStorei(b.UNPACK_FLIP_Y_WEBGL,Te.flipY),b.pixelStorei(b.UNPACK_PREMULTIPLY_ALPHA_WEBGL,Te.premultiplyAlpha),b.pixelStorei(b.UNPACK_ALIGNMENT,Te.unpackAlignment),b.pixelStorei(b.UNPACK_COLORSPACE_CONVERSION_WEBGL,b.NONE);const Gn=function Ie(Ue){return!T&&(Ue.wrapS!==Pn||Ue.wrapT!==Pn||Ue.minFilter!==Jn&&Ue.minFilter!==Mi)}(Te)&&!1===Ae(Te.image);let Bt=pe(Te.image,Gn,!1,N);Bt=nr(Te,Bt);const Kn=Ae(Bt)||T,oi=E.convert(Te.format,Te.encoding);let $n,mi=E.convert(Te.type),Xn=Qe(Te.internalFormat,oi,mi,Te.encoding,Te.isVideoTexture);Bn(an,Te,Kn);const ji=Te.mipmaps,_r=T&&!0!==Te.isVideoTexture,ls=void 0===yi.__version||!0===un,Ke=Se(Te,Bt,Kn);if(Te.isDepthTexture)Xn=b.DEPTH_COMPONENT,T?Xn=Te.type===Rl?b.DEPTH_COMPONENT32F:Te.type===Pl?b.DEPTH_COMPONENT24:Te.type===Bl?b.DEPTH24_STENCIL8:b.DEPTH_COMPONENT16:Te.type===Rl&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),Te.format===Zo&&Xn===b.DEPTH_COMPONENT&&1012!==Te.type&&Te.type!==Pl&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),Te.type=Pl,mi=E.
83convert(Te.type)),Te.format===jo&&Xn===b.DEPTH_COMPONENT&&(Xn=b.DEPTH_STENCIL,Te.type!==Bl&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),Te.type=Bl,mi=E.convert(Te.type))),ls&&(_r?o.texStorage2D(b.TEXTURE_2D,1,Xn,Bt.width,Bt.height):o.texImage2D(b.TEXTURE_2D,0,Xn,Bt.width,Bt.height,0,oi,mi,null));else if(Te.isDataTexture)if(ji.length>0&&Kn){_r&&ls&&o.texStorage2D(b.TEXTURE_2D,Ke,Xn,ji[0].width,ji[0].height);for(let It=0,hn=ji.length;It<hn;It++)$n=ji[It],_r?o.texSubImage2D(b.TEXTURE_2D,It,0,0,$n.width,$n.height,oi,mi,$n.data):o.texImage2D(b.TEXTURE_2D,It,Xn,$n.width,$n.height,0,oi,mi,$n.data);Te.generateMipmaps=!1}else _r?(ls&&o.texStorage2D(b.TEXTURE_2D,Ke,Xn,Bt.width,Bt.height),o.texSubImage2D(b.TEXTURE_2D,0,0,0,Bt.width,Bt.height,oi,mi,Bt.data)):o.texImage2D(b.TEXTURE_2D,0,Xn,Bt.width,Bt.height,0,oi,mi,Bt.data);else if(Te.isCompressedTexture)if(Te.isCompressedArrayTexture){_r&&ls&&o.texStorage3D(b.TEXTURE_2D_ARRAY,Ke,Xn,ji[0].width,ji[0].height,Bt.depth);for(let It=0,hn=ji.length;It<hn;It++)$n=ji[It],Te.format!==ea?null!==oi?_r?o.compressedTexSubImage3D(b.TEXTURE_2D_ARRAY,It,0,0,0,$n.width,$n.height,Bt.depth,oi,$n.data,0,0):o.compressedTexImage3D(b.TEXTURE_2D_ARRAY,It,Xn,$n.width,$n.height,Bt.depth,0,$n.data,0,0):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):_r?o.texSubImage3D(b.TEXTURE_2D_ARRAY,It,0,0,0,$n.width,$n.height,Bt.depth,oi,mi,$n.data):o.texImage3D(b.TEXTURE_2D_ARRAY,It,Xn,$n.width,$n.height,Bt.depth,0,oi,mi,$n.data)}else{_r&&ls&&o.texStorage2D(b.TEXTURE_2D,Ke,Xn,ji[0].width,ji[0].height);for(let It=0,hn=ji.length;It<hn;It++)$n=ji[It],Te.format!==ea?null!==oi?_r?o.compressedTexSubImage2D(b.TEXTURE_2D,It,0,0,$n.width,$n.height,oi,$n.data):o.compressedTexImage2D(b.TEXTURE_2D,It,Xn,$n.width,$n.height,0,$n.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):_r?o.texSubImage2D(b.TEXTURE_2D,It,0,0,$n.width,$n.height,oi,mi,$n.data):o.texImage2D(b.TEXTURE_2D,It,Xn,$n.width,$n.height,0,oi,mi,$n.data)}else if(Te.isDataArrayTexture)_r?(ls&&o.texStorage3D(b.TEXTURE_2D_ARRAY,Ke,Xn,Bt.width,Bt.height,Bt.depth),o.texSubImage3D(b.TEXTURE_2D_ARRAY,0,0,0,0,Bt.width,Bt.height,Bt.depth,oi,mi,Bt.data)):o.texImage3D(b.TEXTURE_2D_ARRAY,0,Xn,Bt.width,Bt.height,Bt.depth,0,oi,mi,Bt.data);else if(Te.isData3DTexture)_r?(ls&&o.texStorage3D(b.TEXTURE_3D,Ke,Xn,Bt.width,Bt.height,Bt.depth),o.texSubImage3D(b.TEXTURE_3D,0,0,0,0,Bt.width,Bt.height,Bt.depth,oi,mi,Bt.data)):o.texImage3D(b.TEXTURE_3D,0,Xn,Bt.width,Bt.height,Bt.depth,0,oi,mi,Bt.data);else if(Te.isFramebufferTexture){if(ls)if(_r)o.texStorage2D(b.TEXTURE_2D,Ke,Xn,Bt.width,Bt.height);else{let It=Bt.width,hn=Bt.height;for(let Ln=0;Ln<Ke;Ln++)o.texImage2D(b.TEXTURE_2D,Ln,Xn,It,hn,0,oi,mi,null),It>>=1,hn>>=1}}else if(ji.length>0&&Kn){_r&&ls&&o.texStorage2D(b.TEXTURE_2D,Ke,Xn,ji[0].width,ji[0].height);for(let It=0,hn=ji.length;It<hn;It++)$n=ji[It],_r?o.texSubImage2D(b.TEXTURE_2D,It,0,0,oi,mi,$n):o.texImage2D(b.TEXTURE_2D,It,Xn,oi,mi,$n);Te.generateMipmaps=!1}else _r?(ls&&o.texStorage2D(b.TEXTURE_2D,Ke,Xn,Bt.width,Bt.height),o.texSubImage2D(b.TEXTURE_2D,0,0,0,oi,mi,Bt)):o.texImage2D(b.TEXTURE_2D,0,Xn,oi,mi,Bt);Ne(Te,Kn)&&Xe(an),yi.__version=wn.version,Te.onUpdate&&Te.onUpdate(Te)}Ue.__version=Te.version}function mn(Ue,Te,yt,an,un){const wn=E.convert(yt.format,yt.encoding),yi=E.convert(yt.type),Gn=Qe(yt.internalFormat,wn,yi,yt.encoding);m.get(Te).__hasExternalTextures||(un===b.TEXTURE_3D||un===b.TEXTURE_2D_ARRAY?o.texImage3D(un,0,Gn,Te.width,Te.height,Te.depth,0,wn,yi,null):o.texImage2D(un,0,Gn,Te.width,Te.height,0,wn,yi,null)),o.bindFramebuffer(b.FRAMEBUFFER,Ue),ai(Te)?H.framebufferTexture2DMultisampleEXT(b.FRAMEBUFFER,an,un,m.get(yt).__webglTexture,0,pi(Te)):(un===b.TEXTURE_2D||un>=b.TEXTURE_CUBE_MAP_POSITIVE_X&&un<=b.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&b.framebufferTexture2D(b.FRAMEBUFFER,an,un,m.get(yt).__webglTexture,0),o.bindFramebuffer(b.FRAMEBUFFER,null)}function jn(Ue,Te,yt){if(b.bindRenderbuffer(b.RENDERBUFFER,Ue),Te.depthBuffer&&!Te.stencilBuffer){let an=b.DEPTH_COMPONENT16;if(yt||ai(Te)){const un=Te.depthTexture;un&&un.isDepthTexture&&(un.type===Rl?an=b.DEPTH_COMPONENT32F:un.type===Pl&&(an=b.DEPTH_COMPONENT24));const wn=pi(Te);ai(Te)?H.renderbufferStorageMultisampleEXT(b.RENDERBUFFER,wn,an,Te.width,Te.height):b.renderbufferStorageMultisample(b.RENDERBUFFER,wn,an,Te.width,Te.height)}else b.renderbufferStorage(b.RENDERBUFFER,an,Te.width,Te.height);b.framebufferRenderbuffer(b.FRAMEBUFFER,b.DEPTH_ATTACHMENT,b.RENDERBUFFER,Ue)}else if(Te.depthBuffer&&Te.stencilBuffer){const an=pi(Te);yt&&!1===ai(Te)?b.renderbufferStorageMultisample(b.RENDERBUFFER,an,b.DEPTH24_STENCIL8,Te.width,Te.height):ai(Te)?H.renderbufferStorageMultisampleEXT(b.RENDERBUFFER,an,b.DEPTH24_STENCIL8,Te.width,Te.height):b.renderbufferStorage(b.RENDERBUFFER,b.DEPTH_STENCIL,Te.width,Te.height),b.framebufferRenderbuffer(b.FRAMEBUFFER,b.DEPTH_STENCIL_ATTACHMENT,b.RENDERBUFFER,Ue)}else{const an=!0===Te.isWebGLMultipleRenderTargets?Te.texture:[Te.texture];for(let un=0;un<an.length;un++){const wn=an[un],yi=E.convert(wn.format,wn.encoding),Gn=E.convert(wn.type),Bt=Qe(wn.internalFormat,yi,Gn,wn.encoding),Kn=pi(Te);yt&&!1===ai(Te)?b.renderbufferStorageMultisample(b.RENDERBUFFER,Kn,Bt,Te.width,Te.height):ai(Te)?H.renderbufferStorageMultisampleEXT(b.RENDERBUFFER,Kn,Bt,Te.width,Te.height):b.renderbufferStorage(b.RENDERBUFFER,Bt,Te.width,Te.height)}}b.bindRenderbuffer(b.RENDERBUFFER,null)}
83function kt(Ue){const Te=m.get(Ue),yt=!0===Ue.isWebGLCubeRenderTarget;if(Ue.depthTexture&&!Te.__autoAllocateDepthBuffer){if(yt)throw new Error("target.depthTexture not supported in Cube render targets");!function Jt(Ue,Te){if(Te&&Te.isWebGLCubeRenderTarget)throw new Error("Depth Texture with cube render targets is not supported");if(o.bindFramebuffer(b.FRAMEBUFFER,Ue),!Te.depthTexture||!Te.depthTexture.isDepthTexture)throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");(!m.get(Te.depthTexture).__webglTexture||Te.depthTexture.image.width!==Te.width||Te.depthTexture.image.height!==Te.height)&&(Te.depthTexture.image.width=Te.width,Te.depthTexture.image.height=Te.height,Te.depthTexture.needsUpdate=!0),dn(Te.depthTexture,0);const an=m.get(Te.depthTexture).__webglTexture,un=pi(Te);if(Te.depthTexture.format===Zo)ai(Te)?H.framebufferTexture2DMultisampleEXT(b.FRAMEBUFFER,b.DEPTH_ATTACHMENT,b.TEXTURE_2D,an,0,un):b.framebufferTexture2D(b.FRAMEBUFFER,b.DEPTH_ATTACHMENT,b.TEXTURE_2D,an,0);else{if(Te.depthTexture.format!==jo)throw new Error("Unknown depthTexture format");ai(Te)?H.framebufferTexture2DMultisampleEXT(b.FRAMEBUFFER,b.DEPTH_STENCIL_ATTACHMENT,b.TEXTURE_2D,an,0,un):b.framebufferTexture2D(b.FRAMEBUFFER,b.DEPTH_STENCIL_ATTACHMENT,b.TEXTURE_2D,an,0)}}(Te.__webglFramebuffer,Ue)}else if(yt){Te.__webglDepthbuffer=[];for(let an=0;an<6;an++)o.bindFramebuffer(b.FRAMEBUFFER,Te.__webglFramebuffer[an]),Te.__webglDepthbuffer[an]=b.createRenderbuffer(),jn(Te.__webglDepthbuffer[an],Ue,!1)}else o.bindFramebuffer(b.FRAMEBUFFER,Te.__webglFramebuffer),Te.__webglDepthbuffer=b.createRenderbuffer(),jn(Te.__webglDepthbuffer,Ue,!1);o.bindFramebuffer(b.FRAMEBUFFER,null)}function pi(Ue){return Math.min(G,Ue.samples)}function ai(Ue){const Te=m.get(Ue);return T&&Ue.samples>0&&!0===n.has("WEBGL_multisampled_render_to_texture")&&!1!==Te.__useRenderToTexture}function nr(Ue,Te){const yt=Ue.encoding,an=Ue.format,un=Ue.type;return!0===Ue.isCompressedTexture||!0===Ue.isVideoTexture||1035===Ue.format||yt!==dc&&(yt===xr?!1===T?!0===n.has("EXT_sRGB")&&an===ea?(Ue.format=1035,Ue.minFilter=Mi,Ue.generateMipmaps=!1):Te=ng.sRGBToLinear(Te):(an!==ea||un!==Ko)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture encoding:",yt)),Te}this.allocateTextureUnit=function Ht(){const Ue=tn;return Ue>=B&&console.warn("THREE.WebGLTextures: Trying to use "+Ue+" texture units while this GPU supports only "+B),tn+=1,Ue},this.resetTextureUnits=function cn(){tn=0},this.setTexture2D=dn,this.setTexture2DArray=function Yn(Ue,Te){const yt=m.get(Ue);Ue.version>0&&yt.__version!==Ue.version?Ei(yt,Ue,Te):o.bindTexture(b.TEXTURE_2D_ARRAY,yt.__webglTexture,b.TEXTURE0+Te)},this.setTexture3D=function In(Ue,Te){const yt=m.get(Ue);Ue.version>0&&yt.__version!==Ue.version?Ei(yt,Ue,Te):o.bindTexture(b.TEXTURE_3D,yt.__webglTexture,b.TEXTURE0+Te)},this.setTextureCube=function wt(Ue,Te){const yt=m.get(Ue);Ue.version>0&&yt.__version!==Ue.version?function fi(Ue,Te,yt){if(6!==Te.image.length)return;const an=$e(Ue,Te),un=Te.source;o.bindTexture(b.TEXTURE_CUBE_MAP,Ue.__webglTexture,b.TEXTURE0+yt);const wn=m.get(un);if(un.version!==wn.__version||!0===an){o.activeTexture(b.TEXTURE0+yt),b.pixelStorei(b.UNPACK_FLIP_Y_WEBGL,Te.flipY),b.pixelStorei(b.UNPACK_PREMULTIPLY_ALPHA_WEBGL,Te.premultiplyAlpha),b.pixelStorei(b.UNPACK_ALIGNMENT,Te.unpackAlignment),b.pixelStorei(b.UNPACK_COLORSPACE_CONVERSION_WEBGL,b.NONE);const yi=Te.isCompressedTexture||Te.image[0].isCompressedTexture,Gn=Te.image[0]&&Te.image[0].isDataTexture,Bt=[];for(let It=0;It<6;It++)Bt[It]=yi||Gn?Gn?Te.image[It].image:Te.image[It]:pe(Te.image[It],!1,!0,D),Bt[It]=nr(Te,Bt[It]);const Kn=Bt[0],oi=Ae(Kn)||T,mi=E.convert(Te.format,Te.encoding),Xn=E.convert(Te.type),$n=Qe(Te.internalFormat,mi,Xn,Te.encoding),ji=T&&!0!==Te.isVideoTexture,_r=void 0===wn.__version||!0===an;let Ke,ls=Se(Te,Kn,oi);if(Bn(b.TEXTURE_CUBE_MAP,Te,oi),yi){ji&&_r&&o.texStorage2D(b.TEXTURE_CUBE_MAP,ls,$n,Kn.width,Kn.height);for(let It=0;It<6;It++){Ke=Bt[It].mipmaps;for(let hn=0;hn<Ke.length;hn++){const Ln=Ke[hn];
83Te.format!==ea?null!==mi?ji?o.compressedTexSubImage2D(b.TEXTURE_CUBE_MAP_POSITIVE_X+It,hn,0,0,Ln.width,Ln.height,mi,Ln.data):o.compressedTexImage2D(b.TEXTURE_CUBE_MAP_POSITIVE_X+It,hn,$n,Ln.width,Ln.height,0,Ln.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):ji?o.texSubImage2D(b.TEXTURE_CUBE_MAP_POSITIVE_X+It,hn,0,0,Ln.width,Ln.height,mi,Xn,Ln.data):o.texImage2D(b.TEXTURE_CUBE_MAP_POSITIVE_X+It,hn,$n,Ln.width,Ln.height,0,mi,Xn,Ln.data)}}}else{Ke=Te.mipmaps,ji&&_r&&(Ke.length>0&&ls++,o.texStorage2D(b.TEXTURE_CUBE_MAP,ls,$n,Bt[0].width,Bt[0].height));for(let It=0;It<6;It++)if(Gn){ji?o.texSubImage2D(b.TEXTURE_CUBE_MAP_POSITIVE_X+It,0,0,0,Bt[It].width,Bt[It].height,mi,Xn,Bt[It].data):o.texImage2D(b.TEXTURE_CUBE_MAP_POSITIVE_X+It,0,$n,Bt[It].width,Bt[It].height,0,mi,Xn,Bt[It].data);for(let hn=0;hn<Ke.length;hn++){const ti=Ke[hn].image[It].image;ji?o.texSubImage2D(b.TEXTURE_CUBE_MAP_POSITIVE_X+It,hn+1,0,0,ti.width,ti.height,mi,Xn,ti.data):o.texImage2D(b.TEXTURE_CUBE_MAP_POSITIVE_X+It,hn+1,$n,ti.width,ti.height,0,mi,Xn,ti.data)}}else{ji?o.texSubImage2D(b.TEXTURE_CUBE_MAP_POSITIVE_X+It,0,0,0,mi,Xn,Bt[It]):o.texImage2D(b.TEXTURE_CUBE_MAP_POSITIVE_X+It,0,$n,mi,Xn,Bt[It]);for(let hn=0;hn<Ke.length;hn++){const Ln=Ke[hn];ji?o.texSubImage2D(b.TEXTURE_CUBE_MAP_POSITIVE_X+It,hn+1,0,0,mi,Xn,Ln.image[It]):o.texImage2D(b.TEXTURE_CUBE_MAP_POSITIVE_X+It,hn+1,$n,mi,Xn,Ln.image[It])}}}Ne(Te,oi)&&Xe(b.TEXTURE_CUBE_MAP),wn.__version=un.version,Te.onUpdate&&Te.onUpdate(Te)}Ue.__version=Te.version}(yt,Ue,Te):o.bindTexture(b.TEXTURE_CUBE_MAP,yt.__webglTexture,b.TEXTURE0+Te)},this.rebindTextures=function en(Ue,Te,yt){const an=m.get(Ue);void 0!==Te&&mn(an.__webglFramebuffer,Ue,Ue.texture,b.COLOR_ATTACHMENT0,b.TEXTURE_2D),void 0!==yt&&kt(Ue)},this.setupRenderTarget=function Wn(Ue){const Te=Ue.texture,yt=m.get(Ue),an=m.get(Te);Ue.addEventListener("dispose",Pt),!0!==Ue.isWebGLMultipleRenderTargets&&(void 0===an.__webglTexture&&(an.__webglTexture=b.createTexture()),an.__version=Te.version,w.memory.textures++);const un=!0===Ue.isWebGLCubeRenderTarget,wn=!0===Ue.isWebGLMultipleRenderTargets,yi=Ae(Ue)||T;if(un){yt.__webglFramebuffer=[];for(let Gn=0;Gn<6;Gn++)yt.__webglFramebuffer[Gn]=b.createFramebuffer()}else{if(yt.__webglFramebuffer=b.createFramebuffer(),wn)if(A.drawBuffers){const Gn=Ue.texture;for(let Bt=0,Kn=Gn.length;Bt<Kn;Bt++){const oi=m.get(Gn[Bt]);void 0===oi.__webglTexture&&(oi.__webglTexture=b.createTexture(),w.memory.textures++)}}else console.warn("THREE.WebGLRenderer: WebGLMultipleRenderTargets can only be used with WebGL2 or WEBGL_draw_buffers extension.");if(T&&Ue.samples>0&&!1===ai(Ue)){const Gn=wn?Te:[Te];yt.__webglMultisampledFramebuffer=b.createFramebuffer(),yt.__webglColorRenderbuffer=[],o.bindFramebuffer(b.FRAMEBUFFER,yt.__webglMultisampledFramebuffer);for(let Bt=0;Bt<Gn.length;Bt++){const Kn=Gn[Bt];yt.__webglColorRenderbuffer[Bt]=b.createRenderbuffer(),b.bindRenderbuffer(b.RENDERBUFFER,yt.__webglColorRenderbuffer[Bt]);const oi=E.convert(Kn.format,Kn.encoding),mi=E.convert(Kn.type),Xn=Qe(Kn.internalFormat,oi,mi,Kn.encoding,!0===Ue.isXRRenderTarget),$n=pi(Ue);b.renderbufferStorageMultisample(b.RENDERBUFFER,$n,Xn,Ue.width,Ue.height),b.framebufferRenderbuffer(b.FRAMEBUFFER,b.COLOR_ATTACHMENT0+Bt,b.RENDERBUFFER,yt.__webglColorRenderbuffer[Bt])}b.bindRenderbuffer(b.RENDERBUFFER,null),Ue.depthBuffer&&(yt.__webglDepthRenderbuffer=b.createRenderbuffer(),jn(yt.__webglDepthRenderbuffer,Ue,!0)),o.bindFramebuffer(b.FRAMEBUFFER,null)}}if(un){o.bindTexture(b.TEXTURE_CUBE_MAP,an.__webglTexture),Bn(b.TEXTURE_CUBE_MAP,Te,yi);for(let Gn=0;Gn<6;Gn++)mn(yt.__webglFramebuffer[Gn],Ue,Te,b.COLOR_ATTACHMENT0,b.TEXTURE_CUBE_MAP_POSITIVE_X+Gn);Ne(Te,yi)&&Xe(b.TEXTURE_CUBE_MAP),o.unbindTexture()}else if(wn){const Gn=Ue.texture;for(let Bt=0,Kn=Gn.length;Bt<Kn;Bt++){const oi=Gn[Bt],mi=m.get(oi);o.bindTexture(b.TEXTURE_2D,mi.__webglTexture),Bn(b.TEXTURE_2D,oi,yi),mn(yt.__webglFramebuffer,Ue,oi,b.COLOR_ATTACHMENT0+Bt,b.TEXTURE_2D),Ne(oi,yi)&&Xe(b.TEXTURE_2D)}o.unbindTexture()}else{let Gn=b.TEXTURE_2D;(Ue.isWebGL3DRenderTarget||Ue.isWebGLArrayRenderTarget)&&(T?Gn=Ue.isWebGL3DRenderTarget?b.TEXTURE_3D:b.TEXTURE_2D_ARRAY:console.error("THREE.WebGLTextures: THREE.Data3DTexture and THREE.DataArrayTexture only supported with WebGL2.")),o.bindTexture(Gn,an.__webglTexture),Bn(Gn,Te,yi),mn(yt.__webglFramebuffer,Ue,Te,b.COLOR_ATTACHMENT0,Gn),Ne(Te,yi)&&Xe(Gn),o.unbindTexture()}Ue.depthBuffer&&kt(Ue)},this.updateRenderTargetMipmap=function bn(Ue){const Te=Ae(Ue)||T,yt=!0===Ue.isWebGLMultipleRenderTargets?Ue.texture:[Ue.texture];for(let an=0,un=yt.length;an<un;an++){const wn=yt[an];
vendor: 12,128 bytes, line 83
83if(Ne(wn,Te)){const yi=Ue.isWebGLCubeRenderTarget?b.TEXTURE_CUBE_MAP:b.TEXTURE_2D,Gn=m.get(wn).__webglTexture;o.bindTexture(yi,Gn),Xe(yi),o.unbindTexture()}}},this.updateMultisampleRenderTarget=function di(Ue){if(T&&Ue.samples>0&&!1===ai(Ue)){const Te=Ue.isWebGLMultipleRenderTargets?Ue.texture:[Ue.texture],yt=Ue.width,an=Ue.height;let un=b.COLOR_BUFFER_BIT;const wn=[],yi=Ue.stencilBuffer?b.DEPTH_STENCIL_ATTACHMENT:b.DEPTH_ATTACHMENT,Gn=m.get(Ue),Bt=!0===Ue.isWebGLMultipleRenderTargets;if(Bt)for(let Kn=0;Kn<Te.length;Kn++)o.bindFramebuffer(b.FRAMEBUFFER,Gn.__webglMultisampledFramebuffer),b.framebufferRenderbuffer(b.FRAMEBUFFER,b.COLOR_ATTACHMENT0+Kn,b.RENDERBUFFER,null),o.bindFramebuffer(b.FRAMEBUFFER,Gn.__webglFramebuffer),b.framebufferTexture2D(b.DRAW_FRAMEBUFFER,b.COLOR_ATTACHMENT0+Kn,b.TEXTURE_2D,null,0);o.bindFramebuffer(b.READ_FRAMEBUFFER,Gn.__webglMultisampledFramebuffer),o.bindFramebuffer(b.DRAW_FRAMEBUFFER,Gn.__webglFramebuffer);for(let Kn=0;Kn<Te.length;Kn++){wn.push(b.COLOR_ATTACHMENT0+Kn),Ue.depthBuffer&&wn.push(yi);const oi=void 0!==Gn.__ignoreDepthValues&&Gn.__ignoreDepthValues;if(!1===oi&&(Ue.depthBuffer&&(un|=b.DEPTH_BUFFER_BIT),Ue.stencilBuffer&&(un|=b.STENCIL_BUFFER_BIT)),Bt&&b.framebufferRenderbuffer(b.READ_FRAMEBUFFER,b.COLOR_ATTACHMENT0,b.RENDERBUFFER,Gn.__webglColorRenderbuffer[Kn]),!0===oi&&(b.invalidateFramebuffer(b.READ_FRAMEBUFFER,[yi]),b.invalidateFramebuffer(b.DRAW_FRAMEBUFFER,[yi])),Bt){const mi=m.get(Te[Kn]).__webglTexture;b.framebufferTexture2D(b.DRAW_FRAMEBUFFER,b.COLOR_ATTACHMENT0,b.TEXTURE_2D,mi,0)}b.blitFramebuffer(0,0,yt,an,0,0,yt,an,un,b.NEAREST),Q&&b.invalidateFramebuffer(b.READ_FRAMEBUFFER,wn)}if(o.bindFramebuffer(b.READ_FRAMEBUFFER,null),o.bindFramebuffer(b.DRAW_FRAMEBUFFER,null),Bt)for(let Kn=0;Kn<Te.length;Kn++){o.bindFramebuffer(b.FRAMEBUFFER,Gn.__webglMultisampledFramebuffer),b.framebufferRenderbuffer(b.FRAMEBUFFER,b.COLOR_ATTACHMENT0+Kn,b.RENDERBUFFER,Gn.__webglColorRenderbuffer[Kn]);const oi=m.get(Te[Kn]).__webglTexture;o.bindFramebuffer(b.FRAMEBUFFER,Gn.__webglFramebuffer),b.framebufferTexture2D(b.DRAW_FRAMEBUFFER,b.COLOR_ATTACHMENT0+Kn,b.TEXTURE_2D,oi,0)}o.bindFramebuffer(b.DRAW_FRAMEBUFFER,Gn.__webglMultisampledFramebuffer)}},this.setupDepthRenderbuffer=kt,this.setupFrameBufferTexture=mn,this.useMultisampledRTT=ai}function Na(b,n,o){const m=o.isWebGL2;return{convert:function A(E,w=null){let T;if(E===Ko)return b.UNSIGNED_BYTE;if(1017===E)return b.UNSIGNED_SHORT_4_4_4_4;if(1018===E)return b.UNSIGNED_SHORT_5_5_5_1;if(1010===E)return b.BYTE;if(1011===E)return b.SHORT;if(1012===E)return b.UNSIGNED_SHORT;if(1013===E)return b.INT;if(E===Pl)return b.UNSIGNED_INT;if(E===Rl)return b.FLOAT;if(E===yr)return m?b.HALF_FLOAT:(T=n.get("OES_texture_half_float"),null!==T?T.HALF_FLOAT_OES:null);if(1021===E)return b.ALPHA;if(E===ea)return b.RGBA;if(1024===E)return b.LUMINANCE;if(1025===E)return b.LUMINANCE_ALPHA;if(E===Zo)return b.DEPTH_COMPONENT;if(E===jo)return b.DEPTH_STENCIL;if(1035===E)return T=n.get("EXT_sRGB"),null!==T?T.SRGB_ALPHA_EXT:null;if(1028===E)return b.RED;if(1029===E)return b.RED_INTEGER;if(1030===E)return b.RG;if(1031===E)return b.RG_INTEGER;if(1033===E)return b.RGBA_INTEGER;if(E===eu||E===Do||E===tu||E===yf)if(w===xr){if(T=n.get("WEBGL_compressed_texture_s3tc_srgb"),null===T)return null;if(E===eu)return T.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(E===Do)return T.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(E===tu)return T.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(E===yf)return T.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else{if(T=n.get("WEBGL_compressed_texture_s3tc"),null===T)return null;if(E===eu)return T.COMPRESSED_RGB_S3TC_DXT1_EXT;if(E===Do)return T.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(E===tu)return T.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(E===yf)return T.COMPRESSED_RGBA_S3TC_DXT5_EXT}if(35840===E||35841===E||35842===E||35843===E){if(T=n.get("WEBGL_compressed_texture_pvrtc"),null===T)return null;if(35840===E)return T.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(35841===E)return T.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(35842===E)return T.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(35843===E)return T.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}if(36196===E)return T=n.get("WEBGL_compressed_texture_etc1"),null!==T?T.COMPRESSED_RGB_ETC1_WEBGL:null;if(37492===E||37496===E){if(T=n.get("WEBGL_compressed_texture_etc"),null===T)return null;if(37492===E)return w===xr?T.COMPRESSED_SRGB8_ETC2:T.COMPRESSED_RGB8_ETC2;if(37496===E)return w===xr?T.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:T.COMPRESSED_RGBA8_ETC2_EAC}if(37808===E||37809===E||37810===E||37811===E||37812===E||37813===E||37814===E||37815===E||37816===E||37817===E||37818===E||37819===E||37820===E||37821===E){if(T=n.get("WEBGL_compressed_texture_astc"),null===T)return null;if(37808===E)return w===xr?T.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:T.COMPRESSED_RGBA_ASTC_4x4_KHR;if(37809===E)return w===xr?T.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:T.COMPRESSED_RGBA_ASTC_5x4_KHR;if(37810===E)return w===xr?T.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:T.COMPRESSED_RGBA_ASTC_5x5_KHR;if(37811===E)return w===xr?T.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:T.COMPRESSED_RGBA_ASTC_6x5_KHR;if(37812===E)return w===xr?T.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:T.COMPRESSED_RGBA_ASTC_6x6_KHR;if(37813===E)return w===xr?T.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:T.COMPRESSED_RGBA_ASTC_8x5_KHR;if(37814===E)return w===xr?T.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:T.COMPRESSED_RGBA_ASTC_8x6_KHR;if(37815===E)return w===xr?T.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:T.COMPRESSED_RGBA_ASTC_8x8_KHR;if(37816===E)return w===xr?T.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:T.COMPRESSED_RGBA_ASTC_10x5_KHR;if(37817===E)return w===xr?T.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:T.COMPRESSED_RGBA_ASTC_10x6_KHR;if(37818===E)return w===xr?T.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:T.COMPRESSED_RGBA_ASTC_10x8_KHR;if(37819===E)return w===xr?T.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:T.COMPRESSED_RGBA_ASTC_10x10_KHR;if(37820===E)return w===xr?T.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:T.COMPRESSED_RGBA_ASTC_12x10_KHR;if(37821===E)return w===xr?T.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:T.COMPRESSED_RGBA_ASTC_12x12_KHR}if(E===th){if(T=n.get("EXT_texture_compression_bptc"),null===T)return null;if(E===th)return w===xr?T.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:T.COMPRESSED_RGBA_BPTC_UNORM_EXT}if(36283===E||36284===E||36285===E||36286===E){if(T=n.get("EXT_texture_compression_rgtc"),null===T)return null;if(E===th)return T.COMPRESSED_RED_RGTC1_EXT;if(36284===E)return T.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(36285===E)return T.COMPRESSED_RED_GREEN_RGTC2_EXT;if(36286===E)return T.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}return E===Bl?m?b.UNSIGNED_INT_24_8:(T=n.get("WEBGL_depth_texture"),null!==T?T.UNSIGNED_INT_24_8_WEBGL:null):void 0!==b[E]?b[E]:null}}}class Bi extends $s{constructor(n=[]){super(),this.isArrayCamera=!0,this.cameras=n}}class Jr extends Fr{constructor(){super(),this.isGroup=!0,this.type="Group"}}const Rt={type:"move"};class zi{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return null===this._hand&&(this._hand=new Jr,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return null===this._targetRay&&(this._targetRay=new Jr,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new De,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new De),this._targetRay}getGripSpace(){return null===this._grip&&(this._grip=new Jr,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new De,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new De),this._grip}dispatchEvent(n){return null!==this._targetRay&&this._targetRay.dispatchEvent(n),null!==this._grip&&this._grip.dispatchEvent(n),null!==this._hand&&this._hand.dispatchEvent(n),this}connect(n){if(n&&n.hand){const o=this._hand;if(o)for(const m of n.hand.values())this._getHandJoint(o,m)}return this.dispatchEvent({type:"connected",data:n}),this}disconnect(n){return this.dispatchEvent({type:"disconnected",data:n}),null!==this._targetRay&&(this._targetRay.visible=!1),null!==this._grip&&(this._grip.visible=!1),null!==this._hand&&(this._hand.visible=!1),this}update(n,o,m){let A=null,E=null,w=null;const T=this._targetRay,B=this._grip,D=this._hand;if(n&&"visible-blurred"!==o.session.visibilityState){if(D&&n.hand){w=!0;for(const he of n.hand.values()){const J=o.getJointPose(he,m),Y=this._getHandJoint(D,he);null!==J&&(Y.matrix.fromArray(J.transform.matrix),Y.matrix.decompose(Y.position,Y.rotation,Y.scale),Y.jointRadius=J.radius),Y.visible=null!==J}const H=D.joints["index-finger-tip"].position.distanceTo(D.joints["thumb-tip"].position),Q=.02,Z=.005;D.inputState.pinching&&H>Q+Z?(D.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:n.handedness,target:this})):!D.inputState.pinching&&H<=Q-Z&&(D.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:n.handedness,target:this}))}else null!==B&&n.gripSpace&&(E=o.getPose(n.gripSpace,m),null!==E&&(B.matrix.fromArray(E.transform.matrix),B.matrix.decompose(B.position,B.rotation,B.scale),E.linearVelocity?(B.hasLinearVelocity=!0,B.linearVelocity.copy(E.linearVelocity)):B.hasLinearVelocity=!1,E.angularVelocity?(B.hasAngularVelocity=!0,B.angularVelocity.copy(E.angularVelocity)):B.hasAngularVelocity=!1));null!==T&&(A=o.getPose(n.targetRaySpace,m),null===A&&null!==E&&(A=E),null!==A&&(T.matrix.fromArray(A.transform.matrix),T.matrix.decompose(T.position,T.rotation,T.scale),A.linearVelocity?(T.hasLinearVelocity=!0,T.linearVelocity.copy(A.linearVelocity)):T.hasLinearVelocity=!1,A.angularVelocity?(T.hasAngularVelocity=!0,T.angularVelocity.copy(A.angularVelocity)):T.hasAngularVelocity=!1,this.dispatchEvent(Rt)))}return null!==T&&(T.visible=null!==A),null!==B&&(B.visible=null!==E),null!==D&&(D.visible=null!==w),this}_getHandJoint(n,o){if(void 0===n.joints[o.jointName]){const m=new Jr;m.matrixAutoUpdate=!1,m.visible=!1,n.joints[o.jointName]=m,n.add(m)}return n.joints[o.jointName]}}class zp extends va{constructor(n,o,m,A,E,w,T,B,D,N){if((N=void 0!==N?N:Zo)!==Zo&&N!==jo)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");void 0===m&&N===Zo&&(m=Pl),void 0===m&&N===jo&&(m=Bl),super(null,A,E,w,T,B,N,m,D),this.isDepthTexture=!0,this.image={width:n,height:o},this.magFilter=void 0!==T?T:Jn,this.minFilter=void 0!==B?B:Jn,this.flipY=!1,this.generateMipmaps=!1}}class hv extends Ki{constructor(n,o){super();const m=this;let A=null,E=1,w=null,T="local-floor",B=1,D=null,N=null,G=null,H=null,Q=null,Z=null;const he=o.getContextAttributes();let J=null,Y=null;const ve=[],pe=[],Ae=new Set,Ie=new Map,Ne=new $s;Ne.layers.enable(1),Ne.viewport=new fr;const Xe=new $s;Xe.layers.enable(2),Xe.viewport=new fr;const Qe=[Ne,Xe],Se=new Bi;Se.layers.enable(1),Se.layers.enable(2);let Le=null,vt=null;function Pt(wt){const Zt=pe.indexOf(wt.inputSource);if(-1===Zt)return;const En=ve[Zt];void 0!==En&&En.dispatchEvent({type:wt.type,data:wt.inputSource})}function ot(){A.removeEventListener("select",Pt),A.removeEventListener("selectstart",Pt),A.removeEventListener("selectend",Pt),A.removeEventListener("squeeze",Pt),A.removeEventListener("squeezestart",Pt),A.removeEventListener("squeezeend",Pt),A.removeEventListener("end",ot),A.removeEventListener("inputsourceschange",dt);for(let wt=0;wt<ve.length;wt++){const Zt=pe[wt];null!==Zt&&(pe[wt]=null,ve[wt].disconnect(Zt))}Le=null,vt=null,n.setRenderTarget(J),Q=null,H=null,G=null,A=null,Y=null,In.stop(),m.isPresenting=!1,m.dispatchEvent({type:"sessionend"})}function dt(wt){for(let Zt=0;Zt<wt.removed.length;Zt++){const En=wt.removed[Zt],Bn=pe.indexOf(En);Bn>=0&&(pe[Bn]=null,ve[Bn].disconnect(En))}for(let Zt=0;Zt<wt.added.length;Zt++){const En=wt.added[Zt];let Bn=pe.indexOf(En);if(-1===Bn){for(let Ei=0;Ei<ve.length;Ei++){if(Ei>=pe.length){pe.push(En),Bn=Ei;break}if(null===pe[Ei]){pe[Ei]=En,Bn=Ei;break}}if(-1===Bn)break}const $e=ve[Bn];$e&&$e.connect(En)}}this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(wt){let Zt=ve[wt];
83return void 0===Zt&&(Zt=new zi,ve[wt]=Zt),Zt.getTargetRaySpace()},this.getControllerGrip=function(wt){let Zt=ve[wt];return void 0===Zt&&(Zt=new zi,ve[wt]=Zt),Zt.getGripSpace()},this.getHand=function(wt){let Zt=ve[wt];return void 0===Zt&&(Zt=new zi,ve[wt]=Zt),Zt.getHandSpace()},this.setFramebufferScaleFactor=function(wt){E=wt,!0===m.isPresenting&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(wt){T=wt,!0===m.isPresenting&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return D||w},this.setReferenceSpace=function(wt){D=wt},this.getBaseLayer=function(){return null!==H?H:Q},this.getBinding=function(){return G},this.getFrame=function(){return Z},this.getSession=function(){return A},this.setSession=function(){var wt=S(function*(Zt){if(A=Zt,null!==A){if(J=n.getRenderTarget(),A.addEventListener("select",Pt),A.addEventListener("selectstart",Pt),A.addEventListener("selectend",Pt),A.addEventListener("squeeze",Pt),A.addEventListener("squeezestart",Pt),A.addEventListener("squeezeend",Pt),A.addEventListener("end",ot),A.addEventListener("inputsourceschange",dt),!0!==he.xrCompatible&&(yield o.makeXRCompatible()),void 0===A.renderState.layers||!1===n.capabilities.isWebGL2)Q=new XRWebGLLayer(A,o,{antialias:void 0!==A.renderState.layers||he.antialias,alpha:he.alpha,depth:he.depth,stencil:he.stencil,framebufferScaleFactor:E}),A.updateRenderState({baseLayer:Q}),Y=new Fo(Q.framebufferWidth,Q.framebufferHeight,{format:ea,type:Ko,encoding:n.outputEncoding,stencilBuffer:he.stencil});else{let En=null,Bn=null,$e=null;he.depth&&($e=he.stencil?o.DEPTH24_STENCIL8:o.DEPTH_COMPONENT24,En=he.stencil?jo:Zo,Bn=he.stencil?Bl:Pl);const Ei={colorFormat:o.RGBA8,depthFormat:$e,scaleFactor:E};G=new XRWebGLBinding(A,o),H=G.createProjectionLayer(Ei),A.updateRenderState({layers:[H]}),Y=new Fo(H.textureWidth,H.textureHeight,{format:ea,type:Ko,depthTexture:new zp(H.textureWidth,H.textureHeight,Bn,void 0,void 0,void 0,void 0,void 0,void 0,En),stencilBuffer:he.stencil,encoding:n.outputEncoding,samples:he.antialias?4:0}),n.properties.get(Y).__ignoreDepthValues=H.ignoreDepthValues}Y.isXRRenderTarget=!0,this.setFoveation(B),D=null,w=yield A.requestReferenceSpace(T),In.setContext(A),In.start(),m.isPresenting=!0,m.dispatchEvent({type:"sessionstart"})}});return function(Zt){return wt.apply(this,arguments)}}();const Et=new De,tn=new De;function Ht(wt,Zt){null===Zt?wt.matrixWorld.copy(wt.matrix):wt.matrixWorld.multiplyMatrices(Zt.matrixWorld,wt.matrix),wt.matrixWorldInverse.copy(wt.matrixWorld).invert()}this.updateCamera=function(wt){if(null===A)return;Se.near=Xe.near=Ne.near=wt.near,Se.far=Xe.far=Ne.far=wt.far,(Le!==Se.near||vt!==Se.far)&&(A.updateRenderState({depthNear:Se.near,depthFar:Se.far}),Le=Se.near,vt=Se.far);const Zt=wt.parent,En=Se.cameras;Ht(Se,Zt);for(let Bn=0;Bn<En.length;Bn++)Ht(En[Bn],Zt);2===En.length?function cn(wt,Zt,En){Et.setFromMatrixPosition(Zt.matrixWorld),tn.setFromMatrixPosition(En.matrixWorld);const Bn=Et.distanceTo(tn),$e=Zt.projectionMatrix.elements,Ei=En.projectionMatrix.elements,fi=$e[14]/($e[10]-1),mn=$e[14]/($e[10]+1),jn=($e[9]+1)/$e[5],Jt=($e[9]-1)/$e[5],kt=($e[8]-1)/$e[0],en=(Ei[8]+1)/Ei[0],Wn=fi*kt,bn=fi*en,di=Bn/(-kt+en),pi=di*-kt;Zt.matrixWorld.decompose(wt.position,wt.quaternion,wt.scale),wt.translateX(pi),wt.translateZ(di),wt.matrixWorld.compose(wt.position,wt.quaternion,wt.scale),wt.matrixWorldInverse.copy(wt.matrixWorld).invert();const ai=fi+di,Gi=mn+di;wt.projectionMatrix.makePerspective(Wn-pi,bn+(Bn-pi),jn*mn/Gi*ai,Jt*mn/Gi*ai,ai,Gi),wt.projectionMatrixInverse.copy(wt.projectionMatrix).invert()}(Se,Ne,Xe):Se.projectionMatrix.copy(Ne.projectionMatrix),function nn(wt,Zt,En){null===En?wt.matrix.copy(Zt.matrixWorld):(wt.matrix.copy(En.matrixWorld),wt.matrix.invert(),wt.matrix.multiply(Zt.matrixWorld)),wt.matrix.decompose(wt.position,wt.quaternion,wt.scale),wt.updateMatrixWorld(!0);const Bn=wt.children;for(let $e=0,Ei=Bn.length;$e<Ei;$e++)Bn[$e].updateMatrixWorld(!0);wt.projectionMatrix.copy(Zt.projectionMatrix),wt.projectionMatrixInverse.copy(Zt.projectionMatrixInverse),wt.isPerspectiveCamera&&(wt.fov
83=2*rh*Math.atan(1/wt.projectionMatrix.elements[5]),wt.zoom=1)}(wt,Se,Zt)},this.getCamera=function(){return Se},this.getFoveation=function(){if(null!==H||null!==Q)return B},this.setFoveation=function(wt){B=wt,null!==H&&(H.fixedFoveation=wt),null!==Q&&void 0!==Q.fixedFoveation&&(Q.fixedFoveation=wt)},this.getPlanes=function(){return Ae};let dn=null;const In=new Ec;In.setAnimationLoop(function Yn(wt,Zt){if(N=Zt.getViewerPose(D||w),Z=Zt,null!==N){const En=N.views;null!==Q&&(n.setRenderTargetFramebuffer(Y,Q.framebuffer),n.setRenderTarget(Y));let Bn=!1;En.length!==Se.cameras.length&&(Se.cameras.length=0,Bn=!0);for(let $e=0;$e<En.length;$e++){const Ei=En[$e];let fi=null;if(null!==Q)fi=Q.getViewport(Ei);else{const jn=G.getViewSubImage(H,Ei);fi=jn.viewport,0===$e&&(n.setRenderTargetTextures(Y,jn.colorTexture,H.ignoreDepthValues?void 0:jn.depthStencilTexture),n.setRenderTarget(Y))}let mn=Qe[$e];void 0===mn&&(mn=new $s,mn.layers.enable($e),mn.viewport=new fr,Qe[$e]=mn),mn.matrix.fromArray(Ei.transform.matrix),mn.matrix.decompose(mn.position,mn.quaternion,mn.scale),mn.projectionMatrix.fromArray(Ei.projectionMatrix),mn.projectionMatrixInverse.copy(mn.projectionMatrix).invert(),mn.viewport.set(fi.x,fi.y,fi.width,fi.height),0===$e&&(Se.matrix.copy(mn.matrix),Se.matrix.decompose(Se.position,Se.quaternion,Se.scale)),!0===Bn&&Se.cameras.push(mn)}}for(let En=0;En<ve.length;En++){const Bn=pe[En],$e=ve[En];null!==Bn&&void 0!==$e&&$e.update(Bn,Zt,D||w)}if(dn&&dn(wt,Zt),Zt.detectedPlanes){m.dispatchEvent({type:"planesdetected",data:Zt.detectedPlanes});let En=null;for(const Bn of Ae)Zt.detectedPlanes.has(Bn)||(null===En&&(En=[]),En.push(Bn));if(null!==En)for(const Bn of En)Ae.delete(Bn),Ie.delete(Bn),m.dispatchEvent({type:"planeremoved",data:Bn});for(const Bn of Zt.detectedPlanes)if(Ae.has(Bn)){const $e=Ie.get(Bn);Bn.lastChangedTime>$e&&(Ie.set(Bn,Bn.lastChangedTime),m.dispatchEvent({type:"planechanged",data:Bn}))}else Ae.add(Bn),Ie.set(Bn,Zt.lastChangedTime),m.dispatchEvent({type:"planeadded",data:Bn})}Z=null}),this.setAnimationLoop=function(wt){dn=wt},this.dispose=function(){}}}function j1(b,n){function o(J,Y){!0===J.matrixAutoUpdate&&J.updateMatrix(),Y.value.copy(J.matrix)}function E(J,Y){J.opacity.value=Y.opacity,Y.color&&J.diffuse.value.copy(Y.color),Y.emissive&&J.emissive.value.copy(Y.emissive).multiplyScalar(Y.emissiveIntensity),Y.map&&(J.map.value=Y.map,o(Y.map,J.mapTransform)),Y.alphaMap&&(J.alphaMap.value=Y.alphaMap,o(Y.alphaMap,J.alphaMapTransform)),Y.bumpMap&&(J.bumpMap.value=Y.bumpMap,o(Y.bumpMap,J.bumpMapTransform),J.bumpScale.value=Y.bumpScale,1===Y.side&&(J.bumpScale.value*=-1)),Y.normalMap&&(J.normalMap.value=Y.normalMap,o(Y.normalMap,J.normalMapTransform),J.normalScale.value.copy(Y.normalScale),1===Y.side&&J.normalScale.value.negate()),Y.displacementMap&&(J.displacementMap.value=Y.displacementMap,o(Y.displacementMap,J.displacementMapTransform),J.displacementScale.value=Y.displacementScale,J.displacementBias.value=Y.displacementBias),Y.emissiveMap&&(J.emissiveMap.value=Y.emissiveMap,o(Y.emissiveMap,J.emissiveMapTransform)),Y.
83specularMap&&(J.specularMap.value=Y.specularMap,o(Y.specularMap,J.specularMapTransform)),Y.alphaTest>0&&(J.alphaTest.value=Y.alphaTest);const ve=n.get(Y).envMap;if(ve&&(J.envMap.value=ve,J.flipEnvMap.value=ve.isCubeTexture&&!1===ve.isRenderTargetTexture?-1:1,J.reflectivity.value=Y.reflectivity,J.ior.value=Y.ior,J.refractionRatio.value=Y.refractionRatio),Y.lightMap){J.lightMap.value=Y.lightMap;const pe=!0===b.useLegacyLights?Math.PI:1;J.lightMapIntensity.value=Y.lightMapIntensity*pe,o(Y.lightMap,J.lightMapTransform)}Y.aoMap&&(J.aoMap.value=Y.aoMap,J.aoMapIntensity.value=Y.aoMapIntensity,o(Y.aoMap,J.aoMapTransform))}return{refreshFogUniforms:function m(J,Y){Y.color.getRGB(J.fogColor.value,ar(b)),Y.isFog?(J.fogNear.value=Y.near,J.fogFar.value=Y.far):Y.isFogExp2&&(J.fogDensity.value=Y.density)},refreshMaterialUniforms:function A(J,Y,ve,pe,Ae){Y.isMeshBasicMaterial||Y.isMeshLambertMaterial?E(J,Y):Y.isMeshToonMaterial?(E(J,Y),function G(J,Y){Y.gradientMap&&(J.gradientMap.value=Y.gradientMap)}(J,Y)):Y.isMeshPhongMaterial?(E(J,Y),function N(J,Y){J.specular.value.copy(Y.specular),J.shininess.value=Math.max(Y.shininess,1e-4)}(J,Y)):Y.isMeshStandardMaterial?(E(J,Y),function H(J,Y){J.metalness.value=Y.metalness,Y.metalnessMap&&(J.metalnessMap.value=Y.metalnessMap,o(Y.metalnessMap,J.metalnessMapTransform)),J.roughness.value=Y.roughness,Y.roughnessMap&&(J.roughnessMap.value=Y.roughnessMap,o(Y.roughnessMap,J.roughnessMapTransform)),n.get(Y).envMap&&(J.envMapIntensity.value=Y.envMapIntensity)}(J,Y),Y.isMeshPhysicalMaterial&&function Q(J,Y,ve){J.ior.value=Y.ior,Y.sheen>0&&(J.sheenColor.value.copy(Y.sheenColor).multiplyScalar(Y.sheen),J.sheenRoughness.value=Y.sheenRoughness,Y.sheenColorMap&&(J.sheenColorMap.value=Y.sheenColorMap,o(Y.sheenColorMap,J.sheenColorMapTransform)),Y.
83sheenRoughnessMap&&(J.sheenRoughnessMap.value=Y.sheenRoughnessMap,o(Y.sheenRoughnessMap,J.sheenRoughnessMapTransform))),Y.clearcoat>0&&(J.clearcoat.value=Y.clearcoat,J.clearcoatRoughness.value=Y.clearcoatRoughness,Y.clearcoatMap&&(J.clearcoatMap.value=Y.clearcoatMap,o(Y.clearcoatMap,J.clearcoatMapTransform)),Y.clearcoatRoughnessMap&&(J.clearcoatRoughnessMap.value=Y.clearcoatRoughnessMap,o(Y.clearcoatRoughnessMap,J.clearcoatRoughnessMapTransform)),Y.clearcoatNormalMap&&(J.clearcoatNormalMap.value=Y.clearcoatNormalMap,o(Y.clearcoatNormalMap,J.clearcoatNormalMapTransform),J.clearcoatNormalScale.value.copy(Y.clearcoatNormalScale),1===Y.side&&J.clearcoatNormalScale.value.negate())),Y.iridescence>0&&(J.iridescence.value=Y.iridescence,J.iridescenceIOR.value=Y.iridescenceIOR,J.iridescenceThicknessMinimum.value=Y.iridescenceThicknessRange[0],J.iridescenceThicknessMaximum.value=Y.iridescenceThicknessRange[1],Y.iridescenceMap&&(J.iridescenceMap.value=Y.iridescenceMap,o(Y.iridescenceMap,J.iridescenceMapTransform)),Y.iridescenceThicknessMap&&(J.iridescenceThicknessMap.value=Y.iridescenceThicknessMap,o(Y.iridescenceThicknessMap,J.iridescenceThicknessMapTransform))),Y.transmission>0&&(J.transmission.value=Y.transmission,J.transmissionSamplerMap.value=ve.texture,J.transmissionSamplerSize.value.set(ve.width,ve.height),Y.transmissionMap&&(J.transmissionMap.value=Y.transmissionMap,o(Y.transmissionMap,J.transmissionMapTransform)),J.thickness.value=Y.thickness,Y.thicknessMap&&(J.thicknessMap.value=Y.thicknessMap,o(Y.thicknessMap,J.thicknessMapTransform)),J.attenuationDistance.value=Y.attenuationDistance,J.attenuationColor.value.copy(Y.attenuationColor)),J.specularIntensity.value=Y.specularIntensity,J.specularColor.value.copy(Y.specularColor),Y.specularColorMap&&(J.specularColorMap.value=Y.specularColorMap,o(Y.specularColorMap,J.specularColorMapTransform)),Y.
83specularIntensityMap&&(J.specularIntensityMap.value=Y.specularIntensityMap,o(Y.specularIntensityMap,J.specularIntensityMapTransform))}(J,Y,Ae)):Y.isMeshMatcapMaterial?(E(J,Y),function Z(J,Y){Y.matcap&&(J.matcap.value=Y.matcap)}(J,Y)):Y.isMeshDepthMaterial?E(J,Y):Y.isMeshDistanceMaterial?(E(J,Y),function he(J,Y){const ve=n.get(Y).light;J.referencePosition.value.setFromMatrixPosition(ve.matrixWorld),J.nearDistance.value=ve.shadow.camera.near,J.farDistance.value=ve.shadow.camera.far}(J,Y)):Y.isMeshNormalMaterial?E(J,Y):Y.isLineBasicMaterial?(function w(J,Y){J.diffuse.value.copy(Y.color),J.opacity.value=Y.opacity,Y.map&&(J.map.value=Y.map,o(Y.map,J.mapTransform))}(J,Y),Y.isLineDashedMaterial&&function T(J,Y){J.dashSize.value=Y.dashSize,J.totalSize.value=Y.dashSize+Y.gapSize,J.scale.value=Y.scale}(J,Y)):Y.isPointsMaterial?function B(J,Y,ve,pe){J.diffuse.value.copy(Y.color),J.opacity.value=Y.opacity,J.size.value=Y.size*ve,J.scale.value=.5*pe,Y.map&&(J.map.value=Y.map,o(Y.map,J.uvTransform)),Y.alphaMap&&(J.alphaMap.value=Y.alphaMap),Y.alphaTest>0&&(J.alphaTest.value=Y.alphaTest)}(J,Y,ve,pe):Y.isSpriteMaterial?function D(J,Y){J.diffuse.value.copy(Y.color),J.opacity.value=Y.opacity,J.rotation.value=Y.rotation,Y.map&&(J.map.value=Y.map,o(Y.map,J.mapTransform)),Y.alphaMap&&(J.alphaMap.value=Y.alphaMap),Y.alphaTest>0&&(J.alphaTest.value=Y.alphaTest)}(J,Y):Y.isShadowMaterial?(J.color.value.copy(Y.color),J.opacity.value=Y.opacity):Y.isShaderMaterial&&(Y.uniformsNeedUpdate=!1)}}}function Uu(b,n,o,m){let A={},E={},w=[];const T=o.isWebGL2?b.getParameter(b.MAX_UNIFORM_BUFFER_BINDINGS):0;function Q(ve,pe,Ae){const Ie=ve.value;if(void 0===Ae[pe]){if("number"==typeof Ie)Ae[pe]=Ie;else{const Ne=Array.isArray(Ie)?Ie:[Ie],Xe=[];for(let Qe=0;Qe<Ne.length;Qe++)Xe.push(Ne[Qe].clone());Ae[pe]=Xe}return!0}if("number"==typeof Ie){if(Ae[pe]!==Ie)return Ae[pe]=Ie,!0}else{const Ne=Array.isArray(Ae[pe])?Ae[pe]:[Ae[pe]],Xe=Array.isArray(Ie)?Ie:[Ie];for(let Qe=0;Qe<Ne.length;Qe++){const Se=Ne[Qe];if(!1===Se.equals(Xe[Qe]))return Se.copy(Xe[Qe]),!0}}return!1}function he(ve){const pe={boundary:0,storage:0};return"number"==typeof ve?(pe.boundary=4,pe.storage=4):ve.isVector2?(pe.boundary=8,pe.storage=8):ve.isVector3||ve.isColor?(pe.boundary=16,pe.storage=12):ve.isVector4?(pe.boundary=16,pe.storage=16):ve.isMatrix3?(pe.boundary=48,pe.storage=48):ve.isMatrix4?(pe.boundary=64,pe.storage=64):ve.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",ve),pe}function J(ve){const pe=ve.target;pe.removeEventListener("dispose",J);const Ae=w.indexOf(pe.__bindingPointIndex);w.splice(Ae,1),b.deleteBuffer(A[pe.id]),delete A[pe.id],delete E[pe.id]}return{bind:function B(ve,pe){m.uniformBlockBinding(ve,pe.program)},update:function D(ve,pe){let Ae=A[ve.id];void 0===Ae&&(function Z(ve){const pe=ve.uniforms;let Ae=0;let Ne=0;for(let Xe=0,Qe=pe.length;Xe<Qe;Xe++){const Se=pe[Xe],Le={boundary:0,storage:0},vt=Array.isArray(Se.value)?Se.value:[Se.value];for(let Pt=0,ot=vt.length;Pt<ot;Pt++){const Et=he(vt[Pt]);Le.boundary+=Et.boundary,Le.storage+=Et.storage}Se.__data=new Float32Array(Le.storage/Float32Array.BYTES_PER_ELEMENT),Se.__offset=Ae,Xe>0&&(Ne=Ae%16,0!==Ne&&16-Ne-Le.boundary<0&&(Ae+=16-Ne,Se.__offset=Ae)),Ae+=Le.storage}Ne=Ae%16,Ne>0&&(Ae+=16-Ne),ve.__size=Ae,ve.__cache={}}(ve),Ae=function N(ve){const pe=function G(){for(let ve=0;ve<T;ve++)if(-1===w.indexOf(ve))return w.push(ve),ve;return console.error("THREE.WebGLRenderer: Maximum number of simultaneously usable uniforms groups reached."),0}();ve.__bindingPointIndex=pe;const Ae=b.createBuffer(),Ie=ve.__size,Ne=ve.usage;return b.bindBuffer(b.UNIFORM_BUFFER,Ae),b.bufferData(b.UNIFORM_BUFFER,Ie,Ne),b.bindBuffer(b.UNIFORM_BUFFER,null),b.bindBufferBase(b.UNIFORM_BUFFER,pe,Ae),Ae}(ve),A[ve.id]=Ae,ve.addEventListener("dispose",J)),m.updateUBOMapping(ve,pe.program);const Ne=n.render.frame;E[ve.id]!==Ne&&(function H(ve){const Ae=ve.uniforms,Ie=ve.__cache;b.bindBuffer(b.UNIFORM_BUFFER,A[ve.id]);for(let Ne=0,Xe=Ae.length;Ne<Xe;Ne++){const Qe=Ae[Ne];if(!0===Q(Qe,Ne,Ie)){const Se=Qe.__offset,Le=Array.isArray(Qe.value)?Qe.value:[Qe.value];let vt=0;for(let Pt=0;Pt<Le.length;Pt++){const ot=Le[Pt],dt=he(ot);"number"==typeof ot?(Qe.__data[0]=ot,b.bufferSubData(b.UNIFORM_BUFFER,Se+vt,Qe.__data)):ot.isMatrix3?(Qe.__data[0]=ot.elements[0],Qe.__data[1]=ot.elements[1],Qe.__data[2]=ot.elements[2],Qe.__data[3]=ot.elements[0],Qe.__data[4]=ot.elements[3],Qe.__data[5]=ot.elements[4],Qe.__data[6]=ot.elements[5],Qe.__data[7]=ot.elements[0],Qe.__data[8]=ot.elements[6],Qe.__data[9]=ot.elements[7],Qe.__data[10]=ot.elements[8],Qe.__data[11]=ot.elements[0]):(ot.toArray(Qe.__data,vt),vt+=dt.storage/Float32Array.BYTES_PER_ELEMENT)}b.bufferSubData(b.UNIFORM_BUFFER,Se,Qe.__data)}}b.bindBuffer(b.UNIFORM_BUFFER,null)}(ve),E[ve.id]=Ne)},dispose:function Y(){for(const ve in A)b.deleteBuffer(A[ve]);w=[],A={},E={}}}}function rd(){const b=ah("canvas");return b.style.display="block",b}class _h{constructor(n={}){const{canvas:o=rd(),context:m=null,depth:A=!0,stencil:E=!0,alpha:w=!1,antialias:T=!1,premultipliedAlpha:B=!0,preserveDrawingBuffer:D=!1,powerPreference:N="default",failIfMajorPerformanceCaveat:G=!1}=n;let H;
vendor: 4,422 bytes, line 83
83this.isWebGLRenderer=!0,H=null!==m?m.getContextAttributes().alpha:w;let Q=null,Z=null;const he=[],J=[];this.domElement=o,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.outputEncoding=dc,this.useLegacyLights=!0,this.toneMapping=rr,this.toneMappingExposure=1;const Y=this;let ve=!1,pe=0,Ae=0,Ie=null,Ne=-1,Xe=null;const Qe=new fr,Se=new fr;let Le=null,vt=o.width,Pt=o.height,ot=1,dt=null,Et=null;const tn=new fr(0,0,vt,Pt),cn=new fr(0,0,vt,Pt);let Ht=!1;const nn=new bp;let dn=!1,Yn=!1,In=null;const wt=new Ti,Zt=new De,En={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function Bn(){return null===Ie?ot:1}let fi,mn,jn,Jt,kt,en,Wn,bn,di,pi,ai,Gi,nr,Ue,Te,yt,an,un,wn,yi,Gn,Bt,Kn,oi,$e=m;function Ei(Be,mt){for(let Ct=0;Ct<Be.length;Ct++){const Nt=o.getContext(Be[Ct],mt);if(null!==Nt)return Nt}return null}try{const Be={alpha:!0,depth:A,stencil:E,antialias:T,premultipliedAlpha:B,preserveDrawingBuffer:D,powerPreference:N,failIfMajorPerformanceCaveat:G};if("setAttribute"in o&&o.setAttribute("data-engine",`three.js r${I}`),o.addEventListener("webglcontextlost",$n,!1),o.addEventListener("webglcontextrestored",ji,!1),o.addEventListener("webglcontextcreationerror",_r,!1),null===$e){const mt=["webgl2","webgl","experimental-webgl"];if(!0===Y.isWebGL1Renderer&&mt.shift(),$e=Ei(mt,Be),null===$e)throw Ei(mt)?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.")}void 0===$e.getShaderPrecisionFormat&&($e.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}})}catch(Be){throw console.error("THREE.WebGLRenderer: "+Be.message),Be}function mi(){fi=new Ns($e),mn=new Hr($e,fi,n),fi.init(mn),Bt=new Na($e,fi,mn),jn=new cv($e,fi,mn),Jt=new ph($e),kt=new jr,en=new Z1($e,fi,jn,kt,mn,Bt,Jt),Wn=new gM(Y),bn=new T1(Y),di=new Sp($e,mn),Kn=new aa($e,fi,di,mn),pi=new I1($e,di,Jt,Kn),ai=new jf($e,pi,di,Jt),wn=new R1($e,mn,en),yt=new Pp(kt),Gi=new Za(Y,Wn,bn,fi,mn,Kn,yt),nr=new j1(Y,kt),Ue=new id,Te=new $1(fi,mn),un=new Zl(Y,Wn,bn,jn,ai,H,B),an=new lv(Y,ai,mn),oi=new Uu($e,Jt,mn,jn),yi=new Kf($e,fi,Jt,mn),Gn=new P1($e,fi,Jt,mn),Jt.programs=Gi.programs,Y.capabilities=mn,Y.extensions=fi,Y.properties=kt,Y.renderLists=Ue,Y.shadowMap=an,Y.state=jn,Y.info=Jt}mi();const Xn=new hv(Y,$e);function $n(Be){Be.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),ve=!0}function ji(){console.log("THREE.WebGLRenderer: Context Restored."),ve=!1;const Be=Jt.autoReset,mt=an.enabled,Ct=an.autoUpdate,lt=an.needsUpdate,Nt=an.type;mi(),Jt.autoReset=Be,an.enabled=mt,an.autoUpdate=Ct,an.needsUpdate=lt,an.type=Nt}function _r(Be){console.error("THREE.WebGLRenderer: A WebGL context could not be created. Reason: ",Be.statusMessage)}function ls(Be){const mt=Be.target;mt.removeEventListener("dispose",ls),function Ke(Be){(function It(Be){const mt=kt.get(Be).programs;void 0!==mt&&(mt.forEach(function(Ct){Gi.releaseProgram(Ct)}),Be.isShaderMaterial&&Gi.releaseShaderCache(Be))})(Be),kt.remove(Be)}(mt)}this.xr=Xn,this.getContext=function(){return $e},this.getContextAttributes=function(){return $e.getContextAttributes()},this.forceContextLoss=function(){const Be=fi.get("WEBGL_lose_context");Be&&Be.loseContext()},this.forceContextRestore=function(){const Be=fi.get("WEBGL_lose_context");Be&&Be.restoreContext()},this.getPixelRatio=function(){return ot},this.setPixelRatio=function(Be){void 0!==Be&&(ot=Be,this.setSize(vt,Pt,!1))},this.getSize=function(Be){return Be.set(vt,Pt)},this.setSize=function(Be,mt,Ct=!0){Xn.isPresenting?console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting."):(vt=Be,Pt=mt,o.width=Math.floor(Be*ot),o.height=Math.floor(mt*ot),!0===Ct&&(o.style.width=Be+"px",o.style.height=mt+"px"),this.setViewport(0,0,Be,mt))},this.getDrawingBufferSize=function(Be){return Be.set(vt*ot,Pt*ot).floor()},this.setDrawingBufferSize=function(Be,mt,Ct){vt=Be,Pt=mt,ot=Ct,o.width=Math.floor(Be*Ct),o.height=Math.floor(mt*Ct),this.setViewport(0,0,Be,mt)},this.getCurrentViewport=function(Be){return Be.copy(Qe)},this.getViewport=function(Be){return Be.copy(tn)},this.setViewport=function(Be,mt,Ct,lt){Be.isVector4?tn.set(Be.x,Be.y,Be.z,Be.w):tn.set(Be,mt,Ct,lt),jn.viewport(Qe.copy(tn).multiplyScalar(ot).floor())}
83,this.getScissor=function(Be){return Be.copy(cn)},this.setScissor=function(Be,mt,Ct,lt){Be.isVector4?cn.set(Be.x,Be.y,Be.z,Be.w):cn.set(Be,mt,Ct,lt),jn.scissor(Se.copy(cn).multiplyScalar(ot).floor())},this.getScissorTest=function(){return Ht},this.setScissorTest=function(Be){jn.setScissorTest(Ht=Be)},this.setOpaqueSort=function(Be){dt=Be},this.setTransparentSort=function(Be){Et=Be},this.getClearColor=function(Be){return Be.copy(un.getClearColor())},this.setClearColor=function(){un.setClearColor.apply(un,arguments)},this.getClearAlpha=function(){return un.getClearAlpha()},this.setClearAlpha=function(){un.setClearAlpha.apply(un,arguments)},this.clear=function(Be=!0,mt=!0,Ct=!0){let lt=0;Be&&(lt|=$e.COLOR_BUFFER_BIT),mt&&(lt|=$e.DEPTH_BUFFER_BIT),Ct&&(lt|=$e.STENCIL_BUFFER_BIT),$e.clear(lt)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.dispose=function(){o.removeEventListener("webglcontextlost",$n,!1),o.removeEventListener("webglcontextrestored",ji,!1),o.removeEventListener("webglcontextcreationerror",_r,!1),Ue.dispose(),Te.dispose(),kt.dispose(),Wn.dispose(),bn.dispose(),ai.dispose(),Kn.dispose(),oi.dispose(),Gi.dispose(),Xn.dispose(),Xn.removeEventListener("sessionstart",ti),Xn.removeEventListener("sessionend",Br),In&&(In.dispose(),In=null),Xr.stop()},this.renderBufferDirect=function(Be,mt,Ct,lt,Nt,li){null===mt&&(mt=En);const Si=Nt.isMesh&&Nt.matrixWorld.determinant()<0,Ci=function lb(Be,mt,Ct,lt,Nt){!0!==mt.isScene&&(mt=En),en.resetTextureUnits();const li=mt.fog,Ci=null===Ie?Y.outputEncoding:!0===Ie.isXRRenderTarget?Ie.texture.encoding:dc,ki=(lt.isMeshStandardMaterial?bn:Wn).get(lt.envMap||(lt.isMeshStandardMaterial?mt.environment:null)),Vi=!0===lt.vertexColors&&!!Ct.attributes.color&&4===Ct.attributes.color.itemSize,Xi=!!lt.normalMap&&!!Ct.attributes.tangent,qi=!!Ct.morphAttributes.position,vr=!!Ct.morphAttributes.normal,Sa=!!Ct.morphAttributes.color,$o=lt.toneMapped?Y.toneMapping:rr,Vh=Ct.morphAttributes.position||Ct.morphAttributes.normal||Ct.morphAttributes.color,ys=void 0!==Vh?Vh.length:0,ir=kt.get(lt),I0=Z.state.lights;!0!==dn||!0!==Yn&&Be===Xe||yt.setState(lt,Be,Be===Xe&&lt.id===Ne);let Gs=!1;lt.version===ir.__version?(ir.needsLights&&ir.lightsStateVersion!==I0.state.version||ir.outputEncoding!==Ci||Nt.isInstancedMesh&&!1===ir.instancing||!Nt.isInstancedMesh&&!0===ir.instancing||Nt.isSkinnedMesh&&
83!1===ir.skinning||!Nt.isSkinnedMesh&&!0===ir.skinning||ir.envMap!==ki||!0===lt.fog&&ir.fog!==li||void 0!==ir.numClippingPlanes&&(ir.numClippingPlanes!==yt.numPlanes||ir.numIntersection!==yt.numIntersection)||ir.vertexAlphas!==Vi||ir.vertexTangents!==Xi||ir.morphTargets!==qi||ir.morphNormals!==vr||ir.morphColors!==Sa||ir.toneMapping!==$o||!0===mn.isWebGL2&&ir.morphTargetsCount!==ys)&&(Gs=!0):(Gs=!0,ir.__version=lt.version);let Ga=ir.currentProgram;!0===Gs&&(Ga=hm(lt,mt,Nt));let fy=!1,Hh=!1,P0=!1;const Ma=Ga.getUniforms(),Qh=ir.uniforms;if(jn.useProgram(Ga.program)&&(fy=!0,Hh=!0,P0=!0),lt.id!==Ne&&(Ne=lt.id,Hh=!0),fy||Xe!==Be){if(Ma.setValue($e,"projectionMatrix",Be.projectionMatrix),mn.logarithmicDepthBuffer&&Ma.setValue($e,"logDepthBufFC",2/(Math.log(Be.far+1)/Math.LN2)),Xe!==Be&&(Xe=Be,Hh=!0,P0=!0),lt.isShaderMaterial||lt.isMeshPhongMaterial||lt.isMeshToonMaterial||lt.isMeshStandardMaterial||lt.envMap){const ro=Ma.map.cameraPosition;void 0!==ro&&ro.setValue($e,Zt.setFromMatrixPosition(Be.matrixWorld))}(lt.isMeshPhongMaterial||lt.isMeshToonMaterial||lt.isMeshLambertMaterial||lt.isMeshBasicMaterial||lt.isMeshStandardMaterial||lt.isShaderMaterial)&&Ma.setValue($e,"isOrthographic",!0===Be.isOrthographicCamera),(lt.isMeshPhongMaterial||lt.isMeshToonMaterial||lt.isMeshLambertMaterial||lt.isMeshBasicMaterial||lt.isMeshStandardMaterial||lt.isShaderMaterial||lt.isShadowMaterial||Nt.isSkinnedMesh)&&Ma.setValue($e,"viewMatrix",Be.matrixWorldInverse)}if(Nt.isSkinnedMesh){Ma.setOptional($e,Nt,"bindMatrix"),Ma.setOptional($e,Nt,"bindMatrixInverse");const ro=Nt.skeleton;ro&&(mn.floatVertexTextures?(null===ro.boneTexture&&ro.computeBoneTexture(),Ma.setValue($e,"boneTexture",ro.boneTexture,en),Ma.setValue($e,"boneTextureSize",ro.boneTextureSize)):console.warn("THREE.WebGLRenderer: SkinnedMesh can only be used with WebGL 2. With WebGL 1 OES_texture_float and vertex textures support is required."))}const R0=Ct.morphAttributes;if((void 0!==R0.position||void 0!==R0.normal||void 0!==R0.color&&!0===mn.isWebGL2)&&wn.update(Nt,Ct,Ga),(Hh||ir.receiveShadow!==Nt.receiveShadow)&&(ir.receiveShadow=Nt.receiveShadow,Ma.setValue($e,"receiveShadow",Nt.receiveShadow)),lt.isMeshGouraudMaterial&&null!==lt.envMap&&(Qh.envMap.value=ki,Qh.flipEnvMap.value=ki.isCubeTexture&&!1===ki.isRenderTargetTexture?-1:1),Hh&&(Ma.setValue($e,"toneMappingExposure",Y.toneMappingExposure),ir.needsLights&&function cb(Be,mt){Be.ambientLightColor.needsUpdate=mt,Be.lightProbe.needsUpdate=mt,Be.directionalLights.needsUpdate=mt,Be.directionalLightShadows.needsUpdate=mt,Be.pointLights.needsUpdate=mt,Be.pointLightShadows.needsUpdate=mt,Be.spotLights.needsUpdate=mt,Be.spotLightShadows.needsUpdate=mt,Be.rectAreaLights.needsUpdate=mt,Be.hemisphereLights.needsUpdate=mt}(Qh,P0),li&&!0===lt.fog&&nr.refreshFogUniforms(Qh,li),nr.refreshMaterialUniforms(Qh,lt,ot,Pt,In),Gg.upload($e,ir.uniformsList,Qh,en)),lt.isShaderMaterial&&!0===lt.uniformsNeedUpdate&&(Gg.upload($e,ir.uniformsList,Qh,en),lt.uniformsNeedUpdate=!1),lt.isSpriteMaterial&&Ma.setValue($e,"center",Nt.center),Ma.setValue($e,"modelViewMatrix",Nt.modelViewMatrix),Ma.setValue($e,"normalMatrix",Nt.normalMatrix),Ma.setValue($e,"modelMatrix",Nt.matrixWorld),lt.isShaderMaterial||lt.isRawShaderMaterial){const ro=lt.uniformsGroups;for(let um=0,ub=ro.length;um<ub;um++)if(mn.isWebGL2){const fm=ro[um];oi.update(fm,Ga),oi.bind(fm,Ga)}else console.warn("THREE.WebGLRenderer: Uniform Buffer Objects can only be used with WebGL 2.")}return Ga}(Be,mt,Ct,lt,Nt);jn.setMaterial(lt,Si);let ki=Ct.index,Vi=1;!0===lt.wireframe&&(ki=pi.getWireframeAttribute(Ct),Vi=2);const Xi=Ct.drawRange,qi=Ct.attributes.position;let vr=Xi.start*Vi,Sa=(Xi.start+Xi.count)*Vi;null!==li&&(vr=Math.max(vr,li.start*Vi),Sa=Math.min(Sa,(li.start+li.count)*Vi)),null!==ki?(vr=Math.max(vr,0),Sa=Math.min(Sa,ki.count)):null!=qi&&(vr=Math.max(vr,0),Sa=Math.min(Sa,qi.count));const $o=Sa-vr;if($o<0||$o===1/0)return;Kn.setup(Nt,lt,Ci,Ct,ki);let Vh,ys=yi;if(null!==ki&&(Vh=di.get(ki),ys=Gn,ys.setIndex(Vh)),Nt.isMesh)!0===lt.wireframe?(jn.setLineWidth(lt.wireframeLinewidth*Bn()),ys.setMode($e.LINES)):ys.setMode($e.TRIANGLES);else if(Nt.isLine){let ir=lt.linewidth;void 0===ir&&(ir=1),jn.setLineWidth(ir*Bn()),ys.setMode(Nt.isLineSegments?$e.LINES:Nt.isLineLoop?$e.LINE_LOOP:$e.LINE_STRIP)}else Nt.isPoints?ys.setMode($e.POINTS):Nt.isSprite&&ys.setMode($e.TRIANGLES);if(Nt.isInstancedMesh)ys.renderInstances(vr,$o,Nt.count);else if(Ct.isInstancedBufferGeometry){const I0=Math.min(Ct.instanceCount,void 0!==Ct._maxInstanceCount?Ct._maxInstanceCount:1/0);ys.renderInstances(vr,$o,I0)}else ys.render(vr,$o)},this.compile=function(Be,mt){function Ct(lt,Nt,li){!0===lt.transparent&&2===lt.side&&!1===lt.forceSinglePass?(lt.side=1,lt.needsUpdate=!0,hm(lt,Nt,li),lt.side=0,lt.needsUpdate=!0,hm(lt,Nt,li),lt.side=2):hm(lt,Nt,li)}Z=Te.get(Be),Z.init(),J.push(Z),Be.traverseVisible(function(lt){lt.isLight&&lt.layers.test(mt.layers
83)&&(Z.pushLight(lt),lt.castShadow&&Z.pushShadow(lt))}),Z.setupLights(Y.useLegacyLights),Be.traverse(function(lt){const Nt=lt.material;if(Nt)if(Array.isArray(Nt))for(let li=0;li<Nt.length;li++)Ct(Nt[li],Be,lt);else Ct(Nt,Be,lt)}),J.pop(),Z=null};let hn=null;function ti(){Xr.stop()}function Br(){Xr.start()}const Xr=new Ec;function ca(Be,mt,Ct,lt){if(!1===Be.visible)return;if(Be.layers.test(mt.layers))if(Be.isGroup)Ct=Be.renderOrder;else if(Be.isLOD)!0===Be.autoUpdate&&Be.update(mt);else if(Be.isLight)Z.pushLight(Be),Be.castShadow&&Z.pushShadow(Be);else if(Be.isSprite){if(!Be.frustumCulled||nn.intersectsSprite(Be)){lt&&Zt.setFromMatrixPosition(Be.matrixWorld).applyMatrix4(wt);const Si=ai.update(Be),Ci=Be.material;Ci.visible&&Q.push(Be,Si,Ci,Ct,Zt.z,null)}}else if((Be.isMesh||Be.isLine||Be.isPoints)&&(Be.isSkinnedMesh&&Be.skeleton.frame!==Jt.render.frame&&(Be.skeleton.update(),Be.skeleton.frame=Jt.render.frame),!Be.frustumCulled||nn.intersectsObject(Be))){lt&&Zt.setFromMatrixPosition(Be.matrixWorld).applyMatrix4(wt);const Si=ai.update(Be),Ci=Be.material;if(Array.isArray(Ci)){const ki=Si.groups;for(let Vi=0,Xi=ki.length;Vi<Xi;Vi++){const qi=ki[Vi],vr=Ci[qi.materialIndex];vr&&vr.visible&&Q.push(Be,Si,vr,Ct,Zt.z,qi)}}else Ci.visible&&Q.push(Be,Si,Ci,Ct,Zt.z,null)}const li=Be.children;for(let Si=0,Ci=li.length;Si<Ci;Si++)ca(li[Si],mt,Ct,lt)}function Gc(Be,mt,Ct,lt){const Nt=Be.opaque,li=Be.transmissive,Si=Be.transparent;Z.setupLightsView(Ct),!0===dn&&yt.setGlobalState(Y.clippingPlanes,Ct),li.length>0&&function cs(Be,mt,Ct,lt){if(null===In){const Ci=mn.isWebGL2;In=new Fo(1024,1024,{generateMipmaps:!0,type:fi.has("EXT_color_buffer_half_float")?yr:Ko,minFilter:Il,samples:Ci&&!0===T?4:0})}const Nt=Y.getRenderTarget();Y.setRenderTarget(In),Y.clear();const li=Y.toneMapping;Y.toneMapping=rr,Io(Be,Ct,lt),en.updateMultisampleRenderTarget(In),en.updateRenderTargetMipmap(In);let Si=!1;for(let Ci=0,ki=mt.length;Ci<ki;Ci++){const Vi=mt[Ci],Xi=Vi.object,qi=Vi.geometry,vr=Vi.material,Sa=Vi.group;if(2===vr.side&&Xi.layers.test(lt.layers)){const $o=vr.side;vr.side=1,vr.needsUpdate=!0,Sl(Xi,Ct,lt,qi,vr,Sa),vr.side=$o,vr.needsUpdate=!0,Si=!0}}!0===Si&&(en.updateMultisampleRenderTarget(In),en.updateRenderTargetMipmap(In)),Y.setRenderTarget(Nt),Y.toneMapping=li}(Nt,li,mt,Ct),lt&&jn.viewport(Qe.copy(lt)),Nt.length>0&&Io(Nt,mt,Ct),li.length>0&&Io(li,mt,Ct),Si.length>0&&Io(Si,mt,Ct),jn.buffers.depth.setTest(!0),jn.buffers.depth.setMask(!0),jn.buffers.color.setMask(!0),jn.setPolygonOffset(!1)}function Io(Be,mt,Ct){const lt=!0===mt.isScene?mt.overrideMaterial:null;for(let Nt=0,li=Be.length;Nt<li;Nt++){const Si=Be[Nt],Ci=Si.object,ki=Si.geometry,Vi=null===lt?Si.material:lt,Xi=Si.group;Ci.layers.test(Ct.layers)&&Sl(Ci,mt,Ct,ki,Vi,Xi)}}function Sl(Be,mt,Ct,lt,Nt,li){Be.onBeforeRender(Y,mt,Ct,lt,Nt,li),Be.modelViewMatrix.multiplyMatrices(Ct.matrixWorldInverse,Be.matrixWorld),Be.normalMatrix.getNormalMatrix(Be.modelViewMatrix),Nt.onBeforeRender(Y,mt,Ct,lt,Be,li),!0===Nt.transparent&&2===Nt.side&&!1===Nt.forceSinglePass?(Nt.side=1,Nt.needsUpdate=!0,Y.renderBufferDirect(Ct,mt,lt,Nt,Be,li),Nt.side=0,Nt.needsUpdate=!0,Y.renderBufferDirect(Ct,mt,lt,Nt,Be,li),Nt.side=2):Y.renderBufferDirect(Ct,mt,lt,Nt,Be,li),Be.onAfterRender(Y,mt,Ct,lt,Nt,li)}function hm(Be,mt,Ct){!0!==mt.isScene&&(mt=En);const lt=kt.get(Be),Nt=Z.state.lights,Si=Nt.state.version,Ci=Gi.getParameters(Be,Nt.state,Z.state.shadowsArray,mt,Ct),ki=Gi.getProgramCacheKey(Ci);let Vi=lt.programs;lt.environment=Be.isMeshStandardMaterial?mt.environment:null,lt.fog=mt.fog,lt.envMap=(Be.isMeshStandardMaterial?bn:Wn).get(Be.envMap||lt.environment),void 0===Vi&&(Be.addEventListener("dispose",ls),Vi=new Map,lt.programs=Vi);let Xi=Vi.get(ki);if(void 0!==Xi){if(lt.currentProgram===Xi&&lt.lightsStateVersion===Si)return uy(Be,Ci),Xi}else Ci.uniforms=Gi.getUniforms(Be),Be.onBuild(Ct,Ci,Y),Be.onBeforeCompile(Ci,Y),Xi=Gi.acquireProgram(Ci,ki),Vi.set(ki,Xi),lt.uniforms=Ci.uniforms;const qi=lt.uniforms;(!Be.isShaderMaterial&&!Be.isRawShaderMaterial||!0===Be.clipping)&&(qi.clippingPlanes=yt.uniform),uy(Be,Ci),lt.needsLights=function hb(Be){return Be.isMeshLambertMaterial||Be.isMeshToonMaterial||Be.isMeshPhongMaterial||Be.isMeshStandardMaterial||Be.isShadowMaterial||Be.isShaderMaterial&&!0===Be.lights}(Be),lt.lightsStateVersion=Si,lt.needsLights&&(qi.ambientLightColor.value=Nt.state.ambient,qi.lightProbe.value=Nt.state.probe,qi.directionalLights.value=Nt.state.directional,qi.directionalLightShadows.value=Nt.state.directionalShadow,qi.spotLights.value=Nt.state.spot,qi.spotLightShadows.value=Nt.state.spotShadow,qi.rectAreaLights.value=Nt.state.rectArea,qi.ltc_1.value=Nt.state.rectAreaLTC1,qi.ltc_2.value=Nt.state.rectAreaLTC2,qi.pointLights.value=Nt.state.point,qi.pointLightShadows.value=Nt.state.pointShadow,qi.hemisphereLights.value=Nt.state.hemi,qi.directionalShadowMap.value=Nt.state.directionalShadowMap,qi.directionalShadowMatrix.value=Nt.state.directionalShadowMatrix,qi.spotShadowMap.value=Nt.state.spotShadowMap,qi.spotLightMatrix.value=Nt.state.spotLightMatrix,qi.spotLightMap.value=Nt.state.spotLightMap,qi.pointShadowMap.value=Nt.state.pointShadowMap,qi.pointShadowMatrix.value=Nt.state.pointShadowMatrix);const vr=Xi.getUniforms(),Sa=Gg.seqWithValue(vr.seq,qi);return lt.currentProgram=Xi,lt.uniformsList=Sa,Xi}function uy(Be,mt){const Ct=kt.get(Be);Ct.outputEncoding=mt.outputEncoding,Ct.instancing=mt.instancing,Ct.skinning=mt.skinning,Ct.morphTargets=mt.morphTargets,Ct.morphNormals=mt.morphNormals,Ct.morphColors=mt.morphColors,Ct.morphTargetsCount=mt.morphTargetsCount,Ct.numClippingPlanes=mt.numClippingPlanes,Ct.numIntersection=mt.numClipIntersection,Ct.vertexAlphas=mt.vertexAlphas,Ct.vertexTangents=mt.vertexTangents,Ct.toneMapping=mt.toneMapping}Xr.setAnimationLoop(function Ln(Be){hn&&hn(Be)}),typeof self<"u"&&Xr.setContext(self),this.setAnimationLoop=function(Be){hn=Be,Xn.setAnimationLoop(Be),null===Be?Xr.stop():Xr.start()},Xn.addEventListener("sessionstart",ti),Xn.addEventListener("sessionend",Br),this.render=function(Be,mt){if(void 0===mt||!0===mt.isCamera){if(!0!==ve){if(!0===Be.matrixWorldAutoUpdate&&Be.updateMatrixWorld(),null===mt.parent&&!0===mt.matrixWorldAutoUpdate&&mt.updateMatrixWorld(),!0===Xn.enabled&&!0===Xn.isPresenting&&(!0===Xn.cameraAutoUpdate&&Xn.updateCamera(mt),mt=Xn.getCamera()),!0===Be.isScene&&Be.onBeforeRender(Y,Be,mt,Ie),Z=Te.get(Be,J.length),Z.init(),J.push(Z),wt.multiplyMatrices(mt.projectionMatrix,mt.matrixWorldInverse),nn.setFromProjectionMatrix(wt),Yn=this.localClippingEnabled,dn=yt.init(this.clippingPlanes,Yn),Q=Ue.get(Be,he.length),Q.init(),he.push(Q),ca(Be,mt,0,Y.sortObjects),Q.finish(),!0===Y.sortObjects&&Q.sort(dt,Et),!0===dn&&yt.beginShadows(),an.render(Z.state.shadowsArray,Be,mt),!0===dn&&yt.endShadows(),!0===this.info.autoReset&&this.info.reset(),un.render(Q,Be),Z.setupLights(Y.useLegacyLights),mt.isArrayCamera){const lt=mt.cameras;for(let Nt=0,li=lt.length;Nt<li;Nt++){const Si=lt[Nt];Gc(Q,Be,Si,Si.viewport)}}else Gc(Q,Be,mt);null!==Ie&&(en.updateMultisampleRenderTarget(Ie),en.updateRenderTargetMipmap(Ie)),!0===Be.isScene&&Be.onAfterRender(Y,Be,mt),Kn.resetDefaultState(),Ne=-1,Xe=null,J.pop(),Z=J.length>0?J[J.length-1]:null,he.pop(),Q=he.length>0?he[he.length-1]:null}}else console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.")},this.getActiveCubeFace=function(){return pe},this.getActiveMipmapLevel=function(){return Ae},this.getRenderTarget=function(){return Ie},this.setRenderTargetTextures=function(Be,mt,Ct){kt.get(Be.texture).__webglTexture=mt,kt.get(Be.depthTexture).__webglTexture=Ct;const lt=kt.get(Be);lt.__hasExternalTextures=!0,lt.__hasExternalTextures&&(lt.__autoAllocateDepthBuffer=void 0===Ct,lt.__autoAllocateDepthBuffer||!0===fi.has("WEBGL_multisampled_render_to_texture")&&(console.warn("THREE.WebGLRenderer: Render-to-texture extension was disabled because an external texture was provided"),lt.__useRenderToTexture=!1))},this.setRenderTargetFramebuffer=function(Be,mt){const Ct=kt.get(Be);Ct.__webglFramebuffer=mt,Ct.__useDefaultFramebuffer=void 0===mt},this.setRenderTarget=function(Be,mt=0,Ct=0){Ie=Be,pe=mt,Ae=Ct;let lt=!0,Nt=null,li=!1,Si=!1;if(Be){const ki=kt.get(Be);void 0!==ki.__useDefaultFramebuffer?(jn.bindFramebuffer($e.FRAMEBUFFER,null),lt=!1):void 0===ki.__webglFramebuffer?en.setupRenderTarget(Be):ki.__hasExternalTextures&&en.rebindTextures(Be,kt.get(Be.texture).__webglTexture,kt.get(Be.depthTexture).__webglTexture);const Vi=Be.texture;(Vi.isData3DTexture||Vi.isDataArrayTexture||Vi.isCompressedArrayTexture)&&(Si=!0);const Xi=kt.get(Be).__webglFramebuffer;
vendor: 14,314 bytes, line 83
83Be.isWebGLCubeRenderTarget?(Nt=Xi[mt],li=!0):Nt=mn.isWebGL2&&Be.samples>0&&!1===en.useMultisampledRTT(Be)?kt.get(Be).__webglMultisampledFramebuffer:Xi,Qe.copy(Be.viewport),Se.copy(Be.scissor),Le=Be.scissorTest}else Qe.copy(tn).multiplyScalar(ot).floor(),Se.copy(cn).multiplyScalar(ot).floor(),Le=Ht;if(jn.bindFramebuffer($e.FRAMEBUFFER,Nt)&&mn.drawBuffers&&lt&&jn.drawBuffers(Be,Nt),jn.viewport(Qe),jn.scissor(Se),jn.setScissorTest(Le),li){const ki=kt.get(Be.texture);$e.framebufferTexture2D($e.FRAMEBUFFER,$e.COLOR_ATTACHMENT0,$e.TEXTURE_CUBE_MAP_POSITIVE_X+mt,ki.__webglTexture,Ct)}else if(Si){const ki=kt.get(Be.texture);$e.framebufferTextureLayer($e.FRAMEBUFFER,$e.COLOR_ATTACHMENT0,ki.__webglTexture,Ct||0,mt||0)}Ne=-1},this.readRenderTargetPixels=function(Be,mt,Ct,lt,Nt,li,Si){if(!Be||!Be.isWebGLRenderTarget)return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let Ci=kt.get(Be).__webglFramebuffer;if(Be.isWebGLCubeRenderTarget&&void 0!==Si&&(Ci=Ci[Si]),Ci){jn.bindFramebuffer($e.FRAMEBUFFER,Ci);try{const ki=Be.texture,Vi=ki.format,Xi=ki.type;if(Vi!==ea&&Bt.convert(Vi)!==$e.getParameter($e.IMPLEMENTATION_COLOR_READ_FORMAT))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");const qi=Xi===yr&&(fi.has("EXT_color_buffer_half_float")||mn.isWebGL2&&fi.has("EXT_color_buffer_float"));if(!(Xi===Ko||Bt.convert(Xi)===$e.getParameter($e.IMPLEMENTATION_COLOR_READ_TYPE)||Xi===Rl&&(mn.isWebGL2||fi.has("OES_texture_float")||fi.has("WEBGL_color_buffer_float"))||qi))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");mt>=0&&mt<=Be.width-lt&&Ct>=0&&Ct<=Be.height-Nt&&$e.readPixels(mt,Ct,lt,Nt,Bt.convert(Vi),Bt.convert(Xi),li)}finally{const ki=null!==Ie?kt.get(Ie).__webglFramebuffer:null;jn.bindFramebuffer($e.FRAMEBUFFER,ki)}}},this.copyFramebufferToTexture=function(Be,mt,Ct=0){const lt=Math.pow(2,-Ct),Nt=Math.floor(mt.image.width*lt),li=Math.floor(mt.image.height*lt);en.setTexture2D(mt,0),$e.copyTexSubImage2D($e.TEXTURE_2D,Ct,0,0,Be.x,Be.y,Nt,li),jn.unbindTexture()},this.copyTextureToTexture=function(Be,mt,Ct,lt=0){const Nt=mt.image.width,li=mt.image.height,Si=Bt.convert(Ct.format),Ci=Bt.convert(Ct.type);en.setTexture2D(Ct,0),$e.pixelStorei($e.UNPACK_FLIP_Y_WEBGL,Ct.flipY),$e.pixelStorei($e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,Ct.premultiplyAlpha),$e.pixelStorei($e.UNPACK_ALIGNMENT,Ct.unpackAlignment),mt.isDataTexture?$e.texSubImage2D($e.TEXTURE_2D,lt,Be.x,Be.y,Nt,li,Si,Ci,mt.image.data):mt.isCompressedTexture?$e.compressedTexSubImage2D($e.TEXTURE_2D,lt,Be.x,Be.y,mt.mipmaps[0].width,mt.mipmaps[0].height,Si,mt.mipmaps[0].data):$e.texSubImage2D($e.TEXTURE_2D,lt,Be.x,Be.y,Si,Ci,mt.image),0===lt&&Ct.generateMipmaps&&$e.generateMipmap($e.TEXTURE_2D),jn.unbindTexture()},this.copyTextureToTexture3D=function(Be,mt,Ct,lt,Nt=0){if(Y.isWebGL1Renderer)return void console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");const li=Be.max.x-Be.min.x+1,Si=Be.max.y-Be.min.y+1,Ci=Be.max.z-Be.min.z+1,ki=Bt.convert(lt.format),Vi=Bt.convert(lt.type);let Xi;if(lt.isData3DTexture)en.setTexture3D(lt,0),Xi=$e.TEXTURE_3D;else{if(!lt.isDataArrayTexture)return void console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");en.setTexture2DArray(lt,0),Xi=$e.TEXTURE_2D_ARRAY}$e.pixelStorei($e.UNPACK_FLIP_Y_WEBGL,lt.flipY),$e.pixelStorei($e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,lt.premultiplyAlpha),$e.pixelStorei($e.UNPACK_ALIGNMENT,lt.unpackAlignment);const qi=$e.getParameter($e.UNPACK_ROW_LENGTH),vr=$e.getParameter($e.UNPACK_IMAGE_HEIGHT),Sa=$e.getParameter($e.UNPACK_SKIP_PIXELS),$o=$e.getParameter($e.UNPACK_SKIP_ROWS),Vh=$e.getParameter($e.UNPACK_SKIP_IMAGES),ys=Ct.isCompressedTexture?Ct.mipmaps[0]:Ct.image;$e.pixelStorei($e.UNPACK_ROW_LENGTH,ys.width),$e.pixelStorei($e.UNPACK_IMAGE_HEIGHT,ys.height),$e.pixelStorei($e.UNPACK_SKIP_PIXELS,Be.min.x),$e.pixelStorei($e.UNPACK_SKIP_ROWS,Be.min.y),$e.pixelStorei($e.UNPACK_SKIP_IMAGES,Be.min.z),Ct.isDataTexture||Ct.isData3DTexture?$e.texSubImage3D(Xi,Nt,mt.x,mt.y,mt.z,li,Si,Ci,ki,Vi,ys.data):Ct.isCompressedArrayTexture?(console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture."),$e.compressedTexSubImage3D(Xi,Nt,mt.x,mt.y,mt.z,li,Si,Ci,ki,ys.data)):$e.texSubImage3D(Xi,Nt,mt.x,mt.y,mt.z,li,Si,Ci,ki,Vi,ys),$e.pixelStorei($e.UNPACK_ROW_LENGTH,qi),$e.pixelStorei($e.UNPACK_IMAGE_HEIGHT,vr),$e.pixelStorei($e.UNPACK_SKIP_PIXELS,Sa),$e.pixelStorei($e.UNPACK_SKIP_ROWS,$o),$e.pixelStorei($e.UNPACK_SKIP_IMAGES,Vh),0===Nt&&lt.generateMipmaps&&$e.generateMipmap(Xi),jn.unbindTexture()},this.initTexture=function(Be){Be.isCubeTexture?en.setTextureCube(Be,0):Be.isData3DTexture?en.setTexture3D(Be,0):Be.isDataArrayTexture||Be.isCompressedArrayTexture?en.setTexture2DArray(Be,0):en.setTexture2D(Be,0),jn.unbindTexture()},this.resetState=function(){pe=0,Ae=0,Ie=null,jn.reset(),Kn.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get physicallyCorrectLights(){return console.warn("THREE.WebGLRenderer: the property .physicallyCorrectLights has been removed. Set renderer.useLegacyLights instead."),!this.useLegacyLights}set physicallyCorrectLights(n){console.warn("THREE.WebGLRenderer: the property .physicallyCorrectLights has been removed. Set renderer.useLegacyLights instead."),this.useLegacyLights=!n}}class Gp extends _h{}Gp.prototype.isWebGL1Renderer=!0;class Vp{constructor(n,o=25e-5){this.isFogExp2=!0,this.name="",this.color=new Dn(n),this.density=o}clone(){return new Vp(this.color,this.density)}toJSON(){return{type:"FogExp2",color:this.color.getHex(),density:this.density}}}class Hp{constructor(n,o=1,m=1e3){this.isFog=!0,this.name="",this.color=new Dn(n),this.near=o,this.far=m}clone(){return new Hp(this.color,this.near,this.far)}toJSON(){return{type:"Fog",color:this.color.getHex(),near:this.near,far:this.far}}}class uv extends Fr{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(n,o){return super.copy(n,o),null!==n.background&&(this.background=n.background.clone()),null!==n.environment&&(this.environment=n.environment.clone()),null!==n.fog&&(this.fog=n.fog.clone()),this.backgroundBlurriness=n.backgroundBlurriness,this.backgroundIntensity=n.backgroundIntensity,null!==n.overrideMaterial&&(this.overrideMaterial=n.overrideMaterial.clone()),this.matrixAutoUpdate=n.matrixAutoUpdate,this}toJSON(n){const o=super.toJSON(n);return null!==this.fog&&(o.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(o.object.backgroundBlurriness=this.backgroundBlurriness),1!==this.backgroundIntensity&&(o.object.backgroundIntensity=this.backgroundIntensity),o}get autoUpdate(){return console.warn("THREE.Scene: autoUpdate was renamed to matrixWorldAutoUpdate in r144."),this.matrixWorldAutoUpdate}set autoUpdate(n){console.warn("THREE.Scene: autoUpdate was renamed to matrixWorldAutoUpdate in r144."),this.matrixWorldAutoUpdate=n}}class Qp{constructor(n,o){this.isInterleavedBuffer=!0,this.array=n,this.stride=o,this.count=void 0!==n?n.length/o:0,this.usage=au,this.updateRange={offset:0,count:-1},this.version=0,this.uuid=Ra()}onUploadCallback(){}set needsUpdate(n){!0===n&&this.version++}setUsage(n){return this.usage=n,this}copy(n){return this.array=new n.array.constructor(n.array),this.count=n.count,this.stride=n.stride,this.usage=n.usage,this}copyAt(n,o,m){n*=this.stride,m*=o.stride;for(let A=0,E=this.stride;A<E;A++)this.array[n+A]=o.array[m+A];return this}set(n,o=0){return this.array.set(n,o),this}clone(n){void 0===n.arrayBuffers&&(n.arrayBuffers={}),void 0===this.array.buffer._uuid&&(this.array.buffer._uuid=Ra()),void 0===n.arrayBuffers[this.array.buffer._uuid]&&(n.arrayBuffers[this.array.buffer._uuid]=this.array.slice(0).buffer);const o=new this.array.constructor(n.arrayBuffers[this.array.buffer._uuid]),m=new this.constructor(o,this.stride);return m.setUsage(this.usage),m}onUpload(n){return this.onUploadCallback=n,this}toJSON(n){return void 0===n.arrayBuffers&&(n.arrayBuffers={}),void 0===this.array.buffer._uuid&&(this.array.buffer._uuid=Ra()),void 0===n.arrayBuffers[this.array.buffer._uuid]&&(n.arrayBuffers[this.array.buffer._uuid]=Array.from(new Uint32Array(this.array.buffer))),{uuid:this.uuid,buffer:this.array.buffer._uuid,type:this.array.constructor.name,stride:this.stride}}}const Ea=new De;class vh{constructor(n,o,m,A=!1){this.isInterleavedBufferAttribute=!0,this.name="",this.data=n,this.itemSize=o,this.offset=m,this.normalized=A}get count(){return this.data.count}get array(){return this.data.array}set needsUpdate(n){this.data.needsUpdate=n}applyMatrix4(n){for(let o=0,m=this.data.count;o<m;o++)Ea.fromBufferAttribute(this,o),Ea.applyMatrix4(n),this.setXYZ(o,Ea.x,Ea.y,Ea.z);return this}applyNormalMatrix(n){for(let o=0,m=this.count;o<m;o++)Ea.fromBufferAttribute(this,o),Ea.applyNormalMatrix(n),this.setXYZ(o,Ea.x,Ea.y,Ea.z);return this}transformDirection(n){for(let o=0,m=this.count;o<m;o++)Ea.fromBufferAttribute(this,o),Ea.transformDirection(n),this.setXYZ(o,Ea.x,Ea.y,Ea.z);return this}setX(n,o){return this.normalized&&(o=wi(o,this.array)),this.data.array[n*this.data.stride+this.offset]=o,this}setY(n,o){return this.normalized&&(o=wi(o,this.array)),this.data.array[n*this.data.stride+this.offset+1]=o,this}setZ(n,o){return this.normalized&&(o=wi(o,this.array)),this.data.array[n*this.data.stride+this.offset+2]=o,this}setW(n,o){return this.normalized&&(o=wi(o,this.array)),this.data.array[n*this.data.stride+this.offset+3]=o,this}getX(n){let o=this.data.array[n*this.data.stride+this.offset];return this.normalized&&(o=Ba(o,this.array)),o}getY(n){let o=this.data.array[n*this.data.stride+this.offset+1];return this.normalized&&(o=Ba(o,this.array)),o}getZ(n){let o=this.data.array[n*this.data.stride+this.offset+2];return this.normalized&&(o=Ba(o,this.array)),o}getW(n){let o=this.data.array[n*this.data.stride+this.offset+3];return this.normalized&&(o=Ba(o,this.array)),o}setXY(n,o,m){return n=n*this.data.stride+this.offset,this.normalized&&(o=wi(o,this.array),m=wi(m,this.array)),this.data.array[n+0]=o,this.data.array[n+1]=m,this}setXYZ(n,o,m,A){return n=n*this.data.stride+this.offset,this.normalized&&(o=wi(o,this.array),m=wi(m,this.array),A=wi(A,this.array)),this.data.array[n+0]=o,this.data.array[n+1]=m,this.data.array[n+2]=A,this}setXYZW(n,o,m,A,E){return n=n*this.data.stride+this.offset,this.normalized&&(o=wi(o,this.array),m=wi(m,this.array),A=wi(A,this.array),E=wi(E,this.array)),this.data.array[n+0]=o,this.data.array[n+1]=m,this.data.array[n+2]=A,this.data.array[n+3]=E,this}clone(n){if(void 0===n){console.log("THREE.InterleavedBufferAttribute.clone(): Cloning an interleaved buffer attribute will de-interleave buffer data.");const o=[];for(let m=0;m<this.count;m++){const A=m*this.data.stride+this.offset;for(let E=0;E<this.itemSize;E++)o.push(this.data.array[A+E])}return new Cr(new this.array.constructor(o),this.itemSize,this.normalized)}return void 0===n.interleavedBuffers&&(n.interleavedBuffers={}),void 0===n.interleavedBuffers[this.data.uuid]&&(n.interleavedBuffers[this.data.uuid]=this.data.clone(n)),new vh(n.interleavedBuffers[this.data.uuid],this.itemSize,this.offset,this.normalized)}toJSON(n){if(void 0===n){console.log("THREE.InterleavedBufferAttribute.toJSON(): Serializing an interleaved buffer attribute will de-interleave buffer data.");const o=[];for(let m=0;m<this.count;m++){const A=m*this.data.stride+this.offset;for(let E=0;E<this.itemSize;E++)o.push(this.data.array[A+E])}return{itemSize:this.itemSize,type:this.array.constructor.name,array:o,normalized:this.normalized}}return void 0===n.interleavedBuffers&&(n.interleavedBuffers={}),void 0===n.interleavedBuffers[this.data.uuid]&&(n.interleavedBuffers[this.data.uuid]=this.data.toJSON(n)),{isInterleavedBufferAttribute:!0,itemSize:this.itemSize,data:this.data.uuid,offset:this.offset,normalized:this.normalized}}}class la extends qs{constructor(n){super(),this.isSpriteMaterial=!0,this.type="SpriteMaterial",this.color=new Dn(16777215),this.map=null,this.alphaMap=null,this.rotation=0,this.sizeAttenuation=!0,this.transparent=!0,this.fog=!0,this.setValues(n)}copy(n){return super.copy(n),this.color.copy(n.color),this.map=n.map,this.alphaMap=n.alphaMap,this.rotation=n.rotation,this.sizeAttenuation=n.sizeAttenuation,this.fog=n.fog,this}}let Go;const zu=new De,Vo=new De,Rc=new De,Gu=new qt,ws=new qt,Ar=new Ti,Ks=new De,yh=new De,qg=new De,Wp=new qt,fv=new qt,J1=new qt;class Ir extends Fr{constructor(n){if(super(),this.isSprite=!0,this.type="Sprite",void 0===Go){Go=new Fi;const o=new Float32Array([-.5,-.5,0,0,0,.5,-.5,0,1,0,.5,.5,0,1,1,-.5,.5,0,0,1]),m=new Qp(o,5);Go.setIndex([0,1,2,0,2,3]),Go.setAttribute("position",new vh(m,3,0,!1)),Go.setAttribute("uv",new vh(m,2,3,!1))}this.geometry=Go,this.material=void 0!==n?n:new la,this.center=new qt(.5,.5)}raycast(n,o){null===n.camera&&console.error('THREE.Sprite: "Raycaster.camera" needs to be set in order to raycast against sprites.'),Vo.setFromMatrixScale(this.matrixWorld),Ar.copy(n.camera.matrixWorld),this.modelViewMatrix.multiplyMatrices(n.camera.matrixWorldInverse,this.matrixWorld),Rc.setFromMatrixPosition(this.modelViewMatrix),n.camera.isPerspectiveCamera&&!1===this.material.sizeAttenuation&&Vo.multiplyScalar(-Rc.z);const m=this.material.rotation;let A,E;0!==m&&(E=Math.cos(m),A=Math.sin(m));const w=this.center;Me(Ks.set(-.5,-.5,0),Rc,w,Vo,A,E),Me(yh.set(.5,-.5,0),Rc,w,Vo,A,E),Me(qg.set(.5,.5,0),Rc,w,Vo,A,E),Wp.set(0,0),fv.set(1,0),J1.set(1,1);let T=n.ray.intersectTriangle(Ks,yh,qg,!1,zu);if(null===T&&(Me(yh.set(-.5,.5,0),Rc,w,Vo,A,E),fv.set(0,1),T=n.ray.intersectTriangle(Ks,qg,yh,!1,zu),null===T))return;const B=n.ray.origin.distanceTo(zu);B<n.near||B>n.far||o.push({distance:B,point:zu.clone(),uv:ra.getInterpolation(zu,Ks,yh,qg,Wp,fv,J1,new qt),face:null,object:this})}copy(n,o){return super.copy(n,o),void 0!==n.center&&this.center.copy(n.
vendor: 7,626 bytes, line 83
83center),this.material=n.material,this}}function Me(b,n,o,m,A,E){Gu.subVectors(b,o).addScalar(.5).multiply(m),void 0!==A?(ws.x=E*Gu.x-A*Gu.y,ws.y=A*Gu.x+E*Gu.y):ws.copy(Gu),b.copy(n),b.x+=ws.x,b.y+=ws.y,b.applyMatrix4(Ar)}const Vu=new De,Yg=new De;class xo extends Fr{constructor(){super(),this._currentLevel=0,this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]},isLOD:{value:!0}}),this.autoUpdate=!0}copy(n){super.copy(n,!1);const o=n.levels;for(let m=0,A=o.length;m<A;m++){const E=o[m];this.addLevel(E.object.clone(),E.distance,E.hysteresis)}return this.autoUpdate=n.autoUpdate,this}addLevel(n,o=0,m=0){o=Math.abs(o);const A=this.levels;let E;for(E=0;E<A.length&&!(o<A[E].distance);E++);return A.splice(E,0,{distance:o,hysteresis:m,object:n}),this.add(n),this}getCurrentLevel(){return this._currentLevel}getObjectForDistance(n){const o=this.levels;if(o.length>0){let m,A;for(m=1,A=o.length;m<A;m++){let E=o[m].distance;if(o[m].object.visible&&(E-=E*o[m].hysteresis),n<E)break}return o[m-1].object}return null}raycast(n,o){if(this.levels.length>0){Vu.setFromMatrixPosition(this.matrixWorld);const A=n.ray.origin.distanceTo(Vu);this.getObjectForDistance(A).raycast(n,o)}}update(n){const o=this.levels;if(o.length>1){Vu.setFromMatrixPosition(n.matrixWorld),Yg.setFromMatrixPosition(this.matrixWorld);const m=Vu.distanceTo(Yg)/n.zoom;let A,E;for(o[0].object.visible=!0,A=1,E=o.length;A<E;A++){let w=o[A].distance;if(o[A].object.visible&&(w-=w*o[A].hysteresis),!(m>=w))break;o[A-1].object.visible=!1,o[A].object.visible=!0}for(this._currentLevel=A-1;A<E;A++)o[A].object.visible=!1}}toJSON(n){const o=super.toJSON(n);!1===this.autoUpdate&&(o.object.autoUpdate=!1),o.object.levels=[];const m=this.levels;for(let A=0,E=m.length;A<E;A++){const w=m[A];o.object.levels.push({object:w.object.uuid,distance:w.distance,hysteresis:w.hysteresis})}return o}}const dl=new De,pl=new fr,xh=new fr,Hu=new De,Eh=new Ti,Ho=new De;class Jl extends Fs{constructor(n,o){super(n,o),this.isSkinnedMesh=!0,this.type="SkinnedMesh",this.bindMode="attached",this.bindMatrix=new Ti,this.bindMatrixInverse=new Ti,this.boundingBox=null,this.boundingSphere=null}computeBoundingBox(){const n=this.geometry;null===this.boundingBox&&(this.boundingBox=new fo),this.boundingBox.makeEmpty();const o=n.getAttribute("position");for(let m=0;m<o.count;m++)Ho.fromBufferAttribute(o,m),this.applyBoneTransform(m,Ho),this.boundingBox.expandByPoint(Ho)}computeBoundingSphere(){const n=this.geometry;null===this.boundingSphere&&(this.boundingSphere=new Ul),this.boundingSphere.makeEmpty();const o=n.getAttribute("position");for(let m=0;m<o.count;m++)Ho.fromBufferAttribute(o,m),this.applyBoneTransform(m,Ho),this.boundingSphere.expandByPoint(Ho)}copy(n,o){return super.copy(n,o),this.bindMode=n.bindMode,this.bindMatrix.copy(n.bindMatrix),this.bindMatrixInverse.copy(n.bindMatrixInverse),this.skeleton=n.skeleton,this}bind(n,o){this.skeleton=n,void 0===o&&(this.updateMatrixWorld(!0),this.skeleton.calculateInverses(),o=this.matrixWorld),this.bindMatrix.copy(o),this.bindMatrixInverse.copy(o).invert()}pose(){this.skeleton.pose()}normalizeSkinWeights(){const n=new fr,o=this.geometry.attributes.skinWeight;for(let m=0,A=o.count;m<A;m++){n.fromBufferAttribute(o,m);const E=1/n.manhattanLength();E!==1/0?n.multiplyScalar(E):n.set(1,0,0,0),o.setXYZW(m,n.x,n.y,n.z,n.w)}}updateMatrixWorld(n){super.updateMatrixWorld(n),"attached"===this.bindMode?this.bindMatrixInverse.copy(this.matrixWorld).invert():"detached"===this.bindMode?this.bindMatrixInverse.copy(this.bindMatrix).invert():console.warn("THREE.SkinnedMesh: Unrecognized bindMode: "+this.bindMode)}applyBoneTransform(n,o){const m=this.skeleton,A=this.geometry;pl.fromBufferAttribute(A.attributes.skinIndex,n),xh.fromBufferAttribute(A.attributes.skinWeight,n),dl.copy(o).applyMatrix4(this.bindMatrix),o.set(0,0,0);for(let E=0;E<4;E++){const w=xh.getComponent(E);if(0!==w){const T=pl.getComponent(E);Eh.multiplyMatrices(m.bones[T].matrixWorld,m.boneInverses[T]),o.addScaledVector(Hu.copy(dl).applyMatrix4(Eh),w)}}return o.applyMatrix4(this.bindMatrixInverse)}boneTransform(n,o){return console.warn("THREE.SkinnedMesh: .boneTransform() was renamed to .applyBoneTransform() in r151."),this.applyBoneTransform(n,o)}}class ml extends Fr{constructor(){super(),this.isBone=!0,this.type="Bone"}}class Eo extends va{constructor(n=null,o=1,m=1,A,E,w,T,B,D=Jn,N=Jn,G,H){super(null,w,T,B,D,N,A,E,G,H),this.isDataTexture=!0,this.image={data:n,width:o,height:m},this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}const Qu=new Ti,Xp=new Ti;class bh{constructor(n=[],o=[]){this.uuid=Ra(),this.bones=n.slice(0),this.boneInverses=o,this.boneMatrices=null,this.boneTexture=null,this.boneTextureSize=0,this.frame=-1,this.init()}init(){const n=this.bones,o=this.boneInverses;if(this.boneMatrices=new Float32Array(16*n.length),0===o.length)this.calculateInverses();else if(n.length!==o.length){console.warn("THREE.Skeleton: Number of inverse bone matrices does not match amount of bones."),this.boneInverses=[];for(let m=0,A=this.bones.length;m<A;m++)this.boneInverses.push(new Ti)}}calculateInverses(){this.boneInverses.length=0;for(let n=0,o=this.bones.length;n<o;n++){const m=new Ti;this.bones[n]&&m.copy(this.bones[n].matrixWorld).invert(),this.boneInverses.push(m)}}pose(){for(let n=0,o=this.bones.length;n<o;n++){const m=this.bones[n];m&&m.matrixWorld.copy(this.boneInverses[n]).invert()}for(let n=0,o=this.bones.length;n<o;n++){const m=this.bones[n];m&&(m.parent&&m.parent.isBone?(m.matrix.copy(m.parent.matrixWorld).invert(),m.matrix.multiply(m.matrixWorld)):m.matrix.copy(m.matrixWorld),m.matrix.decompose(m.position,m.quaternion,m.scale))}}update(){const n=this.bones,o=this.boneInverses,m=this.boneMatrices,A=this.boneTexture;for(let E=0,w=n.length;E<w;E++)Qu.multiplyMatrices(n[E]?n[E].matrixWorld:Xp,o[E]),Qu.toArray(m,16*E);null!==A&&(A.needsUpdate=!0)}clone(){return new bh(this.bones,this.boneInverses)}computeBoneTexture(){let n=Math.sqrt(4*this.bones.length);n=Km(n),n=Math.max(n,4);const o=new Float32Array(n*n*4);o.set(this.boneMatrices);const m=new Eo(o,n,n,ea,Rl);return m.needsUpdate=!0,this.boneMatrices=o,this.boneTexture=m,this.boneTextureSize=n,this}getBoneByName(n){for(let o=0,m=this.bones.length;o<m;o++){const A=this.bones[o];if(A.name===n)return A}}dispose(){null!==this.boneTexture&&(this.boneTexture.dispose(),this.boneTexture=null)}fromJSON(n,o){this.uuid=n.uuid;for(let m=0,A=n.bones.length;m<A;m++){const E=n.bones[m];let w=o[E];void 0===w&&(console.warn("THREE.Skeleton: No bone found with UUID:",E),w=new ml),this.bones.push(w),this.boneInverses.push((new Ti).fromArray(n.boneInverses[m]))}return this.init(),this}toJSON(){const n={metadata:{version:4.5,type:"Skeleton",generator:"Skeleton.toJSON"},bones:[],boneInverses:[]};n.uuid=this.uuid;const o=this.bones,m=this.boneInverses;for(let A=0,E=o.length;A<E;A++)n.bones.push(o[A].uuid),n.boneInverses.push(m[A].toArray());return n}}class bo extends Cr{constructor(n,o,m,A=1){super(n,o,m),this.isInstancedBufferAttribute=!0,this.meshPerAttribute=A}copy(n){return super.copy(n),this.meshPerAttribute=n.meshPerAttribute,this}toJSON(){const n=super.toJSON();return n.meshPerAttribute=this.meshPerAttribute,n.isInstancedBufferAttribute=!0,n}}const Bc=new Ti,dv=new Ti,Lc=[],qp=new fo,gl=new Ti,ja=new Fs,Sh=new Ul;class sd extends Fs{constructor(n,o,m){super(n,o),this.isInstancedMesh=!0,this.instanceMatrix=new bo(new Float32Array(16*m),16),this.instanceColor=null,this.count=m,this.boundingBox=null,this.boundingSphere=null;for(let A=0;A<m;A++)this.setMatrixAt(A,gl)}computeBoundingBox(){const n=this.geometry,o=this.count;
vendor: 5,137 bytes, line 83
83null===this.boundingBox&&(this.boundingBox=new fo),null===n.boundingBox&&n.computeBoundingBox(),this.boundingBox.makeEmpty();for(let m=0;m<o;m++)this.getMatrixAt(m,Bc),qp.copy(n.boundingBox).applyMatrix4(Bc),this.boundingBox.union(qp)}computeBoundingSphere(){const n=this.geometry,o=this.count;null===this.boundingSphere&&(this.boundingSphere=new Ul),null===n.boundingSphere&&n.computeBoundingSphere(),this.boundingSphere.makeEmpty();for(let m=0;m<o;m++)this.getMatrixAt(m,Bc),Sh.copy(n.boundingSphere).applyMatrix4(Bc),this.boundingSphere.union(Sh)}copy(n,o){return super.copy(n,o),this.instanceMatrix.copy(n.instanceMatrix),null!==n.instanceColor&&(this.instanceColor=n.instanceColor.clone()),this.count=n.count,this}getColorAt(n,o){o.fromArray(this.instanceColor.array,3*n)}getMatrixAt(n,o){o.fromArray(this.instanceMatrix.array,16*n)}raycast(n,o){const m=this.matrixWorld,A=this.count;if(ja.geometry=this.geometry,ja.material=this.material,void 0!==ja.material&&(null===this.boundingSphere&&this.computeBoundingSphere(),Sh.copy(this.boundingSphere),Sh.applyMatrix4(m),!1!==n.ray.intersectsSphere(Sh)))for(let E=0;E<A;E++){this.getMatrixAt(E,Bc),dv.multiplyMatrices(m,Bc),ja.matrixWorld=dv,ja.raycast(n,Lc);for(let w=0,T=Lc.length;w<T;w++){const B=Lc[w];B.instanceId=E,B.object=this,o.push(B)}Lc.length=0}}setColorAt(n,o){null===this.instanceColor&&(this.instanceColor=new bo(new Float32Array(3*this.instanceMatrix.count),3)),o.toArray(this.instanceColor.array,3*n)}setMatrixAt(n,o){o.toArray(this.instanceMatrix.array,16*n)}updateMorphTargets(){}dispose(){this.dispatchEvent({type:"dispose"})}}class es extends qs{constructor(n){super(),this.isLineBasicMaterial=!0,this.type="LineBasicMaterial",this.color=new Dn(16777215),this.map=null,this.linewidth=1,this.linecap="round",this.linejoin="round",this.fog=!0,this.setValues(n)}copy(n){return super.copy(n),this.color.copy(n.color),this.map=n.map,this.linewidth=n.linewidth,this.linecap=n.linecap,this.linejoin=n.linejoin,this.fog=n.fog,this}}const Yp=new De,ad=new De,$p=new Ti,Wu=new hp,ui=new Ul;class Ja extends Fr{constructor(n=new Fi,o=new es){super(),this.isLine=!0,this.type="Line",this.geometry=n,this.material=o,this.updateMorphTargets()}copy(n,o){return super.copy(n,o),this.material=n.material,this.geometry=n.geometry,this}computeLineDistances(){const n=this.geometry;if(null===n.index){const o=n.attributes.position,m=[0];for(let A=1,E=o.count;A<E;A++)Yp.fromBufferAttribute(o,A-1),ad.fromBufferAttribute(o,A),m[A]=m[A-1],m[A]+=Yp.distanceTo(ad);n.setAttribute("lineDistance",new zn(m,1))}else console.warn("THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}raycast(n,o){const m=this.geometry,A=this.matrixWorld,E=n.params.Line.threshold,w=m.drawRange;if(null===m.boundingSphere&&m.computeBoundingSphere(),ui.copy(m.boundingSphere),ui.applyMatrix4(A),ui.radius+=E,!1===n.ray.intersectsSphere(ui))return;$p.copy(A).invert(),Wu.copy(n.ray).applyMatrix4($p);const T=E/((this.scale.x+this.scale.y+this.scale.z)/3),B=T*T,D=new De,N=new De,G=new De,H=new De,Q=this.isLineSegments?2:1,Z=m.index,J=m.attributes.position;if(null!==Z)for(let pe=Math.max(0,w.start),Ae=Math.min(Z.count,w.start+w.count)-1;pe<Ae;pe+=Q){const Ie=Z.getX(pe),Ne=Z.getX(pe+1);if(D.fromBufferAttribute(J,Ie),N.fromBufferAttribute(J,Ne),Wu.distanceSqToSegment(D,N,H,G)>B)continue;H.applyMatrix4(this.matrixWorld);const Qe=n.ray.origin.distanceTo(H);Qe<n.near||Qe>n.far||o.push({distance:Qe,point:G.clone().applyMatrix4(this.matrixWorld),index:pe,face:null,faceIndex:null,object:this})}else for(let pe=Math.max(0,w.start),Ae=Math.min(J.count,w.start+w.count)-1;pe<Ae;pe+=Q){if(D.fromBufferAttribute(J,pe),N.fromBufferAttribute(J,pe+1),Wu.distanceSqToSegment(D,N,H,G)>B)continue;H.applyMatrix4(this.matrixWorld);const Ne=n.ray.origin.distanceTo(H);Ne<n.near||Ne>n.far||o.push({distance:Ne,point:G.clone().applyMatrix4(this.matrixWorld),index:pe,face:null,faceIndex:null,object:this})}}updateMorphTargets(){const o=this.geometry.morphAttributes,m=Object.keys(o);if(m.length>0){const A=o[m[0]];if(void 0!==A){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let E=0,w=A.length;E<w;E++){const T=A[E].name||String(E);this.morphTargetInfluences.push(0),this.morphTargetDictionary[T]=E}}}}}const So=new De,pv=new De;class Al extends Ja{constructor(n,o){super(n,o),this.isLineSegments=!0,this.type="LineSegments"}computeLineDistances(){const n=this.geometry;if(null===n.index){const o=n.attributes.position,m=[];for(let A=0,E=o.count;A<E;A+=2)So.fromBufferAttribute(o,A),pv.fromBufferAttribute(o,A+1),m[A]=0===A?0:m[A-1],m[A+1]=m[A]+So.distanceTo(pv);n.setAttribute("lineDistance",new zn(m,1))}else console.warn("THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}}class ec extends Ja{constructor(n,o){super(n,o),this.isLineLoop=!0,this.type="LineLoop"}}class Xu extends qs{constructor(n){super(),this.isPointsMaterial=!0,this.type="PointsMaterial",this.color=new Dn(16777215),this.map=null,this.alphaMap=null,this.size=1,this.sizeAttenuation=!0,this.fog=!0,this.setValues(n)}
vendor: 18,904 bytes, line 83
83copy(n){return super.copy(n),this.color.copy(n.color),this.map=n.map,this.alphaMap=n.alphaMap,this.size=n.size,this.sizeAttenuation=n.sizeAttenuation,this.fog=n.fog,this}}const Ua=new Ti,Kp=new hp,od=new Ul,ld=new De;class Zp extends Fr{constructor(n=new Fi,o=new Xu){super(),this.isPoints=!0,this.type="Points",this.geometry=n,this.material=o,this.updateMorphTargets()}copy(n,o){return super.copy(n,o),this.material=n.material,this.geometry=n.geometry,this}raycast(n,o){const m=this.geometry,A=this.matrixWorld,E=n.params.Points.threshold,w=m.drawRange;if(null===m.boundingSphere&&m.computeBoundingSphere(),od.copy(m.boundingSphere),od.applyMatrix4(A),od.radius+=E,!1===n.ray.intersectsSphere(od))return;Ua.copy(A).invert(),Kp.copy(n.ray).applyMatrix4(Ua);const T=E/((this.scale.x+this.scale.y+this.scale.z)/3),B=T*T,D=m.index,G=m.attributes.position;if(null!==D)for(let Z=Math.max(0,w.start),he=Math.min(D.count,w.start+w.count);Z<he;Z++){const J=D.getX(Z);ld.fromBufferAttribute(G,J),mv(ld,J,B,A,n,o,this)}else for(let Z=Math.max(0,w.start),he=Math.min(G.count,w.start+w.count);Z<he;Z++)ld.fromBufferAttribute(G,Z),mv(ld,Z,B,A,n,o,this)}updateMorphTargets(){const o=this.geometry.morphAttributes,m=Object.keys(o);if(m.length>0){const A=o[m[0]];if(void 0!==A){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let E=0,w=A.length;E<w;E++){const T=A[E].name||String(E);this.morphTargetInfluences.push(0),this.morphTargetDictionary[T]=E}}}}}function mv(b,n,o,m,A,E,w){const T=Kp.distanceSqToPoint(b);if(T<o){const B=new De;Kp.closestPointToPoint(b,B),B.applyMatrix4(m);const D=A.ray.origin.distanceTo(B);if(D<A.near||D>A.far)return;E.push({distance:D,distanceToRay:Math.sqrt(T),point:B,index:n,face:null,object:w})}}class Qo extends va{constructor(n,o,m,A,E,w,T,B,D,N,G,H){super(null,w,T,B,D,N,A,E,G,H),this.isCompressedTexture=!0,this.image={width:o,height:m},this.mipmaps=n,this.flipY=!1,this.generateMipmaps=!1}}class Wo{constructor(){this.type="Curve",this.arcLengthDivisions=200}getPoint(){return console.warn("THREE.Curve: .getPoint() not implemented."),null}getPointAt(n,o){const m=this.getUtoTmapping(n);return this.getPoint(m,o)}getPoints(n=5){const o=[];for(let m=0;m<=n;m++)o.push(this.getPoint(m/n));return o}getSpacedPoints(n=5){const o=[];for(let m=0;m<=n;m++)o.push(this.getPointAt(m/n));return o}getLength(){const n=this.getLengths();return n[n.length-1]}getLengths(n=this.arcLengthDivisions){if(this.cacheArcLengths&&this.cacheArcLengths.length===n+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;const o=[];let m,A=this.getPoint(0),E=0;o.push(0);for(let w=1;w<=n;w++)m=this.getPoint(w/n),E+=m.distanceTo(A),o.push(E),A=m;return this.cacheArcLengths=o,o}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(n,o){const m=this.getLengths();let A=0;const E=m.length;let w;w=o||n*m[E-1];let D,T=0,B=E-1;for(;T<=B;)if(A=Math.floor(T+(B-T)/2),D=m[A]-w,D<0)T=A+1;else{if(!(D>0)){B=A;break}B=A-1}if(A=B,m[A]===w)return A/(E-1);const N=m[A];return(A+(w-N)/(m[A+1]-N))/(E-1)}getTangent(n,o){let A=n-1e-4,E=n+1e-4;A<0&&(A=0),E>1&&(E=1);const w=this.getPoint(A),T=this.getPoint(E),B=o||(w.isVector2?new qt:new De);return B.copy(T).sub(w).normalize(),B}getTangentAt(n,o){const m=this.getUtoTmapping(n);return this.getTangent(m,o)}computeFrenetFrames(n,o){const m=new De,A=[],E=[],w=[],T=new De,B=new Ti;for(let Q=0;Q<=n;Q++)A[Q]=this.getTangentAt(Q/n,new De);E[0]=new De,w[0]=new De;let D=Number.MAX_VALUE;const N=Math.abs(A[0].x),G=Math.abs(A[0].y),H=Math.abs(A[0].z);N<=D&&(D=N,m.set(1,0,0)),G<=D&&(D=G,m.set(0,1,0)),H<=D&&m.set(0,0,1),T.crossVectors(A[0],m).normalize(),E[0].crossVectors(A[0],T),w[0].crossVectors(A[0],E[0]);for(let Q=1;Q<=n;Q++){if(E[Q]=E[Q-1].clone(),w[Q]=w[Q-1].clone(),T.crossVectors(A[Q-1],A[Q]),T.length()>Number.EPSILON){T.normalize();const Z=Math.acos(gr(A[Q-1].dot(A[Q]),-1,1));E[Q].applyMatrix4(B.makeRotationAxis(T,Z))}w[Q].crossVectors(A[Q],E[Q])}if(!0===o){let Q=Math.acos(gr(E[0].dot(E[n]),-1,1));Q/=n,A[0].dot(T.crossVectors(E[0],E[n]))>0&&(Q=-Q);for(let Z=1;Z<=n;Z++)E[Z].applyMatrix4(B.makeRotationAxis(A[Z],Q*Z)),w[Z].crossVectors(A[Z],E[Z])}return{tangents:A,normals:E,binormals:w}}clone(){return(new this.constructor).copy(this)}copy(n){return this.arcLengthDivisions=n.arcLengthDivisions,this}toJSON(){const n={metadata:{version:4.5,type:"Curve",generator:"Curve.toJSON"}};return n.arcLengthDivisions=this.arcLengthDivisions,n.type=this.type,n}fromJSON(n){return this.arcLengthDivisions=n.arcLengthDivisions,this}}class Jp extends Wo{constructor(n=0,o=0,m=1,A=1,E=0,w=2*Math.PI,T=!1,B=0){super(),this.isEllipseCurve=!0,this.type="EllipseCurve",this.aX=n,this.aY=o,this.xRadius=m,this.yRadius=A,this.aStartAngle=E,this.aEndAngle=w,this.aClockwise=T,this.aRotation=B}getPoint(n,o){const m=o||new qt,A=2*Math.PI;let E=this.aEndAngle-this.aStartAngle;const w=Math.abs(E)<Number.EPSILON;for(;E<0;)E+=A;for(;E>A;)E-=A;E<Number.EPSILON&&(E=w?0:A),!0===this.aClockwise&&!w&&(E===A?E=-A:E-=A);const T=this.aStartAngle+n*E;let B=this.aX+this.xRadius*Math.cos(T),D=this.aY+this.yRadius*Math.sin(T);if(0!==this.aRotation){const N=Math.cos(this.aRotation),G=Math.sin(this.aRotation),H=B-this.aX,Q=D-this.aY;B=H*N-Q*G+this.aX,D=H*G+Q*N+this.aY}return m.set(B,D)}copy(n){return super.copy(n),this.aX=n.aX,this.aY=n.aY,this.xRadius=n.xRadius,this.yRadius=n.yRadius,this.aStartAngle=n.aStartAngle,this.aEndAngle=n.aEndAngle,this.aClockwise=n.aClockwise,this.aRotation=n.aRotation,this}toJSON(){const n=super.toJSON();return n.aX=this.aX,n.aY=this.aY,n.xRadius=this.xRadius,n.yRadius=this.yRadius,n.aStartAngle=this.aStartAngle,n.aEndAngle=this.aEndAngle,n.aClockwise=this.aClockwise,n.aRotation=this.aRotation,n}fromJSON(n){return super.fromJSON(n),this.aX=n.aX,this.aY=n.aY,this.xRadius=n.xRadius,this.yRadius=n.yRadius,this.aStartAngle=n.aStartAngle,this.aEndAngle=n.aEndAngle,this.aClockwise=n.aClockwise,this.aRotation=n.aRotation,this}}class $g extends Jp{constructor(n,o,m,A,E,w){super(n,o,m,m,A,E,w),this.isArcCurve=!0,this.type="ArcCurve"}}function em(){let b=0,n=0,o=0,m=0;function A(E,w,T,B){b=E,n=T,o=-3*E+3*w-2*T-B,m=2*E-2*w+T+B}return{initCatmullRom:function(E,w,T,B,D){A(w,T,D*(T-E),D*(B-w))},initNonuniformCatmullRom:function(E,w,T,B,D,N,G){let H=(w-E)/D-(T-E)/(D+N)+(T-w)/N,Q=(T-w)/N-(B-w)/(N+G)+(B-T)/G;H*=N,Q*=N,A(w,T,H,Q)},calc:function(E){const w=E*E;return b+n*E+o*w+m*(w*E)}}}const hd=new De,Kg=new em,tm=new em,or=new em;class Mo extends Wo{constructor(n=[],o=!1,m="centripetal",A=.5){super(),this.isCatmullRomCurve3=!0,this.type="CatmullRomCurve3",this.points=n,this.closed=o,this.curveType=m,this.tension=A}getPoint(n,o=new De){const m=o,A=this.points,E=A.length,w=(E-(this.closed?0:1))*n;let D,N,T=Math.floor(w),B=w-T;this.closed?T+=T>0?0:(Math.floor(Math.abs(T)/E)+1)*E:0===B&&T===E-1&&(T=E-2,B=1),this.closed||T>0?D=A[(T-1)%E]:(hd.subVectors(A[0],A[1]).add(A[0]),D=hd);const G=A[T%E],H=A[(T+1)%E];if(this.closed||T+2<E?N=A[(T+2)%E]:(hd.subVectors(A[E-1],A[E-2]).add(A[E-1]),N=hd),"centripetal"===this.curveType||"chordal"===this.curveType){const Q="chordal"===this.curveType?.5:.25;let Z=Math.pow(D.distanceToSquared(G),Q),he=Math.pow(G.distanceToSquared(H),Q),J=Math.pow(H.distanceToSquared(N),Q);he<1e-4&&(he=1),Z<1e-4&&(Z=he),J<1e-4&&(J=he),Kg.initNonuniformCatmullRom(D.x,G.x,H.x,N.x,Z,he,J),tm.initNonuniformCatmullRom(D.y,G.y,H.y,N.y,Z,he,J),or.initNonuniformCatmullRom(D.z,G.z,H.z,N.z,Z,he,J)}else"catmullrom"===this.curveType&&(Kg.initCatmullRom(D.x,G.x,H.x,N.x,this.tension),tm.initCatmullRom(D.y,G.y,H.y,N.y,this.tension),or.initCatmullRom(D.z,G.z,H.z,N.z,this.tension));return m.set(Kg.calc(B),tm.calc(B),or.calc(B)),m}copy(n){super.copy(n),this.points=[];for(let o=0,m=n.points.length;o<m;o++)this.points.push(n.points[o].clone());return this.closed=n.closed,this.curveType=n.curveType,this.tension=n.tension,this}toJSON(){const n=super.toJSON();n.points=[];for(let o=0,m=this.points.length;o<m;o++)n.points.push(this.points[o].toArray());return n.closed=this.closed,n.curveType=this.curveType,n.tension=this.tension,n}fromJSON(n){super.fromJSON(n),this.points=[];for(let o=0,m=n.points.length;o<m;o++){const A=n.points[o];this.points.push((new De).fromArray(A))}return this.closed=n.closed,this.curveType=n.curveType,this.tension=n.tension,this}}function _l(b,n,o,m,A){const E=.5*(m-n),w=.5*(A-o),T=b*b;return(2*o-2*m+E+w)*(b*T)+(-3*o+3*m-2*E-w)*T+E*b+o}function vl(b,n,o,m){return function Zg(b,n){const o=1-b;return o*o*n}(b,n)+function tc(b,n){return 2*(1-b)*b*n}(b,o)+function Yu(b,n){return b*b*n}(b,m)}function Dc(b,n,o,m,A){return function Av(b,n){const o=1-b;return o*o*o*n}(b,n)+function jg(b,n){const o=1-b;return 3*o*o*b*n}(b,o)+function Jg(b,n){return 3*(1-b)*b*b*n}(b,m)+function e0(b,n){return b*b*b*n}(b,A)}class ba extends Wo{constructor(n=new qt,o=new qt,m=new qt,A=new qt){super(),this.isCubicBezierCurve=!0,this.type="CubicBezierCurve",this.v0=n,this.v1=o,this.v2=m,this.v3=A}getPoint(n,o=new qt){const m=o,A=this.v0,E=this.v1,w=this.v2,T=this.v3;return m.set(Dc(n,A.x,E.x,w.x,T.x),Dc(n,A.y,E.y,w.y,T.y)),m}copy(n){return super.copy(n),this.v0.copy(n.v0),this.v1.copy(n.v1),this.v2.copy(n.v2),this.v3.copy(n.v3),this}toJSON(){const n=super.toJSON();return n.v0=this.v0.toArray(),n.v1=this.v1.toArray(),n.v2=this.v2.toArray(),n.v3=this.v3.toArray(),n}fromJSON(n){return super.fromJSON(n),this.v0.fromArray(n.v0),this.v1.fromArray(n.v1),this.v2.fromArray(n.v2),this.v3.fromArray(n.v3),this}}class _v extends Wo{constructor(n=new De,o=new De,m=new De,A=new De){super(),this.isCubicBezierCurve3=!0,this.type="CubicBezierCurve3",this.v0=n,this.v1=o,this.v2=m,this.v3=A}getPoint(n,o=new De){const m=o,A=this.v0,E=this.v1,w=this.v2,T=this.v3;return m.set(Dc(n,A.x,E.x,w.x,T.x),Dc(n,A.y,E.y,w.y,T.y),Dc(n,A.z,E.z,w.z,T.z)),m}copy(n){return super.copy(n),this.v0.copy(n.v0),this.v1.copy(n.v1),this.v2.copy(n.v2),this.v3.copy(n.v3),this}toJSON(){const n=super.toJSON();return n.v0=this.v0.toArray(),n.v1=this.v1.toArray(),n.v2=this.v2.toArray(),n.v3=this.v3.toArray(),n}fromJSON(n){return super.fromJSON(n),this.v0.fromArray(n.v0),this.v1.fromArray(n.v1),this.v2.fromArray(n.v2),this.v3.fromArray(n.v3),this}}class as extends Wo{constructor(n=new qt,o=new qt){super(),this.isLineCurve=!0,this.type="LineCurve",this.v1=n,this.v2=o}getPoint(n,o=new qt){const m=o;return 1===n?m.copy(this.v2):(m.copy(this.v2).sub(this.v1),m.multiplyScalar(n).add(this.v1)),m}getPointAt(n,o){return this.getPoint(n,o)}getTangent(n,o=new qt){return o.subVectors(this.v2,this.v1).normalize()}getTangentAt(n,o){return this.getTangent(n,o)}copy(n){return super.copy(n),this.v1.copy(n.v1),this.v2.copy(n.v2),this}toJSON(){const n=super.toJSON();return n.v1=this.v1.toArray(),n.v2=this.v2.toArray(),n}fromJSON(n){return super.fromJSON(n),this.v1.fromArray(n.v1),this.v2.fromArray(n.v2),this}}class t0 extends Wo{constructor(n=new De,o=new De){super(),this.isLineCurve3=!0,this.type="LineCurve3",this.v1=n,this.v2=o}getPoint(n,o=new De){const m=o;return 1===n?m.copy(this.v2):(m.copy(this.v2).sub(this.v1),m.multiplyScalar(n).add(this.v1)),m}getPointAt(n,o){return this.getPoint(n,o)}getTangent(n,o=new De){return o.subVectors(this.v2,this.v1).normalize()}getTangentAt(n,o){return this.getTangent(n,o)}copy(n){return super.copy(n),this.v1.copy(n.v1),this.v2.copy(n.v2),this}toJSON(){const n=super.toJSON();return n.v1=this.v1.toArray(),n.v2=this.v2.toArray(),n}fromJSON(n){return super.fromJSON(n),this.v1.fromArray(n.v1),this.v2.fromArray(n.v2),this}}class eo extends Wo{constructor(n=new qt,o=new qt,m=new qt){super(),this.isQuadraticBezierCurve=!0,this.type="QuadraticBezierCurve",this.v0=n,this.v1=o,this.v2=m}getPoint(n,o=new qt){const m=o,A=this.v0,E=this.v1,w=this.v2;return m.set(vl(n,A.x,E.x,w.x),vl(n,A.y,E.y,w.y)),m}copy(n){return super.copy(n),this.v0.copy(n.v0),this.v1.copy(n.v1),this.v2.copy(n.v2),this}toJSON(){const n=super.toJSON();return n.v0=this.v0.toArray(),n.v1=this.v1.toArray(),n.v2=this.v2.toArray(),n}fromJSON(n){return super.fromJSON(n),this.v0.fromArray(n.v0),this.v1.fromArray(n.v1),this.v2.fromArray(n.v2),this}}class $u extends Wo{constructor(n=new De,o=new De,m=new De){super(),this.isQuadraticBezierCurve3=!0,this.type="QuadraticBezierCurve3",this.v0=n,this.v1=o,this.v2=m}getPoint(n,o=new De){const m=o,A=this.v0,E=this.v1,w=this.v2;return m.set(vl(n,A.x,E.x,w.x),vl(n,A.y,E.y,w.y),vl(n,A.z,E.z,w.z)),m}copy(n){return super.copy(n),this.v0.copy(n.v0),this.v1.copy(n.v1),this.v2.copy(n.v2),this}toJSON(){const n=super.toJSON();return n.v0=this.v0.toArray(),n.v1=this.v1.toArray(),n.v2=this.v2.toArray(),n}fromJSON(n){return super.fromJSON(n),this.v0.fromArray(n.v0),this.v1.fromArray(n.v1),this.v2.fromArray(n.v2),this}}class ud extends Wo{constructor(n=[]){super(),this.isSplineCurve=!0,this.type="SplineCurve",this.points=n}getPoint(n,o=new qt){const m=o,A=this.points,E=(A.length-1)*n,w=Math.floor(E),T=E-w,B=A[0===w?w:w-1],D=A[w],N=A[w>A.length-2?A.length-1:w+1],G=A[w>A.length-3?A.length-1:w+2];return m.set(_l(T,B.x,D.x,N.x,G.x),_l(T,B.y,D.y,N.y,G.y)),m}copy(n){super.copy(n),this.points=[];for(let o=0,m=n.points.length;o<m;o++)this.points.push(n.points[o].clone());return this}toJSON(){const n=super.toJSON();n.points=[];for(let o=0,m=this.points.length;o<m;o++)n.points.push(this.points[o].toArray());return n}fromJSON(n){super.fromJSON(n),this.points=[];for(let o=0,m=n.points.length;o<m;o++){const A=n.points[o];this.points.push((new qt).fromArray(A))}return this}}var An=Object.freeze({__proto__:null,ArcCurve:$g,CatmullRomCurve3:Mo,CubicBezierCurve:ba,CubicBezierCurve3:_v,EllipseCurve:Jp,LineCurve:as,LineCurve3:t0,QuadraticBezierCurve:eo,QuadraticBezierCurve3:$u,SplineCurve:ud});class Zs extends Wo{constructor(){super(),this.type="CurvePath",this.curves=[],this.autoClose=!1}add(n){this.curves.push(n)}closePath(){const n=this.curves[0].getPoint(0),o=this.curves[this.curves.length-1].getPoint(1);n.equals(o)||this.curves.push(new as(o,n))}getPoint(n,o){const m=n*this.getLength(),A=this.getCurveLengths();let E=0;for(;E<A.length;){if(A[E]>=m){const w=A[E]-m,T=this.curves[E],B=T.getLength();return T.getPointAt(0===B?0:1-w/B,o)}E++}return null}getLength(){const n=this.getCurveLengths();return n[n.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 n=[];let o=0;for(let m=0,A=this.curves.length;m<A;m++)o+=this.curves[m].getLength(),n.push(o);return this.cacheLengths=n,n}getSpacedPoints(n=40){const o=[];for(let m=0;m<=n;m++)o.push(this.getPoint(m/n));return this.autoClose&&o.push(o[0]),o}getPoints(n=12){const o=[];let m;for(let A=0,E=this.curves;A<E.length;A++){const w=E[A],B=w.getPoints(w.isEllipseCurve?2*n:w.isLineCurve||w.isLineCurve3?1:w.isSplineCurve?n*w.points.length:n);for(let D=0;D<B.length;D++){const N=B[D];m&&m.equals(N)||(o.push(N),m=N)}}return this.autoClose&&o.length>1&&!o[o.length-1].equals(o[0])&&o.push(o[0]),o}copy(n){super.copy(n),this.curves=[];for(let o=0,m=n.curves.length;o<m;o++)this.curves.push(n.curves[o].clone());return this.autoClose=n.autoClose,this}toJSON(){const n=super.toJSON();n.autoClose=this.autoClose,n.curves=[];for(let o=0,m=this.curves.length;o<m;o++)n.curves.push(this.curves[o].toJSON());return n}fromJSON(n){super.fromJSON(n),this.autoClose=n.autoClose,this.curves=[];for(let o=0,m=n.curves.length;o<m;o++){const A=n.curves[o];this.curves.push((new An[A.type]).fromJSON(A))}return this}}class vs extends Zs{constructor(n){super(),this.type="Path",this.currentPoint=new qt,n&&this.setFromPoints(n)}setFromPoints(n){this.moveTo(n[0].x,n[0].y);for(let o=1,m=n.length;o<m;o++)this.lineTo(n[o].x,n[o].y);return this}moveTo(n,o){return this.currentPoint.set(n,o),this}lineTo(n,o){const m=new as(this.currentPoint.clone(),new qt(n,o));return this.curves.push(m),this.currentPoint.set(n,o),this}quadraticCurveTo(n,o,m,A){const E=new eo(this.currentPoint.clone(),new qt(n,o),new qt(m,A));return this.curves.push(E),this.currentPoint.set(m,A),this}bezierCurveTo(n,o,m,A,E,w){const T=new ba(this.currentPoint.clone(),new qt(n,o),new qt(m,A),new qt(E,w));return this.curves.push(T),this.currentPoint.set(E,w),this}splineThru(n){const o=[this.currentPoint.clone()].concat(n),m=new ud(o);return this.curves.push(m),this.currentPoint.copy(n[n.length-1]),this}arc(n,o,m,A,E,w){return this.absarc(n+this.currentPoint.x,o+this.currentPoint.y,m,A,E,w),this}absarc(n,o,m,A,E,w){return this.absellipse(n,o,m,m,A,E,w),this}ellipse(n,o,m,A,E,w,T,B){return this.absellipse(n+this.currentPoint.x,o+this.currentPoint.y,m,A,E,w,T,B),this}absellipse(n,o,m,A,E,w,T,B){const D=new Jp(n,o,m,A,E,w,T,B);if(this.curves.length>0){const G=D.getPoint(0);G.equals(this.currentPoint)||this.lineTo(G.x,G.y)}this.curves.push(D);const N=D.getPoint(1);return this.currentPoint.copy(N),this}copy(n){return super.copy(n),this.currentPoint.copy(n.currentPoint),this}toJSON(){const n=super.toJSON();return n.currentPoint=this.currentPoint.toArray(),n}fromJSON(n){return super.fromJSON(n),this.currentPoint.fromArray(n.currentPoint),this}}class za extends Fi{constructor(n=[new qt(0,-.5),new qt(.5,0),new qt(0,.5)],o=12,m=0,A=2*Math.PI){super(),this.type="LatheGeometry",this.parameters={points:n,segments:o,phiStart:m,phiLength:A},o=Math.floor(o),A=gr(A,0,2*Math.PI);const E=[],w=[],T=[],B=[],D=[],N=1/o,G=new De,H=new qt,Q=new De,Z=new De,he=new De;let J=0,Y=0;for(let ve=0;ve<=n.length-1;ve++)switch(ve){case 0:J=n[ve+1].x-n[ve].x,Y=n[ve+1].y-n[ve].y,Q.x=1*Y,Q.y=-J,Q.z=0*Y,he.copy(Q),Q.normalize(),B.push(Q.x,Q.y,Q.z);break;case n.length-1:B.push(he.x,he.y,he.z);break;default:J=n[ve+1].x-n[ve].x,Y=n[ve+1].y-n[ve].y,Q.x=1*Y,Q.y=-J,Q.z=0*Y,Z.copy(Q),Q.x+=he.x,Q.y+=he.y,Q.z+=he.z,Q.normalize(),B.push(Q.x,Q.y,Q.z),he.copy(Z)}for(let ve=0;ve<=o;ve++){const pe=m+ve*N*A,Ae=Math.sin(pe),Ie=Math.cos(pe);for(let Ne=0;Ne<=n.length-1;Ne++)G.x=n[Ne].x*Ae,G.y=n[Ne].y,G.z=n[Ne].x*Ie,w.push(G.x,G.y,G.z),H.x=ve/o,H.y=Ne/(n.length-1),T.push(H.x,H.y),D.push(B[3*Ne+0]*Ae,B[3*Ne+1],B[3*Ne+0]*Ie)}for(let ve=0;ve<o;ve++)for(let pe=0;pe<n.length-1;pe++){const Ae=pe+ve*n.length,Ne=Ae+n.length,Xe=Ae+n.length+1,Qe=Ae+1;E.push(Ae,Ne,Qe),E.push(Xe,Qe,Ne)}this.setIndex(E),this.setAttribute("position",new zn(w,3)),this.setAttribute("uv",new zn(T,2)),this.setAttribute("normal",new zn(D,3))}copy(n){return super.copy(n),this.parameters=Object.assign({},n.parameters),this}static fromJSON(n){return new za(n.points,n.segments,n.phiStart,n.phiLength)}}class fd extends za{constructor(n=1,o=1,m=4,A=8){const E=new vs;E.absarc(0,-o/2,n,1.5*Math.PI,0),E.absarc(0,o/2,n,0,.5*Math.PI),super(E.getPoints(m),A),this.type="CapsuleGeometry",this.parameters={radius:n,height:o,capSegments:m,radialSegments:A}}static fromJSON(n){return new fd(n.radius,n.length,n.capSegments,n.radialSegments)}}class Us extends Fi{constructor(n=1,o=32,m=0,A=2*Math.PI){super(),this.type="CircleGeometry",this.parameters={radiu
vendor: 2,542 bytes, line 83
83s:n,segments:o,thetaStart:m,thetaLength:A},o=Math.max(3,o);const E=[],w=[],T=[],B=[],D=new De,N=new qt;w.push(0,0,0),T.push(0,0,1),B.push(.5,.5);for(let G=0,H=3;G<=o;G++,H+=3){const Q=m+G/o*A;D.x=n*Math.cos(Q),D.y=n*Math.sin(Q),w.push(D.x,D.y,D.z),T.push(0,0,1),N.x=(w[H]/n+1)/2,N.y=(w[H+1]/n+1)/2,B.push(N.x,N.y)}for(let G=1;G<=o;G++)E.push(G,G+1,0);this.setIndex(E),this.setAttribute("position",new zn(w,3)),this.setAttribute("normal",new zn(T,3)),this.setAttribute("uv",new zn(B,2))}copy(n){return super.copy(n),this.parameters=Object.assign({},n.parameters),this}static fromJSON(n){return new Us(n.radius,n.segments,n.thetaStart,n.thetaLength)}}class Xo extends Fi{constructor(n=1,o=1,m=1,A=32,E=1,w=!1,T=0,B=2*Math.PI){super(),this.type="CylinderGeometry",this.parameters={radiusTop:n,radiusBottom:o,height:m,radialSegments:A,heightSegments:E,openEnded:w,thetaStart:T,thetaLength:B};const D=this;A=Math.floor(A),E=Math.floor(E);const N=[],G=[],H=[],Q=[];let Z=0;const he=[],J=m/2;let Y=0;function pe(Ae){const Ie=Z,Ne=new qt,Xe=new De;let Qe=0;const Se=!0===Ae?n:o,Le=!0===Ae?1:-1;for(let Pt=1;Pt<=A;Pt++)G.push(0,J*Le,0),H.push(0,Le,0),Q.push(.5,.5),Z++;const vt=Z;for(let Pt=0;Pt<=A;Pt++){const dt=Pt/A*B+T,Et=Math.cos(dt),tn=Math.sin(dt);Xe.x=Se*tn,Xe.y=J*Le,Xe.z=Se*Et,G.push(Xe.x,Xe.y,Xe.z),H.push(0,Le,0),Ne.x=.5*Et+.5,Ne.y=.5*tn*Le+.5,Q.push(Ne.x,Ne.y),Z++}for(let Pt=0;Pt<A;Pt++){const ot=Ie+Pt,dt=vt+Pt;!0===Ae?N.push(dt,dt+1,ot):N.push(dt+1,dt,ot),Qe+=3}D.addGroup(Y,Qe,!0===Ae?1:2),Y+=Qe}(function ve(){const Ae=new De,Ie=new De;let Ne=0;const Xe=(o-n)/m;for(let Qe=0;Qe<=E;Qe++){const Se=[],Le=Qe/E,vt=Le*(o-n)+n;for(let Pt=0;Pt<=A;Pt++){const ot=Pt/A,dt=ot*B+T,Et=Math.sin(dt),tn=Math.cos(dt);Ie.x=vt*Et,Ie.y=-Le*m+J,Ie.z=vt*tn,G.push(Ie.x,Ie.y,Ie.z),Ae.set(Et,Xe,tn).normalize(),H.push(Ae.x,Ae.y,Ae.z),Q.push(ot,1-Le),Se.push(Z++)}he.push(Se)}for(let Qe=0;Qe<A;Qe++)for(let Se=0;Se<E;Se++){const vt=he[Se+1][Qe],Pt=he[Se+1][Qe+1],ot=he[Se][Qe+1];N.push(he[Se][Qe],vt,ot),N.push(vt,Pt,ot),Ne+=6}D.addGroup(Y,Ne,0),Y+=Ne})(),!1===w&&(n>0&&pe(!0),o>0&&pe(!1)),this.setIndex(N),this.setAttribute("position",new zn(G,3)),this.setAttribute("normal",new zn(H,3)),this.setAttribute("uv",new zn(Q,2))}copy(n){return super.copy(n),this.parameters=Object.assign({},n.parameters),this}static fromJSON(n){return new Xo(n.radiusTop,n.radiusBottom,n.height,n.radialSegments,n.heightSegments,n.openEnded,n.thetaStart,n.thetaLength)}}class Ku extends Xo{constructor(n=1,o=1,m=32,A=1,E=!1,w=0,T=2*Math.PI){super(0,n,o,m,A,E,w,T),this.type="C
83oneGeometry",this.parameters={radius:n,height:o,radialSegments:m,heightSegments:A,openEnded:E,thetaStart:w,thetaLength:T}}static fromJSON(n){return new Ku(n.radius,n.height,n.radialSegments,n.heightSegments,n.openEnded,n.thetaStart,n.thetaLength)}}class Sr extends Fi{constructor(n=[],o=[],m=1,A=0){super(),this.type="PolyhedronGeometry",this.parameters={vertices:n,indices:o,radius:m,detail:A};const E=[],w=[];function B(ve,pe,Ae,Ie){const Ne=Ie+1,Xe=[];for(let Qe=0;Qe<=Ne;Qe++){Xe[Qe]=[];const Se=ve.clone().lerp(Ae,Qe/Ne),Le=pe.clone().lerp(Ae,Qe/Ne),vt=Ne-Qe;for(let Pt=0;Pt<=vt;Pt++)Xe[Qe][Pt]=0===Pt&&Qe===Ne?Se:Se.clone().lerp(Le,Pt/vt)}for(let Qe=0;Qe<Ne;Qe++)for(let Se=0;Se<2*(Ne-Qe)-1;Se++){const Le=Math.floor(Se/2);Se%2==0?(H(Xe[Qe][Le+1]),H(Xe[Qe+1][Le]),H(Xe[Qe][Le])):(H(Xe[Qe][Le+1]),H(Xe[Qe+1][Le+1]),H(Xe[Qe+1][Le]))}}function H(ve){E.push(ve.x,ve.y,ve.z)}function Q(ve,pe){const Ae=3*ve;pe.x=n[Ae+0],pe.y=n[Ae+1],pe.z=n[Ae+2]}function he(ve,pe,Ae,Ie){Ie<0&&1===ve.x&&(w[pe]=ve.x-1),0===Ae.x&&0===Ae.z&&(w[pe]=Ie/2/Math.PI+.5)}function J(ve){return Math.atan2(ve.z,-ve.x)}function Y(ve){return Math.atan2(-ve.y,Math.sqrt(ve.x*ve.x+ve.z*ve.z))}(function T(ve){const pe=new De,Ae=new De,Ie=new De;for(let Ne=0;Ne<o.length;Ne+=3)Q(o[Ne+0],pe),Q(o[Ne+1],Ae),Q(o[Ne+2],Ie),B(pe,Ae,Ie,ve)})(A),function D(ve){const pe=new De;for(let Ae=0;Ae<E.length;Ae+=3)pe.x=E[Ae+0],pe.y=E[Ae+1],pe.z=E[Ae+2],pe.normalize().multiplyScalar(ve),E[Ae+0]=pe.x,E[Ae+1]=pe.y,E[Ae+2]=pe.z}(m),function N(){const ve=new De;for(let pe=0;pe<E.length;pe+=3){ve.x=E[pe+0],ve.y=E[pe+1],ve.z=E[pe+2];const Ae=J(ve)/2/Math.PI+.5,Ie=Y(ve)/Math.PI+.5;w.push(Ae,1-Ie)}(function Z(){const ve=new De,pe=new De,Ae=new De,Ie=new De,Ne=new qt,Xe=new qt,Qe=new qt;for(let Se=0,Le=0;Se<E.length;Se+=9,Le+=6){ve.set(E[Se+0],E[Se+1],E[Se+2]),pe.set(E[Se+3],E[Se+4],E[Se+5]),Ae.set(E[Se+6],E[Se+7],E[Se+8]),Ne.set(w[Le+0],w[Le+1]),Xe.set(w[Le+2],w[Le+3]),Qe.set(w[Le+4],w[Le+5]),Ie.copy(ve).add(pe).add(Ae).divideScalar(3);const vt=J(Ie);he(Ne,Le+0,ve,vt),he(Xe,Le+2,pe,vt),he(Qe,Le+4,Ae,vt)}})(),function G(){for(let ve=0;ve<w.length;ve+=6){const pe=w[ve+0],Ae=w[ve+2],Ie=w[ve+4],Ne=Math.max(pe,Ae,Ie),Xe=Math.min(pe,Ae,Ie);Ne>.9&&Xe<.1&&(pe<.2&&(w[ve+0]+=1),Ae<.2&&(w[ve+2]+=1),Ie<.2&&(w[ve+4]+=1))}}()}(),this.setAttribute("position",new zn(E,3)),this.setAttribute("normal",new zn(E.slice(),3)),this.setAttribute("uv",new zn(w,2)),0===A?this.computeVertexNormals():this.normalizeNormals()}copy(n){return super.copy(n),this.parameters=Object.assign({},n.parameters),this}static fromJSON(n){return new Sr(n.vertices,n.indices,n.radius,n.details)}}class Fc extends Sr{constructor(n=1,o=0){const m=(1+Math.sqrt(5))/2,A=1/m;super([-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,0,-A,-m,0,-A,m,0,A,-m,0,A,m,-A,-m,0,-A,m,0,A,-m,0,A,m,0,-m,0,-A,m,0,-A,-m,0,A,m,0,A],[3,11,7,3,7,15,3,15,13,7,19,17,7,17,6,7,6,15,17,4,8,17,8,10,17,10,6,8,0,16,8,16,2,8,2,10,0,12,1,0,1,18,0,18,16,6,10,2,6,2,13,6,13,15,2,16,18,2,18,3,2,3,13,18,1,9,18,9,11,18,11,3,4,14,12,4,12,0,4,0,8,11,9,5,11,5,19,11,19,7,
vendor: 3,357 bytes, line 83
8319,5,14,19,14,4,19,4,17,1,12,14,1,14,5,1,5,9],n,o),this.type="DodecahedronGeometry",this.parameters={radius:n,detail:o}}static fromJSON(n){return new Fc(n.radius,n.detail)}}const tr=new De,n0=new De,vv=new De,r0=new ra;class eE extends Fi{constructor(n=null,o=1){if(super(),this.type="EdgesGeometry",this.parameters={geometry:n,thresholdAngle:o},null!==n){const A=Math.pow(10,4),E=Math.cos(pc*o),w=n.getIndex(),T=n.getAttribute("position"),B=w?w.count:T.count,D=[0,0,0],N=["a","b","c"],G=new Array(3),H={},Q=[];for(let Z=0;Z<B;Z+=3){w?(D[0]=w.getX(Z),D[1]=w.getX(Z+1),D[2]=w.getX(Z+2)):(D[0]=Z,D[1]=Z+1,D[2]=Z+2);const{a:he,b:J,c:Y}=r0;if(he.fromBufferAttribute(T,D[0]),J.fromBufferAttribute(T,D[1]),Y.fromBufferAttribute(T,D[2]),r0.getNormal(vv),G[0]=`${Math.round(he.x*A)},${Math.round(he.y*A)},${Math.round(he.z*A)}`,G[1]=`${Math.round(J.x*A)},${Math.round(J.y*A)},${Math.round(J.z*A)}`,G[2]=`${Math.round(Y.x*A)},${Math.round(Y.y*A)},${Math.round(Y.z*A)}`,G[0]!==G[1]&&G[1]!==G[2]&&G[2]!==G[0])for(let ve=0;ve<3;ve++){const pe=(ve+1)%3,Ae=G[ve],Ie=G[pe],Ne=r0[N[ve]],Xe=r0[N[pe]],Qe=`${Ae}_${Ie}`,Se=`${Ie}_${Ae}`;Se in H&&H[Se]?(vv.dot(H[Se].normal)<=E&&(Q.push(Ne.x,Ne.y,Ne.z),Q.push(Xe.x,Xe.y,Xe.z)),H[Se]=null):Qe in H||(H[Qe]={index0:D[ve],index1:D[pe],normal:vv.clone()})}}for(const Z in H)if(H[Z]){const{index0:he,index1:J}=H[Z];tr.fromBufferAttribute(T,he),n0.fromBufferAttribute(T,J),Q.push(tr.x,tr.y,tr.z),Q.push(n0.x,n0.y,n0.z)}this.setAttribute("position",new zn(Q,3))}}copy(n){return super.copy(n),this.parameters=Object.assign({},n.parameters),this}}class kc extends vs{constructor(n){super(n),this.uuid=Ra(),this.type="Shape",this.holes=[]}getPointsHoles(n){const o=[];for(let m=0,A=this.holes.length;m<A;m++)o[m]=this.holes[m].getPoints(n);return o}extractPoints(n){return{shape:this.getPoints(n),holes:this.getPointsHoles(n)}}copy(n){super.copy(n),this.holes=[];for(let o=0,m=n.holes.length;o<m;o++)this.holes.push(n.holes[o].clone());return this}toJSON(){const n=super.toJSON();n.uuid=this.uuid,n.holes=[];for(let o=0,m=this.holes.length;o<m;o++)n.holes.push(this.holes[o].toJSON());return n}fromJSON(n){super.fromJSON(n),this.uuid=n.uuid,this.holes=[];for(let o=0,m=n.holes.length;o<m;o++){const A=n.holes[o];this.holes.push((new vs).fromJSON(A))}return this}}function s0(b,n,o,m,A){let E,w;if(A===function nE(b,n,o,m){let A=0;for(let E=n,w=o-m;E<o;E+=m)A+=(b[w]-b[E])*(b[E+1]+b[w+1]),w=E;return A}(b,n,o,m)>0)for(E=n;E<o;E+=m)w=md(E,b[E],b[E+1],w);else for(E=o-m;E>=n;E-=m)w=md(E,b[E],b[E+1],w);return w&&tf(w,w.next)&&(Oc(w),w=w.next),w}function Zu(b,n){if(!b)return b;n||(n=b);let m,o=b;do{if(m=!1,o.steiner||!tf(o,o.next)&&0!==Mr(o.prev,o,o.next))o=o.next;else{if(Oc(o),o=n=o.prev,o===o.next)break;m=!0}}while(m||o!==n);return n}function Fn(b,n,o,m,A,E,w){if(!b)return;!w&&E&&function yv(b,n,o,m){let A=b;do{0===A.z&&(A.z=Ju(A.x,A.y,n,o,m)),A.prevZ=A.prev,A.nextZ=A.next,A=A.next}while(A!==b);A.prevZ.nextZ=null,A.prevZ=null,function yl(b){let n,o,m,A,E,w,T,B,D=1;do{for(o=b,b=null,E=null,w=0;o;){for(w++,m=o,T=0,n=0;n<D&&(T++,m=m.nextZ,m);n++);for(B=D;T>0||B>0&&m;)0!==T&&(0===B||!m||o.z<=m.z)?(A=o,o=o.nextZ,T--):(A=m,m=m.nextZ,B--),E?E.nextZ=A:b=A,A.prevZ=E,E=A;o=m}E.nextZ=null,D*=2}while(w>1)}(A)}(b,m,A,E);let B,D,T=b;for(;b.prev!==b.next;)if(B=b.prev,D=b.next,E?tE(b,m,A,E):DM(b))n.push(B.i/o|0),n.push(b.i/o|0),n.push(D.i/
vendor: 4,227 bytes, line 83
83o|0),Oc(b),b=D.next,T=D.next;else if((b=D)===T){w?1===w?Fn(b=wo(Zu(b),n,o),n,o,m,A,E,2):2===w&&a0(b,n,o,m,A,E):Fn(Zu(b),n,o,m,A,E,1);break}}function DM(b){const n=b.prev,o=b,m=b.next;if(Mr(n,o,m)>=0)return!1;const A=n.x,E=o.x,w=m.x,T=n.y,B=o.y,D=m.y,N=A<E?A<w?A:w:E<w?E:w,G=T<B?T<D?T:D:B<D?B:D,H=A>E?A>w?A:w:E>w?E:w,Q=T>B?T>D?T:D:B>D?B:D;let Z=m.next;for(;Z!==n;){if(Z.x>=N&&Z.x<=H&&Z.y>=G&&Z.y<=Q&&qo(A,T,E,B,w,D,Z.x,Z.y)&&Mr(Z.prev,Z,Z.next)>=0)return!1;Z=Z.next}return!0}function tE(b,n,o,m){const A=b.prev,E=b,w=b.next;if(Mr(A,E,w)>=0)return!1;const T=A.x,B=E.x,D=w.x,N=A.y,G=E.y,H=w.y,Q=T<B?T<D?T:D:B<D?B:D,Z=N<G?N<H?N:H:G<H?G:H,he=T>B?T>D?T:D:B>D?B:D,J=N>G?N>H?N:H:G>H?G:H,Y=Ju(Q,Z,n,o,m),ve=Ju(he,J,n,o,m);let pe=b.prevZ,Ae=b.nextZ;for(;pe&&pe.z>=Y&&Ae&&Ae.z<=ve;){if(pe.x>=Q&&pe.x<=he&&pe.y>=Z&&pe.y<=J&&pe!==A&&pe!==w&&qo(T,N,B,G,D,H,pe.x,pe.y)&&Mr(pe.prev,pe,pe.next)>=0||(pe=pe.prevZ,Ae.x>=Q&&Ae.x<=he&&Ae.y>=Z&&Ae.y<=J&&Ae!==A&&Ae!==w&&qo(T,N,B,G,D,H,Ae.x,Ae.y)&&Mr(Ae.prev,Ae,Ae.next)>=0))return!1;Ae=Ae.nextZ}for(;pe&&pe.z>=Y;){if(pe.x>=Q&&pe.x<=he&&pe.y>=Z&&pe.y<=J&&pe!==A&&pe!==w&&qo(T,N,B,G,D,H,pe.x,pe.y)&&Mr(pe.prev,pe,pe.next)>=0)return!1;pe=pe.prevZ}for(;Ae&&Ae.z<=ve;){if(Ae.x>=Q&&Ae.x<=he&&Ae.y>=Z&&Ae.y<=J&&Ae!==A&&Ae!==w&&qo(T,N,B,G,D,H,Ae.x,Ae.y)&&Mr(Ae.prev,Ae,Ae.next)>=0)return!1;Ae=Ae.nextZ}return!0}function wo(b,n,o){let m=b;do{const A=m.prev,E=m.next.next;!tf(A,E)&&pd(A,m,m.next,E)&&nf(A,E)&&nf(E,A)&&(n.push(A.i/o|0),n.push(m.i/o|0),n.push(E.i/o|0),Oc(m),Oc(m.next),m=b=E),m=m.next}while(m!==b);return Zu(m)}function a0(b,n,o,m,A,E){let w=b;do{let T=w.next.next;for(;T!==w.prev;){if(w.i!==T.i&&ef(w,T)){let B=o0(w,T);return w=Zu(w,w.next),B=Zu(B,B.next),Fn(w,n,o,m,A,E,0),void Fn(B,n,o,m,A,E,0)}T=T.next}w=w.next}while(w!==b)}function to(b,n){return b.x-n.x}function dd(b,n){const o=function zs(b,n){let A,o=n,m=-1/0;const E=b.x,w=b.y;do{if(w<=o.y&&w>=o.next.y&&o.next.y!==o.y){const H=o.x+(w-o.y)*(o.next.x-o.x)/(o.next.y-o.y);if(H<=E&&H>m&&(m=H,A=o.x<o.next.x?o:o.next,H===E))return A}o=o.next}while(o!==n);if(!A)return null;const T=A,B=A.x,D=A.y;let G,N=1/0;o=A;do{E>=o.x&&o.x>=B&&E!==o.x&&qo(w<D?E:m,w,B,D,w<D?m:E,w,o.x,o.y)&&(G=Math.abs(w-o.y)/(E-o.x),nf(o,b)&&(G<N||G===N&&(o.x>A.x||o.x===A.x&&Ii(A,o)))&&(A=o,N=G)),o=o.next}while(o!==T);return A}(b,n);if(!o)return n;const m=o0(o,b);return Zu(m,m.next),Zu(o,o.next)}function Ii(b,n){return Mr(b.prev,b,n.prev)<0&&Mr(n.next,b,b.next)<0}function Ju(b,n,o,m,A){return(b=1431655765&((b=858993459&((b=252645135&((b=16711935&((b=(b-o)*A|0)|b<<8))|b<<4))|b<<2))|b<<1))|(n=1431655765&((n=858993459&((n=252645135&((n=16711935&((n=(n-m)*A|0)|n<<8))|n<<4))|n<<2))|n<<1))<<1}function xv(b){let n=b,o=b;do{(n.x<o.x||n.x===o.x&&n.y<o.y)&&(o=n),n=n.next}while(n!==b);return o}function qo(b,n,o,m,A,E,w,T){return(A-w)*(n-T)>=(b-w)*(E-T)&&(b-w)*(m-T)>=(o-w)*(n-T)&&(o-w)*(E-T)>=(A-w)*(m-T)}function ef(b,n){return b.next.i!==n.i&&b.prev.i!==n.i&&!function nm(b,n){let o=b;do{if(o.i!==b.i&&o.next.i!==b.i&&o.i!==n.i&&o.next.i!==n.i&&pd(o,o.next,b,n))return!0;o=o.next}while(o!==b);return!1}(b,n)&&(nf(b,n)&&nf(n,b)&&function Ev(b,n){let o=b,m=!1;const A=(b.x+n.x)/2,E=(b.y+n.y)/2;do{o.y>E!=o.next.y>E&&o.next.y!==o.y&&A<(o.next.x-o.x)*(E-o.y)/(o.next.y-o.y)+o.x&&(m=!m),o=o.next}while(o!==b);return m}(b,n)&&(Mr(b.prev,b,n.prev)||Mr(b,n.prev,n))||tf(b,n)&&Mr(b.prev,b,b.next)>0&&Mr(n.prev,n,n.next)>0)}function Mr(b,n,o){return(n.y-b.y)*(o.x-n.x)-(n.x-b.x)*(o.y-n.y)}function tf(b,n){return b.x===n.x&&b.y===n.y}function pd(b,n,o,m){const A=wh(Mr(b,n,o)),E=wh(Mr(b,n,m)),w=wh(Mr(o,m,b)),T=wh(Mr(o,m,n));return!!(A!==E&&w!==T||0===A&&Mh(b,o,n)||0===E&&Mh(b,m,n)||0===w&&Mh(o,b,m)||0===T&&Mh(o,n,m))}function Mh(b,n,o){return n.x<=Math.max(b.x,o.x)&&n.x>=Math.min(b.x,o.x)&&n.y<=Math.max(b.y,o.y)&&n.y>=Math.min(b.y,o.y)}function wh(b){return b>0?1:b<0?-1:0}function nf(b,n){return Mr(b.prev,b,b.next)<0?Mr(b,n,b.next)>=0&&Mr(b,b.prev,n)>=0:Mr(b,n,b.prev)<0||Mr(b,b.next,n)<0}function o0(b,n){const o=new pn(b.i,b.x,b.y),m=new pn(n.i,n.x,n.y),A=b.next,E=n.prev;return b.next=n,n.prev=b,o.next=A,A.prev=o,m.next=o,o.prev=m,E.next=m,m.prev=E,m}function md(b,n,o,m){const A=new pn(b,n,o);return m?(A.next=m.next,A.prev=m,m.next.prev=A,m.next=A):(A.prev=A,A.
vendor: 5,672 bytes, line 83
83next=A),A}function Oc(b){b.next.prev=b.prev,b.prev.next=b.next,b.prevZ&&(b.prevZ.nextZ=b.nextZ),b.nextZ&&(b.nextZ.prevZ=b.prevZ)}function pn(b,n,o){this.i=b,this.x=n,this.y=o,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}class no{static area(n){const o=n.length;let m=0;for(let A=o-1,E=0;E<o;A=E++)m+=n[A].x*n[E].y-n[E].x*n[A].y;return.5*m}static isClockWise(n){return no.area(n)<0}static triangulateShape(n,o){const m=[],A=[],E=[];Qr(n),Ch(m,n);let w=n.length;o.forEach(Qr);for(let B=0;B<o.length;B++)A.push(w),w+=o[B].length,Ch(m,o[B]);const T=function(b,n,o=2){const m=n&&n.length,A=m?n[0]*o:b.length;let E=s0(b,0,A,o,!0);const w=[];if(!E||E.next===E.prev)return w;let T,B,D,N,G,H,Q;if(m&&(E=function ju(b,n,o,m){const A=[];let E,w,T,B,D;for(E=0,w=n.length;E<w;E++)T=n[E]*m,B=E<w-1?n[E+1]*m:b.length,D=s0(b,T,B,m,!1),D===D.next&&(D.steiner=!0),A.push(xv(D));for(A.sort(to),E=0;E<A.length;E++)o=dd(A[E],o);return o}(b,n,E,o)),b.length>80*o){T=D=b[0],B=N=b[1];for(let Z=o;Z<A;Z+=o)G=b[Z],H=b[Z+1],G<T&&(T=G),H<B&&(B=H),G>D&&(D=G),H>N&&(N=H);Q=Math.max(D-T,N-B),Q=0!==Q?32767/Q:0}return Fn(E,w,o,T,B,Q,0),w}(m,A);for(let B=0;B<T.length;B+=3)E.push(T.slice(B,B+3));return E}}function Qr(b){const n=b.length;n>2&&b[n-1].equals(b[0])&&b.pop()}function Ch(b,n){for(let o=0;o<n.length;o++)b.push(n[o].x),b.push(n[o].y)}class Cs extends Fi{constructor(n=new kc([new qt(.5,.5),new qt(-.5,.5),new qt(-.5,-.5),new qt(.5,-.5)]),o={}){super(),this.type="ExtrudeGeometry",this.parameters={shapes:n,options:o},n=Array.isArray(n)?n:[n];const m=this,A=[],E=[];for(let T=0,B=n.length;T<B;T++)w(n[T]);function w(T){const B=[],D=void 0!==o.curveSegments?o.curveSegments:12,N=void 0!==o.steps?o.steps:1,G=void 0!==o.depth?o.depth:1;let H=void 0===o.bevelEnabled||o.bevelEnabled,Q=void 0!==o.bevelThickness?o.bevelThickness:.2,Z=void 0!==o.bevelSize?o.bevelSize:Q-.1,he=void 0!==o.bevelOffset?o.bevelOffset:0,J=void 0!==o.bevelSegments?o.bevelSegments:3;const Y=o.extrudePath,ve=void 0!==o.UVGenerator?o.UVGenerator:iE;let pe,Ie,Ne,Xe,Qe,Ae=!1;Y&&(pe=Y.getSpacedPoints(N),Ae=!0,H=!1,Ie=Y.computeFrenetFrames(N,!1),Ne=new De,Xe=new De,Qe=new De),H||(J=0,Q=0,Z=0,he=0);const Se=T.extractPoints(D);let Le=Se.shape;const vt=Se.holes;if(!no.isClockWise(Le)){Le=Le.reverse();for(let Jt=0,kt=vt.length;Jt<kt;Jt++){const en=vt[Jt];no.isClockWise(en)&&(vt[Jt]=en.reverse())}}const ot=no.triangulateShape(Le,vt),dt=Le;for(let Jt=0,kt=vt.length;Jt<kt;Jt++)Le=Le.concat(vt[Jt]);function Et(Jt,kt,en){return kt||console.error("THREE.ExtrudeGeometry: vec does not exist"),Jt.clone().addScaledVector(kt,en)}const tn=Le.length,cn=ot.length;function Ht(Jt,kt,en){let Wn,bn,di;const pi=Jt.x-kt.x,ai=Jt.y-kt.y,Gi=en.x-Jt.x,nr=en.y-Jt.y,Ue=pi*pi+ai*ai;if(Math.abs(pi*nr-ai*Gi)>Number.EPSILON){const yt=Math.sqrt(Ue),an=Math.sqrt(Gi*Gi+nr*nr),un=kt.x-ai/yt,wn=kt.y+pi/yt,Bt=((en.x-nr/an-un)*nr-(en.y+Gi/an-wn)*Gi)/(pi*nr-ai*Gi);Wn=un+pi*Bt-Jt.x,bn=wn+ai*Bt-Jt.y;const Kn=Wn*Wn+bn*bn;if(Kn<=2)return new qt(Wn,bn);di=Math.sqrt(Kn/2)}else{let yt=!1;pi>Number.EPSILON?Gi>Number.EPSILON&&(yt=!0):pi<-Number.EPSILON?Gi<-Number.EPSILON&&(yt=!0):Math.sign(ai)===Math.sign(nr)&&(yt=!0),yt?(Wn=-ai,bn=pi,di=Math.sqrt(Ue)):(Wn=pi,bn=ai,di=Math.sqrt(Ue/2))}return new qt(Wn/di,bn/di)}const nn=[];for(let Jt=0,kt=dt.length,en=kt-1,Wn=Jt+1;Jt<kt;Jt++,en++,Wn++)en===kt&&(en=0),Wn===kt&&(Wn=0),nn[Jt]=Ht(dt[Jt],dt[en],dt[Wn]);const dn=[];let Yn,In=nn.concat();for(let Jt=0,kt=vt.length;Jt<kt;Jt++){const en=vt[Jt];Yn=[];for(let Wn=0,bn=en.length,di=bn-1,pi=Wn+1;Wn<bn;Wn++,di++,pi++)di===bn&&(di=0),pi===bn&&(pi=0),Yn[Wn]=Ht(en[Wn],en[di],en[pi]);dn.push(Yn),In=In.concat(Yn)}for(let Jt=0;Jt<J;Jt++){const kt=Jt/J,en=Q*Math.cos(kt*Math.PI/2),Wn=Z*Math.sin(kt*Math.PI/2)+he;for(let bn=0,di=dt.length;bn<di;bn++){const pi=Et(dt[bn],nn[bn],Wn);$e(pi.x,pi.y,-en)}for(let bn=0,di=vt.length;bn<di;bn++){const pi=vt[bn];Yn=dn[bn];for(let ai=0,Gi=pi.length;ai<Gi;ai++){const nr=Et(pi[ai],Yn[ai],Wn);$e(nr.x,nr.y,-en)}}}const wt=Z+he;for(let Jt=0;Jt<tn;Jt++){const kt=H?Et(Le[Jt],In[Jt],wt):Le[Jt];Ae?(Xe.copy(Ie.normals[0]).multiplyScalar(kt.x),Ne.copy(Ie.binormals[0]).multiplyScalar(kt.y),Qe.copy(pe[0]).add(Xe).add(Ne),$e(Qe.x,Qe.y,Qe.z)):$e(kt.x,kt.y,0)}for(let Jt=1;Jt<=N;Jt++)for(let kt=0;kt<tn;kt++){const en=H?Et(Le[kt],In[kt],wt):Le[kt];Ae?(Xe.copy(Ie.normals[Jt]).multiplyScalar(en.x),Ne.copy(Ie.binormals[Jt]).multiplyScalar(en.y),Qe.copy(pe[Jt]).add(Xe).add(Ne),$e(Qe.x,Qe.y,Qe.z)):$e(en.x,en.y,G/N*Jt)}for(let Jt=J-1;Jt>=0;Jt--){const kt=Jt/J,en=Q*Math.cos(kt*Math.PI/2),Wn=Z*Math.sin(kt*Math.PI/2)+he;for(let bn=0,di=dt.length;bn<di;bn++){const pi=Et(dt[bn],nn[bn],Wn);$e(pi.x,pi.y,G+en)}for(let bn=0,di=vt.length;bn<di;bn++){const pi=vt[bn];Yn=dn[bn];for(let ai=0,Gi=pi.length;ai<Gi;ai++){const nr=Et(pi[ai],Yn[ai],Wn);Ae?$e(nr.x,nr.y+pe[N-1].y,pe[N-1].x+en):$e(nr.x,nr.y,G+en)}}}function Bn(Jt,kt){let en=Jt.length;for(;--en>=0;){const Wn=en;let bn=en-1;bn<0&&(bn=Jt.length-1);for(let di=0,pi=N+2*J;di<pi;di++){const ai=tn*di,Gi=tn*(di+1);fi(kt+Wn+ai,kt+bn+ai,kt+bn+Gi,kt+Wn+Gi)}}}function $e(Jt,kt,en){B.push(Jt),B.push(kt),B.push(en)}function Ei(Jt,kt,en){mn(Jt),mn(kt),mn(en);const Wn=A.length/3,bn=ve.generateTopUV(m,A,Wn-3,Wn-2,Wn-1);jn(bn[0]),jn(bn[1]),jn(bn[2])}function fi(Jt,kt,en,Wn){mn(Jt),mn(kt),mn(Wn),mn(kt),mn(en),mn(Wn);const bn=A.length/3,di=ve.generateSideWallUV(m,A,bn-6,bn-3,bn-2,bn-1);jn(di[0]),jn(di[1]),jn(di[3]),jn(di[1]),jn(di[2]),jn(di[3])}function mn(Jt){A.push(B[3*Jt+0]),A.push(B[3*Jt+1]),A.push(B[3*Jt+2])}function jn(Jt){E.push(Jt.x),E.push(Jt.y)}(function Zt(){const Jt=A.length/3;if(H){let kt=0,en=tn*kt;for(let Wn=0;Wn<cn;Wn++){const bn=ot[Wn];
vendor: 11,675 bytes, line 83
83Ei(bn[2]+en,bn[1]+en,bn[0]+en)}kt=N+2*J,en=tn*kt;for(let Wn=0;Wn<cn;Wn++){const bn=ot[Wn];Ei(bn[0]+en,bn[1]+en,bn[2]+en)}}else{for(let kt=0;kt<cn;kt++){const en=ot[kt];Ei(en[2],en[1],en[0])}for(let kt=0;kt<cn;kt++){const en=ot[kt];Ei(en[0]+tn*N,en[1]+tn*N,en[2]+tn*N)}}m.addGroup(Jt,A.length/3-Jt,0)})(),function En(){const Jt=A.length/3;let kt=0;Bn(dt,kt),kt+=dt.length;for(let en=0,Wn=vt.length;en<Wn;en++){const bn=vt[en];Bn(bn,kt),kt+=bn.length}m.addGroup(Jt,A.length/3-Jt,1)}()}this.setAttribute("position",new zn(A,3)),this.setAttribute("uv",new zn(E,2)),this.computeVertexNormals()}copy(n){return super.copy(n),this.parameters=Object.assign({},n.parameters),this}toJSON(){const n=super.toJSON();return function bv(b,n,o){if(o.shapes=[],Array.isArray(b))for(let m=0,A=b.length;m<A;m++)o.shapes.push(b[m].uuid);else o.shapes.push(b.uuid);return o.options=Object.assign({},n),void 0!==n.extrudePath&&(o.options.extrudePath=n.extrudePath.toJSON()),o}(this.parameters.shapes,this.parameters.options,n)}static fromJSON(n,o){const m=[];for(let E=0,w=n.shapes.length;E<w;E++)m.push(o[n.shapes[E]]);const A=n.options.extrudePath;return void 0!==A&&(n.options.extrudePath=(new An[A.type]).fromJSON(A)),new Cs(m,n.options)}}const iE={generateTopUV:function(b,n,o,m,A){const T=n[3*m],B=n[3*m+1],D=n[3*A],N=n[3*A+1];return[new qt(n[3*o],n[3*o+1]),new qt(T,B),new qt(D,N)]},generateSideWallUV:function(b,n,o,m,A,E){const w=n[3*o],T=n[3*o+1],B=n[3*o+2],D=n[3*m],N=n[3*m+1],G=n[3*m+2],H=n[3*A],Q=n[3*A+1],Z=n[3*A+2],he=n[3*E],J=n[3*E+1],Y=n[3*E+2];return Math.abs(T-N)<Math.abs(w-D)?[new qt(w,1-B),new qt(D,1-G),new qt(H,1-Z),new qt(he,1-Y)]:[new qt(T,1-B),new qt(N,1-G),new qt(Q,1-Z),new qt(J,1-Y)]}};class Nc extends Sr{constructor(n=1,o=0){const m=(1+Math.sqrt(5))/2;super([-1,m,0,1,m,0,-1,-m,0,1,-m,0,0,-1,m,0,1,m,0,-1,-m,0,1,-m,m,0,-1,m,0,1,-m,0,-1,-m,0,1],[0,11,5,0,5,1,0,1,7,0,7,10,0,10,11,1,5,9,5,11,4,11,10,2,10,7,6,7,1,8,3,9,4,3,4,2,3,2,6,3,6,8,3,8,9,4,9,5,2,4,11,6,2,10,8,6,7,9,8,1],n,o),this.type="IcosahedronGeometry",this.parameters={radius:n,detail:o}}static fromJSON(n){return new Nc(n.radius,n.detail)}}class rf extends Sr{constructor(n=1,o=0){super([1,0,0,-1,0,0,0,1,0,0,-1,0,0,0,1,0,0,-1],[0,2,4,0,4,3,0,3,5,0,5,2,1,2,5,1,5,3,1,3,4,1,4,2],n,o),this.type="OctahedronGeometry",this.parameters={radius:n,detail:o}}static fromJSON(n){return new rf(n.radius,n.detail)}}class gd extends Fi{constructor(n=.5,o=1,m=32,A=1,E=0,w=2*Math.PI){super(),this.type="RingGeometry",this.parameters={innerRadius:n,outerRadius:o,thetaSegments:m,phiSegments:A,thetaStart:E,thetaLength:w},m=Math.max(3,m);const T=[],B=[],D=[],N=[];let G=n;const H=(o-n)/(A=Math.max(1,A)),Q=new De,Z=new qt;for(let he=0;he<=A;he++){for(let J=0;J<=m;J++){const Y=E+J/m*w;Q.x=G*Math.cos(Y),Q.y=G*Math.sin(Y),B.push(Q.x,Q.y,Q.z),D.push(0,0,1),Z.x=(Q.x/o+1)/2,Z.y=(Q.y/o+1)/2,N.push(Z.x,Z.y)}G+=H}for(let he=0;he<A;he++){const J=he*(m+1);for(let Y=0;Y<m;Y++){const ve=Y+J,Ae=ve+m+1,Ie=ve+m+2,Ne=ve+1;T.push(ve,Ae,Ne),T.push(Ae,Ie,Ne)}}this.setIndex(T),this.setAttribute("position",new zn(B,3)),this.setAttribute("normal",new zn(D,3)),this.setAttribute("uv",new zn(N,2))}copy(n){return super.copy(n),this.parameters=Object.assign({},n.parameters),this}static fromJSON(n){return new gd(n.innerRadius,n.outerRadius,n.thetaSegments,n.phiSegments,n.thetaStart,n.thetaLength)}}class Ts extends Fi{constructor(n=new kc([new qt(0,.5),new qt(-.5,-.5),new qt(.5,-.5)]),o=12){super(),this.type="ShapeGeometry",this.parameters={shapes:n,curveSegments:o};const m=[],A=[],E=[],w=[];let T=0,B=0;if(!1===Array.isArray(n))D(n);else for(let N=0;N<n.length;N++)D(n[N]),this.addGroup(T,B,N),T+=B,B=0;function D(N){const G=A.length/3,H=N.extractPoints(o);let Q=H.shape;const Z=H.holes;!1===no.isClockWise(Q)&&(Q=Q.reverse());for(let J=0,Y=Z.length;J<Y;J++){const ve=Z[J];!0===no.isClockWise(ve)&&(Z[J]=ve.reverse())}const he=no.triangulateShape(Q,Z);for(let J=0,Y=Z.length;J<Y;J++)Q=Q.concat(Z[J]);for(let J=0,Y=Q.length;J<Y;J++){const ve=Q[J];A.push(ve.x,ve.y,0),E.push(0,0,1),w.push(ve.x,ve.y)}for(let J=0,Y=he.length;J<Y;J++){const ve=he[J];m.push(ve[0]+G,ve[1]+G,ve[2]+G),B+=3}}this.setIndex(m),this.setAttribute("position",new zn(A,3)),this.setAttribute("normal",new zn(E,3)),this.setAttribute("uv",new zn(w,2))}copy(n){return super.copy(n),this.parameters=Object.assign({},n.parameters),this}toJSON(){const n=super.toJSON();return function l0(b,n){if(n.shapes=[],Array.isArray(b))for(let o=0,m=b.length;o<m;o++)n.shapes.push(b[o].uuid);else n.shapes.push(b.uuid);return n}(this.parameters.shapes,n)}static fromJSON(n,o){const m=[];for(let A=0,E=n.shapes.length;A<E;A++)m.push(o[n.shapes[A]]);return new Ts(m,n.curveSegments)}}class Wr extends Fi{constructor(n=1,o=32,m=16,A=0,E=2*Math.PI,w=0,T=Math.PI){super(),this.type="SphereGeometry",this.parameters={radius:n,widthSegments:o,heightSegments:m,phiStart:A,phiLength:E,thetaStart:w,thetaLength:T},o=Math.max(3,Math.floor(o)),m=Math.max(2,Math.floor(m));const B=Math.min(w+T,Math.PI);let D=0;const N=[],G=new De,H=new De,Q=[],Z=[],he=[],J=[];for(let Y=0;Y<=m;Y++){const ve=[],pe=Y/m;let Ae=0;0===Y&&0===w?Ae=.5/o:Y===m&&B===Math.PI&&(Ae=-.5/o);for(let Ie=0;Ie<=o;Ie++){const Ne=Ie/o;G.x=-n*Math.cos(A+Ne*E)*Math.sin(w+pe*T),G.y=n*Math.cos(w+pe*T),G.z=n*Math.sin(A+Ne*E)*Math.sin(w+pe*T),Z.push(G.x,G.y,G.z),H.copy(G).normalize(),he.push(H.x,H.y,H.z),J.push(Ne+Ae,1-pe),ve.push(D++)}N.push(ve)}for(let Y=0;Y<m;Y++)for(let ve=0;ve<o;ve++){const Ae=N[Y][ve],Ie=N[Y+1][ve],Ne=N[Y+1][ve+1];(0!==Y||w>0)&&Q.push(N[Y][ve+1],Ae,Ne),(Y!==m-1||B<Math.PI)&&Q.push(Ae,Ie,Ne)}this.setIndex(Q),this.setAttribute("position",new zn(Z,3)),this.setAttribute("normal",new zn(he,3)),this.setAttribute("uv",new zn(J,2))}copy(n){return super.copy(n),this.parameters=Object.assign({},n.parameters),this}static fromJSON(n){return new Wr(n.radius,n.widthSegments,n.heightSegments,n.phiStart,n.phiLength,n.thetaStart,n.thetaLength)}}class xl extends Sr{constructor(n=1,o=0){super([1,1,1,-1,-1,1,-1,1,-1,1,-1,-1],[2,1,0,0,3,2,1,3,0,2,3,1],n,o),this.type="TetrahedronGeometry",this.parameters={radius:n,detail:o}}static fromJSON(n){return new xl(n.radius,n.detail)}}class El extends Fi{constructor(n=1,o=.4,m=12,A=48,E=2*Math.PI){super(),this.type="TorusGeometry",this.parameters={radius:n,tube:o,radialSegments:m,tubularSegments:A,arc:E},m=Math.floor(m),A=Math.floor(A);const w=[],T=[],B=[],D=[],N=new De,G=new De,H=new De;for(let Q=0;Q<=m;Q++)for(let Z=0;Z<=A;Z++){const he=Z/A*E,J=Q/m*Math.PI*2;G.x=(n+o*Math.cos(J))*Math.cos(he),G.y=(n+o*Math.cos(J))*Math.sin(he),G.z=o*Math.sin(J),T.push(G.x,G.y,G.z),N.x=n*Math.cos(he),N.y=n*Math.sin(he),H.subVectors(G,N).normalize(),B.push(H.x,H.y,H.z),D.push(Z/A),D.push(Q/m)}for(let Q=1;Q<=m;Q++)for(let Z=1;Z<=A;Z++){const J=(A+1)*(Q-1)+Z-1,Y=(A+1)*(Q-1)+Z,ve=(A+1)*Q+Z;w.push((A+1)*Q+Z-1,J,ve),w.push(J,Y,ve)}this.setIndex(w),this.setAttribute("position",new zn(T,3)),this.setAttribute("normal",new zn(B,3)),this.setAttribute("uv",new zn(D,2))}copy(n){return super.copy(n),this.parameters=Object.assign({},n.parameters),this}static fromJSON(n){return new El(n.radius,n.tube,n.radialSegments,n.tubularSegments,n.arc)}}class Ad extends Fi{constructor(n=1,o=.4,m=64,A=8,E=2,w=3){super(),this.type="TorusKnotGeometry",this.parameters={radius:n,tube:o,tubularSegments:m,radialSegments:A,p:E,q:w},m=Math.floor(m),A=Math.floor(A);const T=[],B=[],D=[],N=[],G=new De,H=new De,Q=new De,Z=new De,he=new De,J=new De,Y=new De;for(let pe=0;pe<=m;++pe){const Ae=pe/m*E*Math.PI*2;ve(Ae,E,w,n,Q),ve(Ae+.01,E,w,n,Z),J.subVectors(Z,Q),Y.addVectors(Z,Q),he.crossVectors(J,Y),Y.crossVectors(he,J),he.normalize(),Y.normalize();for(let Ie=0;Ie<=A;++Ie){const Ne=Ie/A*Math.PI*2,Xe=-o*Math.cos(Ne),Qe=o*Math.sin(Ne);G.x=Q.x+(Xe*Y.x+Qe*he.x),G.y=Q.y+(Xe*Y.y+Qe*he.y),G.z=Q.z+(Xe*Y.z+Qe*he.z),B.push(G.x,G.y,G.z),H.subVectors(G,Q).normalize(),D.push(H.x,H.y,H.z),N.push(pe/m),N.push(Ie/A)}}for(let pe=1;pe<=m;pe++)for(let Ae=1;Ae<=A;Ae++){const Ne=(A+1)*pe+(Ae-1),Xe=(A+1)*pe+Ae,Qe=(A+1)*(pe-1)+Ae;T.push((A+1)*(pe-1)+(Ae-1),Ne,Qe),T.push(Ne,Xe,Qe)}function ve(pe,Ae,Ie,Ne,Xe){const Qe=Math.cos(pe),Se=Math.sin(pe),Le=Ie/Ae*pe,vt=Math.cos(Le);Xe.x=Ne*(2+vt)*.5*Qe,Xe.y=Ne*(2+vt)*Se*.5,Xe.z=Ne*Math.sin(Le)*.5}this.setIndex(T),this.setAttribute("position",new zn(B,3)),this.setAttribute("normal",new zn(D,3)),this.setAttribute("uv",new zn(N,2))}copy(n){return super.copy(n),this.parameters=Object.assign({},n.parameters),this}static fromJSON(n){return new Ad(n.radius,n.tube,n.tubularSegments,n.radialSegments,n.p,n.q)}}class Uc extends Fi{constructor(n=new $u(new De(-1,-1,0),new De(-1,1,0),new De(1,1,0)),o=64,m=1,A=8,E=!1){super(),this.type="TubeGeometry",this.parameters={path:n,tubularSegments:o,radius:m,radialSegments:A,closed:E};const w=n.computeFrenetFrames(o,E);this.tangents=w.tangents,this.normals=w.normals,this.binormals=w.binormals;const T=new De,B=new De,D=new qt;let N=new De;const G=[],H=[],Q=[],Z=[];function J(pe){N=n.getPointAt(pe/o,N);const Ae=w.normals[pe],Ie=w.binormals[pe];for(let Ne=0;Ne<=A;Ne++){const Xe=Ne/A*Math.PI*2,Qe=Math.sin(Xe),Se=-Math.cos(Xe);B.x=Se*Ae.x+Qe*Ie.x,B.y=Se*Ae.y+Qe*Ie.y,B.z=Se*Ae.z+Qe*Ie.z,B.normalize(),H.push(B.x,B.y,B.z),T.x=N.x+m*B.x,T.y=N.y+m*B.y,T.z=N.z+m*B.z,G.push(T.x,T.y,T.z)}}(function he(){for(let pe=0;pe<o;pe++)J(pe);J(!1===E?o:0),function ve(){for(let pe=0;pe<=o;pe++)for(let Ae=0;Ae<=A;Ae++)D.x=pe/o,D.y=Ae/A,Q.push(D.x,D.y)}(),function Y(){for(let pe=1;pe<=o;pe++)for(let Ae=1;Ae<=A;Ae++){const Ne=(A+1)*pe+(Ae-1),Xe=(A+1)*pe+Ae,Qe=(A+1)*(pe-1)+Ae;Z.push((A+1)*(pe-1)+(Ae-1),Ne,Qe),Z.push(Ne,Xe,Qe)}}()})(),this.setIndex(Z),this.setAttribute("position",new zn(G,3)),this.setAttribute("normal",new zn(H,3)),this.setAttribute("uv",new zn(Q,2))}copy(n){return super.copy(n),this.parameters=Object.assign({},n.parameters),this}toJSON(){const n=super.toJSON();return n.path=this.parameters.path.toJSON(),n}static fromJSON(n){return new Uc((new An[n.path.type]).fromJSON(n.path),n.tubularSegments,n.radius,n.radialSegments,n.closed)}}class Sv extends Fi{constructor(n=null){if(super(),this.type="WireframeGeometry",this.parameters={geometry:n},null!==n){const o=[],m=new Set,A=new De,E=new De;if(null!==n.index){const w=n.attributes.position,T=n.index;let B=n.groups;0===B.length&&(B=[{start:0,count:T.count,materialIndex:0}]);for(let D=0,N=B.length;D<N;++D){const G=B[D],H=G.start;for(let Z=H,he=H+G.count;Z<he;Z+=3)for(let J=0;J<3;J++){const Y=T.getX(Z+J),ve=T.getX(Z+(J+1)%3);A.fromBufferAttribute(w,Y),E.fromBufferAttribute(w,ve),!0===im(A,E,m)&&(o.push(A.x,A.y,A.z),o.push(E.x,E.y,E.z))}}}else{const w=n.attributes.position;for(let T=0,B=w.count/3;T<B;T++)for(let D=0;D<3;D++){const G=3*T+(D+1)%3;A.fromBufferAttribute(w,3*T+D),E.fromBufferAttribute(w,G),!0===im(A,E,m)&&(o.push(A.x,A.y,A.z),o.push(E.x,E.y,E.z))}}this.setAttribute("position",new zn(o,3))}}copy(n){return super.copy(n),this.parameters=Object.assign({},n.parameters),this}}function im(b,n,o){const m=`${b.x},${b.y},${b.z}-${n.x},${n.y},${n.z}`,A=`${n.x},${n.y},${n.z}-${b.x},${b.y},${b.z}`;return!0!==o.has(m)&&!0!==o.has(A)&&(o.add(m),o.add(A),!0)}var Mv=Object.freeze({__proto__:null,BoxGeometry:xc,CapsuleGeometry:fd,CircleGeometry:Us,ConeGeometry:Ku,CylinderGeometry:Xo,DodecahedronGeometry:Fc,EdgesGeometry:eE,ExtrudeGeometry:Cs,IcosahedronGeometry:Nc,LatheGeometry:za,OctahedronGeometry:rf,PlaneGeometry:bc,PolyhedronGeometry:Sr,RingGeometry:gd,ShapeGeometry:Ts,SphereGeometry:Wr,TetrahedronGeometry:xl,TorusGeometry:El,TorusKnotGeometry:Ad,TubeGeometry:Uc,WireframeGeometry:Sv});class wv extends qs{constructor(n){super(),this.isShadowMaterial=!0,this.type="ShadowMaterial",this.color=new Dn(0),this.transparent=!0,this.fog=!0,this.setValues(n)}
vendor: 5,403 bytes, line 83
83copy(n){return super.copy(n),this.color.copy(n.color),this.fog=n.fog,this}}class Co extends hl{constructor(n){super(n),this.isRawShaderMaterial=!0,this.type="RawShaderMaterial"}}class nc extends qs{constructor(n){super(),this.isMeshStandardMaterial=!0,this.defines={STANDARD:""},this.type="MeshStandardMaterial",this.color=new Dn(16777215),this.roughness=1,this.metalness=0,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Dn(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new qt(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.roughnessMap=null,this.metalnessMap=null,this.alphaMap=null,this.envMap=null,this.envMapIntensity=1,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(n)}copy(n){return super.copy(n),this.defines={STANDARD:""},this.color.copy(n.color),this.roughness=n.roughness,this.metalness=n.metalness,this.map=n.map,this.lightMap=n.lightMap,this.lightMapIntensity=n.lightMapIntensity,this.aoMap=n.aoMap,this.aoMapIntensity=n.aoMapIntensity,this.emissive.copy(n.emissive),this.emissiveMap=n.emissiveMap,this.emissiveIntensity=n.emissiveIntensity,this.bumpMap=n.bumpMap,this.bumpScale=n.bumpScale,this.normalMap=n.normalMap,this.normalMapType=n.normalMapType,this.normalScale.copy(n.normalScale),this.displacementMap=n.displacementMap,this.displacementScale=n.displacementScale,this.displacementBias=n.displacementBias,this.roughnessMap=n.roughnessMap,this.metalnessMap=n.metalnessMap,this.alphaMap=n.alphaMap,this.envMap=n.envMap,this.envMapIntensity=n.envMapIntensity,this.wireframe=n.wireframe,this.wireframeLinewidth=n.wireframeLinewidth,this.wireframeLinecap=n.wireframeLinecap,this.wireframeLinejoin=n.wireframeLinejoin,this.flatShading=n.flatShading,this.fog=n.fog,this}}class _d extends nc{constructor(n){super(),this.isMeshPhysicalMaterial=!0,this.defines={STANDARD:"",PHYSICAL:""},this.type="MeshPhysicalMaterial",this.clearcoatMap=null,this.clearcoatRoughness=0,this.clearcoatRoughnessMap=null,this.clearcoatNormalScale=new qt(1,1),this.clearcoatNormalMap=null,this.ior=1.5,Object.defineProperty(this,"reflectivity",{get:function(){return gr(2.5*(this.ior-1)/(this.ior+1),0,1)},set:function(o){this.ior=(1+.4*o)/(1-.4*o)}}),this.iridescenceMap=null,this.iridescenceIOR=1.3,this.iridescenceThicknessRange=[100,400],this.iridescenceThicknessMap=null,this.sheenColor=new Dn(0),this.sheenColorMap=null,this.sheenRoughness=1,this.sheenRoughnessMap=null,this.transmissionMap=null,this.thickness=0,this.thicknessMap=null,this.attenuationDistance=1/0,this.attenuationColor=new Dn(1,1,1),this.specularIntensity=1,this.specularIntensityMap=null,this.specularColor=new Dn(1,1,1),this.specularColorMap=null,this._sheen=0,this._clearcoat=0,this._iridescence=0,this._transmission=0,this.setValues(n)}get sheen(){return this._sheen}set sheen(n){this._sheen>0!=n>0&&this.version++,this._sheen=n}get clearcoat(){return this._clearcoat}set clearcoat(n){this._clearcoat>0!=n>0&&this.version++,this._clearcoat=n}get iridescence(){return this._iridescence}set iridescence(n){this._iridescence>0!=n>0&&this.version++,this._iridescence=n}get transmission(){return this._transmission}set transmission(n){this._transmission>0!=n>0&&this.version++,this._transmission=n}copy(n){return super.copy(n),this.defines={STANDARD:"",PHYSICAL:""},this.clearcoat=n.clearcoat,this.clearcoatMap=n.clearcoatMap,this.clearcoatRoughness=n.clearcoatRoughness,this.clearcoatRoughnessMap=n.clearcoatRoughnessMap,this.clearcoatNormalMap=n.clearcoatNormalMap,this.clearcoatNormalScale.copy(n.clearcoatNormalScale),this.ior=n.ior,this.iridescence=n.iridescence,this.iridescenceMap=n.iridescenceMap,this.iridescenceIOR=n.iridescenceIOR,this.iridescenceThicknessRange=[...n.iridescenceThicknessRange],this.iridescenceThicknessMap=n.iridescenceThicknessMap,this.sheen=n.sheen,this.sheenColor.copy(n.sheenColor),this.sheenColorMap=n.sheenColorMap,this.sheenRoughness=n.sheenRoughness,this.sheenRoughnessMap=n.sheenRoughnessMap,this.transmission=n.transmission,this.transmissionMap=n.transmissionMap,this.thickness=n.thickness,this.thicknessMap=n.thicknessMap,this.attenuationDistance=n.attenuationDistance,this.attenuationColor.copy(n.attenuationColor),this.specularIntensity=n.specularIntensity,this.specularIntensityMap=n.specularIntensityMap,this.specularColor.copy(n.specularColor),this.specularColorMap=n.specularColorMap,this}}class rm extends qs{constructor(n){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new Dn(16777215),this.specular=new Dn(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Dn(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new qt(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=Tn,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(n)}
vendor: 4,963 bytes, line 83
83copy(n){return super.copy(n),this.color.copy(n.color),this.specular.copy(n.specular),this.shininess=n.shininess,this.map=n.map,this.lightMap=n.lightMap,this.lightMapIntensity=n.lightMapIntensity,this.aoMap=n.aoMap,this.aoMapIntensity=n.aoMapIntensity,this.emissive.copy(n.emissive),this.emissiveMap=n.emissiveMap,this.emissiveIntensity=n.emissiveIntensity,this.bumpMap=n.bumpMap,this.bumpScale=n.bumpScale,this.normalMap=n.normalMap,this.normalMapType=n.normalMapType,this.normalScale.copy(n.normalScale),this.displacementMap=n.displacementMap,this.displacementScale=n.displacementScale,this.displacementBias=n.displacementBias,this.specularMap=n.specularMap,this.alphaMap=n.alphaMap,this.envMap=n.envMap,this.combine=n.combine,this.reflectivity=n.reflectivity,this.refractionRatio=n.refractionRatio,this.wireframe=n.wireframe,this.wireframeLinewidth=n.wireframeLinewidth,this.wireframeLinecap=n.wireframeLinecap,this.wireframeLinejoin=n.wireframeLinejoin,this.flatShading=n.flatShading,this.fog=n.fog,this}}class c0 extends qs{constructor(n){super(),this.isMeshToonMaterial=!0,this.defines={TOON:""},this.type="MeshToonMaterial",this.color=new Dn(16777215),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Dn(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new qt(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(n)}copy(n){return super.copy(n),this.color.copy(n.color),this.map=n.map,this.gradientMap=n.gradientMap,this.lightMap=n.lightMap,this.lightMapIntensity=n.lightMapIntensity,this.aoMap=n.aoMap,this.aoMapIntensity=n.aoMapIntensity,this.emissive.copy(n.emissive),this.emissiveMap=n.emissiveMap,this.emissiveIntensity=n.emissiveIntensity,this.bumpMap=n.bumpMap,this.bumpScale=n.bumpScale,this.normalMap=n.normalMap,this.normalMapType=n.normalMapType,this.normalScale.copy(n.normalScale),this.displacementMap=n.displacementMap,this.displacementScale=n.displacementScale,this.displacementBias=n.displacementBias,this.alphaMap=n.alphaMap,this.wireframe=n.wireframe,this.wireframeLinewidth=n.wireframeLinewidth,this.wireframeLinecap=n.wireframeLinecap,this.wireframeLinejoin=n.wireframeLinejoin,this.fog=n.fog,this}}class Cv extends qs{constructor(n){super(),this.isMeshNormalMaterial=!0,this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new qt(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.flatShading=!1,this.setValues(n)}copy(n){return super.copy(n),this.bumpMap=n.bumpMap,this.bumpScale=n.bumpScale,this.normalMap=n.normalMap,this.normalMapType=n.normalMapType,this.normalScale.copy(n.normalScale),this.displacementMap=n.displacementMap,this.displacementScale=n.displacementScale,this.displacementBias=n.displacementBias,this.wireframe=n.wireframe,this.wireframeLinewidth=n.wireframeLinewidth,this.flatShading=n.flatShading,this}}class Th extends qs{constructor(n){super(),this.isMeshLambertMaterial=!0,this.type="MeshLambertMaterial",this.color=new Dn(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Dn(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new qt(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=Tn,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(n)}copy(n){return super.copy(n),this.color.copy(n.color),this.map=n.map,this.lightMap=n.lightMap,this.lightMapIntensity=n.lightMapIntensity,this.aoMap=n.aoMap,this.aoMapIntensity=n.aoMapIntensity,this.emissive.copy(n.emissive),this.emissiveMap=n.emissiveMap,this.emissiveIntensity=n.emissiveIntensity,this.bumpMap=n.bumpMap,this.bumpScale=n.bumpScale,this.normalMap=n.normalMap,this.normalMapType=n.normalMapType,this.normalScale.copy(n.normalScale),this.displacementMap=n.displacementMap,this.displacementScale=n.displacementScale,this.displacementBias=n.displacementBias,this.specularMap=n.specularMap,this.alphaMap=n.alphaMap,this.envMap=n.envMap,this.combine=n.combine,this.reflectivity=n.reflectivity,this.refractionRatio=n.refractionRatio,this.wireframe=n.wireframe,this.wireframeLinewidth=n.wireframeLinewidth,this.wireframeLinecap=n.wireframeLinecap,this.wireframeLinejoin=n.wireframeLinejoin,this.flatShading=n.flatShading,this.fog=n.fog,this}}
vendor: 14,383 bytes, line 83
83class Tv extends qs{constructor(n){super(),this.isMeshMatcapMaterial=!0,this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new Dn(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new qt(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.flatShading=!1,this.fog=!0,this.setValues(n)}copy(n){return super.copy(n),this.defines={MATCAP:""},this.color.copy(n.color),this.matcap=n.matcap,this.map=n.map,this.bumpMap=n.bumpMap,this.bumpScale=n.bumpScale,this.normalMap=n.normalMap,this.normalMapType=n.normalMapType,this.normalScale.copy(n.normalScale),this.displacementMap=n.displacementMap,this.displacementScale=n.displacementScale,this.displacementBias=n.displacementBias,this.alphaMap=n.alphaMap,this.flatShading=n.flatShading,this.fog=n.fog,this}}class Iv extends es{constructor(n){super(),this.isLineDashedMaterial=!0,this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(n)}copy(n){return super.copy(n),this.scale=n.scale,this.dashSize=n.dashSize,this.gapSize=n.gapSize,this}}function To(b,n,o){return h0(b)?new b.constructor(b.subarray(n,void 0!==o?o:b.length)):b.slice(n,o)}function Ih(b,n,o){return!b||!o&&b.constructor===n?b:"number"==typeof n.BYTES_PER_ELEMENT?new n(b):Array.prototype.slice.call(b)}function h0(b){return ArrayBuffer.isView(b)&&!(b instanceof DataView)}function Pv(b){const o=b.length,m=new Array(o);for(let A=0;A!==o;++A)m[A]=A;return m.sort(function n(A,E){return b[A]-b[E]}),m}function u0(b,n,o){const m=b.length,A=new b.constructor(m);for(let E=0,w=0;w!==m;++E){const T=o[E]*n;for(let B=0;B!==n;++B)A[w++]=b[T+B]}return A}function f0(b,n,o,m){let A=1,E=b[0];for(;void 0!==E&&void 0===E[m];)E=b[A++];if(void 0===E)return;let w=E[m];if(void 0!==w)if(Array.isArray(w))do{w=E[m],void 0!==w&&(n.push(E.time),o.push.apply(o,w)),E=b[A++]}while(void 0!==E);else if(void 0!==w.toArray)do{w=E[m],void 0!==w&&(n.push(E.time),w.toArray(o,o.length)),E=b[A++]}while(void 0!==E);else do{w=E[m],void 0!==w&&(n.push(E.time),o.push(w)),E=b[A++]}while(void 0!==E)}const aE={arraySlice:To,convertArray:Ih,isTypedArray:h0,getKeyframeOrder:Pv,sortedArray:u0,flattenJSON:f0,subclip:function rE(b,n,o,m,A=30){const E=b.clone();E.name=n;const w=[];for(let B=0;B<E.tracks.length;++B){const D=E.tracks[B],N=D.getValueSize(),G=[],H=[];for(let Q=0;Q<D.times.length;++Q){const Z=D.times[Q]*A;if(!(Z<o||Z>=m)){G.push(D.times[Q]);for(let he=0;he<N;++he)H.push(D.values[Q*N+he])}}0!==G.length&&(D.times=Ih(G,D.times.constructor),D.values=Ih(H,D.values.constructor),w.push(D))}E.tracks=w;let T=1/0;for(let B=0;B<E.tracks.length;++B)T>E.tracks[B].times[0]&&(T=E.tracks[B].times[0]);for(let B=0;B<E.tracks.length;++B)E.tracks[B].shift(-1*T);return E.resetDuration(),E},makeClipAdditive:function sE(b,n=0,o=b,m=30){m<=0&&(m=30);const A=o.tracks.length,E=n/m;for(let w=0;w<A;++w){const T=o.tracks[w],B=T.ValueTypeName;if("bool"===B||"string"===B)continue;const D=b.tracks.find(function(Y){return Y.name===T.name&&Y.ValueTypeName===B});if(void 0===D)continue;let N=0;const G=T.getValueSize();T.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline&&(N=G/3);let H=0;const Q=D.getValueSize();D.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline&&(H=Q/3);const Z=T.times.length-1;let he;if(E<=T.times[0])he=To(T.values,N,G-N);else if(E>=T.times[Z]){const Y=Z*G+N;he=To(T.values,Y,Y+G-N)}else{const Y=T.createInterpolant(),ve=N,pe=G-N;Y.evaluate(E),he=To(Y.resultBuffer,ve,pe)}"quaternion"===B&&(new Xs).fromArray(he).normalize().conjugate().toArray(he);const J=D.times.length;for(let Y=0;Y<J;++Y){const ve=Y*Q+H;if("quaternion"===B)Xs.multiplyQuaternionsFlat(D.values,ve,he,0,D.values,ve);else{const pe=Q-2*H;for(let Ae=0;Ae<pe;++Ae)D.values[ve+Ae]-=he[Ae]}}}return b.blendMode=2501,b}};class vd{constructor(n,o,m,A){this.parameterPositions=n,this._cachedIndex=0,this.resultBuffer=void 0!==A?A:new o.constructor(m),this.sampleValues=o,this.valueSize=m,this.settings=null,this.DefaultSettings_={}}evaluate(n){const o=this.parameterPositions;let m=this._cachedIndex,A=o[m],E=o[m-1];e:{t:{let w;n:{i:if(!(n<A)){for(let T=m+2;;){if(void 0===A){if(n<E)break i;return m=o.length,this._cachedIndex=m,this.copySampleValue_(m-1)}if(m===T)break;if(E=A,A=o[++m],n<A)break t}w=o.length;break n}if(n>=E)break e;{const T=o[1];n<T&&(m=2,E=T);for(let B=m-2;;){if(void 0===E)return this._cachedIndex=0,this.copySampleValue_(0);if(m===B)break;if(A=E,E=o[--m-1],n>=E)break t}w=m,m=0}}for(;m<w;){const T=m+w>>>1;n<o[T]?w=T:m=T+1}if(A=o[m],E=o[m-1],void 0===E)return this._cachedIndex=0,this.copySampleValue_(0);if(void 0===A)return m=o.length,this._cachedIndex=m,this.copySampleValue_(m-1)}this._cachedIndex=m,this.intervalChanged_(m,E,A)}return this.interpolate_(m,E,n,A)}getSettings_(){return this.settings||this.DefaultSettings_}copySampleValue_(n){const o=this.resultBuffer,m=this.sampleValues,A=this.valueSize,E=n*A;for(let w=0;w!==A;++w)o[w]=m[E+w];return o}interpolate_(){throw new Error("call to abstract method")}intervalChanged_(){}}class Rv extends vd{constructor(n,o,m,A){super(n,o,m,A),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0,this.DefaultSettings_={endingStart:co,endingEnd:co}}intervalChanged_(n,o,m){const A=this.parameterPositions;let E=n-2,w=n+1,T=A[E],B=A[w];if(void 0===T)switch(this.getSettings_().endingStart){case Jo:E=n,T=2*o-m;break;case fc:E=A.length-2,T=o+A[E]-A[E+1];break;default:E=n,T=m}if(void 0===B)switch(this.getSettings_().endingEnd){case Jo:w=n,B=2*m-o;break;case fc:w=1,B=m+A[1]-A[0];break;default:w=n-1,B=o}const D=.5*(m-o),N=this.valueSize;this._weightPrev=D/(o-T),this._weightNext=D/(B-m),this._offsetPrev=E*N,this._offsetNext=w*N}interpolate_(n,o,m,A){const E=this.resultBuffer,w=this.sampleValues,T=this.valueSize,B=n*T,D=B-T,N=this._offsetPrev,G=this._offsetNext,H=this._weightPrev,Q=this._weightNext,Z=(m-o)/(A-o),he=Z*Z,J=he*Z,Y=-H*J+2*H*he-H*Z,ve=(1+H)*J+(-1.5-2*H)*he+(-.5+H)*Z+1,pe=(-1-Q)*J+(1.5+Q)*he+.5*Z,Ae=Q*J-Q*he;for(let Ie=0;Ie!==T;++Ie)E[Ie]=Y*w[N+Ie]+ve*w[D+Ie]+pe*w[B+Ie]+Ae*w[G+Ie];return E}}class d0 extends vd{constructor(n,o,m,A){super(n,o,m,A)}interpolate_(n,o,m,A){const E=this.resultBuffer,w=this.sampleValues,T=this.valueSize,B=n*T,D=B-T,N=(m-o)/(A-o),G=1-N;for(let H=0;H!==T;++H)E[H]=w[D+H]*G+w[B+H]*N;return E}}class Bv extends vd{constructor(n,o,m,A){super(n,o,m,A)}interpolate_(n){return this.copySampleValue_(n-1)}}class Yo{constructor(n,o,m,A){if(void 0===n)throw new Error("THREE.KeyframeTrack: track name is undefined");if(void 0===o||0===o.length)throw new Error("THREE.KeyframeTrack: no keyframes in track named "+n);this.name=n,this.times=Ih(o,this.TimeBufferType),this.values=Ih(m,this.ValueBufferType),this.setInterpolation(A||this.DefaultInterpolation)}static toJSON(n){const o=n.constructor;let m;if(o.toJSON!==this.toJSON)m=o.toJSON(n);else{m={name:n.name,times:Ih(n.times,Array),values:Ih(n.values,Array)};const A=n.getInterpolation();A!==n.DefaultInterpolation&&(m.interpolation=A)}return m.type=n.ValueTypeName,m}InterpolantFactoryMethodDiscrete(n){return new Bv(this.times,this.values,this.getValueSize(),n)}InterpolantFactoryMethodLinear(n){return new d0(this.times,this.values,this.getValueSize(),n)}InterpolantFactoryMethodSmooth(n){return new Rv(this.times,this.values,this.getValueSize(),n)}setInterpolation(n){let o;switch(n){case nh:o=this.InterpolantFactoryMethodDiscrete;break;case bf:o=this.InterpolantFactoryMethodLinear;break;case 2302:o=this.InterpolantFactoryMethodSmooth}if(void 0===o){const m="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(void 0===this.createInterpolant){if(n===this.DefaultInterpolation)throw new Error(m);this.setInterpolation(this.DefaultInterpolation)}return console.warn("THREE.KeyframeTrack:",m),this}return this.createInterpolant=o,this}getInterpolation(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return nh;case this.InterpolantFactoryMethodLinear:return bf;case this.InterpolantFactoryMethodSmooth:return 2302}}getValueSize(){return this.values.length/this.times.length}shift(n){if(0!==n){const o=this.times;for(let m=0,A=o.length;m!==A;++m)o[m]+=n}return this}scale(n){if(1!==n){const o=this.times;for(let m=0,A=o.length;m!==A;++m)o[m]*=n}return this}trim(n,o){const m=this.times,A=m.length;let E=0,w=A-1;for(;E!==A&&m[E]<n;)++E;for(;-1!==w&&m[w]>o;)--w;if(++w,0!==E||w!==A){E>=w&&(w=Math.max(w,1),E=w-1);const T=this.getValueSize();this.times=To(m,E,w),this.values=To(this.values,E*T,w*T)}return this}validate(){let n=!0;const o=this.getValueSize();o-Math.floor(o)!=0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),n=!1);const m=this.times,A=this.values,E=m.length;0===E&&(console.error("THREE.KeyframeTrack: Track is empty.",this),n=!1);let w=null;for(let T=0;T!==E;T++){const B=m[T];if("number"==typeof B&&isNaN(B)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,T,B),n=!1;break}if(null!==w&&w>B){console.error("THREE.KeyframeTrack: Out of order keys.",this,T,B,w),n=!1;break}w=B}if(void 0!==A&&h0(A))for(let T=0,B=A.length;T!==B;++T){const D=A[T];if(isNaN(D)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,T,D),n=!1;break}}return n}optimize(){const n=To(this.times),o=To(this.values),m=this.getValueSize(),A=2302===this.getInterpolation(),E=n.length-1;let w=1;for(let T=1;T<E;++T){let B=!1;const D=n[T];if(D!==n[T+1]&&(1!==T||D!==n[0]))if(A)B=!0;else{const G=T*m,H=G-m,Q=G+m;for(let Z=0;Z!==m;++Z){const he=o[G+Z];if(he!==o[H+Z]||he!==o[Q+Z]){B=!0;break}}}if(B){if(T!==w){n[w]=n[T];const G=T*m,H=w*m;for(let Q=0;Q!==m;++Q)o[H+Q]=o[G+Q]}++w}}if(E>0){n[w]=n[E];for(let T=E*m,B=w*m,D=0;D!==m;++D)o[B+D]=o[T+D];++w}return w!==n.length?(this.times=To(n,0,w),this.values=To(o,0,w*m)):(this.times=n,this.values=o),this}clone(){const n=To(this.times,0),o=To(this.values,0),A=new(0,this.constructor)(this.name,n,o);return A.createInterpolant=this.createInterpolant,A}}Yo.prototype.TimeBufferType=Float32Array,Yo.prototype.ValueBufferType=Float32Array,Yo.prototype.DefaultInterpolation=bf;class Ph extends Yo{}Ph.prototype.ValueTypeName="bool",Ph.prototype.ValueBufferType=Array,Ph.prototype.DefaultInterpolation=nh,Ph.prototype.InterpolantFactoryMethodLinear=void 0,Ph.prototype.InterpolantFactoryMethodSmooth=void 0;class p0 extends Yo{}p0.prototype.ValueTypeName="color";class yd extends Yo{}yd.prototype.ValueTypeName="number";class Lv extends vd{constructor(n,o,m,A){super(n,o,m,A)}interpolate_(n,o,m,A){const E=this.resultBuffer,w=this.sampleValues,T=this.valueSize,B=(m-o)/(A-o);let D=n*T;for(let N=D+T;D!==N;D+=4)Xs.slerpFlat(E,0,w,D-T,w,D,B);return E}}class sf extends Yo{InterpolantFactoryMethodLinear(n){return new Lv(this.times,this.values,this.getValueSize(),n)}}sf.prototype.ValueTypeName="quaternion",sf.prototype.DefaultInterpolation=bf,sf.prototype.InterpolantFactoryMethodSmooth=void 0;class Rh extends Yo{}Rh.prototype.ValueTypeName="string",Rh.prototype.ValueBufferType=Array,Rh.prototype.DefaultInterpolation=nh,Rh.prototype.InterpolantFactoryMethodLinear=void 0,Rh.prototype.InterpolantFactoryMethodSmooth=void 0;class xd extends Yo{}xd.prototype.ValueTypeName="vector";class Ed{constructor(n,o=-1,m,A=2500){this.name=n,this.tracks=m,this.duration=o,this.blendMode=A,this.uuid=Ra(),this.duration<0&&this.resetDuration()}static parse(n){const o=[],m=n.tracks,A=1/(n.fps||1);for(let w=0,T=m.length;w!==T;++w)o.push(lE(m[w]).scale(A));const E=new this(n.name,n.duration,o,n.blendMode);return E.uuid=n.uuid,E}static toJSON(n){const o=[],m=n.tracks,A={name:n.name,duration:n.duration,tracks:o,uuid:n.uuid,blendMode:n.blendMode};for(let E=0,w=m.length;E!==w;++E)o.push(Yo.toJSON(m[E]));return A}static CreateFromMorphTargetSequence(n,o,m,A){const E=o.length,w=[];for(let T=0;T<E;T++){let B=[],D=[];B.push((T+E-1)%E,T,(T+1)%E),D.push(0,1,0);const N=Pv(B);B=u0(B,1,N),D=u0(D,1,N),!A&&0===B[0]&&(B.push(E),D.push(D[0])),w.push(new yd(".morphTargetInfluences["+o[T].name+"]",B,D).scale(1/m))}return new this(n,-1,w)}static findByName(n,o){let m=n;Array.isArray(n)||(m=n.geometry&&n.geometry.animations||n.animations);for(let A=0;A<m.length;A++)if(m[A].name===o)return m[A];return null}static CreateClipsFromMorphTargetSequences(n,o,m){const A={},E=/^([\w-]*?)([\d]+)$/;for(let T=0,B=n.length;T<B;T++){const D=n[T],N=D.name.match(E);if(N&&N.length>1){const G=N[1];let H=A[G];H||(A[G]=H=[]),H.push(D)}}const w=[];for(const T in A)w.push(this.CreateFromMorphTargetSequence(T,A[T],o,m));return w}static parseAnimation(n,o){if(!n)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;const m=function(G,H,Q,Z,he){if(0!==Q.length){const J=[],Y=[];f0(Q,J,Y,Z),0!==J.length&&he.push(new G(H,J,Y))}},A=[],E=n.name||"default",w=n.fps||30,T=n.blendMode;let B=n.length||-1;const D=n.hierarchy||[];for(let G=0;G<D.length;G++){const H=D[G].keys;if(H&&0!==H.length)if(H[0].morphTargets){const Q={};let Z;for(Z=0;Z<H.length;Z++)if(H[Z].morphTargets)for(let he=0;he<H[Z].morphTargets.length;he++)Q[H[Z].morphTargets[he]]=-1;for(const he in Q){const J=[],Y=[];for(let ve=0;ve!==H[Z].morphTargets.length;++ve){const pe=H[Z];J.push(pe.time),Y.push(pe.morphTarget===he?1:0)}A.push(new yd(".morphTargetInfluence["+he+"]",J,Y))}B=Q.length*w}else{const Q=".bones["+o[G].name+"]";m(xd,Q+".position",H,"pos",A),m(sf,Q+".quaternion",H,"rot",A),m(xd,Q+".scale",H,"scl",A)}}return 0===A.length?null:new this(E,B,A,T)}resetDuration(){let o=0;for(let m=0,A=this.tracks.length;m!==A;++m){const E=this.tracks[m];o=Math.max(o,E.times[E.times.length-1])}return this.duration=o,this}trim(){for(let n=0;n<this.tracks.length;n++)this.tracks[n].trim(0,this.duration);return this}validate(){let n=!0;for(let o=0;o<this.tracks.length;o++)n=n&&this.tracks[o].validate();return n}optimize(){for(let n=0;n<this.tracks.length;n++)this.tracks[n].optimize();return this}clone(){const n=[];for(let o=0;o<this.tracks.length;o++)n.push(this.tracks[o].clone());return new this.constructor(this.name,this.duration,n,this.blendMode)}toJSON(){return this.constructor.toJSON(this)}}function lE(b){if(void 0===b.type)throw new Error("THREE.KeyframeTrack: track type undefined, can not parse");const n=function oE(b){switch(b.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return yd;
vendor: 9,593 bytes, line 83
83case"vector":case"vector2":case"vector3":case"vector4":return xd;case"color":return p0;case"quaternion":return sf;case"bool":case"boolean":return Ph;case"string":return Rh}throw new Error("THREE.KeyframeTrack: Unsupported typeName: "+b)}(b.type);if(void 0===b.times){const o=[],m=[];f0(b.keys,o,m,"value"),b.times=o,b.values=m}return void 0!==n.parse?n.parse(b):new n(b.name,b.times,b.values,b.interpolation)}const Bh={enabled:!1,files:{},add:function(b,n){!1!==this.enabled&&(this.files[b]=n)},get:function(b){if(!1!==this.enabled)return this.files[b]},remove:function(b){delete this.files[b]},clear:function(){this.files={}}};class m0{constructor(n,o,m){const A=this;let B,E=!1,w=0,T=0;const D=[];this.onStart=void 0,this.onLoad=n,this.onProgress=o,this.onError=m,this.itemStart=function(N){T++,!1===E&&void 0!==A.onStart&&A.onStart(N,w,T),E=!0},this.itemEnd=function(N){w++,void 0!==A.onProgress&&A.onProgress(N,w,T),w===T&&(E=!1,void 0!==A.onLoad&&A.onLoad())},this.itemError=function(N){void 0!==A.onError&&A.onError(N)},this.resolveURL=function(N){return B?B(N):N},this.setURLModifier=function(N){return B=N,this},this.addHandler=function(N,G){return D.push(N,G),this},this.removeHandler=function(N){const G=D.indexOf(N);return-1!==G&&D.splice(G,2),this},this.getHandler=function(N){for(let G=0,H=D.length;G<H;G+=2){const Q=D[G],Z=D[G+1];if(Q.global&&(Q.lastIndex=0),Q.test(N))return Z}return null}}}const Dv=new m0;class io{constructor(n){this.manager=void 0!==n?n:Dv,this.crossOrigin="anonymous",this.withCredentials=!1,this.path="",this.resourcePath="",this.requestHeader={}}load(){}loadAsync(n,o){const m=this;return new Promise(function(A,E){m.load(n,A,o,E)})}parse(){}setCrossOrigin(n){return this.crossOrigin=n,this}setWithCredentials(n){return this.withCredentials=n,this}setPath(n){return this.path=n,this}setResourcePath(n){return this.resourcePath=n,this}setRequestHeader(n){return this.requestHeader=n,this}}const ic={};class cE extends Error{constructor(n,o){super(n),this.response=o}}class rc extends io{constructor(n){super(n)}load(n,o,m,A){void 0===n&&(n=""),void 0!==this.path&&(n=this.path+n),n=this.manager.resolveURL(n);const E=Bh.get(n);if(void 0!==E)return this.manager.itemStart(n),setTimeout(()=>{o&&o(E),this.manager.itemEnd(n)},0),E;if(void 0!==ic[n])return void ic[n].push({onLoad:o,onProgress:m,onError:A});ic[n]=[],ic[n].push({onLoad:o,onProgress:m,onError:A});const w=new Request(n,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),T=this.mimeType,B=this.responseType;fetch(w).then(D=>{if(200===D.status||0===D.status){if(0===D.status&&console.warn("THREE.FileLoader: HTTP Status 0 received."),typeof ReadableStream>"u"||void 0===D.body||void 0===D.body.getReader)return D;const N=ic[n],G=D.body.getReader(),H=D.headers.get("Content-Length")||D.headers.get("X-File-Size"),Q=H?parseInt(H):0,Z=0!==Q;let he=0;const J=new ReadableStream({start(Y){!function ve(){G.read().then(({done:pe,value:Ae})=>{if(pe)Y.close();else{he+=Ae.byteLength;const Ie=new ProgressEvent("progress",{lengthComputable:Z,loaded:he,total:Q});for(let Ne=0,Xe=N.length;Ne<Xe;Ne++){const Qe=N[Ne];Qe.onProgress&&Qe.onProgress(Ie)}Y.enqueue(Ae),ve()}})}()}});return new Response(J)}throw new cE(`fetch for "${D.url}" responded with ${D.status}: ${D.statusText}`,D)}).then(D=>{switch(B){case"arraybuffer":return D.arrayBuffer();case"blob":return D.blob();case"document":return D.text().then(N=>(new DOMParser).parseFromString(N,T));case"json":return D.json();default:if(void 0===T)return D.text();{const G=/charset="?([^;"\s]*)"?/i.exec(T),H=G&&G[1]?G[1].toLowerCase():void 0,Q=new TextDecoder(H);return D.arrayBuffer().then(Z=>Q.decode(Z))}}}).then(D=>{Bh.add(n,D);const N=ic[n];delete ic[n];for(let G=0,H=N.length;G<H;G++){const Q=N[G];Q.onLoad&&Q.onLoad(D)}}).catch(D=>{const N=ic[n];if(void 0===N)throw this.manager.itemError(n),D;delete ic[n];for(let G=0,H=N.length;G<H;G++){const Q=N[G];Q.onError&&Q.onError(D)}this.manager.itemError(n)}).finally(()=>{this.manager.itemEnd(n)}),this.manager.itemStart(n)}setResponseType(n){return this.responseType=n,this}setMimeType(n){return this.mimeType=n,this}}class bd extends io{constructor(n){super(n)}load(n,o,m,A){void 0!==this.path&&(n=this.path+n),n=this.manager.resolveURL(n);const E=this,w=Bh.get(n);if(void 0!==w)return E.manager.itemStart(n),setTimeout(function(){o&&o(w),E.manager.itemEnd(n)},0),w;const T=ah("img");function B(){N(),Bh.add(n,this),o&&o(this),E.manager.itemEnd(n)}function D(G){N(),A&&A(G),E.manager.itemError(n),E.manager.itemEnd(n)}function N(){T.removeEventListener("load",B,!1),T.removeEventListener("error",D,!1)}return T.addEventListener("load",B,!1),T.addEventListener("error",D,!1),"data:"!==n.slice(0,5)&&void 0!==this.crossOrigin&&(T.crossOrigin=this.crossOrigin),E.manager.itemStart(n),T.src=n,T}}class zc extends Fr{constructor(n,o=1){super(),this.isLight=!0,this.type="Light",this.color=new Dn(n),this.intensity=o}dispose(){}copy(n,o){return super.copy(n,o),this.color.copy(n.color),this.intensity=n.intensity,this}toJSON(n){const o=super.toJSON(n);return o.object.color=this.color.getHex(),o.object.intensity=this.intensity,void 0!==this.groundColor&&(o.object.groundColor=this.groundColor.getHex()),void 0!==this.distance&&(o.object.distance=this.distance),void 0!==this.angle&&(o.object.angle=this.angle),void 0!==this.decay&&(o.object.decay=this.decay),void 0!==this.penumbra&&(o.object.penumbra=this.penumbra),void 0!==this.shadow&&(o.object.shadow=this.shadow.toJSON()),o}}class Fv extends zc{constructor(n,o,m){super(n,m),this.isHemisphereLight=!0,this.type="HemisphereLight",this.position.copy(Fr.DEFAULT_UP),this.updateMatrix(),this.groundColor=new Dn(o)}copy(n,o){return super.copy(n,o),this.groundColor.copy(n.groundColor),this}}const g0=new Ti,kv=new De,Ov=new De;class A0{constructor(n){this.camera=n,this.bias=0,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new qt(512,512),this.map=null,this.mapPass=null,this.matrix=new Ti,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new bp,this._frameExtents=new qt(1,1),this._viewportCount=1,this._viewports=[new fr(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(n){const o=this.camera,m=this.matrix;kv.setFromMatrixPosition(n.matrixWorld),o.position.copy(kv),Ov.setFromMatrixPosition(n.target.matrixWorld),o.lookAt(Ov),o.updateMatrixWorld(),g0.multiplyMatrices(o.projectionMatrix,o.matrixWorldInverse),this._frustum.setFromProjectionMatrix(g0),m.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),m.multiply(g0)}getViewport(n){return this._viewports[n]}getFrameExtents(){return this._frameExtents}dispose(){this.map&&this.map.dispose(),this.mapPass&&this.mapPass.dispose()}copy(n){return this.camera=n.camera.clone(),this.bias=n.bias,this.radius=n.radius,this.mapSize.copy(n.mapSize),this}clone(){return(new this.constructor).copy(this)}toJSON(){const n={};return 0!==this.bias&&(n.bias=this.bias),0!==this.normalBias&&(n.normalBias=this.normalBias),1!==this.radius&&(n.radius=this.radius),(512!==this.mapSize.x||512!==this.mapSize.y)&&(n.mapSize=this.mapSize.toArray()),n.camera=this.camera.toJSON(!1).object,delete n.camera.matrix,n}}class mE extends A0{constructor(){super(new $s(50,1,.5,500)),this.isSpotLightShadow=!0,this.focus=1}updateMatrices(n){const o=this.camera,m=2*rh*n.angle*this.focus,A=this.mapSize.width/this.mapSize.height,E=n.distance||o.far;(m!==o.fov||A!==o.aspect||E!==o.far)&&(o.fov=m,o.aspect=A,o.far=E,o.updateProjectionMatrix()),super.updateMatrices(n)}copy(n){return super.copy(n),this.focus=n.focus,this}}class Nv extends zc{constructor(n,o,m=0,A=Math.PI/3,E=0,w=2){super(n,o),this.isSpotLight=!0,this.type="SpotLight",this.position.copy(Fr.DEFAULT_UP),this.updateMatrix(),this.target=new Fr,this.distance=m,this.angle=A,this.penumbra=E,this.decay=w,this.map=null,this.shadow=new mE}get power(){return this.intensity*Math.PI}set power(n){this.intensity=n/Math.PI}dispose(){this.shadow.dispose()}copy(n,o){return super.copy(n,o),this.distance=n.distance,this.angle=n.angle,this.penumbra=n.penumbra,this.decay=n.decay,this.target=n.target.clone(),this.shadow=n.shadow.clone(),this}}const Uv=new Ti,Sd=new De,_0=new De;class gE extends A0{constructor(){super(new $s(90,1,.5,500)),this.isPointLightShadow=!0,this._frameExtents=new qt(4,2),this._viewportCount=6,this._viewports=[new fr(2,1,1,1),new fr(0,1,1,1),new fr(3,1,1,1),new fr(1,1,1,1),new fr(3,0,1,1),new fr(1,0,1,1)],this._cubeDirections=[new De(1,0,0),new De(-1,0,0),new De(0,0,1),new De(0,0,-1),new De(0,1,0),new De(0,-1,0)],this._cubeUps=[new De(0,1,0),new De(0,1,0),new De(0,1,0),new De(0,1,0),new De(0,0,1),new De(0,0,-1)]}updateMatrices(n,o=0){const m=this.camera,A=this.matrix,E=n.distance||m.far;E!==m.far&&(m.far=E,m.updateProjectionMatrix()),Sd.setFromMatrixPosition(n.matrixWorld),m.position.copy(Sd),_0.copy(m.position),_0.add(this._cubeDirections[o]),m.up.copy(this._cubeUps[o]),m.lookAt(_0),m.updateMatrixWorld(),A.makeTranslation(-Sd.x,-Sd.y,-Sd.z),Uv.multiplyMatrices(m.projectionMatrix,m.matrixWorldInverse),this._frustum.setFromProjectionMatrix(Uv)}}class zv extends zc{constructor(n,o,m=0,A=2){super(n,o),this.isPointLight=!0,this.type="PointLight",this.distance=m,this.decay=A,this.shadow=new gE}get power(){return 4*this.intensity*Math.PI}set power(n){this.intensity=n/(4*Math.PI)}dispose(){this.shadow.dispose()}copy(n,o){return super.copy(n,o),this.distance=n.distance,this.decay=n.decay,this.shadow=n.shadow.clone(),this}}class AE extends A0{constructor(){super(new Cc(-5,5,5,-5,.5,500)),this.isDirectionalLightShadow=!0}
vendor: 12,475 bytes, line 83
83}class Gv extends zc{constructor(n,o){super(n,o),this.isDirectionalLight=!0,this.type="DirectionalLight",this.position.copy(Fr.DEFAULT_UP),this.updateMatrix(),this.target=new Fr,this.shadow=new AE}dispose(){this.shadow.dispose()}copy(n){return super.copy(n),this.target=n.target.clone(),this.shadow=n.shadow.clone(),this}}class Vv extends zc{constructor(n,o){super(n,o),this.isAmbientLight=!0,this.type="AmbientLight"}}class Hv extends zc{constructor(n,o,m=10,A=10){super(n,o),this.isRectAreaLight=!0,this.type="RectAreaLight",this.width=m,this.height=A}get power(){return this.intensity*this.width*this.height*Math.PI}set power(n){this.intensity=n/(this.width*this.height*Math.PI)}copy(n){return super.copy(n),this.width=n.width,this.height=n.height,this}toJSON(n){const o=super.toJSON(n);return o.object.width=this.width,o.object.height=this.height,o}}class Qv{constructor(){this.isSphericalHarmonics3=!0,this.coefficients=[];for(let n=0;n<9;n++)this.coefficients.push(new De)}set(n){for(let o=0;o<9;o++)this.coefficients[o].copy(n[o]);return this}zero(){for(let n=0;n<9;n++)this.coefficients[n].set(0,0,0);return this}getAt(n,o){const m=n.x,A=n.y,E=n.z,w=this.coefficients;return o.copy(w[0]).multiplyScalar(.282095),o.addScaledVector(w[1],.488603*A),o.addScaledVector(w[2],.488603*E),o.addScaledVector(w[3],.488603*m),o.addScaledVector(w[4],m*A*1.092548),o.addScaledVector(w[5],A*E*1.092548),o.addScaledVector(w[6],.315392*(3*E*E-1)),o.addScaledVector(w[7],m*E*1.092548),o.addScaledVector(w[8],.546274*(m*m-A*A)),o}getIrradianceAt(n,o){const m=n.x,A=n.y,E=n.z,w=this.coefficients;return o.copy(w[0]).multiplyScalar(.886227),o.addScaledVector(w[1],1.023328*A),o.addScaledVector(w[2],1.023328*E),o.addScaledVector(w[3],1.023328*m),o.addScaledVector(w[4],.858086*m*A),o.addScaledVector(w[5],.858086*A*E),o.addScaledVector(w[6],.743125*E*E-.247708),o.addScaledVector(w[7],.858086*m*E),o.addScaledVector(w[8],.429043*(m*m-A*A)),o}add(n){for(let o=0;o<9;o++)this.coefficients[o].add(n.coefficients[o]);return this}addScaledSH(n,o){for(let m=0;m<9;m++)this.coefficients[m].addScaledVector(n.coefficients[m],o);return this}scale(n){for(let o=0;o<9;o++)this.coefficients[o].multiplyScalar(n);return this}lerp(n,o){for(let m=0;m<9;m++)this.coefficients[m].lerp(n.coefficients[m],o);return this}equals(n){for(let o=0;o<9;o++)if(!this.coefficients[o].equals(n.coefficients[o]))return!1;return!0}copy(n){return this.set(n.coefficients)}clone(){return(new this.constructor).copy(this)}fromArray(n,o=0){const m=this.coefficients;for(let A=0;A<9;A++)m[A].fromArray(n,o+3*A);return this}toArray(n=[],o=0){const m=this.coefficients;for(let A=0;A<9;A++)m[A].toArray(n,o+3*A);return n}static getBasisAt(n,o){const m=n.x,A=n.y,E=n.z;o[0]=.282095,o[1]=.488603*A,o[2]=.488603*E,o[3]=.488603*m,o[4]=1.092548*m*A,o[5]=1.092548*A*E,o[6]=.315392*(3*E*E-1),o[7]=1.092548*m*E,o[8]=.546274*(m*m-A*A)}}class sm extends zc{constructor(n=new Qv,o=1){super(void 0,o),this.isLightProbe=!0,this.sh=n}copy(n){return super.copy(n),this.sh.copy(n.sh),this}fromJSON(n){return this.intensity=n.intensity,this.sh.fromArray(n.sh),this}toJSON(n){const o=super.toJSON(n);return o.object.sh=this.sh.toArray(),o}}class am extends io{constructor(n){super(n),this.textures={}}load(n,o,m,A){const E=this,w=new rc(E.manager);w.setPath(E.path),w.setRequestHeader(E.requestHeader),w.setWithCredentials(E.withCredentials),w.load(n,function(T){try{o(E.parse(JSON.parse(T)))}catch(B){A?A(B):console.error(B),E.manager.itemError(n)}},m,A)}parse(n){const o=this.textures;function m(E){return void 0===o[E]&&console.warn("THREE.MaterialLoader: Undefined texture",E),o[E]}const A=am.createMaterialFromType(n.type);if(void 0!==n.uuid&&(A.uuid=n.uuid),void 0!==n.name&&(A.name=n.name),void 0!==n.color&&void 0!==A.color&&A.color.setHex(n.color),void 0!==n.roughness&&(A.roughness=n.roughness),void 0!==n.metalness&&(A.metalness=n.metalness),void 0!==n.sheen&&(A.sheen=n.sheen),void 0!==n.sheenColor&&(A.sheenColor=(new Dn).setHex(n.sheenColor)),void 0!==n.sheenRoughness&&(A.sheenRoughness=n.sheenRoughness),void 0!==n.emissive&&void 0!==A.emissive&&A.emissive.setHex(n.emissive),void 0!==n.specular&&void 0!==A.specular&&A.specular.setHex(n.specular),void 0!==n.specularIntensity&&(A.specularIntensity=n.specularIntensity),void 0!==n.specularColor&&void 0!==A.specularColor&&A.specularColor.setHex(n.specularColor),void 0!==n.shininess&&(A.shininess=n.shininess),void 0!==n.clearcoat&&(A.clearcoat=n.clearcoat),void 0!==n.clearcoatRoughness&&(A.clearcoatRoughness=n.clearcoatRoughness),void 0!==n.iridescence&&(A.iridescence=n.iridescence),void 0!==n.iridescenceIOR&&(A.iridescenceIOR=n.iridescenceIOR),void 0!==n.iridescenceThicknessRange&&(A.iridescenceThicknessRange=n.iridescenceThicknessRange),void 0!==n.transmission&&(A.transmission=n.transmission),void 0!==n.thickness&&(A.thickness=n.thickness),void 0!==n.attenuationDistance&&(A.attenuationDistance=n.attenuationDistance),void 0!==n.attenuationColor&&void 0!==A.attenuationColor&&A.attenuationColor.setHex(n.attenuationColor),void 0!==n.fog&&(A.fog=n.fog),void 0!==n.flatShading&&(A.flatShading=n.flatShading),void 0!==n.blending&&(A.blending=n.blending),void 0!==n.combine&&(A.combine=n.combine),void 0!==n.side&&(A.side=n.side),void 0!==n.shadowSide&&(A.shadowSide=n.shadowSide),void 0!==n.opacity&&(A.opacity=n.opacity),void 0!==n.transparent&&(A.transparent=n.transparent),void 0!==n.alphaTest&&(A.alphaTest=n.alphaTest),void 0!==n.depthTest&&(A.depthTest=n.depthTest),void 0!==n.depthWrite&&(A.depthWrite=n.depthWrite),void 0!==n.colorWrite&&(A.colorWrite=n.colorWrite),void 0!==n.stencilWrite&&(A.stencilWrite=n.stencilWrite),void 0!==n.stencilWriteMask&&(A.stencilWriteMask=n.stencilWriteMask),void 0!==n.stencilFunc&&(A.stencilFunc=n.stencilFunc),void 0!==n.stencilRef&&(A.stencilRef=n.stencilRef),void 0!==n.stencilFuncMask&&(A.stencilFuncMask=n.stencilFuncMask),void 0!==n.stencilFail&&(A.stencilFail=n.stencilFail),void 0!==n.stencilZFail&&(A.stencilZFail=n.stencilZFail),void 0!==n.stencilZPass&&(A.stencilZPass=n.stencilZPass),void 0!==n.wireframe&&(A.wireframe=n.wireframe),void 0!==n.wireframeLinewidth&&(A.wireframeLinewidth=n.wireframeLinewidth),void 0!==n.wireframeLinecap&&(A.wireframeLinecap=n.wireframeLinecap),void 0!==n.wireframeLinejoin&&(A.wireframeLinejoin=n.wireframeLinejoin),void 0!==n.rotation&&(A.rotation=n.rotation),1!==n.linewidth&&(A.linewidth=n.linewidth),void 0!==n.dashSize&&(A.dashSize=n.dashSize),void 0!==n.gapSize&&(A.gapSize=n.gapSize),void 0!==n.scale&&(A.scale=n.scale),void 0!==n.polygonOffset&&(A.polygonOffset=n.polygonOffset),void 0!==n.polygonOffsetFactor&&(A.polygonOffsetFactor=n.polygonOffsetFactor),void 0!==n.polygonOffsetUnits&&(A.polygonOffsetUnits=n.polygonOffsetUnits),void 0!==n.dithering&&(A.dithering=n.dithering),void 0!==n.alphaToCoverage&&(A.alphaToCoverage=n.alphaToCoverage),void 0!==n.premultipliedAlpha&&(A.premultipliedAlpha=n.premultipliedAlpha),void 0!==n.forceSinglePass&&(A.forceSinglePass=n.forceSinglePass),void 0!==n.visible&&(A.visible=n.visible),void 0!==n.toneMapped&&(A.toneMapped=n.toneMapped),void 0!==n.userData&&(A.userData=n.userData),void 0!==n.vertexColors&&(A.vertexColors="number"==typeof n.vertexColors?n.vertexColors>0:n.vertexColors),void 0!==n.uniforms)for(const E in n.uniforms){const w=n.uniforms[E];switch(A.uniforms[E]={},w.type){case"t":A.uniforms[E].value=m(w.value);break;case"c":A.uniforms[E].value=(new Dn).setHex(w.value);break;case"v2":A.uniforms[E].value=(new qt).fromArray(w.value);break;case"v3":A.uniforms[E].value=(new De).fromArray(w.value);break;case"v4":A.uniforms[E].value=(new fr).fromArray(w.value);break;case"m3":A.uniforms[E].value=(new Di).fromArray(w.value);break;case"m4":A.uniforms[E].value=(new Ti).fromArray(w.value);break;default:A.uniforms[E].value=w.value}}if(void 0!==n.defines&&(A.defines=n.defines),void 0!==n.vertexShader&&(A.vertexShader=n.vertexShader),void 0!==n.fragmentShader&&(A.fragmentShader=n.fragmentShader),void 0!==n.glslVersion&&(A.glslVersion=n.glslVersion),void 0!==n.extensions)for(const E in n.extensions)A.extensions[E]=n.extensions[E];if(void 0!==n.size&&(A.size=n.size),void 0!==n.sizeAttenuation&&(A.sizeAttenuation=n.sizeAttenuation),void 0!==n.map&&(A.map=m(n.map)),void 0!==n.matcap&&(A.matcap=m(n.matcap)),void 0!==n.alphaMap&&(A.alphaMap=m(n.alphaMap)),void 0!==n.bumpMap&&(A.bumpMap=m(n.bumpMap)),void 0!==n.bumpScale&&(A.bumpScale=n.bumpScale),void 0!==n.normalMap&&(A.normalMap=m(n.normalMap)),void 0!==n.normalMapType&&(A.normalMapType=n.normalMapType),void 0!==n.normalScale){let E=n.normalScale;!1===Array.isArray(E)&&(E=[E,E]),A.normalScale=(new qt).fromArray(E)}return void 0!==n.displacementMap&&(A.displacementMap=m(n.displacementMap)),void 0!==n.displacementScale&&(A.displacementScale=n.displacementScale),void 0!==n.displacementBias&&(A.displacementBias=n.displacementBias),void 0!==n.roughnessMap&&(A.roughnessMap=m(n.roughnessMap)),void 0!==n.metalnessMap&&(A.metalnessMap=m(n.metalnessMap)),void 0!==n.emissiveMap&&(A.emissiveMap=m(n.emissiveMap)),void 0!==n.emissiveIntensity&&(A.emissiveIntensity=n.emissiveIntensity),void 0!==n.specularMap&&(A.specularMap=m(n.specularMap)),void 0!==n.specularIntensityMap&&(A.specularIntensityMap=m(n.specularIntensityMap)),void 0!==n.specularColorMap&&(A.specularColorMap=m(n.specularColorMap)),void 0!==n.envMap&&(A.envMap=m(n.envMap)),void 0!==n.envMapIntensity&&(A.envMapIntensity=n.envMapIntensity),void 0!==n.reflectivity&&(A.reflectivity=n.reflectivity),void 0!==n.refractionRatio&&(A.refractionRatio=n.refractionRatio),void 0!==n.lightMap&&(A.lightMap=m(n.lightMap)),void 0!==n.lightMapIntensity&&(A.lightMapIntensity=n.lightMapIntensity),void 0!==n.aoMap&&(A.aoMap=m(n.aoMap)),void 0!==n.aoMapIntensity&&(A.aoMapIntensity=n.aoMapIntensity),void 0!==n.gradientMap&&(A.gradientMap=m(n.gradientMap)),void 0!==n.clearcoatMap&&(A.clearcoatMap=m(n.clearcoatMap)),void 0!==n.clearcoatRoughnessMap&&(A.clearcoatRoughnessMap=m(n.clearcoatRoughnessMap)),void 0!==n.clearcoatNormalMap&&(A.clearcoatNormalMap=m(n.clearcoatNormalMap)),void 0!==n.clearcoatNormalScale&&(A.clearcoatNormalScale=(new qt).fromArray(n.clearcoatNormalScale)),void 0!==n.iridescenceMap&&(A.iridescenceMap=m(n.iridescenceMap)),void 0!==n.iridescenceThicknessMap&&(A.iridescenceThicknessMap=m(n.iridescenceThicknessMap)),void 0!==n.transmissionMap&&(A.transmissionMap=m(n.transmissionMap)),void 0!==n.thicknessMap&&(A.thicknessMap=m(n.thicknessMap)),void 0!==n.sheenColorMap&&(A.sheenColorMap=m(n.sheenColorMap)),void 0!==n.sheenRoughnessMap&&(A.sheenRoughnessMap=m(n.sheenRoughnessMap)),A}setTextures(n){return this.textures=n,this}static createMaterialFromType(n){return new{ShadowMaterial:wv,SpriteMaterial:la,RawShaderMaterial:Co,ShaderMaterial:hl,PointsMaterial:Xu,MeshPhysicalMaterial:_d,MeshStandardMaterial:nc,MeshPhongMaterial:rm,MeshToonMaterial:c0,MeshNormalMaterial:Cv,MeshLambertMaterial:Th,MeshDepthMaterial:Qg,MeshDistanceMaterial:Wg,MeshBasicMaterial:po,MeshMatcapMaterial:Tv,LineDashedMaterial:Iv,LineBasicMaterial:es,Material:qs}[n]}}class v0{static decodeText(n){if(typeof TextDecoder<"u")return(new TextDecoder).decode(n);let o="";for(let m=0,A=n.length;m<A;m++)o+=String.fromCharCode(n[m]);try{return decodeURIComponent(escape(o))}catch{return o}}static extractUrlBase(n){const o=n.lastIndexOf("/");return-1===o?"./":n.slice(0,o+1)}static resolveURL(n,o){return"string"!=typeof n||""===n?"":(/^https?:\/\//i.test(o)&&/^\//.test(n)&&(o=o.replace(/(^https?:\/\/[^\/]+).*/i,"$1")),/^(https?:)?\/\//i.test(n)||/^data:.*,.*$/i.test(n)||/^blob:.*$/i.test(n)?n:o+n)}}class Wv extends Fi{constructor(){super(),this.isInstancedBufferGeometry=!0,this.type="InstancedBufferGeometry",this.instanceCount=1/0}copy(n){return super.copy(n),this.instanceCount=n.instanceCount,this}toJSON(){const n=super.toJSON();return n.instanceCount=this.instanceCount,n.isInstancedBufferGeometry=!0,n}}class Xv extends io{constructor(n){super(n)}load(n,o,m,A){const E=this,w=new rc(E.manager);w.setPath(E.path),w.setRequestHeader(E.requestHeader),w.setWithCredentials(E.withCredentials),w.load(n,function(T){try{o(E.parse(JSON.parse(T)))}catch(B){A?A(B):console.error(B),E.manager.itemError(n)}},m,A)}parse(n){const o={},m={};function A(Q,Z){if(void 0!==o[Z])return o[Z];const J=Q.interleavedBuffers[Z],Y=function E(Q,Z){if(void 0!==m[Z])return m[Z];const Y=new Uint32Array(Q.arrayBuffers[Z]).buffer;return m[Z]=Y,Y}(Q,J.buffer),ve=gc(J.type,Y),pe=new Qp(ve,J.stride);return pe.uuid=J.uuid,o[Z]=pe,pe}
vendor: 7,872 bytes, line 83
83const w=n.isInstancedBufferGeometry?new Wv:new Fi,T=n.data.index;if(void 0!==T){const Q=gc(T.type,T.array);w.setIndex(new Cr(Q,1))}const B=n.data.attributes;for(const Q in B){const Z=B[Q];let he;if(Z.isInterleavedBufferAttribute){const J=A(n.data,Z.data);he=new vh(J,Z.itemSize,Z.offset,Z.normalized)}else{const J=gc(Z.type,Z.array);he=new(Z.isInstancedBufferAttribute?bo:Cr)(J,Z.itemSize,Z.normalized)}void 0!==Z.name&&(he.name=Z.name),void 0!==Z.usage&&he.setUsage(Z.usage),void 0!==Z.updateRange&&(he.updateRange.offset=Z.updateRange.offset,he.updateRange.count=Z.updateRange.count),w.setAttribute(Q,he)}const D=n.data.morphAttributes;if(D)for(const Q in D){const Z=D[Q],he=[];for(let J=0,Y=Z.length;J<Y;J++){const ve=Z[J];let pe;if(ve.isInterleavedBufferAttribute){const Ae=A(n.data,ve.data);pe=new vh(Ae,ve.itemSize,ve.offset,ve.normalized)}else{const Ae=gc(ve.type,ve.array);pe=new Cr(Ae,ve.itemSize,ve.normalized)}void 0!==ve.name&&(pe.name=ve.name),he.push(pe)}w.morphAttributes[Q]=he}n.data.morphTargetsRelative&&(w.morphTargetsRelative=!0);const G=n.data.groups||n.data.drawcalls||n.data.offsets;if(void 0!==G)for(let Q=0,Z=G.length;Q!==Z;++Q){const he=G[Q];w.addGroup(he.start,he.count,he.materialIndex)}const H=n.data.boundingSphere;if(void 0!==H){const Q=new De;void 0!==H.center&&Q.fromArray(H.center),w.boundingSphere=new Ul(Q,H.radius)}return n.name&&(w.name=n.name),n.userData&&(w.userData=n.userData),w}}const vE={UVMapping:300,CubeReflectionMapping:ur,CubeRefractionMapping:vi,EquirectangularReflectionMapping:303,EquirectangularRefractionMapping:304,CubeUVReflectionMapping:Ls},qv={RepeatWrapping:at,ClampToEdgeWrapping:Pn,MirroredRepeatWrapping:Nr},Yv={NearestFilter:Jn,NearestMipmapNearestFilter:1004,NearestMipmapLinearFilter:lo,LinearFilter:Mi,LinearMipmapNearestFilter:1007,LinearMipmapLinearFilter:Il};let om;class y0{static getContext(){return void 0===om&&(om=new(window.AudioContext||window.webkitAudioContext)),om}static setContext(n){om=n}}const $v=new Ti,Kv=new Ti,Lh=new Ti;class Zv{constructor(n=!0){this.autoStart=n,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=jv(),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 n=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){const o=jv();n=(o-this.oldTime)/1e3,this.oldTime=o,this.elapsedTime+=n}return n}}function jv(){return(typeof performance>"u"?Date:performance).now()}const Dh=new De,Jv=new Xs,ME=new De,Fh=new De;class ey extends Fr{constructor(n){super(),this.type="Audio",this.listener=n,this.context=n.context,this.gain=this.context.createGain(),this.gain.connect(n.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(n){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=n,this.connect(),this}setMediaElementSource(n){return this.hasPlaybackControl=!1,this.sourceType="mediaNode",this.source=this.context.createMediaElementSource(n),this.connect(),this}setMediaStreamSource(n){return this.hasPlaybackControl=!1,this.sourceType="mediaStreamNode",this.source=this.context.createMediaStreamSource(n),this.connect(),this}setBuffer(n){return this.buffer=n,this.sourceType="buffer",this.autoplay&&this.play(),this}play(n=0){if(!0===this.isPlaying)return void console.warn("THREE.Audio: Audio is already playing.");if(!1===this.hasPlaybackControl)return void console.warn("THREE.Audio: this Audio has no playback control.");this._startedAt=this.context.currentTime+n;const o=this.context.createBufferSource();return o.buffer=this.buffer,o.loop=this.loop,o.loopStart=this.loopStart,o.loopEnd=this.loopEnd,o.onended=this.onEnded.bind(this),o.start(this._startedAt,this._progress+this.offset,this.duration),this.isPlaying=!0,this.source=o,this.setDetune(this.detune),this.setPlaybackRate(this.playbackRate),this.connect()}pause(){if(!1!==this.hasPlaybackControl)return!0===this.isPlaying&&(this._progress+=Math.max(this.context.currentTime-this._startedAt,0)*this.playbackRate,!0===this.loop&&(this._progress=this._progress%(this.duration||this.buffer.duration)),this.source.stop(),this.source.onended=null,this.isPlaying=!1),this;console.warn("THREE.Audio: this Audio has no playback control.")}stop(){if(!1!==this.hasPlaybackControl)return this._progress=0,null!==this.source&&(this.source.stop(),this.source.onended=null),this.isPlaying=!1,this;console.warn("THREE.Audio: this Audio has no playback control.")}connect(){if(this.filters.length>0){this.source.connect(this.filters[0]);for(let n=1,o=this.filters.length;n<o;n++)this.filters[n-1].connect(this.filters[n]);this.filters[this.filters.length-1].connect(this.getOutput())}else this.source.connect(this.getOutput());return this._connected=!0,this}disconnect(){if(this.filters.length>0){this.source.disconnect(this.filters[0]);for(let n=1,o=this.filters.length;n<o;n++)this.filters[n-1].disconnect(this.filters[n]);this.filters[this.filters.length-1].disconnect(this.getOutput())}else this.source.disconnect(this.getOutput());return this._connected=!1,this}getFilters(){return this.filters}setFilters(n){return n||(n=[]),!0===this._connected?(this.disconnect(),this.filters=n.slice(),this.connect()):this.filters=n.slice(),this}setDetune(n){if(this.detune=n,void 0!==this.source.detune)return!0===this.isPlaying&&this.source.detune.setTargetAtTime(this.detune,this.context.currentTime,.01),this}getDetune(){return this.detune}getFilter(){return this.getFilters()[0]}setFilter(n){return this.setFilters(n?[n]:[])}setPlaybackRate(n){if(!1!==this.hasPlaybackControl)return this.playbackRate=n,!0===this.isPlaying&&this.source.playbackRate.setTargetAtTime(this.playbackRate,this.context.currentTime,.01),this;console.warn("THREE.Audio: this Audio has no playback control.")}getPlaybackRate(){return this.playbackRate}onEnded(){this.isPlaying=!1}getLoop(){return!1===this.hasPlaybackControl?(console.warn("THREE.Audio: this Audio has no playback control."),!1):this.loop}setLoop(n){if(!1!==this.hasPlaybackControl)return this.loop=n,!0===this.isPlaying&&(this.source.loop=this.loop),this;console.warn("THREE.Audio: this Audio has no playback control.")}setLoopStart(n){return this.loopStart=n,this}setLoopEnd(n){return this.loopEnd=n,this}getVolume(){return this.gain.gain.value}setVolume(n){return this.gain.gain.setTargetAtTime(n,this.context.currentTime,.01),this}}const kh=new De,ty=new Xs,CE=new De,Oh=new De;class ny{constructor(n,o,m){let A,E,w;switch(this.binding=n,this.valueSize=m,o){case"quaternion":A=this._slerp,E=this._slerpAdditive,w=this._setAdditiveIdentityQuaternion,this.buffer=new Float64Array(6*m),this._workIndex=5;break;case"string":case"bool":A=this._select,E=this._select,w=this._setAdditiveIdentityOther,this.buffer=new Array(5*m);break;default:A=this._lerp,E=this._lerpAdditive,w=this._setAdditiveIdentityNumeric,this.buffer=new Float64Array(5*m)}this._mixBufferRegion=A,this._mixBufferRegionAdditive=E,this._setIdentity=w,this._origIndex=3,this._addIndex=4,this.cumulativeWeight=0,this.cumulativeWeightAdditive=0,this.useCount=0,this.referenceCount=0}accumulate(n,o){const m=this.buffer,A=this.valueSize,E=n*A+A;let w=this.cumulativeWeight;if(0===w){for(let T=0;T!==A;++T)m[E+T]=m[T];w=o}else w+=o,this._mixBufferRegion(m,E,0,o/w,A);this.cumulativeWeight=w}accumulateAdditive(n){const o=this.buffer,m=this.valueSize,A=m*this._addIndex;0===this.cumulativeWeightAdditive&&this._setIdentity(),this._mixBufferRegionAdditive(o,A,0,n,m),this.cumulativeWeightAdditive+=n}
vendor: 4,556 bytes, line 83
83apply(n){const o=this.valueSize,m=this.buffer,A=n*o+o,E=this.cumulativeWeight,w=this.cumulativeWeightAdditive,T=this.binding;this.cumulativeWeight=0,this.cumulativeWeightAdditive=0,E<1&&this._mixBufferRegion(m,A,o*this._origIndex,1-E,o),w>0&&this._mixBufferRegionAdditive(m,A,this._addIndex*o,1,o);for(let B=o,D=o+o;B!==D;++B)if(m[B]!==m[B+o]){T.setValue(m,A);break}}saveOriginalState(){const o=this.buffer,m=this.valueSize,A=m*this._origIndex;this.binding.getValue(o,A);for(let E=m,w=A;E!==w;++E)o[E]=o[A+E%m];this._setIdentity(),this.cumulativeWeight=0,this.cumulativeWeightAdditive=0}restoreOriginalState(){this.binding.setValue(this.buffer,3*this.valueSize)}_setAdditiveIdentityNumeric(){const n=this._addIndex*this.valueSize,o=n+this.valueSize;for(let m=n;m<o;m++)this.buffer[m]=0}_setAdditiveIdentityQuaternion(){this._setAdditiveIdentityNumeric(),this.buffer[this._addIndex*this.valueSize+3]=1}_setAdditiveIdentityOther(){const n=this._origIndex*this.valueSize,o=this._addIndex*this.valueSize;for(let m=0;m<this.valueSize;m++)this.buffer[o+m]=this.buffer[n+m]}_select(n,o,m,A,E){if(A>=.5)for(let w=0;w!==E;++w)n[o+w]=n[m+w]}_slerp(n,o,m,A){Xs.slerpFlat(n,o,n,o,n,m,A)}_slerpAdditive(n,o,m,A,E){const w=this._workIndex*E;Xs.multiplyQuaternionsFlat(n,w,n,o,n,m),Xs.slerpFlat(n,o,n,o,n,w,A)}_lerp(n,o,m,A,E){const w=1-A;for(let T=0;T!==E;++T){const B=o+T;n[B]=n[B]*w+n[m+T]*A}}_lerpAdditive(n,o,m,A,E){for(let w=0;w!==E;++w){const T=o+w;n[T]=n[T]+n[m+w]*A}}}const x0="\\[\\]\\.:\\/",PE=new RegExp("["+x0+"]","g"),E0="[^"+x0+"]",RE="[^"+x0.replace("\\.","")+"]",kE=new RegExp("^"+/((?:WC+[\/:])*)/.source.replace("WC",E0)+/(WCOD+)?/.source.replace("WCOD",RE)+/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",E0)+/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",E0)+"$"),OE=["material","materials","bones","map"];class NE{constructor(n,o,m){const A=m||Rr.parseTrackName(o);this._targetGroup=n,this._bindings=n.subscribe_(o,A)}getValue(n,o){this.bind();const A=this._bindings[this._targetGroup.nCachedObjects_];void 0!==A&&A.getValue(n,o)}setValue(n,o){const m=this._bindings;for(let A=this._targetGroup.nCachedObjects_,E=m.length;A!==E;++A)m[A].setValue(n,o)}bind(){const n=this._bindings;for(let o=this._targetGroup.nCachedObjects_,m=n.length;o!==m;++o)n[o].bind()}unbind(){const n=this._bindings;for(let o=this._targetGroup.nCachedObjects_,m=n.length;o!==m;++o)n[o].unbind()}}let Rr=(()=>{class b{constructor(o,m,A){this.path=m,this.parsedPath=A||b.parseTrackName(m),this.node=b.findNode(o,this.parsedPath.nodeName),this.rootNode=o,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(o,m,A){return o&&o.isAnimationObjectGroup?new b.Composite(o,m,A):new b(o,m,A)}static sanitizeNodeName(o){return o.replace(/\s/g,"_").replace(PE,"")}static parseTrackName(o){const m=kE.exec(o);if(null===m)throw new Error("PropertyBinding: Cannot parse trackName: "+o);const A={nodeName:m[2],objectName:m[3],objectIndex:m[4],propertyName:m[5],propertyIndex:m[6]},E=A.nodeName&&A.nodeName.lastIndexOf(".");if(void 0!==E&&-1!==E){const w=A.nodeName.substring(E+1);-1!==OE.indexOf(w)&&(A.nodeName=A.nodeName.substring(0,E),A.objectName=w)}if(null===A.propertyName||0===A.propertyName.length)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+o);return A}static findNode(o,m){if(void 0===m||""===m||"."===m||-1===m||m===o.name||m===o.uuid)return o;if(o.skeleton){const A=o.skeleton.getBoneByName(m);if(void 0!==A)return A}if(o.children){const A=function(w){for(let T=0;T<w.length;T++){const B=w[T];if(B.name===m||B.uuid===m)return B;const D=A(B.children);if(D)return D}return null},E=A(o.children);if(E)return E}return null}_getValue_unavailable(){}_setValue_unavailable(){}_getValue_direct(o,m){o[m]=this.targetObject[this.propertyName]}_getValue_array(o,m){const A=this.resolvedProperty;for(let E=0,w=A.length;E!==w;++E)o[m++]=A[E]}_getValue_arrayElement(o,m){o[m]=this.resolvedProperty[this.propertyIndex]}_getValue_toArray(o,m){this.resolvedProperty.toArray(o,m)}_setValue_direct(o,m){this.targetObject[this.propertyName]=o[m]}_setValue_direct_setNeedsUpdate(o,m){this.targetObject[this.propertyName]=o[m],this.targetObject.needsUpdate=!0}_setValue_direct_setMatrixWorldNeedsUpdate(o,m){this.targetObject[this.propertyName]=o[m],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_array(o,m){const A=this.resolvedProperty;for(let E=0,w=A.length;E!==w;++E)A[E]=o[m++]}_setValue_array_setNeedsUpdate(o,m){const A=this.resolvedProperty;for(let E=0,w=A.length;E!==w;++E)A[E]=o[m++];this.targetObject.needsUpdate=!0}
vendor: 4,439 bytes, line 83
83_setValue_array_setMatrixWorldNeedsUpdate(o,m){const A=this.resolvedProperty;for(let E=0,w=A.length;E!==w;++E)A[E]=o[m++];this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_arrayElement(o,m){this.resolvedProperty[this.propertyIndex]=o[m]}_setValue_arrayElement_setNeedsUpdate(o,m){this.resolvedProperty[this.propertyIndex]=o[m],this.targetObject.needsUpdate=!0}_setValue_arrayElement_setMatrixWorldNeedsUpdate(o,m){this.resolvedProperty[this.propertyIndex]=o[m],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_fromArray(o,m){this.resolvedProperty.fromArray(o,m)}_setValue_fromArray_setNeedsUpdate(o,m){this.resolvedProperty.fromArray(o,m),this.targetObject.needsUpdate=!0}_setValue_fromArray_setMatrixWorldNeedsUpdate(o,m){this.resolvedProperty.fromArray(o,m),this.targetObject.matrixWorldNeedsUpdate=!0}_getValue_unbound(o,m){this.bind(),this.getValue(o,m)}_setValue_unbound(o,m){this.bind(),this.setValue(o,m)}bind(){let o=this.node;const m=this.parsedPath,A=m.objectName,E=m.propertyName;let w=m.propertyIndex;if(o||(o=b.findNode(this.rootNode,m.nodeName),this.node=o),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,!o)return void console.error("THREE.PropertyBinding: Trying to update node for track: "+this.path+" but it wasn't found.");if(A){let N=m.objectIndex;switch(A){case"materials":if(!o.material)return void console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);if(!o.material.materials)return void console.error("THREE.PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.",this);o=o.material.materials;break;case"bones":if(!o.skeleton)return void console.error("THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.",this);o=o.skeleton.bones;for(let G=0;G<o.length;G++)if(o[G].name===N){N=G;break}break;case"map":if("map"in o){o=o.map;break}if(!o.material)return void console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);if(!o.material.map)return void console.error("THREE.PropertyBinding: Can not bind to material.map as node.material does not have a map.",this);o=o.material.map;break;default:if(void 0===o[A])return void console.error("THREE.PropertyBinding: Can not bind to objectName of node undefined.",this);o=o[A]}if(void 0!==N){if(void 0===o[N])return void console.error("THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,o);o=o[N]}}const T=o[E];if(void 0===T)return void console.error("THREE.PropertyBinding: Trying to update property for track: "+m.nodeName+"."+E+" but it wasn't found.",o);let B=this.Versioning.None;this.targetObject=o,void 0!==o.needsUpdate?B=this.Versioning.NeedsUpdate:void 0!==o.matrixWorldNeedsUpdate&&(B=this.Versioning.MatrixWorldNeedsUpdate);let D=this.BindingType.Direct;if(void 0!==w){if("morphTargetInfluences"===E){if(!o.geometry)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.",this);if(!o.geometry.morphAttributes)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.",this);void 0!==o.morphTargetDictionary[w]&&(w=o.morphTargetDictionary[w])}D=this.BindingType.ArrayElement,this.resolvedProperty=T,this.propertyIndex=w}else void 0!==T.fromArray&&void 0!==T.toArray?(D=this.BindingType.HasFromToArray,this.resolvedProperty=T):Array.isArray(T)?(D=this.BindingType.EntireArray,this.resolvedProperty=T):this.propertyName=E;this.getValue=this.GetterByBindingType[D],this.setValue=this.SetterByBindingTypeAndVersioning[D][B]}unbind(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}}return b.Composite=NE,b})();Rr.prototype.BindingType={Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3},Rr.prototype.Versioning={None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2},Rr.prototype.GetterByBindingType=[Rr.prototype._getValue_direct,Rr.prototype._getValue_array,Rr.prototype._getValue_arrayElement,Rr.prototype._getValue_toArray],Rr.prototype.SetterByBindingTypeAndVersioning=[[Rr.prototype._setValue_direct,Rr.prototype._setValue_direct_setNeedsUpdate,Rr.prototype._setValue_direct_setMatrixWorldNeedsUpdate],[Rr.prototype._setValue_array,Rr.prototype._setValue_array_setNeedsUpdate,Rr.prototype._setValue_array_setMatr
vendor: 6,078 bytes, line 83
83ixWorldNeedsUpdate],[Rr.prototype._setValue_arrayElement,Rr.prototype._setValue_arrayElement_setNeedsUpdate,Rr.prototype._setValue_arrayElement_setMatrixWorldNeedsUpdate],[Rr.prototype._setValue_fromArray,Rr.prototype._setValue_fromArray_setNeedsUpdate,Rr.prototype._setValue_fromArray_setMatrixWorldNeedsUpdate]];class UE{constructor(n,o,m=null,A=o.blendMode){this._mixer=n,this._clip=o,this._localRoot=m,this.blendMode=A;const E=o.tracks,w=E.length,T=new Array(w),B={endingStart:co,endingEnd:co};for(let D=0;D!==w;++D){const N=E[D].createInterpolant(null);T[D]=N,N.settings=B}this._interpolantSettings=B,this._interpolants=T,this._propertyBindings=new Array(w),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=2201,this._loopCount=-1,this._startTime=null,this.time=0,this.timeScale=1,this._effectiveTimeScale=1,this.weight=1,this._effectiveWeight=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtStart=!0,this.zeroSlopeAtEnd=!0}play(){return this._mixer._activateAction(this),this}stop(){return this._mixer._deactivateAction(this),this.reset()}reset(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()}isRunning(){return this.enabled&&!this.paused&&0!==this.timeScale&&null===this._startTime&&this._mixer._isActiveAction(this)}isScheduled(){return this._mixer._isActiveAction(this)}startAt(n){return this._startTime=n,this}setLoop(n,o){return this.loop=n,this.repetitions=o,this}setEffectiveWeight(n){return this.weight=n,this._effectiveWeight=this.enabled?n:0,this.stopFading()}getEffectiveWeight(){return this._effectiveWeight}fadeIn(n){return this._scheduleFading(n,0,1)}fadeOut(n){return this._scheduleFading(n,1,0)}crossFadeFrom(n,o,m){if(n.fadeOut(o),this.fadeIn(o),m){const A=this._clip.duration,E=n._clip.duration,T=A/E;n.warp(1,E/A,o),this.warp(T,1,o)}return this}crossFadeTo(n,o,m){return n.crossFadeFrom(this,o,m)}stopFading(){const n=this._weightInterpolant;return null!==n&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(n)),this}setEffectiveTimeScale(n){return this.timeScale=n,this._effectiveTimeScale=this.paused?0:n,this.stopWarping()}getEffectiveTimeScale(){return this._effectiveTimeScale}setDuration(n){return this.timeScale=this._clip.duration/n,this.stopWarping()}syncWith(n){return this.time=n.time,this.timeScale=n.timeScale,this.stopWarping()}halt(n){return this.warp(this._effectiveTimeScale,0,n)}warp(n,o,m){const A=this._mixer,E=A.time,w=this.timeScale;let T=this._timeScaleInterpolant;null===T&&(T=A._lendControlInterpolant(),this._timeScaleInterpolant=T);const B=T.parameterPositions,D=T.sampleValues;return B[0]=E,B[1]=E+m,D[0]=n/w,D[1]=o/w,this}stopWarping(){const n=this._timeScaleInterpolant;return null!==n&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(n)),this}getMixer(){return this._mixer}getClip(){return this._clip}getRoot(){return this._localRoot||this._mixer._root}_update(n,o,m,A){if(!this.enabled)return void this._updateWeight(n);const E=this._startTime;if(null!==E){const B=(n-E)*m;B<0||0===m?o=0:(this._startTime=null,o=m*B)}o*=this._updateTimeScale(n);const w=this._updateTime(o),T=this._updateWeight(n);if(T>0){const B=this._interpolants,D=this._propertyBindings;if(2501===this.blendMode)for(let N=0,G=B.length;N!==G;++N)B[N].evaluate(w),D[N].accumulateAdditive(T);else for(let N=0,G=B.length;N!==G;++N)B[N].evaluate(w),D[N].accumulate(A,T)}}_updateWeight(n){let o=0;if(this.enabled){o=this.weight;const m=this._weightInterpolant;if(null!==m){const A=m.evaluate(n)[0];o*=A,n>m.parameterPositions[1]&&(this.stopFading(),0===A&&(this.enabled=!1))}}return this._effectiveWeight=o,o}_updateTimeScale(n){let o=0;if(!this.paused){o=this.timeScale;const m=this._timeScaleInterpolant;null!==m&&(o*=m.evaluate(n)[0],n>m.parameterPositions[1]&&(this.stopWarping(),0===o?this.paused=!0:this.timeScale=o))}return this._effectiveTimeScale=o,o}_updateTime(n){const o=this._clip.duration,m=this.loop;let A=this.time+n,E=this._loopCount;const w=2202===m;if(0===n)return-1===E||!w||1&~E?A:o-A;if(2200===m){-1===E&&(this._loopCount=0,this._setEndings(!0,!0,!1));e:{if(A>=o)A=o;else{if(!(A<0)){this.time=A;break e}A=0}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=A,this._mixer.dispatchEvent({type:"finished",action:this,direction:n<0?-1:1})}}else{if(-1===E&&(n>=0?(E=0,this._setEndings(!0,0===this.repetitions,w)):this._setEndings(0===this.repetitions,!0,w)),A>=o||A<0){const T=Math.floor(A/o);A-=o*T,E+=Math.abs(T);const B=this.repetitions-E;if(B<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,A=n>0?o:0,this.time=A,this._mixer.dispatchEvent({type:"finished",action:this,direction:n>0?1:-1});else{if(1===B){const D=n<0;this._setEndings(D,!D,w)}else this._setEndings(!1,!1,w);this._loopCount=E,this.time=A,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:T})}}else this.time=A;if(w&&!(1&~E))return o-A}return A}_setEndings(n,o,m){const A=this._interpolantSettings;m?(A.endingStart=Jo,A.endingEnd=Jo):(A.endingStart=n?this.zeroSlopeAtStart?Jo:co:fc,A.endingEnd=o?this.zeroSlopeAtEnd?Jo:co:fc)}_scheduleFading(n,o,m){const A=this._mixer,E=A.time;let w=this._weightInterpolant;null===w&&(w=A._lendControlInterpolant(),this._weightInterpolant=w);const T=w.parameterPositions,B=w.sampleValues;return T[0]=E,B[0]=o,T[1]=E+n,B[1]=m,this}}const kM=new Float32Array(1);class iy{constructor(n){this.value=n}clone(){return new iy(void 0===this.value.clone?this.value:this.value.clone())}}let NM=0;function zE(b,n){return b.distance-n.distance}function ry(b,n,o,m){if(b.layers.test(n.layers)&&b.raycast(n,o),!0===m){const A=b.children;for(let E=0,w=A.length;E<w;E++)ry(A[E],n,o,!0)}}const GE=new qt,VE=new De,b0=new De,HE=new De,Nh=new De,S0=new Ti,sy=new Ti;function QE(b){const n=[];!0===b.isBone&&n.push(b);for(let o=0;o<b.children.length;o++)n.push.apply(n,QE(b.children[o]));return n}const KM=new De,WE=new Dn,XE=new Dn,qE=new De,Pi=new De,yn=new De,Uh=new De,ts=new Uf;
vendor: 4,415 bytes, line 83
83function os(b,n,o,m,A,E,w){Uh.set(A,E,w).unproject(m);const T=n[b];if(void 0!==T){const B=o.getAttribute("position");for(let D=0,N=T.length;D<N;D++)B.setXYZ(T[D],Uh.x,Uh.y,Uh.z)}}const lm=new fo,zh=new De;let wd,sc;typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:I}})),typeof window<"u"&&(window.__THREE__?console.warn("WARNING: Multiple instances of Three.js being imported."):window.__THREE__=I),p.ACESFilmicToneMapping=Rs,p.AddEquation=100,p.AddOperation=Ps,p.AdditiveAnimationBlendMode=2501,p.AdditiveBlending=2,p.AlphaFormat=1021,p.AlwaysDepth=1,p.AlwaysStencilFunc=519,p.AmbientLight=Vv,p.AmbientLightProbe=class bE extends sm{constructor(n,o=1){super(void 0,o),this.isAmbientLightProbe=!0;const m=(new Dn).set(n);this.sh.coefficients[0].set(m.r,m.g,m.b).multiplyScalar(2*Math.sqrt(Math.PI))}},p.AnimationAction=UE,p.AnimationClip=Ed,p.AnimationLoader=class hE extends io{constructor(n){super(n)}load(n,o,m,A){const E=this,w=new rc(this.manager);w.setPath(this.path),w.setRequestHeader(this.requestHeader),w.setWithCredentials(this.withCredentials),w.load(n,function(T){try{o(E.parse(JSON.parse(T)))}catch(B){A?A(B):console.error(B),E.manager.itemError(n)}},m,A)}parse(n){const o=[];for(let m=0;m<n.length;m++){const A=Ed.parse(n[m]);o.push(A)}return o}},p.AnimationMixer=class OM extends Ki{constructor(n){super(),this._root=n,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}_bindAction(n,o){const m=n._localRoot||this._root,A=n._clip.tracks,E=A.length,w=n._propertyBindings,T=n._interpolants,B=m.uuid,D=this._bindingsByRootAndName;let N=D[B];void 0===N&&(N={},D[B]=N);for(let G=0;G!==E;++G){const H=A[G],Q=H.name;let Z=N[Q];if(void 0!==Z)++Z.referenceCount,w[G]=Z;else{if(Z=w[G],void 0!==Z){null===Z._cacheIndex&&(++Z.referenceCount,this._addInactiveBinding(Z,B,Q));continue}Z=new ny(Rr.create(m,Q,o&&o._propertyBindings[G].binding.parsedPath),H.ValueTypeName,H.getValueSize()),++Z.referenceCount,this._addInactiveBinding(Z,B,Q),w[G]=Z}T[G].resultBuffer=Z.buffer}}_activateAction(n){if(!this._isActiveAction(n)){if(null===n._cacheIndex){const m=(n._localRoot||this._root).uuid,A=n._clip.uuid,E=this._actionsByClip[A];this._bindAction(n,E&&E.knownActions[0]),this._addInactiveAction(n,A,m)}const o=n._propertyBindings;for(let m=0,A=o.length;m!==A;++m){const E=o[m];0==E.useCount++&&(this._lendBinding(E),E.saveOriginalState())}this._lendAction(n)}}_deactivateAction(n){if(this._isActiveAction(n)){const o=n._propertyBindings;for(let m=0,A=o.length;m!==A;++m){const E=o[m];0==--E.useCount&&(E.restoreOriginalState(),this._takeBackBinding(E))}this._takeBackAction(n)}}_initMemoryManager(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;const n=this;this.stats={actions:{get total(){return n._actions.length},get inUse(){return n._nActiveActions}},bindings:{get total(){return n._bindings.length},get inUse(){return n._nActiveBindings}},controlInterpolants:{get total(){return n._controlInterpolants.length},get inUse(){return n._nActiveControlInterpolants}}}}_isActiveAction(n){const o=n._cacheIndex;return null!==o&&o<this._nActiveActions}_addInactiveAction(n,o,m){const A=this._actions,E=this._actionsByClip;let w=E[o];if(void 0===w)w={knownActions:[n],actionByRoot:{}},n._byClipCacheIndex=0,E[o]=w;else{const T=w.knownActions;n._byClipCacheIndex=T.length,T.push(n)}n._cacheIndex=A.length,A.push(n),w.actionByRoot[m]=n}_removeInactiveAction(n){const o=this._actions,m=o[o.length-1],A=n._cacheIndex;m._cacheIndex=A,o[A]=m,o.pop(),n._cacheIndex=null;const E=n._clip.uuid,w=this._actionsByClip,T=w[E],B=T.knownActions,D=B[B.length-1],N=n._byClipCacheIndex;D._byClipCacheIndex=N,B[N]=D,B.pop(),n._byClipCacheIndex=null,delete T.actionByRoot[(n._localRoot||this._root).uuid],0===B.length&&delete w[E],this._removeInactiveBindingsForAction(n)}_removeInactiveBindingsForAction(n){const o=n._propertyBindings;for(let m=0,A=o.length;m!==A;++m){const E=o[m];0==--E.referenceCount&&this._removeInactiveBinding(E)}}_lendAction(n){const o=this._actions,m=n._cacheIndex,A=this._nActiveActions++,E=o[A];n._cacheIndex=A,o[A]=n,E._cacheIndex=m,o[m]=E}_takeBackAction(n){const o=this._actions,m=n._cacheIndex,A=--this._nActiveActions,E=o[A];n._cacheIndex=A,o[A]=n,E._cacheIndex=m,o[m]=E}
vendor: 1,901 bytes, line 83
83_addInactiveBinding(n,o,m){const A=this._bindingsByRootAndName,E=this._bindings;let w=A[o];void 0===w&&(w={},A[o]=w),w[m]=n,n._cacheIndex=E.length,E.push(n)}_removeInactiveBinding(n){const o=this._bindings,m=n.binding,A=m.rootNode.uuid,E=m.path,w=this._bindingsByRootAndName,T=w[A],B=o[o.length-1],D=n._cacheIndex;B._cacheIndex=D,o[D]=B,o.pop(),delete T[E],0===Object.keys(T).length&&delete w[A]}_lendBinding(n){const o=this._bindings,m=n._cacheIndex,A=this._nActiveBindings++,E=o[A];n._cacheIndex=A,o[A]=n,E._cacheIndex=m,o[m]=E}_takeBackBinding(n){const o=this._bindings,m=n._cacheIndex,A=--this._nActiveBindings,E=o[A];n._cacheIndex=A,o[A]=n,E._cacheIndex=m,o[m]=E}_lendControlInterpolant(){const n=this._controlInterpolants,o=this._nActiveControlInterpolants++;let m=n[o];return void 0===m&&(m=new d0(new Float32Array(2),new Float32Array(2),1,kM),m.__cacheIndex=o,n[o]=m),m}_takeBackControlInterpolant(n){const o=this._controlInterpolants,m=n.__cacheIndex,A=--this._nActiveControlInterpolants,E=o[A];n.__cacheIndex=A,o[A]=n,E.__cacheIndex=m,o[m]=E}clipAction(n,o,m){const A=o||this._root,E=A.uuid;let w="string"==typeof n?Ed.findByName(A,n):n;const T=null!==w?w.uuid:n,B=this._actionsByClip[T];let D=null;if(void 0===m&&(m=null!==w?w.blendMode:2500),void 0!==B){const G=B.actionByRoot[E];if(void 0!==G&&G.blendMode===m)return G;D=B.knownActions[0],null===w&&(w=D._clip)}if(null===w)return null;const N=new UE(this,w,o,m);return this._bindAction(N,D),this._addInactiveAction(N,T,E),N}existingAction(n,o){const m=o||this._root,A=m.uuid,E="string"==typeof n?Ed.findByName(m,n):n,T=this._actionsByClip[E?E.uuid:n];return void 0!==T&&T.actionByRoot[A]||null}stopAllAction(){const n=this._actions;for(let m=this._nActiveActions-1;m>=0;--m)n[m].stop();return this}update(n){const o=this._actions,m=this._nActiveActions,A=this.time+=n*=this.timeScale,E=Math.sign(n),w=this._accuIndex^=1;for(let D=0;D!==m;
vendor: 4,834 bytes, line 83
83++D)o[D]._update(A,n,E,w);const T=this._bindings,B=this._nActiveBindings;for(let D=0;D!==B;++D)T[D].apply(w);return this}setTime(n){this.time=0;for(let o=0;o<this._actions.length;o++)this._actions[o].time=0;return this.update(n)}getRoot(){return this._root}uncacheClip(n){const o=this._actions,m=n.uuid,A=this._actionsByClip,E=A[m];if(void 0!==E){const w=E.knownActions;for(let T=0,B=w.length;T!==B;++T){const D=w[T];this._deactivateAction(D);const N=D._cacheIndex,G=o[o.length-1];D._cacheIndex=null,D._byClipCacheIndex=null,G._cacheIndex=N,o[N]=G,o.pop(),this._removeInactiveBindingsForAction(D)}delete A[m]}}uncacheRoot(n){const o=n.uuid,m=this._actionsByClip;for(const w in m){const B=m[w].actionByRoot[o];void 0!==B&&(this._deactivateAction(B),this._removeInactiveAction(B))}const E=this._bindingsByRootAndName[o];if(void 0!==E)for(const w in E){const T=E[w];T.restoreOriginalState(),this._removeInactiveBinding(T)}}uncacheAction(n,o){const m=this.existingAction(n,o);null!==m&&(this._deactivateAction(m),this._removeInactiveAction(m))}},p.AnimationObjectGroup=class FM{constructor(){this.isAnimationObjectGroup=!0,this.uuid=Ra(),this._objects=Array.prototype.slice.call(arguments),this.nCachedObjects_=0;const n={};this._indicesByUUID=n;for(let m=0,A=arguments.length;m!==A;++m)n[arguments[m].uuid]=m;this._paths=[],this._parsedPaths=[],this._bindings=[],this._bindingsIndicesByPath={};const o=this;this.stats={objects:{get total(){return o._objects.length},get inUse(){return this.total-o.nCachedObjects_}},get bindingsPerObject(){return o._bindings.length}}}add(){const n=this._objects,o=this._indicesByUUID,m=this._paths,A=this._parsedPaths,E=this._bindings,w=E.length;let T,B=n.length,D=this.nCachedObjects_;for(let N=0,G=arguments.length;N!==G;++N){const H=arguments[N],Q=H.uuid;let Z=o[Q];if(void 0===Z){Z=B++,o[Q]=Z,n.push(H);for(let he=0,J=w;he!==J;++he)E[he].push(new Rr(H,m[he],A[he]))}else if(Z<D){T=n[Z];const he=--D,J=n[he];o[J.uuid]=Z,n[Z]=J,o[Q]=he,n[he]=H;for(let Y=0,ve=w;Y!==ve;++Y){const pe=E[Y];let Ie=pe[Z];pe[Z]=pe[he],void 0===Ie&&(Ie=new Rr(H,m[Y],A[Y])),pe[he]=Ie}}else n[Z]!==T&&console.error("THREE.AnimationObjectGroup: Different objects with the same UUID detected. Clean the caches or recreate your infrastructure when reloading scenes.")}this.nCachedObjects_=D}remove(){const n=this._objects,o=this._indicesByUUID,m=this._bindings,A=m.length;let E=this.nCachedObjects_;for(let w=0,T=arguments.length;w!==T;++w){const B=arguments[w],D=B.uuid,N=o[D];if(void 0!==N&&N>=E){const G=E++,H=n[G];o[H.uuid]=N,n[N]=H,o[D]=G,n[G]=B;for(let Q=0,Z=A;Q!==Z;++Q){const he=m[Q],Y=he[N];he[N]=he[G],he[G]=Y}}}this.nCachedObjects_=E}uncache(){const n=this._objects,o=this._indicesByUUID,m=this._bindings,A=m.length;let E=this.nCachedObjects_,w=n.length;for(let T=0,B=arguments.length;T!==B;++T){const N=arguments[T].uuid,G=o[N];if(void 0!==G)if(delete o[N],G<E){const H=--E,Q=n[H],Z=--w,he=n[Z];o[Q.uuid]=G,n[G]=Q,o[he.uuid]=H,n[H]=he,n.pop();for(let J=0,Y=A;J!==Y;++J){const ve=m[J],Ae=ve[Z];ve[G]=ve[H],ve[H]=Ae,ve.pop()}}else{const H=--w,Q=n[H];H>0&&(o[Q.uuid]=G),n[G]=Q,n.pop();for(let Z=0,he=A;Z!==he;++Z){const J=m[Z];J[G]=J[H],J.pop()}}}this.nCachedObjects_=E}subscribe_(n,o){const m=this._bindingsIndicesByPath;let A=m[n];const E=this._bindings;if(void 0!==A)return E[A];const w=this._paths,T=this._parsedPaths,B=this._objects,N=this.nCachedObjects_,G=new Array(B.length);A=E.length,m[n]=A,w.push(n),T.push(o),E.push(G);for(let H=N,Q=B.length;H!==Q;++H)G[H]=new Rr(B[H],n,o);return G}unsubscribe_(n){const o=this._bindingsIndicesByPath,m=o[n];if(void 0!==m){const A=this._paths,E=this._parsedPaths,w=this._bindings,T=w.length-1,B=w[T];o[n[T]]=m,w[m]=B,w.pop(),E[m]=E[T],E.pop(),A[m]=A[T],A.pop()}}},p.AnimationUtils=aE,p.ArcCurve=$g,p.ArrayCamera=Bi,p.ArrowHelper=class M0 extends Fr{constructor(n=new De(0,0,1),o=new De(0,0,0),m=1,A=16776960,E=.2*m,w=.2*E){super(),this.type="ArrowHelper",void 0===wd&&(wd=new Fi,wd.setAttribute("position",new zn([0,0,0,0,1,0],3)),sc=new Xo(0,.5,1,5,1),sc.translate(0,-.5,0)),this.position.copy(o),this.line=new Ja(wd,new es({color:A,toneMapped:!1})),this.line.matrixAutoUpdate=!1,this.add(this.line),this.cone=new Fs(sc,new po({color:A,toneMapped:!1})),this.cone.matrixAutoUpdate=!1,this.add(this.cone),this.setDirection(n),this.setLength(m,E,w)}setDirection(n){if(n.y>.99999)this.quaternion.set(0,0,0,1);else if(n.y<-.99999)this.quaternion.set(1,0,0,0);else{zh.set(n.z,0,-n.x).normalize();const o=Math.acos(n.y);this.quaternion.setFromAxisAngle(zh,o)}}setLength(n,o=.2*n,m=.2*o){this.line.scale.set(1,Math.max(1e-4,n-o),1),this.line.updateMatrix(),this.cone.scale.set(m,o,m),this.cone.position.y=n,this.cone.updateMatrix()}setColor(n){this.line.material.color.set(n),this.cone.material.color.set(n)}copy(n){return super.copy(n,!1),this.line.copy(n.line),this.cone.copy(n.
vendor: 6,311 bytes, line 83
83cone),this}dispose(){this.line.geometry.dispose(),this.line.material.dispose(),this.cone.geometry.dispose(),this.cone.material.dispose()}},p.Audio=ey,p.AudioAnalyser=class IE{constructor(n,o=2048){this.analyser=n.context.createAnalyser(),this.analyser.fftSize=o,this.data=new Uint8Array(this.analyser.frequencyBinCount),n.getOutput().connect(this.analyser)}getFrequencyData(){return this.analyser.getByteFrequencyData(this.data),this.data}getAverageFrequency(){let n=0;const o=this.getFrequencyData();for(let m=0;m<o.length;m++)n+=o[m];return n/o.length}},p.AudioContext=y0,p.AudioListener=class wE extends Fr{constructor(){super(),this.type="AudioListener",this.context=y0.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null,this.timeDelta=0,this._clock=new Zv}getInput(){return this.gain}removeFilter(){return null!==this.filter&&(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination),this.gain.connect(this.context.destination),this.filter=null),this}getFilter(){return this.filter}setFilter(n){return null!==this.filter?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)):this.gain.disconnect(this.context.destination),this.filter=n,this.gain.connect(this.filter),this.filter.connect(this.context.destination),this}getMasterVolume(){return this.gain.gain.value}setMasterVolume(n){return this.gain.gain.setTargetAtTime(n,this.context.currentTime,.01),this}updateMatrixWorld(n){super.updateMatrixWorld(n);const o=this.context.listener,m=this.up;if(this.timeDelta=this._clock.getDelta(),this.matrixWorld.decompose(Dh,Jv,ME),Fh.set(0,0,-1).applyQuaternion(Jv),o.positionX){const A=this.context.currentTime+this.timeDelta;o.positionX.linearRampToValueAtTime(Dh.x,A),o.positionY.linearRampToValueAtTime(Dh.y,A),o.positionZ.linearRampToValueAtTime(Dh.z,A),o.forwardX.linearRampToValueAtTime(Fh.x,A),o.forwardY.linearRampToValueAtTime(Fh.y,A),o.forwardZ.linearRampToValueAtTime(Fh.z,A),o.upX.linearRampToValueAtTime(m.x,A),o.upY.linearRampToValueAtTime(m.y,A),o.upZ.linearRampToValueAtTime(m.z,A)}else o.setPosition(Dh.x,Dh.y,Dh.z),o.setOrientation(Fh.x,Fh.y,Fh.z,m.x,m.y,m.z)}},p.AudioLoader=class xE extends io{constructor(n){super(n)}load(n,o,m,A){const E=this,w=new rc(this.manager);w.setResponseType("arraybuffer"),w.setPath(this.path),w.setRequestHeader(this.requestHeader),w.setWithCredentials(this.withCredentials),w.load(n,function(T){try{const B=T.slice(0);y0.getContext().decodeAudioData(B,function(N){o(N)})}catch(B){A?A(B):console.error(B),E.manager.itemError(n)}},m,A)}},p.AxesHelper=class ay extends Al{constructor(n=1){const o=[0,0,0,n,0,0,0,0,0,0,n,0,0,0,0,0,0,n],A=new Fi;A.setAttribute("position",new zn(o,3)),A.setAttribute("color",new zn([1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],3)),super(A,new es({vertexColors:!0,toneMapped:!1})),this.type="AxesHelper"}setColors(n,o,m){const A=new Dn,E=this.geometry.attributes.color.array;return A.set(n),A.toArray(E,0),A.toArray(E,3),A.set(o),A.toArray(E,6),A.toArray(E,9),A.set(m),A.toArray(E,12),A.toArray(E,15),this.geometry.attributes.color.needsUpdate=!0,this}dispose(){this.geometry.dispose(),this.material.dispose()}},p.BackSide=1,p.BasicDepthPacking=3200,p.BasicShadowMap=0,p.Bone=ml,p.BooleanKeyframeTrack=Ph,p.Box2=class WM{constructor(n=new qt(1/0,1/0),o=new qt(-1/0,-1/0)){this.isBox2=!0,this.min=n,this.max=o}set(n,o){return this.min.copy(n),this.max.copy(o),this}setFromPoints(n){this.makeEmpty();for(let o=0,m=n.length;o<m;o++)this.expandByPoint(n[o]);return this}setFromCenterAndSize(n,o){const m=GE.copy(o).multiplyScalar(.5);return this.min.copy(n).sub(m),this.max.copy(n).add(m),this}clone(){return(new this.constructor).copy(this)}copy(n){return this.min.copy(n.min),this.max.copy(n.max),this}makeEmpty(){return this.min.x=this.min.y=1/0,this.max.x=this.max.y=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y}getCenter(n){return this.isEmpty()?n.set(0,0):n.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(n){return this.isEmpty()?n.set(0,0):n.subVectors(this.max,this.min)}expandByPoint(n){return this.min.min(n),this.max.max(n),this}expandByVector(n){return this.min.sub(n),this.max.add(n),this}expandByScalar(n){return this.min.addScalar(-n),this.max.addScalar(n),this}containsPoint(n){return!(n.x<this.min.x||n.x>this.max.x||n.y<this.min.y||n.y>this.max.y)}containsBox(n){return this.min.x<=n.min.x&&n.max.x<=this.max.x&&this.min.y<=n.min.y&&n.max.y<=this.max.y}getParameter(n,o){return o.set((n.x-this.min.x)/(this.max.x-this.min.x),(n.y-this.min.y)/(this.max.y-this.min.y))}intersectsBox(n){return!(n.max.x<this.min.x||n.min.x>this.max.x||n.max.y<this.min.y||n.min.y>this.max.y)}clampPoint(n,o){return o.copy(n).clamp(this.min,this.max)}distanceToPoint(n){return this.clampPoint(n,GE).distanceTo(n)}intersect(n){return this.min.max(n.min),this.max.min(n.max),this.isEmpty()&&this.makeEmpty(),this}union(n){return this.min.min(n.min),this.max.max(n.max),this}translate(n){return this.min.add(n),this.max.add(n),this}equals(n){return n.min.equals(this.min)&&n.max.equals(this.max)}},p.Box3=fo,p.Box3Helper=class KE extends Al{constructor(n,o=16776960){const m=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),E=new Fi;E.setIndex(new Cr(m,1)),E.setAttribute("position",new zn([1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1],3)),super(E,new es({color:o,toneMapped:!1})),this.box=n,this.type="Box3Helper",this.geometry.computeBoundingSphere()}updateMatrixWorld(n){const o=this.box;o.isEmpty()||(o.getCenter(this.position),o.getSize(this.scale),this.scale.multiplyScalar(.5),super.updateMatrixWorld(n))}dispose(){this.geometry.dispose(),this.material.dispose()}},p.BoxBufferGeometry=class Gh extends xc{constructor(n,o,m,A,E,w){console.warn("THREE.BoxBufferGeometry has been renamed to THREE.BoxGeometry."),super(n,o,m,A,E,w)}},p.BoxGeometry=xc,p.BoxHelper=class $E extends Al{constructor(n,o=16776960){const m=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),A=new Float32Array(24),E=new Fi;E.setIndex(new Cr(m,1)),E.setAttribute("position",new Cr(A,3)),super(E,new es({color:o,toneMapped:!1})),this.object=n,this.type="BoxHelper",this.matrixAutoUpdate=!1,this.update()}update(n){if(void 0!==n&&console.warn("THREE.BoxHelper: .update(
83) has no longer arguments."),void 0!==this.object&&lm.setFromObject(this.object),lm.isEmpty())return;const o=lm.min,m=lm.max,A=this.geometry.attributes.position,E=A.array;E[0]=m.x,E[1]=m.y,E[2]=m.z,E[3]=o.x,E[4]=m.y,E[5]=m.z,E[6]=o.x,E[7]=o.y,E[8]=m.z,E[9]=m.x,E[10]=o.y,E[11]=m.z,E[12]=m.x,E[13]=m.y,E[14]=o.z,E[15]=o.x,E[16]=m.y,E[17]=o.z,E[18]=o.x,E[19]=o.y,E[20]=o.z,E[21]=m.x,E[22]=o.y,E[23]=o.z,A.needsUpdate=!0,this.geometry.computeBoundingSphere()}setFromObject(n){return this.object=n,this.update(),this}copy(n,o){return super.copy(n,o),this.object=n.object,this}dispose(){this.geometry.dispose(),this.material.dispose()}},p.BufferAttribute=Cr,p.BufferGeometry=Fi,p.BufferGeometryLoader=Xv,p.ByteType=1010,p.Cache=Bh,p.Camera=Uf,p.CameraHelper=class YE extends Al{constructor(n){const o=new Fi,m=new es({color:16777215,vertexColors:!0,toneMapped:!1}),A=[],E=[],w={};function T(Z,he){B(Z),B(he)}function B(Z){A.push(0,0,0),E.push(0,0,0),void 0===w[Z]&&(w[Z]=[]),w[Z].push(A.length/3-1)}T("n1","n2"),T("n2","n4"),T("n4","n3"),T("n3","n1"),T("f1","f2"),T("f2","f4"),T("f4","f3"),T("f3","f1"),T("n1","f1"),T("n2","f2"),T("n3","f3"),T("n4","f4"),T("p","n1"),T("p","n2"),T("p","n3"),T("p","n4"),T("u1","u2"),T("u2","u3"),T("u3","u1"),T("c","t"),T("p","c"),T("cn1","cn2"),T("cn3","cn4"),T("cf1","cf2"),T("cf3","cf4"),o.setAttribute("position",new zn(A,3)),o.setAttribute("color",new zn(E,3)),super(o,m),this.type="CameraHelper",this.camera=n,this.camera.updateProjectionMatrix&&this.camera.updateProjectionMatrix(),this.matrix=n.matrixWorld,this.matrixAutoUpdate=!1,this.pointMap=w,this.update();const D=new Dn(16755200),N=new Dn(16711680),G=new Dn(43775),H=new Dn(16777215),Q=new Dn(3355443);this.setColors(D,N,G,H,Q)}setColors(n,o,m,A,E){const T=this.geometry.getAttribute("color");T.setXYZ(0,n.r,n.g,n.b),T.setXYZ(1,n.r,n.g,n.b),T.setXYZ(2,n.r,n.g,n.b),T.setXYZ(3,n.r,n.g,n.b),T.setXYZ(4,n.r,n.g,n.b),T.setXYZ(5,n.r,n.g,n.b),T.setXYZ(6,n.r,n.g,n.b),T.setXYZ(7,n.r,n.g,n.b),T.setXYZ(8,n.r,n.g,n.b),T.setXYZ(9,n.r,n.g,n.b),T.setXYZ(10,n.r,n.g,n.b),T.setXYZ(11,n.r,n.g,n.b),T.setXYZ(12,n.r,n.g,n.b),T.setXYZ(13,n.r,n.g,n.b),T.setXYZ(14,n.r,n.g,n.b),T.setXYZ(15,n.r,n.g,n.b),T.setXYZ(16,n.r,n.g,n.b),T.setXYZ(17,n.r,n.g,n.b),T.setXYZ(18,n.r,n.g,n.b),T.setXYZ(19,n.r,n.g,n.b),T.setXYZ(20,n.r,n.g,n.b),T.setXYZ(21,n.r,n.g,n.b),T.setXYZ(22,n.r,n.g,n.b),T.setXYZ(23,n.r,n.g,n.b),T.setXYZ(24,o.r,o.g,o.b),T.setXYZ(25,o.r,o.g,o.b),T.setXYZ(26,o.r,o.g,o.b),T.setXYZ(27,o.r,o.g,o.b),T.setXYZ(28,o.r,o.g,o.b),T.setXYZ(29,o.r,o.g,o.b),T.setXYZ(30,o.r,o.g,o.b),T.setXYZ(31,o.r,o.g,o.b),T.setXYZ(32,m.r,m.g,m.b),T.setXYZ(33,m.r,m.g,m.b),T.setXYZ(34,m.r,m.g,m.b),T.setXYZ(35,m.r,m.g,m.b),T.setXYZ(36,m.r,m.g,m.b),T.setXYZ(37,m.r,m.g,m.b),T.setXYZ(38,A.r,A.g,A.b),T.setXYZ(39,A.r,A.g,A.b),T.setXYZ(40,E.r,E.g,E.b),T.setXYZ(41,E.r,E.g,E.b),T.setXYZ(42,E.r,E.g,E.b),T.setXYZ(43,E.r,E.g,E.b),T.setXYZ(44,E.r,E.g,E.b),T.setXYZ(45,E.r,E.g,E.b),T.setXYZ(46,E.r,E.g,E.b),T.setXYZ(47,E.r,E.g,E.b),T.setXYZ(48,E.r,E.g,E.b),T.setXYZ(49,E.r,E.g,E.b),T.needsUpdate=!0}update(){const n=this.geometry,o=this.pointMap;ts.projectionMatrixInverse.copy(this.camera.projectionMatrixInverse),os("c",o,n,ts,0,0,-1),os("t",o,n,ts,0,0,1),os("n1",o,n,ts,-1,-1,-1),os("n2",o,n,ts,1,-1,-1),os("n3",o,n,ts,-1,1,-1),os("n4",o,n,ts,1,1,-1),os("f1",o,n,ts,-1,-1,1),os("f2",o,n,ts,1,-1,1),os("f3",o,n,ts,-1,1,1),os("f4",o,n,ts,1,1,1),os("u1",o,n,ts,.7,1.1,-1),os("u2",o,n,ts,-.7,1.1,-1),os("u3",o,n,ts,0,2,-1),os("cf1",o,n,ts,-1,0,1),os("cf2",o,n,ts,1,0,1),os("cf3",o,n,ts,0,-1,1),os("cf4",o,n,ts,0,1,1),os("cn1",o,n,ts,-1,0,-1),os("cn2",o,n,ts,1,0,-1),os("cn3",o,n,ts,0,-1,-1),os("cn4",o,n,ts,0,1,-1),n.getAttribute("position").needsUpdate=!0}dispose(){this.geometry.dispose(),this.material.dispose()}},p.CanvasTexture=class cd extends va{constructor(n,o,m,A,E,w,T,B,D){super(n,o,m,A,E,w,T,B,D),this.isCanvasTexture=!0,this.needsUpdate=!0}},p.CapsuleBufferGeometry=class af extends fd{constructor(n,o,m,A){console.warn("THREE.CapsuleBufferGeometry has been renamed to THREE.CapsuleGeometry."),super(n,o,m,A)}},p.CapsuleGeometry=fd,p.CatmullRomCurve3=Mo,p.CineonToneMapping=ds,p.CircleBufferGeometry=class oy extends Us{constructor(n,o,m,A){console.warn("THREE.CircleBufferGeometry has been renamed to THREE.CircleGeometry."),super(n,o,m,A)}},p.CircleGeometry=Us,p.ClampToEdgeWrapping=Pn,p.Clock=Zv,p.Color=Dn,p.ColorKeyframeTrack=p0,p.ColorManagement=_a,p.CompressedArrayTexture=class jp extends Qo{constructor(n,o,m,A,E,w){super(n,o,m,E,w),this.isCompressedArrayTexture=!0,this.image.depth=A,this.wrapR=Pn}},p.CompressedTexture=Qo,p.CompressedTextureLoader=class uE extends io{constructor(n){super(n)}load(n,o,m,A){const E=this,w=[],T=new Qo,B=new rc(this.manager);B.setPath(this.path),B.setResponseType("arraybuffer"),B.setRequestHeader(this.requestHeader),B.setWithCredentials(E.withCredentials);let D=0;function N(G){B.load(n[G],function(H){const Q=E.parse(H,!0);w[G]={width:Q.width,height:Q.height,format:Q.format,mipmaps:Q.mipmaps},D+=1,6===D&&(1===Q.mipmapCount&&(T.minFilter=Mi),T.image=w,T.format=Q.format,T.needsUpdate=!0,o&&o(T))},m,A)}if(Array.isArray(n))for(let G=0,H=n.length;G<H;++G)N(G);else B.load(n,function(G){const H=E.parse(G,!0);if(H.isCubemap){const Q=H.mipmaps.length/H.mipmapCount;for(let Z=0;Z<Q;Z++){w[Z]={mipmaps:[]};for(let he=0;he<H.mipmapCount;he++)w[Z].mipmaps.push(H.mipmaps[Z*H.mipmapCount+he]),w[Z].format=H.format,w[Z].width=H.width,w[Z].height=H.height}T.image=w}else T.image.width=H.width,T.image.height=H.height,T.mipmaps=H.mipmaps;1===H.mipmapCount&&(T.minFilter=Mi),T.format=H.format,T.needsUpdate=!0,o&&o(T)},m,A);return T}},p.ConeBufferGeometry=class C0 extends Ku{constructor(n,o,m,A,E,w,T){console.warn("THREE.ConeBufferGeometry has been renamed to THREE.ConeGeometry."),super(n,o,m,A,E,w,T)}},p.ConeGeometry=Ku,p.CubeCamera=s_,p.CubeReflectionMapping=ur,p.CubeRefractionMapping=vi,p.CubeTexture=zf,p.CubeTextureLoader=class fE extends io{constructor(n){super(n)}load(n,o,m,A){const E=new zf,w=new bd(this.manager);w.setCrossOrigin(this.crossOrigin),w.setPath(this.path);let T=0;function B(D){w.load(n[D],function(N){E.images[D]=N,T++,6===T&&(E.needsUpdate=!0,o&&o(E))},void 0,A)}for(let D=0;D<n.length;++D)B(D);return E}},p.CubeUVReflectionMapping=Ls,p.CubicBezierCurve=ba,p.CubicBezierCurve3=_v,p.CubicInterpolant=Rv,p.CullFaceBack=1,p.CullFaceFront=2,p.CullFaceFrontBack=3,p.CullFaceNone=0,p.Curve=Wo,p.CurvePath=
vendor: 7,036 bytes, line 83
83Zs,p.CustomBlending=5,p.CustomToneMapping=er,p.CylinderBufferGeometry=class ZE extends Xo{constructor(n,o,m,A,E,w,T,B){console.warn("THREE.CylinderBufferGeometry has been renamed to THREE.CylinderGeometry."),super(n,o,m,A,E,w,T,B)}},p.CylinderGeometry=Xo,p.Cylindrical=class QM{constructor(n=1,o=0,m=0){return this.radius=n,this.theta=o,this.y=m,this}set(n,o,m){return this.radius=n,this.theta=o,this.y=m,this}copy(n){return this.radius=n.radius,this.theta=n.theta,this.y=n.y,this}setFromVector3(n){return this.setFromCartesianCoords(n.x,n.y,n.z)}setFromCartesianCoords(n,o,m){return this.radius=Math.sqrt(n*n+m*m),this.theta=Math.atan2(n,m),this.y=o,this}clone(){return(new this.constructor).copy(this)}},p.Data3DTexture=ap,p.DataArrayTexture=sp,p.DataTexture=Eo,p.DataTextureLoader=class dE extends io{constructor(n){super(n)}load(n,o,m,A){const E=this,w=new Eo,T=new rc(this.manager);return T.setResponseType("arraybuffer"),T.setRequestHeader(this.requestHeader),T.setPath(this.path),T.setWithCredentials(E.withCredentials),T.load(n,function(B){const D=E.parse(B);D&&(void 0!==D.image?w.image=D.image:void 0!==D.data&&(w.image.width=D.width,w.image.height=D.height,w.image.data=D.data),w.wrapS=void 0!==D.wrapS?D.wrapS:Pn,w.wrapT=void 0!==D.wrapT?D.wrapT:Pn,w.magFilter=void 0!==D.magFilter?D.magFilter:Mi,w.minFilter=void 0!==D.minFilter?D.minFilter:Mi,w.anisotropy=void 0!==D.anisotropy?D.anisotropy:1,void 0!==D.encoding&&(w.encoding=D.encoding),void 0!==D.flipY&&(w.flipY=D.flipY),void 0!==D.format&&(w.format=D.format),void 0!==D.type&&(w.type=D.type),void 0!==D.mipmaps&&(w.mipmaps=D.mipmaps,w.minFilter=Il),1===D.mipmapCount&&(w.minFilter=Mi),void 0!==D.generateMipmaps&&(w.generateMipmaps=D.generateMipmaps),w.needsUpdate=!0,o&&o(w,D))},m,A),w}},p.DataUtils=Ql,p.DecrementStencilOp=7683,p.DecrementWrapStencilOp=34056,p.DefaultLoadingManager=Dv,p.DepthFormat=Zo,p.DepthStencilFormat=jo,p.DepthTexture=zp,p.DirectionalLight=Gv,p.DirectionalLightHelper=class bl extends Fr{constructor(n,o,m){super(),this.light=n,this.matrix=n.matrixWorld,this.matrixAutoUpdate=!1,this.color=m,this.type="DirectionalLightHelper",void 0===o&&(o=1);let A=new Fi;A.setAttribute("position",new zn([-o,o,0,o,o,0,o,-o,0,-o,-o,0,-o,o,0],3));const E=new es({fog:!1,toneMapped:!1});this.lightPlane=new Ja(A,E),this.add(this.lightPlane),A=new Fi,A.setAttribute("position",new zn([0,0,0,0,0,1],3)),this.targetLine=new Ja(A,E),this.add(this.targetLine),this.update()}dispose(){this.lightPlane.geometry.dispose(),this.lightPlane.material.dispose(),this.targetLine.geometry.dispose(),this.targetLine.material.dispose()}update(){this.light.updateWorldMatrix(!0,!1),this.light.target.updateWorldMatrix(!0,!1),qE.setFromMatrixPosition(this.light.matrixWorld),Pi.setFromMatrixPosition(this.light.target.matrixWorld),yn.subVectors(Pi,qE),this.lightPlane.lookAt(Pi),void 0!==this.color?(this.lightPlane.material.color.set(this.color),this.targetLine.material.color.set(this.color)):(this.lightPlane.material.color.copy(this.light.color),this.targetLine.material.color.copy(this.light.color)),this.targetLine.lookAt(Pi),this.targetLine.scale.z=yn.length()}},p.DiscreteInterpolant=Bv,p.DisplayP3ColorSpace=nl,p.DodecahedronBufferGeometry=class ly extends Fc{constructor(n,o){console.warn("THREE.DodecahedronBufferGeometry has been renamed to THREE.DodecahedronGeometry."),super(n,o)}},p.DodecahedronGeometry=Fc,p.DoubleSide=2,p.DstAlphaFactor=206,p.DstColorFactor=208,p.DynamicCopyUsage=35050,p.DynamicDrawUsage=35048,p.DynamicReadUsage=35049,p.EdgesGeometry=eE,p.EllipseCurve=Jp,p.EqualDepth=4,p.EqualStencilFunc=514,p.EquirectangularReflectionMapping=303,p.EquirectangularRefractionMapping=304,p.Euler=vc,p.EventDispatcher=Ki,p.ExtrudeBufferGeometry=class cm extends Cs{constructor(n,o){console.warn("THREE.ExtrudeBufferGeometry has been renamed to THREE.ExtrudeGeometry."),super(n,o)}},p.ExtrudeGeometry=Cs,p.FileLoader=rc,p.Float16BufferAttribute=class dg extends Cr{constructor(n,o,m){super(new Uint16Array(n),o,m),this.isFloat16BufferAttribute=!0}getX(n){let o=mo(this.array[n*this.itemSize]);return this.normalized&&(o=Ba(o,this.array)),o}setX(n,o){return this.normalized&&(o=wi(o,this.array)),this.array[n*this.itemSize]=Fa(o),this}getY(n){let o=mo(this.array[n*this.itemSize+1]);return this.normalized&&(o=Ba(o,this.array)),o}setY(n,o){return this.normalized&&(o=wi(o,this.array)),this.array[n*this.itemSize+1]=Fa(o),this}getZ(n){let o=mo(this.array[n*this.itemSize+2]);return this.normalized&&(o=Ba(o,this.array)),o}setZ(n,o){return this.normalized&&(o=wi(o,this.array)),this.array[n*this.itemSize+2]=Fa(o),this}getW(n){let o=mo(this.array[n*this.itemSize+3]);return this.normalized&&(o=Ba(o,this.array)),o}setW(n,o){return this.normalized&&(o=wi(o,this.array)),this.array[n*this.itemSize+3]=Fa(o),this}setXY(n,o,m){return n*=this.itemSize,this.normalized&&(o=wi(o,this.array),m=wi(m,this.array)),this.array[n+0]=Fa(o),this.array[n+1]=Fa(m),this}setXYZ(n,o,m,A){return n*=this.itemSize,this.normalized&&(o=wi(o,this.array),m=wi(m,this.array),A=wi(A,this.array)),this.array[n+0]=Fa(o),this.array[n+1]=Fa(m),this.array[n+2]=Fa(A),this}setXYZW(n,o,m,A,E){return n*=this.itemSize,this.normalized&&(o=wi(o,this.array),m=wi(m,this.array),A=wi(A,this.array),E=wi(E,this.array)),this.array[n+0]=Fa(o),this.array[n+1]=Fa(m),this.array[n+2]=Fa(A),this.array[n+3]=Fa(E),this}},p.Float32BufferAttribute=zn,p.Float64BufferAttribute=class Ap extends Cr{constructor(n,o,m){super(new Float64Array(n),o,m)}},p.FloatType=Rl,p.Fog=Hp,p.FogExp2=Vp,p.FramebufferTexture=class qu extends va{constructor(n,o,m){super({width:n,height:o}),this.isFramebufferTexture=!0,this.format=m,this.magFilter=Jn,this.minFilter=Jn,this.generateMipmaps=!1,this.needsUpdate=!0}},p.FrontSide=0,p.Frustum=bp,p.GLBufferAttribute=class GM{constructor(n,o,m,A,E){this.isGLBufferAttribute=!0,this.name="",this.buffer=n,this.type=o,this.itemSize=m,this.elementSize=A,this.count=E,this.version=0}set needsUpdate(n){!0===n&&this.version++}setBuffer(n){return this.buffer=n,this}setType(n,o){return this.type=n,this.elementSize=o,this}setItemSize(n){return this.itemSize=n,this}setCount(n){return this.count=n,this}},p.GLSL1="100",p.GLSL3=tp,p.GreaterDepth=6,p.GreaterEqualDepth=5,p.GreaterEqualStencilFunc=518,p.GreaterStencilFunc=516,p.GridHelper=class jM extends Al{constructor(n=10,o=10,m=4473924,A=8947848){m=new Dn(m),A=new Dn(A);const E=o/2,w=n/o,T=n/2,B=[],D=[];for(let H=0,Q=0,Z=-T;H<=o;H++,Z+=w){B.push(-T,0,Z,T,0,Z),B.push(Z,0,-T,Z,0,T);const he=H===E?m:A;he.toArray(D,Q),Q+=3,he.toArray(D,Q),Q+=3,he.toArray(D,Q),Q+=3,he.toArray(D,Q),Q+=3}const N=new Fi;N.setAttribute("position",new zn(B,3)),N.setAttribute("color",new zn(D,3)),super(N,new es({vertexColors:!0,toneMapped:!1})),this.type="GridHelper"}dispose(){this.geometry.dispose(),this.material.dispose()}},p.Group=Jr,p.HalfFloatType=yr,p.HemisphereLight=Fv,p.HemisphereLightHelper=class ZM extends Fr{constructor(n,o,m){super(),this.light=n,this.matrix=n.matrixWorld,this.matrixAutoUpdate=!1,this.color=m,this.type="HemisphereLightHelper";
83const A=new rf(o);A.rotateY(.5*Math.PI),this.material=new po({wireframe:!0,fog:!1,toneMapped:!1}),void 0===this.color&&(this.material.vertexColors=!0);const E=A.getAttribute("position"),w=new Float32Array(3*E.count);A.setAttribute("color",new Cr(w,3)),this.add(new Fs(A,this.material)),this.update()}dispose(){this.children[0].geometry.dispose(),this.children[0].material.dispose()}update(){const n=this.children[0];if(void 0!==this.color)this.material.color.set(this.color);else{const o=n.geometry.getAttribute("color");WE.copy(this.light.color),XE.copy(this.light.groundColor);for(let m=0,A=o.count;m<A;m++){const E=m<A/2?WE:XE;o.setXYZ(m,E.r,E.g,E.b)}o.needsUpdate=!0}this.light.updateWorldMatrix(!0,!1),n.lookAt(KM.setFromMatrixPosition(this.light.matrixWorld).negate())}},p.HemisphereLightProbe=class EE extends sm{constructor(n,o,m=1){super(void 0,m),this.isHemisphereLightProbe=!0;const A=(new Dn).set(n),E=(new Dn).set(o),w=new De(A.r,A.g,A.b),T=new De(E.r,E.g,E.b),B=Math.sqrt(Math.PI),D=B*Math.sqrt(.75);this.sh.coefficients[0].copy(w).add(T).multiplyScalar(B),this.sh.coefficients[1].copy(w).sub(T).multiplyScalar(D)}},p.IcosahedronBufferGeometry=class jE extends Nc{constructor(n,o){console.warn("THREE.IcosahedronBufferGeometry has been renamed to THREE.IcosahedronGeometry."),super(n,o)}},p.IcosahedronGeometry=Nc,p.ImageBitmapLoader=class yE extends io{constructor(n){super(n),this.isImageBitmapLoader=!0,typeof createImageBitmap>"u"&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),typeof fetch>"u"&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.options={premultiplyAlpha:"none"}}setOptions(n){return this.options=n,this}load(n,o,m,A){void 0===n&&(n=""),void 0!==this.path&&(n=this.path+n),n=this.manager.resolveURL(n);const E=this,w=Bh.get(n);if(void 0!==w)return E.manager.itemStart(n),setTimeout(function(){o&&o(w),E.manager.itemEnd(n)},0),w;const T={};T.credentials="anonymous"===this.crossOrigin?"same-origin":"include",T.headers=this.requestHeader,fetch(n,T).then(function(B){return B.blob()}).then(function(B){return createImageBitmap(B,Object.assign(E.options,{colorSpaceConversion:"none"}))}).then(function(B){Bh.add(n,B),o&&o(B),E.manager.itemEnd(n)}).catch(function(B){A&&A(B),E.manager.itemError(n),E.manager.itemEnd(n)}),E.manager.itemStart(n)}},p.ImageLoader=bd,p.ImageUtils=ng,p.IncrementStencilOp=7682,p.IncrementWrapStencilOp=34055,p.InstancedBufferAttribute=bo,p.InstancedBufferGeometry=Wv,p.InstancedInterleavedBuffer=class zM extends Qp{constructor(n,o,m=1){super(n,o),this.isInstancedInterleavedBuffer=!0,this.meshPerAttribute=m}copy(n){return super.copy(n),this.meshPerAttribute=n.meshPerAttribute,this}clone(n){const o=super.clone(n);return o.meshPerAttribute=this.meshPerAttribute,o}toJSON(n){const o=super.toJSON(n);return o.isInstancedInterleavedBuffer=!0,o.meshPerAttribute=this.meshPerAttribute,o}},p.InstancedMesh=sd,p.Int16BufferAttribute=class JA extends Cr{constructor(n,o,m){super(new Int16Array(n),o,m)}},p.Int32BufferAttribute=class e_ extends Cr{constructor(n,o,m){super(new Int32Array(n),o,m)}},p.Int8BufferAttribute=class Vx extends Cr{constructor(n,o,m){super(new Int8Array(n),o,m)}},p.IntType=1013,p.InterleavedBuffer=Qp,p.InterleavedBufferAttribute=vh,p.Interpolant=vd,p.InterpolateDiscrete=nh,p.InterpolateLinear=bf,p.InterpolateSmooth=2302,p.InvertStencilOp=5386,p.KeepStencilOp=7680,p.KeyframeTrack=Yo,p.LOD=xo,p.LatheBufferGeometry=class cy extends za{constructor(n,o,m,A){console.warn("THREE.LatheBufferGeometry has been renamed to THREE.LatheGeometry."),super(n,o,m,A)}},p.LatheGeometry=za,p.Layers=zl,p.LessDepth=2,p.LessEqualDepth=3,p.LessEqualStencilFunc=515,p.LessStencilFunc=513,p.Light=zc,p.LightProbe=sm,p.Line=Ja,p.Line3=class XM{constructor(n=new De,o=new De){this.start=n,this.end=o}set(n,o){return this.start.copy(n),this.end.copy(o),this}copy(n){return this.start.copy(n.start),this.end.copy(n.end),this}getCenter(n){return n.addVectors(this.start,this.end).multiplyScalar(.5)}delta(n){return n.subVectors(this.end,this.start)}distanceSq(){return this.start.distanceToSquared(this.end)}distance(){return this.start.distanceTo(this.end)}at(n,o){return this.delta(o).multiplyScalar(n).add(this.start)}closestPointToPointParameter(n,o){VE.subVectors(n,this.start),b0.subVectors(this.end,this.start);const m=b0.dot(b0);let E=b0.dot(VE)/m;return o&&(E=gr(E,0,1)),E}closestPointToPoint(n,o,m){const A=this.closestPointToPointParameter(n,o);return this.delta(m).multiplyScalar(A).add(this.start)}
83applyMatrix4(n){return this.start.applyMatrix4(n),this.end.applyMatrix4(n),this}equals(n){return n.start.equals(this.start)&&n.end.equals(this.end)}clone(){return(new this.constructor).copy(this)}},p.LineBasicMaterial=es,p.LineCurve=as,p.LineCurve3=t0,p.LineDashedMaterial=Iv,p.LineLoop=ec,p.LineSegments=Al,p.LinearEncoding=dc,p.LinearFilter=Mi,p.LinearInterpolant=d0,p.LinearMipMapLinearFilter=1008,p.LinearMipMapNearestFilter=1007,p.LinearMipmapLinearFilter=Il,p.LinearMipmapNearestFilter=1007,p.LinearSRGBColorSpace=tl,p.LinearToneMapping=pa,p.Loader=io,p.LoaderUtils=v0,p.LoadingManager=m0,p.LoopOnce=2200,p.LoopPingPong=2202,p.LoopRepeat=2201,p.LuminanceAlphaFormat=1025,p.LuminanceFormat=1024,p.MOUSE={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},p.Material=qs,p.MaterialLoader=am,p.MathUtils=Aa,p.Matrix3=Di,p.Matrix4=Ti,p.MaxEquation=104,p.Mesh=Fs,p.MeshBasicMaterial=po,p.MeshDepthMaterial=Qg,p.MeshDistanceMaterial=Wg,p.MeshLambertMaterial=Th,p.MeshMatcapMaterial=Tv,p.MeshNormalMaterial=Cv,p.MeshPhongMaterial=rm,p.MeshPhysicalMaterial=_d,p.MeshStandardMaterial=nc,p.MeshToonMaterial=c0,p.MinEquation=103,p.MirroredRepeatWrapping=Nr,p.MixOperation=sr,p.MultiplyBlending=4,p.MultiplyOperation=Tn,p.NearestFilter=Jn,p.NearestMipMapLinearFilter=1005,p.NearestMipMapNearestFilter=1004,p.NearestMipmapLinearFilter=lo,p.NearestMipmapNearestFilter=1004,p.NeverDepth=0,p.NeverStencilFunc=512,p.NoBlending=0,p.NoColorSpace="",p.NoToneMapping=rr,p.NormalAnimationBlendMode=2500,p.NormalBlending=1,p.NotEqualDepth=7,p.NotEqualStencilFunc=517,p.NumberKeyframeTrack=yd,p.Object3D=Fr,p.ObjectLoader=class _E extends io{constructor(n){super(n)}load(n,o,m,A){const E=this,w=""===this.path?v0.extractUrlBase(n):this.path;this.resourcePath=this.resourcePath||w;const T=new rc(this.manager);T.setPath(this.path),T.setRequestHeader(this.requestHeader),T.setWithCredentials(this.withCredentials),T.load(n,function(B){let D=null;try{D=JSON.parse(B)}catch(G){return void 0!==A&&A(G),void console.error("THREE:ObjectLoader: Can't parse "+n+".",G.message)}const N=D.metadata;if(void 0===N||void 0===N.type||"geometry"===N.type.toLowerCase())return void 0!==A&&A(new Error("THREE.ObjectLoader: Can't load "+n)),void console.error("THREE.ObjectLoader: Can't load "+n);E.parse(D,o)},m,A)}loadAsync(n,o){var m=this;return S(function*(){const A=m,E=""===m.path?v0.extractUrlBase(n):m.path;m.resourcePath=m.resourcePath||E;const w=new rc(m.manager);w.setPath(m.path),w.setRequestHeader(m.requestHeader),w.setWithCredentials(m.withCredentials);const T=yield w.loadAsync(n,o),B=JSON.parse(T),D=B.metadata;if(void 0===D||void 0===D.type||"geometry"===D.type.toLowerCase())throw new Error("THREE.ObjectLoader: Can't load "+n);return yield A.parseAsync(B)})()}parse(n,o){const m=this.parseAnimations(n.animations),A=this.parseShapes(n.shapes),E=this.parseGeometries(n.geometries,A),w=this.parseImages(n.images,function(){void 0!==o&&o(D)}),T=this.parseTextures(n.textures,w),B=this.parseMaterials(n.materials,T),D=this.parseObject(n.object,E,B,T,m),N=this.parseSkeletons(n.skeletons,D);if(this.bindSkeletons(D,N),void 0!==o){let G=!1;for(const H in w)if(w[H].data instanceof HTMLImageElement){G=!0;break}!1===G&&o(D)}return D}parseAsync(n){var o=this;return S(function*(){const m=o.parseAnimations(n.animations),A=o.parseShapes(n.shapes),E=o.parseGeometries(n.geometries,A),w=yield o.parseImagesAsync(n.images),T=o.parseTextures(n.textures,w),B=o.parseMaterials(n.materials,T),D=o.parseObject(n.object,E,B,T,m),N=o.parseSkeletons(n.skeletons,D);return o.bindSkeletons(D,N),D})()}parseShapes(n){const o={};if(void 0!==n)for(let m=0,A=n.length;m<A;m++){const E=(new kc).fromJSON(n[m]);o[E.uuid]=E}return o}parseSkeletons(n,o){const m={},A={};if(o.traverse(function(E){E.isBone&&(A[E.uuid]=E)}),void 0!==n)for(let E=0,w=n.length;E<w;E++){const T=(new bh).fromJSON(n[E],A);m[T.uuid]=T}return m}parseGeometries(n,o){const m={};if(void 0!==n){const A=new Xv;for(let E=0,w=n.length;E<w;E++){let T;const B=n[E];switch(B.type){case"BufferGeometry":case"InstancedBufferGeometry":T=A.parse(B);break;default:B.type in Mv?T=Mv[B.type].fromJSON(B,o):console.warn(`THREE.ObjectLoader: Unsupported geometry type "${B.type}"`)}T.uuid=B.uuid,void 0!==B.name&&(T.name=B.name),void 0!==B.userData&&(T.userData=B.userData),m[B.uuid]=T}}return m}parseMaterials(n,o){const m={},A={};if(void 0!==n){const E=new am;E.setTextures(o);for(let w=0,T=n.length;w<T;w++){const B=n[w];void 0===m[B.uuid]&&(m[B.uuid]=E.parse(B)),A[B.uuid]=m[B.uuid]}}return A}parseAnimations(n){const o={};if(void 0!==n)for(let m=0;m<n.length;m++){const E=Ed.parse(n[m]);o[E.uuid]=E}return o}parseImages(n,o){const m=this,A={};let E;function T(B){if("string"==typeof B){const D=B;return function w(B){return m.manager.itemStart(B),E.load(B,function(){m.manager.itemEnd(B)},void 0,function(){m.manager.itemError(B),m.manager.itemEnd(B)})}(/^(\/\/)|([a-z]+:(\/\/)?)/i.test(D)?D:m.resourcePath+D)}return B.data?{data:gc(B.type,B.data),width:B.width,height:B.height}:null}if(void 0!==n&&n.length>0){const B=new m0(o);E=new bd(B),E.setCrossOrigin(this.crossOrigin);for(let D=0,N=n.length;D<N;D++){const G=n[D],H=G.url;if(Array.isArray(H)){const Q=[];for(let Z=0,he=H.length;Z<he;Z++){const Y=T(H[Z]);null!==Y&&(Y instanceof HTMLImageElement?Q.push(Y):Q.push(new Eo(Y.data,Y.width,Y.height)))}A[G.uuid]=new Ol(Q)}else{const Q=T(G.url);A[G.uuid]=new Ol(Q)}}}return A}parseImagesAsync(n){var o=this;return S(function*(){const m=o,A={};let E;function w(B){return T.apply(this,arguments)}
83function T(){return(T=S(function*(B){if("string"==typeof B){const D=B,N=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(D)?D:m.resourcePath+D;return yield E.loadAsync(N)}return B.data?{data:gc(B.type,B.data),width:B.width,height:B.height}:null})).apply(this,arguments)}if(void 0!==n&&n.length>0){E=new bd(o.manager),E.setCrossOrigin(o.crossOrigin);for(let B=0,D=n.length;B<D;B++){const N=n[B],G=N.url;if(Array.isArray(G)){const H=[];for(let Q=0,Z=G.length;Q<Z;Q++){const he=G[Q],J=yield w(he);null!==J&&(J instanceof HTMLImageElement?H.push(J):H.push(new Eo(J.data,J.width,J.height)))}A[N.uuid]=new Ol(H)}else{const H=yield w(N.url);A[N.uuid]=new Ol(H)}}}return A})()}parseTextures(n,o){function m(E,w){return"number"==typeof E?E:(console.warn("THREE.ObjectLoader.parseTexture: Constant should be in numeric form.",E),w[E])}const A={};if(void 0!==n)for(let E=0,w=n.length;E<w;E++){const T=n[E];void 0===T.image&&console.warn('THREE.ObjectLoader: No "image" specified for',T.uuid),void 0===o[T.image]&&console.warn("THREE.ObjectLoader: Undefined image",T.image);
vendor: 4,162 bytes, line 83
83const B=o[T.image],D=B.data;let N;Array.isArray(D)?(N=new zf,6===D.length&&(N.needsUpdate=!0)):(N=D&&D.data?new Eo:new va,D&&(N.needsUpdate=!0)),N.source=B,N.uuid=T.uuid,void 0!==T.name&&(N.name=T.name),void 0!==T.mapping&&(N.mapping=m(T.mapping,vE)),void 0!==T.channel&&(N.channel=T.channel),void 0!==T.offset&&N.offset.fromArray(T.offset),void 0!==T.repeat&&N.repeat.fromArray(T.repeat),void 0!==T.center&&N.center.fromArray(T.center),void 0!==T.rotation&&(N.rotation=T.rotation),void 0!==T.wrap&&(N.wrapS=m(T.wrap[0],qv),N.wrapT=m(T.wrap[1],qv)),void 0!==T.format&&(N.format=T.format),void 0!==T.internalFormat&&(N.internalFormat=T.internalFormat),void 0!==T.type&&(N.type=T.type),void 0!==T.encoding&&(N.encoding=T.encoding),void 0!==T.minFilter&&(N.minFilter=m(T.minFilter,Yv)),void 0!==T.magFilter&&(N.magFilter=m(T.magFilter,Yv)),void 0!==T.anisotropy&&(N.anisotropy=T.anisotropy),void 0!==T.flipY&&(N.flipY=T.flipY),void 0!==T.generateMipmaps&&(N.generateMipmaps=T.generateMipmaps),void 0!==T.premultiplyAlpha&&(N.premultiplyAlpha=T.premultiplyAlpha),void 0!==T.unpackAlignment&&(N.unpackAlignment=T.unpackAlignment),void 0!==T.userData&&(N.userData=T.userData),A[T.uuid]=N}return A}parseObject(n,o,m,A,E){let w,N,G;function T(H){return void 0===o[H]&&console.warn("THREE.ObjectLoader: Undefined geometry",H),o[H]}function B(H){if(void 0!==H){if(Array.isArray(H)){const Q=[];for(let Z=0,he=H.length;Z<he;Z++){const J=H[Z];void 0===m[J]&&console.warn("THREE.ObjectLoader: Undefined material",J),Q.push(m[J])}return Q}return void 0===m[H]&&console.warn("THREE.ObjectLoader: Undefined material",H),m[H]}}function D(H){return void 0===A[H]&&console.warn("THREE.ObjectLoader: Undefined texture",H),A[H]}switch(n.type){case"Scene":w=new uv,void 0!==n.background&&(w.background=Number.isInteger(n.background)?new Dn(n.background):D(n.background)),void 0!==n.environment&&(w.environment=D(n.environment)),void 0!==n.fog&&("Fog"===n.fog.type?w.fog=new Hp(n.fog.color,n.fog.near,n.fog.far):"FogExp2"===n.fog.type&&(w.fog=new Vp(n.fog.color,n.fog.density))),void 0!==n.backgroundBlurriness&&(w.backgroundBlurriness=n.backgroundBlurriness),void 0!==n.backgroundIntensity&&(w.backgroundIntensity=n.backgroundIntensity);break;case"PerspectiveCamera":w=new $s(n.fov,n.aspect,n.near,n.far),void 0!==n.focus&&(w.focus=n.focus),void 0!==n.zoom&&(w.zoom=n.zoom),void 0!==n.filmGauge&&(w.filmGauge=n.filmGauge),void 0!==n.filmOffset&&(w.filmOffset=n.filmOffset),void 0!==n.view&&(w.view=Object.assign({},n.view));break;case"OrthographicCamera":w=new Cc(n.left,n.right,n.top,n.bottom,n.near,n.far),void 0!==n.zoom&&(w.zoom=n.zoom),void 0!==n.view&&(w.view=Object.assign({},n.view));break;case"AmbientLight":w=new Vv(n.color,n.intensity);break;case"DirectionalLight":w=new Gv(n.color,n.intensity);break;case"PointLight":w=new zv(n.color,n.intensity,n.distance,n.decay);break;case"RectAreaLight":w=new Hv(n.color,n.intensity,n.width,n.height);break;case"SpotLight":w=new Nv(n.color,n.intensity,n.distance,n.angle,n.penumbra,n.decay);break;case"HemisphereLight":w=new Fv(n.color,n.groundColor,n.intensity);break;case"LightProbe":w=(new sm).fromJSON(n);break;case"SkinnedMesh":N=T(n.geometry),G=B(n.material),w=new Jl(N,G),void 0!==n.bindMode&&(w.bindMode=n.bindMode),void 0!==n.bindMatrix&&w.bindMatrix.fromArray(n.bindMatrix),void 0!==n.skeleton&&(w.skeleton=n.skeleton);break;case"Mesh":N=T(n.geometry),G=B(n.material),w=new Fs(N,G);break;case"InstancedMesh":N=T(n.geometry),G=B(n.material);const Q=n.instanceMatrix,Z=n.instanceColor;w=new sd(N,G,n.count),w.instanceMatrix=new bo(new Float32Array(Q.array),16),void 0!==Z&&(w.instanceColor=new bo(new Float32Array(Z.array),Z.itemSize));break;case"LOD":w=new xo;break;case"Line":w=new Ja(T(n.geometry),B(n.material));break;case"LineLoop":w=new ec(T(n.geometry),B(n.material));break;case"LineSegments":w=new Al(T(n.geometry),B(n.material));break;case"PointCloud":case"Points":w=new Zp(T(n.geometry),B(n.material));break;case"Sprite":w=new Ir(B(n.material));break;case"Group":w=new Jr;break;case"Bone":w=new ml;break;default:w=new Fr}if(w.uuid=n.uuid,void 0!==n.name&&(w.name=n.name),void 0!==n.matrix?(w.matrix.fromArray(n.matrix
vendor: 1,162 bytes, line 83
83),void 0!==n.matrixAutoUpdate&&(w.matrixAutoUpdate=n.matrixAutoUpdate),w.matrixAutoUpdate&&w.matrix.decompose(w.position,w.quaternion,w.scale)):(void 0!==n.position&&w.position.fromArray(n.position),void 0!==n.rotation&&w.rotation.fromArray(n.rotation),void 0!==n.quaternion&&w.quaternion.fromArray(n.quaternion),void 0!==n.scale&&w.scale.fromArray(n.scale)),void 0!==n.up&&w.up.fromArray(n.up),void 0!==n.castShadow&&(w.castShadow=n.castShadow),void 0!==n.receiveShadow&&(w.receiveShadow=n.receiveShadow),n.shadow&&(void 0!==n.shadow.bias&&(w.shadow.bias=n.shadow.bias),void 0!==n.shadow.normalBias&&(w.shadow.normalBias=n.shadow.normalBias),void 0!==n.shadow.radius&&(w.shadow.radius=n.shadow.radius),void 0!==n.shadow.mapSize&&w.shadow.mapSize.fromArray(n.shadow.mapSize),void 0!==n.shadow.camera&&(w.shadow.camera=this.parseObject(n.shadow.camera))),void 0!==n.visible&&(w.visible=n.visible),void 0!==n.frustumCulled&&(w.frustumCulled=n.frustumCulled),void 0!==n.renderOrder&&(w.renderOrder=n.renderOrder),void 0!==n.userData&&(w.userData=n.userData),void 0!==n.layers&&(w.layers.mask=n.layers),void 0!==n.children){const H=n.children;for(let Q=0;Q<H.length;
vendor: 6,795 bytes, line 83
83Q++)w.add(this.parseObject(H[Q],o,m,A,E))}if(void 0!==n.animations){const H=n.animations;for(let Q=0;Q<H.length;Q++)w.animations.push(E[H[Q]])}if("LOD"===n.type){void 0!==n.autoUpdate&&(w.autoUpdate=n.autoUpdate);const H=n.levels;for(let Q=0;Q<H.length;Q++){const Z=H[Q],he=w.getObjectByProperty("uuid",Z.object);void 0!==he&&w.addLevel(he,Z.distance,Z.hysteresis)}}return w}bindSkeletons(n,o){0!==Object.keys(o).length&&n.traverse(function(m){if(!0===m.isSkinnedMesh&&void 0!==m.skeleton){const A=o[m.skeleton];void 0===A?console.warn("THREE.ObjectLoader: No skeleton found with UUID:",m.skeleton):m.bind(A,m.bindMatrix)}})}},p.ObjectSpaceNormalMap=1,p.OctahedronBufferGeometry=class hy extends rf{constructor(n,o){console.warn("THREE.OctahedronBufferGeometry has been renamed to THREE.OctahedronGeometry."),super(n,o)}},p.OctahedronGeometry=rf,p.OneFactor=201,p.OneMinusDstAlphaFactor=207,p.OneMinusDstColorFactor=209,p.OneMinusSrcAlphaFactor=205,p.OneMinusSrcColorFactor=203,p.OrthographicCamera=Cc,p.PCFShadowMap=K,p.PCFSoftShadowMap=le,p.PMREMGenerator=Rp,p.Path=vs,p.PerspectiveCamera=$s,p.Plane=fh,p.PlaneBufferGeometry=class T0 extends bc{constructor(n,o,m,A){console.warn("THREE.PlaneBufferGeometry has been renamed to THREE.PlaneGeometry."),super(n,o,m,A)}},p.PlaneGeometry=bc,p.PlaneHelper=class Md extends Ja{constructor(n,o=1,m=16776960){const A=m,w=new Fi;w.setAttribute("position",new zn([1,-1,0,-1,1,0,-1,-1,0,1,1,0,-1,1,0,-1,-1,0,1,-1,0,1,1,0],3)),w.computeBoundingSphere(),super(w,new es({color:A,toneMapped:!1})),this.type="PlaneHelper",this.plane=n,this.size=o;const B=new Fi;B.setAttribute("position",new zn([1,1,0,-1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,-1,0],3)),B.computeBoundingSphere(),this.add(new Fs(B,new po({color:A,opacity:.2,transparent:!0,depthWrite:!1,toneMapped:!1})))}updateMatrixWorld(n){this.position.set(0,0,0),this.scale.set(.5*this.size,.5*this.size,1),this.lookAt(this.plane.normal),this.translateZ(-this.plane.constant),super.updateMatrixWorld(n)}dispose(){this.geometry.dispose(),this.material.dispose(),this.children[0].geometry.dispose(),this.children[0].material.dispose()}},p.PointLight=zv,p.PointLightHelper=class $M extends Fs{constructor(n,o,m){super(new Wr(o,4,2),new po({wireframe:!0,fog:!1,toneMapped:!1})),this.light=n,this.color=m,this.type="PointLightHelper",this.matrix=this.light.matrixWorld,this.matrixAutoUpdate=!1,this.update()}dispose(){this.geometry.dispose(),this.material.dispose()}update(){this.light.updateWorldMatrix(!0,!1),void 0!==this.color?this.material.color.set(this.color):this.material.color.copy(this.light.color)}},p.Points=Zp,p.PointsMaterial=Xu,p.PolarGridHelper=class JM extends Al{constructor(n=10,o=16,m=8,A=64,E=4473924,w=8947848){E=new Dn(E),w=new Dn(w);const T=[],B=[];if(o>1)for(let G=0;G<o;G++){const H=G/o*(2*Math.PI),Q=Math.sin(H)*n,Z=Math.cos(H)*n;T.push(0,0,0),T.push(Q,0,Z);const he=1&G?E:w;B.push(he.r,he.g,he.b),B.push(he.r,he.g,he.b)}for(let G=0;G<m;G++){const H=1&G?E:w,Q=n-n/m*G;for(let Z=0;Z<A;Z++){let he=Z/A*(2*Math.PI),J=Math.sin(he)*Q,Y=Math.cos(he)*Q;T.push(J,0,Y),B.push(H.r,H.g,H.b),he=(Z+1)/A*(2*Math.PI),J=Math.sin(he)*Q,Y=Math.cos(he)*Q,T.push(J,0,Y),B.push(H.r,H.g,H.b)}}const D=new Fi;D.setAttribute("position",new zn(T,3)),D.setAttribute("color",new zn(B,3)),super(D,new es({vertexColors:!0,toneMapped:!1})),this.type="PolarGridHelper"}dispose(){this.geometry.dispose(),this.material.dispose()}},p.PolyhedronBufferGeometry=class JE extends Sr{constructor(n,o,m,A){console.warn("THREE.PolyhedronBufferGeometry has been renamed to THREE.PolyhedronGeometry."),super(n,o,m,A)}},p.PolyhedronGeometry=Sr,p.PositionalAudio=class TE extends ey{constructor(n){super(n),this.panner=this.context.createPanner(),this.panner.panningModel="HRTF",this.panner.connect(this.gain)}disconnect(){super.disconnect(),this.panner.disconnect(this.gain)}getOutput(){return this.panner}getRefDistance(){return this.panner.refDistance}setRefDistance(n){return this.panner.refDistance=n,this}getRolloffFactor(){return this.panner.rolloffFactor}setRolloffFactor(n){return this.panner.rolloffFactor=n,this}getDistanceModel(){return this.panner.distanceModel}setDistanceModel(n){return this.panner.distanceModel=n,this}getMaxDistance(){return this.panner.maxDistance}setMaxDistance(n){return this.panner.maxDistance=n,this}setDirectionalCone(n,o,m){return this.panner.coneInnerAngle=n,this.panner.coneOuterAngle=o,this.panner.coneOuterGain=m,this}updateMatrixWorld(n){if(super.updateMatrixWorld(n),!0===this.hasPlaybackControl&&!1===this.isPlaying)return;this.matrixWorld.decompose(kh,ty,CE),Oh.set(0,0,1).applyQuaternion(ty);const o=this.panner;if(o.positionX){const m=this.context.currentTime+this.listener.timeDelta;o.positionX.linearRampToValueAtTime(kh.x,m),o.positionY.linearRampToValueAtTime(kh.y,m),o.positionZ.linearRampToValueAtTime(kh.z,m),o.orientationX.linearRampToValueAtTime(Oh.x,m),o.orientationY.linearRampToValueAtTime(Oh.y,m),o.orientationZ.linearRampToValueAtTime(Oh.z,m)}else o.setPosition(kh.x,kh.y,kh.z),o.setOrientation(Oh.x,Oh.y,Oh.z)}},p.PropertyBinding=Rr,p.PropertyMixer=ny,p.QuadraticBezierCurve=eo,p.QuadraticBezierCurve3=$u,p.Quaternion=Xs,p.QuaternionKeyframeTrack=sf,p.QuaternionLinearInterpolant=Lv,p.RED_GREEN_RGTC2_Format=36285,p.RED_RGTC1_Format=36283,p.REVISION=I,p.RGBADepthPacking=3201,p.RGBAFormat=ea,p.RGBAIntegerFormat=1033,p.RGBA_ASTC_10x10_Format=37819,p.RGBA_ASTC_10x5_Format=37816,p.RGBA_ASTC_10x6_Format=37817,p.RGBA_ASTC_10x8_Format=37818,p.RGBA_ASTC_12x10_Format=37820,p.RGBA_ASTC_12x12_Format=37821,p.RGBA_ASTC_4x4_Format=37808,p.RGBA_ASTC_5x4_Format=37809,p.RGBA_ASTC_5x5_Format=37810,p.RGBA_ASTC_6x5_Format=37811,p.RGBA_ASTC_6x6_Format=37812,p.RGBA_ASTC_8x5_Format=37813,p.RGBA_ASTC_8x6_Format=37814,p.RGBA_ASTC_8x8_Format=37815,p.RGBA_BPTC_Format=th,p.RGBA_ETC2_EAC_Format=37496,p.RGBA_PVRTC_2BPPV1_Format=35843,p.RGBA_PVRTC_4BPPV1_Format=35842,p.RGBA_S3TC_DXT1_Format=Do,p.RGBA_S3TC_DXT3_Format=tu,p.RGBA_S3TC_DXT5_Format=yf,p.RGB_ETC1_Format=36196,p.RGB_ETC2_Format=37492,p.RGB_PVRTC_2BPPV1_Format=35841,p.RGB_PVRTC_4BPPV1_Format=35840,p.RGB_S3TC_DXT1_Format=eu,p.RGFormat=1030,p.RGIntegerFormat=1031,p.RawShaderMaterial=Co,p.Ray=hp,p.Raycaster=class VM{constructor(n,o,m=0,A=1/0){this.ray=new hp(n,o),this.near=m,this.far=A,this.camera=null,this.layers=new zl,this.params={Mesh:{},Line:{threshold:1},LOD:{},Points:{threshold:1},Sprite:{}}}set(n,o){this.ray.set(n,o)}setFromCamera(n,o){o.isPerspectiveCamera?(this.ray.origin.setFromMatrixPosition(o.matrixWorld),this.ray.direction.set(n.x,n.y,.5).unproject(o).sub(this.ray.origin).normalize(),this.camera=o):o.isOrthographicCamera?(this.ray.origin.set(n.x,n.y,(o.near+o.far)/(o.near-o.far)).unproject(o),this.ray.direction.set(0,0,-1).transformDirection(o.matrixWorld),this.camera=o):console.error("THREE.Raycaster: 
83Unsupported camera type: "+o.type)}intersectObject(n,o=!0,m=[]){return ry(n,this,m,o),m.sort(zE),m}intersectObjects(n,o=!0,m=[]){for(let A=0,E=n.length;A<E;A++)ry(n[A],this,m,o);return m.sort(zE),m}},p.RectAreaLight=Hv,p.RedFormat=1028,p.RedIntegerFormat=1029,p.ReinhardToneMapping=wr,p.RepeatWrapping=at,p.ReplaceStencilOp=7681,p.ReverseSubtractEquation=102,p.RingBufferGeometry=class eb extends gd{constructor(n,o,m,A,E,w){console.warn("THREE.RingBufferGeometry has been renamed to THREE.RingGeometry."),super(n,o,m,A,E,w)}},p.RingGeometry=gd,p.SIGNED_RED_GREEN_RGTC2_Format=36286,p.SIGNED_RED_RGTC1_Format=36284,p.SRGBColorSpace=Zr,p.Scene=uv,p.ShaderChunk=bi,p.ShaderLib=Oa,p.ShaderMaterial=hl,p.ShadowMaterial=wv,p.Shape=kc,p.ShapeBufferGeometry=class tb extends Ts{constructor(n,o){console.warn("THREE.ShapeBufferGeometry has been renamed to THREE.ShapeGeometry."),super(n,o)}},p.ShapeGeometry=Ts,p.ShapePath=class w0{constructor(){this.type="ShapePath",this.color=new Dn,this.subPaths=[],this.currentPath=null}moveTo(n,o){return this.currentPath=new vs,this.subPaths.push(this.currentPath),this.currentPath.moveTo(n,o),this}lineTo(n,o){return this.currentPath.lineTo(n,o),this}quadraticCurveTo(n,o,m,A){return this.currentPath.quadraticCurveTo(n,o,m,A),this}bezierCurveTo(n,o,m,A,E,w){return this.currentPath.bezierCurveTo(n,o,m,A,E,w),this}splineThru(n){return this.currentPath.splineThru(n),this}toShapes(n){function m(Y,ve){const pe=ve.length;let Ae=!1;for(let Ie=pe-1,Ne=0;Ne<pe;Ie=Ne++){let Xe=ve[Ie],Qe=ve[Ne],Se=Qe.x-Xe.x,Le=Qe.y-Xe.y;if(Math.abs(Le)>Number.EPSILON){if(Le<0&&(Xe=ve[Ne],Se=-Se,Qe=ve[Ie],Le=-Le),Y.y<Xe.y||Y.y>Qe.y)continue;if(Y.y===Xe.y){if(Y.x===Xe.x)return!0}else{const vt=Le*(Y.x-Xe.x)-Se*(Y.y-Xe.y);if(0===vt)return!0;if(vt<0)continue;Ae=!Ae}}else{if(Y.y!==Xe.y)continue;if(Qe.x<=Y.x&&Y.x<=Xe.x||Xe.x<=Y.x&&Y.x<=Qe.x)return!0}}return Ae}const A=no.isClockWise,E=this.subPaths;if(0===E.length)return[];let w,T,B;const D=[];if(1===E.length)return T=E[0],B=new kc,B.curves=T.curves,D.push(B),D;let N=!A(E[0].getPoints());N=n?!N:N;const G=[],H=[];let he,J,Q=[],Z=0;H[Z]=void 0,Q[Z]=[];for(let Y=0,ve=E.length;Y<ve;Y++)T=E[Y],he=T.getPoints(),w=A(he),w=n?!w:w,w?(!N&&H[Z]&&Z++,H[Z]={s:new kc,p:he},H[Z].s.curves=T.curves,N&&Z++,Q[Z]=[]):Q[Z].push({h:T,p:he[0]});if(!H[0])return function o(Y){const ve=[];for(let pe=0,Ae=Y.length;pe<Ae;pe++){const Ie=Y[pe],Ne=new kc;Ne.curves=Ie.curves,ve.push(Ne)}return ve}(E);if(H.length>1){let Y=!1,ve=0;for(let pe=0,Ae=H.length;pe<Ae;pe++)G[pe]=[];for(let pe=0,Ae=H.length;pe<Ae;pe++){const Ie=Q[pe];for(let Ne=0;Ne<Ie.length;Ne++){const Xe=Ie[Ne];let Qe=!0;for(let Se=0;Se<H.length;Se++)m(Xe.p,H[Se].p)&&(pe!==Se&&ve++,Qe?(Qe=!1,G[Se].push(Xe)):Y=!0);Qe&&G[pe].push(Xe)}}ve>0&&!1===Y&&(Q=G)}for(let Y=0,ve=H.length;Y<ve;Y++){B=H[Y].s,D.push(B),J=Q[Y];for(let pe=0,Ae=J.length;pe<Ae;pe++)B.holes.push(J[pe].h)}return D}},p.ShapeUtils=no,p.ShortType=1011,p.Skeleton=bh,p.SkeletonHelper=class YM extends Al{constructor(n){const o=QE(n),m=new Fi,A=[],E=[],w=new Dn(0,0,1),T=new Dn(0,1,0);for(let D=0;D<o.length;D++){const N=o[D];N.parent&&N.parent.isBone&&(A.push(0,0,0),A.push(0,0,0),E.push(w.r,w.g,w.b),E.push(T.r,T.g,T.b))}m.setAttribute("position",new zn(A,3)),m.setAttribute("color",new zn(E,3)),super(m,new es({vertexColors:!0,depthTest:!1,depthWrite:!1,toneMapped:!1,transparent:!0})),this.isSkeletonHelper=!0,this.type="SkeletonHelper",this.root=n,this.bones=o,this.matrix=n.matrixWorld,this.matrixAutoUpdate=!1}updateMatrixWorld(n){const o=this.bones,m=this.geometry,A=m.getAttribute("position");sy.copy(this.root.matrixWorld).invert();for(let E=0,w=0;E<o.length;E++){const T=o[E];T.parent&&T.parent.isBone&&(S0.multiplyMatrices(sy,T.matrixWorld),Nh.setFromMatrixPosition(S0),A.setXYZ(w,Nh.x,Nh.y,Nh.z),S0.multiplyMatrices(sy,T.parent.matrixWorld),Nh.setFromMatrixPosition(S0),A.setXYZ(w+1,Nh.x,Nh.y,Nh.z),w+=2)}m.getAttribute("position").needsUpdate=!0,super.updateMatrixWorld(n)}dispose(){this.geometry.dispose(),this.material.dispose()}},p.SkinnedMesh=Jl,p.Source=Ol,p.Sphere=Ul,p.SphereBufferGeometry=class nb extends Wr{constructor(n,o,m,A,E,w,T){console.warn("THREE.SphereBufferGeometry has been renamed to THREE.SphereGeometry."),super(n,o,m,A,E,w,T)}},p.SphereGeometry=Wr,p.Spherical=class HM{constructor(n=1,o=0,m=0){return this.radius=n,this.phi=o,this.theta=m,this}set(n,o,m){return this.radius=n,this.phi=o,this.theta=m,this}copy(n){return this.radius=n.radius,this.phi=n.phi,this.theta=n.theta,this}makeSafe(){return this.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,this.phi)),this}setFromVector3(n){return this.setFromCartesianCoords(n.x,n.y,n.z)}setFromCartesianCoords(n,o,m){return this.radius=Math.sqrt(n*n+o*o+m*m),0===this.radius?(this.theta=0,this.phi=0):(this.theta=Math.atan2(n,m),this.phi=Math.acos(gr(o/this.radius,-1,1))),this}clone(){return(new this.constructor).copy(this)}},p.SphericalHarmonics3=Qv,p.SplineCurve=ud,p.SpotLight=Nv,p.SpotLightHelper=class qM extends Fr{constructor(n,o){super(),this.light=n,this.matrix=n.matrixWorld,this.matrixAutoUpdate=!1,this.color=o,this.type="SpotLightHelper";const m=new Fi,A=[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 w=0,T=1,B=32;w<B;w++,T++){const D=w/B*Math.PI*2,N=T/B*Math.PI*2;A.push(Math.cos(D),Math.sin(D),1,Math.cos(N),Math.sin(N),1)}m.setAttribute("position",new zn(A,3));const E=new es({fog:!1,toneMapped:!1});this.cone=new Al(m,E),this.add(this.cone),this.update()}dispose(){this.cone.geometry.dispose(),this.cone.material.dispose()}update(){this.light.updateWorldMatrix(!0,!1),this.light.target.updateWorldMatrix(!0,!1);const n=this.light.distance?this.light.distance:1e3,o=n*Math.tan(this.light.angle);this.cone.scale.set(o,o,n),HE.setFromMatrixPosition(this.light.target.matrixWorld),this.cone.lookAt(HE),void 0!==this.color?this.cone.material.color.set(this.color):this.cone.material.color.copy(this.light.color)}},p.Sprite=Ir,p.SpriteMaterial=la,p.SrcAlphaFactor=204,p.SrcAlphaSaturateFactor=210,p.SrcColorFactor=202,p.StaticCopyUsage=35046,p.StaticDrawUsage=au,p.StaticReadUsage=35045,p.StereoCamera=class SE{constructor(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new $s,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new $s,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(n){const o=this._cache;if(o.focus!==n.focus||o.fov!==n.fov||o.aspect!==n.aspect*this.aspect||o.near!==n.near||o.far!==n.far||o.zoom!==n.zoom||o.eyeSep!==this.eyeSep){o.focus=n.focus,o.fov=n.fov,o.aspect=n.aspect*this.aspect,o.near=n.near,o.far=n.far,o.zoom=n.zoom,o.eyeSep=this.eyeSep,Lh.copy(n.projectionMatrix);const A=o.eyeSep/2,E=A*o.near/o.focus,w=o.near*Math.tan(pc*o.fov*.5)/o.zoom;let T,B;Kv.elements[12]=-A,$v.elements[12]=A,T=-w*o.aspect+E,B=w*o.aspect+E,Lh.elements[0]=2*o.near/(B-T),Lh.elements[8]=(B+T)/(B-T),this.cameraL.projectionMatrix.copy(Lh),T=-w*o.aspect-E,B=w*o.aspect-E,Lh.elements[0]=2*o.near/(B-T),Lh.elements[8]=(B+T)/(B-T),this.cameraR.projectionMatrix.copy(Lh)}this.cameraL.matrixWorld.copy(n.matrixWorld).multiply(Kv),this.cameraR.matrixWorld.copy(n.matrixWorld).multiply($v)}},p.StreamCopyUsage=35042,p.StreamDrawUsage=35040,p.StreamReadUsage=35041,p.Str
83ingKeyframeTrack=Rh,p.SubtractEquation=101,p.SubtractiveBlending=3,p.TOUCH={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},p.TangentSpaceNormalMap=0,p.TetrahedronBufferGeometry=class ib extends xl{constructor(n,o){console.warn("THREE.TetrahedronBufferGeometry has been renamed to THREE.TetrahedronGeometry."),super(n,o)}},p.TetrahedronGeometry=xl,p.Texture=va,p.TextureLoader=class pE extends io{constructor(n){super(n)}load(n,o,m,A){const E=new va,w=new bd(this.manager);return w.setCrossOrigin(this.crossOrigin),w.setPath(this.path),w.load(n,function(T){E.image=T,E.needsUpdate=!0,void 0!==o&&o(E)},m,A),E}},p.TorusBufferGeometry=class rb extends El{constructor(n,o,m,A,E){console.warn("THREE.TorusBufferGeometry has been renamed to THREE.TorusGeometry."),super(n,o,m,A,E)}},p.TorusGeometry=El,p.TorusKnotBufferGeometry=class sb extends Ad{constructor(n,o,m,A,E,w){console.warn("THREE.TorusKnotBufferGeometry has been renamed to THREE.TorusKnotGeometry."),super(n,o,m,A,E,w)}},p.TorusKnotGeometry=Ad,p.Triangle=ra,p.TriangleFanDrawMode=2,p.TriangleStripDrawMode=1,p.TrianglesDrawMode=0,p.TubeBufferGeometry=class ab extends Uc{constructor(n,o,m,A,E){console.warn("THREE.TubeBufferGeometry has been renamed to THREE.TubeGeometry."),super(n,o,m,A,E)}},p.TubeGeometry=Uc,p.TwoPassDoubleSide=2,p.UVMapping=300,p.Uint16BufferAttribute=gp,p.Uint32BufferAttribute=Ff,p.Uint8BufferAttribute=class mp extends Cr{constructor(n,o,m){super(new Uint8Array(n),o,m)}},p.Uint8ClampedBufferAttribute=class Df extends Cr{constructor(n,o,m){super(new Uint8ClampedArray(n),o,m)}},p.Uniform=iy,p.UniformsGroup=class UM extends Ki{constructor(){super(),this.isUniformsGroup=!0,Object.defineProperty(this,"id",{value:NM++}),this.name="",this.usage=au,this.uniforms=[]}add(n){return this.uniforms.push(n),this}remove(n){const o=this.uniforms.indexOf(n);return-1!==o&&this.uniforms.splice(o,1),this}setName(n){return this.name=n,this}setUsage(n){return this.usage=n,this}dispose(){return this.dispatchEvent({type:"dispose"}),this}copy(n){this.name=n.name,this.usage=n.usage;const o=n.uniforms;this.uniforms.length=0;for(let m=0,A=o.length;m<A;m++)this.uniforms.push(o[m].clone());return this}clone(){return(new this.constructor).copy(this)}},p.UniformsLib=gn,p.UniformsUtils=Ag,p.UnsignedByteType=Ko,p.UnsignedInt248Type=Bl,p.UnsignedIntType=Pl,p.UnsignedShort4444Type=1017,p.UnsignedShort5551Type=1018,p.UnsignedShortType=1012,p.VSMShadowMap=ce,p.Vector2=qt,p.Vector3=De,p.Vector4=fr,p.VectorKeyframeTrack=xd,p.VideoTexture=class gv extends va{constructor(n,o,m,A,E,w,T,B,D){super(n,o,m,A,E,w,T,B,D),this.isVideoTexture=!0,this.minFilter=void 0!==w?w:Mi,this.magFilter=void 0!==E?E:Mi,this.generateMipmaps=!1;const N=this;"requestVideoFrameCallback"in n&&n.requestVideoFrameCallback(function G(){N.needsUpdate=!0,n.requestVideoFrameCallback(G)})}clone(){return new this.constructor(this.image).copy(this)}update(){const n=this.image;"requestVideoFrameCallback"in n==0&&n.readyState>=n.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}},p.WebGL1Renderer=Gp,p.WebGL3DRenderTarget=class La extends Fo{constructor(n=1,o=1,m=1){super(n,o),this.isWebGL3DRenderTarget=!0,this.depth=m,this.texture=new ap(null,n,o,m),this.texture.isRenderTargetTexture=!0}},p.WebGLArrayRenderTarget=class zx extends Fo{constructor(n=1,o=1,m=1){super(n,o),this.isWebGLArrayRenderTarget=!0,this.depth=m,this.texture=new sp(null,n,o,m),this.texture.isRenderTargetTexture=!0}},p.WebGLCubeRenderTarget=a_,p.WebGLMultipleRenderTargets=class oh extends Fo{constructor(n=1,o=1,m=1,A={}){super(n,o,A),this.isWebGLMultipleRenderTargets=!0;const E=this.texture;this.texture=[];for(let w=0;w<m;w++)this.texture[w]=E.clone(),this.texture[w].isRenderTargetTexture=!0}setSize(n,o,m=1){if(this.width!==n||this.height!==o||this.depth!==m){this.width=n,this.height=o,this.depth=m;for(let A=0,E=this.texture.length;A<E;A++)this.texture[A].image.width=n,this.texture[A].image.height=o,this.texture[A].image.depth=m;this.dispose()}return this.viewport.set(0,0,n,o),this.scissor.set(0,0,n,o),this}copy(n){this.dispose(),this.width=n.width,this.height=n.height,this.depth=n.depth,this.viewport.set(0,0,this.width,this.height),this.scissor.set(0,0,this.width,this.height),this.depthBuffer=n.depthBuffer,this.stencilBuffer=n.stencilBuffer,null!==n.depthTexture&&(this.depthTexture=n.depthTexture.clone()),this.texture.length=0;for(let o=0,m=n.texture.length;o<m;o++)this.texture[o]=n.texture[o].clone(),this.texture[o].isRenderTargetTexture=!0;return this}},p.WebGLRenderTarget=Fo,p.WebGLRenderer=_h,p.WebGLUtils=Na,p.WireframeGeometry=Sv,p.WrapAroundEnding=fc,p.ZeroCurvatureEnding=co,p.ZeroF
83actor=200,p.ZeroSlopeEnding=Jo,p.ZeroStencilOp=0,p._SRGBAFormat=1035,p.sRGBEncoding=xr},2747:(d,p,v)=>{"use strict";v.d(p,{Dx:()=>le,KO:()=>re,Rt:()=>me,cN:()=>ae,lx:()=>ce,mY:()=>be});var S=v(51601);const{I}=S.ge,me=$=>void 0===$.strings,K=()=>document.createComment(""),le=($,ue,_e)=>{const we=$._$AA.parentNode,Oe=void 0===ue?$._$AB:ue._$AA;if(void 0===_e){const it=we.insertBefore(K(),Oe),on=we.insertBefore(K(),Oe);_e=new I(it,on,$,$.options)}else{const it=_e._$AB.nextSibling,on=_e._$AM,Yt=on!==$;if(Yt){let _t;_e._$AQ?.($),_e._$AM=$,void 0!==_e._$AP&&(_t=$._$AU)!==on._$AU&&_e._$AP(_t)}if(it!==Oe||Yt){let _t=_e._$AA;for(;_t!==it;){const Kt=_t.nextSibling;we.insertBefore(_t,Oe),_t=Kt}}}return _e},ce=($,ue,_e=$)=>($._$AI(ue,_e),$),se={},be=($,ue=se)=>$._$AH=ue,ae=$=>$._$AH,re=$=>{$._$AP?.(!1,!0);let ue=$._$AA;const _e=$._$AB.nextSibling;for(;ue!==_e;){const we=ue.nextSibling;ue.remove(),ue=we}}}}]);
84//# sourceMappingURL=libs_shared_pack-opening_src_index_ts.980a70a4b42e4c1d.js.map

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